1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,i)=>{"use strict";var r=e.r(71645),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=r.useState,a=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!s(e,i)}catch(e){return!0}}var d="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var i=t(),r=n({inst:{value:i,getSnapshot:t}}),s=r[0].inst,d=r[1];return o(function(){s.value=i,s.getSnapshot=t,c(s)&&d({inst:s})},[e,i,t]),a(function(){return c(s)&&d({inst:s}),e(function(){c(s)&&d({inst:s})})},[e]),l(i),i};i.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},2239,(e,t,i)=>{"use strict";t.exports=e.r(55838)},18566,(e,t,i)=>{t.exports=e.r(76562)},52683,e=>{"use strict";let t,i,r,s,n;var a,o=e.i(43476),l=e.i(71645);let c=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],d=new Set(c),u=(e,t,i)=>i>t?t:i<e?e:i,h={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},p={...h,transform:e=>u(0,1,e)},m={...h,default:1},f=e=>Math.round(1e5*e)/1e5,g=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,y=(e,t)=>i=>!!("string"==typeof i&&x.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),v=(e,t,i)=>r=>{if("string"!=typeof r)return r;let[s,n,a,o]=r.match(g);return{[e]:parseFloat(s),[t]:parseFloat(n),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},b={...h,transform:e=>Math.round(u(0,255,e))},w={test:y("rgb","red"),parse:v("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:r=1})=>"rgba("+b.transform(e)+", "+b.transform(t)+", "+b.transform(i)+", "+f(p.transform(r))+")"},k={test:y("#"),parse:function(e){let t="",i="",r="",s="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,i+=i,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:w.transform},j=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),S=j("deg"),N=j("%"),T=j("px"),P=j("vh"),E=j("vw"),A={...N,parse:e=>N.parse(e)/100,transform:e=>N.transform(100*e)},C={test:y("hsl","hue"),parse:v("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:r=1})=>"hsla("+Math.round(e)+", "+N.transform(f(t))+", "+N.transform(f(i))+", "+f(p.transform(r))+")"},M={test:e=>w.test(e)||k.test(e)||C.test(e),parse:e=>w.test(e)?w.parse(e):C.test(e)?C.parse(e):k.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?w.transform(e):C.transform(e),getAnimatableNone:e=>{let t=M.parse(e);return t.alpha=0,M.transform(t)}},V=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,R="number",L="color",D=/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 O(e){let t=e.toString(),i=[],r={color:[],number:[],var:[]},s=[],n=0,a=t.replace(D,e=>(M.test(e)?(r.color.push(n),s.push(L),i.push(M.parse(e))):e.startsWith("var(")?(r.var.push(n),s.push("var"),i.push(e)):(r.number.push(n),s.push(R),i.push(parseFloat(e))),++n,"${}")).split("${}");return{values:i,split:a,indexes:r,types:s}}function F({split:e,types:t}){let i=e.length;return r=>{let s="";for(let n=0;n<i;n++)if(s+=e[n],void 0!==r[n]){let e=t[n];e===R?s+=f(r[n]):e===L?s+=M.transform(r[n]):s+=r[n]}return s}}let I={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(g)?.length||0)+(e.match(V)?.length||0)>0},parse:function(e){return O(e).values},createTransformer:function(e){return F(O(e))},getAnimatableNone:function(e){let t=O(e);return F(t)(t.values.map((e,i)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:M.test(e)?M.getAnimatableNone(e):e)(e,t.split[i])))}},U=new Set(["brightness","contrast","saturate","opacity"]);function B(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=i.match(g)||[];if(!r)return e;let s=i.replace(r,""),n=+!!U.has(t);return r!==i&&(n*=100),t+"("+n+s+")"}let z=/\b([a-z-]*)\(.*?\)/gu,$={...I,getAnimatableNone:e=>{let t=e.match(z);return t?t.map(B).join(" "):e}},_={...I,getAnimatableNone:e=>{let t=I.parse(e);return I.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},W={...h,transform:Math.round},Y={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:m,scaleX:m,scaleY:m,scaleZ:m,skew:S,skewX:S,skewY:S,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:p,originX:A,originY:A,originZ:T,zIndex:W,fillOpacity:p,strokeOpacity:p,numOctaves:W},H={...Y,color:M,backgroundColor:M,outlineColor:M,fill:M,stroke:M,borderColor:M,borderTopColor:M,borderRightColor:M,borderBottomColor:M,borderLeftColor:M,filter:$,WebkitFilter:$,mask:_,WebkitMask:_},X=e=>H[e],G=()=>({translate:0,scale:1,origin:0,originPoint:0}),q=()=>({x:G(),y:G()}),K=()=>({min:0,max:0}),Z=()=>({x:K(),y:K()}),J=e=>!!(e&&e.getVelocity),Q=new Set(["width","height","top","left","right","bottom",...c]),ee=e=>t=>t.test(e),et=[h,T,N,S,E,P,{test:e=>"auto"===e,parse:e=>e}],ei=e=>et.find(ee(e));var er=e.i(47167);let es=()=>{},en=()=>{};er.default;let ea=e=>t=>"string"==typeof t&&t.startsWith(e),eo=ea("--"),el=ea("var(--"),ec=e=>!!el(e)&&ed.test(e.split("/*")[0].trim()),ed=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eu(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let eh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ep=e=>180*e/Math.PI,em=e=>eg(ep(Math.atan2(e[1],e[0]))),ef={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:em,rotateZ:em,skewX:e=>ep(Math.atan(e[1])),skewY:e=>ep(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eg=e=>((e%=360)<0&&(e+=360),e),ex=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ey=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ev={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ex,scaleY:ey,scale:e=>(ex(e)+ey(e))/2,rotateX:e=>eg(ep(Math.atan2(e[6],e[5]))),rotateY:e=>eg(ep(Math.atan2(-e[2],e[0]))),rotateZ:em,rotate:em,skewX:e=>ep(Math.atan(e[4])),skewY:e=>ep(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eb(e){return+!!e.includes("scale")}function ew(e,t){let i,r;if(!e||"none"===e)return eb(t);let s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=ev,r=s;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ef,r=t}if(!r)return eb(t);let n=i[t],a=r[1].split(",").map(ek);return"function"==typeof n?n(a):a[n]}function ek(e){return parseFloat(e.trim())}let ej=e=>e===h||e===T,eS=new Set(["x","y","z"]),eN=c.filter(e=>!eS.has(e)),eT={width:({x:e},{paddingLeft:t="0",paddingRight:i="0",boxSizing:r})=>{let s=e.max-e.min;return"border-box"===r?s:s-parseFloat(t)-parseFloat(i)},height:({y:e},{paddingTop:t="0",paddingBottom:i="0",boxSizing:r})=>{let s=e.max-e.min;return"border-box"===r?s:s-parseFloat(t)-parseFloat(i)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ew(t,"x"),y:(e,{transform:t})=>ew(t,"y")};eT.translateX=eT.x,eT.translateY=eT.y;let eP=e=>e,eE={},eA=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eC(e,t){let i=!1,r=!0,s={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,a=eA.reduce((e,i)=>(e[i]=function(e,t){let i=new Set,r=new Set,s=!1,n=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;
1function c(t){a.has(t)&&(d.schedule(t),e()),l++,t(o)}let d={schedule:(e,t=!1,n=!1)=>{let o=n&&s?i:r;return t&&a.add(e),o.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(o=e,s){n=!0;return}s=!0;let a=i;i=r,r=a,i.forEach(c),t,l=0,i.clear(),s=!1,n&&(n=!1,d.process(e))}};return d}(n,t?i:void 0),e),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=a,f=()=>{let n=eE.useManualTiming,a=n?s.timestamp:performance.now();i=!1,n||(s.delta=r?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,o.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,i&&t&&(r=!1,e(f))};return{schedule:eA.reduce((t,n)=>{let o=a[n];return t[n]=(t,n=!1,a=!1)=>(!i&&(i=!0,r=!0,s.isProcessing||e(f)),o.schedule(t,n,a)),t},{}),cancel:e=>{for(let t=0;t<eA.length;t++)a[eA[t]].cancel(e)},state:s,steps:a}}let{schedule:eM,cancel:eV,state:eR,steps:eL}=eC("u">typeof requestAnimationFrame?requestAnimationFrame:eP,!0),eD=new Set,eO=!1,eF=!1,eI=!1;function eU(){if(eF){let e=Array.from(eD).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>{let t,r=(t=[],eN.forEach(i=>{let r=e.getValue(i);void 0!==r&&(t.push([i,r.get()]),r.set(+!!i.startsWith("scale")))}),t);r.length&&(i.set(e,r),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(([t,i])=>{e.getValue(t)?.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eF=!1,eO=!1,eD.forEach(e=>e.complete(eI)),eD.clear()}function eB(){eD.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eF=!0)})}class ez{constructor(e,t,i,r,s,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=r,this.element=s,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(eD.add(this),eO||(eO=!0,eM.read(eB),eM.resolveKeyframes(eU))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:r}=this;if(null===e[0]){let s=r?.get(),n=e[e.length-1];if(void 0!==s)e[0]=s;else if(i&&t){let r=i.readValue(t,n);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=n),r&&void 0===s&&r.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eD.delete(this)}cancel(){"scheduled"===this.state&&(eD.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let e$=new Set([$,_]);function e_(e,t){let i=X(e);return e$.has(i)||(i=I),i.getAnimatableNone?i.getAnimatableNone(t):void 0}let eW=new Set(["auto","none","0"]);class eY extends ez{constructor(e,t,i,r,s){super(e,t,i,r,s,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let r=e[i];if("string"==typeof r&&ec(r=r.trim())){let s=function e(t,i,r=1){en(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[s,n]=function(e){let t=eh.exec(e);if(!t)return[,];let[,i,r,s]=t;return[`--${i??r}`,s]}(t);if(!s)return;let a=window.getComputedStyle(i).getPropertyValue(s);if(a){let e=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return ec(n)?e(n,i,r+1):n}(r,t.current);void 0!==s&&(e[i]=s),i===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Q.has(i)||2!==e.length)return;let[r,s]=e,n=ei(r),a=ei(s);if(eu(r)!==eu(s)&&eT[i]){this.needsMeasurement=!0;return}if(n!==a)if(ej(n)&&ej(a))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else eT[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&i.push(t);i.length&&function(e,t,i){let r,s=0;for(;s<e.length&&!r;){let t=e[s];"string"==typeof t&&!eW.has(t)&&O(t).values.length&&(r=e[s]),s++}if(r&&i)for(let s of t)e[s]=e_(i,r)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eT[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(i,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:i}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let s=i.length-1,n=i[s];i[s]=eT[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,i])=>{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}let eH=e=>1e3*e;function eX(e,t){-1===e.indexOf(t)&&e.push(t)}function eG(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}class eq{constructor(){this.subscriptions=[]}add(e){return eX(this.subscriptions,e),()=>eG(this.subscriptions,e)}notify(e,t,i){let r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,i);else for(let s=0;s<r;s++){let r=this.subscriptions[s];r&&r(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eK(e,t,i){t.startsWith("--")?e.style.setProperty(t,i):e.style[t]=i}function eZ(e){let t;return()=>(void 0===t&&(t=e()),t)}let eJ={};function eQ(e,t){let i=eZ(e);return()=>eJ[t]??i()}let e0=eQ(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),e1=e=>null!==e;function e2(e,{repeat:t,repeatType:i="loop"},r,s=1){let n=e.filter(e1),a=s<0||t&&"loop"!==i&&t%2==1?0:n.length-1;return a&&void 0!==r?r:n[a]}class e5{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let e4={layout:0,mainThread:0,waapi:0},e3=e=>Array.isArray(e)&&"number"==typeof e[0],e6=eQ(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e9=(e,t,i=10)=>{let r="",s=Math.max(Math.round(t/i),2);for(let t=0;t<s;t++)r+=Math.round(1e4*e(t/(s-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},e8=([e,t,i,r])=>`cubic-bezier(${e}, ${t}, ${i}, ${r})`,e7={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e8([0,.65,.55,1]),circOut:e8([.55,0,1,.45]),backIn:e8([.31,.01,.66,-.59]),backOut:e8([.33,1.53,.69,.99])};function te(e){return"function"==typeof e&&"applyToOptions"in e}class tt extends e5{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:i,keyframes:r,pseudoElement:s,allowFlatten:n=!1,finalKeyframe:a,onComplete:o}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,en("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return te(e)&&e6()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,i,{delay:r=0,duration:s=300,repeat:n=0,repeatType:a="loop",ease:o="easeOut",times:l}={},c){let d={[t]:i};l&&(d.offset=l);let u=function e(t,i){if(t)return"function"==typeof t?e6()?e9(t,i):"ease-out":e3(t)?e8(t):Array.isArray(t)?t.map(t=>e(t,i)||e7.easeOut):e7[t]}(o,s);Array.isArray(u)&&(d.easing=u);let h={delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:n+1,direction:"reverse"===a?"alternate":"normal"};c&&(h.pseudoElement=c);let p=e.animate(d,h);return p}(t,i,r,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let e=e2(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eK(t,i,e),this.animation.cancel()}o?.(),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(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eH(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:i,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&e0())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),i&&(this.animation.rangeEnd=i),eP):r(this)}}let ti=new Set(["opacity","clipPath","filter","transform"]),{schedule:tr}=eC(queueMicrotask,!1);function ts(){t=void 0}let tn={now:()=>(void 0===t&&tn.set(eR.isProcessing||eE.useManualTiming?eR.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(ts)}};class ta{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tn.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=tn.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eq);let i=this.events[e].add(t);return"change"===e?()=>{i(),eM.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return n&&n.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=tn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function to(e,t){return new ta(e,t)}let tl=[...et,M,I],tc=new WeakMap;function td(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}let th=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tp=["initial",...th];function tm(e){return td(e.animate)||tp.some(t=>tu(e[t]))}function tf(e){return!!(tm(e)||e.variants)}let tg={current:null},tx={current:!1},ty="u">typeof window;function tv(e){let t=[{},{}];
1return e?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function tb(e,t,i,r){if("function"==typeof t){let[s,n]=tv(r);t=t(void 0!==i?i:e.custom,s,n)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[s,n]=tv(r);t=t(void 0!==i?i:e.custom,s,n)}return t}let tw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tk={};class tj{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:n,visualState:a},o={}){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=ez,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=()=>{let e=tn.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eM.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=o,this.blockInitialAnimation=!!n,this.isControllingVariants=tm(t),this.isVariantNode=tf(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==l[e]&&J(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,tc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tx.current||function(){if(tx.current=!0,ty)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tg.current=e.matches;e.addEventListener("change",t),t()}else tg.current=!1}(),this.shouldReduceMotion=tg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eV(this.notifyUpdate),eV(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let i;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ti.has(e)&&this.current instanceof HTMLElement){let{factory:i,keyframes:r,times:s,ease:n,duration:a}=t.accelerate,o=new tt({element:this.current,name:e,keyframes:r,times:s,ease:n,duration:eH(a)}),l=i(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let r=d.has(e);r&&this.onBindTransform&&this.onBindTransform();let s=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eM.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tk){let t=tk[e];if(!t)continue;let{isEnabled:i,Feature:r}=t;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];
1t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tw.length;t++){let i=tw[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=function(e,t,i){for(let r in t){let s=t[r],n=i[r];if(J(s))e.addValue(r,s);else if(J(n))e.addValue(r,to(s,{owner:e}));else if(n!==s)if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(s):t.hasAnimated||t.set(s)}else{let t=e.getStaticValue(r);e.addValue(r,to(void 0!==t?t:s,{owner:e}))}}for(let r in i)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=to(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let i=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=i){let r,s;if("string"==typeof i&&(r=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r)||(s=i,/^0[^.\s]+$/u.test(s))))i=parseFloat(i);else{let r;r=i,!tl.find(ee(r))&&I.test(t)&&(i=e_(e,t))}this.setBaseTarget(e,J(i)?i.get():i)}return J(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let r=tb(this.props,i,this.presenceContext?.custom);r&&(t=r[e])}if(i&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||J(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new eq),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tr.render(this.render)}}class tS extends tj{constructor(){super(...arguments),this.KeyframeResolver=eY}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tN(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tT=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tE=c.length;function tA(e,t,i){let{style:r,vars:s,transformOrigin:n}=e,a=!1,o=!1;for(let e in t){let i=t[e];if(d.has(e)){a=!0;continue}if(eo(e)){s[e]=i;continue}{let t=tT(i,Y[e]);e.startsWith("origin")?(o=!0,n[e]=t):r[e]=t}}if(!t.transform&&(a||i?r.transform=function(e,t,i){let r="",s=!0;for(let n=0;n<tE;n++){let a=c[n],o=e[a];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!a.startsWith("scale");else{let e=parseFloat(o);l=a.startsWith("scale")?1===e:0===e}if(!l||i){let e=tT(o,Y[a]);if(!l){s=!1;let t=tP[a]||a;r+=`${t}(${e}) `}i&&(t[a]=e)}}return r=r.trim(),i?r=i(t,s?"":r):s&&(r="none"),r}(t,e.transform,i):r.transform&&(r.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:i=0}=n;r.transformOrigin=`${e} ${t} ${i}`}}let tC={offset:"stroke-dashoffset",array:"stroke-dasharray"},tM={offset:"strokeDashoffset",array:"strokeDasharray"},tV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tR(e,{attrX:t,attrY:i,attrScale:r,pathLength:s,pathSpacing:n=1,pathOffset:a=0,...o}
1,l,c,d){if(tA(e,o,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:u,style:h}=e;for(let e of(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),tV))void 0!==u[e]&&(h[e]=u[e],delete u[e]);void 0!==t&&(u.x=t),void 0!==i&&(u.y=i),void 0!==r&&(u.scale=r),void 0!==s&&function(e,t,i=1,r=0,s=!0){e.pathLength=1;let n=s?tC:tM;e[n.offset]=`${-r}`,e[n.array]=`${t} ${i}`}(u,s,n,a,!1)}let tL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tD=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tO(e,{style:t,vars:i},r,s){let n,a=e.style;for(n in t)a[n]=t[n];for(n in s?.applyProjectionStyles(a,r),i)a.setProperty(n,i[n])}function tF(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tI={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!T.test(e))return e;else e=parseFloat(e);let i=tF(e,t.target.x),r=tF(e,t.target.y);return`${i}% ${r}%`}},tU=(e,t,i)=>e+(t-e)*i,tB={borderRadius:{...tI,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tI,borderTopRightRadius:tI,borderBottomLeftRadius:tI,borderBottomRightRadius:tI,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let r=I.parse(e);if(r.length>5)return e;let s=I.createTransformer(e),n=+("number"!=typeof r[0]),a=i.x.scale*t.x,o=i.y.scale*t.y;r[0+n]/=a,r[1+n]/=o;let l=tU(a,o,.5);return"number"==typeof r[2+n]&&(r[2+n]/=l),"number"==typeof r[3+n]&&(r[3+n]/=l),s(r)}}};function tz(e,{layout:t,layoutId:i}){return d.has(e)||e.startsWith("origin")||(t||void 0!==i)&&(!!tB[e]||"opacity"===e)}function t$(e,t,i){let r=e.style,s=t?.style,n={};if(!r)return n;for(let t in r)(J(r[t])||s&&J(s[t])||tz(t,e)||i?.getValue(t)?.liveStyle!==void 0)&&(n[t]=r[t]);return n}function t_(e,t,i){let r=t$(e,t,i);for(let i in e)(J(e[i])||J(t[i]))&&(r[-1!==c.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return r}class tW extends tS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(d.has(t)){let e=X(t);return e&&e.default||0}return t=tL.has(t)?t:tN(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return t_(e,t,i)}build(e,t,i){tR(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,r){for(let i in tO(e,t,void 0,r),t.attrs)e.setAttribute(tL.has(i)?i:tN(i),t.attrs[i])}mount(e){this.isSVGTag=tD(e.tagName),super.mount(e)}}function tY({top:e,left:t,right:i,bottom:r}){return{x:{min:t,max:i},y:{min:e,max:r}}}function tH(e){return void 0===e||1===e}function tX({scale:e,scaleX:t,scaleY:i}){return!tH(e)||!tH(t)||!tH(i)}function tG(e){return tX(e)||tq(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tq(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function tK(e,t,i,r,s){return void 0!==s&&(e=r+s*(e-r)),r+i*(e-r)+t}function tZ(e,t=0,i=1,r,s){e.min=tK(e.min,t,i,r,s),e.max=tK(e.max,t,i,r,s)}function tJ(e,{x:t,y:i}){tZ(e.x,t.translate,t.scale,t.originPoint),tZ(e.y,i.translate,i.scale,i.originPoint)}function tQ(e,t){e.min=e.min+t,e.max=e.max+t}function t0(e,t,i,r,s=.5){let n=tU(e.min,e.max,s);tZ(e,t,i,n,r)}function t1(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t2(e,t,i){let r=i??e;t0(e.x,t1(t.x,r.x),t.scaleX,t.scale,t.originX),t0(e.y,t1(t.y,r.y),t.scaleY,t.scale,t.originY)}function t5(e,t){return tY(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class t4 extends tS{constructor(){super(...arguments),this.type="html",this.renderInstance=tO}readValueFromInstance(e,t){if(d.has(t))return this.projection?.isProjecting?eb(t):((e,t)=>{let{transform:i="none"}=getComputedStyle(e);return ew(i,t)})(e,t);{let i=window.getComputedStyle(e),r=(eo(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t5(e,t)}build(e,t,i){tA(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return t$(e,t,i)}}let t3=["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 t6(e){if("string"!=typeof e||e.includes("-"));else if(t3.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let t9=(0,l.createContext)({}),t8=(0,l.createContext)({strict:!1}),t7=(0,l.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ie=(0,l.createContext)({});function it(e){return Array.isArray(e)?e.join(" "):e}let ii=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ir(e,t,i){for(let r in t)J(t[r])||tz(r,i)||(e[r]=t[r])}let is=()=>({...ii(),attrs:{}}),ia=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 io(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ia.has(e)}let il=e=>!io(e);try{a=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default,"function"==typeof a&&(il=e=>e.startsWith("on")?!io(e):a(e))}catch{}function ic(e){return J(e)?e.get():e}let id=(0,l.createContext)(null);function iu(e){let t=(0,l.useRef)(null);return null===t.current&&(t.current=e()),t.current}let ih=e=>(t,i)=>{let r=(0,l.useContext)(ie),s=(0,l.useContext)(id),n=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},i,r,s){return{latestValues:function(e,t,i,r){let s={},n=r(e,{});for(let e in n)s[e]=ic(n[e]);let{initial:a,animate:o}=e,l=tm(e),c=tf(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===o&&(o=t.animate));let d=!!i&&!1===i.initial,u=(d=d||!1===a)?o:a;if(u&&"boolean"!=typeof u&&!td(u)){let t=Array.isArray(u)?u:[u];for(let i=0;i<t.length;i++){let r=tb(e,t[i]);if(r){let{transitionEnd:e,transition:t,...i}=r;for(let e in i){let t=i[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(s[e]=t)}for(let t in e)s[t]=e[t]}}}return s}(i,r,s,e),renderState:t()}})(e,t,r,s);return i?n():iu(n)},ip=ih({scrapeMotionValuesFromProps:t$,createRenderState:ii}),im=ih({scrapeMotionValuesFromProps:t_,createRenderState:is}),ig={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"]},ix=!1;function iy(){return!function(){if(ix)return;let e={};for(let t in ig)e[t]={isEnabled:e=>ig[t].some(t=>!!e[t])};tk=e,ix=!0}(),tk}let iv=Symbol.for("motionComponentSymbol"),ib="data-"+tN("framerAppearId"),iw=(0,l.createContext)({});function ik(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let ij="u">typeof window?l.useLayoutEffect:l.useEffect;function iS(e,{forwardMotionProps:t=!1,type:i}={},r,s){r&&function(e){let t=iy();for(let i in e)t[i]={...t[i],...e[i]};tk=t}(r);let n=i?"svg"===i:t6(e),a=n?im:ip;function c(i,r){var c;let d,u,h,p={...(0,l.useContext)(t7),...i,layoutId:function({layoutId:e}){let t=(0,l.useContext)(t9).id;return t&&void 0!==e?t+"-"+e:e}(i)},{isStatic:m}=p,f=function(e){let{initial:t,animate:i}=function(e,t){if(tm(e)){let{initial:t,animate:i}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,l.useContext)(ie));return(0,l.useMemo)(()=>({initial:t,animate:i}),[it(t),it(i)])}(i),g=a(i,m);if(!m&&"u">typeof window){(0,l.useContext)(t8).strict;let t=function(e){let{drag:t,layout:i}=iy();if(!t&&!i)return{};let r={...t,...i};return{MeasureLayout:t?.isEnabled(e)||i?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
1(p);d=t.MeasureLayout,f.visualElement=function(e,t,i,r,s,n){let{visualElement:a}=(0,l.useContext)(ie),o=(0,l.useContext)(t8),c=(0,l.useContext)(id),d=(0,l.useContext)(t7),u=d.reducedMotion,h=d.skipAnimations,p=(0,l.useRef)(null),m=(0,l.useRef)(!1);r=r||o.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u,skipAnimations:h,isSVG:n}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let f=p.current,g=(0,l.useContext)(iw);f&&!f.projection&&s&&("html"===f.type||"svg"===f.type)&&function(e,t,i,r){let{layoutId:s,layout:n,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:s,layout:n,alwaysMeasureLayout:!!a||o&&ik(o),visualElement:e,animationType:"string"==typeof n?n:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}(p.current,i,s,g);let x=(0,l.useRef)(!1);(0,l.useInsertionEffect)(()=>{f&&x.current&&f.update(i,c)});let y=i[ib],v=(0,l.useRef)(!!y&&"u">typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ij(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),(0,l.useEffect)(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),f.enteringChildren=void 0)}),f}(e,g,p,s,t.ProjectionNode,n)}return(0,o.jsxs)(ie.Provider,{value:f,children:[d&&f.visualElement?(0,o.jsx)(d,{visualElement:f.visualElement,...p}):null,function(e,t,i,{latestValues:r},s,n=!1,a){let o=(a??t6(e)?function(e,t,i,r){let s=(0,l.useMemo)(()=>{let i=is();return tR(i,t,tD(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};ir(t,e.style,e),s.style={...t,...s.style}}return s}:function(e,t){let i,r,s={},n=(i=e.style||{},ir(r={},i,e),Object.assign(r,function({transformTemplate:e},t){return(0,l.useMemo)(()=>{let i=ii();return tA(i,t,e),Object.assign({},i.vars,i.style)},[t])}(e,t)),r);return e.drag&&!1!==e.dragListener&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s})(t,r,s,e),c=function(e,t,i){let r={};for(let s in e)("values"!==s||"object"!=typeof e.values)&&!J(e[s])&&(il(s)||!0===i&&io(s)||!t&&!io(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}(t,"string"==typeof e,n),d=e!==l.Fragment?{...c,...o,ref:i}:{},{children:u}=t,h=(0,l.useMemo)(()=>J(u)?u.get():u,[u]);return(0,l.createElement)(e,{...d,children:h})}(e,i,(c=f.visualElement,u=(0,l.useRef)(r),(0,l.useInsertionEffect)(()=>{u.current=r}),h=(0,l.useRef)(null),(0,l.useCallback)(e=>{e&&g.onMount?.(e);let t=u.current;if("function"==typeof t)if(e){let i=t(e);"function"==typeof i&&(h.current=i)}else h.current?(h.current(),h.current=null):t(e);else t&&(t.current=e);c&&(e?c.mount(e):c.unmount())},[c])),g,m,t,n)]})}c.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let d=(0,l.forwardRef)(c);return d[iv]=e,d}class iN{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iT(e,t,i){let r=e.getProps();return tb(r,t,void 0!==i?i:r.custom,e)}function iP(e,t){if(e?.inherit&&t){let{inherit:i,...r}=e;return{...t,...r}}return e}function iE(e,t){let i=e?.[t]??e?.default??e;return i!==e?iP(i,e):i}let iA=e=>Array.isArray(e);function iC(e,t){let i=e.getValue("willChange");if(J(i)&&i.add)return i.add(t);if(!i&&eE.WillChange){let i=new eE.WillChange("auto");e.addValue("willChange",i),i.add(t)}}let iM=(e,t)=>i=>t(e(i)),iV=(...e)=>e.reduce(iM);function iR(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function iL(e,t){return i=>i>0?t:e}let iD=(e,t,i)=>{let r=e*e,s=i*(t*t-r)+r;return s<0?0:Math.sqrt(s)},iO=[k,w,C];function iF(e){let t=iO.find(t=>t.test(e));if(es(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(e);return t===C&&(i=function({hue:e,saturation:t,lightness:i,alpha:r}){e/=360,i/=100;let s=0,n=0,a=0;if(t/=100){let r=i<.5?i*(1+t):i+t-i*t,o=2*i-r;s=iR(o,r,e+1/3),n=iR(o,r,e),a=iR(o,r,e-1/3)}else s=n=a=i;return{red:Math.round(255*s),green:Math.round(255*n),blue:Math.round(255*a),alpha:r}}(i)),i}let iI=(e,t)=>{let i=iF(e),r=iF(t);if(!i||!r)return iL(e,t);let s={...i};return e=>(s.red=iD(i.red,r.red,e),s.green=iD(i.green,r.green,e),s.blue=iD(i.blue,r.blue,e),s.alpha=tU(i.alpha,r.alpha,e),w.transform(s))},iU=new Set(["none","hidden"]);function iB(e,t){return i=>tU(e,t,i)}function iz(e){return"number"==typeof e?iB:"string"==typeof e?ec(e)?iL:M.test(e)?iI:iW:Array.isArray(e)?i$:"object"==typeof e?M.test(e)?iI:i_:iL}function i$(e,t){let i=[...e],r=i.length,s=e.map((e,i)=>iz(e)(e,t[i]));return e=>{for(let t=0;t<r;t++)i[t]=s[t](e);return i}}function i_(e,t){let i={...e,...t},r={};for(let s in i)void 0!==e[s]&&void 0!==t[s]&&(r[s]=iz(e[s])(e[s],t[s]));return e=>{for(let t in r)i[t]=r[t](e);return i}}let iW=(e,t)=>
1{let i=I.createTransformer(t),r=O(e),s=O(t);if(!(r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length))return es(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),iL(e,t);if(iU.has(e)&&!s.values.length||iU.has(t)&&!r.values.length)return iU.has(e)?i=>i<=0?e:t:i=>i>=1?t:e;return iV(i$(function(e,t){let i=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let n=t.types[s],a=e.indexes[n][r[n]],o=e.values[a]??0;i[s]=o,r[n]++}return i}(r,s),s.values),i)};function iY(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?tU(e,t,i):iz(e)(e,t)}let iH=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eM.update(t,e),stop:()=>eV(t),now:()=>eR.isProcessing?eR.timestamp:tn.now()}};function iX(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}let iG=.01,iq=2,iK=.005,iZ=.5;function iJ(e,t){return e*Math.sqrt(1-t*t)}let iQ=["duration","bounce"],i0=["stiffness","damping","mass"];function i1(e,t){return t.some(t=>void 0!==e[t])}function i2(e=.3,t=.3){let i,r,s,n,a,o,l="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:c,restDelta:d}=l,h=l.keyframes[0],p=l.keyframes[l.keyframes.length-1],m={done:!1,value:h},{stiffness:f,damping:g,mass:x,duration:y,velocity:v,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!i1(e,i0)&&i1(e,iQ))if(t.velocity=0,e.visualDuration){let i=2*Math.PI/(1.2*e.visualDuration),r=i*i,s=2*u(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:s}}else{let i=function({duration:e=800,bounce:t=.3,velocity:i=0,mass:r=1}){let s,n;es(e<=eH(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=u(.05,1,a),e=u(.01,10,e/1e3),a<1?(s=t=>{let r=t*a,s=r*e;return .001-(r-i)/iJ(t,a)*Math.exp(-s)},n=t=>{let r=t*a*e,n=Math.pow(a,2)*Math.pow(t,2)*e,o=Math.exp(-r),l=iJ(Math.pow(t,2),a);return(r*i+i-n)*o*(-s(t)+.001>0?-1:1)/l}):(s=t=>-.001+Math.exp(-t*e)*((t-i)*e+1),n=t=>e*e*(i-t)*Math.exp(-t*e));let o=function(e,t,i){let r=i;for(let i=1;i<12;i++)r-=e(r)/t(r);return r}(s,n,5/e);if(e=eH(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=v||0,k=g/(2*Math.sqrt(f*x)),j=p-h,S=Math.sqrt(f/x)/1e3,N=5>Math.abs(j);if(c||(c=N?iG:iq),d||(d=N?iK:iZ),k<1)s=iJ(S,k),n=(w+k*S*j)/s,i=e=>p-Math.exp(-k*S*e)*(n*Math.sin(s*e)+j*Math.cos(s*e)),a=k*S*n+j*s,o=k*S*j-n*s,r=e=>Math.exp(-k*S*e)*(a*Math.sin(s*e)+o*Math.cos(s*e));else if(1===k){i=e=>p-Math.exp(-S*e)*(j+(w+S*j)*e);let e=w+S*j;r=t=>Math.exp(-S*t)*(S*e*t-w)}else{let e=S*Math.sqrt(k*k-1);i=t=>{let i=Math.exp(-k*S*t),r=Math.min(e*t,300);return p-i*((w+k*S*j)*Math.sinh(r)+e*j*Math.cosh(r))/e};let t=(w+k*S*j)/e,s=k*S*t-j*e,n=k*S*j-t*e;r=t=>{let i=Math.exp(-k*S*t),r=Math.min(e*t,300);return i*(s*Math.sinh(r)+n*Math.cosh(r))}}let T={calculatedDuration:b&&y||null,velocity:e=>eH(r(e)),next:e=>{if(!b&&k<1){let t=Math.exp(-k*S*e),i=Math.sin(s*e),r=Math.cos(s*e),l=p-t*(n*i+j*r);return m.done=Math.abs(eH(t*(a*i+o*r)))<=c&&Math.abs(p-l)<=d,m.value=m.done?p:l,m}let t=i(e);return b?m.done=e>=y:m.done=Math.abs(eH(r(e)))<=c&&Math.abs(p-t)<=d,m.value=m.done?p:t,m},toString:()=>{let e=Math.min(iX(T),2e4),t=e9(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function i5(e,t,i){var r,s;let n=Math.max(t-5,0);return r=i-e(n),(s=t-n)?1e3/s*r:0}function i4({keyframes:e,velocity:t=0,power:i=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:l,restDelta:c=.5,restSpeed:d}){let u,h,p=e[0],m={done:!1,value:p},f=i*t,g=p+f,x=void 0===a?g:a(g);x!==g&&(f=x-p);let y=e=>-f*Math.exp(-e/r),v=e=>x+y(e),b=e=>{let t=y(e),i=v(e);m.done=Math.abs(t)<=c,m.value=m.done?x:i},w=e=>{let t;if(t=m.value,void 0!==o&&t<o||void 0!==l&&t>l){var i;u=e,h=i2({keyframes:[m.value,(i=m.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:i5(v,e,m.value),damping:s,stiffness:n,restDelta:c,restSpeed:d})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;
1return(h||void 0!==u||(t=!0,b(e),w(e)),void 0!==u&&e>=u)?h.next(e-u):(t||b(e),m)}}}i2.applyToOptions=e=>{let t=function(e,t=100,i){let r=i({...e,keyframes:[0,t]}),s=Math.min(iX(r),2e4);return{type:"keyframes",ease:e=>r.next(s*e).value/t,duration:s/1e3}}(e,100,i2);return e.ease=t.ease,e.duration=eH(t.duration),e.type="keyframes",e};let i3=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function i6(e,t,i,r){return e===t&&i===r?eP:s=>0===s||1===s?s:i3(function(e,t,i,r,s){let n,a,o=0;do(n=i3(a=t+(i-t)/2,r,s)-e)>0?i=a:t=a;while(Math.abs(n)>1e-7&&++o<12)return a}(s,0,1,e,i),t,r)}let i9=i6(.42,0,1,1),i8=i6(0,0,.58,1),i7=i6(.42,0,.58,1),re=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rt=e=>t=>1-e(1-t),ri=i6(.33,1.53,.69,.99),rr=rt(ri),rs=re(rr),rn=e=>e>=1?1:(e*=2)<1?.5*rr(e):.5*(2-Math.pow(2,-10*(e-1))),ra=e=>1-Math.sin(Math.acos(e)),ro=rt(ra),rl=re(ra),rc={linear:eP,easeIn:i9,easeInOut:i7,easeOut:i8,circIn:ra,circInOut:rl,circOut:ro,backIn:rr,backInOut:rs,backOut:ri,anticipate:rn},rd=e=>{if(e3(e)){en(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,i,r,s]=e;return i6(t,i,r,s)}return"string"==typeof e?(en(void 0!==rc[e],`Invalid easing type '${e}'`,"invalid-easing-type"),rc[e]):e},ru=(e,t,i)=>{let r=t-e;return 0===r?1:(i-e)/r};function rh({duration:e=300,keyframes:t,times:i,ease:r="easeInOut"}){var s;let n,a=Array.isArray(r)&&"number"!=typeof r[0]?r.map(rd):rd(r),o={done:!1,value:t[0]},l=function(e,t,{clamp:i=!0,ease:r,mixer:s}={}){let n=e.length;if(en(n===t.length,"Both input and output ranges must be the same length","range-length"),1===n)return()=>t[0];if(2===n&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,i){let r=[],s=i||eE.mix||iY,n=e.length-1;for(let i=0;i<n;i++){let n=s(e[i],e[i+1]);t&&(n=iV(Array.isArray(t)?t[i]||eP:t,n)),r.push(n)}return r}(t,r,s),l=o.length,c=i=>{if(a&&i<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(i<e[r+1]);r++);let s=ru(e[r],e[r+1],i);return o[r](s)};return i?t=>c(u(e[0],e[n-1],t)):c}((s=i&&i.length===t.length?i:(!function(e,t){let i=e[e.length-1];for(let r=1;r<=t;r++){let s=ru(0,t,r);e.push(tU(i,1,s))}}(n=[0],t.length-1),n),s.map(t=>t*e)),t,{ease:Array.isArray(a)?a:t.map(()=>a||i7).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}let rp={decay:i4,inertia:i4,tween:rh,keyframes:rh,spring:i2};function rm(e){"string"==typeof e.type&&(e.type=rp[e.type])}let rf=e=>e/100;class rg extends e5{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tn.now()&&this.tick(tn.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},e4.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;rm(e);let{type:t=rh,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,o=t||rh;o!==rh&&"number"!=typeof a[0]&&(this.mixKeyframes=iV(rf,iY(a[0],a[1])),a=[0,100]);let l=o({...e,keyframes:a});"mirror"===s&&(this.mirroredGenerator=o({...e,keyframes:[...a].reverse(),velocity:-n})),null===l.calculatedDuration&&(l.calculatedDuration=iX(l));let{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:i,totalDuration:r,mixKeyframes:s,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:o}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let x=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>r;
1this.currentTime=Math.max(x,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=i;if(d){let e=Math.min(this.currentTime,r)/a,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(i=1-i,p&&(i-=p/a)):"mirror"===h&&(b=n)),v=u(0,1,i)*a}let w=y?{done:!1,value:c[0]}:b.next(v);s&&!y&&(w.value=s(w.value));let{done:k}=w;y||null===o||(k=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return j&&m!==i4&&(w.value=e2(c,this.options,g,this.speed)),f&&f(w.value),j&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=eH(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i5(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tn.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=iH,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),"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(tn.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,e4.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let rx={anticipate:rn,backInOut:rs,circInOut:rl};class ry extends tt{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in rx&&(e.ease=rx[e.ease])}(e),rm(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:i,onComplete:r,element:s,...n}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let a=new rg({...n,autoplay:!1}),o=Math.max(10,tn.now()-this.startTime),l=u(0,10,o-10),c=a.sample(o).value,{name:d}=this.options;s&&d&&eK(s,d,c),t.setWithVelocity(a.sample(Math.max(0,o-l)).value,c,l),a.stop()}}let rv=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(I.test(e)||"0"===e)&&!e.startsWith("url("));function rb(e){e.duration=0,e.type="keyframes"}let rw=new Set(["opacity","clipPath","filter","transform"]),rk=eZ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rj extends e5{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:o,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tn.now();const u={autoplay:e,delay:t,type:i,repeat:r,repeatDelay:s,repeatType:n,name:o,motionValue:l,element:c,...d},h=c?.KeyframeResolver||ez;this.keyframeResolver=new h(a,(e,t,i)=>this.onKeyframesResolved(e,t,u,!i),o,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,i,r){this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:o,isHandoff:l,onUpdate:c}=i;this.resolvedAt=tn.now();let d=!0;!function(e,t,i,r){let s=e[0];if(null===s)return!1;if("display"===t||"visibility"===t)return!0;let n=e[e.length-1],a=rv(s,t),o=rv(n,t);return es(a===o,`You are trying to animate ${t} from "${s}" to "${n}". "${a?n:s}" is not an animatable value.`,"value-not-animatable"),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||("spring"===i||te(i))&&r)}(e,s,n,a)&&(d=!1,(eE.instantAnimations||!o)&&c?.(e2(e,i,t)),e[0]=e[e.length-1],rb(i),i.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...i,keyframes:e},h=d&&!l&&function(e){let{motionValue:t,name:i,repeatDelay:r,repeatType:s,damping:n,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
1let{onUpdate:o,transformTemplate:l}=t.owner.getProps();return rk()&&i&&rw.has(i)&&("transform"!==i||!l)&&!o&&!r&&"mirror"!==s&&0!==n&&"inertia"!==a}(u),p=u.motionValue?.owner?.current,m=h?new ry({...u,element:p}):new rg(u);m.finished.then(()=>{this.notifyFinished()}).catch(eP),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(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eI=!0,eB(),eU(),eI=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let rS={type:"spring",stiffness:500,damping:25,restSpeed:10},rN={type:"keyframes",duration:.8},rT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rP=e=>null!==e,rE=(e,t,i,r={},s,n)=>a=>{let o=iE(r,e)||{},l=o.delay||r.delay||0,{elapsed:c=0}=r;c-=eH(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:n?void 0:s};!function({when:e,delay:t,delayChildren:i,staggerChildren:r,staggerDirection:s,repeat:n,repeatType:a,repeatDelay:o,from:l,elapsed:c,...d}){return!!Object.keys(d).length}(o)&&Object.assign(u,((e,{keyframes:t})=>t.length>2?rN:d.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:rS:rT)(e,u)),u.duration&&(u.duration=eH(u.duration)),u.repeatDelay&&(u.repeatDelay=eH(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(rb(u),0===u.delay&&(h=!0)),(eE.instantAnimations||eE.skipAnimations||s?.shouldSkipAnimations)&&(h=!0,rb(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,h&&!n&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:i="loop"},r){let s=e.filter(rP),n=t&&"loop"!==i&&t%2==1?0:s.length-1;return s[n]}(u.keyframes,o);if(void 0!==e)return void eM.update(()=>{u.onUpdate(e),u.onComplete()})}return o.isSync?new rg(u):new rj(u)};function rA(e,t,{delay:i=0,transitionOverride:r,type:s}={}){let{transition:n,transitionEnd:a,...o}=t,l=e.getDefaultTransition();n=n?iP(n,l):l;let c=n?.reduceMotion;r&&(n=r);let d=[],u=s&&e.animationState&&e.animationState.getState()[s];for(let t in o){let r=e.getValue(t,e.latestValues[t]??null),s=o[t];if(void 0===s||u&&function({protectedKeys:e,needsAnimating:t},i){let r=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,r}(u,t))continue;let a={delay:i,...iE(n||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating&&!Array.isArray(s)&&s===l&&!a.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let i=e.props[ib];if(i){let e=window.MotionHandoffAnimation(i,t,eM);null!==e&&(a.startTime=e,h=!0)}}iC(e,t);let p=c??e.shouldReduceMotion;r.start(rE(t,r,s,p&&Q.has(t)?{type:!1}:a,e,h));let m=r.animation;m&&d.push(m)}if(a){let t=()=>eM.update(()=>{a&&function(e,t){let{transitionEnd:i={},transition:r={},...s}=iT(e,t)||{};for(let t in s={...s,...i}){var n;let i=iA(n=s[t])?n[n.length-1]||0:n;e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,to(i))}}(e,a)});d.length?Promise.all(d).then(t):t()}return d}function rC(e,t,i,r=0,s=1){let n=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,o=(a-1)*r;return"function"==typeof i?i(n,a):1===s?n*r:o-n*r}function rM(e,t,i={}){let r=iT(e,t,"exit"===i.type?e.presenceContext?.custom:void 0),{transition:s=e.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(s=i.transitionOverride);let n=r?()=>Promise.all(rA(e,r,i)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:n=0,staggerChildren:a,staggerDirection:o}=s;return function(e,t,i=0,r=0,s=0,n=1,a){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(rM(l,t,{...a,delay:i+("function"==typeof r?0:r)+rC(e.variantChildren,l,r,s,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,r,n,a,o,i)}:()=>Promise.resolve(),{when:o}=s;if(!o)return Promise.all([n(),a(i.delay)]);{let[e,t]="beforeChildren"===o?[n,a]:[a,n];return e().then(()=>t())}}let rV=tp.length;function rR(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let r=0;r<i;r++)if(t[r]!==e[r])return!1;return!0}let rL=[...th].reverse(),rD=th.length;function rO(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rF(){return{animate:rO(!0),whileInView:rO(),whileHover:rO(),whileTap:rO(),whileDrag:rO(),whileFocus:rO(),exit:rO()}}let rI=0;function rU(e){return[e("x"),e("y")]}function rB(e,t,i,r={passive:!0}){return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i)}let rz={x:!1,y:!1};function r$(e){return e.max-e.min}function r_(e,t,i,r=.5){e.origin=r,e.originPoint=tU(t.min,t.max,e.origin),e.scale=r$(i)/r$(t),e.translate=tU(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rW(e,t,i,r){r_(e.x,t.x,i.x,r?r.originX:void 0),r_(e.y,t.y,i.y,r?r.originY:void 0)}function rY(e,t,i){e.min=i.min+t.min,e.max=e.min+r$(t)}function rH(e,t,i){e.min=t.min-i.min,e.max=e.min+r$(t)}function rX(e,t,i){rH(e.x,t.x,i.x),rH(e.y,t.y,i.y)}function rG(e){return"object"==typeof e&&null!==e}function rq(e){return rG(e)&&"ownerSVGElement"in e}function rK(e,t,i){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let s=i?.[e]??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(e=>null!=e)}let rZ=new WeakMap,rJ=(e,t,i)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:rq(r)&&"getBBox"in r?r.getBBox()[t]:r[i],rQ=rJ("inline","width","offsetWidth"),r0=rJ("block","height","offsetHeight");function r1({target:e,borderBoxSize:t}){rZ.get(e)?.forEach(i=>
1{i(e,{get width(){return rQ(e,t)},get height(){return r0(e,t)}})})}function r2(e){e.forEach(r1)}let r5=new Set;function r4(e,t){let s;return"function"==typeof e?(r5.add(e),r||(r=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};r5.forEach(t=>t(e))},window.addEventListener("resize",r)),()=>{r5.delete(e),r5.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(r2)),(s=rK(e)).forEach(e=>{let r=rZ.get(e);r||(r=new Set,rZ.set(e,r)),r.add(t),i?.observe(e)}),()=>{s.forEach(e=>{let r=rZ.get(e);r?.delete(t),r?.size||i?.unobserve(e)})})}let r3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),r6=new Set(["INPUT","SELECT","TEXTAREA"]),r9=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function r8(e){return{point:{x:e.pageX,y:e.pageY}}}function r7(e,t,i,r){return rB(e,t,e=>r9(e)&&i(e,r8(e)),r)}let se=({current:e})=>e?e.ownerDocument.defaultView:null,st=(e,t)=>Math.abs(e-t),si=new Set(["auto","scroll"]);class sr{constructor(e,t,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:n=3,element:a}={}){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=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ss(this.lastRawMoveEventInfo,this.transformPagePoint));let i=sa(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,s=(e=i.offset,t={x:0,y:0},Math.sqrt(st(e.x,t.x)**2+st(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!s)return;let{point:n}=i,{timestamp:a}=eR;this.history.push({...n,timestamp:a});let{onStart:o,onMove:l}=this.handlers;r||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ss(t,this.transformPagePoint),eM.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:r,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=sa("pointercancel"===e.type?this.lastMoveEventInfo:ss(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,n),r&&r(e,n)},!r9(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=r||window;const o=ss(r8(e),this.transformPagePoint),{point:l}=o,{timestamp:c}=eR;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=t;d&&d(e,sa(o,this.history)),this.removeListeners=iV(r7(this.contextWindow,"pointermove",this.handlePointerMove),r7(this.contextWindow,"pointerup",this.handlePointerUp),r7(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(si.has(e.overflowX)||si.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.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(e){let t=this.scrollPositions.get(e);if(!t)return;let i=e===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-t.x,y:r.y-t.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),eM.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eV(this.updatePoint)}}function ss(e,t){return t?{point:t(e.point)}:e}function sn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sa({point:e},t){return{point:e,delta:sn(e,so(t)),offset:sn(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,r=null,s=so(e);for(;i>=0&&(r=e[i],!(s.timestamp-r.timestamp>eH(.1)));)i--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>2*eH(.1)&&(r=e[1]);let n=(s.timestamp-r.timestamp)/1e3;if(0===n)return{x:0,y:0};let a={x:(s.x-r.x)/n,y:(s.y-r.y)/n};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,.1)}}function so(e){return e[e.length-1]}function sl(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function sc(e,t){let i=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,r]=[r,i]),{min:i,max:r}}function sd(e,t,i){return{min:su(e,t),max:su(e,i)}}function su(e,t){return"number"==typeof e?e:e[t]||0}let sh=new WeakMap;class sp{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:i}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let s=e=>{t&&this.snapToCursor(r8(e).point),this.stopAnimation()},n=(e,t)=>{let{drag:i,dragPropagation:r,onDragStart:s}=this.getProps();if(i&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
1y"===e)if(rz[e])return null;else return rz[e]=!0,()=>{rz[e]=!1};return rz.x||rz.y?null:(rz.x=rz.y=!0,()=>{rz.x=rz.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rU(e=>{let t=this.getAxisMotionValue(e).get()||0;if(N.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let r=i.layout.layoutBox[e];r&&(t=r$(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),s&&eM.update(()=>s(e,t),!1,!0),iC(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:i,dragDirectionLock:r,onDirectionLock:s,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(a),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),n&&eM.update(()=>n(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new sr(e,{onSessionStart:s,onStart:n,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:se(this.visualElement),element:this.visualElement.current})}stop(e,t){let i=e||this.latestPointerEvent,r=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!i)return;let{velocity:n}=r;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&eM.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,i){let{drag:r}=this.getProps();if(!i||!sf(e,r,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(n=function(e,{min:t,max:i},r){return void 0!==t&&e<t?e=r?tU(t,e,r.min):Math.max(e,t):void 0!==i&&e>i&&(e=r?tU(i,e,r.max):Math.min(e,i)),e}(n,this.constraints[e],this.elastic[e])),s.set(n)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&ik(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=function(e,{top:t,left:i,bottom:r,right:s}){return{x:sl(e.x,i,s),y:sl(e.y,t,r)}}(i.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:sd(e,"left","right"),y:sd(e,"top","bottom")}}(t),r!==this.constraints&&!ik(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&rU(e=>{var t,r;let s;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=i.layoutBox[e],r=this.constraints[e],s={},void 0!==r.min&&(s.min=r.min-t.min),void 0!==r.max&&(s.max=r.max-t.min),s))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!ik(t))return!1;let r=t.current;en(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let n=function(e,t,i){let r=t5(e,i),{scroll:s}=t;return s&&(tQ(r.x,s.offset.x),tQ(r.y,s.offset.y)),r}(r,s.root,this.visualElement.getTransformPagePoint()),a=(e=s.layout.layoutBox,{x:sc(e.x,n.x),y:sc(e.y,n.y)});if(i){let e=i(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=tY(e))}return a}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(rU(a=>{if(!sf(a,t,this.currentDirection))return;let l=o&&o[a]||{};(!0===n||n===a)&&(l={min:0,max:0});let c={type:"inertia",velocity:i?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(a,c)})).then(a)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return iC(this.visualElement,e),i.start(rE(e,i,0,t,this.visualElement,!1))}stopAnimation(){rU(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps();return i[t]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){rU(t=>{let{drag:i}=this.getProps();if(!sf(t,i,this.currentDirection))return;let{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){let{min:i,max:n}=r.layout.layoutBox[t],a=s.get()||0;s.set(e[t]-tU(i,n,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!ik(t)||!i||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rU(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var i,s;let n,a,o,l=t.get();r[e]=(i={min:l,max:l},s=this.constraints[e],n=.5,a=r$(i),(o=r$(s))>a?n=ru(s.min,s.max-a,i.min):a>o&&(n=ru(i.min,i.max-o,s.min)),u(0,1,n))}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),rU(t=>{if(!sf(t,e,null))return;let i=this.getAxisMotionValue(t),{min:s,max:n}=this.constraints[t];i.set(tU(s,n,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;sh.set(this.visualElement,this);let t=this.visualElement.current,i=r7(t,"pointerdown",e=>{let{drag:i,dragListener:r=!0}=this.getProps(),s=e.target,n=s!==t&&(r6.has(s.tagName)||!0===s.isContentEditable);i&&r&&!n&&this.start(e)}),r=()=>{var i,r,s;let n,a,{dragConstraints:o}=this.getProps();ik(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),e||(i=t,r=o.current,n=r4(i,sm(s=()=>this.scalePositionWithinConstraints())),a=r4(r,sm(s)),e=()=>{n(),a()}))},{projection:s}=this.visualElement,n=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),eM.read(r);let a=rB(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rU(t=>{let i=this.getAxisMotionValue(t);i&&(this.originPoint[t]+=e[t].translate,i.set(i.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),i(),n(),o&&o(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:n=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:n,dragMomentum:a}}}function sm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sf(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}let sg=e=>(t,i)=>{e&&eM.update(()=>e(t,i),!1,!0)},sx={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sy=l;function sv(e=!0){let t=(0,l.useContext)(id);if(null===t)return[!0,null];let{isPresent:i,onExitComplete:r,register:s}=t,n=(0,l.useId)();(0,l.useEffect)(()=>
1{if(e)return s(n)},[e]);let a=(0,l.useCallback)(()=>e&&r&&r(n),[n,r,e]);return!i&&r?[!1,a]:[!0]}let sb=!1;class sw extends sy.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),sb&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sx.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,{projection:n}=i;return n&&(n.isPresent=s,e.layoutDependency!==t&&n.setOptions({...n.options,layoutDependency:t}),sb=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||eM.postRender(()=>{let e=n.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),tr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;sb=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sk(e){let[t,i]=sv(),r=(0,sy.useContext)(t9);return(0,o.jsx)(sw,{...e,layoutGroup:r,switchLayoutGroup:(0,sy.useContext)(iw),isPresent:t,safeToRemove:i})}let sj=["TopLeft","TopRight","BottomLeft","BottomRight"],sS=sj.length,sN=e=>"string"==typeof e?parseFloat(e):e,sT=e=>"number"==typeof e||T.test(e);function sP(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let sE=sC(0,.5,ro),sA=sC(.5,.95,eP);function sC(e,t,i){return r=>r<e?0:r>t?1:i(ru(e,t,r))}function sM(e,t){e.min=t.min,e.max=t.max}function sV(e,t){sM(e.x,t.x),sM(e.y,t.y)}function sR(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sL(e,t,i,r,s){return e-=t,e=r+1/i*(e-r),void 0!==s&&(e=r+1/s*(e-r)),e}function sD(e,t,[i,r,s],n,a){!function(e,t=0,i=1,r=.5,s,n=e,a=e){if(N.test(t)&&(t=parseFloat(t),t=tU(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let o=tU(n.min,n.max,r);e===n&&(o-=t),e.min=sL(e.min,t,i,o,s),e.max=sL(e.max,t,i,o,s)}(e,t[i],t[r],t[s],t.scale,n,a)}let sO=["x","scaleX","originX"],sF=["y","scaleY","originY"];function sI(e,t,i,r){sD(e.x,t,sO,i?i.x:void 0,r?r.x:void 0),sD(e.y,t,sF,i?i.y:void 0,r?r.y:void 0)}function sU(e){return 0===e.translate&&1===e.scale}function sB(e){return sU(e.x)&&sU(e.y)}function sz(e,t){return e.min===t.min&&e.max===t.max}function s$(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function s_(e,t){return s$(e.x,t.x)&&s$(e.y,t.y)}function sW(e){return r$(e.x)/r$(e.y)}function sY(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sH{constructor(){this.members=[]}add(e){eX(this.members,e);for(let t=this.members.length-1;t>=0;t--){let i=this.members[t];if(i===e||i===this.lead||i===this.prevLead)continue;let r=i.instance;r&&!1!==r.isConnected||i.snapshot||(eG(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(eG(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=i.options,{layoutDependency:s}=e.options;(void 0===r||r!==s)&&(e.resumeFrom=i,t&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}
1scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let sX=(e,t)=>e.depth-t.depth;class sG{constructor(){this.children=[],this.isDirty=!1}add(e){eX(this.children,e),this.isDirty=!0}remove(e){eG(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sX),this.isDirty=!1,this.children.forEach(e)}}let sq=["","X","Y","Z"],sK=0;function sZ(e,t,i,r){let{latestValues:s}=t;s[e]&&(i[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sJ({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(e={},i=t?.()){this.id=sK++,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(s1),this.nodes.forEach(s8),this.nodes.forEach(s7),this.nodes.forEach(s2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new sG)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eq),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let i=this.eventHandlers.get(e);i&&i.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=rq(t)&&!(rq(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||i)&&(this.isLayoutDirty=!0),e){let i,r=0,s=()=>this.root.updateBlockedByResize=!1;eM.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==r){let t,n;r=e,this.root.updateBlockedByResize=!0,i&&i(),t=tn.now(),n=({timestamp:e})=>{let i=e-t;i>=250&&(eV(n),s(i-250))},eM.setup(n,!0),i=()=>eV(n),sx.hasAnimatedSinceResize&&(sx.hasAnimatedSinceResize=!1,this.nodes.forEach(s9))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:i,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||s.getDefaultTransition()||nn,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!s_(this.targetLayout,r),c=!t&&i;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...iE(n,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||s9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eV(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.forEac
1h(ne),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let r=i.props[ib];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eM,!(e||i))}let{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&e(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(s4);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(s3);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(s6),this.nodes.forEach(sQ),this.nodes.forEach(s0)):this.nodes.forEach(s3),this.clearAllSnapshots();let e=tn.now();eR.delta=u(0,1e3/60,e-eR.timestamp),eR.timestamp=e,eR.isProcessing=!0,eL.update.process(eR),eL.preRender.process(eR),eL.render.process(eR),eR.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s5),this.sharedNodes.forEach(nt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eM.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eM.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||r$(this.snapshot.measuredBox.x)||r$(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!s)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!sB(this.projectionDelta),i=this.getTransformTemplate(),r=i?i(this.latestValues,""):void 0,n=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||tG(this.latestValues)||n)&&(s(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let i=this.measurePageBox(),r=this.removeElementScroll(i);return e&&(r=this.removeTransform(r)),nl((t=r).x),nl(t.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Z();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nd))){let{scroll:e}=this.root;e&&(tQ(t.x,e.offset.x),tQ(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Z();if(sV(t,e),this.scroll?.wasRoot)return t;for(let i=0;i<this.path.length;i++){let r=this.path[i],{scroll:s,options:n}=r;r!==this.root&&s&&n.layoutScroll&&(s.wasRoot&&sV(t,e),tQ(t.x,s.offset.x),tQ(t.y,s.offset.y))}return t}applyTransform(e,t=!1){let i=Z();sV(i,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&t2(i,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),tG(r.latestValues)&&t2(i,r.latestValues,r.layout?.layoutBox)}return tG(this.latestValues)&&t2(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(e){let t=Z();sV(t,e);for(let e=0;e<this.path.length;e++){let i,r=this.path[e];tG(r.latestValues)&&(r.instance&&(tX(r.latestValues)&&r.updateSnapshot(),sV(i=Z(),r.measurePageBox())),sI(t,r.latestValues,r.snapshot?.layoutBox,i))}return tG(this.latestValues)&&sI(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eR.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==t;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:s}=this.options;if(!this.layout||!(r||s))return;this.resolvedRelativeTargetAt=eR.timestamp;let n=this.getClosestProjectingParent();if(n&&this.linkedParentVersion!==n.layoutVersion&&!n.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(n&&n.layout?this.createRelativeTarget(n,this.layout.layoutBox,n.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,l;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,l=this.relativeParent.target,rY(a.x,o.x,l.x),rY(a.y,o.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sV(this.target,this.layout.layoutBox),tJ(this.target,this.targetDelta)):sV(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,n&&!!n.resumingFrom==!!this.resumingFrom&&!n.options.layoutScroll&&n.target&&1!==this.animationProgress?this.createRelativeTarget(n,this.target,n.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||tX(this.parent.latestValues)||tq(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,i){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),rX(this.relativeTargetOrigin,t,i),sV(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===eR.timestamp&&(i=!1),i)return;let{layout:r,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||s))return;sV(this.layoutCorrected,this.layout.layoutBox);let n=this.treeScale.x,a=this.treeScale.y;!function(e,t,i,r=!1){let s,n,a=i.length;if(a){t.x=t.y=1;for(let o=0;o<a;o++){n=(s=i[o]).projectionDelta;let{visualElement:a}=s.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&t2(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),n&&(t.x*=n.x.scale,t.y*=n.y.scale,tJ(e,n)),r&&tG(s.latestValues)&&t2(e,s.latestValues,s.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Z());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sR(this.prevProjectionDelta.x,this.projectionDelta.x),sR(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rW(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===n&&this.treeScale.y===a&&sY(this.projectionDelta.x,this.prevProjectionDelta.x)&&sY(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=q(),this.projectionDelta=q(),this.projectionDeltaWithTransform=q()}setAnimationOrigin(e,t=!1){let i,r=this.snapshot,s=r?r.latestValues:{},n={...this.latestValues},a=q();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Z(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,u=!!(l&&!d&&!0===this.options.crossfade&&!this.path.some(ns));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(ni(a.x,e.x,r),ni(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,h,p,m,f,g;rX(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,g=r,nr(p.x,m.x,f.x,g),nr(p.y,m.y,f.y,g),i&&(c=this.relativeTarget,h=i,sz(c.x,h.x)&&sz(c.y,h.y))&&(this.isProjectionDirty=!1),i||(i=Z()),sV(i,this.relativeTarget)}l&&(this.animationValues=n,function(e,t,i,r,s,n){s?(e.opacity=tU(0,i.opacity??1,sE(r)),e.opacityExit=tU(t.opacity??1,0,sA(r))):n&&(e.opacity=tU(t.opacity??1,i.opacity??1,r));for(let s=0;s<sS;s++){let n=`border${sj[s]}Radius`,a=sP(t,n),o=sP(i,n);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||sT(a)===sT(o)?(e[n]=Math.max(tU(sN(a),sN(o),r),0),(N.test(o)||N.test(a))&&(e[n]+="
1%")):e[n]=o)}(t.rotate||i.rotate)&&(e.rotate=tU(t.rotate||0,i.rotate||0,r))}(n,s,this.latestValues,r,u,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eV(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eM.update(()=>{var t,i,r;let s;sx.hasAnimatedSinceResize=!0,e4.layout++,this.motionValue||(this.motionValue=to(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,i=[0,1e3],r={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{e4.layout--},onComplete:()=>{e4.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(s=J(t)?t:to(t)).start(rE("",s,i,r)),s.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:r,latestValues:s}=e;if(t&&i&&r){if(this!==e&&this.layout&&r&&nc(this.options.animationType,this.layout.layoutBox,r.layoutBox)){i=this.target||Z();let t=r$(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let r=r$(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+r}sV(t,i),t2(t,s),rW(this.projectionDeltaWithTransform,this.layoutCorrected,t,s)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new sH),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:i}={}){let r=this.getStack();r&&r.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let r={};i.z&&sZ("z",e,r,this.animationValues);for(let t=0;t<sq.length;t++)sZ(`rotate${sq[t]}`,e,r,this.animationValues),sZ(`skew${sq[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ic(t?.pointerEvents)||"",e.transform=i?i(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ic(t?.pointerEvents)||""),this.hasProjected&&!tG(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1);return}e.visibility="";let s=r.animationValues||r.latestValues;this.applyTransformsToTarget();let n=function(e,t,i){let r="",s=e.x.translate/t.x,n=e.y.translate/t.y,a=i?.z||0;if((s||n||a)&&(r=`translate3d(${s}px, ${n}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),i){let{transformPerspective:e,rotate:t,rotateX:s,rotateY:n,skewX:a,skewY:o}=i;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),s&&(r+=`rotateX(${s}deg) `),n&&(r+=`rotateY(${n}deg) `),a&&(r+=`skewX(${a}deg) `),o&&(r+=`skewY(${o}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(r+=`scale(${o}, ${l}
1)`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(n=i(s,n)),e.transform=n;let{x:a,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,r.animationValues?e.opacity=r===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=r===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,tB){if(void 0===s[t])continue;let{correct:i,applyTo:a,isCSSVariable:o}=tB[t],l="none"===n?s[t]:i(s[t],r);if(a){let t=a.length;for(let i=0;i<t;i++)e[a[i]]=l}else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?ic(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(s4),this.root.sharedNodes.clear()}}}function sQ(e){e.updateLayout()}function s0(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:r}=e.layout,{animationType:s}=e.options,n=t.source!==e.layout.source;if("size"===s)rU(e=>{let r=n?t.measuredBox[e]:t.layoutBox[e],s=r$(r);r.min=i[e].min,r.max=r.min+s});else if("x"===s||"y"===s){let e="x"===s?"y":"x";sM(n?t.measuredBox[e]:t.layoutBox[e],i[e])}else nc(s,t.layoutBox,i)&&rU(r=>{let s=n?t.measuredBox[r]:t.layoutBox[r],a=r$(i[r]);s.max=s.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=q();rW(a,i,t.layoutBox);let o=q();n?rW(o,e.applyTransform(r,!0),t.measuredBox):rW(o,i,t.layoutBox);let l=!sB(a),c=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:s,layout:n}=r;if(s&&n){let a=Z();rX(a,t.layoutBox,s.layoutBox);let o=Z();rX(o,i,n.layoutBox),s_(a,o)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function s1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function s2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s5(e){e.clearSnapshot()}function s4(e){e.clearMeasurements()}function s3(e){e.isLayoutDirty=!1}function s6(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function s9(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s8(e){e.resolveTargetDelta()}function s7(e){e.calcProjection()}function ne(e){e.resetSkewAndRotation()}function nt(e){e.removeLeadSnapshot()}function ni(e,t,i){e.translate=tU(t.translate,0,i),e.scale=tU(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function nr(e,t,i,r){e.min=tU(t.min,i.min,r),e.max=tU(t.max,i.max,r)}function ns(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nn={duration:.45,ease:[.4,0,.1,1]},na=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),no=na("applewebkit/")&&!na("chrome/")?Math.round:eP;function nl(e){e.min=no(e.min),e.max=no(e.max)}function nc(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(sW(t)-sW(i)))}function nd(e){return e!==e.root&&e.scroll?.wasRoot}let nu=sJ({attachResizeListener:(e,t)=>rB(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),nh={current:void 0},np=sJ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nh.current){let e=new nu({});e.mount(window),e.setOptions({layoutScroll:!0}),nh.current=e}return nh.current},resetTransform:(e,t)=>
1{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function nm(e,t){let i=rK(e),r=new AbortController;return[i,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function nf(e,t,i){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===i);let s=r["onHover"+i];s&&eM.postRender(()=>s(t,r8(t)))}function ng(e){return rG(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}let nx=(e,t)=>!!t&&(e===t||nx(e,t.parentElement)),ny=new WeakSet;function nv(e){return t=>{"Enter"===t.key&&e(t)}}function nb(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function nw(e){return r9(e)&&!(rz.x||rz.y)}let nk=new WeakSet;function nj(e,t,i){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===i);let s=r["onTap"+("End"===i?"":i)];s&&eM.postRender(()=>s(t,r8(t)))}let nS=new WeakMap,nN=new WeakMap,nT=e=>{let t=nS.get(e.target);t&&t(e)},nP=e=>{e.forEach(nT)},nE={some:0,all:1},nA=function(e,t){if("u"<typeof Proxy)return iS;let i=new Map,r=(i,r)=>iS(i,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(s,n)=>"create"===n?r:(i.has(n)||i.set(n,iS(n,void 0,e,t)),i.get(n))})}({animation:{Feature:class extends iN{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:i})=>(function(e,t,i={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>rM(e,t,i)));else if("string"==typeof t)r=rM(e,t,i);else{let s="function"==typeof t?iT(e,t,i.custom):t;r=Promise.all(rA(e,s,i))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,i))),i=rF(),r=!0,s=!1,n=t=>(i,r)=>{let s=iT(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(s){let{transition:e,transitionEnd:t,...r}=s;i={...i,...r,...t}}return i};function a(a){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let i=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(i.initial=t.props.initial),i}let i={};for(let e=0;e<rV;e++){let r=tp[e],s=t.props[r];(tu(s)||!1===s)&&(i[r]=s)}return i}(e.parent)||{},c=[],d=new Set,u={},h=1/0;for(let t=0;t<rD;t++){var p,m;let f=rL[t],g=i[f],x=void 0!==o[f]?o[f]:l[f],y=tu(x),v=f===a?g.isActive:null;!1===v&&(h=t);let b=x===l[f]&&x!==o[f]&&y;if(b&&(r||s)&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...u},!g.isActive&&null===v||!x&&!g.prevProp||td(x)||"boolean"==typeof x)continue;if("exit"===f&&g.isActive&&!0!==v){g.prevResolvedValues&&(u={...u,...g.prevResolvedValues});continue}let w=(p=g.prevProp,"string"==typeof(m=x)?m!==p:!!Array.isArray(m)&&!rR(m,p)),k=w||f===a&&g.isActive&&!b&&y||t>h&&y,j=!1,S=Array.isArray(x)?x:[x],N=S.reduce(n(f),{});!1===v&&(N={});let{prevResolvedValues:T={}}=g,P={...T,...N},E=t=>{k=!0,d.has(t)&&(j=!0,d.delete(t)),g.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in P){let t=N[e],i=T[e];if(!u.hasOwnProperty(e))(iA(t)&&iA(i)?rR(t,i):t===i)?void 0!==t&&d.has(e)?E(e):g.protectedKeys[e]=!0:null!=t?E(e):d.add(e)}g.prevProp=x,g.prevResolvedValues=N,g.isActive&&(u={...u,...N}),(r||s)&&e.blockInitialAnimation&&(k=!1);let A=b&&w,C=!A||j;k&&C&&c.push(...S.map(t=>{let i={type:f};if("string"==typeof t&&(r||s)&&!A&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,s=iT(r,t);if(r.enteringChildren&&s){let{delayChildren:t}=s.transition||{};i.delay=rC(r.enteringChildren,e,t)}}return{animation:t,options:i}}))}if(d.size){let t={};if("boolean"!=typeof o.initial){let i=iT(e,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(t.transition=i.transition)}d.forEach(i=>{let r=e.getBaseTarget(i),s=e.getValue(i);s&&(s.liveStyle=!0),t[i]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,s=!1,f?t(c):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(i[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),i[t].isActive=r;let s=a(t);for(let e in i)i[e].protectedKeys={};return s},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=rF(),s=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();td(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iN{constructor(){super(...arguments),this.id=rI++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&!1===i){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let i=iT(this.node,e,t);if(i){let{transition:e,transitionEnd:t,...r}=i;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
1{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends iN{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:r,margin:s,amount:n="some",once:a}=i,o={root:r?r.current:void 0,rootMargin:s,threshold:"number"==typeof n?n:nE[n]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:r}=this.node.getProps(),s=t?i:r;s&&s(e)};return e=this.node.current,t=function({root:e,...t}){let i=e||document;nN.has(i)||nN.set(i,{});let r=nN.get(i),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(nP,{root:e,...t})),r[s]}(o),nS.set(e,l),t.observe(e),()=>{nS.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends iN{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=function(e,t,i={}){let[r,s,n]=nm(e,i),a=e=>{let r=e.currentTarget;if(!nw(e)||nk.has(e))return;ny.add(r),i.stopPropagation&&nk.add(e);let n=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),ny.has(r)&&ny.delete(r),nw(e)&&"function"==typeof n&&n(e,{success:t})},o=e=>{a(e,r===window||r===document||i.useGlobalTarget||nx(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",l,s)};return r.forEach(e=>{((i.useGlobalTarget?window:e).addEventListener("pointerdown",a,s),ng(e))&&(e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let r=nv(()=>{if(ny.has(i))return;nb(i,"down");let e=nv(()=>{nb(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>nb(i,"cancel"),t)});i.addEventListener("keydown",r,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",r),t)})(e,s)),r3.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),n}(e,(e,t)=>(nj(this.node,t,"Start"),(e,{success:t})=>nj(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iN{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=iV(rB(this.node.current,"focus",()=>this.onFocus()),rB(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iN{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[r,s,n]=nm(e,i);return r.forEach(e=>{let i,r=!1,n=!1,a=t=>{i&&(i(t),i=void 0),e.removeEventListener("pointerleave",l)},o=e=>{r=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),n&&(n=!1,a(e))},l=e=>{if("touch"!==e.pointerType){if(r){n=!0;return}a(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||rz.x||rz.y)return;n=!1;let a=t(e,r);"function"==typeof a&&(i=a,e.addEventListener("pointerleave",l,s))},s),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",o,s)},s)}),n}(e,(e,t)=>(nf(this.node,t,"Start"),e=>nf(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends iN{constructor(){super(...arguments),this.removePointerDownListener=eP}onPointerDown(e){this.session=new sr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:se(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:sg(e),onStart:sg(t),onMove:sg(i),onEnd:(e,t)=>{delete this.session,r&&eM.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=r7(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends iN{constructor(e){super(e),this.removeGroupControls=eP,this.removeListeners=eP,this.controls=new sp(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eP}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:np,MeasureLayout:sk},layout:{ProjectionNode:np,MeasureLayout:sk}},(e,t)=>
1t.isSVG??t6(e)?new tW(t):new t4(t,{allowProjection:e!==l.Fragment}));var nC=l;function nM(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class nV extends nC.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(ng(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,i=ng(e)&&e.offsetWidth||0,r=ng(e)&&e.offsetHeight||0,s=getComputedStyle(t),n=this.props.sizeRef.current;n.height=parseFloat(s.height),n.width=parseFloat(s.width),n.top=t.offsetTop,n.left=t.offsetLeft,n.right=i-n.width-n.left,n.bottom=r-n.height-n.top}return null}componentDidUpdate(){}render(){return this.props.children}}function nR({children:e,isPresent:t,anchorX:i,anchorY:r,root:s,pop:n}){let a=(0,nC.useId)(),c=(0,nC.useRef)(null),d=(0,nC.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=(0,nC.useContext)(t7),h=function(...e){return l.useCallback(function(...e){return t=>{let i=!1,r=e.map(e=>{let r=nM(e,t);return i||"function"!=typeof r||(i=!0),r});if(i)return()=>{for(let t=0;t<r.length;t++){let i=r[t];"function"==typeof i?i():nM(e[t],null)}}}}(...e),e)}(c,e.props?.ref??e?.ref);return(0,nC.useInsertionEffect)(()=>{let{width:e,height:o,top:l,left:h,right:p,bottom:m}=d.current;if(t||!1===n||!c.current||!e||!o)return;let f="left"===i?`left: ${h}`:`right: ${p}`,g="bottom"===r?`bottom: ${m}`:`top: ${l}`;c.current.dataset.motionPopId=a;let x=document.createElement("style");u&&(x.nonce=u);let y=s??document.head;return y.appendChild(x),x.sheet&&x.sheet.insertRule(` 2 [data-motion-pop-id="${a}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${o}px !important; 6 ${f}px !important; 7 ${g}px !important; 8 } 9 `),()=>{c.current?.removeAttribute("data-motion-pop-id"),y.contains(x)&&y.removeChild(x)}},[t]),(0,o.jsx)(nV,{isPresent:t,childRef:c,sizeRef:d,pop:n,children:!1===n?e:nC.cloneElement(e,{ref:h})})}let nL=({children:e,initial:t,isPresent:i,onExitComplete:r,custom:s,presenceAffectsLayout:n,mode:a,anchorX:c,anchorY:d,root:u})=>{let h=iu(nD),p=(0,l.useId)(),m=!0,f=(0,l.useMemo)(()=>(m=!1,{id:p,initial:t,isPresent:i,custom:s,onExitComplete:e=>{for(let t of(h.set(e,!0),h.values()))if(!t)return;r&&r()},register:e=>(h.set(e,!1),()=>h.delete(e))}),[i,h,r]);return n&&m&&(f={...f}),(0,l.useMemo)(()=>{h.forEach((e,t)=>h.set(t,!1))},[i]),l.useEffect(()=>{i||h.size||!r||r()},[i]),e=(0,o.jsx)(nR,{pop:"popLayout"===a,isPresent:i,anchorX:c,anchorY:d,root:u,children:e}),(0,o.jsx)(id.Provider,{value:f,children:e})};function nD(){return new Map}let nO=e=>e.key||"";function nF(e){let t=[];return l.Children.forEach(e,e=>{(0,l.isValidElement)(e)&&t.push(e)}),t}let nI=({children:e,custom:t,initial:i=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:n="sync",propagate:a=!1,anchorX:c="left",anchorY:d="top",root:u})=>{let[h,p]=sv(a),m=(0,l.useMemo)(()=>nF(e),[e]),f=a&&!h?[]:m.map(nO),g=(0,l.useRef)(!0),x=(0,l.useRef)(m),y=iu(()=>new Map),v=(0,l.useRef)(new Set),[b,w]=(0,l.useState)(m),[k,j]=(0,l.useState)(m);ij(()=>{g.current=!1,x.current=m;for(let e=0;e<k.length;e++){let t=nO(k[e]);f.includes(t)?(y.delete(t),v.current.delete(t)):!0!==y.get(t)&&y.set(t,!1)}},[k,f.length,f.join("-")]);let S=[];if(m!==b){let e=[...m];for(let t=0;t<k.length;t++){let i=k[t],r=nO(i);f.includes(r)||(e.splice(t,0,i),S.push(i))}return"wait"===n&&S.length&&(e=S),j(nF(e)),w(m),null}let{forceRender:N}=(0,l.useContext)(t9);return(0,o.jsx)(o.Fragment,{children:k.map(e=>{let l=nO(e),b=(!a||!!h)&&(m===k||f.includes(l));return(0,o.jsx)(nL,{isPresent:b,initial:(!g.current||!!i)&&void 0,custom:t,presenceAffectsLayout:s,mode:n,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(l)||!y.has(l))return;v.current.add(l),y.set(l,!0);let e=!0;y.forEach(t=>{t||(e=!1)}),e&&(N?.(),j(x.current),a&&p?.(),r&&r())},anchorX:c,anchorY:d,children:e},l)})})},nU=(...e)=>e.filter((e,t,i)=>!!e&&""!==e.trim()&&i.indexOf(e)===t).join(" ").trim(),nB=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,i)=>i?i.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var nz={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n$=(0,l.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:s="",children:n,iconNode:a,...o},c)=>(0,l.createElement)("svg",{ref:c,...nz,width:t,height:t,stroke:e,strokeWidth:r?24*Number(i)/Number(t):i,className:nU("lucide",s),...!n&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(o)&&{"aria-hidden":"true"},...o},[...a.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(n)?n:[n]])),n_=(e,t)=>{let i=(0,l.forwardRef)(({className:i,...r},s)=>(0,l.createElement)(n$,{ref:s,iconNode:t,className:nU(`lucide-${nB(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...r}));return i.displayName=nB(e),i}
9,nW=n_("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),nY=n_("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),nH=n_("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),nX=n_("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),nG=n_("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]),nq=n_("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nK=n_("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),nZ=n_("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),nJ=n_("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),nQ=n_("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),n0=n_("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),n1=n_("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),n2=n_("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),n5=n_("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),n4=n_("file-spreadsheet",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]),n3=n_("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);function n6(){for(var e,t,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(t=function e(t){var i,r,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t)if(Array.isArray(t)){var n=t.length;for(i=0;i<n;i++)t[i]&&(r=e(t[i]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}(e))&&(r&&(r+=" "),r+=t);return r}let n9=(e=new Map,t=null,i)=>({nextPart:e,validators:t,classGroupId:i}),n8=[],n7=(e,t,i)=>{if(0==e.length-t)return i.classGroupId;let r=e[t],s=i.nextPart.get(r);if(s){let i=n7(e,t+1,s);if(i)return i}let n=i.validators;if(null===n)return;let a=0===t?e.join("-"):e.slice(t).join("-"),o=n.length;for(let e=0;e<o;e++){let t=n[e];if(t.validator(a))return t.classGroupId}},ae=(e,t)=>{let i=n9();for(let r in e)at(e[r],i,r,t);return i},at=(e,t,i,r)=>{let s=e.length;for(let n=0;n<s;n++)ai(e[n],t,i,r)},ai=(e,t,i,r)=>{"string"==typeof e?ar(e,t,i):"function"==typeof e?as(e,t,i,r):an(e,t,i,r)},ar=(e,t,i)=>{(""===e?t:aa(t,e)).classGroupId=i},as=(e,t,i,r)=>{ao(e)?at(e(r),t,i,r):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:i,validator:e}))},an=(e,t,i,r)=>{let s=Object.entries(e),n=s.length;for(let e=0;e<n;e++){let[n,a]=s[e];at(a,aa(t,n),i,r)}},aa=(e,t)=>{let i=e,r=t.split("-"),s=r.length;for(let e=0;e<s;e++){let t=r[e],s=i.nextPart.get(t);s||(s=n9(),i.nextPart.set(t,s)),i=s}return i},ao=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,al=[],ac=(e,t,i,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:i,maybePostfixModifierPosition:r,isExternal:s}),ad=/\s+/,au=e=>{let t;if("string"==typeof e)return e;let i="";for(let r=0;r<e.length;r++)e[r]&&(t=au(e[r]))&&(i&&(i+=" "),i+=t);return i},ah=[],ap=e=>{let t=t=>t[e]||ah;return t.isThemeGetter=!0,t}
9,am=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,af=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ag=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ax=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ay=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,av=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ab=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ak=e=>ag.test(e),aj=e=>!!e&&!Number.isNaN(Number(e)),aS=e=>!!e&&Number.isInteger(Number(e)),aN=e=>e.endsWith("%")&&aj(e.slice(0,-1)),aT=e=>ax.test(e),aP=()=>!0,aE=e=>ay.test(e)&&!av.test(e),aA=()=>!1,aC=e=>ab.test(e),aM=e=>aw.test(e),aV=e=>!aL(e)&&!a$(e),aR=e=>aK(e,a0,aA),aL=e=>am.test(e),aD=e=>aK(e,a1,aE),aO=e=>aK(e,a2,aj),aF=e=>aK(e,a4,aP),aI=e=>aK(e,a5,aA),aU=e=>aK(e,aJ,aA),aB=e=>aK(e,aQ,aM),az=e=>aK(e,a3,aC),a$=e=>af.test(e),a_=e=>aZ(e,a1),aW=e=>aZ(e,a5),aY=e=>aZ(e,aJ),aH=e=>aZ(e,a0),aX=e=>aZ(e,aQ),aG=e=>aZ(e,a3,!0),aq=e=>aZ(e,a4,!0),aK=(e,t,i)=>{let r=am.exec(e);return!!r&&(r[1]?t(r[1]):i(r[2]))},aZ=(e,t,i=!1)=>{let r=af.exec(e);return!!r&&(r[1]?t(r[1]):i)},aJ=e=>"position"===e||"percentage"===e,aQ=e=>"image"===e||"url"===e,a0=e=>"length"===e||"size"===e||"bg-size"===e,a1=e=>"length"===e,a2=e=>"number"===e,a5=e=>"family-name"===e,a4=e=>"number"===e||"weight"===e,a3=e=>"shadow"===e,a6=((e,...t)=>{let i,r,s,n,a=e=>{let t=r(e);if(t)return t;let n=((e,t)=>{let{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:n}=t,a=[],o=e.trim().split(ad),l="";for(let e=o.length-1;e>=0;e-=1){let t=o[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:p}=i(t);if(c){l=t+(l.length>0?" "+l:l);continue}let m=!!p,f=r(m?h.substring(0,p):h);if(!f){if(!m||!(f=r(h))){l=t+(l.length>0?" "+l:l);continue}m=!1}let g=0===d.length?"":1===d.length?d[0]:n(d).join(":"),x=u?g+"!":g,y=x+f;if(a.indexOf(y)>-1)continue;a.push(y);let v=s(f,m);for(let e=0;e<v.length;++e){let t=v[e];a.push(x+t)}l=t+(l.length>0?" "+l:l)}return l})(e,i);return s(e,n),n};return n=o=>{var l;let c;return r=(i={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,i=Object.create(null),r=Object.create(null),s=(s,n)=>{i[s]=n,++t>e&&(t=0,r=i,i=Object.create(null))};return{get(e){let t=i[e];return void 0!==t?t:void 0!==(t=r[e])?(s(e,t),t):void 0},set(e,t){e in i?i[e]=t:s(e,t)}}})((l=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:i}=e,r=e=>{let t,i=[],r=0,s=0,n=0,a=e.length;for(let o=0;o<a;o++){let a=e[o];if(0===r&&0===s){if(":"===a){i.push(e.slice(n,o)),n=o+1;continue}if("/"===a){t=o;continue}}"["===a?r++:"]"===a?r--:"("===a?s++:")"===a&&s--}let o=0===i.length?e:e.slice(n),l=o,c=!1;return o.endsWith("!")?(l=o.slice(0,-1),c=!0):o.startsWith("!")&&(l=o.slice(1),c=!0),ac(i,c,l,t&&t>n?t-n:void 0)};if(t){let e=t+":",i=r;r=t=>t.startsWith(e)?i(t.slice(e.length)):ac(al,!1,t,void 0,!0)}if(i){let e=r;r=t=>i({className:t,parseClassName:e})}return r})(l),sortModifiers:(c=new Map,l.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r],n="["===s[0],a=c.has(s);n||a?(i.length>0&&(i.sort(),t.push(...i),i=[]),t.push(s)):i.push(s)}return i.length>0&&(i.sort(),t.push(...i)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:i}=e;return ae(i,t)})(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var i;let t,r,s;return -1===(i=e).slice(1,-1).indexOf(":")?void 0:(r=(t=i.slice(1,-1)).indexOf(":"),(s=t.slice(0,r))?"arbitrary.."+s:void 0)}let r=e.split("-"),s=+(""===r[0]&&r.length>1);return n7(r,s,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],s=i[e];if(t){if(s){let e=Array(s.length+t.length);for(let t=0;t<s.length;t++)e[t]=s[t];for(let i=0;i<t.length;i++)e[s.length+i]=t[i];return e}return t}return s||n8}return i[e]||n8}}})(l)}).cache.get,s=i.cache.set,n=a,a(o)},(...e)=>n(((...e)=>{let t,i,r=0,s="";for(;r<e.length;)(t=e[r++])&&(i=au(t))&&(s&&(s+=" "),s+=i);return s})(...e))})(()=>{let e=ap("color"),t=ap("font"),i=ap("text"),r=ap("font-weight"),s=ap("tracking"),n=ap("leading"),a=ap("breakpoint"),o=ap("container"),l=ap("spacing"),c=ap("radius"),d=ap("shadow"),u=ap("inset-shadow"),h=ap("text-shadow"),p=ap("drop-shadow"),m=ap("blur"),f=ap("perspective"),g=ap("aspect"),x=ap("ease"),y=ap("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...b(),a$,aL],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],S=()=>[a$,aL,l],N=()=>[ak,"full","auto",...S()],T=()=>[aS,"none","subgrid",a$,aL],P=()=>["auto",{span:["full",aS,a$,aL]},aS,a$,aL],E=()=>[aS,"auto",a$,aL],A=()=>["auto","min","max","fr",a$,aL],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...S()],R=()=>[ak,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],L=()=>[ak,"screen","full","dvw","lvw","svw","min","max","fit",...S()],D=()=>[ak,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],O=()=>[e,a$,aL],F=()=>[...b(),aY,aU,{position:[a$,aL]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",aH,aR,{size:[a$,aL]}],B=()=>[aN,a_,aD],z=()=>["","none","full",c,a$,aL],$=()=>["",aj,a_,aD],_=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[aj,aN,aY,aU],H=()=>["","none",m,a$,aL],X=()=>["none",aj,a$,aL],G=()=>["none",aj,a$,aL],q=()=>[aj,a$,aL],K=()=>[ak,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[aT],breakpoint:[aT],color:[aP],container:[aT],"drop-shadow":[aT],ease:["in","out","in-out"],font:[aV],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[aT],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[aT],shadow:[aT],spacing:["px",aj],text:[aT],"text-shadow":[aT],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ak,aL,a$,g]}
vendor: 4,900 bytes, line 9
9],container:["container"],columns:[{columns:[aj,aL,a$,o]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[aS,"auto",a$,aL]}],basis:[{basis:[ak,"full","auto",o,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[aj,ak,"auto","initial","none",aL]}],grow:[{grow:["",aj,a$,aL]}],shrink:[{shrink:["",aj,a$,aL]}],order:[{order:[aS,"first","last","none",a$,aL]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...D()]}],"min-block-size":[{"min-block":["auto",...D()]}],"max-block-size":[{"max-block":["none",...D()]}],w:[{w:[o,"screen",...R()]}],"min-w":[{"min-w":[o,"screen","none",...R()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",i,a_,aD]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,aq,aF]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",aN,aL]}],"font-family":[{font:[aW,aI,t]}],"font-features":[{"font-features":[aL]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,a$,aL]}],"line-clamp":[{"line-clamp":[aj,"none",a$,aO]}],leading:[{leading:[n,...S()]}],"list-image":[{"list-image":["none",a$,aL]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",a$,aL]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"w
9avy"]}],"text-decoration-thickness":[{decoration:[aj,"from-font","auto",a$,aD]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[aj,"auto",a$,aL]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a$,aL]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",a$,aL]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},aS,a$,aL],radial:["",a$,aL],conic:[aS,a$,aL]},aX,aB]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-bs":[{"border-bs":$()}],"border-w-be":[{"border-be":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[aj,a$,aL]}],"outline-w":[{outline:["",aj,a_,aD]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,aG,az]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",u,aG,az]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[aj,aD]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",h,aG,az]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[aj,a$,aL]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[aj]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[a$,aL]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[aj]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",a$,aL]}],filter:[{filter:["","none",a$,aL]}],blur:[{blur:H()}],brightness:[{brightness:[aj,a$,aL]}],contrast:[{contrast:[aj,a$,aL]}],"drop-shadow":[{"drop-shadow":["","none",p,aG,az]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",aj,a$,aL]}],"hue-rotate":[{"hue-rotate":[aj,a$,aL]}],invert:[{invert:["",aj,a$,aL]}],saturate:[{saturate:[aj,a$,aL]}],sepia:[{sepia:["",aj,a$,aL]}],"backdrop-filter":[{"backdrop-filter":["","none",a$,aL]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[aj,a$,aL]}],"backdrop-contrast":[{"backdrop-contrast":[aj,a$,aL]}],"backdrop-grayscale":[{"backdrop-grayscale":["",aj,a$,aL]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[aj,a$,aL]}],"backdrop-invert":[{"backdrop-invert":["",aj,a$,aL]}],"backdrop-opacity":[{"backdrop-opacity":[aj,a$,aL]}],"backdrop-saturate":[{"backdrop-saturate":[aj,a$,aL]}],"backdrop-sepia":[{"backdrop-sepia":["",aj,a$,aL]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",a$,aL]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[aj,"initial",a$,aL]}],ease:[{ease:["linear","initial",x,a$,aL]}],delay:[{delay:[aj,a$,aL]}],animate:[{animate:["none",y,a$,aL]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,a$,aL]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:q()}],"skew-x":[{"skew-x":q()}],"skew-y":[{"skew-y":q()}],transform:[{transform:[a$,aL,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}
9],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",a$,aL]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a$,aL]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[aj,a_,aD,aO]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var a9=e.i(2239);e.s(["ERROR_REVALIDATE_EVENT",()=>3,"FOCUS_EVENT",()=>0,"MUTATE_EVENT",()=>2,"RECONNECT_EVENT",()=>1],11671);var a8=Object.prototype.hasOwnProperty;let a7=new WeakMap,oe=()=>{},ot=oe(),oi=Object,or=e=>e===ot,os=(e,t)=>({...e,...t}),on={},oa={},oo="undefined",ol=typeof window!=oo,oc=typeof document!=oo,od=ol&&"Deno"in window,ou=(e,t)=>{let i=a7.get(e);return[()=>!or(t)&&e.get(t)||on,r=>{if(!or(t)){let s=e.get(t);t in oa||(oa[t]=s),i[5](t,os(s,r),s||on)}},i[6],()=>!or(t)&&t in oa?oa[t]:!or(t)&&e.get(t)||on]},oh=!0,[op,om]=ol&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[oe,oe],of={initFocus:e=>(oc&&document.addEventListener("visibilitychange",e),op("focus",e),()=>{oc&&document.removeEventListener("visibilitychange",e),om("focus",e)}),initReconnect:e=>{let t=()=>
9{oh=!0,e()},i=()=>{oh=!1};return op("online",t),op("offline",i),()=>{om("online",t),om("offline",i)}}},og=!l.default.useId,ox=!ol||od,oy=ox?l.useEffect:l.useLayoutEffect,ov="u">typeof navigator&&navigator.connection,ob=!ox&&ov&&(["slow-2g","2g"].includes(ov.effectiveType)||ov.saveData),ow=new WeakMap,ok=(e,t)=>e===`[object ${t}]`,oj=0,oS=e=>{let t,i,r=typeof e,s=oi.prototype.toString.call(e),n=ok(s,"Date"),a=ok(s,"RegExp"),o=ok(s,"Object");if(oi(e)!==e||n||a)t=n?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=ow.get(e))return t;if(t=++oj+"~",ow.set(e,t),Array.isArray(e)){for(i=0,t="@";i<e.length;i++)t+=oS(e[i])+",";ow.set(e,t)}if(o){t="#";let r=oi.keys(e).sort();for(;!or(i=r.pop());)or(e[i])||(t+=i+":"+oS(e[i])+",");ow.set(e,t)}}return t},oN=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?oS(e):"",t]},oT=0,oP=()=>++oT;async function oE(...e){let[t,i,r,s]=e,n=os({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),a=n.populateCache,o=n.rollbackOnError,l=n.optimisticData,c=n.throwOnError;if("function"==typeof i){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&i(t.get(r)._k)&&e.push(r);return Promise.all(e.map(d))}return d(i);async function d(i){let s,[d]=oN(i);if(!d)return;let[u,h]=ou(t,d),[p,m,f,g]=a7.get(t),x=()=>{let e=p[d];return("function"==typeof n.revalidate?n.revalidate(u().data,i):!1!==n.revalidate)&&(delete f[d],delete g[d],e&&e[0])?e[0](2).then(()=>u().data):u().data};if(e.length<3)return x();let y=r,v=!1,b=oP();m[d]=[b,0];let w=!or(l),k=u(),j=k.data,S=k._c,N=or(S)?j:S;if(w&&h({data:l="function"==typeof l?l(N,j):l,_c:N}),"function"==typeof y)try{y=y(N)}catch(e){s=e,v=!0}if(y&&"function"==typeof y.then){let e;if(y=await y.catch(e=>{s=e,v=!0}),b!==m[d][0]){if(v)throw s;return y}v&&w&&(e=s,"function"==typeof o?o(e):!1!==o)&&(a=!0,h({data:N,_c:ot}))}if(a&&!v&&("function"==typeof a?h({data:a(y,N),error:ot,_c:ot}):h({data:y,error:ot,_c:ot})),m[d][1]=oP(),Promise.resolve(x()).then(()=>{h({_c:ot})}),v){if(c)throw s;return}return y}}let oA=(e,t)=>{for(let i in e)e[i][0]&&e[i][0](t)},oC=(e,t)=>{if(!a7.has(e)){let i=os(of,t),r=Object.create(null),s=oE.bind(ot,e),n=oe,a=Object.create(null),o=(e,t)=>{let i=a[e]||[];return a[e]=i,i.push(t),()=>i.splice(i.indexOf(t),1)},l=(t,i,r)=>{e.set(t,i);let s=a[t];if(s)for(let e of s)e(i,r)},c=()=>{if(!a7.has(e)&&(a7.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,l,o]),!ox)){let t=i.initFocus(setTimeout.bind(ot,oA.bind(ot,r,0))),s=i.initReconnect(setTimeout.bind(ot,oA.bind(ot,r,1)));n=()=>{t&&t(),s&&s(),a7.delete(e)}}};return c(),[e,s,c,n]}return[e,a7.get(e)[4]]},[oM,oV]=oC(new Map),oR=os({onLoadingSlow:oe,onSuccess:oe,onError:oe,onErrorRetry:(e,t,i,r,s)=>{let n=i.errorRetryCount,a=s.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*i.errorRetryInterval;(or(n)||!(a>n))&&setTimeout(r,o,s)},onDiscarded:oe,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ob?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:ob?5e3:3e3,compare:function e(t,i){var r,s;if(t===i)return!0;if(t&&i&&(r=t.constructor)===i.constructor){if(r===Date)return t.getTime()===i.getTime();if(r===RegExp)return t.toString()===i.toString();if(r===Array){if((s=t.length)===i.length)for(;s--&&e(t[s],i[s]););return -1===s}if(!r||"object"==typeof t){for(r in s=0,t)if(a8.call(t,r)&&++s&&!a8.call(i,r)||!(r in i)||!e(t[r],i[r]))return!1;return Object.keys(i).length===s}}return t!=t&&i!=i},isPaused:()=>!1,cache:oM,mutate:oV,fallback:{}},{isOnline:()=>oh,isVisible:()=>{let e=oc&&document.visibilityState;return or(e)||"hidden"!==e}}),oL=(e,t)=>{let i=os(e,t);if(t){let{use:r,fallback:s}=e,{use:n,fallback:a}=t;r&&n&&(i.use=r.concat(n)),s&&a&&(i.fallback=os(s,a))}return i},oD=(0,l.createContext)({});var oO=e.i(11671);let oF=ol&&window.__SWR_DEVTOOLS_USE__,oI=oF?window.__SWR_DEVTOOLS_USE__:[],oU=()=>{let e=(0,l.useContext)(oD);return(0,l.useMemo)(()=>os(oR,e),[e])},oB=oI.concat(e=>(t,i,r)=>{let s=i&&((...e)=>{let[r]=oN(t),[,,,s]=a7.get(oM);if(r.startsWith("$inf$"))return i(...e);let n=s[r];return or(n)?i(...e):(delete s[r],n)});return e(t,s,r)});oF&&(window.__SWR_DEVTOOLS_REACT__=l.default);let oz=()=>{},o$=oz(),o_=(new WeakMap,l.default.use||(e=>
9{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),oW={dedupe:!0},oY=Promise.resolve(ot),oH=()=>oe;oi.defineProperty(e=>{let{value:t}=e,i=(0,l.useContext)(oD),r="function"==typeof t,s=(0,l.useMemo)(()=>r?t(i):t,[r,i,t]),n=(0,l.useMemo)(()=>r?s:oL(i,s),[r,i,s]),a=s&&s.provider,o=(0,l.useRef)(ot);a&&!o.current&&(o.current=oC(a(n.cache||oM),s));let c=o.current;return c&&(n.cache=c[0],n.mutate=c[1]),oy(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,l.createElement)(oD.Provider,os(e,{value:n}))},"defaultValue",{value:oR});let oX=(s=(e,t,i)=>{let{cache:r,compare:s,suspense:n,fallbackData:a,revalidateOnMount:o,revalidateIfStale:c,refreshInterval:d,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:p,strictServerPrefetchWarning:m}=i,[f,g,x,y]=a7.get(r),[v,b]=oN(e),w=(0,l.useRef)(!1),k=(0,l.useRef)(!1),j=(0,l.useRef)(v),S=(0,l.useRef)(t),N=(0,l.useRef)(i),T=()=>N.current.isVisible()&&N.current.isOnline(),[P,E,A,C]=ou(r,v),M=(0,l.useRef)({}).current,V=or(a)?or(i.fallback)?ot:i.fallback[v]:a,R=(e,t)=>{for(let i in M)if("data"===i){if(!s(e[i],t[i])&&(!or(e[i])||!s($,t[i])))return!1}else if(t[i]!==e[i])return!1;return!0},L=!w.current,D=(0,l.useMemo)(()=>{let e=P(),i=C(),r=e=>{let i=os(e);return(delete i._k,(()=>{if(!v||!t||N.current.isPaused())return!1;if(L&&!or(o))return o;let e=or(V)?i.data:V;return or(e)||c})())?{isValidating:!0,isLoading:!0,...i}:i},s=r(e),n=e===i?s:r(i),a=s;return[()=>{let e=r(P());return R(e,a)?(a.data=e.data,a.isLoading=e.isLoading,a.isValidating=e.isValidating,a.error=e.error,a):(a=e,e)},()=>n]},[r,v]),O=(0,a9.useSyncExternalStore)((0,l.useCallback)(e=>A(v,(t,i)=>{R(i,t)||e()}),[r,v]),D[0],D[1]),F=f[v]&&f[v].length>0,I=O.data,U=or(I)?V&&"function"==typeof V.then?o_(V):V:I,B=O.error,z=(0,l.useRef)(U),$=p?or(I)?or(z.current)?U:z.current:I:U,_=v&&or(U),W=(0,l.useRef)(null);ox||(0,a9.useSyncExternalStore)(oH,()=>(W.current=!1,W),()=>(W.current=!0,W));let Y=W.current;m&&Y&&!n&&_&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let H=!(!v||!t||N.current.isPaused())&&(!F||!!or(B))&&(L&&!or(o)?o:n?!or(U)&&c:or(U)||c),X=L&&H,G=or(O.isValidating)?X:O.isValidating,q=or(O.isLoading)?X:O.isLoading,K=(0,l.useCallback)(async e=>{let t,r,n=S.current;if(!v||!n||k.current||N.current.isPaused())return!1;let a=!0,o=e||{},l=!x[v]||!o.dedupe,c=()=>og?!k.current&&v===j.current&&w.current:v===j.current,d={isValidating:!1,isLoading:!1},u=()=>{E(d)},h=()=>{let e=x[v];e&&e[1]===r&&delete x[v]},p={isValidating:!0};or(P().data)&&(p.isLoading=!0);try{if(l&&(E(p),i.loadingTimeout&&or(P().data)&&setTimeout(()=>{a&&c()&&N.current.onLoadingSlow(v,i)},i.loadingTimeout),x[v]=[n(b),oP()]),[t,r]=x[v],t=await t,l&&setTimeout(h,i.dedupingInterval),!x[v]||x[v][1]!==r)return l&&c()&&N.current.onDiscarded(v),!1;d.error=ot;let e=g[v];if(!or(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return u(),l&&c()&&N.current.onDiscarded(v),!1;let o=P().data;d.data=s(o,t)?o:t,l&&c()&&N.current.onSuccess(t,v,i)}catch(i){h();let e=N.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=i,l&&c())&&(e.onError(i,v,e),(!0===t||"function"==typeof t&&t(i))&&(!N.current.revalidateOnFocus||!N.current.revalidateOnReconnect||T())&&e.onErrorRetry(i,v,e,e=>{let t=f[v];t&&t[0]&&t[0](oO.ERROR_REVALIDATE_EVENT,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return a=!1,u(),!0},[v,r]),Z=(0,l.useCallback)((...e)=>oE(r,j.current,...e),[]);if(oy(()=>{S.current=t,N.current=i,or(I)||(z.current=I)}),oy(()=>{var e;let t;if(!v)return;let i=K.bind(ot,oW),r=0;N.current.revalidateOnFocus&&(r=Date.now()+N.current.focusThrottleInterval);let s=(e=(e,t={})=>{if(e==oO.FOCUS_EVENT){let e=Date.now();N.current.revalidateOnFocus&&e>r&&T()&&(r=e+N.current.focusThrottleInterval,i())}else if(e==oO.RECONNECT_EVENT)N.current.revalidateOnReconnect&&T()&&i();else if(e==oO.MUTATE_EVENT)return K();else if(e==oO.ERROR_REVALIDATE_EVENT)return K(t)},(t=f[v]||(f[v]=[])).push(e),()=>{let i=t.indexOf(e);i>=0&&(t[i]=t[t.length-1],t.pop())});if(k.current=!1,j.current=v,w.current=!0,E({_k:b}),H&&!x[v])if(or(U)||ox)i();else ol&&typeof window.requestAnimationFrame!=oo?window.requestAnimationFrame(i):setTimeout(i,1);return()=>{k.current=!0,s()}},[v]),oy(()=>{let e;function t(){let t="function"==typeof d?d(P().data):d;t&&-1!==e&&(e=setTimeout(i,t))}function i(){!P().error&&(u||N.current.isVisible())&&(h||N.current.isOnline())?K(oW).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}}
9,[d,u,h,v]),(0,l.useDebugValue)($),n){if(!og&&ox&&_)throw Error("Fallback data is required when using Suspense in SSR.");_&&(S.current=t,N.current=i,k.current=!1);let e=y[v];if(o_(!or(e)&&_?Z(e):oY),!or(B)&&_)throw B;let r=_?K(oW):oY;!or($)&&_&&(r.status="fulfilled",r.value=!0),o_(r)}return{mutate:Z,get data(){return M.data=!0,$},get error(){return M.error=!0,B},get isValidating(){return M.isValidating=!0,G},get isLoading(){return M.isLoading=!0,q}}},function(...e){let t=oU(),[i,r,n]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],a=oL(t,n),o=s,{use:l}=a,c=(l||[]).concat(oB);for(let e=c.length;e--;)o=c[e](o);return o(i,r||a.fetcher||null,a)});class oG extends Error{constructor(e,t){e instanceof Error?super(void 0,{cause:{err:e,...e.cause,...t}}):"string"==typeof e?(t instanceof Error&&(t={err:t,...t.cause}),super(e,t)):super(void 0,e),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);const i=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${i}`}}class oq extends oG{}async function oK(e,t,i,r={}){let s=`${oZ(t)}/${e}`;try{let e={headers:{"Content-Type":"application/json",...r?.headers?.cookie?{cookie:r.headers.cookie}:{}}};r?.body&&(e.body=JSON.stringify(r.body),e.method="POST");let t=await fetch(s,e),i=await t.json();if(!t.ok)throw i;return i}catch(e){return i.error(new oq(e.message,e)),null}}function oZ(e){return"u"<typeof window?`${e.baseUrlServer}${e.basePathServer}`:e.basePath}function oJ(e){let t=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let i=new URL(e||t),r=("/"===i.pathname?t.pathname:i.pathname).replace(/\/$/,""),s=`${i.origin}${r}`;return{origin:i.origin,host:i.host,path:r,base:s,toString:()=>s}}let oQ={baseUrl:oJ(er.default.env.NEXTAUTH_URL??er.default.env.VERCEL_URL).origin,basePath:oJ(er.default.env.NEXTAUTH_URL).path,baseUrlServer:oJ(er.default.env.NEXTAUTH_URL_INTERNAL??er.default.env.NEXTAUTH_URL??er.default.env.VERCEL_URL).origin,basePathServer:oJ(er.default.env.NEXTAUTH_URL_INTERNAL??er.default.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},o0=null,o1={debug:console.debug,error:console.error,warn:console.warn};async function o2(){let e=await oK("csrf",oQ,o1);return e?.csrfToken??""}async function o5(){return oK("providers",oQ,o1)}async function o4(e,t,i){let{callbackUrl:r,...s}=t??{},{redirect:n=!0,redirectTo:a=r??window.location.href,...o}=s,l=oZ(oQ),c=await o5();if(!c){let e=`${l}/error`;window.location.href=e;return}if(!e||!c[e]){let e=`${l}/signin?${new URLSearchParams({callbackUrl:a})}`;window.location.href=e;return}let d=c[e].type;if("webauthn"===d)throw TypeError(`Provider id "${e}" refers to a WebAuthn provider. 10Please use \`import { signIn } from "next-auth/webauthn"\` instead.`);let u=`${l}/${"credentials"===d?"callback":"signin"}/${e}`,h=await o2(),p=await fetch(`${u}?${new URLSearchParams(i)}`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...o,csrfToken:h,callbackUrl:a})}),m=await p.json();if(n){let e=m.url??a;window.location.href=e,e.includes("#")&&window.location.reload();return}let f=new URL(m.url).searchParams.get("error")??void 0,g=new URL(m.url).searchParams.get("code")??void 0;return p.ok&&await oQ._getSession({event:"storage"}),{error:f,code:g,status:p.status,ok:p.ok,url:f?null:m.url}}async function o3(e){let{redirect:t=!0,redirectTo:i=e?.callbackUrl??window.location.href}=e??{},r=oZ(oQ),s=await o2(),n=await fetch(`${r}/signout`,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:s,callbackUrl:i})}),a=await n.json();if((null===o0&&(o0="u"<typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{},name:"next-auth",onmessage:null,onmessageerror:null,close:()=>{},dispatchEvent:()=>!1}:new BroadcastChannel("next-auth")),o0).postMessage({event:"session",data:{trigger:"signout"}}),t){let e=a.url??i;window.location.href=e,e.includes("#")&&window.location.reload();return}return await oQ._getSession({event:"storage"}),a}l.createContext?.(void 0);let o6=n_("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),o9=n_("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),o8=n_("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),o7=e=>fetch(e).then(e=>e.json());function le(){let[e,t]=(0,l.useState)(""),[i,r]=(0,l.useState)(!1),[s,n]=(0,l.useState)(!1),[a,c]=(0,l.useState)(!1),{data:d,mutate:u}=oX("/api/settings",o7),{mutate:h}=oU(),[p,m]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),x=async()=>
10{if(e){r(!0);try{let i=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:e})}),r=await i.json();i.ok?(await u(),await h("/api/usage"),t(""),m(!1)):alert(r.error||"Failed to save API key")}catch{alert("Error saving API key")}finally{r(!1)}}},y=async()=>{if(confirm("Are you sure you want to delete your API key? This will stop all searches.")){n(!0);try{(await fetch("/api/settings",{method:"DELETE"})).ok&&(await u(),await h("/api/usage"),m(!1))}catch{alert("Error deleting API key")}finally{n(!1)}}},v=async()=>{g(!0);try{let e=await fetch("/api/billing/portal",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||"Unable to open billing portal");window.location.href=t.url}catch(e){alert(e instanceof Error?e.message:"Unable to open billing portal"),g(!1)}},b=d?.connected,w=p||!b;return(0,o.jsxs)("div",{className:"space-y-6",children:[(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,o.jsxs)("h2",{className:"text-2xl font-black flex items-center gap-3 text-white tracking-tight",children:[(0,o.jsx)(nq,{className:"w-6 h-6 text-blue-400 fill-blue-400/20"}),"Connect Firecrawl API"]}),(0,o.jsx)("button",{type:"button",onClick:v,disabled:f,className:"px-4 py-2 border border-white/10 rounded-xl text-[10px] text-gray-300 hover:text-white hover:bg-white/5 font-black uppercase tracking-widest transition-all disabled:opacity-50",children:f?"Opening...":"Manage Billing"})]}),(0,o.jsx)("p",{className:"text-gray-400 text-sm font-medium leading-relaxed",children:"Paste your Firecrawl API key below to power your searches. Updates take effect instantly."})]}),(0,o.jsxs)("div",{className:"bg-white/5 border border-white/10 rounded-3xl p-8 space-y-6 backdrop-blur-sm",children:[!w&&b?(0,o.jsx)("div",{className:"flex flex-col gap-4",children:(0,o.jsxs)("div",{className:"flex items-center justify-between bg-white/[0.02] border border-white/10 rounded-2xl p-6",children:[(0,o.jsxs)("div",{className:"flex items-center gap-4 overflow-hidden",children:[(0,o.jsx)("div",{className:"bg-green-500/10 p-3 rounded-2xl flex-shrink-0",children:(0,o.jsx)(n1,{className:"w-6 h-6 text-green-400"})}),(0,o.jsxs)("div",{className:"overflow-hidden",children:[(0,o.jsx)("p",{className:"text-white font-extrabold text-sm tracking-wide uppercase opacity-90",children:"Firecrawl Connected"}),(0,o.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,o.jsx)("p",{className:"text-gray-400 text-sm font-mono tracking-tighter truncate max-w-[200px]",children:a?d.apiKey:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"}),(0,o.jsx)("button",{onClick:()=>c(!a),className:"p-1 hover:bg-white/5 rounded-md transition-colors text-gray-400",children:a?(0,o.jsx)(o9,{className:"w-4 h-4"}):(0,o.jsx)(o6,{className:"w-4 h-4"})})]})]})]}),(0,o.jsxs)("div",{className:"flex items-center gap-4 flex-shrink-0 ml-4",children:[(0,o.jsx)("button",{onClick:()=>{m(!0),t(d?.apiKey||""),c(!1)},className:"text-[10px] text-gray-500 hover:text-white font-black uppercase tracking-widest transition-all",children:"Edit Key"}),(0,o.jsx)("div",{className:"w-[1px] h-6 bg-white/10"}),(0,o.jsx)("a",{href:"https://firecrawl.dev/app/api-keys",target:"_blank",className:"text-[10px] text-blue-400 hover:text-blue-300 font-black uppercase tracking-widest transition-all",children:"Get Key â"}),(0,o.jsx)("div",{className:"w-[1px] h-6 bg-white/10"}),(0,o.jsxs)("button",{disabled:s,onClick:y,className:"px-4 py-2 text-xs text-red-400 font-bold hover:bg-red-400/10 rounded-xl transition-all flex items-center gap-2 border border-red-400/20",children:[s?(0,o.jsx)(nH,{className:"w-3 h-3 animate-spin"}):(0,o.jsx)(o8,{className:"w-3 h-3"}),"Delete"]})]})]})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("p",{className:"text-xs font-black text-gray-500 uppercase tracking-widest",children:"Setup Guide"}),(0,o.jsxs)("div",{className:"flex items-center gap-4",children:[(0,o.jsx)("a",{href:"https://firecrawl.dev/app/api-keys",target:"_blank",className:"text-[10px] font-black text-blue-400 hover:text-blue-300 uppercase tracking-widest transition-all",children:"Get Key â"}),(0,o.jsx)("a",{href:"https://firecrawl.dev/pricing",target:"_blank",className:"text-[10px] font-black text-purple-400 hover:text-purple-300 uppercase tracking-widest transition-all",children:"Pricing â"})]})]}),(0,o.jsxs)("ol",{className:"text-xs text-gray-400 list-decimal list-inside space-y-2 font-bold bg-white/[0.02] p-4 rounded-2xl border border-white/5",children:[(0,o.jsxs)("li",{children:["Create an account at ",(0,o.jsx)("span",{className:"text-white",children:"firecrawl.dev"})]}),(0,o.jsxs)("li",{children:["Go to the ",(0,o.jsx)("span",{className:"text-white",children:"API Keys"})," section in your dashboard"]}),(0,o.jsx)("li",{children:"Copy your key and paste it below to enable searching"})]})]}),(0,o.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,o.jsxs)("div",{className:"relative flex-1",children:[(0,o.jsx)("input",{type:a?"text":"password",placeholder:"Paste fc-xxxx here",value:e,onCh
10ange:e=>t(e.target.value),className:"w-full bg-gray-950 border border-white/10 rounded-xl pl-4 pr-10 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition-colors font-mono"}),(0,o.jsx)("button",{type:"button",onClick:()=>c(!a),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-white transition-colors",children:a?(0,o.jsx)(o9,{className:"w-4 h-4"}):(0,o.jsx)(o6,{className:"w-4 h-4"})})]}),(0,o.jsx)("button",{disabled:i,onClick:x,className:"px-6 py-3 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-500 text-white rounded-xl font-black uppercase tracking-widest text-xs transition-all flex items-center gap-2",children:i?(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}):"Save API Key"})]}),b&&(0,o.jsx)("button",{onClick:()=>{m(!1),t(""),c(!1)},className:"text-[10px] text-gray-500 hover:text-gray-400 font-black uppercase tracking-widest transition-colors text-left",children:"â Keep current key"})]}),d&&!b&&(0,o.jsxs)("div",{className:"flex items-center gap-2 pt-2 bg-red-400/5 p-4 rounded-2xl border border-red-400/10",children:[(0,o.jsx)("span",{className:"text-gray-400 text-xs font-black uppercase tracking-widest",children:"Status:"}),"quota_exceeded"===d.status?(0,o.jsxs)("span",{className:"text-yellow-400 text-xs flex items-center gap-1.5 font-black uppercase tracking-widest",children:[(0,o.jsx)(nQ,{className:"w-4 h-4"})," Quota exceeded"]}):(0,o.jsxs)("span",{className:"text-red-400 text-xs flex items-center gap-1.5 font-black uppercase tracking-widest",children:[(0,o.jsx)(n2,{className:"w-4 h-4"})," ",d.apiKey?"Invalid key":"Not Connected"]})]})]})]})}let lt=n_("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),li=n_("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),lr=e=>fetch(e).then(e=>e.json());function ls(){let{data:e,mutate:t}=oX("/api/usage",lr,{refreshInterval:3e4}),i=e?.percent||0,r=e?.status||"normal",s=e?.connected;return(0,o.jsxs)("div",{className:"bg-white/5 border border-white/10 rounded-3xl p-8 space-y-8 backdrop-blur-sm shadow-2xl",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{className:"space-y-1",children:[(0,o.jsxs)("h3",{className:"text-2xl font-black flex items-center gap-3 text-white tracking-tight",children:[(0,o.jsx)(lt,{className:"w-7 h-7 text-blue-400"}),"Usage Overview"]}),(0,o.jsx)("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest max-w-[280px] leading-relaxed",children:"Track your Firecrawl credit consumption in real time."})]}),(0,o.jsx)("button",{onClick:()=>t(),className:"p-2.5 hover:bg-white/5 rounded-2xl transition-all text-gray-400 hover:text-white group border border-transparent hover:border-white/10 shrink-0",title:"Sync Usage",children:(0,o.jsx)(n5,{className:"w-5 h-5 group-active:rotate-180 transition-transform duration-500"})})]}),(0,o.jsxs)("div",{className:"space-y-6",children:[(0,o.jsxs)("div",{className:"flex justify-between items-end",children:[(0,o.jsxs)("div",{className:"space-y-1",children:[(0,o.jsx)("p",{className:"text-[10px] font-black text-gray-500 uppercase tracking-widest",children:"Plan Usage"}),(0,o.jsxs)("p",{className:"text-4xl font-black text-white leading-none tracking-tighter",children:[s?e?.used:0,(0,o.jsxs)("span",{className:"text-gray-500 text-xl font-bold ml-3 italic",children:["/ ",s?e?.limit:0]})]})]}),(0,o.jsx)("div",{className:"text-right",children:(0,o.jsxs)("p",{className:"text-xs font-black text-gray-500 uppercase tracking-[0.2em]",children:[s?e?.remaining:0," LEFT"]})})]}),(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)("div",{className:"flex justify-between items-center",children:(0,o.jsx)("span",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest",children:s?`You've used ${i}% of monthly usage`:"No API key connected"})}),(0,o.jsx)("div",{className:"h-4 bg-white/[0.03] rounded-full overflow-hidden border border-white/5 p-1",children:(0,o.jsx)(nA.div,{initial:{width:0},animate:{width:`${s?i:0}%`},className:function(...e){return a6(n6(e))}("h-full rounded-full transition-all duration-700 ease-out","normal"===r&&"bg-gradient-to-r from-blue-600 to-blue-400 shadow-[0_0_20px_rgba(59,130,246,0.4)]","warning"===r&&"bg-gradient-to-r from-yellow-600 to-yellow-400 shadow-[0_0_20px_rgba(234,179,8,0.4)]","critical"===r&&"bg-gradient-to-r from-red-600 to-red-400 shadow-[0_0_20px_rgba(239,68,68,0.4)]")})})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-4 pt-2",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3 text-blue-400 bg-blue-400/5 py-3 px-4 roun
10ded-2xl border border-blue-400/10 w-fit",children:[(0,o.jsx)(li,{className:"w-4 h-4"}),(0,o.jsxs)("span",{className:"text-sm font-bold tracking-tight",children:["Approx. ",s?e?.estimatedSearches:0," searches left"]})]}),s?(0,o.jsx)("div",{children:(0,o.jsx)("a",{href:"https://firecrawl.dev/pricing",target:"_blank",className:"w-full py-4 bg-blue-600 hover:bg-blue-500 text-white rounded-2xl text-center font-black transition-all hover:scale-[1.01] active:scale-[0.99] block tracking-widest uppercase text-xs shadow-lg shadow-blue-900/20",children:"Upgrade Firecrawl Plan"})}):(0,o.jsx)("div",{className:"bg-white/[0.02] border border-white/10 rounded-2xl p-6 text-center",children:(0,o.jsx)("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-widest leading-relaxed",children:"Connect your Firecrawl API key to track credits."})})]})]})]})}var ln=e.i(18566);let la=n_("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),lo=n_("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),ll=n_("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),lc=n_("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),ld=n_("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),lu="bgcheck_pending_checkout";function lh(e){return e.trim().toLowerCase()}function lp(e){window.localStorage.setItem(lu,JSON.stringify(e))}function lm(){window.localStorage.removeItem(lu)}function lf({email:e,name:t}){let[i,r]=(0,l.useState)(!1),[s,n]=(0,l.useState)(null),a=(0,ln.usePathname)(),c=(0,ln.useSearchParams)(),d=c.get("checkout_return"),u=c.get("payment_status"),h=c.get("payment_id"),p=c.get("status"),m=c.get("email"),f=c.get("checkout_session_id"),g="1"===d||!!f||!!u||!!(h&&p);(0,l.useEffect)(()=>{let t=function(){let e=window.localStorage.getItem(lu);if(!e)return null;try{let t=JSON.parse(e);if(!t.sessionId||!t.createdAt||Date.now()-t.createdAt>18e5)return window.localStorage.removeItem(lu),null;return t}catch{return window.localStorage.removeItem(lu),null}}();if(h&&p){let e=new URL("/api/billing/confirm",window.location.origin);e.searchParams.set("payment_id",h),e.searchParams.set("status",p);let i=m||t?.email;i&&e.searchParams.set("email",i),window.location.assign(e.toString());return}let i=f?{sessionId:f,email:lh(m||t?.email||e||"")||null,createdAt:Date.now()}:t;if(!i){n(null),g&&window.history.replaceState({},"",a);return}if(lp(i),g&&window.history.replaceState({},"",a),"failed"===u){lm(),n("Payment status: failed. Access is only granted after a successful payment.");return}let r=async()=>{try{let e=new URL("/api/billing/status",window.location.origin);e.searchParams.set("checkout_session_id",i.sessionId),i.email&&e.searchParams.set("email",i.email);let t=await fetch(e.toString(),{cache:"no-store"}),r=await t.json();if(r.hasAccess){lm(),window.location.assign("/");return}if("failed"===r.status||"cancelled"===r.status){lm(),n(`Payment status: ${r.status}. Access is only granted after a successful payment.`);return}n(`Payment status: ${r.status||"pending"}. Verifying your payment...`)}catch{n("Payment status: pending. Verifying your payment...")}};r();let s=window.setInterval(()=>{r()},2e3);return()=>window.clearInterval(s)},[f,m,h,p,e,g,a,u]);let x=async()=>{let t=lh(e);if(!t)return void alert("Enter the paid email you want attached to this checkout.");r(!0),n(null);try{let e=await fetch("/api/billing/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t})}),i=await e.json();if(!e.ok)throw Error(i.error||"Unable to start checkout");if(i.restoredAccess&&i.redirectTo){window.location.href=i.redirectTo;return}i.sessionId&&lp({sessionId:i.sessionId,email:t,createdAt:Date.now()}),window.location.href=i.url}catch(e){alert(e instanceof Error?e.message:"Unable to start checkout"),r(!1)}};return(0,o.jsxs)("main",{className:"min-h-screen bg-[#030712] text-white selection:bg-blue-500/30",children:[(0,o.jsxs)("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[(0,o.jsx)("div",{className:"absolute top-[-10%] left-[-10%] w-[40%] h-[40%] bg-blue-600/10 blur-[120px] rounded-full"}),(0,o.jsx)("div",{className:"absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-cyan-500/10 blur-[120px] rounded-full"})]}),(0,o.jsx)("div",{className:"relative z-10 max-w-5xl mx-auto px-6 py-16",children:(0,o.jsxs)("div",{className:"grid gap-8 lg:grid-cols-[1.2fr_0.8fr] items-stretch",children:[(0,o.jsxs)("section",{className:"bg-gray-900/50 border border-white/5 backdrop-blur-xl rounded-3xl p-8 md:p-12 shadow-2xl",children:[(0,o.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-400 text-xs font-black uppercase tracking-widest mb-6",children:[(0,o.jsx)(ll,{className:"w-4 h-4"}),"Access Locked"]}),(0,o.jsx)("h1",{className:"text-4xl md:text-5xl font-black tracking-tighter bg-gradient-to-b from-white to-gray-400 bg-clip-text text-transparent",children:"Subscribe to unlock the extractor"}),(0,o.jsxs)("div",{className:"mt-10 grid gap-4 md:grid-cols-3",children:[(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(lo,{className:"w-5 h-5 text-blue-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Excel processing"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Upload spreadsheets and process rows in bulk instead of searching records one by one."})]}),(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(ld,{className:"w-5 h-5 text-green-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Contact extraction"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Find owner names, phone numbers, and contact details from the background check workflow."})]}),(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(la,{className:"w-5 h-5 text-cyan-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Export results"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Download enriched output files after the checker finishes processing your uploaded data."})]})]})]}),(0,o.jsxs)("aside",{className:"bg-white/5 border border-white/10 rounded-3xl p-8 backdrop-blur-sm shadow-2xl flex flex-col justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-blue-400",children:"Checkout"}),(0,o.jsx)("h2",{className:"mt-3 text-2xl font-black tracking-tight",children:"Start paid access"}),(0,o.jsx)("p",{className:"mt-3 text-sm text-gray-400 leading-relaxed",children:"You are signed in as the account below. Returning paid users are restored directly, and unpaid users continue to checkout with this same email."}),s?(0,o.jsx)("div",{className:"mt-4 rounded-2xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-200",children:s}):null,(0,o.jsxs)("div",{className:"mt-8 space-y-4",children:[(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-gray-950 px-4 py-4",children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Signed in account"}),(0,o.jsx)("p",{className:"mt-2 text-sm font-semibold text-white",children:t||e}),(0,o.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:e})]}),(0,o.jsxs)("button",{type:"button",onClick:x,disabled:i,className:"w-full py-4 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-500 text-white rounded-2xl font-black uppercase tracking-widest text-xs transition-all flex items-center justify-center gap-2",children:[i?(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}):(0,o.jsx)(lo,{className:"w-4 h-4"}),"Pay and unlock"]}),(0,o.jsxs)("button",{type:"button",onClick:()=>o3({callbackUrl:"/"}),className:"w-full py-4 bg-white/5 hover:bg-white/10 text-white rounded-2xl font-black uppercase tracking-widest text-xs transition-all flex items-center justify-center gap-2 border border-white/10",children:[(0,o.jsx)(lc,{className:"w-4 h-4"}),"Sign out"]})]})]}),(0,o.jsxs)("div",{className:"mt-10 rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Flow"}),(0,o.jsx)("p",{className:"mt-3 text-sm text-gray-300 leading-relaxed",children:"Checkout redirects back here after payment, then the app grants a signed access session on Vercel."})]})]})]})})]})}let lg=n_("chromium",[["path",{d:"M10.88 21.94 15.46 14",key:"xkve6t"}],["path",{d:"M21.17 8H12",key:"19dcdn"}],["path",{d:"M3.95 6.06 8.54 14",key:"g8jz9m"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);function lx({tone:e,message:t}){return(0,o.jsx)("div",{className:`mt-4 rounded-2xl px-4 py-3 text-sm ${"error"===e?"border border-red-500/20 bg-red-500/10 text-red-100":"success"===e?"border border-green-500/20 bg-green-500/10 text-green-100":"border border-blue-500/20 bg-blue-500/10 text-blue-100"}`,children:t})}function ly({providers:e}){let[t,i]=(0,l.useState)("login"),[r,s]=(0,l.useState)(""),[n,a]=(0,l.useState)(""),[c,d]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[p,m]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[x,y]=(0,l.useState)(null),[v,b]=(0,l.useState)("info"),w=(0,ln.usePathname)(),k=(0,ln.useRouter)(),j=(0,ln.useSearchParams)();(0,l.useEffect)(()=>{let e=j.get("auth_status"),t=j.get("email");e&&("verified"===e?(i("login"),d(t||""),b("success"),y("Email verified. You can sign in now.")):"verify-error"===e&&(b("error"),y("Verification link is invali
10d or has expired. Create the account again to receive a new link.")),k.replace(w))},[w,k,j]);let S=async()=>{let e=c.trim().toLowerCase();if(!r.trim()||!n.trim()||!e||!u){b("error"),y("First name, last name, email, and password are required.");return}m(!0),y(null);try{let t=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:r,lastName:n,email:e,password:u})}),s=await t.json();if(!t.ok)throw Error(s.error||"Unable to create account.");b("success"),y(s.verificationFallback?"Account created. Email delivery failed locally, so the verification link was printed in the terminal.":s.emailDeliveryConfigured?"Account created. Check your inbox and verify your email before signing in.":"Account created. Verification link printed in the terminal for local development."),i("login")}catch(e){b("error"),y(e instanceof Error?e.message:"Unable to create account.")}finally{m(!1)}},N=async()=>{let e=c.trim().toLowerCase();if(!e||!u){b("error"),y("Enter your email and password to sign in.");return}m(!0),y(null);try{let t=await o4("email-password",{email:e,password:u,redirect:!1,redirectTo:"/"});if(t?.error)throw Error(t.error);window.location.assign(t?.url||"/")}catch{b("error"),y("Invalid credentials or email not verified yet."),m(!1)}},T=async()=>{if(!e?.google){b("error"),y("Google sign-in is not configured yet.");return}g(!0),y(null);try{await o4("google",{redirectTo:"/"})}finally{g(!1)}};return(0,o.jsxs)("main",{className:"min-h-screen bg-[#030712] text-white selection:bg-blue-500/30",children:[(0,o.jsxs)("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[(0,o.jsx)("div",{className:"absolute top-[-10%] left-[-10%] w-[40%] h-[40%] bg-blue-600/10 blur-[120px] rounded-full"}),(0,o.jsx)("div",{className:"absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-cyan-500/10 blur-[120px] rounded-full"})]}),(0,o.jsx)("div",{className:"relative z-10 max-w-5xl mx-auto px-6 py-16",children:(0,o.jsxs)("div",{className:"grid gap-8 lg:grid-cols-[1.15fr_0.85fr] items-stretch",children:[(0,o.jsxs)("section",{className:"bg-gray-900/50 border border-white/5 backdrop-blur-xl rounded-3xl p-8 md:p-12 shadow-2xl",children:[(0,o.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-400 text-xs font-black uppercase tracking-widest mb-6",children:[(0,o.jsx)(ld,{className:"w-4 h-4"}),"Sign in required"]}),(0,o.jsx)("h1",{className:"text-4xl md:text-5xl font-black tracking-tighter bg-gradient-to-b from-white to-gray-400 bg-clip-text text-transparent",children:"Sign in before accessing the extractor"}),(0,o.jsx)("p",{className:"mt-5 max-w-2xl text-base text-gray-400 leading-relaxed",children:"Create an account with your name, email, and password. You must verify that email before you can sign in and use the paid extractor."}),(0,o.jsxs)("div",{className:"mt-10 grid gap-4 md:grid-cols-3",children:[(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(nX,{className:"w-5 h-5 text-blue-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Account signup"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Collect first name, last name, email, and password before activation."})]}),(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(ld,{className:"w-5 h-5 text-green-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Email verification"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Only verified accounts can sign in with their password."})]}),(0,o.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[(0,o.jsx)(lg,{className:"w-5 h-5 text-cyan-400"}),(0,o.jsx)("p",{className:"mt-4 text-xs font-black uppercase tracking-widest text-gray-500",children:"Google sign-in"}),(0,o.jsx)("p",{className:"mt-2 text-sm text-gray-300 leading-relaxed",children:"Customers can also continue with Google once OAuth credentials are configured."})]})]})]}),(0,o.jsx)("aside",{className:"bg-white/5 border border-white/10 rounded-3xl p-8 backdrop-blur-sm shadow-2xl flex flex-col justify-between",children:(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-blue-400",children:"Authentication"}),(0,o.jsx)("h2",{className:"mt-3 text-2xl font-black tracking-tight",children:"signup"===t?"Create your account":"Sign in to your account"}),(0,o.jsx)("p",{className:"mt-3 text-sm text-gray-400 leading-relaxed",children:"signup"===t?"Create an account first. After email verification, come back here and sign in with the same credentials.":"Use your verified email and password, or continue with Google if it is configured."}),x?(0,o.jsx)(lx,{tone:v,message:x}):null,(0,o.jsxs)("div",{className:"mt-6 inline-flex rounded-2xl border border-white/10 bg-white/5 p-1",children:[(0,o.jsx)("button",{type:"button",onClick:()=>{i("login"),y(null)},className:`px-4 py-2 rounded-xl text-xs font-black uppercase tracking-widest transition-colors ${"login"===t?"bg-blue-600 text-white":"text-gray-400 hover:text-white"}`,children:"Login"}),(0,o.jsx)("button",{type:"button",onClick:()=>{i("signup"),y(null)},className:`px-4 py-2 rounded-xl text-xs font-black uppercase tracking-widest transition-colors ${"signup"===t?"bg-blue-600 text-white":"text-gray-400 hover:text-white"}`,children:"Sign up"})]}),(0,o.jsxs)("div",{className:"mt-8 space-y-4",children:["signup"===t?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"First name"}),(0,o.jsx)("input",{type:"text",value:r,onChange:e=>{s(e.target.value),y(null)},placeholder:"Abhishek",className:"mt-2 w-full bg-gray-950 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition-colors"})]}),(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Last name"}),(0,o.jsx)("input",{type:"text",value:n,onChange:e=>{a(e.target.value),y(null)},placeholder:"Rathi",className:"mt-2 w-full bg-gray-950 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition-colors"})]})]})}):null,(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Email address"}),(0,o.jsx)("input",{type:"email",value:c,onChange:e=>{d(e.target.value),y(null)},placeholder:"[email protected]",className:"mt-2 w-full bg-gray-950 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition-colors"})]}),(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Password"}),(0,o.jsx)("input",{type:"password",value:u,onChange:e=>{h(e.target.value),y(null)},placeholder:"Minimum 8 characters",className:"mt-2 w-full bg-gray-950 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-blue-500/50 transition-colors"})]}),(0,o.jsxs)("button",{type:"button",onClick:"signup"===t?S:N,disabled:p,className:"w-full py-4 bg-blue-600 hover:bg-blue-500 disabled:bg-gray-800 disabled:text-gray-500 text-white rounded-2xl font-black uppercase tracking-widest text-xs transition-all flex items-center justify-center gap-2",children:[p?(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}):(0,o.jsx)(nX,{className:"w-4 h-4"}),"signup"===t?"Create account":"Login"]}),(0,o.jsxs)("button",{type:"button",onClick:T,disabled:f,className:"w-full py-4 bg-white/5 hover:bg-white/10 disabled:bg-gray-900 disabled:text-gray-600 text-white rounded-2xl font-black uppercase tracking-widest text-xs transition-all flex items-center justify-center gap-2 border border-white/10",children:[f?(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}):(0,o.jsx)(lg,{className:"w-4 h-4"}),"Continue with Google"]})]})]})})]})})]})}let lv=n_("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),lb=n_("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),lw=e=>fetch(e).then(e=>e.json());function lk(){let{data:e,isLoading:t}=oX("/api/history",lw),i=e?.history||[];return(0,o.jsxs)("div",{className:"bg-gray-900/50 border border-white/5 backdrop-blur-xl rounded-3xl p-8 md:p-12 shadow-2xl",children:[(0,o.jsx)("div",{className:"flex items-start justify-between gap-4",children:(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-400 text-xs font-black uppercase tracking-widest",children:[(0,o.jsx)(lb,{className:"w-4 h-4"}),"Run history"]}),(0,o.jsx)("h2",{className:"text-3xl font-black tracking-tight text-white",children:"Past extraction runs"}),(0,o.jsx)("p",{className:"max-w-2xl text-sm text-gray-400 leading-relaxed",children:"View your previous uploads, successful downloads, and failed runs without spending credits on the same file again."})]})}),t?(0,o.jsxs)("div",{className:"mt-10 flex items-center gap-3 text-sm font-black uppercase tracking-widest text-blue-400",children:[(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}),"Loading history"]}):0===i.length?(0,o.jsxs)("div",{className:"mt-10 rounded-3xl border border-white/10 bg-white/[0.03] p-8 text-center",children:[(0,o.jsx)("p",{className:"text-white font-black uppercase tracking-widest text-sm",children:"No past runs yet"}),(0,o.jsx)("p",{className:"mt-3 text-sm text-gray-400",children:"Run an extraction once and it will appear here for future download."})]}):(0,o.jsx)("div",{className:"mt-10 space-y-4",children:i.map(e=>{var t;return(0,o.jsx)("div",{className:"rounded-3xl border border-white/10 bg-white/[0.03] p-6",children:(0,o.jsxs)("div",{className:"flex flex-col gap-5 md:flex-row md:items-start md:justify-between",children:[(0,o.jsxs)("div",{className:"flex items-start gap-4",children:[(0,o.jsx)("div",{className:`rounded-2xl p-3 ${"completed"===e.status?"bg-green-500/10":"bg-red-500/10"}`,children:"completed"===e.status?(0,o.jsx)(lv,{className:"w-6 h-6 text-green-400"}
10):(0,o.jsx)(nQ,{className:"w-6 h-6 text-red-400"})}),(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-white font-black text-lg tracking-tight",children:e.fileName}),(0,o.jsxs)("p",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-gray-500 mt-1",children:["completed"===e.status?"Completed":"Failed"," on ",(t=e.completedAt,new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(t)))]})]}),(0,o.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,o.jsxs)("div",{className:"rounded-2xl bg-white/5 px-4 py-3",children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Rows"}),(0,o.jsx)("p",{className:"mt-1 text-white font-black",children:e.rowCount})]}),(0,o.jsxs)("div",{className:"rounded-2xl bg-white/5 px-4 py-3",children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Processed"}),(0,o.jsx)("p",{className:"mt-1 text-white font-black",children:e.processedRows})]}),(0,o.jsxs)("div",{className:"rounded-2xl bg-white/5 px-4 py-3",children:[(0,o.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-500",children:"Credits charged"}),(0,o.jsx)("p",{className:"mt-1 text-white font-black",children:e.creditsCharged})]})]}),e.error?(0,o.jsx)("div",{className:"rounded-2xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-100",children:e.error}):null]})]}),(0,o.jsx)("div",{className:"flex flex-col gap-3 md:items-end",children:e.canDownload?(0,o.jsxs)("a",{href:`/api/history/${e.id}`,className:"inline-flex items-center justify-center gap-2 rounded-2xl bg-blue-600 px-5 py-3 text-xs font-black uppercase tracking-widest text-white transition-colors hover:bg-blue-500",children:[(0,o.jsx)(nY,{className:"w-4 h-4"}),"Download result"]}):(0,o.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-2xl border border-white/10 px-4 py-3 text-[10px] font-black uppercase tracking-widest text-gray-500",children:[(0,o.jsx)(n4,{className:"w-4 h-4"}),"No output file"]})})]})},e.id)})})]})}function lj(...e){return a6(n6(e))}let lS=e=>fetch(e).then(e=>e.json());function lN(){let[e,t]=(0,l.useState)("extract"),[i,r]=(0,l.useState)(null),[s,n]=(0,l.useState)(!1),[a,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(null),[h,p]=(0,l.useState)(null),{data:m,isLoading:f}=oX("/api/access",lS),{data:g,mutate:x}=oX(m?.hasAccess?"/api/usage":null,lS),{data:y}=oX(m?.hasAccess?"/api/settings":null,lS),v=()=>{r(null),u(null),p(null),n(!1),c(!1)},b=async e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0];r(t),p(null),u(null),c(!0);let i=new FormData;i.append("file",t);try{let e=await fetch("/api/estimate",{method:"POST",body:i}),t=await e.json();u(t)}catch(e){console.error("Estimation failed",e)}finally{c(!1)}}},w=async()=>{if(!i||!d?.canProceed)return;n(!0),p(null);let e=new FormData;e.append("file",i);try{let t=await fetch("/api/process",{method:"POST",body:e});if(!t.ok){if((t.headers.get("content-type")||"").includes("application/json")){let e=await t.json();throw Error(e.error||"Processing failed")}let e=await t.text();throw Error(e||"Processing failed")}let i=await t.blob(),r=window.URL.createObjectURL(i);p(r),x()}catch(t){console.error(t);let e=String(t.message||"Something went wrong during processing.");
10alert(/<html|<!doctype|not valid json|unexpected token/i.test(e)?"The extraction request failed before the server returned a normal response. Please try again with a smaller file while we continue improving long-running job handling.":e)}finally{n(!1)}};return f?(0,o.jsx)("main",{className:"min-h-screen bg-[#030712] text-white flex items-center justify-center",children:(0,o.jsxs)("div",{className:"flex items-center gap-3 text-sm font-black uppercase tracking-widest text-blue-400",children:[(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin"}),"Checking access"]})}):m?.authenticated?m?.hasAccess?(0,o.jsxs)("main",{className:"min-h-screen bg-[#030712] text-white selection:bg-blue-500/30",children:[(0,o.jsxs)("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[(0,o.jsx)("div",{className:"absolute top-[-10%] left-[-10%] w-[40%] h-[40%] bg-blue-600/10 blur-[120px] rounded-full"}),(0,o.jsx)("div",{className:"absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-purple-600/10 blur-[120px] rounded-full"})]}),(0,o.jsxs)("div",{className:"relative z-10 max-w-6xl mx-auto px-6 py-12",children:[(0,o.jsx)("div",{className:"flex justify-center mb-12",children:(0,o.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,o.jsxs)("div",{className:"bg-white/5 p-1 rounded-2xl border border-white/10 flex gap-1",children:[(0,o.jsxs)("button",{onClick:()=>t("extract"),className:lj("px-6 py-2 rounded-xl text-sm font-black uppercase tracking-widest transition-all flex items-center gap-2","extract"===e?"bg-blue-600 text-white shadow-lg shadow-blue-500/20":"text-gray-400 hover:text-white"),children:[(0,o.jsx)(nJ,{className:"w-4 h-4"}),"Extraction"]}),(0,o.jsxs)("button",{onClick:()=>t("settings"),className:lj("px-6 py-2 rounded-xl text-sm font-black uppercase tracking-widest transition-all flex items-center gap-2","settings"===e?"bg-blue-600 text-white shadow-lg shadow-blue-500/20":"text-gray-400 hover:text-white"),children:[(0,o.jsx)(nZ,{className:"w-4 h-4"}),"Settings"]}),(0,o.jsxs)("button",{onClick:()=>t("history"),className:lj("px-6 py-2 rounded-xl text-sm font-black uppercase tracking-widest transition-all flex items-center gap-2","history"===e?"bg-blue-600 text-white shadow-lg shadow-blue-500/20":"text-gray-400 hover:text-white"),children:[(0,o.jsx)(n5,{className:"w-4 h-4"}),"History"]})]}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-3 text-sm",children:[(0,o.jsxs)("div",{className:"rounded-full border border-white/10 bg-white/5 px-4 py-2 text-gray-300",children:["Signed in as ",(0,o.jsx)("span",{className:"font-semibold text-white",children:m?.user?.email})]}),(0,o.jsx)("button",{type:"button",onClick:()=>o3({callbackUrl:"/"}),className:"rounded-full border border-white/10 bg-white/5 px-4 py-2 text-xs font-black uppercase tracking-widest text-gray-300 hover:bg-white/10 hover:text-white transition-colors",children:"Sign out"})]})]})}),(0,o.jsxs)("section",{className:"grid lg:grid-cols-12 gap-8",children:[(0,o.jsx)("div",{className:"lg:col-span-8 space-y-8",children:(0,o.jsx)(nI,{mode:"wait",children:"extract"===e?(0,o.jsx)(nA.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-gray-900/50 border border-white/5 backdrop-blur-xl rounded-3xl p-8 md:p-12 shadow-2xl",children:(0,o.jsxs)("div",{className:"space-y-12",children:[(0,o.jsxs)("header",{className:"space-y-4 text-center",children:[(0,o.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-400 text-xs font-black uppercase tracking-widest mb-2",children:[(0,o.jsx)(nq,{className:"w-4 h-4 fill-current"}),(0,o.jsx)("span",{children:"AI Engine v2.0"})]}),(0,o.jsx)("h1",{className:"text-4xl md:text-5xl font-black tracking-tighter bg-gradient-to-b from-white to-gray-400 bg-clip-text text-transparent",children:"Run Your Extraction"}),(0,o.jsx)("p",{className:"text-gray-400 font-medium max-w-lg mx-auto leading-relaxed",children:"Upload your business spreadsheet to automatically discover verified owner emails and contact info."}),g?.connected&&(0,o.jsx)(nI,{children:g.percent>=98||"critical"===g.status?(0,o.jsxs)(nA.div,{initial:{opacity:0,y:-10}
10,animate:{opacity:1,y:0},className:"mt-6 p-4 bg-red-600/10 border border-red-600/20 rounded-2xl flex flex-col items-center gap-3",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 text-red-400",children:[(0,o.jsx)(nQ,{className:"w-4 h-4"}),(0,o.jsx)("span",{className:"text-xs font-black uppercase tracking-widest text-center",children:"Usage limit reached"})]}),(0,o.jsx)("p",{className:"text-[11px] text-red-200/60 font-medium max-w-md mx-auto text-center",children:"You've used all available Firecrawl credits for your current plan. Upgrade on Firecrawl and sync your account to continue."}),(0,o.jsx)("a",{href:"https://firecrawl.dev/pricing",target:"_blank",className:"px-6 py-2 bg-red-600 text-white rounded-xl text-[10px] font-black uppercase tracking-widest hover:bg-red-500 transition-all",children:"Upgrade on Firecrawl"})]}):g.percent>=70?(0,o.jsxs)(nA.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mt-6 p-4 bg-yellow-600/10 border border-yellow-600/20 rounded-2xl flex flex-col items-center gap-3",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 text-yellow-400",children:[(0,o.jsx)(nQ,{className:"w-4 h-4"}),(0,o.jsx)("span",{className:"text-xs font-black uppercase tracking-widest text-center",children:"You're running low on credits"})]}),(0,o.jsx)("p",{className:"text-[11px] text-yellow-200/60 font-medium max-w-md mx-auto text-center",children:"Your current Firecrawl quota is nearly exhausted. Increase your plan or purchase more credits to keep running searches."})]}):null})]}),(0,o.jsxs)("div",{className:"grid md:grid-cols-2 gap-12 items-start",children:[(0,o.jsx)("div",{className:"space-y-6",children:i?(0,o.jsxs)("div",{className:"space-y-6",children:[(0,o.jsx)("div",{className:"bg-white/[0.03] border border-white/10 rounded-3xl p-8 text-center relative overflow-hidden",children:(0,o.jsxs)("div",{className:"relative z-10 flex flex-col items-center gap-4",children:[(0,o.jsx)("div",{className:"p-4 bg-blue-500/20 rounded-2xl",children:(0,o.jsx)(n4,{className:"w-8 h-8 text-blue-400"})}),(0,o.jsxs)("div",{className:"max-w-xs mx-auto",children:[(0,o.jsx)("p",{className:"text-white font-black text-lg tracking-tight truncate",children:i.name}),(0,o.jsx)("p",{className:"text-gray-500 text-xs font-bold uppercase tracking-widest mt-1",children:"Ready to sync"})]}),!s&&!h&&(0,o.jsx)("button",{onClick:v,className:"text-[10px] text-gray-400 hover:text-white font-black uppercase tracking-[0.2em] transition-colors mt-2",children:"Change File"})]})}),a&&(0,o.jsxs)("div",{className:"flex items-center justify-center gap-3 p-4 bg-blue-500/5 border border-blue-500/20 rounded-2xl",children:[(0,o.jsx)(nH,{className:"w-4 h-4 animate-spin text-blue-400"}),(0,o.jsx)("span",{className:"text-xs font-black uppercase tracking-widest text-blue-400",children:"Analyzing Content..."})]}),d&&!h&&(0,o.jsxs)(nA.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:lj("p-6 rounded-3xl border flex flex-col gap-4 shadow-xl",d.canProceed?"bg-white/[0.02] border-white/10":"bg-red-500/5 border-red-500/20"),children:[(0,o.jsx)("div",{className:"flex items-center justify-between",children:(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)("div",{className:lj("p-1.5 rounded-lg",d.canProceed?"bg-green-500/20":"bg-red-500/20"),children:d.canProceed?(0,o.jsx)(n1,{className:"w-4 h-4 text-green-400"}):(0,o.jsx)(n2,{className:"w-4 h-4 text-red-400"})}),(0,o.jsx)("span",{className:"text-xs font-black uppercase tracking-widest",children:"Analysis Results"})]})}),(0,o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,o.jsxs)("div",{className:"bg-white/5 p-4 rounded-2xl",children:[(0,o.jsx)("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-[0.15em] mb-1",children:"Rows"}),(0,o.jsx)("p",{className:"text-xl font-black text-white",children:d.rowCount})]}),(0,o.jsxs)("div",{className:"bg-white/5 p-4 rounded-2xl",children:[(0,o.jsx)("p",{className:"text-[10px] text-gray-500 font-black uppercase tracking-[0.15em] mb-1",children:"Cost"}),(0,o.jsx)("p",{className:"text-xl font-black text-white",children:d.creditsNeeded})]})]}),!d.canProceed&&(0,o.jsxs)("div",{className:"pt-4 border-t border-red-500/10 space-y-4",children:[(0,o.jsx)("p",{className:"text-xs text-red-200/80 font-bold leading-relaxed",children:"Your current plan doesn't have enough credits to process this file. Please upgrade to continue."}),(0,o.jsx)("a",{href:"https://firecrawl.dev/pricing",target:"_blank",className:"block w-full py-3 bg-red-600/20 hover:bg-red-600/30 border border-red-600/20 text-red-400 rounded-xl text-[10px] font-black uppercase tracking-[0.2em] transition-all text-center",children:"Upgrade Account"})]})]}),!h&&(0,o.jsx)("button",{disabled:!i||s||a||!d?.canProceed||!y?.connected,onClick:w,className:lj("w-full py-5 rounded-3xl font-black uppercase tracking-[0.2em] text-xs flex items-center justify-center gap-3 transition-all duration-500",i&&!s&&!a&&d?.canProceed&&y?.connected?"bg-blue-600 hover:bg-blue-500 text-white shadow-[0_0_30px_rgba(59,130,246,0.25)] active:scale-[0.98]":"bg-white/5 text-gray-500 cursor-not-allowed border border-white/5"),children:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(nH,{className:"w-5 h-5 animate-spin"}),(0,o.jsx)("span",{children:"Processing..."})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(nq,{className:"w-4 h-4 fill-white"}),(0,o.jsx)("span",{children:"Start Extraction"})]})}),h&&(0,o.jsxs)("div",{className:"space-y-4 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,o.jsxs)("div",{className:"bg-green-500/10 border border-green-500/20 rounded-3xl p-8 text-center",children:[(0,o.jsx)("div",{className:"w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mx-auto mb-4",children:(0,o.jsx)(n1,{className:"w-8 h-8 text-green-400"})}),(0,o.jsx)("h3",{className:"text-xl font-black text-white tracking-tight uppercase",children:"Success"}),(0,o.jsx)("p",{className:"text-green-400/70 text-[11px] font-bold uppercase tracking-widest mt-1",children:"Extraction Complete"})]}),(0,o.jsxs)("a",{href:h,download:"extracted_leads.xlsx",className:"w-full py-5 bg-green-600 hover:bg-green-500 text-white rounded-3xl font-black uppercase tracking-[0.2em] text-xs flex items-center justify-center gap-3 transition-all shadow-xl shadow-green-900/20",children:[(0,o.jsx)(nY,{className:"w-5 h-5"}),"Download Results"]}),(0,o.jsxs)("button",{onClick:v,className:"w-full py-4 bg-white/5 hover:bg-white/10 border border-white/10 rounded-3xl text-gray-400 hover:text-white font-black uppercase tracking-[0.2em] text-[10px] flex items-center justify-center gap-3 transition-all",children:[(0,o.jsx)(n3,{className:"w-4 h-4"}),"New Extraction"]})]})]}):(0,o.jsxs)("div",{className:"relative group cursor-pointer border-2 border-dashed border-white/10 hover:border-blue-500/30 hover:bg-white/[0.02] rounded-3xl p-12 transition-all duration-300",onClick:()=>document.getElementById("file-upload")?.click(),children:[(0,o.jsx)("input",{id:"file-upload",type:"file",accept:".xlsx",className:"hidden",onChange:b}),(0,o.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,o.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-white/5 flex items-center justify-center group-hover:scale-110 group-hover:bg-blue-600/10 transition-all",children:(0,o.jsx)(nW,{className:"w-8 h-8 text-gray-500 group-hover:text-blue-400"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-white font-black uppercase tracking-widest text-sm",children:"Upload Spreadsheet"}),(0,o.jsx)("p",{className:"text-gray-500 text-xs font-bold mt-2",children:"Click to browse or drag & drop"})]})]})]})}),(0,o.jsxs)("div",{className:"space-y-12 pl-12 border-l border-white/5",children:[(0,o.jsxs)("div",{className:"space-y-8",children:[(0,o.jsxs)("div",{className:"flex items-start gap-4 group",children:[(0,o.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-blue-500/10 border border-blue-500/20 flex items-center justify-center shrink-0 group-hover:bg-blue-500/20 transition-all",children:(0,o.jsx)(nX,{className:"w-5 h-5 text-blue-400"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-black text-gray-400 uppercase tracking-widest mb-1",children:"Intelligence"}),(0,o.jsx)("h4",{className:"font-bold text-white tracking-tight",children:"Verified Emails"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:"Deep search across public re
10cords for highly valid business emails."})]})]}),(0,o.jsxs)("div",{className:"flex items-start gap-4 group",children:[(0,o.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-purple-500/10 border border-purple-500/20 flex items-center justify-center shrink-0 group-hover:bg-purple-500/20 transition-all",children:(0,o.jsx)(nG,{className:"w-5 h-5 text-purple-400"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-black text-gray-400 uppercase tracking-widest mb-1",children:"Connectivity"}),(0,o.jsx)("h4",{className:"font-bold text-white tracking-tight",children:"Phone Extraction"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:"Pulls primary and secondary contact numbers with verified sources."})]})]}),(0,o.jsxs)("div",{className:"flex items-start gap-4 group",children:[(0,o.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-green-500/10 border border-green-500/20 flex items-center justify-center shrink-0 group-hover:bg-green-500/20 transition-all",children:(0,o.jsx)(nK,{className:"w-5 h-5 text-green-400"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-black text-gray-400 uppercase tracking-widest mb-1",children:"Security"}),(0,o.jsx)("h4",{className:"font-bold text-white tracking-tight",children:"Proxy Rotation"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:"Uses military-grade proxy rotation to avoid data scrap detection."})]})]})]}),(0,o.jsxs)("div",{className:"bg-white/[0.02] border border-white/10 rounded-3xl p-6",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,o.jsx)(n0,{className:"w-4 h-4 text-blue-400"}),(0,o.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-400",children:"Quick Tip"})]}),(0,o.jsx)("p",{className:"text-[11px] text-gray-500 leading-relaxed font-black opacity-80",children:'Make sure your Excel headers exactly match "Owner 1 First Name", "Owner 1 Last Name", etc. for optimal results.'})]})]})]})]})},"extract"):"settings"===e?(0,o.jsx)(nA.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-gray-900/50 border border-white/5 backdrop-blur-xl rounded-3xl p-8 md:p-12 shadow-2xl",children:(0,o.jsx)(le,{})},"settings"):(0,o.jsx)(nA.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},children:(0,o.jsx)(lk,{})},"history")})}),(0,o.jsx)("div",{className:"lg:col-span-4 space-y-6",children:(0,o.jsx)(ls,{})})]})]})]}):(0,o.jsx)(lf,{email:m.email||m.user?.email||"",name:m.user?.name}):(0,o.jsx)(ly,{providers:m?.providers})}e.s(["default",()=>lN],52683)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.