botech-library 1.0.75 → 1.0.77

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/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("react/jsx-runtime"),e=require("react"),n=require("sweetalert2"),i=require("axios"),s=require("react-dom");function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var r=o(e);const a=({variant:e="primary",size:n="md",onClick:i,children:s,className:o="",disabled:r=!1})=>{const a={primary:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsx("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]} ${a[e]} ${o}`,onClick:r?void 0:i,disabled:r,children:s})};var l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=e.createContext&&e.createContext(l),d=["attr","size","title"];function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u.apply(null,arguments)}function h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function m(t,e,n){return(e=function(t){var e=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)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){return t&&t.map((t,n)=>e.createElement(t.tag,p({key:n},t.attr),f(t.child)))}function g(t){return n=>e.createElement(x,u({attr:p({},t.attr)},n),f(t.child))}function x(t){var n=n=>{var i,{attr:s,size:o,title:r}=t,a=function(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}(t,d),l=o||n.size||"1em";return n.className&&(i=n.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",u({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,a,{className:i,style:p(p({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&e.createElement("title",null,r),t.children)};return void 0!==c?e.createElement(c.Consumer,null,t=>n(t)):n(l)}function y(t){return g({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)}function v(t){return g({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 b(t){return g({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 g({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 j(t){return g({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 S(t){return g({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 C(t){return g({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)}const k=e.createContext({});function T(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const E="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,P=e.createContext(null);function N(t,e){-1===t.indexOf(e)&&t.push(e)}function M(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const A=(t,e,n)=>n>e?e:n<t?t:n;function R(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let L=()=>{},V=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(L=(t,e,n)=>{t||"undefined"==typeof console||console.warn(R(e,n))},V=(t,e,n)=>{if(!t)throw new Error(R(e,n))});const D={},B=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function z(t){return"object"==typeof t&&null!==t}const I=t=>/^0[^.\s]+$/u.test(t);function F(t){let e;return()=>(void 0===e&&(e=t()),e)}const O=t=>t,$=(t,e)=>n=>e(t(n)),W=(...t)=>t.reduce($),U=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class X{constructor(){this.subscriptions=[]}add(t){return N(this.subscriptions,t),()=>M(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 s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const H=t=>1e3*t,Y=t=>t/1e3;function q(t,e){return e?t*(1e3/e):0}const _=new Set;function G(t,e,n){t||_.has(e)||(console.warn(R(e,n)),_.add(e))}const K=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Z(t,e,n,i){if(t===e&&n===i)return O;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=K(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:K(s(t),e,i)}const J=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Q=t=>e=>1-t(1-e),tt=Z(.33,1.53,.69,.99),et=Q(tt),nt=J(et),it=t=>t>=1?1:(t*=2)<1?.5*et(t):.5*(2-Math.pow(2,-10*(t-1))),st=t=>1-Math.sin(Math.acos(t)),ot=Q(st),rt=J(st),at=Z(.42,0,1,1),lt=Z(0,0,.58,1),ct=Z(.42,0,.58,1),dt=t=>Array.isArray(t)&&"number"==typeof t[0],ut={linear:O,easeIn:at,easeInOut:ct,easeOut:lt,circIn:st,circInOut:rt,circOut:ot,backIn:et,backInOut:nt,backOut:tt,anticipate:it},ht=t=>{if(dt(t)){V(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return Z(e,n,i,s)}return"string"==typeof t?(V(void 0!==ut[t],`Invalid easing type '${t}'`,"invalid-easing-type"),ut[t]):t},pt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],mt={value:null,addProjectionMetrics:null};function ft(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=pt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(c),e&&mt.value&&mt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,d.process(t))}};return d}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=r,f=()=>{const o=D.useManualTiming,r=o?s.timestamp:performance.now();n=!1,o||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:pt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<pt.length;e++)r[pt[e]].cancel(t)},state:s,steps:r}}const{schedule:gt,cancel:xt,state:yt,steps:vt}=ft("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:O,!0);let bt;function wt(){bt=void 0}const jt={now:()=>(void 0===bt&&jt.set(yt.isProcessing||D.useManualTiming?yt.timestamp:performance.now()),bt),set:t=>{bt=t,queueMicrotask(wt)}},St=t=>e=>"string"==typeof e&&e.startsWith(t),Ct=St("--"),kt=St("var(--"),Tt=t=>!!kt(t)&&Et.test(t.split("/*")[0].trim()),Et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const Nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Mt={...Nt,transform:t=>A(0,1,t)},At={...Nt,default:1},Rt=t=>Math.round(1e5*t)/1e5,Lt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Vt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dt=(t,e)=>n=>Boolean("string"==typeof n&&Vt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Bt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Lt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},zt={...Nt,transform:t=>Math.round((t=>A(0,255,t))(t))},It={test:Dt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+zt.transform(t)+", "+zt.transform(e)+", "+zt.transform(n)+", "+Rt(Mt.transform(i))+")"};const Ft={test:Dt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:It.transform},Ot=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),$t=Ot("deg"),Wt=Ot("%"),Ut=Ot("px"),Xt=Ot("vh"),Ht=Ot("vw"),Yt=(()=>({...Wt,parse:t=>Wt.parse(t)/100,transform:t=>Wt.transform(100*t)}))(),qt={test:Dt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Wt.transform(Rt(e))+", "+Wt.transform(Rt(n))+", "+Rt(Mt.transform(i))+")"},_t={test:t=>It.test(t)||Ft.test(t)||qt.test(t),parse:t=>It.test(t)?It.parse(t):qt.test(t)?qt.parse(t):Ft.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?It.transform(t):qt.transform(t),getAnimatableNone:t=>{const e=_t.parse(t);return e.alpha=0,_t.transform(e)}},Gt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Kt="number",Zt="color",Jt=/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 Qt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Jt,t=>(_t.test(t)?(i.color.push(o),s.push(Zt),n.push(_t.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Kt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function te({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===Kt?Rt(i[o]):t===Zt?_t.transform(i[o]):i[o]}return s}}const ee=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:_t.test(n)?_t.getAnimatableNone(n):n;var n};const ne={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Lt)?.length||0)+(t.match(Gt)?.length||0)>0},parse:function(t){return Qt(t).values},createTransformer:function(t){return te(Qt(t))},getAnimatableNone:function(t){const e=Qt(t);return te(e)(e.values.map((t,n)=>ee(t,e.split[n])))}};function ie(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 se(t,e){return n=>n>0?e:t}const oe=(t,e,n)=>t+(e-t)*n,re=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},ae=[Ft,It,qt];function le(t){const e=(n=t,ae.find(t=>t.test(n)));var n;if(L(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===qt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=ie(a,i,t+1/3),o=ie(a,i,t),r=ie(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const ce=(t,e)=>{const n=le(t),i=le(e);if(!n||!i)return se(t,e);const s={...n};return t=>(s.red=re(n.red,i.red,t),s.green=re(n.green,i.green,t),s.blue=re(n.blue,i.blue,t),s.alpha=oe(n.alpha,i.alpha,t),It.transform(s))},de=new Set(["none","hidden"]);function ue(t,e){return n=>oe(t,e,n)}function he(t){return"number"==typeof t?ue:"string"==typeof t?Tt(t)?se:_t.test(t)?ce:fe:Array.isArray(t)?pe:"object"==typeof t?_t.test(t)?ce:me:se}function pe(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>he(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function me(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=he(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const fe=(t,e)=>{const n=ne.createTransformer(e),i=Qt(t),s=Qt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?de.has(t)&&!s.values.length||de.has(e)&&!i.values.length?function(t,e){return de.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):W(pe(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(L(!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.`,"complex-values-different"),se(t,e))};function ge(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return oe(t,e,n);return he(t)(t,e)}const xe=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>gt.update(e,t),stop:()=>xt(e),now:()=>yt.isProcessing?yt.timestamp:jt.now()}},ye=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ve=2e4;function be(t){let e=0;let n=t.next(e);for(;!n.done&&e<ve;)e+=50,n=t.next(e);return e>=ve?1/0:e}const we=100,je=10,Se=1,Ce=0,ke=800,Te=.3,Ee=.3,Pe={granular:.01,default:2},Ne={granular:.005,default:.5},Me=.01,Ae=10,Re=.05,Le=1;function Ve(t,e){return t*Math.sqrt(1-e*e)}const De=.001;const Be=["duration","bounce"],ze=["stiffness","damping","mass"];function Ie(t,e){return e.some(e=>void 0!==t[e])}function Fe(t){let e={velocity:Ce,stiffness:we,damping:je,mass:Se,isResolvedFromDuration:!1,...t};if(!Ie(t,ze)&&Ie(t,Be))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*A(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Se,stiffness:s,damping:o}}else{const n=function({duration:t=ke,bounce:e=Te,velocity:n=Ce,mass:i=Se}){let s,o;L(t<=H(Ae),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=A(Re,Le,r),t=A(Me,Ae,Y(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=Ve(e,r),l=Math.exp(-s);return De-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Ve(Math.pow(e,2),r);return(-s(e)+De>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=H(t),isNaN(a))return{stiffness:we,damping:je,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}({...t,velocity:0});e={...e,...n,mass:Se},e.isResolvedFromDuration=!0}return e}function Oe(t=Ee,e=Te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Fe({...n,velocity:-Y(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=r-o,x=Y(Math.sqrt(l/d)),y=Math.abs(g)<5;let v,b,w,j,S,C;if(i||(i=y?Pe.granular:Pe.default),s||(s=y?Ne.granular:Ne.default),f<1)w=Ve(x,f),j=(m+f*x*g)/w,v=t=>{const e=Math.exp(-f*x*t);return r-e*(j*Math.sin(w*t)+g*Math.cos(w*t))},S=f*x*j+g*w,C=f*x*g-j*w,b=t=>Math.exp(-f*x*t)*(S*Math.sin(w*t)+C*Math.cos(w*t));else if(1===f){v=t=>r-Math.exp(-x*t)*(g+(m+x*g)*t);const t=m+x*g;b=e=>Math.exp(-x*e)*(x*t*e-m)}else{const t=x*Math.sqrt(f*f-1);v=e=>{const n=Math.exp(-f*x*e),i=Math.min(t*e,300);return r-n*((m+f*x*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(m+f*x*g)/t,n=f*x*e-g*t,i=f*x*g-e*t;b=e=>{const s=Math.exp(-f*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const k={calculatedDuration:p&&u||null,velocity:t=>H(b(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*x*t),n=Math.sin(w*t),o=Math.cos(w*t),l=r-e*(j*n+g*o),c=H(e*(S*n+C*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=v(t);if(p)a.done=t>=u;else{const n=H(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(be(k),ve),e=ye(e=>k.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return k}Oe.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(be(i),ve);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:Y(s)}}(t,100,Oe);return t.ease=e.ease,t.duration=H(e.duration),t.type="keyframes",t};function $e(t,e,n){const i=Math.max(e-5,0);return q(n-t(i),e-i)}function We({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===r?f:r(f);g!==f&&(m=g-u);const x=t=>-m*Math.exp(-t/i),y=t=>g+x(t),v=t=>{const e=x(t),n=y(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const j=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Oe({keyframes:[h.value,p(h.value)],velocity:$e(y,t,h.value),damping:s,stiffness:o,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,v(t),j(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&v(t),h)}}}function Ue(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(V(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||D.mix||ge,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||O:e;o=W(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=U(t[i],t[i+1],n);return a[i](s)};return n?e=>c(A(t[0],t[o-1],e)):c}function Xe(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=U(0,e,i);t.push(oe(n,1,s))}}(e,t.length-1),e}function He({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(ht):ht(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Xe(e),t),a=Ue(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||ct).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Ye=t=>null!==t;function qe(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ye),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const _e={decay:We,inertia:We,tween:He,keyframes:He,spring:Oe};function Ge(t){"string"==typeof t.type&&(t.type=_e[t.type])}class Ke{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 Ze=t=>t/100;class Je extends Ke{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==jt.now()&&this.tick(jt.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;Ge(t);const{type:e=He,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||He;"production"!==process.env.NODE_ENV&&a!==He&&V(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`,"spring-two-frames"),a!==He&&"number"!=typeof r[0]&&(this.mixKeyframes=W(Ze,ge(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=be(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:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:p,onUpdate:m,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),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let y,v=this.currentTime,b=n;if(d){const t=Math.min(this.currentTime,i)/r;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/r)):"mirror"===u&&(b=o)),v=A(0,1,n)*r}x?(this.delayState.value=c[0],y=this.delayState):y=b.next(v),s&&!x&&(y.value=s(y.value));let{done:w}=y;x||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return j&&p!==We&&(y.value=qe(c,this.options,f,this.speed)),m&&m(y.value),j&&this.finish(),y}then(t,e){return this.finished.then(t,e)}get duration(){return Y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(this.currentTime)}set time(t){t=H(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return $e(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(jt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=Y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=xe,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(jt.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 Qe=t=>180*t/Math.PI,tn=t=>{const e=Qe(Math.atan2(t[1],t[0]));return nn(e)},en={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tn,rotateZ:tn,skewX:t=>Qe(Math.atan(t[1])),skewY:t=>Qe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},nn=t=>((t%=360)<0&&(t+=360),t),sn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),on=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),rn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sn,scaleY:on,scale:t=>(sn(t)+on(t))/2,rotateX:t=>nn(Qe(Math.atan2(t[6],t[5]))),rotateY:t=>nn(Qe(Math.atan2(-t[2],t[0]))),rotateZ:tn,rotate:tn,skewX:t=>Qe(Math.atan(t[4])),skewY:t=>Qe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function an(t){return t.includes("scale")?1:0}function ln(t,e){if(!t||"none"===t)return an(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=rn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=en,s=e}if(!s)return an(e);const o=i[e],r=s[1].split(",").map(cn);return"function"==typeof o?o(r):r[o]}function cn(t){return parseFloat(t.trim())}const dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=(()=>new Set(dn))(),hn=t=>t===Nt||t===Ut,pn=new Set(["x","y","z"]),mn=dn.filter(t=>!pn.has(t));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-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})=>ln(e,"x"),y:(t,{transform:e})=>ln(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let xn=!1,yn=!1,vn=!1;function bn(){if(yn){const t=Array.from(gn).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 mn.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)})}yn=!1,xn=!1,gn.forEach(t=>t.complete(vn)),gn.clear()}function wn(){gn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yn=!0)})}class jn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(gn.add(this),xn||(xn=!0,gt.read(wn),gt.resolveKeyframes(bn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&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),gn.delete(this)}cancel(){"scheduled"===this.state&&(gn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function Sn(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}const Cn={};function kn(t,e){const n=F(t);return()=>Cn[e]??n()}const Tn=kn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),En=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Nn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pn([0,.65,.55,1]),circOut:Pn([.55,0,1,.45]),backIn:Pn([.31,.01,.66,-.59]),backOut:Pn([.33,1.53,.69,.99])};function Mn(t,e){return t?"function"==typeof t?En()?ye(t,e):"ease-out":dt(t)?Pn(t):Array.isArray(t)?t.map(t=>Mn(t,e)||Nn.easeOut):Nn[t]:void 0}function An(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=Mn(a,s);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Rn(t){return"function"==typeof t&&"applyToOptions"in t}class Ln extends Ke{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,V("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Rn(t)&&En()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=An(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=qe(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Sn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Y(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(t),e&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Tn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),O):i(this)}}const Vn={anticipate:it,backInOut:nt,circInOut:rt};function Dn(t){"string"==typeof t.ease&&t.ease in Vn&&(t.ease=Vn[t.ease])}class Bn extends Ln{constructor(t){Dn(t),Ge(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Je({...o,autoplay:!1}),a=Math.max(10,jt.now()-this.startTime),l=A(0,10,a-10),c=r.sample(a).value,{name:d}=this.options;s&&d&&Sn(s,d,c),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,c,l),r.stop()}}const zn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ne.test(t)&&"0"!==t||t.startsWith("url(")));function In(t){t.duration=0,t.type="keyframes"}const Fn=new Set(["opacity","clipPath","filter","transform"]),On=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const $n=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wn=F(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Un(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=e.owner.getProps();return Wn()&&n&&(Fn.has(n)||$n.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&On.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!d)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Xn extends Ke{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=jt.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||jn;this.keyframeResolver=new h(r,(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:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=jt.now();let d=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=zn(s,e),a=zn(o,e);return L(r===a,`You are trying to animate ${e} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!(!r||!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||Rn(n))&&i)})(t,s,o,r)||(d=!1,!D.instantAnimations&&a||c?.(qe(t,n,e)),t[0]=t[t.length-1],In(n),n.repeat=0);const u={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},h=d&&!l&&Un(u),p=u.motionValue?.owner?.current;let m;if(h)try{m=new Bn({...u,element:p})}catch{m=new Je(u)}else m=new Je(u);m.finished.then(()=>{this.notifyFinished()}).catch(O),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),vn=!0,wn(),bn(),vn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Hn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Yn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qn(t,e,n=1){V(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=function(t){const e=Yn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return B(t)?parseFloat(t):t}return Tt(s)?qn(s,e,n+1):s}const _n={type:"spring",stiffness:500,damping:25,restSpeed:10},Gn={type:"keyframes",duration:.8},Kn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zn=(t,{keyframes:e})=>e.length>2?Gn:un.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_n:Kn;function Jn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Qn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Jn(n,t):n}const ti=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const ei=(t,e,n,i={},s,o)=>r=>{const a=Qn(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=H(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:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function(t){for(const e in t)if(!ti.has(e))return!0;return!1})(a)||Object.assign(d,Zn(t,d)),d.duration&&(d.duration=H(d.duration)),d.repeatDelay&&(d.repeatDelay=H(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(In(d),0===d.delay&&(u=!0)),(D.instantAnimations||D.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,In(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!o&&void 0!==e.get()){const t=qe(d.keyframes,a);if(void 0!==t)return void gt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new Je(d):new Xn(d)};function ni(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ii(t,e,n,i){if("function"==typeof e){const[s,o]=ni(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ni(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function si(t,e,n){const i=t.getProps();return ii(i,e,void 0!==n?n:i.custom,t)}const oi=new Set(["width","height","top","left","right","bottom",...dn]);class ri{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=jt.now();if(this.updatedAt!==e&&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()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=jt.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&&G(!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 X);const n=this.events[t].add(e);return"change"===t?()=>{n(),gt.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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=jt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return q(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 ri(t,e)}const li=t=>Array.isArray(t);function ci(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ai(n))}function di(t){return li(t)?t[t.length-1]||0:t}const ui=t=>Boolean(t&&t.getVelocity);function hi(t,e){const n=t.getValue("willChange");if(i=n,Boolean(ui(i)&&i.add))return n.add(e);if(!n&&D.WillChange){const n=new D.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function pi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const mi="data-"+pi("framerAppearId");function fi(t){return t.props[mi]}function gi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function xi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Jn(o,l):l;const c=o?.reduceMotion;i&&(o=i);const d=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||u&&gi(u,e))continue;const r={delay:n,...Qn(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){gt.update(()=>i.set(s));continue}let h=!1;if(window.MotionHandoffAnimation){const n=fi(t);if(n){const t=window.MotionHandoffAnimation(n,e,gt);null!==t&&(r.startTime=t,h=!0)}}hi(t,e);const p=c??t.shouldReduceMotion;i.start(ei(e,i,s,p&&oi.has(e)?{type:!1}:r,t,h));const m=i.animation;m&&d.push(m)}if(r){const e=()=>gt.update(()=>{r&&function(t,e){const n=si(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)ci(t,e,di(o[e]))}(t,r)});d.length?Promise.all(d).then(e):e()}return d}function yi(t,e,n={}){const i=si(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(xi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(yi(l,e,{...r,delay:n+("function"==typeof i?0:i)+Hn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}const vi=t=>e=>e.test(t),bi=[Nt,Ut,Wt,$t,Ht,Xt,{test:t=>"auto"===t,parse:t=>t}],wi=t=>bi.find(vi(t));function ji(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||I(t))}const Si=new Set(["brightness","contrast","saturate","opacity"]);function Ci(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Lt)||[];if(!i)return t;const s=n.replace(i,"");let o=Si.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ki=/\b([a-z-]*)\(.*?\)/gu,Ti={...ne,getAnimatableNone:t=>{const e=t.match(ki);return e?e.map(Ci).join(" "):t}},Ei={...ne,getAnimatableNone:t=>{const e=ne.parse(t);return ne.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Pi={...Nt,transform:Math.round},Ni={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,inset:Ut,insetBlock:Ut,insetBlockStart:Ut,insetBlockEnd:Ut,insetInline:Ut,insetInlineStart:Ut,insetInlineEnd:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,paddingBlock:Ut,paddingBlockStart:Ut,paddingBlockEnd:Ut,paddingInline:Ut,paddingInlineStart:Ut,paddingInlineEnd:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,marginBlock:Ut,marginBlockStart:Ut,marginBlockEnd:Ut,marginInline:Ut,marginInlineStart:Ut,marginInlineEnd:Ut,fontSize:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Mt,originX:Yt,originY:Yt,originZ:Ut},zIndex:Pi,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:Pi},Mi={...Ni,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Ti,WebkitFilter:Ti,mask:Ei,WebkitMask:Ei},Ai=t=>Mi[t],Ri=new Set([Ti,Ei]);function Li(t,e){let n=Ai(t);return Ri.has(n)||(n=ne),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Vi=new Set(["auto","none","0"]);class Di extends jn{constructor(t,e,n,i,s){super(t,e,n,i,s,!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(),Tt(i))){const s=qn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!oi.has(n)||2!==t.length)return;const[i,s]=t,o=wi(i),r=wi(s);if(Pt(i)!==Pt(s)&&fn[n])this.needsMeasurement=!0;else if(o!==r)if(hn(o)&&hn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else fn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ji(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Vi.has(e)&&Qt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Li(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=fn[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 s=n.length-1,o=n[s];n[s]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function Bi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}const zi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Ii(t){return z(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Fi,cancel:Oi}=ft(queueMicrotask,!1),$i={x:!1,y:!1};function Wi(){return $i.x||$i.y}function Ui(t,e){const n=Bi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Xi(t,e,n={}){const[i,s,o]=Ui(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Wi())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const Hi=(t,e)=>!!e&&(t===e||Hi(t,e.parentElement)),Yi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,qi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const _i=new Set(["INPUT","SELECT","TEXTAREA"]);const Gi=new WeakSet;function Ki(t){return e=>{"Enter"===e.key&&t(e)}}function Zi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ji(t){return Yi(t)&&!Wi()}const Qi=new WeakSet;function ts(t,e,n={}){const[i,s,o]=Ui(t,n),r=t=>{const i=t.currentTarget;if(!Ji(t))return;if(Qi.has(t))return;Gi.add(i),n.stopPropagation&&Qi.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Gi.has(i)&&Gi.delete(i),Ji(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Hi(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Ii(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ki(()=>{if(Gi.has(n))return;Zi(n,"down");const t=Ki(()=>{Zi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Zi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,qi.has(e.tagName)||!0===e.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function es(t){return z(t)&&"ownerSVGElement"in t}const ns=new WeakMap;let is;const ss=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:es(i)&&"getBBox"in i?i.getBBox()[e]:i[n],os=ss("inline","width","offsetWidth"),rs=ss("block","height","offsetHeight");function as({target:t,borderBoxSize:e}){ns.get(t)?.forEach(n=>{n(t,{get width(){return os(t,e)},get height(){return rs(t,e)}})})}function ls(t){t.forEach(as)}function cs(t,e){is||"undefined"!=typeof ResizeObserver&&(is=new ResizeObserver(ls));const n=Bi(t);return n.forEach(t=>{let n=ns.get(t);n||(n=new Set,ns.set(t,n)),n.add(e),is?.observe(t)}),()=>{n.forEach(t=>{const n=ns.get(t);n?.delete(e),n?.size||is?.unobserve(t)})}}const ds=new Set;let us;function hs(t){return ds.add(t),us||(us=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ds.forEach(e=>e(t))},window.addEventListener("resize",us)),()=>{ds.delete(t),ds.size||"function"!=typeof us||(window.removeEventListener("resize",us),us=void 0)}}function ps(t,e){return"function"==typeof t?hs(t):cs(t,e)}const ms=[...bi,_t,ne],fs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),gs=new WeakMap;function xs(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ys(t){return"string"==typeof t||Array.isArray(t)}const vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bs=["initial",...vs];function ws(t){return xs(t.animate)||bs.some(e=>ys(t[e]))}function js(t){return Boolean(ws(t)||t.variants)}const Ss={current:null},Cs={current:!1},ks="undefined"!=typeof window;function Ts(){if(Cs.current=!0,ks)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ss.current=t.matches;t.addEventListener("change",e),e()}else Ss.current=!1}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ps={};function Ns(t){Ps=t}class Ms{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=jt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=ws(e),this.isVariantNode=js(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==l[t]&&ui(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,gs.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Cs.current||Ts(),this.shouldReduceMotion=Ss.current),"production"!==process.env.NODE_ENV&&G(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Fn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Ln({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:H(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=un.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&gt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),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 Ps){const e=Ps[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<Es.length;e++){const n=Es[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 s=e[i],o=n[i];if(ui(s))t.addValue(i,s);else if(ui(o))t.addValue(i,ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ai(void 0!==e?e:s,{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&&(B(n)||I(n))?n=parseFloat(n):(i=n,!ms.find(vi(i))&&ne.test(e)&&(n=Li(t,e))),this.setBaseTarget(t,ui(n)?n.get():n)),ui(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=ii(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||ui(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 X),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Fi.render(this.render)}}class As extends Ms{constructor(){super(...arguments),this.KeyframeResolver=Di}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[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;ui(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Rs{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ls({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Vs(t){return void 0===t||1===t}function Ds({scale:t,scaleX:e,scaleY:n}){return!Vs(t)||!Vs(e)||!Vs(n)}function Bs(t){return Ds(t)||zs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function zs(t){return Is(t.x)||Is(t.y)}function Is(t){return t&&"0%"!==t}function Fs(t,e,n){return n+e*(t-n)}function Os(t,e,n,i,s){return void 0!==s&&(t=Fs(t,s,i)),Fs(t,n,i)+e}function $s(t,e=0,n=1,i,s){t.min=Os(t.min,e,n,i,s),t.max=Os(t.max,e,n,i,s)}function Ws(t,{x:e,y:n}){$s(t.x,e.translate,e.scale,e.originPoint),$s(t.y,n.translate,n.scale,n.originPoint)}const Us=.999999999999,Xs=1.0000000000001;function Hs(t,e){t.min+=e,t.max+=e}function Ys(t,e,n,i,s=.5){$s(t,e,n,oe(t.min,t.max,s),i)}function qs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function _s(t,e,n){const i=n??t;Ys(t.x,qs(e.x,i.x),e.scaleX,e.scale,e.originX),Ys(t.y,qs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Gs(t,e){return Ls(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 Ks={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zs=dn.length;function Js(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(un.has(t))r=!0;else if(Ct(t))s[t]=n;else{const e=zi(n,Ni[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Zs;o++){const r=dn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=zi(a,Ni[r]);l||(s=!1,i+=`${Ks[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Qs(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function to(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const eo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ut.test(t))return t;t=parseFloat(t)}return`${to(t,e.target.x)}% ${to(t,e.target.y)}%`}},no={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ne.parse(t);if(s.length>5)return i;const o=ne.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=oe(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},io={borderRadius:{...eo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eo,borderTopRightRadius:eo,borderBottomLeftRadius:eo,borderBottomRightRadius:eo,boxShadow:no};function so(t,{layout:e,layoutId:n}){return un.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!io[t]||"opacity"===t)}function oo(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ui(i[e])||s&&ui(s[e])||so(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ro extends As{constructor(){super(...arguments),this.type="html",this.renderInstance=Qs}readValueFromInstance(t,e){if(un.has(e))return this.projection?.isProjecting?an(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ln(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Ct(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Gs(t,e)}build(t,e,n){Js(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return oo(t,e,n)}}const ao={offset:"stroke-dashoffset",array:"stroke-dasharray"},lo={offset:"strokeDashoffset",array:"strokeDasharray"};const co=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function uo(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,d){if(Js(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);for(const t of co)void 0!==u[t]&&(h[t]=u[t],delete u[t]);void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ao:lo;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}(u,s,o,r,!1)}const ho=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"]),po=t=>"string"==typeof t&&"svg"===t.toLowerCase();function mo(t,e,n){const i=oo(t,e,n);for(const n in t)if(ui(t[n])||ui(e[n])){i[-1!==dn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class fo extends As{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(un.has(e)){const t=Ai(e);return t&&t.default||0}return e=ho.has(e)?e:pi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return mo(t,e,n)}build(t,e,n){uo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Qs(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(ho.has(n)?n:pi(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=po(t.tagName),super.mount(t)}}const go=bs.length;function xo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&xo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<go;n++){const i=bs[n],s=t.props[i];(ys(s)||!1===s)&&(e[i]=s)}return e}function yo(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 vo=[...vs].reverse(),bo=vs.length;function wo(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 s=e.map(e=>yi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=yi(t,e,n);else{const s="function"==typeof e?si(t,e,n.custom):e;i=Promise.all(xi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function jo(t){let e=wo(t),n=ko(),i=!0,s=!1;const o=e=>(n,i)=>{const s=si(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=xo(t.parent)||{},c=[],d=new Set;let u={},h=1/0;for(let e=0;e<bo;e++){const p=vo[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=ys(f),x=p===r?m.isActive:null;!1===x&&(h=e);let y=f===l[p]&&f!==a[p]&&g;if(y&&(i||s)&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...u},!m.isActive&&null===x||!f&&!m.prevProp||xs(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==x){m.prevResolvedValues&&(u={...u,...m.prevResolvedValues});continue}const v=So(m.prevProp,f);let b=v||p===r&&m.isActive&&!y&&g||e>h&&g,w=!1;const j=Array.isArray(f)?f:[f];let S=j.reduce(o(p),{});!1===x&&(S={});const{prevResolvedValues:C={}}=m,k={...C,...S},T=e=>{b=!0,d.has(e)&&(w=!0,d.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in k){const e=S[t],n=C[t];if(u.hasOwnProperty(t))continue;let i=!1;i=li(e)&&li(n)?!yo(e,n):e!==n,i?null!=e?T(t):d.add(t):void 0!==e&&d.has(t)?T(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(u={...u,...S}),(i||s)&&t.blockInitialAnimation&&(b=!1);const E=y&&v;b&&(!E||w)&&c.push(...j.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=si(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Hn(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(d.size){const e={};if("boolean"!=typeof a.initial){const n=si(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}d.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,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 s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ko(),s=!0}}}function So(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yo(e,t)}function Co(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ko(){return{animate:Co(!0),whileInView:Co(),whileHover:Co(),whileTap:Co(),whileDrag:Co(),whileFocus:Co(),exit:Co()}}function To(t,e){t.min=e.min,t.max=e.max}function Eo(t,e){To(t.x,e.x),To(t.y,e.y)}function Po(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function No(t){return t.max-t.min}function Mo(t,e,n,i=.5){t.origin=i,t.originPoint=oe(e.min,e.max,t.origin),t.scale=No(n)/No(e),t.translate=oe(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 Ao(t,e,n,i){Mo(t.x,e.x,n.x,i?i.originX:void 0),Mo(t.y,e.y,n.y,i?i.originY:void 0)}function Ro(t,e,n,i=0){const s=i?oe(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+No(e)}function Lo(t,e,n,i=0){const s=i?oe(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+No(e)}function Vo(t,e,n,i){Lo(t.x,e.x,n.x,i?.x),Lo(t.y,e.y,n.y,i?.y)}function Do(t,e,n,i,s){return t=Fs(t-=e,1/n,i),void 0!==s&&(t=Fs(t,1/s,i)),t}function Bo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Wt.test(e)&&(e=parseFloat(e),e=oe(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=oe(o.min,o.max,i);t===o&&(a-=e),t.min=Do(t.min,e,n,a,s),t.max=Do(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const zo=["x","scaleX","originX"],Io=["y","scaleY","originY"];function Fo(t,e,n,i){Bo(t.x,e,zo,n?n.x:void 0,i?i.x:void 0),Bo(t.y,e,Io,n?n.y:void 0,i?i.y:void 0)}function Oo(t){return 0===t.translate&&1===t.scale}function $o(t){return Oo(t.x)&&Oo(t.y)}function Wo(t,e){return t.min===e.min&&t.max===e.max}function Uo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Xo(t,e){return Uo(t.x,e.x)&&Uo(t.y,e.y)}function Ho(t){return No(t.x)/No(t.y)}function Yo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function qo(t){return[t("x"),t("y")]}const _o=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Go=_o.length,Ko=t=>"string"==typeof t?parseFloat(t):t,Zo=t=>"number"==typeof t||Ut.test(t);function Jo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Qo=er(0,.5,ot),tr=er(.5,.95,O);function er(t,e,n){return i=>i<t?0:i>e?1:n(U(t,e,i))}function nr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ir=(t,e)=>t.depth-e.depth;class sr{constructor(){this.children=[],this.isDirty=!1}add(t){N(this.children,t),this.isDirty=!0}remove(t){M(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ir),this.isDirty=!1,this.children.forEach(t)}}function or(t){return ui(t)?t.get():t}class rr{constructor(){this.members=[]}add(t){N(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(M(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(M(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lr=["","X","Y","Z"];let cr=0;function dr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ur(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=fi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ur(i)}function hr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=cr++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,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(fr),this.nodes.forEach(Cr),this.nodes.forEach(kr),this.nodes.forEach(gr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 sr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new X),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=es(e)&&!(es(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=jt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(xt(i),t(o-e))};return gt.setup(i,!0),()=>xt(i)}(s,250),ar.hasAnimatedSinceResize&&(ar.hasAnimatedSinceResize=!1,this.nodes.forEach(Sr)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&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 s=this.options.transition||o.getDefaultTransition()||Ar,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Xo(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={...Qn(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Sr(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(),xt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Tr),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&&ur(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,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!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()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(vr),void this.nodes.forEach(yr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(br);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wr),this.nodes.forEach(jr),this.nodes.forEach(pr),this.nodes.forEach(mr)):this.nodes.forEach(br),this.clearAllSnapshots();const t=jt.now();yt.delta=A(0,1e3/60,t-yt.timestamp),yt.timestamp=t,yt.isProcessing=!0,vt.update.process(yt),vt.preRender.process(yt),vt.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xr),this.sharedNodes.forEach(Er)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||No(this.snapshot.measuredBox.x)||No(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.layoutVersion++,this.layoutCorrected||(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(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!$o(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Bs(this.latestValues)||o)&&(s(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)),Vr((i=n).x),Vr(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(Br))){const{scroll:t}=this.root;t&&(Hs(e.x,t.offset.x),Hs(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Eo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Eo(e,t),Hs(e.x,s.offset.x),Hs(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};Eo(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Hs(i.x,-n.scroll.offset.x),Hs(i.y,-n.scroll.offset.y)),Bs(n.latestValues)&&_s(i,n.latestValues,n.layout?.layoutBox)}return Bs(this.latestValues)&&_s(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Eo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Bs(n.latestValues))continue;let i;n.instance&&(Ds(n.latestValues)&&n.updateSnapshot(),i=fs(),Eo(i,n.measurePageBox())),Fo(e,n.latestValues,n.snapshot?.layoutBox,i)}return Bs(this.latestValues)&&Fo(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!==yt.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:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=yt.timestamp;const o=this.getClosestProjectingParent();var r,a,l,c;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Ro(r.x,a.x,l.x,c?.x),Ro(r.y,a.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Eo(this.target,this.layout.layoutBox),Ws(this.target,this.targetDelta)):Eo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ds(this.parent.latestValues)&&!zs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,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}},Vo(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Eo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===yt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=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&&!s)return;Eo(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Hs(t.x,-o.scroll.offset.x),Hs(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ws(t,r)),i&&Bs(o.latestValues)&&_s(t,o.latestValues,o.layout?.layoutBox))}e.x<Xs&&e.x>Us&&(e.x=1),e.y<Xs&&e.y>Us&&(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?(Po(this.prevProjectionDelta.x,this.projectionDelta.x),Po(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ao(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Yo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yo(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:{},s={...this.latestValues},o={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 r={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(Mr));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,g;Pr(o.x,t.x,n),Pr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Nr(p.x,m.x,f.x,g),Nr(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Wo(l.x,h.x)&&Wo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Eo(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=oe(0,n.opacity??1,Qo(i)),t.opacityExit=oe(e.opacity??1,0,tr(i))):o&&(t.opacity=oe(e.opacity??1,n.opacity??1,i));for(let s=0;s<Go;s++){const o=_o[s];let r=Jo(e,o),a=Jo(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Zo(r)===Zo(a)?(t[o]=Math.max(oe(Ko(r),Ko(a),i),0),(Wt.test(a)||Wt.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=oe(e.rotate||0,n.rotate||0,i))}(s,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&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{ar.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ai(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,n){const i=ui(t)?t:ai(t);return i.start(ei("",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:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Dr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=No(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=No(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Eo(e,n),_s(e,s),Ao(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rr);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&&dr("z",t,i,this.animationValues);for(let e=0;e<lr.length;e++)dr(`rotate${lr[e]}`,t,i,this.animationValues),dr(`skew${lr[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()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=or(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=or(e?.pointerEvents)||""),void(this.hasProjected&&!Bs(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}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,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in io){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=io[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?or(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(yr),this.root.sharedNodes.clear()}}}function pr(t){t.updateLayout()}function mr(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:s}=t.options,o=e.source!==t.layout.source;if("size"===s)qo(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=No(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";To(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Dr(s,e.layoutBox,n)&&qo(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=No(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ao(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ao(a,t.applyTransform(i,!0),e.measuredBox):Ao(a,n,e.layoutBox);const l=!$o(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Vo(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Vo(l,n,o.layoutBox,r),Xo(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function fr(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 gr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function xr(t){t.clearSnapshot()}function yr(t){t.clearMeasurements()}function vr(t){t.isLayoutDirty=!0,t.updateLayout()}function br(t){t.isLayoutDirty=!1}function wr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function jr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Sr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cr(t){t.resolveTargetDelta()}function kr(t){t.calcProjection()}function Tr(t){t.resetSkewAndRotation()}function Er(t){t.removeLeadSnapshot()}function Pr(t,e,n){t.translate=oe(e.translate,0,n),t.scale=oe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Nr(t,e,n,i){t.min=oe(e.min,n.min,i),t.max=oe(e.max,n.max,i)}function Mr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ar={duration:.45,ease:[.4,0,.1,1]},Rr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Lr=Rr("applewebkit/")&&!Rr("chrome/")?Math.round:O;function Vr(t){t.min=Lr(t.min),t.max=Lr(t.max)}function Dr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ho(e),s=Ho(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Br(t){return t!==t.root&&t.scroll?.wasRoot}const zr=hr({attachResizeListener:(t,e)=>nr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ir={current:void 0},Fr=hr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ir.current){const t=new zr({});t.mount(window),t.setOptions({layoutScroll:!0}),Ir.current=t}return Ir.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Or=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function $r(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Wr(...t){return r.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=$r(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():$r(t[e],null)}}}}(...t),t)}class Ur extends r.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(Ii(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,n=Ii(t)&&t.offsetWidth||0,i=Ii(t)&&t.offsetHeight||0,s=getComputedStyle(e),o=this.props.sizeRef.current;o.height=parseFloat(s.height),o.width=parseFloat(s.width),o.top=e.offsetTop,o.left=e.offsetLeft,o.right=n-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Xr({children:n,isPresent:i,anchorX:s,anchorY:o,root:a,pop:l}){const c=e.useId(),d=e.useRef(null),u=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=e.useContext(Or),p=n.props?.ref??n?.ref,m=Wr(d,p);return e.useInsertionEffect(()=>{const{width:t,height:e,top:n,left:r,right:p,bottom:m}=u.current;if(i||!1===l||!d.current||!t||!e)return;const f="left"===s?`left: ${r}`:`right: ${p}`,g="bottom"===o?`bottom: ${m}`:`top: ${n}`;d.current.dataset.motionPopId=c;const x=document.createElement("style");h&&(x.nonce=h);const y=a??document.head;return y.appendChild(x),x.sheet&&x.sheet.insertRule(`\n [data-motion-pop-id="${c}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n ${g}px !important;\n }\n `),()=>{d.current?.removeAttribute("data-motion-pop-id"),y.contains(x)&&y.removeChild(x)}},[i]),t.jsx(Ur,{isPresent:i,childRef:d,sizeRef:u,pop:l,children:!1===l?n:r.cloneElement(n,{ref:m})})}const Hr=({children:n,initial:i,isPresent:s,onExitComplete:o,custom:a,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:u,root:h})=>{const p=T(Yr),m=e.useId();let f=!0,g=e.useMemo(()=>(f=!1,{id:m,initial:i,isPresent:s,custom:a,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;o&&o()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[s,p,o]);return l&&f&&(g={...g}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[s]),r.useEffect(()=>{!s&&!p.size&&o&&o()},[s]),n=t.jsx(Xr,{pop:"popLayout"===c,isPresent:s,anchorX:d,anchorY:u,root:h,children:n}),t.jsx(P.Provider,{value:g,children:n})};function Yr(){return new Map}function qr(t=!0){const n=e.useContext(P);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const _r=t=>t.key||"";function Gr(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Kr=({children:n,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",anchorY:d="top",root:u})=>{const[h,p]=qr(l),m=e.useMemo(()=>Gr(n),[n]),f=l&&!h?[]:m.map(_r),g=e.useRef(!0),x=e.useRef(m),y=T(()=>new Map),v=e.useRef(new Set),[b,w]=e.useState(m),[j,S]=e.useState(m);E(()=>{g.current=!1,x.current=m;for(let t=0;t<j.length;t++){const e=_r(j[t]);f.includes(e)?(y.delete(e),v.current.delete(e)):!0!==y.get(e)&&y.set(e,!1)}},[j,f.length,f.join("-")]);const C=[];if(m!==b){let t=[...m];for(let e=0;e<j.length;e++){const n=j[e],i=_r(n);f.includes(i)||(t.splice(e,0,n),C.push(n))}return"wait"===a&&C.length&&(t=C),S(Gr(t)),w(m),null}"production"!==process.env.NODE_ENV&&"wait"===a&&j.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:P}=e.useContext(k);return t.jsx(t.Fragment,{children:j.map(e=>{const n=_r(e),b=!(l&&!h)&&(m===j||f.includes(n));return t.jsx(Hr,{isPresent:b,initial:!(g.current&&!s)&&void 0,custom:i,presenceAffectsLayout:r,mode:a,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(n))return;if(!y.has(n))return;v.current.add(n),y.set(n,!0);let t=!0;y.forEach(e=>{e||(t=!1)}),t&&(P?.(),S(x.current),l&&p?.(),o&&o())},anchorX:c,anchorY:d,children:e},n)})})},Zr=e.createContext({strict:!1}),Jr={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"]};let Qr=!1;function ta(){return function(){if(Qr)return;const t={};for(const e in Jr)t[e]={isEnabled:t=>Jr[e].some(e=>!!t[e])};Ns(t),Qr=!0}(),Ps}const ea=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","propagate","ignoreStrict","viewport"]);function na(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ea.has(t)}let ia=t=>!na(t);try{"function"==typeof(sa=require("@emotion/is-prop-valid").default)&&(ia=t=>t.startsWith("on")?!na(t):sa(t))}catch{}var sa;const oa=e.createContext({});function ra(t){const{initial:n,animate:i}=function(t,e){if(ws(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ys(e)?e:void 0,animate:ys(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(oa));return e.useMemo(()=>({initial:n,animate:i}),[aa(n),aa(i)])}function aa(t){return Array.isArray(t)?t.join(" "):t}const la=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ca(t,e,n){for(const i in e)ui(e[i])||so(i,n)||(t[i]=e[i])}function da(t,n){const i={};return ca(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Js(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ua(t,e){const n={},i=da(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 ha=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function pa(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return uo(e,n,po(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ca(e,t.style,t),o.style={...e,...o.style}}return o}const ma=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fa(t){return"string"==typeof t&&!t.includes("-")&&!!(ma.indexOf(t)>-1||/[A-Z]/u.test(t))}function ga(t,n,i,{latestValues:s},o,r=!1,a){const l=(a??fa(t)?pa:ua)(n,s,o,t),c=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||ui(t[s])||(ia(s)||!0===n&&na(s)||!e&&!na(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof t,r),d=t!==e.Fragment?{...c,...l,ref:i}:{},{children:u}=n,h=e.useMemo(()=>ui(u)?u.get():u,[u]);return e.createElement(t,{...d,children:h})}function xa(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=or(o[t]);let{initial:r,animate:a}=t;const l=ws(t),c=js(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===r;const u=d?a:r;if(u&&"boolean"!=typeof u&&!xs(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=ii(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&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const ya=t=>(n,i)=>{const s=e.useContext(oa),o=e.useContext(P),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:xa(n,i,s,t),renderState:e()}}(t,n,s,o);return i?r():T(r)},va=ya({scrapeMotionValuesFromProps:oo,createRenderState:la}),ba=ya({scrapeMotionValuesFromProps:mo,createRenderState:ha}),wa=Symbol.for("motionComponentSymbol");function ja(t,n,i){const s=e.useRef(i);e.useInsertionEffect(()=>{s.current=i});const o=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const i=s.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(o.current=t)}else o.current?(o.current(),o.current=null):i(e);else i&&(i.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Sa=e.createContext({});function Ca(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ka(t,n,i,s,o,r){const{visualElement:a}=e.useContext(oa),l=e.useContext(Zr),c=e.useContext(P),d=e.useContext(Or),u=d.reducedMotion,h=d.skipAnimations,p=e.useRef(null),m=e.useRef(!1);s=s||l.renderer,!p.current&&s&&(p.current=s(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Sa);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:d,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ta(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&Ca(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c,layoutAnchor:d})}(p.current,i,o,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,c)});const y=i[mi],v=e.useRef(Boolean(y)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return E(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),f.enteringChildren=void 0)}),f}function Ta(t){if(t)return!1!==t.options.allowProjection?t.projection:Ta(t.parent)}function Ea(n,{forwardMotionProps:i=!1,type:s}={},o,r){o&&function(t){const e=ta();for(const n in t)e[n]={...e[n],...t[n]};Ns(e)}(o);const a=s?"svg"===s:fa(n),l=a?ba:va;function c(s,c){let d;const u={...e.useContext(Or),...s,layoutId:Pa(s)},{isStatic:h}=u,p=ra(s),m=l(s,h);if(!h&&"undefined"!=typeof window){!function(t,n){const i=e.useContext(Zr).strict;if("production"!==process.env.NODE_ENV&&n&&i){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?L(!1,e,"lazy-strict-mode"):V(!1,e,"lazy-strict-mode")}}(u,o);const t=function(t){const e=ta(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(u);d=t.MeasureLayout,p.visualElement=ka(n,m,u,r,t.ProjectionNode,a)}return t.jsxs(oa.Provider,{value:p,children:[d&&p.visualElement?t.jsx(d,{visualElement:p.visualElement,...u}):null,ga(n,s,ja(m,p.visualElement,c),m,h,i,a)]})}c.displayName=`motion.${"string"==typeof n?n:`create(${n.displayName??n.name??""})`}`;const d=e.forwardRef(c);return d[wa]=n,d}function Pa({layoutId:t}){const n=e.useContext(k).id;return n&&void 0!==t?n+"-"+t:t}function Na(t,e){if("undefined"==typeof Proxy)return Ea;const n=new Map,i=(n,i)=>Ea(n,i,t,e);return new Proxy((t,e)=>("production"!==process.env.NODE_ENV&&G(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(s,o)=>"create"===o?i:(n.has(o)||n.set(o,Ea(o,void 0,t,e)),n.get(o))})}const Ma=(t,n)=>n.isSVG??fa(t)?new fo(n):new ro(n,{allowProjection:t!==e.Fragment});let Aa=0;const Ra={animation:{Feature:class extends Rs{constructor(t){super(t),t.animationState||(t.animationState=jo(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xs(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 Rs{constructor(){super(...arguments),this.id=Aa++,this.isExitComplete=!1}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;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){const n=si(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function La(t){return{point:{x:t.pageX,y:t.pageY}}}function Va(t,e,n,i){return nr(t,e,(t=>e=>Yi(e)&&t(e,La(e)))(n),i)}const Da=({current:t})=>t?t.ownerDocument.defaultView:null,Ba=(t,e)=>Math.abs(t-e);const za=new Set(["auto","scroll"]);class Ia{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Fa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=$a(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Ba(t.x,e.x),i=Ba(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=yt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Fa(e,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=$a("pointercancel"===t.type?this.lastMoveEventInfo:Fa(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Yi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Fa(La(t),this.transformPagePoint),{point:l}=a,{timestamp:c}=yt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=e;d&&d(t,$a(a,this.history)),this.removeListeners=W(Va(this.contextWindow,"pointermove",this.handlePointerMove),Va(this.contextWindow,"pointerup",this.handlePointerUp),Va(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(za.has(t.overflowX)||za.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xt(this.updatePoint)}}function Fa(t,e){return e?{point:e(t.point)}:t}function Oa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function $a({point:t},e){return{point:t,delta:Oa(t,Ua(e)),offset:Oa(t,Wa(e)),velocity:Xa(e,.1)}}function Wa(t){return t[0]}function Ua(t){return t[t.length-1]}function Xa(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Ua(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>H(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*H(e)&&(i=t[1]);const o=Y(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ha(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 Ya(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 qa=.35;function _a(t,e,n){return{min:Ga(t,e),max:Ga(t,n)}}function Ga(t,e){return"number"==typeof t?t:t[e]||0}const Ka=new WeakMap;class Za{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.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Ia(t,{onSessionStart:t=>{e&&this.snapToCursor(La(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?$i[o]?null:($i[o]=!0,()=>{$i[o]=!1}):$i.x||$i.y?null:($i.x=$i.y=!0,()=>{$i.x=$i.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Wt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=No(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&gt.update(()=>s(t,e),!1,!0),hi(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=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}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&gt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:Da(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&gt.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Qa(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?oe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?oe(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}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&&Ca(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ha(t.x,n,s),y:Ha(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=qa){return!1===t?t=0:!0===t&&(t=qa),{x:_a(t,"left","right"),y:_a(t,"top","bottom")}}(e),i!==this.constraints&&!Ca(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&qo(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||!Ca(t))return!1;const n=t.current;V(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Gs(t,n),{scroll:s}=e;return s&&(Hs(i.x,s.offset.x),Hs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ya(t.x,e.x),y:Ya(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Ls(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=qo(r=>{if(!Qa(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,u)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return hi(this.visualElement,t),n.start(ei(t,n,0,e,this.visualElement,!1))}stopAnimation(){qo(t=>this.getAxisMotionValue(t).stop())}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){qo(e=>{const{drag:n}=this.getProps();if(!Qa(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e],r=s.get()||0;s.set(t[e]-oe(n,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ca(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qo(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=No(t),s=No(e);return s>i?n=U(e.min,e.max-i,t.min):i>s&&(n=U(t.min,t.max-s,e.min)),A(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),qo(e=>{if(!Qa(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(oe(s,o,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ka.set(this.visualElement,this);const t=this.visualElement.current,e=Va(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&function(t){return _i.has(t.tagName)||!0===t.isContentEditable}(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();Ca(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=ps(t,Ja(n)),s=ps(e,Ja(n));return()=>{i(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(i);const r=nr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(qo(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(),e(),o(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=qa,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Ja(t){let e=!0;return()=>{e?e=!1:t()}}function Qa(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const tl=t=>(e,n)=>{t&&gt.update(()=>t(e,n),!1,!0)};let el=!1;class nl extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),el&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ar.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),el=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||gt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),Fi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;el=!0,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 il(n){const[i,s]=qr(),o=e.useContext(k);return t.jsx(nl,{...n,layoutGroup:o,switchLayoutGroup:e.useContext(Sa),isPresent:i,safeToRemove:s})}const sl={pan:{Feature:class extends Rs{constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(t){this.session=new Ia(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Da(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:tl(t),onStart:tl(e),onMove:tl(n),onEnd:(t,e)=>{delete this.session,i&&gt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Va(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 Rs{constructor(t){super(t),this.removeGroupControls=O,this.removeListeners=O,this.controls=new Za(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Fr,MeasureLayout:il}};function ol(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&gt.postRender(()=>s(e,La(e)))}function rl(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 s=i["onTap"+("End"===n?"":n)];s&&gt.postRender(()=>s(e,La(e)))}const al=new WeakMap,ll=new WeakMap,cl=t=>{const e=al.get(t.target);e&&e(t)},dl=t=>{t.forEach(cl)};function ul(t,e,n){const i=function({root:t,...e}){const n=t||document;ll.has(n)||ll.set(n,{});const i=ll.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(dl,{root:t,...e})),i[s]}(e);return al.set(t,n),i.observe(t),()=>{al.delete(t),i.unobserve(t)}}const hl={some:0,all:1};const pl=Na({...Ra,...{inView:{Feature:class extends Rs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:hl[i]};this.stopObserver=ul(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!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(),o=e?n:i;o&&o(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(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Rs{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=ts(t,(t,e)=>(rl(this.node,e,"Start"),(t,{success:e})=>rl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Rs{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=W(nr(this.node.current,"focus",()=>this.onFocus()),nr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Rs{mount(){const{current:t}=this.node;t&&(this.unmount=Xi(t,(t,e)=>(ol(this.node,e,"Start"),t=>ol(this.node,t,"End"))))}unmount(){}}}},...sl,...{layout:{ProjectionNode:Fr,MeasureLayout:il}}},Ma);function ml(){!Cs.current&&Ts();const[t]=e.useState(Ss.current);return"production"!==process.env.NODE_ENV&&G(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),t}const fl=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"},gl=async(t,e)=>{const n=`${fl(t)}/student/downloadExcel/${e||"PASS"}`;return(await i.get(n,{responseType:"blob"})).data},xl=async(t,e,n)=>{const s=`${fl(e)}/student/uploadExcel`,o=new FormData;o.append("receivedExcelFile",t),"85"===e&&n&&o.append("clientName",n);return(await i.post(s,o,{transformRequest:[t=>t]})).data};function yl(t){return g({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)}function vl(t){return g({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 bl(t){return g({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 wl(t){return g({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 jl(t){return g({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 g({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 Cl(t){return g({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 kl(t){return g({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 Tl(t){return g({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 El(t){return g({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 Pl(t){return g({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)}const Nl=({title:e,description:n,onClose:i,showCloseIcon:s=!0,icon:o,actions:r,className:a="",...l})=>t.jsxs("div",{className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${a}`,...l,children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o&&t.jsx("span",{className:"mt-0.5 text-white text-xl",children:o}),t.jsxs("div",{className:"flex-1 min-w-0",children:[e&&t.jsx("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:e}),n&&t.jsx("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:n})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[r,s&&t.jsx("button",{type:"button","aria-label":"Cerrar",onClick:i,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.jsx(bl,{className:"text-xl"})})]})]}),Ml=({className:e="",...n})=>t.jsx("div",{className:`p-4 sm:p-6 ${e}`,...n}),Al=({className:e="",...n})=>t.jsx("div",{className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${e}`,...n}),Rl={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const Ll=({open:n,onClose:i,title:o,description:r,size:a="md",footer:l,showCloseIcon:c=!0,hideHeader:d=!1,closeOnEsc:u=!0,closeOnClickOutside:h=!0,className:p="",children:m,initialFocusRef:f,headerClassName:g,overlayClassName:x,headerIcon:y,headerActions:v,zIndex:b,animate:w=!1})=>{const j=e.useRef(null),S=e.useRef(null),C=ml(),k=w&&!C;var T;T=n,e.useEffect(()=>{if(!T)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[T]),function(t,n,i){e.useEffect(()=>{if(!t)return;const e=n.current;if(!e)return;const s=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],o=()=>Array.from(e.querySelectorAll(s.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),r=document.activeElement;(i?.current||o()[0]||e).focus();const a=t=>{if("Tab"!==t.key)return;const n=o();if(0===n.length)return;const i=n[0],s=n[n.length-1];t.shiftKey?document.activeElement!==i&&document.activeElement!==e||(s.focus(),t.preventDefault()):document.activeElement===s&&(i.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),r?.focus?.()}},[t,n,i])}(n,j,f);const E=e.useCallback(t=>{n&&"Escape"===t.key&&u&&(t.stopPropagation(),i())},[n,u,i]);e.useEffect(()=>{if(n)return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[n,E]);const P=t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${x??""}`}),t.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":o?"bo-modal-title":void 0,"aria-describedby":r?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Rl[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 ${p}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(Nl,{title:o,description:r,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:m}),l&&t.jsx(Al,{children:l})]})]}),N=t.jsx(Kr,{children:n&&t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx(pl.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:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${x??""}`}),t.jsxs(pl.div,{role:"dialog","aria-modal":"true","aria-labelledby":o?"bo-modal-title":void 0,"aria-describedby":r?"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 ${Rl[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 ${p}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(Nl,{title:o,description:r,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:m}),l&&t.jsx(Al,{children:l})]})]})}),M=k?N:n?P:null;return"undefined"!=typeof document?s.createPortal(M,document.body):M};var Vl,Dl,Bl;Ll.Header=Nl,Ll.Body=Ml,Ll.Footer=Al,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(Vl||(Vl={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(Dl||(Dl={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(Bl||(Bl={}));const zl=t=>{switch(t){case Vl.CENTER:return"text-center";case Vl.RIGHT:return"text-right";default:return"text-left"}},Il=t=>{switch(t){case Bl.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case Bl.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:e,size:n,hasActions:i})=>{const s=Il(n);return t.jsx("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:t.jsxs("tr",{children:[e.map(e=>t.jsx("th",{className:`${s.header} ${zl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),i&&t.jsx("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},$l=({columns:e,data:n,renderActions:i,size:s,onRowClick:o})=>{const r=Il(s);return t.jsx("tbody",{children:n.map((n,s)=>t.jsxs("tr",{className:`${Fl(s)} hover:bg-gray-100 transition-colors duration-150 ${o?"cursor-pointer":""}`,onClick:()=>o?.(n),children:[e.map(e=>t.jsx("td",{className:`${r.cell} ${zl(e.alignment)} ${e.className||""}`,children:e.accessor(n)},e.key)),i&&t.jsx("td",{className:`${r.cell} text-center sticky right-0 ${Fl(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:i(n)})]},s))})},Wl=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),Ul={datos_basicos:vl,transporte:Pl,contacto:jl},Xl={nombres:vl,apellidos:vl,curso:function(t){return g({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 g({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:Pl,saleSolo:function(t){return g({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 g({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 g({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 g({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:Tl},Hl={informacion_general:vl,ultimas_novedades:Tl,personas_autorizadas:yl,ultimos_movimientos:Cl},Yl={INGRESO:function(t){return g({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 g({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)}},ql="#FFFFFF",_l="#F7F9FC",Gl="#E5E9F2",Kl="#0F172A",Zl="#64748B",Jl="#94A3B8",Ql="#111F4B",tc="#E2E8FF",ec="#1D4ED8",nc={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"};function ic(t){return g({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)}const sc="#1e40af",oc="#93c5fd",rc="#60a5fa",ac="#1e3a8a",lc=`\n .ba-left {\n display: none;\n flex-direction: column;\n }\n .ba-right {\n width: 100%;\n }\n .ba-sysname {\n position: absolute;\n top: 2rem;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n pointer-events: none;\n }\n @media (min-width: 768px) {\n .ba-left { display: flex; width: 50%; padding: 1.5rem; }\n .ba-right { width: 50%; padding: 4rem; }\n .ba-sysname { top: 3rem; }\n }\n\n /* Inputs */\n .ba-input {\n width: 100%;\n padding: 14px 16px;\n background: #f5f7f9;\n border: 1px solid transparent;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n outline: none;\n transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;\n box-sizing: border-box;\n font-family: inherit;\n }\n .ba-input:focus {\n background: white;\n border-color: ${sc};\n box-shadow: 0 0 0 1px ${sc};\n }\n .ba-input::placeholder { color: #9ca3af; }\n .ba-input:disabled { opacity: 0.6; cursor: not-allowed; }\n\n /* Monospace input (product key) */\n .ba-input-mono {\n font-family: monospace;\n letter-spacing: 1.2px;\n }\n\n /* Primary black button */\n .ba-btn-primary {\n width: 100%;\n padding: 16px;\n background: #111827;\n color: white;\n font-size: 15px;\n font-weight: 600;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n letter-spacing: 0.025em;\n transition: background 0.2s, box-shadow 0.2s;\n font-family: inherit;\n }\n .ba-btn-primary:hover:not(:disabled) {\n background: #1f2937;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n }\n .ba-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Blue primary button (modal) */\n .ba-btn-blue {\n width: 100%;\n padding: 10px 16px;\n background: ${sc};\n color: white;\n font-size: 14px;\n font-weight: 600;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: opacity 0.15s;\n font-family: inherit;\n }\n .ba-btn-blue:hover:not(:disabled) { opacity: 0.9; }\n .ba-btn-blue:disabled { background: #9ca3af; cursor: not-allowed; }\n\n /* Secondary text button */\n .ba-btn-secondary {\n width: 100%;\n padding: 12px;\n background: none;\n color: #4b5563;\n font-size: 14px;\n font-weight: 600;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: color 0.15s;\n font-family: inherit;\n }\n .ba-btn-secondary:hover:not(:disabled) { color: #111827; }\n .ba-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Google overlay button (visual only, invisible Google iframe sits on top) */\n .ba-btn-google {\n width: 100%;\n padding: 16px;\n background: white;\n color: #111827;\n font-size: 15px;\n font-weight: 600;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n pointer-events: none;\n transition: background 0.15s;\n letter-spacing: 0.025em;\n }\n\n /* Link-style buttons */\n .ba-link {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 700;\n color: #111827;\n transition: color 0.15s;\n font-size: inherit;\n font-family: inherit;\n padding: 0;\n }\n .ba-link:hover { color: ${"#1d4ed8"}; }\n\n .ba-link-blue {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n color: ${"#2563eb"};\n transition: color 0.15s;\n font-size: 13px;\n font-family: inherit;\n padding: 0;\n }\n .ba-link-blue:hover { color: ${ac}; }\n\n .ba-link-gray {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n color: #6b7280;\n transition: color 0.15s;\n font-size: 13px;\n font-family: inherit;\n padding: 0;\n }\n .ba-link-gray:hover { color: ${sc}; }\n\n /* Password eye toggle */\n .ba-eye {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n cursor: pointer;\n color: #6b7280;\n display: flex;\n align-items: center;\n transition: color 0.15s;\n padding: 0;\n }\n .ba-eye:hover { color: ${sc}; }\n\n /* Step indicator circles */\n .ba-step-active {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: ${sc};\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n .ba-step-done {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: #22c55e;\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n .ba-step-inactive {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: #d1d5db;\n color: #4b5563;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n\n /* Modal */\n .ba-modal-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n padding: 16px;\n }\n .ba-modal-close {\n background: none; border: none; cursor: pointer;\n color: #9ca3af; display: flex;\n transition: color 0.15s; padding: 0;\n }\n .ba-modal-close:hover { color: #4b5563; }\n\n /* Divider */\n .ba-divider {\n position: relative;\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .ba-divider::before {\n content: '';\n position: absolute;\n left: 0; right: 0; top: 50%;\n border-top: 1px solid #d1d5db;\n }\n .ba-divider span {\n position: relative;\n background: white;\n padding: 0 8px;\n font-size: 14px;\n color: #6b7280;\n }\n\n /* Status boxes */\n .ba-status-success { background: #e7f7ee; color: #1e7e34; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n .ba-status-error { background: #fdecea; color: #b00020; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n .ba-status-loading { background: transparent; color: #374151; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n`;function cc({systemName:e,leftPanelTitle:n,quote:i='"Todas las cosas buenas en este mundo empezaron con un sueño."',quoteAuthor:s="— Willy Wonka",children:o}){return t.jsxs("div",{style:{display:"flex",minHeight:"100vh",backgroundColor:"white"},children:[t.jsx("style",{children:lc}),t.jsxs("div",{style:{display:"flex",width:"100%",minHeight:"100vh"},children:[t.jsx("div",{className:"ba-left",style:{backgroundColor:"white"},children:t.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",borderRadius:"2.5rem",backgroundColor:"black",display:"flex",flexDirection:"column",justifyContent:"space-between",padding:"3.5rem",overflow:"hidden",boxShadow:"0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -5px rgba(0,0,0,0.04)",border:"1px solid #f3f4f6"},children:[t.jsx("div",{style:{position:"absolute",inset:0,background:`linear-gradient(135deg, ${ac}, black 60%, black)`,opacity:.85,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"-10%",left:"-20%",width:"150%",height:"60%",background:"linear-gradient(45deg, rgba(37,99,235,0.3), rgba(96,165,250,0.1))",filter:"blur(80px)",borderRadius:"50%",transform:"rotate(-15deg)",pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"20%",left:"-10%",width:"120%",height:"40%",background:"linear-gradient(90deg, transparent, rgba(96,165,250,0.8), transparent)",filter:"blur(40px)",mixBlendMode:"screen",transform:"rotate(10deg)",opacity:.6,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"35%",left:"-10%",width:"120%",height:"30%",background:"linear-gradient(90deg, transparent, rgba(147,197,253,0.8), transparent)",filter:"blur(30px)",mixBlendMode:"screen",transform:"rotate(-5deg)",opacity:.7,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",bottom:"-10%",right:"-20%",width:"120%",height:"60%",background:"linear-gradient(225deg, rgba(29,78,216,0.4), transparent)",filter:"blur(100px)",borderRadius:"50%",transform:"rotate(25deg)",pointerEvents:"none"}}),t.jsx("div",{style:{position:"relative",zIndex:10,width:"100%",marginBottom:"2.5rem"},children:t.jsxs("p",{style:{fontSize:"2.25rem",letterSpacing:"-0.025em",fontWeight:700,textTransform:"uppercase",opacity:.9,display:"flex",alignItems:"center",gap:"1rem",color:"white",fontFamily:"Afacad, sans-serif",margin:0},children:["BOTECH",t.jsx("span",{style:{height:"1px",width:"4rem",backgroundColor:"rgba(255,255,255,0.4)",display:"block"}})]})}),t.jsxs("div",{style:{position:"relative",zIndex:10,marginTop:"auto",paddingBottom:"1rem"},children:[t.jsx("h2",{style:{fontSize:"3rem",fontFamily:'Georgia, "Times New Roman", serif',lineHeight:1,color:"white",letterSpacing:"-0.025em",margin:"0 0 1.5rem 0"},children:n}),t.jsxs("div",{style:{borderLeft:`2px solid ${rc}`,paddingLeft:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},children:[t.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"#d1d5db",maxWidth:"320px",lineHeight:1.625,opacity:.9,fontStyle:"italic",margin:"0 0 0.5rem 0"},children:i}),t.jsx("p",{style:{fontSize:"11px",fontWeight:700,color:oc,textTransform:"uppercase",letterSpacing:"0.1em",margin:0},children:s})]})]})]})}),t.jsxs("div",{className:"ba-right",style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"white",padding:"2rem",position:"relative"},children:[t.jsx("div",{className:"ba-sysname",children:t.jsx("span",{style:{fontSize:"2.5rem",fontWeight:700,letterSpacing:"-0.025em",color:sc,fontFamily:"Afacad, sans-serif"},children:e})}),o]})]})]})}function dc(t){return g({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"},child:[]}]})(t)}function uc(t){return g({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 0 0 0-51.5zm-63.57-320.64L836 122.88a8 8 0 0 0-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 0 0 0 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 0 0 0 11.31L155.17 889a8 8 0 0 0 11.31 0l712.15-712.12a8 8 0 0 0 0-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 0 0-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 0 1 146.2-106.69L401.31 546.2A112 112 0 0 1 396 512z"},child:[]},{tag:"path",attr:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 0 0 227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 0 1-112 112z"},child:[]}]})(t)}function hc(t){return g({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n\tc0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n\tc0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n\tC34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(t)}function pc({isOpen:n,onClose:i,onSendReset:s}){const[o,r]=e.useState(""),[a,l]=e.useState("idle"),[c,d]=e.useState("");if(!n)return null;const u=()=>{r(""),l("idle"),d(""),i()};return t.jsx("div",{className:"ba-modal-overlay",children:t.jsxs("div",{style:{backgroundColor:"white",borderRadius:"8px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04)",maxWidth:"448px",width:"100%",padding:"24px"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px"},children:[t.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:0},children:"Restablecer Contraseña"}),t.jsx("button",{className:"ba-modal-close",onClick:u,disabled:"loading"===a,children:t.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.jsx("p",{style:{fontSize:"14px",color:"#4b5563",marginBottom:"24px",margin:"0 0 24px 0"},children:"Ingresa tu correo electrónico y te enviaremos un enlace para restablecer tu contraseña."}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),!o.trim())return l("error"),void d("Por favor ingresa tu correo electrónico.");l("loading"),d("");const e=await s(o);e.ok?(l("success"),d(e.message??"Correo enviado exitosamente."),setTimeout(u,3e3)):(l("error"),d(e.error??"Ocurrió un error al enviar el correo."))},noValidate:!0,children:[t.jsxs("div",{style:{marginBottom:"16px"},children:[t.jsx("label",{htmlFor:"reset-email",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:500,color:"#374151"},children:"Correo Electrónico"}),t.jsx("input",{id:"reset-email",className:"ba-input",type:"email",autoComplete:"email",placeholder:"ejemplo@correo.com",value:o,onChange:t=>r(t.target.value),disabled:"loading"===a||"success"===a})]}),t.jsx("button",{type:"submit",className:"ba-btn-blue",disabled:"loading"===a||"success"===a,children:"loading"===a?"Enviando...":"Enviar Enlace de Restablecimiento"}),"idle"!==a&&t.jsx("div",{role:"status",className:`ba-status-${a}`,children:c})]})]})})}const mc=/^[A-Z0-9]{3}-[A-Z0-9]{2}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{7}-[A-Z0-9]{7}$/;function fc(t){return t.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,40)}exports.AuthLayout=cc,exports.Button=a,exports.DownloadStudentsExcelButton=({backend:i,label:s="Descargar Lista de Estudiantes en Excel",fileName:o="students.xlsx",className:r,variant:l="primary",clientName:c,onSuccess:d,onError:u})=>{const[h,p]=e.useState(!1);return t.jsx(a,{variant:l,onClick:async()=>{try{p(!0);let t=c;if("85"===i&&!t){const{value:e}=await n.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 p(!1);t=e}const e=await gl(i,t),s=URL.createObjectURL(e),r=document.createElement("a");r.href=s,r.download=o,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(s),await n.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),d?.()}catch(t){console.error("Download students excel failed",t);let e="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const i=t;e=i?.response?.data?.message??("string"==typeof i?.response?.data?i.response.data:void 0)??(i?.response?.statusText?`Error ${i.response.status}: ${i.response.statusText}`:void 0)??e,await n.fire({title:"Error en la descarga",text:e,icon:"error",confirmButtonText:"OK"}),u?.(t)}finally{p(!1)}},className:r,children:h?"Descargando...":s})},exports.GenericTable=({columns:n,data:i,renderActions:s,size:o=Bl.MD,className:r="",onRowClick:a,isLoading:l=!1,emptyMessage:c="No hay datos disponibles"})=>{const d=e.useRef(null),{visibleData:u}=((t,n)=>{const[i,s]=e.useState(t);return e.useEffect(()=>{const e=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),i=window.innerHeight-e.top-100,o=Math.max(1,Math.floor(i/60));s(t.slice(0,o))};e();const i=()=>{e()};window.addEventListener("resize",i);const o=new ResizeObserver(e);return n.current&&o.observe(n.current),()=>{window.removeEventListener("resize",i),o.disconnect()}},[t,n]),{visibleData:i}})(i,d);return l?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:c})})}):t.jsx("div",{ref:d,className:`w-full shadow-md sm:rounded-lg bg-white ${r}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t.jsx(Ol,{columns:n,size:o,hasActions:!!s}),t.jsx($l,{columns:n,data:u,renderActions:s,size:o,onRowClick:a})]})})})},exports.Header=({title:e,description:n,logoUrl:i,defaultLogoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:d="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:u="h-8 sm:h-10 object-contain",titleClassName:h="text-lg sm:text-xl font-bold",descriptionClassName:p="text-xs sm:text-sm opacity-80"})=>{const m="string"==typeof s&&""!==s.trim()?s:void 0,f="string"==typeof i&&""!==i.trim()?i:m;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsx("button",{onClick:l,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.jsx(b,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),t.jsxs("div",{className:"flex items-center min-w-0 flex-1",children:[t.jsx("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:f?t.jsx("img",{src:f,alt:o,className:u}):t.jsx("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.jsx("span",{className:"text-white font-bold text-sm sm:text-lg",children:r.charAt(0)})})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h1",{className:h,children:r}),t.jsx("p",{className:p,children:a})]})]})]}),c&&t.jsxs("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t.jsx("h2",{className:"text-base sm:text-lg font-semibold",children:e}),t.jsx("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:n})]})]})},exports.IconButton=({leftIcon:e,rightIcon:n,children:i,onClick:s,className:o="",variant:r="primary",size:a="md",disabled:l=!1})=>{const c={primary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsxs("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"}[a]} ${c[r]} ${o}`,onClick:l?void 0:s,disabled:l,children:[e&&t.jsx("span",{className:"flex items-center",children:e}),i,n&&t.jsx("span",{className:"flex items-center",children:n})]})},exports.LoginPage=function({systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,googleClientId:r,onLogin:a,onGoogleCredential:l,onForgotPassword:c,onNavigateToRegister:d}){const[u,h]=e.useState(""),[p,m]=e.useState(""),[f,g]=e.useState(!1),[x,y]=e.useState(!1),v=e.useRef(!1);return e.useEffect(()=>{if(v.current)return;const t=()=>{if(v.current)return!0;const t=document.getElementById("google-btn-login");return!(!window.google?.accounts?.id||!t)&&(v.current=!0,t.innerHTML="",window.google.accounts.id.initialize({client_id:r,callback:async t=>{await l(t.credential)}}),window.google.accounts.id.renderButton(t,{theme:"outline",size:"large",text:"continue_with",width:320}),!0)};if(t())return;const e=setInterval(()=>{t()&&clearInterval(e)},100);return()=>clearInterval(e)},[r]),t.jsxs(cc,{systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,children:[t.jsxs("div",{style:{textAlign:"center",width:"100%",marginTop:"1.5rem",marginBottom:"2rem",maxWidth:"480px"},children:[t.jsx("h2",{style:{fontSize:"2.5rem",fontFamily:'Georgia, "Times New Roman", serif',color:"#111827",marginBottom:"0.75rem",letterSpacing:"-0.025em",margin:"0 0 0.75rem 0"},children:"Bienvenido de nuevo"}),t.jsx("p",{style:{fontSize:"14px",color:"#6b7280",fontWeight:500,letterSpacing:"0.025em",margin:0},children:"Ingresa tu correo y contraseña para acceder al sistema."})]}),t.jsxs("form",{onSubmit:async t=>{t.preventDefault(),u&&p&&await a(u,p)},style:{width:"100%",maxWidth:"480px",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{width:"100%",marginBottom:"20px"},children:[t.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Correo electrónico"}),t.jsx("input",{className:"ba-input",placeholder:"ejemplo@correo.com",name:"email",type:"email",value:u,onChange:t=>h(t.target.value)})]}),t.jsxs("div",{style:{width:"100%",marginBottom:"24px"},children:[t.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Contraseña"}),t.jsxs("div",{style:{position:"relative"},children:[t.jsx("input",{className:"ba-input",style:{paddingRight:"48px"},placeholder:"Tu contraseña secreta",type:f?"text":"password",name:"password",value:p,onChange:t=>m(t.target.value)}),t.jsx("button",{type:"button",className:"ba-eye",onClick:()=>g(t=>!t),children:f?t.jsx(uc,{size:20}):t.jsx(dc,{size:20})})]})]}),t.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:"32px"},children:t.jsx("button",{type:"button",className:"ba-link-blue",onClick:()=>y(!0),children:"¿Olvidaste tu contraseña?"})}),t.jsx("button",{className:"ba-btn-primary",type:"submit",style:{marginBottom:"16px"},children:"Ingresar al sistema"}),t.jsxs("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"},children:[t.jsxs("button",{type:"button",className:"ba-btn-google",children:[t.jsx(hc,{size:22}),"Continuar con Google"]}),t.jsx("div",{id:"google-btn-login",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:.01,zIndex:10,overflow:"hidden"}})]})]}),t.jsx("div",{style:{textAlign:"center",width:"100%",marginTop:"32px"},children:t.jsxs("p",{style:{fontSize:"14px",color:"#4b5563",fontWeight:500,letterSpacing:"0.025em",margin:0},children:["¿Aún no tienes cuenta?"," ",t.jsx("button",{className:"ba-link",onClick:d,children:"Regístrate aquí"})]})}),t.jsx(pc,{isOpen:x,onClose:()=>y(!1),onSendReset:c})]})},exports.Modal=Ll,exports.ModalBody=Ml,exports.ModalFooter=Al,exports.ModalHeader=Nl,exports.MultiSelector=({items:n,selectedItems:i=[],onSelectionChange:s,placeholder:o="Seleccionar elementos",searchPlaceholder:r="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,maxSelectedDisplay:h=3,renderItem:p,renderSelectedItem:m,renderSelectedBadge:f})=>{const[g,x]=e.useState(!1),[y,v]=e.useState(""),b=e.useRef(null),w=e.useRef(null);e.useEffect(()=>{const t=t=>{b.current&&!b.current.contains(t.target)&&x(!1)};if(g)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[g]),e.useEffect(()=>{g&&w.current&&w.current.focus()},[g]),e.useEffect(()=>{g||v("")},[g]);const j=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){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,y),S=t=>i.some(e=>e.id===t.id),C=t=>{s(i.filter(e=>e.id!==t.id))},k=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),T=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),E=({item:e,onRemove:n})=>t.jsxs("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:[m?m(e):e.name,t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),n()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t.jsx(k,{})})]}),P=i.slice(0,h),N=i.length-h;return t.jsxs("div",{ref:b,className:`relative w-full ${a}`,children:[t.jsxs("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 ${l?"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 ${g?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{l||x(!g)},children:[t.jsx("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===i.length?t.jsx("span",{className:"text-gray-500",children:o}):t.jsxs(t.Fragment,{children:[P.map(e=>t.jsx("div",{onClick:t=>t.stopPropagation(),children:f?f(e,()=>C(e)):t.jsx(E,{item:e,onRemove:()=>C(e)})},e.id)),N>0&&t.jsxs("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",N," más"]})]})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i.length>0&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(k,{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(g?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),g&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:w,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:r,value:y,onChange:t=>v(t.target.value),onClick:t=>t.stopPropagation()})]})}),i.length>0&&t.jsxs("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[i.length," elemento(s) seleccionado(s)"]}),t.jsx("div",{className:"max-h-60 overflow-auto",children:0===j.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:y?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):j.map(e=>{const n=S(e);return t.jsxs("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 ${n?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{S(t)?s(i.filter(e=>e.id!==t.id)):s([...i,t])})(e),children:[t.jsx("div",{className:"flex-1",children:p?p(e):t.jsx("span",{className:""+(n?"text-primary-botech-900 font-medium":"text-gray-900"),children:e.name})}),n&&t.jsx("div",{className:"ml-2 text-primary-botech-600",children:t.jsx(T,{})})]},e.id)})})]})]})},exports.NotFound=function(){return t.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:t.jsxs("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsxs("div",{className:"relative flex flex-col items-center",children:[t.jsx("div",{className:"h-80 w-4 bg-gray-700"}),t.jsxs("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.jsx("div",{className:"flex-1 mb-2",children:t.jsxs("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t.jsx("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t.jsx("span",{className:"text-4xl font-bold",children:"404"}),t.jsx("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t.jsx("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."})]}),t.jsxs("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.jsx(ic,{className:"h-4 w-4"}),t.jsx("span",{children:"Volver a la ruta principal"})]})]})})},exports.PasswordResetModal=pc,exports.RegisterProductKeyPage=function({systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,googleClientId:r,systemCode:a,onValidateKey:l,onRegisterWithForm:c,onRegisterWithSSO:d,onFirebaseGoogleSignIn:u,onGoogleAuthLogin:h,onNavigateToLogin:p,onSuccess:m}){const[f,g]=e.useState(""),[x,y]=e.useState("idle"),[v,b]=e.useState(""),[w,j]=e.useState(""),[S,C]=e.useState(1),[k,T]=e.useState(""),[E,P]=e.useState(""),[N,M]=e.useState(""),[A,R]=e.useState(""),[L,V]=e.useState("idle"),[D,B]=e.useState(""),z=e.useRef(null),I=e.useRef(!1),F=e.useMemo(()=>function(t){const e=t.toUpperCase().replace(/[^A-Z0-9]/g,"");return[e.slice(0,3),e.slice(3,5),e.slice(5,10),e.slice(10,15),e.slice(15,22),e.slice(22,29)].filter(Boolean).join("-")}(f),[f]),O=e.useMemo(()=>mc.test(F),[F]);e.useEffect(()=>{z.current?.focus()},[]),e.useEffect(()=>{if(2!==S)return;if(I.current)return;const t=()=>{if(I.current)return!0;const t=document.getElementById("google-rpk-container");return!(!window.google?.accounts?.id||!t)&&(I.current=!0,t.innerHTML="",window.google.accounts.id.initialize({client_id:r,callback:async t=>{await $(t.credential)}}),window.google.accounts.id.renderButton(t,{theme:"outline",size:"large",text:"continue_with",width:320}),!0)};if(t())return;const e=setInterval(()=>{t()&&clearInterval(e)},100);return()=>clearInterval(e)},[S]);const $=async t=>{V("loading"),B("Validando con Google...");const e=await u(t);if(!e.ok)return V("error"),void B(e.error??"No se pudo autenticar con Google.");const n=await d({productKey:F,idToken:e.idToken,firebaseUid:e.localId,email:e.email,systemCode:a,fullName:k||e.displayName||"Usuario Google",phoneNumber:E,tokenFcm:""});if(n.ok){V("success"),B("Registro correcto con Google.");try{await h({idToken:e.idToken,firebaseUid:e.localId,systemCode:a})}catch{}m()}else V("error"),B(n.error??"No se pudo completar el registro.")},W=(e,n)=>"idle"===e?null:t.jsx("div",{role:"status",className:`ba-status-${e}`,children:n});return t.jsxs(cc,{systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,children:[t.jsx("div",{style:{position:"absolute",top:"2rem",left:"2rem"},children:t.jsx("button",{className:"ba-link-gray",onClick:p,children:"← Volver al inicio"})}),t.jsxs("div",{style:{width:"100%",maxWidth:"480px",display:"flex",flexDirection:"column",justifyContent:"center",flex:1,marginTop:"2.5rem"},children:[t.jsx("div",{style:{textAlign:"center",width:"100%",marginBottom:"32px"},children:t.jsx("h2",{style:{fontSize:"2.5rem",fontFamily:'Georgia, "Times New Roman", serif',color:"#111827",letterSpacing:"-0.025em",margin:0},children:"Registro de Llave"})}),t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{className:1===S?"ba-step-active":"ba-step-done",children:1===S?"1":"✓"}),t.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"#374151"},children:"Validar Llave"}),t.jsx("div",{style:{width:"48px",height:"2px",backgroundColor:"#d1d5db",margin:"0 8px"}}),t.jsx("div",{className:2===S?"ba-step-active":"ba-step-inactive",children:"2"}),t.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"#374151"},children:"Registro de Usuario"})]})}),1===S&&t.jsxs(t.Fragment,{children:[t.jsx("h1",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"0 0 8px 0"},children:"Registro de llave de producto"}),t.jsxs("p",{style:{fontSize:"14px",color:"#6b7280",fontWeight:500,letterSpacing:"0.025em",margin:"0 0 24px 0"},children:["Ingresa tu llave de producto en el formato",t.jsx("br",{}),"XXX-XX-XXXXX-XXXXX-XXXXXXX-XXXXXXX."]}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),!O||"loading"===x)return;y("loading"),j(F);const e=await l(F);e.ok?(y("success"),b(e.message??"Llave validada correctamente."),setTimeout(()=>C(2),800)):(y("error"),b(e.error??"Llave inválida o ya utilizada."))},noValidate:!0,style:{display:"flex",flexDirection:"column"},children:[t.jsx("label",{htmlFor:"productKey",style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Llave de producto"}),t.jsx("input",{id:"productKey",ref:z,className:"ba-input ba-input-mono",type:"text",inputMode:"text",autoComplete:"off",placeholder:"AB1-C0-0DE06-FGHIJ-00K1L2M-1234567",value:F,onChange:t=>{y("idle"),b(""),g(fc(t.target.value))},onPaste:t=>{t.preventDefault(),g(fc(t.clipboardData.getData("text")))},maxLength:40,"aria-invalid":!O&&f.length>0,style:{borderColor:0===f.length?"transparent":O?"#22c55e":"#f87171"},disabled:"loading"===x||"success"===x}),t.jsx("div",{style:{fontSize:"12px",color:O||0===f.length?"#6b7280":"#dc2626",marginTop:"6px"},children:0===f.length?"Solo letras y números. Se formatea automáticamente.":O?"Formato válido.":"Formato inválido. Debe ser XXX-XX-XXXXX-XXXXX-XXXXXXX-XXXXXXX."}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",marginTop:"24px"},children:[t.jsx("button",{type:"submit",className:"ba-btn-primary",disabled:!O||"loading"===x||"success"===x,children:"loading"===x?"Validando...":"Validar Llave"}),t.jsx("button",{type:"button",className:"ba-btn-secondary",onClick:()=>{g(""),y("idle"),b(""),C(1),T(""),P(""),M(""),R(""),V("idle"),B(""),I.current=!1,z.current?.focus()},disabled:"loading"===x,children:"Limpiar"})]}),W(x,v)]})]}),2===S&&t.jsxs(t.Fragment,{children:[t.jsx("h1",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"0 0 8px 0"},children:"Completa tu registro"}),t.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:"0 0 16px 0"},children:"Ingresa tus datos para completar el registro."}),t.jsxs("div",{style:{marginBottom:"16px"},children:[t.jsxs("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"},children:[t.jsxs("button",{type:"button",className:"ba-btn-google",children:[t.jsx(hc,{size:22}),"Continuar con Google"]}),t.jsx("div",{id:"google-rpk-container",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:.01,zIndex:10,overflow:"hidden"}})]}),t.jsx("div",{className:"ba-divider",children:t.jsx("span",{children:"o registrarse con email"})})]}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),"loading"===L)return;if(!(k.trim()&&E.trim()&&N.trim()&&A.trim()))return V("error"),void B("Por favor completa todos los campos.");if(A.length<6)return V("error"),void B("La contraseña debe tener al menos 6 caracteres.");V("loading");const e=await c(N,A,k,E,w);e.ok?(V("success"),B("Usuario registrado correctamente."),m()):(V("error"),B(e.error??"Error al registrar el usuario."))},noValidate:!0,style:{display:"flex",flexDirection:"column",gap:"16px"},children:[[{id:"fullName",label:"Nombre Completo",type:"text",value:k,setter:T,placeholder:"Juan Pérez",autoComplete:"name"},{id:"phoneNumber",label:"Número de Teléfono",type:"tel",value:E,setter:P,placeholder:"+57 300 000 0000",autoComplete:"tel"},{id:"email",label:"Correo Electrónico",type:"email",value:N,setter:M,placeholder:"ejemplo@correo.com",autoComplete:"email"},{id:"password",label:"Contraseña",type:"password",value:A,setter:R,placeholder:"Mínimo 6 caracteres",autoComplete:"new-password"}].map(({id:e,label:n,type:i,value:s,setter:o,placeholder:r,autoComplete:a})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:e,style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:n}),t.jsx("input",{id:e,className:"ba-input",type:i,autoComplete:a,placeholder:r,value:s,onChange:t=>o(t.target.value),disabled:"loading"===L||"success"===L})]},e)),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",paddingTop:"8px"},children:[t.jsx("button",{type:"submit",className:"ba-btn-primary",disabled:"loading"===L||"success"===L,children:"loading"===L?"Registrando...":"Registrar Usuario"}),t.jsx("button",{type:"button",className:"ba-btn-secondary",onClick:()=>{C(1),V("idle"),B(""),I.current=!1},disabled:"loading"===L,children:"Volver"})]}),W(L,D)]})]})]})]})},exports.Sidebar=({isOpen:n,onClose:i,onToggle:s,menuItems:o,logoUrl:r,logoAlt:a="Logo",systemName:l="PASS",defaultLogoUrl:c,dashboardPath:d,className:u="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:h="fixed inset-0 bg-black/25 z-40",desktopMenuClassName:p="h-full flex flex-col",showBottomMenu:m=!0,bottomMenuItems:f=[{id:"settings",label:"Configuración",icon:v,action:()=>{}},{id:"help",label:"Ayuda",icon:j,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:w,action:()=>{}}],activePath:g="",onNavigate:x,children:b,performanceMode:k="auto",fpsThreshold:T,fpsSampleSize:E,compatibilityMode:P=!1,onPerformanceModeChange:N})=>{const[M,A]=e.useState(new Set),{effectiveMode:R}=function({mode:t="auto",fpsThreshold:n=45,fpsSampleSize:i=90,compatibilityFlag:s=!1,onModeChange:o}={}){const[r,a]=e.useState(!1),[l,c]=e.useState(!1),d=e.useRef("full");e.useEffect(()=>{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]),e.useEffect(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||r||s)return;let e=0,o=0,a=performance.now(),l=null;const d=Math.min(Math.max(30,i),240),u=t=>{const i=t-a;a=t,e>0&&(o+=1e3/i),e+=1,e>=d?o/(e-1||1)<n&&c(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,r,s,i,n]);const u=e.useMemo(()=>"full"===t||"lite"===t?t:s||r||l?"lite":"full",[t,s,r,l]);return e.useEffect(()=>{o?d.current!==u&&(o(u),d.current=u):d.current=u},[u,o]),{effectiveMode:u,prefersReducedMotion:r,detectedLowPerformance:l,compatibilityFlag:s}}({mode:k,fpsThreshold:T,fpsSampleSize:E,compatibilityFlag:P,onModeChange:N}),L="lite"===R,V=e.useMemo(()=>L?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:n?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[L,n]),D=e.useMemo(()=>L?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[L]),B="string"==typeof c&&""!==c.trim()?c:void 0,z="string"==typeof r&&""!==r.trim()?r:B,I=t=>g.includes(t),F=t=>{x&&x(t),i()},O=(e,n=!1)=>t.jsxs(pl.button,{whileHover:L?void 0:{scale:1.01},whileTap:L?void 0:{scale:.99},transition:L?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:L?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${n?"pr-4 pl-10":"px-4"} ${I(e.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>F(e.path),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(S,{className:"w-4 h-4 transition-transform "+(I(e.path)?"rotate-90":"group-hover:translate-x-1")})]},e.id),$=e=>{const n=M.has(e.id);return t.jsxs("div",{className:"mb-2",children:[t.jsxs(pl.button,{whileHover:L?void 0:{scale:1.01},whileTap:L?void 0:{scale:.99},transition:L?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:L?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=e.id,void A(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(C,{className:"w-4 h-4 transition-transform "+(n?"rotate-180":"")})]}),L?n&&t.jsx("div",{className:"pt-2 space-y-1",children:e.children.map(t=>O(t,!0))}):t.jsx(Kr,{initial:!1,children:n&&t.jsx(pl.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:e.children.map(t=>O(t,!0))},`${e.id}-content`)})]},e.id)},W=t.jsxs("div",{className:p,children:[t.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("button",{type:"button",onClick:()=>{d&&F(d)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:z?t.jsx("img",{src:z,alt:a,className:"h-full object-contain"}):t.jsx("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t.jsx("span",{className:"text-white font-bold text-sm",children:l.charAt(0)})})}),t.jsx("h1",{className:"text-lg font-bold text-gray-800",children:l})]}),t.jsx("button",{onClick:i,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t.jsx(y,{className:"w-5 h-5"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:t.jsx("nav",{className:"space-y-2",children:o.map(t=>"folder"===t.type?$(t.data):O(t.data))})}),m&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsx("div",{className:"space-y-2",children:f.map(e=>t.jsxs("button",{onClick:e.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.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"text-sm",children:e.label})]},e.id))})}),b&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:b})]});return t.jsxs(t.Fragment,{children:[L?n&&t.jsx("div",{className:h,style:D,onClick:i,"data-motion-mode":R}):t.jsx(Kr,{initial:!1,children:n&&t.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:h,style:D,onClick:i})}),L?t.jsx("div",{className:u,style:V,"data-motion-mode":R,children:W}):t.jsx(pl.div,{initial:!1,animate:{x:n?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:u,style:V,"data-motion-mode":R,children:W})]})},exports.SingleSelector=({items:n,selectedItem:i=null,onSelectionChange:s,placeholder:o="Seleccionar elemento",searchPlaceholder:r="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,renderItem:h,renderSelectedItem:p})=>{const[m,f]=e.useState(!1),[g,x]=e.useState(""),y=e.useRef(null),v=e.useRef(null),b=e.useRef(null),w=e.useRef([]),j=e.useId();e.useEffect(()=>{const t=t=>{y.current&&!y.current.contains(t.target)&&f(!1)};if(m)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[m]),e.useEffect(()=>{m&&b.current&&b.current.focus()},[m]),e.useEffect(()=>{m||x("")},[m]);const S=e.useMemo(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){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,g),[n,g,d,u,c]),[C,k]=e.useState(-1),T=e.useCallback(()=>{f(!1)},[]),E=t=>{s(t),T(),v.current?.focus()},P=()=>{l||f(!m)},N=e.useCallback(t=>{S.length&&k(e=>((-1===e?1===t?-1:0:e)+t+S.length)%S.length)},[S.length]);e.useEffect(()=>{if(m){const t=i?S.findIndex(t=>t.id===i.id):-1;-1!==t?k(t):S.length?k(t=>t>=0&&t<S.length?t:0):k(-1)}else k(-1)},[m,S,i]),e.useEffect(()=>{if(C<0)return;const t=w.current[C];t?.scrollIntoView({block:"nearest"})},[C]);return w.current=[],t.jsxs("div",{ref:y,className:`relative w-full ${a}`,onKeyDown:t=>{if(l)return;const e=t.target,n=e===v.current;if(!m)return void(!n||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),P()));if("Escape"===t.key)return t.preventDefault(),T(),void v.current?.focus();if(e instanceof HTMLButtonElement)return;const i=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),N(1);break;case"ArrowUp":t.preventDefault(),N(-1);break;case"Enter":C>=0&&C<S.length&&(t.preventDefault(),E(S[C]));break;case" ":case"Spacebar":if(i)break;C>=0&&C<S.length&&(t.preventDefault(),E(S[C]))}},children:[t.jsxs("div",{ref:v,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 ${l?"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 ${m?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:P,role:"button",tabIndex:l?-1:0,"aria-haspopup":"listbox","aria-expanded":m,"aria-disabled":l,children:[t.jsx("div",{className:"flex-1 truncate",children:i?t.jsx("span",{className:"text-gray-900",children:p?p(i):i.name}):t.jsx("span",{className:"text-gray-500",children:o})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(m?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),m&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:b,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:r,value:g,onChange:t=>x(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":j})]})}),t.jsx("div",{id:j,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":C>=0?`${j}-option-${C}`:void 0,children:0===S.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:g?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):S.map((e,n)=>t.jsx("div",{id:`${j}-option-${n}`,ref:t=>{w.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 "+(C===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>E(e),role:"option","aria-selected":i?.id===e.id,onMouseEnter:()=>k(n),children:h?h(e):t.jsx("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},exports.StudentSummaryModal=({open:n,onClose:i,context:s="pass",student:o,generalGroups:r,sections:l=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:h=!1,error:p,onReload:m})=>{const[f,g]=e.useState(!0),[x,y]=e.useState(!1),[v,b]=e.useState("desktop");e.useEffect(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;b(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w="mobile"===v,j="tablet"===v;e.useEffect(()=>{if(h)g(!0),y(!1);else if(c){g(!0),y(!1);const t=new Image;t.onload=()=>{g(!1)},t.onerror=()=>{g(!1),y(!0)},t.src=c}else g(!1),y(!0)},[c,h]),e.useEffect(()=>{n||(g(!0),y(!1))},[n,o.id]);const S=e.useMemo(()=>{const t=r??[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:o.nombres??""},{id:"apellidos",label:"Apellidos",value:o.apellidos??""},{id:"curso",label:"Curso",value:o.curso??""},{id:"codigoFamilia",label:"Código familia",value:o.codigoFamilia??""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:o.transporte??""},{id:"saleSolo",label:"Sale solo",value:o.saleSolo??""},{id:"bajaSolo",label:"Baja solo",value:o.bajaSolo??""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:o.direccionCasa??""},{id:"rfid",label:"RFID",value:o.rfid??""},{id:"idSchoolRegistration",label:"Registro escolar",value:o.idSchoolRegistration??""}]}];return{id:"informacion_general",title:nc.informacion_general,items:t}},[r,o]),C=e.useMemo(()=>`${o.nombres??""} ${o.apellidos??""}`.trim(),[o.nombres,o.apellidos]),k=e=>{switch(e.id){case"ultimas_novedades":return(n=e.items).length?t.jsx("div",{className:"space-y-4",children:n.map(e=>t.jsxs("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:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("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.jsx(Tl,{className:"h-3.5 w-3.5"})," ",e.tipo]}),t.jsxs("time",{dateTime:e.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t.jsx(El,{className:"h-3.5 w-3.5"}),Wl(e.fecha)]})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-blue-900",children:[t.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t.jsx("span",{className:"text-sm font-bold",children:e.estado})]}),t.jsxs("p",{className:"text-sm",children:[t.jsx("span",{className:"font-semibold",children:"Responsable:"})," ",e.responsable]}),t.jsx("p",{className:"text-sm leading-relaxed",children:e.descripcion})]}),e.respuesta&&t.jsxs("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.jsx("span",{className:"font-semibold",children:"Respuesta:"})," ",e.respuesta]})]},e.id))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(e=>e.length?t.jsx("div",{className:"grid gap-4",children:e.map(e=>t.jsxs("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:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("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.jsx(yl,{className:"h-5 w-5"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-sm font-semibold text-emerald-900",children:e.nombreCompleto}),t.jsxs("p",{className:"text-xs text-emerald-700",children:[e.tipoDocumento," • ",e.numeroDocumento]})]})]}),t.jsx("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:e.estado})]}),t.jsxs("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.codigoFamilia})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),t.jsxs("dd",{className:"text-sm font-semibold",children:[e.vigencia.desde," – ",e.vigencia.hasta]})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.autorizadoPor})]})]})]},`${e.numeroDocumento}-${e.vigencia.desde}`))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(e.items);case"ultimos_movimientos":return(e=>e.length?t.jsxs("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t.jsx("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:Gl}}),e.map((e,n)=>{const i=Yl[e.tipo.toUpperCase()]??Cl;return t.jsxs("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t.jsx("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:ql,color:Zl,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${Gl}`},children:t.jsx(i,{size:16})}),t.jsxs("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 ${Gl}`,backgroundColor:ql,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t.jsx("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:e.tipo}),t.jsx("time",{dateTime:e.fecha,children:Wl(e.fecha)})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-slate-700",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-semibold",children:"Lector:"})," ",e.lector.descripcion," (",e.lector.id,")"]}),e.observaciones&&t.jsx("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:e.observaciones})]})]})]},`${e.fecha}-${n}`)})]}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(e.items);case"paradas":return(e=>e.length?t.jsx("div",{className:"student-summary-paradas",style:{display:"grid",gap:w?14:j?16:18},children:e.map((e,n)=>{const i=`Parada ${e.orden??n+1}`,s=e.time??e.horaProgramada;return t.jsxs("article",{style:{borderRadius:24,border:`1px solid ${Gl}`,backgroundColor:ql,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:w?"flex-start":"center",justifyContent:"space-between",gap:16},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(jl,{size:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Jl},children:i}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:Kl},children:e.address??"Dirección no disponible"})]})]}),s&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:w?"6px 12px":"6px 14px",backgroundColor:_l,border:`1px solid ${Gl}`,fontSize:12,fontWeight:600,color:Zl},children:[t.jsx(kl,{size:12}),s]})]}),t.jsxs("div",{style:{marginTop:16,display:"grid",gap:w?10:12,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[e.estado&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:_l,border:`1px solid ${Gl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Estado"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:e.estado})]}),e.horaReal&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:_l,border:`1px solid ${Gl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Hora real"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:e.horaReal})]}),e.observaciones&&t.jsx("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${Gl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t.jsx("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:e.observaciones})}),e.coordinates&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:_l,border:`1px solid ${Gl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Coordenadas"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:[e.coordinates.lat.toFixed(6),", ",e.coordinates.lng.toFixed(6)]})]})]})]},e.id??`${n}`)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(e.items);case"recorridos":return(e=>e.length?t.jsx("div",{className:"student-summary-recorridos",style:{display:"grid",gap:w?16:j?18:20},children:e.map(e=>t.jsxs("article",{style:{borderRadius:26,border:`1px solid ${Gl}`,backgroundColor:ql,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:w?42:46,height:w?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(wl,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:w?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Jl},children:"Recorrido"}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?15:16,fontWeight:600,color:Kl},children:e.nombreRecorrido}),e.tipoRecorrido&&t.jsx("p",{style:{margin:"2px 0 0",fontSize:w?12:13,color:Zl},children:e.tipoRecorrido})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[e.estadoActual&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:e.estadoActual}),e.numeroFlota&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:_l,color:Zl,fontSize:12,fontWeight:600},children:["Flota ",e.numeroFlota]}),e.placaBus&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:_l,color:Zl,fontSize:12,fontWeight:600},children:e.placaBus})]})]}),t.jsxs("div",{style:{marginTop:20,display:"grid",gap:w?12:14,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(e.horaInicio||e.horaFin)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:_l,border:`1px solid ${Gl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Horario"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:[e.horaInicio??"—"," – ",e.horaFin??"—"]})]}),(e.nombreAuxiliar||e.nombreOperario)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:_l,border:`1px solid ${Gl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Equipo"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:["Auxiliar: ",e.nombreAuxiliar??"—"]}),t.jsxs("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:Kl},children:["Operario: ",e.nombreOperario??"—"]})]}),e.diasRecorrido&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:_l,border:`1px solid ${Gl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Jl},children:"Días programados"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Kl},children:e.diasRecorrido})]})]}),e.ultimoEvento&&t.jsx("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${Gl}`,padding:w?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:e.ultimoEvento})]},e.idRecorrido))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(e.items);default:return null}var n},T=l??[];return t.jsxs(Ll,{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:[t.jsxs(Ml,{className:"px-4 pb-6",children:[p&&t.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t.jsx("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t.jsx("p",{className:"mt-1",children:p}),m&&t.jsx(a,{variant:"secondary",onClick:m,className:"mt-3",children:"Reintentar"})]}),t.jsxs("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:w?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[t.jsxs("div",{className:"student-summary-layout",style:{display:"grid",gap:w?20:j?24:28,gridTemplateColumns:w||j?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t.jsx("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${Gl}`,backgroundColor:ql,padding:w?20:j?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:w?18:24},children:[t.jsx("div",{style:{position:"relative",width:w?110:j?128:140,height:w?110:j?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${ql}`,backgroundColor:_l,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:f?t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:_l},children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t.jsx("img",{src:c,alt:C||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:_l,color:Zl},children:t.jsx(vl,{size:w?48:j?56:60})})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t.jsx("h2",{style:{margin:0,fontSize:w?18:22,fontWeight:600,color:Kl},children:C||"Nombre no disponible"}),o.curso&&t.jsxs("p",{style:{margin:0,fontSize:w?13:15,color:Zl},children:["Curso"," ",t.jsx("span",{style:{fontWeight:600,color:"#4338CA"},children:o.curso})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[o.id&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:_l,border:`1px solid ${Gl}`,borderRadius:20,padding:w?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:w?200:240},children:[t.jsx("span",{style:{fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:Jl,fontWeight:700},children:"Identificador estudiante"}),t.jsx("span",{style:{fontSize:17,fontWeight:600,color:Kl},children:o.id})]}),t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:tc,color:ec,letterSpacing:"0.04em"},children:["Contexto: ",s.toUpperCase()]})]})]})}),t.jsx("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${Gl}`,backgroundColor:ql,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(e=>{const n=Hl[e.id]??Sl,i=w?1:j?2:3,s=Math.min(Math.max(e.items.length,1),i);return t.jsxs("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[t.jsxs("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:w?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:w?0:4},children:[t.jsx("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?46:56,height:w?46:56,borderRadius:18,backgroundColor:Ql,color:ql,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t.jsx(n,{size:w?18:22})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?16:18,fontWeight:600,color:Kl},children:e.title}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:w?13:14,color:Zl},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t.jsx("div",{className:"student-summary-general__grid",style:{display:"grid",gap:w?14:j?18:20,gridTemplateColumns:`repeat(${s}, minmax(0, 1fr))`},children:e.items.map(e=>{const i=Ul[e.id]??n;return t.jsxs("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${Gl}`,backgroundColor:ql,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:w?16:j?18:20,display:"flex",flexDirection:"column",gap:14},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${Gl}`},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:_l,color:Zl},children:t.jsx(i,{size:20})}),t.jsx("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:Kl},children:e.title})]}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.rows.map(e=>{const n=Xl[e.id]??Sl;return t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:w?10:12,borderRadius:20,backgroundColor:_l,border:`1px solid ${Gl}`,padding:w?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?36:40,height:w?36:40,borderRadius:"50%",backgroundColor:ql,color:Zl,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t.jsx(n,{size:w?14:16})}),t.jsxs("div",{style:{minWidth:0},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Jl},children:e.label}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?13:14,fontWeight:600,color:Kl,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(i=e.value,null==i?"—":"string"==typeof i?i.trim()?i:"—":i)})]})]},e.id);var i})})]},e.id)})})]})})(S)})]}),T.length>0?t.jsx("div",{className:"student-summary-modules",style:{display:"grid",gap:w?18:j?20:24,gridTemplateColumns:w?"1fr":j?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:T.map(e=>{const n=Hl[e.id]??Sl,i=e.title??nc[e.id]??"Sección";return t.jsxs("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${Gl}`,backgroundColor:ql,padding:w?18:j?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?40:46,height:w?40:46,borderRadius:16,backgroundColor:_l,color:Zl},children:t.jsx(n,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?15:17,fontWeight:600,color:Kl},children:i}),e.meta?.maxItems&&t.jsxs("p",{style:{margin:"6px 0 0",fontSize:12,color:Zl},children:["Mostrando hasta ",e.meta.maxItems," registros recientes."]})]})]}),t.jsx("div",{className:"flex-1",children:k(e)})]},e.id)})}):!h&&!p&&t.jsx("div",{className:"flex h-48 items-center justify-center",children:t.jsx("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t.jsx(Al,{children:t.jsx(a,{variant:"secondary",onClick:i,children:"Cerrar"})})]})},exports.UploadStudentsExcelButton=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:o,variant:r="primary",clientName:l,onSuccess:c,onError:d})=>{const u=e.useRef(null),[h,p]=e.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(a,{variant:r,onClick:()=>{u.current?.click()},className:o,children:h?"Subiendo...":s}),t.jsx("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:async t=>{const e=t.target.files?.[0];if(!e)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(e.name)))if(0!==e.size)try{p(!0);let t=l;if("85"===i&&!t){const{value:e}=await n.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 p(!1);t=e}const s=await xl(e,i,t);let o="El archivo se ha cargado correctamente";s?.message?o=s.message:"string"==typeof s&&(o=s),await n.fire({title:"¡Carga exitosa!",text:o,icon:"success",confirmButtonText:"OK"}),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=i?.response?.data?.message??("string"==typeof i?.response?.data?i.response.data:void 0)??(i?.response?.statusText?`Error ${i.response.status}: ${i.response.statusText}`:void 0)??e,await n.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),d?.(t)}finally{u.current&&(u.current.value=""),p(!1)}else await n.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else await n.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})}})]})},exports.downloadStudentsExcel=gl,exports.generateTableColumns=function(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=>e[t]??"-"}))},exports.getBackendPrefix=fl,exports.uploadStudentsExcel=xl,exports.useModal=function(t=!1){const[n,i]=e.useState(t);return{open:n,onOpen:e.useCallback(()=>i(!0),[]),onClose:e.useCallback(()=>i(!1),[]),toggle:e.useCallback(()=>i(t=>!t),[]),setOpen:i}};
1
+ "use strict";var t=require("react/jsx-runtime"),e=require("react"),n=require("sweetalert2"),i=require("axios"),s=require("react-dom");function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var r=o(e);const a=({variant:e="primary",size:n="md",onClick:i,children:s,className:o="",disabled:r=!1})=>{const a={primary:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:r?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsx("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]} ${a[e]} ${o}`,onClick:r?void 0:i,disabled:r,children:s})};var l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=e.createContext&&e.createContext(l),d=["attr","size","title"];function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u.apply(null,arguments)}function h(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function m(t,e,n){return(e=function(t){var e=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)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){return t&&t.map((t,n)=>e.createElement(t.tag,p({key:n},t.attr),f(t.child)))}function g(t){return n=>e.createElement(x,u({attr:p({},t.attr)},n),f(t.child))}function x(t){var n=n=>{var i,{attr:s,size:o,title:r}=t,a=function(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}(t,d),l=o||n.size||"1em";return n.className&&(i=n.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",u({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,a,{className:i,style:p(p({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&e.createElement("title",null,r),t.children)};return void 0!==c?e.createElement(c.Consumer,null,t=>n(t)):n(l)}function y(t){return g({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)}function v(t){return g({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 b(t){return g({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 g({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 j(t){return g({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 S(t){return g({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 C(t){return g({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)}const k=e.createContext({});function T(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const E="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,N=e.createContext(null);function P(t,e){-1===t.indexOf(e)&&t.push(e)}function M(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const A=(t,e,n)=>n>e?e:n<t?t:n;function L(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let R=()=>{},V=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(R=(t,e,n)=>{t||"undefined"==typeof console||console.warn(L(e,n))},V=(t,e,n)=>{if(!t)throw new Error(L(e,n))});const D={},z=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function B(t){return"object"==typeof t&&null!==t}const I=t=>/^0[^.\s]+$/u.test(t);function F(t){let e;return()=>(void 0===e&&(e=t()),e)}const O=t=>t,$=(t,e)=>n=>e(t(n)),W=(...t)=>t.reduce($),U=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class X{constructor(){this.subscriptions=[]}add(t){return P(this.subscriptions,t),()=>M(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 s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const H=t=>1e3*t,Y=t=>t/1e3;function q(t,e){return e?t*(1e3/e):0}const _=new Set;function G(t,e,n){t||_.has(e)||(console.warn(L(e,n)),_.add(e))}const K=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Z(t,e,n,i){if(t===e&&n===i)return O;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=K(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:K(s(t),e,i)}const J=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Q=t=>e=>1-t(1-e),tt=Z(.33,1.53,.69,.99),et=Q(tt),nt=J(et),it=t=>t>=1?1:(t*=2)<1?.5*et(t):.5*(2-Math.pow(2,-10*(t-1))),st=t=>1-Math.sin(Math.acos(t)),ot=Q(st),rt=J(st),at=Z(.42,0,1,1),lt=Z(0,0,.58,1),ct=Z(.42,0,.58,1),dt=t=>Array.isArray(t)&&"number"==typeof t[0],ut={linear:O,easeIn:at,easeInOut:ct,easeOut:lt,circIn:st,circInOut:rt,circOut:ot,backIn:et,backInOut:nt,backOut:tt,anticipate:it},ht=t=>{if(dt(t)){V(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return Z(e,n,i,s)}return"string"==typeof t?(V(void 0!==ut[t],`Invalid easing type '${t}'`,"invalid-easing-type"),ut[t]):t},pt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],mt={value:null,addProjectionMetrics:null};function ft(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=pt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{if(a=t,s)return void(o=!0);s=!0;const r=n;n=i,i=r,n.forEach(c),e&&mt.value&&mt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,d.process(t))}};return d}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=r,f=()=>{const o=D.useManualTiming,r=o?s.timestamp:performance.now();n=!1,o||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:pt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<pt.length;e++)r[pt[e]].cancel(t)},state:s,steps:r}}const{schedule:gt,cancel:xt,state:yt,steps:vt}=ft("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:O,!0);let bt;function wt(){bt=void 0}const jt={now:()=>(void 0===bt&&jt.set(yt.isProcessing||D.useManualTiming?yt.timestamp:performance.now()),bt),set:t=>{bt=t,queueMicrotask(wt)}},St=t=>e=>"string"==typeof e&&e.startsWith(t),Ct=St("--"),kt=St("var(--"),Tt=t=>!!kt(t)&&Et.test(t.split("/*")[0].trim()),Et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Nt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const Pt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Mt={...Pt,transform:t=>A(0,1,t)},At={...Pt,default:1},Lt=t=>Math.round(1e5*t)/1e5,Rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Vt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dt=(t,e)=>n=>Boolean("string"==typeof n&&Vt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),zt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Rt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Bt={...Pt,transform:t=>Math.round((t=>A(0,255,t))(t))},It={test:Dt("rgb","red"),parse:zt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Bt.transform(t)+", "+Bt.transform(e)+", "+Bt.transform(n)+", "+Lt(Mt.transform(i))+")"};const Ft={test:Dt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:It.transform},Ot=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),$t=Ot("deg"),Wt=Ot("%"),Ut=Ot("px"),Xt=Ot("vh"),Ht=Ot("vw"),Yt=(()=>({...Wt,parse:t=>Wt.parse(t)/100,transform:t=>Wt.transform(100*t)}))(),qt={test:Dt("hsl","hue"),parse:zt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Wt.transform(Lt(e))+", "+Wt.transform(Lt(n))+", "+Lt(Mt.transform(i))+")"},_t={test:t=>It.test(t)||Ft.test(t)||qt.test(t),parse:t=>It.test(t)?It.parse(t):qt.test(t)?qt.parse(t):Ft.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?It.transform(t):qt.transform(t),getAnimatableNone:t=>{const e=_t.parse(t);return e.alpha=0,_t.transform(e)}},Gt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Kt="number",Zt="color",Jt=/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 Qt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Jt,t=>(_t.test(t)?(i.color.push(o),s.push(Zt),n.push(_t.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Kt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function te({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===Kt?Lt(i[o]):t===Zt?_t.transform(i[o]):i[o]}return s}}const ee=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:_t.test(n)?_t.getAnimatableNone(n):n;var n};const ne={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Rt)?.length||0)+(t.match(Gt)?.length||0)>0},parse:function(t){return Qt(t).values},createTransformer:function(t){return te(Qt(t))},getAnimatableNone:function(t){const e=Qt(t);return te(e)(e.values.map((t,n)=>ee(t,e.split[n])))}};function ie(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 se(t,e){return n=>n>0?e:t}const oe=(t,e,n)=>t+(e-t)*n,re=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},ae=[Ft,It,qt];function le(t){const e=(n=t,ae.find(t=>t.test(n)));var n;if(R(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let i=e.parse(t);return e===qt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=ie(a,i,t+1/3),o=ie(a,i,t),r=ie(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const ce=(t,e)=>{const n=le(t),i=le(e);if(!n||!i)return se(t,e);const s={...n};return t=>(s.red=re(n.red,i.red,t),s.green=re(n.green,i.green,t),s.blue=re(n.blue,i.blue,t),s.alpha=oe(n.alpha,i.alpha,t),It.transform(s))},de=new Set(["none","hidden"]);function ue(t,e){return n=>oe(t,e,n)}function he(t){return"number"==typeof t?ue:"string"==typeof t?Tt(t)?se:_t.test(t)?ce:fe:Array.isArray(t)?pe:"object"==typeof t?_t.test(t)?ce:me:se}function pe(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>he(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function me(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=he(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const fe=(t,e)=>{const n=ne.createTransformer(e),i=Qt(t),s=Qt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?de.has(t)&&!s.values.length||de.has(e)&&!i.values.length?function(t,e){return de.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):W(pe(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(R(!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.`,"complex-values-different"),se(t,e))};function ge(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return oe(t,e,n);return he(t)(t,e)}const xe=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>gt.update(e,t),stop:()=>xt(e),now:()=>yt.isProcessing?yt.timestamp:jt.now()}},ye=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ve=2e4;function be(t){let e=0;let n=t.next(e);for(;!n.done&&e<ve;)e+=50,n=t.next(e);return e>=ve?1/0:e}const we=100,je=10,Se=1,Ce=0,ke=800,Te=.3,Ee=.3,Ne={granular:.01,default:2},Pe={granular:.005,default:.5},Me=.01,Ae=10,Le=.05,Re=1;function Ve(t,e){return t*Math.sqrt(1-e*e)}const De=.001;const ze=["duration","bounce"],Be=["stiffness","damping","mass"];function Ie(t,e){return e.some(e=>void 0!==t[e])}function Fe(t){let e={velocity:Ce,stiffness:we,damping:je,mass:Se,isResolvedFromDuration:!1,...t};if(!Ie(t,Be)&&Ie(t,ze))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*A(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Se,stiffness:s,damping:o}}else{const n=function({duration:t=ke,bounce:e=Te,velocity:n=Ce,mass:i=Se}){let s,o;R(t<=H(Ae),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=A(Le,Re,r),t=A(Me,Ae,Y(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=Ve(e,r),l=Math.exp(-s);return De-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Ve(Math.pow(e,2),r);return(-s(e)+De>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=H(t),isNaN(a))return{stiffness:we,damping:je,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}({...t,velocity:0});e={...e,...n,mass:Se},e.isResolvedFromDuration=!0}return e}function Oe(t=Ee,e=Te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Fe({...n,velocity:-Y(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=r-o,x=Y(Math.sqrt(l/d)),y=Math.abs(g)<5;let v,b,w,j,S,C;if(i||(i=y?Ne.granular:Ne.default),s||(s=y?Pe.granular:Pe.default),f<1)w=Ve(x,f),j=(m+f*x*g)/w,v=t=>{const e=Math.exp(-f*x*t);return r-e*(j*Math.sin(w*t)+g*Math.cos(w*t))},S=f*x*j+g*w,C=f*x*g-j*w,b=t=>Math.exp(-f*x*t)*(S*Math.sin(w*t)+C*Math.cos(w*t));else if(1===f){v=t=>r-Math.exp(-x*t)*(g+(m+x*g)*t);const t=m+x*g;b=e=>Math.exp(-x*e)*(x*t*e-m)}else{const t=x*Math.sqrt(f*f-1);v=e=>{const n=Math.exp(-f*x*e),i=Math.min(t*e,300);return r-n*((m+f*x*g)*Math.sinh(i)+t*g*Math.cosh(i))/t};const e=(m+f*x*g)/t,n=f*x*e-g*t,i=f*x*g-e*t;b=e=>{const s=Math.exp(-f*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const k={calculatedDuration:p&&u||null,velocity:t=>H(b(t)),next:t=>{if(!p&&f<1){const e=Math.exp(-f*x*t),n=Math.sin(w*t),o=Math.cos(w*t),l=r-e*(j*n+g*o),c=H(e*(S*n+C*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=v(t);if(p)a.done=t>=u;else{const n=H(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(be(k),ve),e=ye(e=>k.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return k}Oe.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(be(i),ve);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:Y(s)}}(t,100,Oe);return t.ease=e.ease,t.duration=H(e.duration),t.type="keyframes",t};function $e(t,e,n){const i=Math.max(e-5,0);return q(n-t(i),e-i)}function We({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===r?f:r(f);g!==f&&(m=g-u);const x=t=>-m*Math.exp(-t/i),y=t=>g+x(t),v=t=>{const e=x(t),n=y(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const j=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Oe({keyframes:[h.value,p(h.value)],velocity:$e(y,t,h.value),damping:s,stiffness:o,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,v(t),j(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&v(t),h)}}}function Ue(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(V(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||D.mix||ge,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||O:e;o=W(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=U(t[i],t[i+1],n);return a[i](s)};return n?e=>c(A(t[0],t[o-1],e)):c}function Xe(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=U(0,e,i);t.push(oe(n,1,s))}}(e,t.length-1),e}function He({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(ht):ht(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Xe(e),t),a=Ue(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||ct).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const Ye=t=>null!==t;function qe(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ye),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const _e={decay:We,inertia:We,tween:He,keyframes:He,spring:Oe};function Ge(t){"string"==typeof t.type&&(t.type=_e[t.type])}class Ke{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 Ze=t=>t/100;class Je extends Ke{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==jt.now()&&this.tick(jt.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;Ge(t);const{type:e=He,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||He;"production"!==process.env.NODE_ENV&&a!==He&&V(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`,"spring-two-frames"),a!==He&&"number"!=typeof r[0]&&(this.mixKeyframes=W(Ze,ge(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=be(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:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:p,onUpdate:m,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),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let y,v=this.currentTime,b=n;if(d){const t=Math.min(this.currentTime,i)/r;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/r)):"mirror"===u&&(b=o)),v=A(0,1,n)*r}x?(this.delayState.value=c[0],y=this.delayState):y=b.next(v),s&&!x&&(y.value=s(y.value));let{done:w}=y;x||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return j&&p!==We&&(y.value=qe(c,this.options,f,this.speed)),m&&m(y.value),j&&this.finish(),y}then(t,e){return this.finished.then(t,e)}get duration(){return Y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(this.currentTime)}set time(t){t=H(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return $e(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(jt.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=Y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=xe,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(jt.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 Qe=t=>180*t/Math.PI,tn=t=>{const e=Qe(Math.atan2(t[1],t[0]));return nn(e)},en={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tn,rotateZ:tn,skewX:t=>Qe(Math.atan(t[1])),skewY:t=>Qe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},nn=t=>((t%=360)<0&&(t+=360),t),sn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),on=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),rn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sn,scaleY:on,scale:t=>(sn(t)+on(t))/2,rotateX:t=>nn(Qe(Math.atan2(t[6],t[5]))),rotateY:t=>nn(Qe(Math.atan2(-t[2],t[0]))),rotateZ:tn,rotate:tn,skewX:t=>Qe(Math.atan(t[4])),skewY:t=>Qe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function an(t){return t.includes("scale")?1:0}function ln(t,e){if(!t||"none"===t)return an(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=rn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=en,s=e}if(!s)return an(e);const o=i[e],r=s[1].split(",").map(cn);return"function"==typeof o?o(r):r[o]}function cn(t){return parseFloat(t.trim())}const dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=(()=>new Set(dn))(),hn=t=>t===Pt||t===Ut,pn=new Set(["x","y","z"]),mn=dn.filter(t=>!pn.has(t));const fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-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})=>ln(e,"x"),y:(t,{transform:e})=>ln(e,"y")};fn.translateX=fn.x,fn.translateY=fn.y;const gn=new Set;let xn=!1,yn=!1,vn=!1;function bn(){if(yn){const t=Array.from(gn).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 mn.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)})}yn=!1,xn=!1,gn.forEach(t=>t.complete(vn)),gn.clear()}function wn(){gn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yn=!0)})}class jn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(gn.add(this),xn||(xn=!0,gt.read(wn),gt.resolveKeyframes(bn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&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),gn.delete(this)}cancel(){"scheduled"===this.state&&(gn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function Sn(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}const Cn={};function kn(t,e){const n=F(t);return()=>Cn[e]??n()}const Tn=kn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),En=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Nn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nn([0,.65,.55,1]),circOut:Nn([.55,0,1,.45]),backIn:Nn([.31,.01,.66,-.59]),backOut:Nn([.33,1.53,.69,.99])};function Mn(t,e){return t?"function"==typeof t?En()?ye(t,e):"ease-out":dt(t)?Nn(t):Array.isArray(t)?t.map(t=>Mn(t,e)||Pn.easeOut):Pn[t]:void 0}function An(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=Mn(a,s);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Ln(t){return"function"==typeof t&&"applyToOptions"in t}class Rn extends Ke{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,V("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return Ln(t)&&En()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=An(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=qe(i,this.options,r,this.speed);this.updateMotionValue&&this.updateMotionValue(t),Sn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Y(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=H(t),e&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Tn()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),O):i(this)}}const Vn={anticipate:it,backInOut:nt,circInOut:rt};function Dn(t){"string"==typeof t.ease&&t.ease in Vn&&(t.ease=Vn[t.ease])}class zn extends Rn{constructor(t){Dn(t),Ge(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Je({...o,autoplay:!1}),a=Math.max(10,jt.now()-this.startTime),l=A(0,10,a-10),c=r.sample(a).value,{name:d}=this.options;s&&d&&Sn(s,d,c),e.setWithVelocity(r.sample(Math.max(0,a-l)).value,c,l),r.stop()}}const Bn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ne.test(t)&&"0"!==t||t.startsWith("url(")));function In(t){t.duration=0,t.type="keyframes"}const Fn=new Set(["opacity","clipPath","filter","transform"]),On=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const $n=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wn=F(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Un(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=e.owner.getProps();return Wn()&&n&&(Fn.has(n)||$n.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&On.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!d)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Xn extends Ke{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=jt.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||jn;this.keyframeResolver=new h(r,(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:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=jt.now();let d=!0;(function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Bn(s,e),a=Bn(o,e);return R(r===a,`You are trying to animate ${e} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!(!r||!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||Ln(n))&&i)})(t,s,o,r)||(d=!1,!D.instantAnimations&&a||c?.(qe(t,n,e)),t[0]=t[t.length-1],In(n),n.repeat=0);const u={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},h=d&&!l&&Un(u),p=u.motionValue?.owner?.current;let m;if(h)try{m=new zn({...u,element:p})}catch{m=new Je(u)}else m=new Je(u);m.finished.then(()=>{this.notifyFinished()}).catch(O),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),vn=!0,wn(),bn(),vn=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Hn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Yn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qn(t,e,n=1){V(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=function(t){const e=Yn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return z(t)?parseFloat(t):t}return Tt(s)?qn(s,e,n+1):s}const _n={type:"spring",stiffness:500,damping:25,restSpeed:10},Gn={type:"keyframes",duration:.8},Kn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zn=(t,{keyframes:e})=>e.length>2?Gn:un.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_n:Kn;function Jn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Qn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Jn(n,t):n}const ti=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const ei=(t,e,n,i={},s,o)=>r=>{const a=Qn(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=H(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:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function(t){for(const e in t)if(!ti.has(e))return!0;return!1})(a)||Object.assign(d,Zn(t,d)),d.duration&&(d.duration=H(d.duration)),d.repeatDelay&&(d.repeatDelay=H(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(In(d),0===d.delay&&(u=!0)),(D.instantAnimations||D.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,In(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!o&&void 0!==e.get()){const t=qe(d.keyframes,a);if(void 0!==t)return void gt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new Je(d):new Xn(d)};function ni(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ii(t,e,n,i){if("function"==typeof e){const[s,o]=ni(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ni(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function si(t,e,n){const i=t.getProps();return ii(i,e,void 0!==n?n:i.custom,t)}const oi=new Set(["width","height","top","left","right","bottom",...dn]);class ri{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=jt.now();if(this.updatedAt!==e&&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()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=jt.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&&G(!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 X);const n=this.events[t].add(e);return"change"===t?()=>{n(),gt.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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=jt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return q(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 ri(t,e)}const li=t=>Array.isArray(t);function ci(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ai(n))}function di(t){return li(t)?t[t.length-1]||0:t}const ui=t=>Boolean(t&&t.getVelocity);function hi(t,e){const n=t.getValue("willChange");if(i=n,Boolean(ui(i)&&i.add))return n.add(e);if(!n&&D.WillChange){const n=new D.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function pi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const mi="data-"+pi("framerAppearId");function fi(t){return t.props[mi]}function gi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function xi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Jn(o,l):l;const c=o?.reduceMotion;i&&(o=i);const d=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||u&&gi(u,e))continue;const r={delay:n,...Qn(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){gt.update(()=>i.set(s));continue}let h=!1;if(window.MotionHandoffAnimation){const n=fi(t);if(n){const t=window.MotionHandoffAnimation(n,e,gt);null!==t&&(r.startTime=t,h=!0)}}hi(t,e);const p=c??t.shouldReduceMotion;i.start(ei(e,i,s,p&&oi.has(e)?{type:!1}:r,t,h));const m=i.animation;m&&d.push(m)}if(r){const e=()=>gt.update(()=>{r&&function(t,e){const n=si(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)ci(t,e,di(o[e]))}(t,r)});d.length?Promise.all(d).then(e):e()}return d}function yi(t,e,n={}){const i=si(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(xi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(yi(l,e,{...r,delay:n+("function"==typeof i?0:i)+Hn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}const vi=t=>e=>e.test(t),bi=[Pt,Ut,Wt,$t,Ht,Xt,{test:t=>"auto"===t,parse:t=>t}],wi=t=>bi.find(vi(t));function ji(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||I(t))}const Si=new Set(["brightness","contrast","saturate","opacity"]);function Ci(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Rt)||[];if(!i)return t;const s=n.replace(i,"");let o=Si.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ki=/\b([a-z-]*)\(.*?\)/gu,Ti={...ne,getAnimatableNone:t=>{const e=t.match(ki);return e?e.map(Ci).join(" "):t}},Ei={...ne,getAnimatableNone:t=>{const e=ne.parse(t);return ne.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ni={...Pt,transform:Math.round},Pi={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,inset:Ut,insetBlock:Ut,insetBlockStart:Ut,insetBlockEnd:Ut,insetInline:Ut,insetInlineStart:Ut,insetInlineEnd:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,paddingBlock:Ut,paddingBlockStart:Ut,paddingBlockEnd:Ut,paddingInline:Ut,paddingInlineStart:Ut,paddingInlineEnd:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,marginBlock:Ut,marginBlockStart:Ut,marginBlockEnd:Ut,marginInline:Ut,marginInlineStart:Ut,marginInlineEnd:Ut,fontSize:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Mt,originX:Yt,originY:Yt,originZ:Ut},zIndex:Ni,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:Ni},Mi={...Pi,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Ti,WebkitFilter:Ti,mask:Ei,WebkitMask:Ei},Ai=t=>Mi[t],Li=new Set([Ti,Ei]);function Ri(t,e){let n=Ai(t);return Li.has(n)||(n=ne),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Vi=new Set(["auto","none","0"]);class Di extends jn{constructor(t,e,n,i,s){super(t,e,n,i,s,!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(),Tt(i))){const s=qn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!oi.has(n)||2!==t.length)return;const[i,s]=t,o=wi(i),r=wi(s);if(Nt(i)!==Nt(s)&&fn[n])this.needsMeasurement=!0;else if(o!==r)if(hn(o)&&hn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else fn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ji(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Vi.has(e)&&Qt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ri(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=fn[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 s=n.length-1,o=n[s];n[s]=fn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function zi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}const Bi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Ii(t){return B(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Fi,cancel:Oi}=ft(queueMicrotask,!1),$i={x:!1,y:!1};function Wi(){return $i.x||$i.y}function Ui(t,e){const n=zi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Xi(t,e,n={}){const[i,s,o]=Ui(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Wi())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const Hi=(t,e)=>!!e&&(t===e||Hi(t,e.parentElement)),Yi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,qi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const _i=new Set(["INPUT","SELECT","TEXTAREA"]);const Gi=new WeakSet;function Ki(t){return e=>{"Enter"===e.key&&t(e)}}function Zi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ji(t){return Yi(t)&&!Wi()}const Qi=new WeakSet;function ts(t,e,n={}){const[i,s,o]=Ui(t,n),r=t=>{const i=t.currentTarget;if(!Ji(t))return;if(Qi.has(t))return;Gi.add(i),n.stopPropagation&&Qi.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Gi.has(i)&&Gi.delete(i),Ji(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Hi(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Ii(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ki(()=>{if(Gi.has(n))return;Zi(n,"down");const t=Ki(()=>{Zi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Zi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,qi.has(e.tagName)||!0===e.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function es(t){return B(t)&&"ownerSVGElement"in t}const ns=new WeakMap;let is;const ss=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:es(i)&&"getBBox"in i?i.getBBox()[e]:i[n],os=ss("inline","width","offsetWidth"),rs=ss("block","height","offsetHeight");function as({target:t,borderBoxSize:e}){ns.get(t)?.forEach(n=>{n(t,{get width(){return os(t,e)},get height(){return rs(t,e)}})})}function ls(t){t.forEach(as)}function cs(t,e){is||"undefined"!=typeof ResizeObserver&&(is=new ResizeObserver(ls));const n=zi(t);return n.forEach(t=>{let n=ns.get(t);n||(n=new Set,ns.set(t,n)),n.add(e),is?.observe(t)}),()=>{n.forEach(t=>{const n=ns.get(t);n?.delete(e),n?.size||is?.unobserve(t)})}}const ds=new Set;let us;function hs(t){return ds.add(t),us||(us=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ds.forEach(e=>e(t))},window.addEventListener("resize",us)),()=>{ds.delete(t),ds.size||"function"!=typeof us||(window.removeEventListener("resize",us),us=void 0)}}function ps(t,e){return"function"==typeof t?hs(t):cs(t,e)}const ms=[...bi,_t,ne],fs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),gs=new WeakMap;function xs(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ys(t){return"string"==typeof t||Array.isArray(t)}const vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bs=["initial",...vs];function ws(t){return xs(t.animate)||bs.some(e=>ys(t[e]))}function js(t){return Boolean(ws(t)||t.variants)}const Ss={current:null},Cs={current:!1},ks="undefined"!=typeof window;function Ts(){if(Cs.current=!0,ks)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ss.current=t.matches;t.addEventListener("change",e),e()}else Ss.current=!1}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ns={};function Ps(t){Ns=t}class Ms{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=jt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=ws(e),this.isVariantNode=js(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==l[t]&&ui(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,gs.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Cs.current||Ts(),this.shouldReduceMotion=Ss.current),"production"!==process.env.NODE_ENV&&G(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Fn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Rn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:H(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=un.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&gt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),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 Ns){const e=Ns[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<Es.length;e++){const n=Es[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 s=e[i],o=n[i];if(ui(s))t.addValue(i,s);else if(ui(o))t.addValue(i,ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ai(void 0!==e?e:s,{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&&(z(n)||I(n))?n=parseFloat(n):(i=n,!ms.find(vi(i))&&ne.test(e)&&(n=Ri(t,e))),this.setBaseTarget(t,ui(n)?n.get():n)),ui(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=ii(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||ui(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 X),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Fi.render(this.render)}}class As extends Ms{constructor(){super(...arguments),this.KeyframeResolver=Di}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[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;ui(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Ls{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Rs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Vs(t){return void 0===t||1===t}function Ds({scale:t,scaleX:e,scaleY:n}){return!Vs(t)||!Vs(e)||!Vs(n)}function zs(t){return Ds(t)||Bs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Bs(t){return Is(t.x)||Is(t.y)}function Is(t){return t&&"0%"!==t}function Fs(t,e,n){return n+e*(t-n)}function Os(t,e,n,i,s){return void 0!==s&&(t=Fs(t,s,i)),Fs(t,n,i)+e}function $s(t,e=0,n=1,i,s){t.min=Os(t.min,e,n,i,s),t.max=Os(t.max,e,n,i,s)}function Ws(t,{x:e,y:n}){$s(t.x,e.translate,e.scale,e.originPoint),$s(t.y,n.translate,n.scale,n.originPoint)}const Us=.999999999999,Xs=1.0000000000001;function Hs(t,e){t.min+=e,t.max+=e}function Ys(t,e,n,i,s=.5){$s(t,e,n,oe(t.min,t.max,s),i)}function qs(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function _s(t,e,n){const i=n??t;Ys(t.x,qs(e.x,i.x),e.scaleX,e.scale,e.originX),Ys(t.y,qs(e.y,i.y),e.scaleY,e.scale,e.originY)}function Gs(t,e){return Rs(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 Ks={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zs=dn.length;function Js(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(un.has(t))r=!0;else if(Ct(t))s[t]=n;else{const e=Bi(n,Pi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Zs;o++){const r=dn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=Bi(a,Pi[r]);l||(s=!1,i+=`${Ks[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Qs(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function to(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const eo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ut.test(t))return t;t=parseFloat(t)}return`${to(t,e.target.x)}% ${to(t,e.target.y)}%`}},no={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ne.parse(t);if(s.length>5)return i;const o=ne.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=oe(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},io={borderRadius:{...eo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eo,borderTopRightRadius:eo,borderBottomLeftRadius:eo,borderBottomRightRadius:eo,boxShadow:no};function so(t,{layout:e,layoutId:n}){return un.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!io[t]||"opacity"===t)}function oo(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ui(i[e])||s&&ui(s[e])||so(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ro extends As{constructor(){super(...arguments),this.type="html",this.renderInstance=Qs}readValueFromInstance(t,e){if(un.has(e))return this.projection?.isProjecting?an(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ln(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Ct(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Gs(t,e)}build(t,e,n){Js(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return oo(t,e,n)}}const ao={offset:"stroke-dashoffset",array:"stroke-dasharray"},lo={offset:"strokeDashoffset",array:"strokeDasharray"};const co=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function uo(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,d){if(Js(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);for(const t of co)void 0!==u[t]&&(h[t]=u[t],delete u[t]);void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ao:lo;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}(u,s,o,r,!1)}const ho=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"]),po=t=>"string"==typeof t&&"svg"===t.toLowerCase();function mo(t,e,n){const i=oo(t,e,n);for(const n in t)if(ui(t[n])||ui(e[n])){i[-1!==dn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class fo extends As{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(un.has(e)){const t=Ai(e);return t&&t.default||0}return e=ho.has(e)?e:pi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return mo(t,e,n)}build(t,e,n){uo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Qs(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(ho.has(n)?n:pi(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=po(t.tagName),super.mount(t)}}const go=bs.length;function xo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&xo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<go;n++){const i=bs[n],s=t.props[i];(ys(s)||!1===s)&&(e[i]=s)}return e}function yo(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 vo=[...vs].reverse(),bo=vs.length;function wo(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 s=e.map(e=>yi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=yi(t,e,n);else{const s="function"==typeof e?si(t,e,n.custom):e;i=Promise.all(xi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function jo(t){let e=wo(t),n=ko(),i=!0,s=!1;const o=e=>(n,i)=>{const s=si(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=xo(t.parent)||{},c=[],d=new Set;let u={},h=1/0;for(let e=0;e<bo;e++){const p=vo[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=ys(f),x=p===r?m.isActive:null;!1===x&&(h=e);let y=f===l[p]&&f!==a[p]&&g;if(y&&(i||s)&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...u},!m.isActive&&null===x||!f&&!m.prevProp||xs(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==x){m.prevResolvedValues&&(u={...u,...m.prevResolvedValues});continue}const v=So(m.prevProp,f);let b=v||p===r&&m.isActive&&!y&&g||e>h&&g,w=!1;const j=Array.isArray(f)?f:[f];let S=j.reduce(o(p),{});!1===x&&(S={});const{prevResolvedValues:C={}}=m,k={...C,...S},T=e=>{b=!0,d.has(e)&&(w=!0,d.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in k){const e=S[t],n=C[t];if(u.hasOwnProperty(t))continue;let i=!1;i=li(e)&&li(n)?!yo(e,n):e!==n,i?null!=e?T(t):d.add(t):void 0!==e&&d.has(t)?T(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(u={...u,...S}),(i||s)&&t.blockInitialAnimation&&(b=!1);const E=y&&v;b&&(!E||w)&&c.push(...j.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=si(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Hn(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(d.size){const e={};if("boolean"!=typeof a.initial){const n=si(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}d.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,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 s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ko(),s=!0}}}function So(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yo(e,t)}function Co(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ko(){return{animate:Co(!0),whileInView:Co(),whileHover:Co(),whileTap:Co(),whileDrag:Co(),whileFocus:Co(),exit:Co()}}function To(t,e){t.min=e.min,t.max=e.max}function Eo(t,e){To(t.x,e.x),To(t.y,e.y)}function No(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Po(t){return t.max-t.min}function Mo(t,e,n,i=.5){t.origin=i,t.originPoint=oe(e.min,e.max,t.origin),t.scale=Po(n)/Po(e),t.translate=oe(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 Ao(t,e,n,i){Mo(t.x,e.x,n.x,i?i.originX:void 0),Mo(t.y,e.y,n.y,i?i.originY:void 0)}function Lo(t,e,n,i=0){const s=i?oe(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Po(e)}function Ro(t,e,n,i=0){const s=i?oe(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Po(e)}function Vo(t,e,n,i){Ro(t.x,e.x,n.x,i?.x),Ro(t.y,e.y,n.y,i?.y)}function Do(t,e,n,i,s){return t=Fs(t-=e,1/n,i),void 0!==s&&(t=Fs(t,1/s,i)),t}function zo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Wt.test(e)&&(e=parseFloat(e),e=oe(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=oe(o.min,o.max,i);t===o&&(a-=e),t.min=Do(t.min,e,n,a,s),t.max=Do(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Bo=["x","scaleX","originX"],Io=["y","scaleY","originY"];function Fo(t,e,n,i){zo(t.x,e,Bo,n?n.x:void 0,i?i.x:void 0),zo(t.y,e,Io,n?n.y:void 0,i?i.y:void 0)}function Oo(t){return 0===t.translate&&1===t.scale}function $o(t){return Oo(t.x)&&Oo(t.y)}function Wo(t,e){return t.min===e.min&&t.max===e.max}function Uo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Xo(t,e){return Uo(t.x,e.x)&&Uo(t.y,e.y)}function Ho(t){return Po(t.x)/Po(t.y)}function Yo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function qo(t){return[t("x"),t("y")]}const _o=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Go=_o.length,Ko=t=>"string"==typeof t?parseFloat(t):t,Zo=t=>"number"==typeof t||Ut.test(t);function Jo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Qo=er(0,.5,ot),tr=er(.5,.95,O);function er(t,e,n){return i=>i<t?0:i>e?1:n(U(t,e,i))}function nr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ir=(t,e)=>t.depth-e.depth;class sr{constructor(){this.children=[],this.isDirty=!1}add(t){P(this.children,t),this.isDirty=!0}remove(t){M(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ir),this.isDirty=!1,this.children.forEach(t)}}function or(t){return ui(t)?t.get():t}class rr{constructor(){this.members=[]}add(t){P(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1!==i.isConnected||n.snapshot||(M(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(M(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){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lr=["","X","Y","Z"];let cr=0;function dr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ur(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=fi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ur(i)}function hr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=cr++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,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(fr),this.nodes.forEach(Cr),this.nodes.forEach(kr),this.nodes.forEach(gr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 sr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new X),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=es(e)&&!(es(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=jt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(xt(i),t(o-e))};return gt.setup(i,!0),()=>xt(i)}(s,250),ar.hasAnimatedSinceResize&&(ar.hasAnimatedSinceResize=!1,this.nodes.forEach(Sr)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&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 s=this.options.transition||o.getDefaultTransition()||Ar,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Xo(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={...Qn(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Sr(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(),xt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Tr),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&&ur(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,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!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()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(vr),void this.nodes.forEach(yr)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(br);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wr),this.nodes.forEach(jr),this.nodes.forEach(pr),this.nodes.forEach(mr)):this.nodes.forEach(br),this.clearAllSnapshots();const t=jt.now();yt.delta=A(0,1e3/60,t-yt.timestamp),yt.timestamp=t,yt.isProcessing=!0,vt.update.process(yt),vt.preRender.process(yt),vt.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xr),this.sharedNodes.forEach(Er)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Po(this.snapshot.measuredBox.x)||Po(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.layoutVersion++,this.layoutCorrected||(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(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!$o(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||zs(this.latestValues)||o)&&(s(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)),Vr((i=n).x),Vr(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(zr))){const{scroll:t}=this.root;t&&(Hs(e.x,t.offset.x),Hs(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Eo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Eo(e,t),Hs(e.x,s.offset.x),Hs(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};Eo(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Hs(i.x,-n.scroll.offset.x),Hs(i.y,-n.scroll.offset.y)),zs(n.latestValues)&&_s(i,n.latestValues,n.layout?.layoutBox)}return zs(this.latestValues)&&_s(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Eo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!zs(n.latestValues))continue;let i;n.instance&&(Ds(n.latestValues)&&n.updateSnapshot(),i=fs(),Eo(i,n.measurePageBox())),Fo(e,n.latestValues,n.snapshot?.layoutBox,i)}return zs(this.latestValues)&&Fo(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!==yt.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:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=yt.timestamp;const o=this.getClosestProjectingParent();var r,a,l,c;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Lo(r.x,a.x,l.x,c?.x),Lo(r.y,a.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Eo(this.target,this.layout.layoutBox),Ws(this.target,this.targetDelta)):Eo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ds(this.parent.latestValues)&&!Bs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,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}},Vo(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Eo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===yt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=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&&!s)return;Eo(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Hs(t.x,-o.scroll.offset.x),Hs(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ws(t,r)),i&&zs(o.latestValues)&&_s(t,o.latestValues,o.layout?.layoutBox))}e.x<Xs&&e.x>Us&&(e.x=1),e.y<Xs&&e.y>Us&&(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?(No(this.prevProjectionDelta.x,this.projectionDelta.x),No(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ao(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Yo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Yo(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:{},s={...this.latestValues},o={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 r={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(Mr));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,g;Nr(o.x,t.x,n),Nr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Pr(p.x,m.x,f.x,g),Pr(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Wo(l.x,h.x)&&Wo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Eo(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=oe(0,n.opacity??1,Qo(i)),t.opacityExit=oe(e.opacity??1,0,tr(i))):o&&(t.opacity=oe(e.opacity??1,n.opacity??1,i));for(let s=0;s<Go;s++){const o=_o[s];let r=Jo(e,o),a=Jo(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Zo(r)===Zo(a)?(t[o]=Math.max(oe(Ko(r),Ko(a),i),0),(Wt.test(a)||Wt.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=oe(e.rotate||0,n.rotate||0,i))}(s,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&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{ar.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ai(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,n){const i=ui(t)?t:ai(t);return i.start(ei("",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:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Dr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Po(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Po(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Eo(e,n),_s(e,s),Ao(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rr);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&&dr("z",t,i,this.animationValues);for(let e=0;e<lr.length;e++)dr(`rotate${lr[e]}`,t,i,this.animationValues),dr(`skew${lr[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()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=or(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=or(e?.pointerEvents)||""),void(this.hasProjected&&!zs(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}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,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in io){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=io[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?or(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(yr),this.root.sharedNodes.clear()}}}function pr(t){t.updateLayout()}function mr(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:s}=t.options,o=e.source!==t.layout.source;if("size"===s)qo(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Po(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";To(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Dr(s,e.layoutBox,n)&&qo(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Po(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ao(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Ao(a,t.applyTransform(i,!0),e.measuredBox):Ao(a,n,e.layoutBox);const l=!$o(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};Vo(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};Vo(l,n,o.layoutBox,r),Xo(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function fr(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 gr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function xr(t){t.clearSnapshot()}function yr(t){t.clearMeasurements()}function vr(t){t.isLayoutDirty=!0,t.updateLayout()}function br(t){t.isLayoutDirty=!1}function wr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function jr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Sr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cr(t){t.resolveTargetDelta()}function kr(t){t.calcProjection()}function Tr(t){t.resetSkewAndRotation()}function Er(t){t.removeLeadSnapshot()}function Nr(t,e,n){t.translate=oe(e.translate,0,n),t.scale=oe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pr(t,e,n,i){t.min=oe(e.min,n.min,i),t.max=oe(e.max,n.max,i)}function Mr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ar={duration:.45,ease:[.4,0,.1,1]},Lr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Rr=Lr("applewebkit/")&&!Lr("chrome/")?Math.round:O;function Vr(t){t.min=Rr(t.min),t.max=Rr(t.max)}function Dr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ho(e),s=Ho(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function zr(t){return t!==t.root&&t.scroll?.wasRoot}const Br=hr({attachResizeListener:(t,e)=>nr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ir={current:void 0},Fr=hr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ir.current){const t=new Br({});t.mount(window),t.setOptions({layoutScroll:!0}),Ir.current=t}return Ir.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Or=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function $r(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Wr(...t){return r.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=$r(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():$r(t[e],null)}}}}(...t),t)}class Ur extends r.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(Ii(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,n=Ii(t)&&t.offsetWidth||0,i=Ii(t)&&t.offsetHeight||0,s=getComputedStyle(e),o=this.props.sizeRef.current;o.height=parseFloat(s.height),o.width=parseFloat(s.width),o.top=e.offsetTop,o.left=e.offsetLeft,o.right=n-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Xr({children:n,isPresent:i,anchorX:s,anchorY:o,root:a,pop:l}){const c=e.useId(),d=e.useRef(null),u=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=e.useContext(Or),p=n.props?.ref??n?.ref,m=Wr(d,p);return e.useInsertionEffect(()=>{const{width:t,height:e,top:n,left:r,right:p,bottom:m}=u.current;if(i||!1===l||!d.current||!t||!e)return;const f="left"===s?`left: ${r}`:`right: ${p}`,g="bottom"===o?`bottom: ${m}`:`top: ${n}`;d.current.dataset.motionPopId=c;const x=document.createElement("style");h&&(x.nonce=h);const y=a??document.head;return y.appendChild(x),x.sheet&&x.sheet.insertRule(`\n [data-motion-pop-id="${c}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n ${g}px !important;\n }\n `),()=>{d.current?.removeAttribute("data-motion-pop-id"),y.contains(x)&&y.removeChild(x)}},[i]),t.jsx(Ur,{isPresent:i,childRef:d,sizeRef:u,pop:l,children:!1===l?n:r.cloneElement(n,{ref:m})})}const Hr=({children:n,initial:i,isPresent:s,onExitComplete:o,custom:a,presenceAffectsLayout:l,mode:c,anchorX:d,anchorY:u,root:h})=>{const p=T(Yr),m=e.useId();let f=!0,g=e.useMemo(()=>(f=!1,{id:m,initial:i,isPresent:s,custom:a,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;o&&o()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[s,p,o]);return l&&f&&(g={...g}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[s]),r.useEffect(()=>{!s&&!p.size&&o&&o()},[s]),n=t.jsx(Xr,{pop:"popLayout"===c,isPresent:s,anchorX:d,anchorY:u,root:h,children:n}),t.jsx(N.Provider,{value:g,children:n})};function Yr(){return new Map}function qr(t=!0){const n=e.useContext(N);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const _r=t=>t.key||"";function Gr(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Kr=({children:n,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",anchorY:d="top",root:u})=>{const[h,p]=qr(l),m=e.useMemo(()=>Gr(n),[n]),f=l&&!h?[]:m.map(_r),g=e.useRef(!0),x=e.useRef(m),y=T(()=>new Map),v=e.useRef(new Set),[b,w]=e.useState(m),[j,S]=e.useState(m);E(()=>{g.current=!1,x.current=m;for(let t=0;t<j.length;t++){const e=_r(j[t]);f.includes(e)?(y.delete(e),v.current.delete(e)):!0!==y.get(e)&&y.set(e,!1)}},[j,f.length,f.join("-")]);const C=[];if(m!==b){let t=[...m];for(let e=0;e<j.length;e++){const n=j[e],i=_r(n);f.includes(i)||(t.splice(e,0,n),C.push(n))}return"wait"===a&&C.length&&(t=C),S(Gr(t)),w(m),null}"production"!==process.env.NODE_ENV&&"wait"===a&&j.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:N}=e.useContext(k);return t.jsx(t.Fragment,{children:j.map(e=>{const n=_r(e),b=!(l&&!h)&&(m===j||f.includes(n));return t.jsx(Hr,{isPresent:b,initial:!(g.current&&!s)&&void 0,custom:i,presenceAffectsLayout:r,mode:a,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(n))return;if(!y.has(n))return;v.current.add(n),y.set(n,!0);let t=!0;y.forEach(e=>{e||(t=!1)}),t&&(N?.(),S(x.current),l&&p?.(),o&&o())},anchorX:c,anchorY:d,children:e},n)})})},Zr=e.createContext({strict:!1}),Jr={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"]};let Qr=!1;function ta(){return function(){if(Qr)return;const t={};for(const e in Jr)t[e]={isEnabled:t=>Jr[e].some(e=>!!t[e])};Ps(t),Qr=!0}(),Ns}const ea=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","propagate","ignoreStrict","viewport"]);function na(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ea.has(t)}let ia=t=>!na(t);try{"function"==typeof(sa=require("@emotion/is-prop-valid").default)&&(ia=t=>t.startsWith("on")?!na(t):sa(t))}catch{}var sa;const oa=e.createContext({});function ra(t){const{initial:n,animate:i}=function(t,e){if(ws(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ys(e)?e:void 0,animate:ys(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(oa));return e.useMemo(()=>({initial:n,animate:i}),[aa(n),aa(i)])}function aa(t){return Array.isArray(t)?t.join(" "):t}const la=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ca(t,e,n){for(const i in e)ui(e[i])||so(i,n)||(t[i]=e[i])}function da(t,n){const i={};return ca(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Js(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ua(t,e){const n={},i=da(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 ha=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function pa(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return uo(e,n,po(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ca(e,t.style,t),o.style={...e,...o.style}}return o}const ma=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fa(t){return"string"==typeof t&&!t.includes("-")&&!!(ma.indexOf(t)>-1||/[A-Z]/u.test(t))}function ga(t,n,i,{latestValues:s},o,r=!1,a){const l=(a??fa(t)?pa:ua)(n,s,o,t),c=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||ui(t[s])||(ia(s)||!0===n&&na(s)||!e&&!na(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof t,r),d=t!==e.Fragment?{...c,...l,ref:i}:{},{children:u}=n,h=e.useMemo(()=>ui(u)?u.get():u,[u]);return e.createElement(t,{...d,children:h})}function xa(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=or(o[t]);let{initial:r,animate:a}=t;const l=ws(t),c=js(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===r;const u=d?a:r;if(u&&"boolean"!=typeof u&&!xs(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=ii(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&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const ya=t=>(n,i)=>{const s=e.useContext(oa),o=e.useContext(N),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:xa(n,i,s,t),renderState:e()}}(t,n,s,o);return i?r():T(r)},va=ya({scrapeMotionValuesFromProps:oo,createRenderState:la}),ba=ya({scrapeMotionValuesFromProps:mo,createRenderState:ha}),wa=Symbol.for("motionComponentSymbol");function ja(t,n,i){const s=e.useRef(i);e.useInsertionEffect(()=>{s.current=i});const o=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const i=s.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(o.current=t)}else o.current?(o.current(),o.current=null):i(e);else i&&(i.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Sa=e.createContext({});function Ca(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ka(t,n,i,s,o,r){const{visualElement:a}=e.useContext(oa),l=e.useContext(Zr),c=e.useContext(N),d=e.useContext(Or),u=d.reducedMotion,h=d.skipAnimations,p=e.useRef(null),m=e.useRef(!1);s=s||l.renderer,!p.current&&s&&(p.current=s(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Sa);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:d,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ta(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&Ca(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c,layoutAnchor:d})}(p.current,i,o,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,c)});const y=i[mi],v=e.useRef(Boolean(y)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return E(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),f.enteringChildren=void 0)}),f}function Ta(t){if(t)return!1!==t.options.allowProjection?t.projection:Ta(t.parent)}function Ea(n,{forwardMotionProps:i=!1,type:s}={},o,r){o&&function(t){const e=ta();for(const n in t)e[n]={...e[n],...t[n]};Ps(e)}(o);const a=s?"svg"===s:fa(n),l=a?ba:va;function c(s,c){let d;const u={...e.useContext(Or),...s,layoutId:Na(s)},{isStatic:h}=u,p=ra(s),m=l(s,h);if(!h&&"undefined"!=typeof window){!function(t,n){const i=e.useContext(Zr).strict;if("production"!==process.env.NODE_ENV&&n&&i){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?R(!1,e,"lazy-strict-mode"):V(!1,e,"lazy-strict-mode")}}(u,o);const t=function(t){const e=ta(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(u);d=t.MeasureLayout,p.visualElement=ka(n,m,u,r,t.ProjectionNode,a)}return t.jsxs(oa.Provider,{value:p,children:[d&&p.visualElement?t.jsx(d,{visualElement:p.visualElement,...u}):null,ga(n,s,ja(m,p.visualElement,c),m,h,i,a)]})}c.displayName=`motion.${"string"==typeof n?n:`create(${n.displayName??n.name??""})`}`;const d=e.forwardRef(c);return d[wa]=n,d}function Na({layoutId:t}){const n=e.useContext(k).id;return n&&void 0!==t?n+"-"+t:t}function Pa(t,e){if("undefined"==typeof Proxy)return Ea;const n=new Map,i=(n,i)=>Ea(n,i,t,e);return new Proxy((t,e)=>("production"!==process.env.NODE_ENV&&G(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(s,o)=>"create"===o?i:(n.has(o)||n.set(o,Ea(o,void 0,t,e)),n.get(o))})}const Ma=(t,n)=>n.isSVG??fa(t)?new fo(n):new ro(n,{allowProjection:t!==e.Fragment});let Aa=0;const La={animation:{Feature:class extends Ls{constructor(t){super(t),t.animationState||(t.animationState=jo(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xs(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 Ls{constructor(){super(...arguments),this.id=Aa++,this.isExitComplete=!1}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;if(t&&!1===n){if(this.isExitComplete){const{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){const n=si(this.node,t,e);if(n){const{transition:t,transitionEnd:e,...i}=n;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ra(t){return{point:{x:t.pageX,y:t.pageY}}}function Va(t,e,n,i){return nr(t,e,(t=>e=>Yi(e)&&t(e,Ra(e)))(n),i)}const Da=({current:t})=>t?t.ownerDocument.defaultView:null,za=(t,e)=>Math.abs(t-e);const Ba=new Set(["auto","scroll"]);class Ia{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Fa(this.lastRawMoveEventInfo,this.transformPagePoint));const t=$a(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=za(t.x,e.x),i=za(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=yt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=Fa(e,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=$a("pointercancel"===t.type?this.lastMoveEventInfo:Fa(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Yi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Fa(Ra(t),this.transformPagePoint),{point:l}=a,{timestamp:c}=yt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=e;d&&d(t,$a(a,this.history)),this.removeListeners=W(Va(this.contextWindow,"pointermove",this.handlePointerMove),Va(this.contextWindow,"pointerup",this.handlePointerUp),Va(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Ba.has(t.overflowX)||Ba.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xt(this.updatePoint)}}function Fa(t,e){return e?{point:e(t.point)}:t}function Oa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function $a({point:t},e){return{point:t,delta:Oa(t,Ua(e)),offset:Oa(t,Wa(e)),velocity:Xa(e,.1)}}function Wa(t){return t[0]}function Ua(t){return t[t.length-1]}function Xa(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Ua(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>H(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*H(e)&&(i=t[1]);const o=Y(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ha(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 Ya(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 qa=.35;function _a(t,e,n){return{min:Ga(t,e),max:Ga(t,n)}}function Ga(t,e){return"number"==typeof t?t:t[e]||0}const Ka=new WeakMap;class Za{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.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Ia(t,{onSessionStart:t=>{e&&this.snapToCursor(Ra(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?$i[o]?null:($i[o]=!0,()=>{$i[o]=!1}):$i.x||$i.y?null:($i.x=$i.y=!0,()=>{$i.x=$i.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Wt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Po(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&gt.update(()=>s(t,e),!1,!0),hi(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=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}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&gt.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:Da(this.visualElement),element:this.visualElement.current})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&gt.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Qa(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?oe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?oe(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}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&&Ca(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Ha(t.x,n,s),y:Ha(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=qa){return!1===t?t=0:!0===t&&(t=qa),{x:_a(t,"left","right"),y:_a(t,"top","bottom")}}(e),i!==this.constraints&&!Ca(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&qo(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||!Ca(t))return!1;const n=t.current;V(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Gs(t,n),{scroll:s}=e;return s&&(Hs(i.x,s.offset.x),Hs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ya(t.x,e.x),y:Ya(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Rs(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=qo(r=>{if(!Qa(r,e,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,u)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return hi(this.visualElement,t),n.start(ei(t,n,0,e,this.visualElement,!1))}stopAnimation(){qo(t=>this.getAxisMotionValue(t).stop())}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){qo(e=>{const{drag:n}=this.getProps();if(!Qa(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e],r=s.get()||0;s.set(t[e]-oe(n,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ca(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qo(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=Po(t),s=Po(e);return s>i?n=U(e.min,e.max-i,t.min):i>s&&(n=U(t.min,t.max-s,e.min)),A(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),qo(e=>{if(!Qa(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(oe(s,o,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ka.set(this.visualElement,this);const t=this.visualElement.current,e=Va(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&function(t){return _i.has(t.tagName)||!0===t.isContentEditable}(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();Ca(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=ps(t,Ja(n)),s=ps(e,Ja(n));return()=>{i(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),gt.read(i);const r=nr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(qo(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(),e(),o(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=qa,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Ja(t){let e=!0;return()=>{e?e=!1:t()}}function Qa(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const tl=t=>(e,n)=>{t&&gt.update(()=>t(e,n),!1,!0)};let el=!1;class nl extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),el&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ar.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),el=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||gt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:t,layoutAnchor:e}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=e,n.root.didUpdate(),Fi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;el=!0,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 il(n){const[i,s]=qr(),o=e.useContext(k);return t.jsx(nl,{...n,layoutGroup:o,switchLayoutGroup:e.useContext(Sa),isPresent:i,safeToRemove:s})}const sl={pan:{Feature:class extends Ls{constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(t){this.session=new Ia(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Da(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:tl(t),onStart:tl(e),onMove:tl(n),onEnd:(t,e)=>{delete this.session,i&&gt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Va(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 Ls{constructor(t){super(t),this.removeGroupControls=O,this.removeListeners=O,this.controls=new Za(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Fr,MeasureLayout:il}};function ol(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&gt.postRender(()=>s(e,Ra(e)))}function rl(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 s=i["onTap"+("End"===n?"":n)];s&&gt.postRender(()=>s(e,Ra(e)))}const al=new WeakMap,ll=new WeakMap,cl=t=>{const e=al.get(t.target);e&&e(t)},dl=t=>{t.forEach(cl)};function ul(t,e,n){const i=function({root:t,...e}){const n=t||document;ll.has(n)||ll.set(n,{});const i=ll.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(dl,{root:t,...e})),i[s]}(e);return al.set(t,n),i.observe(t),()=>{al.delete(t),i.unobserve(t)}}const hl={some:0,all:1};const pl=Pa({...La,...{inView:{Feature:class extends Ls{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:hl[i]};this.stopObserver=ul(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!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(),o=e?n:i;o&&o(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(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Ls{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=ts(t,(t,e)=>(rl(this.node,e,"Start"),(t,{success:e})=>rl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends Ls{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=W(nr(this.node.current,"focus",()=>this.onFocus()),nr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ls{mount(){const{current:t}=this.node;t&&(this.unmount=Xi(t,(t,e)=>(ol(this.node,e,"Start"),t=>ol(this.node,t,"End"))))}unmount(){}}}},...sl,...{layout:{ProjectionNode:Fr,MeasureLayout:il}}},Ma);function ml(){!Cs.current&&Ts();const[t]=e.useState(Ss.current);return"production"!==process.env.NODE_ENV&&G(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),t}const fl=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"},gl=async(t,e)=>{const n=`${fl(t)}/student/downloadExcel/${e||"PASS"}`;return(await i.get(n,{responseType:"blob"})).data},xl=async(t,e,n)=>{const s=`${fl(e)}/student/uploadExcel`,o=new FormData;o.append("receivedExcelFile",t),"85"===e&&n&&o.append("clientName",n);return(await i.post(s,o,{transformRequest:[t=>t]})).data};function yl(t){return g({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)}function vl(t){return g({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 bl(t){return g({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 wl(t){return g({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 jl(t){return g({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 g({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 Cl(t){return g({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 kl(t){return g({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 Tl(t){return g({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 El(t){return g({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(t)}function Nl(t){return g({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(t)}function Pl(t){return g({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 Ml(t){return g({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)}const Al=({title:e,description:n,onClose:i,showCloseIcon:s=!0,icon:o,actions:r,className:a="",...l})=>t.jsxs("div",{className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${a}`,...l,children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o&&t.jsx("span",{className:"mt-0.5 text-white text-xl",children:o}),t.jsxs("div",{className:"flex-1 min-w-0",children:[e&&t.jsx("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:e}),n&&t.jsx("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:n})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[r,s&&t.jsx("button",{type:"button","aria-label":"Cerrar",onClick:i,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.jsx(bl,{className:"text-xl"})})]})]}),Ll=({className:e="",...n})=>t.jsx("div",{className:`p-4 sm:p-6 ${e}`,...n}),Rl=({className:e="",...n})=>t.jsx("div",{className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${e}`,...n}),Vl={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const Dl=({open:n,onClose:i,title:o,description:r,size:a="md",footer:l,showCloseIcon:c=!0,hideHeader:d=!1,closeOnEsc:u=!0,closeOnClickOutside:h=!0,className:p="",children:m,initialFocusRef:f,headerClassName:g,overlayClassName:x,headerIcon:y,headerActions:v,zIndex:b,animate:w=!1})=>{const j=e.useRef(null),S=e.useRef(null),C=ml(),k=w&&!C;var T;T=n,e.useEffect(()=>{if(!T)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[T]),function(t,n,i){e.useEffect(()=>{if(!t)return;const e=n.current;if(!e)return;const s=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],o=()=>Array.from(e.querySelectorAll(s.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),r=document.activeElement;(i?.current||o()[0]||e).focus();const a=t=>{if("Tab"!==t.key)return;const n=o();if(0===n.length)return;const i=n[0],s=n[n.length-1];t.shiftKey?document.activeElement!==i&&document.activeElement!==e||(s.focus(),t.preventDefault()):document.activeElement===s&&(i.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),r?.focus?.()}},[t,n,i])}(n,j,f);const E=e.useCallback(t=>{n&&"Escape"===t.key&&u&&(t.stopPropagation(),i())},[n,u,i]);e.useEffect(()=>{if(n)return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[n,E]);const N=t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${x??""}`}),t.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":o?"bo-modal-title":void 0,"aria-describedby":r?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Vl[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 ${p}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(Al,{title:o,description:r,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:m}),l&&t.jsx(Rl,{children:l})]})]}),P=t.jsx(Kr,{children:n&&t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx(pl.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:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${x??""}`}),t.jsxs(pl.div,{role:"dialog","aria-modal":"true","aria-labelledby":o?"bo-modal-title":void 0,"aria-describedby":r?"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 ${Vl[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 ${p}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(Al,{title:o,description:r,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:m}),l&&t.jsx(Rl,{children:l})]})]})}),M=k?P:n?N:null;return"undefined"!=typeof document?s.createPortal(M,document.body):M};var zl,Bl,Il;Dl.Header=Al,Dl.Body=Ll,Dl.Footer=Rl,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(zl||(zl={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(Bl||(Bl={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(Il||(Il={}));const Fl=t=>{switch(t){case zl.CENTER:return"text-center";case zl.RIGHT:return"text-right";default:return"text-left"}},Ol=t=>{switch(t){case Il.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case Il.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"}}},$l=t=>t%2==0?"bg-white":"bg-gray-50",Wl=({columns:e,size:n,hasActions:i})=>{const s=Ol(n);return t.jsx("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:t.jsxs("tr",{children:[e.map(e=>t.jsx("th",{className:`${s.header} ${Fl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),i&&t.jsx("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},Ul=({columns:e,data:n,renderActions:i,size:s,onRowClick:o})=>{const r=Ol(s);return t.jsx("tbody",{children:n.map((n,s)=>t.jsxs("tr",{className:`${$l(s)} hover:bg-gray-100 transition-colors duration-150 ${o?"cursor-pointer":""}`,onClick:()=>o?.(n),children:[e.map(e=>t.jsx("td",{className:`${r.cell} ${Fl(e.alignment)} ${e.className||""}`,children:e.accessor(n)},e.key)),i&&t.jsx("td",{className:`${r.cell} text-center sticky right-0 ${$l(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:i(n)})]},s))})},Xl=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),Hl={datos_basicos:vl,transporte:Ml,contacto:jl},Yl={nombres:vl,apellidos:vl,curso:function(t){return g({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 g({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:Ml,saleSolo:function(t){return g({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 g({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 g({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 g({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:Tl},ql={informacion_general:vl,ultimas_novedades:Tl,personas_autorizadas:yl,ultimos_movimientos:Cl},_l={INGRESO:function(t){return g({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 g({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)}},Gl="#FFFFFF",Kl="#F7F9FC",Zl="#E5E9F2",Jl="#0F172A",Ql="#64748B",tc="#94A3B8",ec="#111F4B",nc="#E2E8FF",ic="#1D4ED8",sc={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"};function oc(t){return g({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)}const rc="#1e40af",ac="#93c5fd",lc="#60a5fa",cc="#1e3a8a",dc=`\n .ba-left {\n display: none;\n flex-direction: column;\n }\n .ba-right {\n width: 100%;\n }\n .ba-sysname {\n position: absolute;\n top: 2rem;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n pointer-events: none;\n }\n @media (min-width: 768px) {\n .ba-left { display: flex; width: 50%; padding: 1.5rem; }\n .ba-right { width: 50%; padding: 4rem; }\n .ba-sysname { top: 3rem; }\n }\n\n /* Inputs */\n .ba-input {\n width: 100%;\n padding: 14px 16px;\n background: #f5f7f9;\n border: 1px solid transparent;\n border-radius: 8px;\n font-size: 14px;\n color: #111827;\n outline: none;\n transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;\n box-sizing: border-box;\n font-family: inherit;\n }\n .ba-input:focus {\n background: white;\n border-color: ${rc};\n box-shadow: 0 0 0 1px ${rc};\n }\n .ba-input::placeholder { color: #9ca3af; }\n .ba-input:disabled { opacity: 0.6; cursor: not-allowed; }\n\n /* Monospace input (product key) */\n .ba-input-mono {\n font-family: monospace;\n letter-spacing: 1.2px;\n }\n\n /* Primary black button */\n .ba-btn-primary {\n width: 100%;\n padding: 16px;\n background: #111827;\n color: white;\n font-size: 15px;\n font-weight: 600;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n letter-spacing: 0.025em;\n transition: background 0.2s, box-shadow 0.2s;\n font-family: inherit;\n }\n .ba-btn-primary:hover:not(:disabled) {\n background: #1f2937;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n }\n .ba-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Blue primary button (modal) */\n .ba-btn-blue {\n width: 100%;\n padding: 10px 16px;\n background: ${rc};\n color: white;\n font-size: 14px;\n font-weight: 600;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: opacity 0.15s;\n font-family: inherit;\n }\n .ba-btn-blue:hover:not(:disabled) { opacity: 0.9; }\n .ba-btn-blue:disabled { background: #9ca3af; cursor: not-allowed; }\n\n /* Secondary text button */\n .ba-btn-secondary {\n width: 100%;\n padding: 12px;\n background: none;\n color: #4b5563;\n font-size: 14px;\n font-weight: 600;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: color 0.15s;\n font-family: inherit;\n }\n .ba-btn-secondary:hover:not(:disabled) { color: #111827; }\n .ba-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Google overlay button (visual only, invisible Google iframe sits on top) */\n .ba-btn-google {\n width: 100%;\n padding: 16px;\n background: white;\n color: #111827;\n font-size: 15px;\n font-weight: 600;\n border: 1px solid #d1d5db;\n border-radius: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n pointer-events: none;\n transition: background 0.15s;\n letter-spacing: 0.025em;\n }\n\n /* Link-style buttons */\n .ba-link {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 700;\n color: #111827;\n transition: color 0.15s;\n font-size: inherit;\n font-family: inherit;\n padding: 0;\n }\n .ba-link:hover { color: ${"#1d4ed8"}; }\n\n .ba-link-blue {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n color: ${"#2563eb"};\n transition: color 0.15s;\n font-size: 13px;\n font-family: inherit;\n padding: 0;\n }\n .ba-link-blue:hover { color: ${cc}; }\n\n .ba-link-gray {\n background: none;\n border: none;\n cursor: pointer;\n font-weight: 600;\n color: #6b7280;\n transition: color 0.15s;\n font-size: 13px;\n font-family: inherit;\n padding: 0;\n }\n .ba-link-gray:hover { color: ${rc}; }\n\n /* Password eye toggle */\n .ba-eye {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n cursor: pointer;\n color: #6b7280;\n display: flex;\n align-items: center;\n transition: color 0.15s;\n padding: 0;\n }\n .ba-eye:hover { color: ${rc}; }\n\n /* Step indicator circles */\n .ba-step-active {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: ${rc};\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n .ba-step-done {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: #22c55e;\n color: white;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n .ba-step-inactive {\n width: 32px; height: 32px;\n border-radius: 50%;\n background: #d1d5db;\n color: #4b5563;\n display: flex; align-items: center; justify-content: center;\n font-size: 14px; font-weight: 500;\n }\n\n /* Modal */\n .ba-modal-overlay {\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n padding: 16px;\n }\n .ba-modal-close {\n background: none; border: none; cursor: pointer;\n color: #9ca3af; display: flex;\n transition: color 0.15s; padding: 0;\n }\n .ba-modal-close:hover { color: #4b5563; }\n\n /* Divider */\n .ba-divider {\n position: relative;\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .ba-divider::before {\n content: '';\n position: absolute;\n left: 0; right: 0; top: 50%;\n border-top: 1px solid #d1d5db;\n }\n .ba-divider span {\n position: relative;\n background: white;\n padding: 0 8px;\n font-size: 14px;\n color: #6b7280;\n }\n\n /* Status boxes */\n .ba-status-success { background: #e7f7ee; color: #1e7e34; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n .ba-status-error { background: #fdecea; color: #b00020; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n .ba-status-loading { background: transparent; color: #374151; border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 14px; }\n`;function uc({systemName:e,leftPanelTitle:n,quote:i='"Todas las cosas buenas en este mundo empezaron con un sueño."',quoteAuthor:s="— Willy Wonka",children:o}){return t.jsxs("div",{style:{display:"flex",minHeight:"100vh",backgroundColor:"white"},children:[t.jsx("style",{children:dc}),t.jsxs("div",{style:{display:"flex",width:"100%",minHeight:"100vh"},children:[t.jsx("div",{className:"ba-left",style:{backgroundColor:"white"},children:t.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",borderRadius:"2.5rem",backgroundColor:"black",display:"flex",flexDirection:"column",justifyContent:"space-between",padding:"3.5rem",overflow:"hidden",boxShadow:"0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -5px rgba(0,0,0,0.04)",border:"1px solid #f3f4f6"},children:[t.jsx("div",{style:{position:"absolute",inset:0,background:`linear-gradient(135deg, ${cc}, black 60%, black)`,opacity:.85,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"-10%",left:"-20%",width:"150%",height:"60%",background:"linear-gradient(45deg, rgba(37,99,235,0.3), rgba(96,165,250,0.1))",filter:"blur(80px)",borderRadius:"50%",transform:"rotate(-15deg)",pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"20%",left:"-10%",width:"120%",height:"40%",background:"linear-gradient(90deg, transparent, rgba(96,165,250,0.8), transparent)",filter:"blur(40px)",mixBlendMode:"screen",transform:"rotate(10deg)",opacity:.6,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",top:"35%",left:"-10%",width:"120%",height:"30%",background:"linear-gradient(90deg, transparent, rgba(147,197,253,0.8), transparent)",filter:"blur(30px)",mixBlendMode:"screen",transform:"rotate(-5deg)",opacity:.7,pointerEvents:"none"}}),t.jsx("div",{style:{position:"absolute",bottom:"-10%",right:"-20%",width:"120%",height:"60%",background:"linear-gradient(225deg, rgba(29,78,216,0.4), transparent)",filter:"blur(100px)",borderRadius:"50%",transform:"rotate(25deg)",pointerEvents:"none"}}),t.jsx("div",{style:{position:"relative",zIndex:10,width:"100%",marginBottom:"2.5rem"},children:t.jsxs("p",{style:{fontSize:"2.25rem",letterSpacing:"-0.025em",fontWeight:700,textTransform:"uppercase",opacity:.9,display:"flex",alignItems:"center",gap:"1rem",color:"white",fontFamily:"Afacad, sans-serif",margin:0},children:["BOTECH",t.jsx("span",{style:{height:"1px",width:"4rem",backgroundColor:"rgba(255,255,255,0.4)",display:"block"}})]})}),t.jsxs("div",{style:{position:"relative",zIndex:10,marginTop:"auto",paddingBottom:"1rem"},children:[t.jsx("h2",{style:{fontSize:"3rem",fontFamily:'Georgia, "Times New Roman", serif',lineHeight:1,color:"white",letterSpacing:"-0.025em",margin:"0 0 1.5rem 0"},children:n}),t.jsxs("div",{style:{borderLeft:`2px solid ${lc}`,paddingLeft:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},children:[t.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"#d1d5db",maxWidth:"320px",lineHeight:1.625,opacity:.9,fontStyle:"italic",margin:"0 0 0.5rem 0"},children:i}),t.jsx("p",{style:{fontSize:"11px",fontWeight:700,color:ac,textTransform:"uppercase",letterSpacing:"0.1em",margin:0},children:s})]})]})]})}),t.jsxs("div",{className:"ba-right",style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"white",padding:"2rem",position:"relative"},children:[t.jsx("div",{className:"ba-sysname",children:t.jsx("span",{style:{fontSize:"2.5rem",fontWeight:700,letterSpacing:"-0.025em",color:rc,fontFamily:"Afacad, sans-serif"},children:e})}),o]})]})]})}function hc(t){return g({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"},child:[]}]})(t)}function pc(t){return g({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 0 0 0-51.5zm-63.57-320.64L836 122.88a8 8 0 0 0-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 0 0 0 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 0 0 0 11.31L155.17 889a8 8 0 0 0 11.31 0l712.15-712.12a8 8 0 0 0 0-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 0 0-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 0 1 146.2-106.69L401.31 546.2A112 112 0 0 1 396 512z"},child:[]},{tag:"path",attr:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 0 0 227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 0 1-112 112z"},child:[]}]})(t)}function mc(t){return g({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n\tc0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n\tc0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n\tC34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(t)}function fc({isOpen:n,onClose:i,onSendReset:s}){const[o,r]=e.useState(""),[a,l]=e.useState("idle"),[c,d]=e.useState("");if(!n)return null;const u=()=>{r(""),l("idle"),d(""),i()};return t.jsx("div",{className:"ba-modal-overlay",children:t.jsxs("div",{style:{backgroundColor:"white",borderRadius:"8px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04)",maxWidth:"448px",width:"100%",padding:"24px"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px"},children:[t.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:0},children:"Restablecer Contraseña"}),t.jsx("button",{className:"ba-modal-close",onClick:u,disabled:"loading"===a,children:t.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.jsx("p",{style:{fontSize:"14px",color:"#4b5563",marginBottom:"24px",margin:"0 0 24px 0"},children:"Ingresa tu correo electrónico y te enviaremos un enlace para restablecer tu contraseña."}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),!o.trim())return l("error"),void d("Por favor ingresa tu correo electrónico.");l("loading"),d("");const e=await s(o);e.ok?(l("success"),d(e.message??"Correo enviado exitosamente."),setTimeout(u,3e3)):(l("error"),d(e.error??"Ocurrió un error al enviar el correo."))},noValidate:!0,children:[t.jsxs("div",{style:{marginBottom:"16px"},children:[t.jsx("label",{htmlFor:"reset-email",style:{display:"block",marginBottom:"8px",fontSize:"14px",fontWeight:500,color:"#374151"},children:"Correo Electrónico"}),t.jsx("input",{id:"reset-email",className:"ba-input",type:"email",autoComplete:"email",placeholder:"ejemplo@correo.com",value:o,onChange:t=>r(t.target.value),disabled:"loading"===a||"success"===a})]}),t.jsx("button",{type:"submit",className:"ba-btn-blue",disabled:"loading"===a||"success"===a,children:"loading"===a?"Enviando...":"Enviar Enlace de Restablecimiento"}),"idle"!==a&&t.jsx("div",{role:"status",className:`ba-status-${a}`,children:c})]})]})})}const gc=/^[A-Z0-9]{3}-[A-Z0-9]{2}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{7}-[A-Z0-9]{7}$/;function xc(t){return t.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,40)}exports.AuthLayout=uc,exports.Button=a,exports.DownloadStudentsExcelButton=({backend:i,label:s="Descargar Lista de Estudiantes en Excel",fileName:o="students.xlsx",className:r,variant:l="primary",clientName:c,onSuccess:d,onError:u})=>{const[h,p]=e.useState(!1);return t.jsx(a,{variant:l,onClick:async()=>{try{p(!0);let t=c;if("85"===i&&!t){const{value:e}=await n.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 p(!1);t=e}const e=await gl(i,t),s=URL.createObjectURL(e),r=document.createElement("a");r.href=s,r.download=o,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(s),await n.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),d?.()}catch(t){console.error("Download students excel failed",t);let e="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const i=t;e=i?.response?.data?.message??("string"==typeof i?.response?.data?i.response.data:void 0)??(i?.response?.statusText?`Error ${i.response.status}: ${i.response.statusText}`:void 0)??e,await n.fire({title:"Error en la descarga",text:e,icon:"error",confirmButtonText:"OK"}),u?.(t)}finally{p(!1)}},className:r,children:h?"Descargando...":s})},exports.GenericTable=({columns:n,data:i,renderActions:s,size:o=Il.MD,className:r="",onRowClick:a,isLoading:l=!1,emptyMessage:c="No hay datos disponibles"})=>{const d=e.useRef(null),{visibleData:u}=((t,n)=>{const[i,s]=e.useState(t);return e.useEffect(()=>{const e=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),i=window.innerHeight-e.top-100,o=Math.max(1,Math.floor(i/60));s(t.slice(0,o))};e();const i=()=>{e()};window.addEventListener("resize",i);const o=new ResizeObserver(e);return n.current&&o.observe(n.current),()=>{window.removeEventListener("resize",i),o.disconnect()}},[t,n]),{visibleData:i}})(i,d);return l?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:c})})}):t.jsx("div",{ref:d,className:`w-full shadow-md sm:rounded-lg bg-white ${r}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t.jsx(Wl,{columns:n,size:o,hasActions:!!s}),t.jsx(Ul,{columns:n,data:u,renderActions:s,size:o,onRowClick:a})]})})})},exports.Header=({title:e,description:n,logoUrl:i,defaultLogoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:d="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:u="h-8 sm:h-10 object-contain",titleClassName:h="text-lg sm:text-xl font-bold",descriptionClassName:p="text-xs sm:text-sm opacity-80"})=>{const m="string"==typeof s&&""!==s.trim()?s:void 0,f="string"==typeof i&&""!==i.trim()?i:m;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsx("button",{onClick:l,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.jsx(b,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),t.jsxs("div",{className:"flex items-center min-w-0 flex-1",children:[t.jsx("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:f?t.jsx("img",{src:f,alt:o,className:u}):t.jsx("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.jsx("span",{className:"text-white font-bold text-sm sm:text-lg",children:r.charAt(0)})})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h1",{className:h,children:r}),t.jsx("p",{className:p,children:a})]})]})]}),c&&t.jsxs("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t.jsx("h2",{className:"text-base sm:text-lg font-semibold",children:e}),t.jsx("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:n})]})]})},exports.IconButton=({leftIcon:e,rightIcon:n,children:i,onClick:s,className:o="",variant:r="primary",size:a="md",disabled:l=!1})=>{const c={primary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsxs("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"}[a]} ${c[r]} ${o}`,onClick:l?void 0:s,disabled:l,children:[e&&t.jsx("span",{className:"flex items-center",children:e}),i,n&&t.jsx("span",{className:"flex items-center",children:n})]})},exports.LoginPage=function({systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,googleClientId:r,onLogin:a,onGoogleCredential:l,onForgotPassword:c,onNavigateToRegister:d}){const[u,h]=e.useState(""),[p,m]=e.useState(""),[f,g]=e.useState(!1),[x,y]=e.useState(!1),v=e.useRef(!1);return e.useEffect(()=>{if(v.current)return;const t=()=>{if(v.current)return!0;const t=document.getElementById("google-btn-login");if(!window.google?.accounts?.id||!t)return!1;try{return v.current=!0,t.innerHTML="",window.google.accounts.id.initialize({client_id:r,callback:async t=>{await l(t.credential)}}),window.google.accounts.id.renderButton(t,{theme:"outline",size:"large",text:"continue_with",width:320}),!0}catch{return v.current=!1,!1}};if(t())return;const e=setInterval(()=>{t()&&clearInterval(e)},150);return()=>clearInterval(e)},[r]),t.jsxs(uc,{systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,children:[t.jsxs("div",{style:{textAlign:"center",width:"100%",marginTop:"1.5rem",marginBottom:"2rem",maxWidth:"480px"},children:[t.jsx("h2",{style:{fontSize:"2.5rem",fontFamily:'Georgia, "Times New Roman", serif',color:"#111827",marginBottom:"0.75rem",letterSpacing:"-0.025em",margin:"0 0 0.75rem 0"},children:"Bienvenido de nuevo"}),t.jsx("p",{style:{fontSize:"14px",color:"#6b7280",fontWeight:500,letterSpacing:"0.025em",margin:0},children:"Ingresa tu correo y contraseña para acceder al sistema."})]}),t.jsxs("form",{onSubmit:async t=>{t.preventDefault(),u&&p&&await a(u,p)},style:{width:"100%",maxWidth:"480px",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{width:"100%",marginBottom:"20px"},children:[t.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Correo electrónico"}),t.jsx("input",{className:"ba-input",placeholder:"ejemplo@correo.com",name:"email",type:"email",value:u,onChange:t=>h(t.target.value)})]}),t.jsxs("div",{style:{width:"100%",marginBottom:"24px"},children:[t.jsx("label",{style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Contraseña"}),t.jsxs("div",{style:{position:"relative"},children:[t.jsx("input",{className:"ba-input",style:{paddingRight:"48px"},placeholder:"Tu contraseña secreta",type:f?"text":"password",name:"password",value:p,onChange:t=>m(t.target.value)}),t.jsx("button",{type:"button",className:"ba-eye",onClick:()=>g(t=>!t),children:f?t.jsx(pc,{size:20}):t.jsx(hc,{size:20})})]})]}),t.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end",marginBottom:"32px"},children:t.jsx("button",{type:"button",className:"ba-link-blue",onClick:()=>y(!0),children:"¿Olvidaste tu contraseña?"})}),t.jsx("button",{className:"ba-btn-primary",type:"submit",style:{marginBottom:"16px"},children:"Ingresar al sistema"}),t.jsxs("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"},children:[t.jsxs("button",{type:"button",className:"ba-btn-google",children:[t.jsx(mc,{size:22}),"Continuar con Google"]}),t.jsx("div",{id:"google-btn-login",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:.01,zIndex:10,overflow:"hidden"}})]})]}),t.jsx("div",{style:{textAlign:"center",width:"100%",marginTop:"32px"},children:t.jsxs("p",{style:{fontSize:"14px",color:"#4b5563",fontWeight:500,letterSpacing:"0.025em",margin:0},children:["¿Aún no tienes cuenta?"," ",t.jsx("button",{className:"ba-link",onClick:d,children:"Regístrate aquí"})]})}),t.jsx(fc,{isOpen:x,onClose:()=>y(!1),onSendReset:c})]})},exports.Modal=Dl,exports.ModalBody=Ll,exports.ModalFooter=Rl,exports.ModalHeader=Al,exports.MultiSelector=({items:n,selectedItems:i=[],onSelectionChange:s,placeholder:o="Seleccionar elementos",searchPlaceholder:r="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,maxSelectedDisplay:h=3,renderItem:p,renderSelectedItem:m,renderSelectedBadge:f})=>{const[g,x]=e.useState(!1),[y,v]=e.useState(""),b=e.useRef(null),w=e.useRef(null);e.useEffect(()=>{const t=t=>{b.current&&!b.current.contains(t.target)&&x(!1)};if(g)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[g]),e.useEffect(()=>{g&&w.current&&w.current.focus()},[g]),e.useEffect(()=>{g||v("")},[g]);const j=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){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,y),S=t=>i.some(e=>e.id===t.id),C=t=>{s(i.filter(e=>e.id!==t.id))},k=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),T=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),E=({item:e,onRemove:n})=>t.jsxs("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:[m?m(e):e.name,t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),n()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t.jsx(k,{})})]}),N=i.slice(0,h),P=i.length-h;return t.jsxs("div",{ref:b,className:`relative w-full ${a}`,children:[t.jsxs("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 ${l?"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 ${g?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{l||x(!g)},children:[t.jsx("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===i.length?t.jsx("span",{className:"text-gray-500",children:o}):t.jsxs(t.Fragment,{children:[N.map(e=>t.jsx("div",{onClick:t=>t.stopPropagation(),children:f?f(e,()=>C(e)):t.jsx(E,{item:e,onRemove:()=>C(e)})},e.id)),P>0&&t.jsxs("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",P," más"]})]})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i.length>0&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(k,{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(g?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),g&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:w,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:r,value:y,onChange:t=>v(t.target.value),onClick:t=>t.stopPropagation()})]})}),i.length>0&&t.jsxs("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[i.length," elemento(s) seleccionado(s)"]}),t.jsx("div",{className:"max-h-60 overflow-auto",children:0===j.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:y?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):j.map(e=>{const n=S(e);return t.jsxs("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 ${n?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{S(t)?s(i.filter(e=>e.id!==t.id)):s([...i,t])})(e),children:[t.jsx("div",{className:"flex-1",children:p?p(e):t.jsx("span",{className:""+(n?"text-primary-botech-900 font-medium":"text-gray-900"),children:e.name})}),n&&t.jsx("div",{className:"ml-2 text-primary-botech-600",children:t.jsx(T,{})})]},e.id)})})]})]})},exports.NotFound=function(){return t.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:t.jsxs("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsxs("div",{className:"relative flex flex-col items-center",children:[t.jsx("div",{className:"h-80 w-4 bg-gray-700"}),t.jsxs("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.jsx("div",{className:"flex-1 mb-2",children:t.jsxs("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t.jsx("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t.jsx("span",{className:"text-4xl font-bold",children:"404"}),t.jsx("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t.jsx("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."})]}),t.jsxs("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.jsx(oc,{className:"h-4 w-4"}),t.jsx("span",{children:"Volver a la ruta principal"})]})]})})},exports.PasswordResetModal=fc,exports.ProfileSwitcher=({profiles:n,currentProfileId:i,onSwitch:s})=>{const[o,r]=e.useState(!1),[a,l]=e.useState(!1);if(n.length<=1)return null;const c=n.find(t=>t.profileId===i);return t.jsx("div",{className:"fixed bottom-3 right-4 z-50",children:t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>r(!o),disabled:a,className:"flex items-center gap-2 bg-white text-primary-botech border border-primary-botech/30 shadow-md hover:shadow-lg hover:bg-primary-botech/5 text-sm font-semibold px-3 py-2 rounded-full transition-all disabled:opacity-60",children:[t.jsx(vl,{className:"size-4 shrink-0"}),t.jsx("span",{className:"hidden sm:inline max-w-[160px] truncate",children:c?.kindSlug??"Perfil"}),t.jsx(El,{className:"size-3 shrink-0 transition-transform hidden sm:block "+(o?"rotate-180":"")})]}),o&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),t.jsxs("div",{className:"absolute right-0 bottom-full mb-2 w-64 sm:w-72 rounded-xl shadow-xl border border-white/30 z-50 overflow-hidden backdrop-blur-md bg-white/80",children:[t.jsx("div",{className:"px-3 py-2 border-b border-white/40 bg-white/40",children:t.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Cambiar perfil"})}),n.map(e=>{const n=e.profileId===i;return t.jsxs("button",{onClick:()=>(async t=>{if(t!==i&&!a){l(!0),r(!1);try{await s(t)}finally{l(!1)}}})(e.profileId),className:"w-full flex items-center justify-between px-3 py-3 text-left border-b border-white/30 last:border-0 transition-colors\n "+(n?"bg-primary-botech/10":"hover:bg-primary-botech/5 active:bg-primary-botech/10"),children:[t.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t.jsx(vl,{className:"size-5 shrink-0 "+(n?"text-primary-botech":"text-gray-300")}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-semibold text-gray-900",children:e.kindSlug}),t.jsx("div",{className:"text-xs text-gray-500 truncate",children:e.schoolName})]})]}),n&&t.jsx(Nl,{className:"size-3.5 text-primary-botech shrink-0 ml-2"})]},e.profileId)})]})]})]})})},exports.RegisterProductKeyPage=function({systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,googleClientId:r,systemCode:a,onValidateKey:l,onRegisterWithForm:c,onRegisterWithSSO:d,onFirebaseGoogleSignIn:u,onGoogleAuthLogin:h,onNavigateToLogin:p,onSuccess:m}){const[f,g]=e.useState(""),[x,y]=e.useState("idle"),[v,b]=e.useState(""),[w,j]=e.useState(""),[S,C]=e.useState(1),[k,T]=e.useState(""),[E,N]=e.useState(""),[P,M]=e.useState(""),[A,L]=e.useState(""),[R,V]=e.useState("idle"),[D,z]=e.useState(""),B=e.useRef(null),I=e.useRef(!1),F=e.useMemo(()=>function(t){const e=t.toUpperCase().replace(/[^A-Z0-9]/g,"");return[e.slice(0,3),e.slice(3,5),e.slice(5,10),e.slice(10,15),e.slice(15,22),e.slice(22,29)].filter(Boolean).join("-")}(f),[f]),O=e.useMemo(()=>gc.test(F),[F]);e.useEffect(()=>{B.current?.focus()},[]),e.useEffect(()=>{if(2!==S)return;if(I.current)return;const t=()=>{if(I.current)return!0;const t=document.getElementById("google-rpk-container");if(!window.google?.accounts?.id||!t)return!1;try{return I.current=!0,t.innerHTML="",window.google.accounts.id.initialize({client_id:r,callback:async t=>{await $(t.credential)}}),window.google.accounts.id.renderButton(t,{theme:"outline",size:"large",text:"continue_with",width:320}),!0}catch{return I.current=!1,!1}};if(t())return;const e=setInterval(()=>{t()&&clearInterval(e)},150);return()=>clearInterval(e)},[S]);const $=async t=>{V("loading"),z("Validando con Google...");const e=await u(t);if(!e.ok)return V("error"),void z(e.error??"No se pudo autenticar con Google.");const n=await d({productKey:F,idToken:e.idToken,firebaseUid:e.localId,email:e.email,systemCode:a,fullName:k||e.displayName||"Usuario Google",phoneNumber:E,tokenFcm:""});if(n.ok){V("success"),z("Registro correcto con Google.");try{await h({idToken:e.idToken,firebaseUid:e.localId,systemCode:a})}catch{}m()}else V("error"),z(n.error??"No se pudo completar el registro.")},W=(e,n)=>"idle"===e?null:t.jsx("div",{role:"status",className:`ba-status-${e}`,children:n});return t.jsxs(uc,{systemName:n,leftPanelTitle:i,quote:s,quoteAuthor:o,children:[t.jsx("div",{style:{position:"absolute",top:"2rem",left:"2rem"},children:t.jsx("button",{className:"ba-link-gray",onClick:p,children:"← Volver al inicio"})}),t.jsxs("div",{style:{width:"100%",maxWidth:"480px",display:"flex",flexDirection:"column",justifyContent:"center",flex:1,marginTop:"2.5rem"},children:[t.jsx("div",{style:{textAlign:"center",width:"100%",marginBottom:"32px"},children:t.jsx("h2",{style:{fontSize:"2.5rem",fontFamily:'Georgia, "Times New Roman", serif',color:"#111827",letterSpacing:"-0.025em",margin:0},children:"Registro de Llave"})}),t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{className:1===S?"ba-step-active":"ba-step-done",children:1===S?"1":"✓"}),t.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"#374151"},children:"Validar Llave"}),t.jsx("div",{style:{width:"48px",height:"2px",backgroundColor:"#d1d5db",margin:"0 8px"}}),t.jsx("div",{className:2===S?"ba-step-active":"ba-step-inactive",children:"2"}),t.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"#374151"},children:"Registro de Usuario"})]})}),1===S&&t.jsxs(t.Fragment,{children:[t.jsx("h1",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"0 0 8px 0"},children:"Registro de llave de producto"}),t.jsxs("p",{style:{fontSize:"14px",color:"#6b7280",fontWeight:500,letterSpacing:"0.025em",margin:"0 0 24px 0"},children:["Ingresa tu llave de producto en el formato",t.jsx("br",{}),"XXX-XX-XXXXX-XXXXX-XXXXXXX-XXXXXXX."]}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),!O||"loading"===x)return;y("loading"),j(F);const e=await l(F);e.ok?(y("success"),b(e.message??"Llave validada correctamente."),setTimeout(()=>C(2),800)):(y("error"),b(e.error??"Llave inválida o ya utilizada."))},noValidate:!0,style:{display:"flex",flexDirection:"column"},children:[t.jsx("label",{htmlFor:"productKey",style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:"Llave de producto"}),t.jsx("input",{id:"productKey",ref:B,className:"ba-input ba-input-mono",type:"text",inputMode:"text",autoComplete:"off",placeholder:"AB1-C0-0DE06-FGHIJ-00K1L2M-1234567",value:F,onChange:t=>{y("idle"),b(""),g(xc(t.target.value))},onPaste:t=>{t.preventDefault(),g(xc(t.clipboardData.getData("text")))},maxLength:40,"aria-invalid":!O&&f.length>0,style:{borderColor:0===f.length?"transparent":O?"#22c55e":"#f87171"},disabled:"loading"===x||"success"===x}),t.jsx("div",{style:{fontSize:"12px",color:O||0===f.length?"#6b7280":"#dc2626",marginTop:"6px"},children:0===f.length?"Solo letras y números. Se formatea automáticamente.":O?"Formato válido.":"Formato inválido. Debe ser XXX-XX-XXXXX-XXXXX-XXXXXXX-XXXXXXX."}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",marginTop:"24px"},children:[t.jsx("button",{type:"submit",className:"ba-btn-primary",disabled:!O||"loading"===x||"success"===x,children:"loading"===x?"Validando...":"Validar Llave"}),t.jsx("button",{type:"button",className:"ba-btn-secondary",onClick:()=>{g(""),y("idle"),b(""),C(1),T(""),N(""),M(""),L(""),V("idle"),z(""),I.current=!1,B.current?.focus()},disabled:"loading"===x,children:"Limpiar"})]}),W(x,v)]})]}),2===S&&t.jsxs(t.Fragment,{children:[t.jsx("h1",{style:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"0 0 8px 0"},children:"Completa tu registro"}),t.jsx("p",{style:{fontSize:"14px",color:"#6b7280",margin:"0 0 16px 0"},children:"Ingresa tus datos para completar el registro."}),t.jsxs("div",{style:{marginBottom:"16px"},children:[t.jsxs("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"},children:[t.jsxs("button",{type:"button",className:"ba-btn-google",children:[t.jsx(mc,{size:22}),"Continuar con Google"]}),t.jsx("div",{id:"google-rpk-container",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:.01,zIndex:10,overflow:"hidden"}})]}),t.jsx("div",{className:"ba-divider",children:t.jsx("span",{children:"o registrarse con email"})})]}),t.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),"loading"===R)return;if(!(k.trim()&&E.trim()&&P.trim()&&A.trim()))return V("error"),void z("Por favor completa todos los campos.");if(A.length<6)return V("error"),void z("La contraseña debe tener al menos 6 caracteres.");V("loading");const e=await c(P,A,k,E,w);e.ok?(V("success"),z("Usuario registrado correctamente."),m()):(V("error"),z(e.error??"Error al registrar el usuario."))},noValidate:!0,style:{display:"flex",flexDirection:"column",gap:"16px"},children:[[{id:"fullName",label:"Nombre Completo",type:"text",value:k,setter:T,placeholder:"Juan Pérez",autoComplete:"name"},{id:"phoneNumber",label:"Número de Teléfono",type:"tel",value:E,setter:N,placeholder:"+57 300 000 0000",autoComplete:"tel"},{id:"email",label:"Correo Electrónico",type:"email",value:P,setter:M,placeholder:"ejemplo@correo.com",autoComplete:"email"},{id:"password",label:"Contraseña",type:"password",value:A,setter:L,placeholder:"Mínimo 6 caracteres",autoComplete:"new-password"}].map(({id:e,label:n,type:i,value:s,setter:o,placeholder:r,autoComplete:a})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:e,style:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827",marginBottom:"8px"},children:n}),t.jsx("input",{id:e,className:"ba-input",type:i,autoComplete:a,placeholder:r,value:s,onChange:t=>o(t.target.value),disabled:"loading"===R||"success"===R})]},e)),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",paddingTop:"8px"},children:[t.jsx("button",{type:"submit",className:"ba-btn-primary",disabled:"loading"===R||"success"===R,children:"loading"===R?"Registrando...":"Registrar Usuario"}),t.jsx("button",{type:"button",className:"ba-btn-secondary",onClick:()=>{C(1),V("idle"),z(""),I.current=!1},disabled:"loading"===R,children:"Volver"})]}),W(R,D)]})]})]})]})},exports.Sidebar=({isOpen:n,onClose:i,onToggle:s,menuItems:o,logoUrl:r,logoAlt:a="Logo",systemName:l="PASS",defaultLogoUrl:c,dashboardPath:d,className:u="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:h="fixed inset-0 bg-black/25 z-40",desktopMenuClassName:p="h-full flex flex-col",showBottomMenu:m=!0,bottomMenuItems:f=[{id:"settings",label:"Configuración",icon:v,action:()=>{}},{id:"help",label:"Ayuda",icon:j,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:w,action:()=>{}}],activePath:g="",onNavigate:x,children:b,performanceMode:k="auto",fpsThreshold:T,fpsSampleSize:E,compatibilityMode:N=!1,onPerformanceModeChange:P})=>{const[M,A]=e.useState(new Set),{effectiveMode:L}=function({mode:t="auto",fpsThreshold:n=45,fpsSampleSize:i=90,compatibilityFlag:s=!1,onModeChange:o}={}){const[r,a]=e.useState(!1),[l,c]=e.useState(!1),d=e.useRef("full");e.useEffect(()=>{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]),e.useEffect(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||r||s)return;let e=0,o=0,a=performance.now(),l=null;const d=Math.min(Math.max(30,i),240),u=t=>{const i=t-a;a=t,e>0&&(o+=1e3/i),e+=1,e>=d?o/(e-1||1)<n&&c(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,r,s,i,n]);const u=e.useMemo(()=>"full"===t||"lite"===t?t:s||r||l?"lite":"full",[t,s,r,l]);return e.useEffect(()=>{o?d.current!==u&&(o(u),d.current=u):d.current=u},[u,o]),{effectiveMode:u,prefersReducedMotion:r,detectedLowPerformance:l,compatibilityFlag:s}}({mode:k,fpsThreshold:T,fpsSampleSize:E,compatibilityFlag:N,onModeChange:P}),R="lite"===L,V=e.useMemo(()=>R?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:n?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[R,n]),D=e.useMemo(()=>R?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[R]),z="string"==typeof c&&""!==c.trim()?c:void 0,B="string"==typeof r&&""!==r.trim()?r:z,I=t=>g.includes(t),F=t=>{x&&x(t),i()},O=(e,n=!1)=>t.jsxs(pl.button,{whileHover:R?void 0:{scale:1.01},whileTap:R?void 0:{scale:.99},transition:R?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:R?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${n?"pr-4 pl-10":"px-4"} ${I(e.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>F(e.path),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(S,{className:"w-4 h-4 transition-transform "+(I(e.path)?"rotate-90":"group-hover:translate-x-1")})]},e.id),$=e=>{const n=M.has(e.id);return t.jsxs("div",{className:"mb-2",children:[t.jsxs(pl.button,{whileHover:R?void 0:{scale:1.01},whileTap:R?void 0:{scale:.99},transition:R?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:R?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=e.id,void A(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(C,{className:"w-4 h-4 transition-transform "+(n?"rotate-180":"")})]}),R?n&&t.jsx("div",{className:"pt-2 space-y-1",children:e.children.map(t=>O(t,!0))}):t.jsx(Kr,{initial:!1,children:n&&t.jsx(pl.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:e.children.map(t=>O(t,!0))},`${e.id}-content`)})]},e.id)},W=t.jsxs("div",{className:p,children:[t.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("button",{type:"button",onClick:()=>{d&&F(d)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:B?t.jsx("img",{src:B,alt:a,className:"h-full object-contain"}):t.jsx("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t.jsx("span",{className:"text-white font-bold text-sm",children:l.charAt(0)})})}),t.jsx("h1",{className:"text-lg font-bold text-gray-800",children:l})]}),t.jsx("button",{onClick:i,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t.jsx(y,{className:"w-5 h-5"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:t.jsx("nav",{className:"space-y-2",children:o.map(t=>"folder"===t.type?$(t.data):O(t.data))})}),m&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsx("div",{className:"space-y-2",children:f.map(e=>t.jsxs("button",{onClick:e.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.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"text-sm",children:e.label})]},e.id))})}),b&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:b})]});return t.jsxs(t.Fragment,{children:[R?n&&t.jsx("div",{className:h,style:D,onClick:i,"data-motion-mode":L}):t.jsx(Kr,{initial:!1,children:n&&t.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:h,style:D,onClick:i})}),R?t.jsx("div",{className:u,style:V,"data-motion-mode":L,children:W}):t.jsx(pl.div,{initial:!1,animate:{x:n?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:u,style:V,"data-motion-mode":L,children:W})]})},exports.SingleSelector=({items:n,selectedItem:i=null,onSelectionChange:s,placeholder:o="Seleccionar elemento",searchPlaceholder:r="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,renderItem:h,renderSelectedItem:p})=>{const[m,f]=e.useState(!1),[g,x]=e.useState(""),y=e.useRef(null),v=e.useRef(null),b=e.useRef(null),w=e.useRef([]),j=e.useId();e.useEffect(()=>{const t=t=>{y.current&&!y.current.contains(t.target)&&f(!1)};if(m)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[m]),e.useEffect(()=>{m&&b.current&&b.current.focus()},[m]),e.useEffect(()=>{m||x("")},[m]);const S=e.useMemo(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){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,g),[n,g,d,u,c]),[C,k]=e.useState(-1),T=e.useCallback(()=>{f(!1)},[]),E=t=>{s(t),T(),v.current?.focus()},N=()=>{l||f(!m)},P=e.useCallback(t=>{S.length&&k(e=>((-1===e?1===t?-1:0:e)+t+S.length)%S.length)},[S.length]);e.useEffect(()=>{if(m){const t=i?S.findIndex(t=>t.id===i.id):-1;-1!==t?k(t):S.length?k(t=>t>=0&&t<S.length?t:0):k(-1)}else k(-1)},[m,S,i]),e.useEffect(()=>{if(C<0)return;const t=w.current[C];t?.scrollIntoView({block:"nearest"})},[C]);return w.current=[],t.jsxs("div",{ref:y,className:`relative w-full ${a}`,onKeyDown:t=>{if(l)return;const e=t.target,n=e===v.current;if(!m)return void(!n||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),N()));if("Escape"===t.key)return t.preventDefault(),T(),void v.current?.focus();if(e instanceof HTMLButtonElement)return;const i=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),P(1);break;case"ArrowUp":t.preventDefault(),P(-1);break;case"Enter":C>=0&&C<S.length&&(t.preventDefault(),E(S[C]));break;case" ":case"Spacebar":if(i)break;C>=0&&C<S.length&&(t.preventDefault(),E(S[C]))}},children:[t.jsxs("div",{ref:v,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 ${l?"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 ${m?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:N,role:"button",tabIndex:l?-1:0,"aria-haspopup":"listbox","aria-expanded":m,"aria-disabled":l,children:[t.jsx("div",{className:"flex-1 truncate",children:i?t.jsx("span",{className:"text-gray-900",children:p?p(i):i.name}):t.jsx("span",{className:"text-gray-500",children:o})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(m?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),m&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:b,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:r,value:g,onChange:t=>x(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":j})]})}),t.jsx("div",{id:j,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":C>=0?`${j}-option-${C}`:void 0,children:0===S.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:g?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):S.map((e,n)=>t.jsx("div",{id:`${j}-option-${n}`,ref:t=>{w.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 "+(C===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>E(e),role:"option","aria-selected":i?.id===e.id,onMouseEnter:()=>k(n),children:h?h(e):t.jsx("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},exports.StudentSummaryModal=({open:n,onClose:i,context:s="pass",student:o,generalGroups:r,sections:l=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:h=!1,error:p,onReload:m})=>{const[f,g]=e.useState(!0),[x,y]=e.useState(!1),[v,b]=e.useState("desktop");e.useEffect(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;b(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w="mobile"===v,j="tablet"===v;e.useEffect(()=>{if(h)g(!0),y(!1);else if(c){g(!0),y(!1);const t=new Image;t.onload=()=>{g(!1)},t.onerror=()=>{g(!1),y(!0)},t.src=c}else g(!1),y(!0)},[c,h]),e.useEffect(()=>{n||(g(!0),y(!1))},[n,o.id]);const S=e.useMemo(()=>{const t=r??[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:o.nombres??""},{id:"apellidos",label:"Apellidos",value:o.apellidos??""},{id:"curso",label:"Curso",value:o.curso??""},{id:"codigoFamilia",label:"Código familia",value:o.codigoFamilia??""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:o.transporte??""},{id:"saleSolo",label:"Sale solo",value:o.saleSolo??""},{id:"bajaSolo",label:"Baja solo",value:o.bajaSolo??""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:o.direccionCasa??""},{id:"rfid",label:"RFID",value:o.rfid??""},{id:"idSchoolRegistration",label:"Registro escolar",value:o.idSchoolRegistration??""}]}];return{id:"informacion_general",title:sc.informacion_general,items:t}},[r,o]),C=e.useMemo(()=>`${o.nombres??""} ${o.apellidos??""}`.trim(),[o.nombres,o.apellidos]),k=e=>{switch(e.id){case"ultimas_novedades":return(n=e.items).length?t.jsx("div",{className:"space-y-4",children:n.map(e=>t.jsxs("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:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("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.jsx(Tl,{className:"h-3.5 w-3.5"})," ",e.tipo]}),t.jsxs("time",{dateTime:e.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t.jsx(Pl,{className:"h-3.5 w-3.5"}),Xl(e.fecha)]})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-blue-900",children:[t.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t.jsx("span",{className:"text-sm font-bold",children:e.estado})]}),t.jsxs("p",{className:"text-sm",children:[t.jsx("span",{className:"font-semibold",children:"Responsable:"})," ",e.responsable]}),t.jsx("p",{className:"text-sm leading-relaxed",children:e.descripcion})]}),e.respuesta&&t.jsxs("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.jsx("span",{className:"font-semibold",children:"Respuesta:"})," ",e.respuesta]})]},e.id))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(e=>e.length?t.jsx("div",{className:"grid gap-4",children:e.map(e=>t.jsxs("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:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("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.jsx(yl,{className:"h-5 w-5"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-sm font-semibold text-emerald-900",children:e.nombreCompleto}),t.jsxs("p",{className:"text-xs text-emerald-700",children:[e.tipoDocumento," • ",e.numeroDocumento]})]})]}),t.jsx("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:e.estado})]}),t.jsxs("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.codigoFamilia})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),t.jsxs("dd",{className:"text-sm font-semibold",children:[e.vigencia.desde," – ",e.vigencia.hasta]})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.autorizadoPor})]})]})]},`${e.numeroDocumento}-${e.vigencia.desde}`))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(e.items);case"ultimos_movimientos":return(e=>e.length?t.jsxs("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t.jsx("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:Zl}}),e.map((e,n)=>{const i=_l[e.tipo.toUpperCase()]??Cl;return t.jsxs("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t.jsx("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:Gl,color:Ql,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${Zl}`},children:t.jsx(i,{size:16})}),t.jsxs("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 ${Zl}`,backgroundColor:Gl,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t.jsx("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:e.tipo}),t.jsx("time",{dateTime:e.fecha,children:Xl(e.fecha)})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-slate-700",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-semibold",children:"Lector:"})," ",e.lector.descripcion," (",e.lector.id,")"]}),e.observaciones&&t.jsx("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:e.observaciones})]})]})]},`${e.fecha}-${n}`)})]}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(e.items);case"paradas":return(e=>e.length?t.jsx("div",{className:"student-summary-paradas",style:{display:"grid",gap:w?14:j?16:18},children:e.map((e,n)=>{const i=`Parada ${e.orden??n+1}`,s=e.time??e.horaProgramada;return t.jsxs("article",{style:{borderRadius:24,border:`1px solid ${Zl}`,backgroundColor:Gl,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:w?"flex-start":"center",justifyContent:"space-between",gap:16},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(jl,{size:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:tc},children:i}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:Jl},children:e.address??"Dirección no disponible"})]})]}),s&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:w?"6px 12px":"6px 14px",backgroundColor:Kl,border:`1px solid ${Zl}`,fontSize:12,fontWeight:600,color:Ql},children:[t.jsx(kl,{size:12}),s]})]}),t.jsxs("div",{style:{marginTop:16,display:"grid",gap:w?10:12,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[e.estado&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Estado"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:e.estado})]}),e.horaReal&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Hora real"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:e.horaReal})]}),e.observaciones&&t.jsx("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${Zl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t.jsx("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:e.observaciones})}),e.coordinates&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Coordenadas"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:[e.coordinates.lat.toFixed(6),", ",e.coordinates.lng.toFixed(6)]})]})]})]},e.id??`${n}`)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(e.items);case"recorridos":return(e=>e.length?t.jsx("div",{className:"student-summary-recorridos",style:{display:"grid",gap:w?16:j?18:20},children:e.map(e=>t.jsxs("article",{style:{borderRadius:26,border:`1px solid ${Zl}`,backgroundColor:Gl,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:w?42:46,height:w?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(wl,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:w?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:tc},children:"Recorrido"}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?15:16,fontWeight:600,color:Jl},children:e.nombreRecorrido}),e.tipoRecorrido&&t.jsx("p",{style:{margin:"2px 0 0",fontSize:w?12:13,color:Ql},children:e.tipoRecorrido})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[e.estadoActual&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:e.estadoActual}),e.numeroFlota&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Kl,color:Ql,fontSize:12,fontWeight:600},children:["Flota ",e.numeroFlota]}),e.placaBus&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Kl,color:Ql,fontSize:12,fontWeight:600},children:e.placaBus})]})]}),t.jsxs("div",{style:{marginTop:20,display:"grid",gap:w?12:14,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(e.horaInicio||e.horaFin)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Horario"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:[e.horaInicio??"—"," – ",e.horaFin??"—"]})]}),(e.nombreAuxiliar||e.nombreOperario)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Equipo"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:["Auxiliar: ",e.nombreAuxiliar??"—"]}),t.jsxs("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:Jl},children:["Operario: ",e.nombreOperario??"—"]})]}),e.diasRecorrido&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:tc},children:"Días programados"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:Jl},children:e.diasRecorrido})]})]}),e.ultimoEvento&&t.jsx("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${Zl}`,padding:w?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:e.ultimoEvento})]},e.idRecorrido))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(e.items);default:return null}var n},T=l??[];return t.jsxs(Dl,{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:[t.jsxs(Ll,{className:"px-4 pb-6",children:[p&&t.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t.jsx("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t.jsx("p",{className:"mt-1",children:p}),m&&t.jsx(a,{variant:"secondary",onClick:m,className:"mt-3",children:"Reintentar"})]}),t.jsxs("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:w?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[t.jsxs("div",{className:"student-summary-layout",style:{display:"grid",gap:w?20:j?24:28,gridTemplateColumns:w||j?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t.jsx("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${Zl}`,backgroundColor:Gl,padding:w?20:j?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:w?18:24},children:[t.jsx("div",{style:{position:"relative",width:w?110:j?128:140,height:w?110:j?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${Gl}`,backgroundColor:Kl,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:f?t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Kl},children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t.jsx("img",{src:c,alt:C||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Kl,color:Ql},children:t.jsx(vl,{size:w?48:j?56:60})})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t.jsx("h2",{style:{margin:0,fontSize:w?18:22,fontWeight:600,color:Jl},children:C||"Nombre no disponible"}),o.curso&&t.jsxs("p",{style:{margin:0,fontSize:w?13:15,color:Ql},children:["Curso"," ",t.jsx("span",{style:{fontWeight:600,color:"#4338CA"},children:o.curso})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[o.id&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:Kl,border:`1px solid ${Zl}`,borderRadius:20,padding:w?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:w?200:240},children:[t.jsx("span",{style:{fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:tc,fontWeight:700},children:"Identificador estudiante"}),t.jsx("span",{style:{fontSize:17,fontWeight:600,color:Jl},children:o.id})]}),t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:nc,color:ic,letterSpacing:"0.04em"},children:["Contexto: ",s.toUpperCase()]})]})]})}),t.jsx("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${Zl}`,backgroundColor:Gl,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(e=>{const n=ql[e.id]??Sl,i=w?1:j?2:3,s=Math.min(Math.max(e.items.length,1),i);return t.jsxs("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[t.jsxs("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:w?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:w?0:4},children:[t.jsx("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?46:56,height:w?46:56,borderRadius:18,backgroundColor:ec,color:Gl,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t.jsx(n,{size:w?18:22})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?16:18,fontWeight:600,color:Jl},children:e.title}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:w?13:14,color:Ql},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t.jsx("div",{className:"student-summary-general__grid",style:{display:"grid",gap:w?14:j?18:20,gridTemplateColumns:`repeat(${s}, minmax(0, 1fr))`},children:e.items.map(e=>{const i=Hl[e.id]??n;return t.jsxs("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${Zl}`,backgroundColor:Gl,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:w?16:j?18:20,display:"flex",flexDirection:"column",gap:14},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${Zl}`},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:Kl,color:Ql},children:t.jsx(i,{size:20})}),t.jsx("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:Jl},children:e.title})]}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.rows.map(e=>{const n=Yl[e.id]??Sl;return t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:w?10:12,borderRadius:20,backgroundColor:Kl,border:`1px solid ${Zl}`,padding:w?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?36:40,height:w?36:40,borderRadius:"50%",backgroundColor:Gl,color:Ql,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t.jsx(n,{size:w?14:16})}),t.jsxs("div",{style:{minWidth:0},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:tc},children:e.label}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?13:14,fontWeight:600,color:Jl,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(i=e.value,null==i?"—":"string"==typeof i?i.trim()?i:"—":i)})]})]},e.id);var i})})]},e.id)})})]})})(S)})]}),T.length>0?t.jsx("div",{className:"student-summary-modules",style:{display:"grid",gap:w?18:j?20:24,gridTemplateColumns:w?"1fr":j?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:T.map(e=>{const n=ql[e.id]??Sl,i=e.title??sc[e.id]??"Sección";return t.jsxs("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${Zl}`,backgroundColor:Gl,padding:w?18:j?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?40:46,height:w?40:46,borderRadius:16,backgroundColor:Kl,color:Ql},children:t.jsx(n,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?15:17,fontWeight:600,color:Jl},children:i}),e.meta?.maxItems&&t.jsxs("p",{style:{margin:"6px 0 0",fontSize:12,color:Ql},children:["Mostrando hasta ",e.meta.maxItems," registros recientes."]})]})]}),t.jsx("div",{className:"flex-1",children:k(e)})]},e.id)})}):!h&&!p&&t.jsx("div",{className:"flex h-48 items-center justify-center",children:t.jsx("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t.jsx(Rl,{children:t.jsx(a,{variant:"secondary",onClick:i,children:"Cerrar"})})]})},exports.UploadStudentsExcelButton=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:o,variant:r="primary",clientName:l,onSuccess:c,onError:d})=>{const u=e.useRef(null),[h,p]=e.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(a,{variant:r,onClick:()=>{u.current?.click()},className:o,children:h?"Subiendo...":s}),t.jsx("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:async t=>{const e=t.target.files?.[0];if(!e)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(e.name)))if(0!==e.size)try{p(!0);let t=l;if("85"===i&&!t){const{value:e}=await n.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 p(!1);t=e}const s=await xl(e,i,t);let o="El archivo se ha cargado correctamente";s?.message?o=s.message:"string"==typeof s&&(o=s),await n.fire({title:"¡Carga exitosa!",text:o,icon:"success",confirmButtonText:"OK"}),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=i?.response?.data?.message??("string"==typeof i?.response?.data?i.response.data:void 0)??(i?.response?.statusText?`Error ${i.response.status}: ${i.response.statusText}`:void 0)??e,await n.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),d?.(t)}finally{u.current&&(u.current.value=""),p(!1)}else await n.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else await n.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})}})]})},exports.downloadStudentsExcel=gl,exports.generateTableColumns=function(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=>e[t]??"-"}))},exports.getBackendPrefix=fl,exports.uploadStudentsExcel=xl,exports.useModal=function(t=!1){const[n,i]=e.useState(t);return{open:n,onOpen:e.useCallback(()=>i(!0),[]),onClose:e.useCallback(()=>i(!1),[]),toggle:e.useCallback(()=>i(t=>!t),[]),setOpen:i}};
2
2
  //# sourceMappingURL=index.js.map