PageSourceSearch

https://bowtiesports.com/assets/RecordingStudio-TG5KIqNO.js

js bowtiesports.com collected 2026-10-07 02:29:22 UTC 170,874 bytes, 24 lines download raw bytes

1import{r as y,j as a}from"./react-vendor-DUhHROXo.js";import{L as Ai,b as ko,c as Eo}from"./router-vendor-Dz9PdDzH.js";import{T as Lo,a as Fo,b as wt,c as jt}from"./tabs-B9G-WuXr.js";import{m as fs,D as ms,q as ps,s as gs,t as ys,j as q,aP as Ni,o as R,X as ot,a5 as ue,x as ce,a4 as ie,w as Io,_ as Di,aQ as Mi,J as Bo,a7 as nn,O as Oo,p as _o}from"./index-BLtzf0SR.js";import{u as V}from"./index-Cx0UdoxP.js";import{C as Ie,a as at,b as Uo}from"./card-9IoFUltb.js";import{s as ge}from"./client-DTel1CZI.js";import{I as be}from"./input-RFokm5kN.js";import{L as ae}from"./label-B2yiss_Q.js";import{T as Ri}from"./textarea-Da4-oaTC.js";import{S as xs,a as vs,b as bs,c as ws,d as js}from"./select-CMAo_7oa.js";import{B as H}from"./badge-BsE4KYIf.js";import{C as Vi,S as $o,b as zo,a as Wo}from"./publicLinks-Dk_BypBw.js";import{S as ki}from"./save-vrPqs9Xk.js";import{M as Ne}from"./monitor-Cfk1nyiF.js";import{f as lt}from"./format-DGzj7MEM.js";import{S as Ei}from"./square-CIul4Yuk.js";import{U as Ut}from"./upload-TDghJ2vl.js";import{D as $t}from"./download-DFEQ6r6X.js";import{H as Ko}from"./hard-drive-D3lPRAhw.js";import{A as Li,b as Fi,c as Ii,d as Bi,e as Oi,f as _i,g as Ui,h as $i}from"./alert-dialog-CmuTox67.js";import{P as Ss}from"./pencil-C2cyk8cg.js";import{T as Ts}from"./trash-2-cCh6Q5cl.js";import{S as Go}from"./search-BUGN1cxC.js";import{F as zi}from"./folder-open-CIWhCFhy.js";import{F as Ho}from"./filter-Cq5B9N9E.js";import{S as St}from"./separator-DJ74LIPg.js";import{R as Wi}from"./radio-BQgeDg5T.js";import{C as Xo}from"./circle-dot-DsvLCe2U.js";import{C as Ki}from"./circle-check-PV1EE3Kr.js";import{C as Yo}from"./circle-alert-C1akQxLN.js";import{L as Gi}from"./lock-DG8dH9gR.js";import{u as Hi,a as qo,b as Zo,c as Qo,d as Xi,e as Jo,f as ea,g as ta,h as sa,i as na}from"./useStudioSession-DgiicGBW.js";import{C as zt}from"./copy-BN4qlSYJ.js";import{E as ia}from"./external-link-oNCTVZu0.js";import{P as ra}from"./plus-Db1qFqHY.js";import{U as oa}from"./user-plus-DB_6DvCc.js";import{C as aa}from"./camera-BKoNWt3p.js";import{A as la}from"./arrow-up-right-N1rr5vHt.js";import{M as ca}from"./music-BuAkZgP4.js";import{P as ua}from"./palette-DW01U6zN.js";import{R as da}from"./refresh-cw-BBiwQZvS.js";import{A as ha}from"./arrow-left-CRb8P6iH.js";import"./index-BdQq_4o_.js";import"./index-O12prPmO.js";import"./chevron-up-B89bkR-F.js";import"./clock-DK72Hop1.js";import"./en-US-Bfz1jvxT.js";import"./differenceInCalendarDays-D4nmWE3G.js";import"./getTimezoneOffsetInMilliseconds-DsfBWtEI.js";import"./useMutation-BXp6BKyU.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const fa=fs("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ma=fs("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const pa=fs("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);function ga({mode:e,autoStart:t=!1,onRecordingComplete:s}){const[n,i]=y.useState(null),[o,r]=y.useState(!1),[l,c]=y.useState(!1),[d,u]=y.useState(null),[h,f]=y.useState(null),[p,v]=y.useState(0),g=y.useRef(null),x=y.useRef(null),b=y.useRef([]),j=y.useRef(null),w=y.useRef(!1),S=y.useRef(null),T=y.useCallback(()=>{switch(e){case"camera":return{video:{facingMode:"user",width:{ideal:1280},height:{ideal:720}},audio:!0};case"audio":return{audio:!0,video:!1};case"screen":return{video:!0,audio:!0};default:return{video:!0,audio:!0}}},[e]),N=y.useCallback(()=>
16{S.current=null,n&&(n.getTracks().forEach(A=>A.stop()),i(null)),g.current&&(g.current.pause(),g.current.srcObject=null),c(!1),r(!1),v(0),w.current=!1,j.current&&(clearInterval(j.current),j.current=null)},[n]),D=y.useCallback(async()=>{if(!w.current){w.current=!0;try{if(u(null),n&&n.getTracks().forEach(M=>M.stop()),S.current){try{await S.current}catch{}S.current=null}let A;if(e==="screen"?A=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}):A=await navigator.mediaDevices.getUserMedia(T()),i(A),c(!0),g.current&&e!=="audio"){g.current.pause(),g.current.srcObject=A,g.current.muted=!0,S.current=g.current.play();try{await S.current}catch(M){M instanceof Error&&M.name!=="AbortError"&&console.warn("Video play warning:",M.message)}S.current=null}w.current=!1}catch(A){w.current=!1;const M=A instanceof Error?A.message:"Failed to access media devices";u(M),console.error("Media access error:",A)}}},[e,T,n]),m=y.useCallback(()=>{if(!n)return;b.current=[],f(null),v(0);const A=e==="audio"?"audio/webm":"video/webm;codecs=vp9",M=new MediaRecorder(n,{mimeType:MediaRecorder.isTypeSupported(A)?A:void 0});M.ondataavailable=U=>{U.data.size>0&&b.current.push(U.data)},M.onstop=()=>{const U=new Blob(b.current,{type:e==="audio"?"audio/webm":"video/webm"});f(U),s==null||s(U)},M.start(1e3),x.current=M,r(!0),j.current=setInterval(()=>{v(U=>U+1)},1e3)},[n,e,s]),C=y.useCallback(()=>{x.current&&x.current.state!=="inactive"&&x.current.stop(),r(!1),j.current&&(clearInterval(j.current),j.current=null)},[]);return y.useEffect(()=>{let A=!0;if(t&&A){const M=setTimeout(()=>{A&&D()},100);return()=>{A=!1,clearTimeout(M)}}return()=>{A=!1}},[]),y.useEffect(()=>()=>{n&&n.getTracks().forEach(A=>A.stop()),j.current&&clearInterval(j.current),S.current=null},[]),{stream:n,isRecording:o,isPreviewing:l,error:d,recordedBlob:h,recordingTime:p,startPreview:D,stopPreview:N,startRecording:m,stopRecording:C,videoRef:g}}function rn(e){const t=Math.floor(e/60),s=e%60;return`${t.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}const Cs=y.createContext({});function Ps(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yi=typeof window<"u",qi=Yi?y.useLayoutEffect:y.useEffect,gt=y.createContext(null);function As(e,t){e.indexOf(t)===-1&&e.push(t)}function Ns(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const ne=(e,t,s)=>s>t?t:s<e?e:s;let yt=()=>{},De=()=>{};const re={},Zi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Qi(e){return typeof e=="object"&&e!==null}const Ji=e=>/^0[^.\s]+$/u.test(e);function Ds(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,ya=(e,t)=>s=>t(e(s)),He=(...e)=>e.reduce(ya),$e=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class Ms{constructor(){this.subscriptions=[]}add(t){return As(this.subscriptions,t),()=>Ns(this.subscriptions,t)}notify(t,s,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,s,n);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const te=e=>e*1e3,Y=e=>e/1e3;function er(e,t){return t?e*(1e3/t):0}const tr=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,xa=1e-7,va=12;function ba(e,t,s,n,i){let o,r,l=0;do r=t+(s-t)/2,o=tr(r,n,i)-e,o>0?s=r:t=r;while(Math.abs(o)>xa&&++l<va);return r}function Xe(e,t,s,n){if(e===t&&s===n)return Z;const i=o=>ba(o,0,1,e,s);return o=>o===0||o===1?o:tr(i(o),t,n)}const sr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nr=e=>t=>1-e(1-t),ir=Xe(.33,1.53,.69,.99),Rs=nr(ir),rr=sr(Rs),or=e=>(e*=2)<1?.5*Rs(e):.5*(2-Math.pow(2,-10*(e-1))),Vs=e=>1-Math.sin(Math.acos(e)),ar=nr(Vs),lr=sr(Vs),wa=Xe(.42,0,1,1),ja=Xe(0,0,.58,1),cr=Xe(.42,0,.58,1),Sa=e=>Array.isArray(e)&&typeof e[0]!="number",ur=e=>Array.isArray(e)&&typeof e[0]=="number",on={linear:Z,easeIn:wa,easeInOut:cr,easeOut:ja,circIn:Vs,circInOut:lr,circOut:ar,backIn:Rs,backInOut:rr,backOut:ir,anticipate:or},Ta=e=>typeof e=="string",an=e=>{if(ur(e)){De(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,s,n,i]=e;return Xe(t,s,n,i)}else if(Ta(e))return De(on[e]!==void 0,`Invalid easing type '${e}
16'`,"invalid-easing-type"),on[e];return e},Qe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ln={value:null,addProjectionMetrics:null};function Ca(e,t){let s=new Set,n=new Set,i=!1,o=!1;const r=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function d(h){r.has(h)&&(u.schedule(h),e()),c++,h(l)}const u={schedule:(h,f=!1,p=!1)=>{const g=p&&i?s:n;return f&&r.add(h),g.has(h)||g.add(h),h},cancel:h=>{n.delete(h),r.delete(h)},process:h=>{if(l=h,i){o=!0;return}i=!0,[s,n]=[n,s],s.forEach(d),t&&ln.value&&ln.value.frameloop[t].push(c),c=0,s.clear(),i=!1,o&&(o=!1,u.process(h))}};return u}const Pa=40;function dr(e,t){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,r=Qe.reduce((w,S)=>(w[S]=Ca(o,t?S:void 0),w),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:f,render:p,postRender:v}=r,g=()=>{const w=re.useManualTiming?i.timestamp:performance.now();s=!1,re.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(w-i.timestamp,Pa),1)),i.timestamp=w,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),f.process(i),p.process(i),v.process(i),i.isProcessing=!1,s&&t&&(n=!1,e(g))},x=()=>{s=!0,n=!0,i.isProcessing||e(g)};return{schedule:Qe.reduce((w,S)=>{const T=r[S];return w[S]=(N,D=!1,m=!1)=>(s||x(),T.schedule(N,D,m)),w},{}),cancel:w=>{for(let S=0;S<Qe.length;S++)r[Qe[S]].cancel(w)},state:i,steps:r}}const{schedule:E,cancel:de,state:$,steps:Tt}=dr(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let st;function Aa(){st=void 0}const W={now:()=>(st===void 0&&W.set($.isProcessing||re.useManualTiming?$.timestamp:performance.now()),st),set:e=>{st=e,queueMicrotask(Aa)}},hr=e=>t=>typeof t=="string"&&t.startsWith(e),fr=hr("--"),Na=hr("var(--"),ks=e=>Na(e)?Da.test(e.split("/*")[0].trim()):!1,Da=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cn(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Re={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ze={...Re,transform:e=>ne(0,1,e)},Je={...Re,default:1},Be=e=>Math.round(e*1e5)/1e5,Es=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ma(e){return e==null}const Ra=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ls=(e,t)=>s=>!!(typeof s=="string"&&Ra.test(s)&&s.startsWith(e)||t&&!Ma(s)&&Object.prototype.hasOwnProperty.call(s,t)),mr=(e,t,s)=>n=>{if(typeof n!="string")return n;const[i,o,r,l]=n.match(Es);return{[e]:parseFloat(i),[t]:parseFloat(o),[s]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},Va=e=>ne(0,255,e),Ct={...Re,transform:e=>Math.round(Va(e))},ye={test:Ls("rgb","red"),parse:mr("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+Ct.transform(e)+", "+Ct.transform(t)+", "+Ct.transform(s)+", "+Be(ze.transform(n))+")"};function ka(e){let t="",s="",n="",i="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,s+=s,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Wt={test:Ls("#"),parse:ka,transform:ye.transform},Ye=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oe=Ye("deg"),se=Ye("%"),P=Ye("px"),Ea=Ye("vh"),La=Ye("vw"),un={...se,parse:e=>se.parse(e)/100,transform:e=>se.transform(e*100)},Se={test:Ls("hsl","hue"),parse:mr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+se.transform(Be(t))+", "+se.transform(Be(s))+", "+Be(ze.transform(n))+")"},O={test:e=>ye.test(e)||Wt.test(e)||Se.test(e),parse:e=>ye.test(e)?ye.parse(e):Se.test(e)?Se.parse(e):Wt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ye.transform(e):Se.transform(e),getAnimatableNone:e=>{const t=O.parse(e);return t.alpha=0,O.transform(t)}},Fa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ia(e){var t,s;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Es))==null?void 0:t.length)||0)+(((s=e.match(Fa))==null?void 0:s.length)||0)>0}const pr="number",gr="color",Ba="var",Oa="var(",dn="${}",_a=/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 We(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(_a,c=>(O.test(c)?(n.color.push(o),i.push(gr),s.push(O.parse(c))):c.startsWith(Oa)?(n.var.push(o),i.push(Ba),s.push(c)):(n.number.push(o),i.push(pr),s.push(parseFloat(c))),++o,dn)).split(dn);return{values:s,split:l,indexes:n,types:i}}function yr(e){return We(e).values}function xr(e){const{split:t,types:s}=We(e),n=t.length;return i=>{let o="";for(let r=0;r<n;r++)if(o+=t[r],i[r]!==void 0){const l=s[r];l===pr?o+=Be(i[r]):l===gr?o+=O.transform(i[r]):o+=i[r]}return o}}const Ua=e=>typeof e=="number"?0:O.test(e)?O.getAnimatableNone(e):e;function $a(e){const t=yr(e);return xr(e)(t.map(Ua))}const he={test:Ia,parse:yr,createTransformer:xr,getAnimatableNone:$a};function Pt(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function za({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let i=0,o=0,r=0;if(!t)i=o=r=s;else{const l=s<.5?s*(1+t):s+t-s*t,c=2*s-l;i=Pt(c,l,e+1/3),o=Pt(c,l,e),r=Pt(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:n}}function ct(e,t){return s=>s>0?t:e}const F=(e,t,s)=>e+(t-e)*s,At=(e,t,s)=>{const n=e*e,i=s*(t*t-n)+n;return i<0?0:Math.sqrt(i)},Wa=[Wt,ye,Se],Ka=e=>Wa.find(t=>t.test(e));function hn(e){const t=Ka(e);if(yt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===Se&&(s=za(s)),s}const fn=(e,t)=>{const s=hn(e),n=hn(t);
vendor: 21,069 bytes, line 16
16if(!s||!n)return ct(e,t);const i={...s};return o=>(i.red=At(s.red,n.red,o),i.green=At(s.green,n.green,o),i.blue=At(s.blue,n.blue,o),i.alpha=F(s.alpha,n.alpha,o),ye.transform(i))},Kt=new Set(["none","hidden"]);function Ga(e,t){return Kt.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function Ha(e,t){return s=>F(e,t,s)}function Fs(e){return typeof e=="number"?Ha:typeof e=="string"?ks(e)?ct:O.test(e)?fn:qa:Array.isArray(e)?vr:typeof e=="object"?O.test(e)?fn:Xa:ct}function vr(e,t){const s=[...e],n=s.length,i=e.map((o,r)=>Fs(o)(o,t[r]));return o=>{for(let r=0;r<n;r++)s[r]=i[r](o);return s}}function Xa(e,t){const s={...e,...t},n={};for(const i in s)e[i]!==void 0&&t[i]!==void 0&&(n[i]=Fs(e[i])(e[i],t[i]));return i=>{for(const o in n)s[o]=n[o](i);return s}}function Ya(e,t){const s=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][n[o]],l=e.values[r]??0;s[i]=l,n[o]++}return s}const qa=(e,t)=>{const s=he.createTransformer(t),n=We(e),i=We(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Kt.has(e)&&!i.values.length||Kt.has(t)&&!n.values.length?Ga(e,t):He(vr(Ya(n,i),i.values),s):(yt(!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"),ct(e,t))};function br(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?F(e,t,s):Fs(e)(e,t)}const Za=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>E.update(t,s),stop:()=>de(t),now:()=>$.isProcessing?$.timestamp:W.now()}},wr=(e,t,s=10)=>{let n="";const i=Math.max(Math.round(t/s),2);for(let o=0;o<i;o++)n+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},ut=2e4;function Is(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<ut;)t+=s,n=e.next(t);return t>=ut?1/0:t}function Qa(e,t=100,s){const n=s({...e,keyframes:[0,t]}),i=Math.min(Is(n),ut);return{type:"keyframes",ease:o=>n.next(i*o).value/t,duration:Y(i)}}const Ja=5;function jr(e,t,s){const n=Math.max(t-Ja,0);return er(s-e(n),t-n)}const L={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Nt=.001;function el({duration:e=L.duration,bounce:t=L.bounce,velocity:s=L.velocity,mass:n=L.mass}){let i,o;yt(e<=te(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=ne(L.minDamping,L.maxDamping,r),e=ne(L.minDuration,L.maxDuration,Y(e)),r<1?(i=d=>{const u=d*r,h=u*e,f=u-s,p=Gt(d,r),v=Math.exp(-h);return Nt-f/p*v},o=d=>{const h=d*r*e,f=h*s+s,p=Math.pow(r,2)*Math.pow(d,2)*e,v=Math.exp(-h),g=Gt(Math.pow(d,2),r);return(-i(d)+Nt>0?-1:1)*((f-p)*v)/g}):(i=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-Nt+u*h},o=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const l=5/e,c=sl(i,o,l);if(e=te(e),isNaN(c))return{stiffness:L.stiffness,damping:L.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:r*2*Math.sqrt(n*d),duration:e}}}const tl=12;function sl(e,t,s){let n=s;for(let i=1;i<tl;i++)n=n-e(n)/t(n);return n}function Gt(e,t){return e*Math.sqrt(1-t*t)}const nl=["duration","bounce"],il=["stiffness","damping","mass"];function mn(e,t){return t.some(s=>e[s]!==void 0)}function rl(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!mn(e,il)&&mn(e,nl))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),i=n*n,o=2*ne(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:L.mass,stiffness:i,damping:o}}else{const s=el(e);t={...t,...s,mass:L.mass},t.isResolvedFromDuration=!0}return t}function dt(e=L.visualDuration,t=L.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=s;const o=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:h,velocity:f,isResolvedFromDuration:p}=rl({...s,velocity:-Y(s.velocity||0)}),v=f||0,g=d/(2*Math.sqrt(c*u)),x=r-o,b=Y(Math.sqrt(c/u)),j=Math.abs(x)<5;n||(n=j?L.restSpeed.granular:L.restSpeed.default),i||(i=j?L.restDelta.granular:L.restDelta.default);let w;if(g<1){const T=Gt(b,g);w=N=>{const D=Math.exp(-g*b*N);return r-D*((v+g*b*x)/T*Math.sin(T*N)+x*Math.cos(T*N))}}else if(g===1)w=T=>r-Math.exp(-b*T)*(x+(v+b*x)*T);else{const T=b*Math.sqrt(g*g-1);w=N=>{const D=Math.exp(-g*b*N),m=Math.min(T*N,300);return r-D*((v+g*b*x)*Math.sinh(m)+T*x*Math.cosh(m))/T}}const S={calculatedDuration:p&&h||null,next:T=>{const N=w(T);if(p)l.done=T>=h;else{let D=T===0?v:0;g<1&&(D=T===0?te(v):jr(w,T,N));const m=Math.abs(D)<=n,C=Math.abs(r-N)<=i;l.done=m&&C}return l.value=l.done?r:N,l},toString:()=>{const T=Math.min(Is(S),ut),N=wr(D=>S.next(T*D).value,T,30);return T+"ms "+N},toTransition:()=>{}};return S}dt.applyToOptions=e=>{const t=Qa(e,100,dt);return e.ease=t.ease,e.duration=te(t.duration),e.type="keyframes",e};function Ht({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],f={done:!1,value:h},p=m=>l!==void 0&&m<l||c!==void 0&&m>c,v=m=>l===void 0?c:c===void 0||Math.abs(l-m)<Math.abs(c-m)?l:c;let g=s*t;const x=h+g,b=r===void 0?x:r(x);b!==x&&(g=b-h);const j=m=>-g*Math.exp(-m/n),w=m=>b+j(m),S=m=>{const C=j(m),A=w(m);f.done=Math.abs(C)<=d,f.value=f.done?b:A};let T,N;const D=m=>{p(f.value)&&(T=m,N=dt({keyframes:[f.value,v(f.value)],velocity:jr(w,m,f.value),damping:i,stiffness:o,restDelta:d,restSpeed:u}))};return D(0),{calculatedDuration:null,next:m=>{let C=!1;return!N&&T===void 0&&(C=!0,S(m),D(m)),T!==void 0&&m>=T?N.next(m-T):(!C&&S(m),f)}}}function ol(e,t,s){const n=[],i=s||re.mix||br,o=e.length-1;for(let r=0;r<o;r++){let l=i(e[r],e[r+1]);if(t){const c=Array.isArray(t)?t[r]||Z:t;l=He(c,l)}n.push(l)}return n}function al(e,t,{clamp:s=!0,ease:n,mixer:i}={}){const o=e.length;if(De(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=ol(t,n,i),c=l.length,d=u=>{if(r&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const f=$e(e[h],e[h+1],u);return l[h](f)};return s?u=>d(ne(e[0],e[o-1],u)):d}function ll(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const i=$e(0,t,n);e.push(F(s,1,i))}}function cl(e){const t=[0];return ll(t,e.length-1),t}function ul(e,t){return e.map(s=>s*t)}function dl(e,t){return e.map(()=>t||cr).splice(0,e.length-1)}function Oe({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const i=Sa(n)?n.map(an):an(n),o={done:!1,value:t[0]},r=ul(s&&s.length===t.length?s:cl(t),e),l=al(r,t,{ease:Array.isArray(i)?i:dl(t,i)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const hl=e=>e!==null;function Bs(e,{repeat:t,repeatType:s="loop"},n,i=1){const o=e.filter(hl),l=i<0||t&&s!=="loop"&&t%2===1?0:o.length-1;return!l||n===void 0?o[l]:n}const fl={decay:Ht,inertia:Ht,tween:Oe,keyframes:Oe,spring:dt};function Sr(e){typeof e.type=="string"&&(e.type=fl[e.type])}class Os{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const ml=e=>e/100;class _s extends Os{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:s}=this.options;s&&s.updatedAt!==W.now()&&this.tick(W.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Sr(t);const{type:s=Oe,repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:l}=t;const c=s||Oe;c!==Oe&&typeof l[0]!="number"&&(this.mixKeyframes=He(ml,br(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-r})),d.calculatedDuration===null&&(d.calculatedDuration=Is(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:p,type:v,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,S=n;if(h){const m=Math.min(this.currentTime,i)/l;let C=Math.floor(m),A=m%1;!A&&m>=1&&(A=1),A===1&&C--,C=Math.min(C,h+1),!!(C%2)&&(f==="reverse"?(A=1-A,p&&(A-=p/l)):f==="mirror"&&(S=r)),w=ne(0,1,A)*l}const T=j?{done:!1,value:u[0]}:S.next(w);o&&(T.value=o(T.value));let{done:N}=T;!j&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return D&&v!==Ht&&(T.value=Bs(u,this.options,x,this.speed)),g&&g(T.value),D&&this.finish(),T}then(t,s){return this.finished.then(t,s)}get duration(){return Y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(this.currentTime)}set time(t){var s;t=te(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(s=this.driver)==null||s.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(W.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=Y(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=Za,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(W.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(t=this.options).onComplete)==null||s.call(t)}cancel(){var t,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(t=this.options).onCancel)==null||s.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),t.observe(this)}}function pl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const xe=e=>e*180/Math.PI,Xt=e=>{const t=xe(Math.atan2(e[1],e[0]));return Yt(t)},gl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xt,rotateZ:Xt,skewX:e=>xe(Math.atan(e[1])),skewY:e=>xe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yt=e=>(e=e%360,e<0&&(e+=360),e),pn=Xt,gn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gn,scaleY:yn,scale:e=>(gn(e)+yn(e))/2,rotateX:e=>Yt(xe(Math.atan2(e[6],e[5]))),rotateY:e=>Yt(xe(Math.atan2(-e[2],e[0]))),rotateZ:pn,rotate:pn,skewX:e=>xe(Math.atan(e[4])),skewY:e=>xe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qt(e){return e.includes("scale")?1:0}function Zt(e,t){if(!e||e==="none")return qt(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=yl,i=s;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=gl,i=l}if(!i)return qt(t);const o=n[t],r=i[1].split(",").map(vl);return typeof o=="function"?o(r):r[o]}const xl=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Zt(s,t)};function vl(e){return parseFloat(e.trim())}const Ve=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ke=new Set(Ve),xn=e=>e===Re||e===P,bl=new Set(["x","y","z"]),wl=Ve.filter(e=>!bl.has(e));function jl(e){const t=[];return wl.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const le={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),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})=>Zt(t,"x"),y:(e,{transform:t})=>Zt(t,"y")};le.translateX=le.x;le.translateY=le.y;const ve=new Set;let Qt=!1,Jt=!1,es=!1;function Tr(){if(Jt){const e=Array.from(ve).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const i=jl(n);i.length&&(s.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=s.get(n);i&&i.forEach(([o,r])=>{var l;(l=n.getValue(o))==null||l.set(r)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Jt=!1,Qt=!1,ve.forEach(e=>e.complete(es)),ve.clear()}function Cr(){ve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Jt=!0)})}function Sl(){es=!0,Cr(),Tr(),es=!1}class Us{constructor(t,s,n,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ve.add(this),Qt||(Qt=!0,E.read(Cr),E.resolveKeyframes(Tr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&s){const l=n.readValue(s,r);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}pl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ve.delete(this)}cancel(){this.state==="scheduled"&&(ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Tl=e=>e.startsWith("--");function Cl(e,t,s){Tl(t)?e.style.setProperty(t,s):e.style[t]=s}const Pl=Ds(()=>window.ScrollTimeline!==void 0),Al={};function Nl(e,t){const s=Ds(e);return()=>Al[t]??s()}const Pr=Nl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Le=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,vn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Le([0,.65,.55,1]),circOut:Le([.55,0,1,.45]),backIn:Le([.31,.01,.66,-.59]),backOut:Le([.33,1.53,.69,.99])};function Ar(e,t){if(e)return typeof e=="function"?Pr()?wr(e,t):"ease-out":ur(e)?Le(e):Array.isArray(e)?e.map(s=>Ar(s,t)||vn.easeOut):vn[e]}function Dl(e,t,s,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=Ar(l,i);Array.isArray(h)&&(u.easing=h);const f={delay:n,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(u,f)}function Nr(e){return typeof e=="function"&&"applyToOptions"in e}function Ml({type:e,...t}){return Nr(e)&&Pr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Rl extends Os{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:n,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,De(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Ml(t);this.animation=Dl(s,n,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Bs(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(u):Cl(s,n,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,s;(s=(t=this.animation).finish)==null||s.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,s;this.isPseudoElement||(s=(t=this.animation).commitStyles)==null||s.call(t)}get duration(){var s,n;const t=((n=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:n.call(s).duration)||0;return Y(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Y(t)}get time(){return Y(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=te(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Pl()?(this.animation.timeline=t,Z):s(this)}}const Dr={anticipate:or,backInOut:rr,circInOut:lr};function Vl(e){return e in Dr}function kl(e){typeof e.ease=="string"&&Vl(e.ease)&&(e.ease=Dr[e.ease])}const Dt=10;class El extends Rl{constructor(t){kl(t),Sr(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:i,element:o,...r}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const l=new _s({...r,autoplay:!1}),c=Math.max(Dt,W.now()-this.startTime),d=ne(0,Dt,c-Dt);s.setWithVelocity(l.sample(Math.max(0,c-d)).value,l.sample(c).value,d),l.stop()}}const bn=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(he.test(e)||e==="0")&&!e.startsWith("url("));function Ll(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function Fl(e,t,s,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=bn(i,t),l=bn(o,t);return yt(r===l,`You are trying to animate ${t} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!l?!1:Ll(e)||(s==="spring"||Nr(s))&&n}function ts(e){e.duration=0,e.type="keyframes"}const Il=new Set(["opacity","clipPath","filter","transform"]),Bl=Ds(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ol(e){var u;const{motionValue:t,name:s,repeatDelay:n,repeatType:i,damping:o,type:r}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return Bl()&&s&&Il.has(s)&&(s!=="transform"||!d)&&!c&&!n&&i!=="mirror"&&o!==0&&r!=="inertia"}const _l=40;class Ul extends Os{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:l,name:c,motionValue:d,element:u,...h}){var v;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=W.now();
16const f={autoplay:t,delay:s,type:n,repeat:i,repeatDelay:o,repeatType:r,name:c,motionValue:d,element:u,...h},p=(u==null?void 0:u.KeyframeResolver)||Us;this.keyframeResolver=new p(l,(g,x,b)=>this.onKeyframesResolved(g,x,f,!b),c,d,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,s,n,i){var x,b;this.keyframeResolver=void 0;const{name:o,type:r,velocity:l,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=W.now(),Fl(t,o,r,l)||((re.instantAnimations||!c)&&(u==null||u(Bs(t,n,s))),t[0]=t[t.length-1],ts(n),n.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>_l?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},p=!d&&Ol(f),v=(b=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:b.current,g=p?new El({...f,element:v}):new _s(f);g.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Mr(e,t,s,n=0,i=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),r=e.size,l=(r-1)*n;return typeof s=="function"?s(o,r):i===1?o*n:l-o*n}const $l=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zl(e){const t=$l.exec(e);if(!t)return[,];const[,s,n,i]=t;return[`--${s??n}`,i]}const Wl=4;function Rr(e,t,s=1){De(s<=Wl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,i]=zl(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const r=o.trim();return Zi(r)?parseFloat(r):r}return ks(i)?Rr(i,t,s+1):i}const Kl={type:"spring",stiffness:500,damping:25,restSpeed:10},Gl=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hl={type:"keyframes",duration:.8},Xl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yl=(e,{keyframes:t})=>t.length>2?Hl:ke.has(e)?e.startsWith("scale")?Gl(t[1]):Kl:Xl,ql=e=>e!==null;function Zl(e,{repeat:t,repeatType:s="loop"},n){const i=e.filter(ql),o=t&&s!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}function $s(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function Ql({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:l,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const zs=(e,t,s,n={},i,o)=>r=>{const l=$s(n,e)||{},c=l.delay||n.delay||0;let{elapsed:d=0}=n;d=d-te(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};Ql(l)||Object.assign(u,Yl(e,u)),u.duration&&(u.duration=te(u.duration)),u.repeatDelay&&(u.repeatDelay=te(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ts(u),u.delay===0&&(h=!0)),(re.instantAnimations||re.skipAnimations)&&(h=!0,ts(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const f=Zl(u.keyframes,l);if(f!==void 0){E.update(()=>{u.onUpdate(f),u.onComplete()});return}}return l.isSync?new _s(u):new Ul(u)};function wn(e){const t=[{},{}];
vendor: 28,788 bytes, line 16
16return e==null||e.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function Ws(e,t,s,n){if(typeof t=="function"){const[i,o]=wn(n);t=t(s!==void 0?s:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=wn(n);t=t(s!==void 0?s:e.custom,i,o)}return t}function Ae(e,t,s){const n=e.getProps();return Ws(n,t,s!==void 0?s:n.custom,e)}const Vr=new Set(["width","height","top","left","right","bottom",...Ve]),jn=30,Jl=e=>!isNaN(parseFloat(e));class ec{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var o;const i=W.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=W.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Jl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Ms);const n=this.events[t].add(s);return t==="change"?()=>{n(),E.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=W.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jn)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,jn);return er(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),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(){var t,s;(t=this.dependents)==null||t.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Me(e,t){return new ec(e,t)}const ss=e=>Array.isArray(e);function tc(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Me(s))}function sc(e){return ss(e)?e[e.length-1]||0:e}function nc(e,t){const s=Ae(e,t);let{transitionEnd:n={},transition:i={},...o}=s||{};o={...o,...n};for(const r in o){const l=sc(o[r]);tc(e,r,l)}}const z=e=>!!(e&&e.getVelocity);function ic(e){return!!(z(e)&&e.add)}function ns(e,t){const s=e.getValue("willChange");if(ic(s))return s.add(t);if(!s&&re.WillChange){const n=new re.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Ks(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const rc="framerAppearId",kr="data-"+Ks(rc);function Er(e){return e.props[kr]}function oc({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function Lr(e,t,{delay:s=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...l}=t;const c=o==null?void 0:o.reduceMotion;n&&(o=n);const d=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const f=e.getValue(h,e.latestValues[h]??null),p=l[h];if(p===void 0||u&&oc(u,h))continue;const v={delay:s,...$s(o||{},h)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===g&&!v.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const w=Er(e);if(w){const S=window.MotionHandoffAnimation(w,h,E);S!==null&&(v.startTime=S,x=!0)}}ns(e,h);const b=c??e.shouldReduceMotion;f.start(zs(h,f,p,b&&Vr.has(h)?{type:!1}:v,e,x));const j=f.animation;j&&d.push(j)}return r&&Promise.all(d).then(()=>{E.update(()=>{r&&nc(e,r)})}),d}function is(e,t,s={}){var c;const n=Ae(e,t,s.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(i=s.transitionOverride);const o=n?()=>Promise.all(Lr(e,n,s)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=i;return ac(e,t,d,u,h,f,s)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,u]=l==="beforeChildren"?[o,r]:[r,o];return d().then(()=>u())}else return Promise.all([o(),r(s.delay)])}function ac(e,t,s=0,n=0,i=0,o=1,r){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(is(c,t,{...r,delay:s+(typeof n=="function"?0:n)+Mr(e.variantChildren,c,n,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function lc(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>is(e,o,s));n=Promise.all(i)}else if(typeof t=="string")n=is(e,t,s);else{const i=typeof t=="function"?Ae(e,t,s.custom):t;n=Promise.all(Lr(e,i,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}const cc={test:e=>e==="auto",parse:e=>e},Fr=e=>t=>t.test(e),Ir=[Re,P,se,oe,La,Ea,cc],Sn=e=>Ir.find(Fr(e));function uc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ji(e):!0}const dc=new Set(["brightness","contrast","saturate","opacity"]);function hc(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(Es)||[];if(!n)return e;const i=s.replace(n,"");let o=dc.has(t)?1:0;return n!==s&&(o*=100),t+"("+o+i+")"}const fc=/\b([a-z-]*)\(.*?\)/gu,rs={...he,getAnimatableNone:e=>{const t=e.match(fc);return t?t.map(hc).join(" "):e}},Tn={...Re,transform:Math.round},mc={rotate:oe,rotateX:oe,rotateY:oe,rotateZ:oe,scale:Je,scaleX:Je,scaleY:Je,scaleZ:Je,skew:oe,skewX:oe,skewY:oe,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:ze,originX:un,originY:un,originZ:P},Gs={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,...mc,zIndex:Tn,fillOpacity:ze,strokeOpacity:ze,numOctaves:Tn},pc={...Gs,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:rs,WebkitFilter:rs},Br=e=>pc[e];function Or(e,t){let s=Br(e);return s!==rs&&(s=he),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const gc=new Set(["auto","none","0"]);function yc(e,t,s){let n=0,i;for(;n<e.length&&!i;){const o=e[n];typeof o=="string"&&!gc.has(o)&&We(o).values.length&&(i=e[n]),n++}if(i&&s)for(const o of t)e[o]=Or(s,i)}class xc extends Us{constructor(t,s,n,i,o){super(t,s,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),ks(h))){const f=Rr(h,s.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Vr.has(n)||t.length!==2)return;const[i,o]=t,r=Sn(i),l=Sn(o),c=cn(i),d=cn(o);if(c!==d&&le[n]){this.needsMeasurement=!0;return}if(r!==l)if(xn(r)&&xn(l))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else le[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||uc(t[i]))&&n.push(i);n.length&&yc(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=le[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const i=s[s.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(s);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=le[s](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function vc(e,t,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(n=>n!=null)}const _r=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function os(e){return Qi(e)&&"offsetHeight"in e}const{schedule:Hs,cancel:cf}=dr(queueMicrotask,!1),J={x:!1,y:!1};function Ur(){return J.x||J.y}function bc(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function $r(e,t){const s=vc(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[s,i,()=>n.abort()]}function Cn(e){return!(e.pointerType==="touch"||Ur())}function wc(e,t,s={}){const[n,i,o]=$r(e,s),r=l=>{if(!Cn(l))return;const{target:c}=l,d=t(c,l);if(typeof d!="function"||!c)return;const u=h=>{Cn(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return n.forEach(l=>{l.addEventListener("pointerenter",r,i)}),o}const zr=(e,t)=>t?e===t?!0:zr(e,t.parentElement):!1,Xs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wr(e){return jc.has(e.tagName)||e.isContentEditable===!0}const nt=new WeakSet;function Pn(e){return t=>{t.key==="Enter"&&e(t)}}function Mt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Sc=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=Pn(()=>{if(nt.has(s))return;Mt(s,"down");const i=Pn(()=>{Mt(s,"up")}),o=()=>Mt(s,"cancel");s.addEventListener("keyup",i,t),s.addEventListener("blur",o,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function An(e){return Xs(e)&&!Ur()}function Tc(e,t,s={}){const[n,i,o]=$r(e,s),r=l=>{const c=l.currentTarget;if(!An(l))return;nt.add(c);const d=t(c,l),u=(p,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),nt.has(c)&&nt.delete(c),An(p)&&typeof d=="function"&&d(p,{success:v})},h=p=>{u(p,c===window||c===document||s.useGlobalTarget||zr(c,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return n.forEach(l=>{(s.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),os(l)&&(l.addEventListener("focus",d=>Sc(d,i)),!Wr(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function Kr(e){return Qi(e)&&"ownerSVGElement"in e}function Cc(e){return Kr(e)&&e.tagName==="svg"}const Pc=[...Ir,O,he],Ac=e=>Pc.find(Fr(e)),Nn=()=>({translate:0,scale:1,origin:0,originPoint:0}),Te=()=>({x:Nn(),y:Nn()}),Dn=()=>({min:0,max:0}),_=()=>({x:Dn(),y:Dn()}),as={current:null},Gr={current:!1},Nc=typeof window<"u";function Dc(){if(Gr.current=!0,!!Nc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>as.current=e.matches;e.addEventListener("change",t),t()}else as.current=!1}const Mc=new WeakMap;function xt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ke(e){return typeof e=="string"||Array.isArray(e)}const Ys=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qs=["initial",...Ys];function vt(e){return xt(e.animate)||qs.some(t=>Ke(e[t]))}function Hr(e){return!!(vt(e)||e.variants)}function Rc(e,t,s){for(const n in t){const i=t[n],o=s[n];if(z(i))e.addValue(n,i);else if(z(o))e.addValue(n,Me(i,{owner:e}));else if(o!==i)if(e.hasValue(n)){const r=e.getValue(n);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(n);e.addValue(n,Me(r!==void 0?r:i,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const Mn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function Xr(e){ht=e}function Vc(){return ht}class kc{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Us,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=W.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,E.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=r;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=vt(s),this.isVariantNode=Hr(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const f in h){const p=h[f];c[f]!==void 0&&z(p)&&p.set(c[f])}}mount(t){var s;this.current=t,Mc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Gr.current||Dc(),this.shouldReduceMotion=as.current),(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),de(this.notifyUpdate),de(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const n=this.features[s];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=s.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ht){const s=ht[t];if(!s)continue;const{isEnabled:n,Feature:i}=s;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<Mn.length;n++){const i=Mn[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Rc(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=Me(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Zi(n)||Ji(n))?n=parseFloat(n):!Ac(n)&&he.test(s)&&(n=Or(t,s)),this.setBaseTarget(t,z(n)?n.get():n)),z(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){var o;const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const r=Ws(this.props,s,(o=this.presenceContext)==null?void 0:o.custom);r&&(n=r[t])}if(s&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!z(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Ms),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){Hs.render(this.render)}}class Yr extends kc{constructor(){super(...arguments),this.KeyframeResolver=xc}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){const n=t.style;return n?n[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;z(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function qr({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function Ec({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lc(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function Rt(e){return e===void 0||e===1}function ls({scale:e,scaleX:t,scaleY:s}){return!Rt(e)||!Rt(t)||!Rt(s)}function pe(e){return ls(e)||Zr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zr(e){return Rn(e.x)||Rn(e.y)}function Rn(e){return e&&e!=="0%"}function ft(e,t,s){const n=e-s,i=t*n;return s+i}function Vn(e,t,s,n,i){return i!==void 0&&(e=ft(e,i,n)),ft(e,s,n)+t}function cs(e,t=0,s=1,n,i){e.min=Vn(e.min,t,s,n,i),e.max=Vn(e.max,t,s,n,i)}function Qr(e,{x:t,y:s}){cs(e.x,t.translate,t.scale,t.originPoint),cs(e.y,s.translate,s.scale,s.originPoint)}const kn=.999999999999,En=1.0000000000001;function Fc(e,t,s,n=!1){const i=s.length;if(!i)return;t.x=t.y=1;let o,r;for(let l=0;l<i;l++){o=s[l],r=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Pe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Qr(e,r)),n&&pe(o.latestValues)&&Pe(e,o.latestValues))}t.x<En&&t.x>kn&&(t.x=1),t.y<En&&t.y>kn&&(t.y=1)}function Ce(e,t){e.min=e.min+t,e.max=e.max+t}function Ln(e,t,s,n,i=.5){const o=F(e.min,e.max,i);cs(e,t,s,o,n)}function Pe(e,t){Ln(e.x,t.x,t.scaleX,t.scale,t.originX),Ln(e.y,t.y,t.scaleY,t.scale,t.originY)}function Jr(e,t){return qr(Lc(e.getBoundingClientRect(),t))}function Ic(e,t,s){const n=Jr(e,s),{scroll:i}=t;return i&&(Ce(n.x,i.offset.x),Ce(n.y,i.offset.y)),n}const Bc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oc=Ve.length;function _c(e,t,s){let n="",i=!0;for(let o=0;o<Oc;o++){const r=Ve[o],l=e[r];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(r.startsWith("scale")?1:0);else{const d=parseFloat(l);c=r.startsWith("scale")?d===1:d===0}if(!c||s){const d=_r(l,Gs[r]);if(!c){i=!1;const u=Bc[r]||r;n+=`${u}(${d}) `}s&&(t[r]=d)}}return n=n.trim(),s?n=s(t,i?"":n):i&&(n="none"),n}function Zs(e,t,s){const{style:n,vars:i,transformOrigin:o}=e;let r=!1,l=!1;for(const c in t){const d=t[c];if(ke.has(c)){r=!0;continue}else if(fr(c)){i[c]=d;continue}else{const u=_r(d,Gs[c]);c.startsWith("origin")?(l=!0,o[c]=u):n[c]=u}}if(t.transform||(r||s?n.transform=_c(t,e.transform,s):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;n.transformOrigin=`${c} ${d} ${u}`}}function eo(e,{style:t,vars:s},n,i){const o=e.style;let r;for(r in t)o[r]=t[r];i==null||i.applyProjectionStyles(o,n);for(r in s)o.setProperty(r,s[r])}function Fn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ee={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(P.test(e))e=parseFloat(e);else return e;const s=Fn(e,t.target.x),n=Fn(e,t.target.y);return`${s}% ${n}%`}},Uc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,i=he.parse(e);if(i.length>5)return n;const o=he.createTransformer(e),r=typeof i[0]!="number"?1:0,l=s.x.scale*t.x,c=s.y.scale*t.y;i[0+r]/=l,i[1+r]/=c;const d=F(l,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=d),typeof i[3+r]=="number"&&(i[3+r]/=d),o(i)}},us={borderRadius:{...Ee,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomLeftRadius:Ee,borderBottomRightRadius:Ee,boxShadow:Uc};function to(e,{layout:t,layoutId:s}){return ke.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!us[e]||e==="opacity")}function Qs(e,t,s){var r;const n=e.style,i=t==null?void 0:t.style,o={};if(!n)return o;for(const l in n)(z(n[l])||i&&z(i[l])||to(l,e)||((r=s==null?void 0:s.getValue(l))==null?void 0:r.liveStyle)!==void 0)&&(o[l]=n[l]);return o}function $c(e){return window.getComputedStyle(e)}class zc extends Yr{constructor(){super(...arguments),this.type="html",this.renderInstance=eo}readValueFromInstance(t,s){var n;if(ke.has(s))return(n=this.projection)!=null&&n.isProjecting?qt(s):xl(t,s);{const i=$c(t),o=(fr(s)?i.getPropertyValue(s):i[s])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:s}){return Jr(t,s)}build(t,s,n){Zs(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return Qs(t,s,n)}}const Wc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kc={offset:"strokeDashoffset",array:"strokeDasharray"};function Gc(e,t,s=1,n=0,i=!0){e.pathLength=1;const o=i?Wc:Kc;e[o.offset]=`${-n}`,e[o.array]=`${t} ${s}`}const Hc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function so(e,{attrX:t,attrY:s,attrScale:n,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...l},c,d,u){if(Zs(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const p of Hc)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),i!==void 0&&Gc(h,i,o,r,!1)}const no=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"]),io=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Xc(e,t,s,n){eo(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(no.has(i)?i:Ks(i),t.attrs[i])}function ro(e,t,s){const n=Qs(e,t,s);for(const i in e)if(z(e[i])||z(t[i])){const o=Ve.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=e[i]}return n}class Yc extends Yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(ke.has(s)){const n=Br(s);return n&&n.default||0}return s=no.has(s)?s:Ks(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return ro(t,s,n)}build(t,s,n){so(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,i){Xc(t,s,n,i)}mount(t){this.isSVGTag=io(t.tagName),super.mount(t)}}const qc=qs.length;function oo(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?oo(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<qc;s++){const n=qs[s],i=e.props[n];(Ke(i)||i===!1)&&(t[n]=i)}return t}function ao(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const Zc=[...Ys].reverse(),Qc=Ys.length;function Jc(e){return t=>Promise.all(t.map(({animation:s,options:n})=>lc(e,s,n)))}function eu(e){let t=Jc(e),s=In(),n=!0;const i=c=>(d,u)=>{var f;const h=Ae(e,u,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:v,...g}=h;d={...d,...g,...v}}return d};function o(c){t=c(e)}function r(c){const{props:d}=e,u=oo(e.parent)||{},h=[],f=new Set;let p={},v=1/0;for(let x=0;x<Qc;x++){const b=Zc[x],j=s[b],w=d[b]!==void 0?d[b]:u[b],S=Ke(w),T=b===c?j.isActive:null;T===!1&&(v=x);let N=w===u[b]&&w!==d[b]&&S;if(N&&n&&e.manuallyAnimateOnMount&&(N=!1),j.protectedKeys={...p},!j.isActive&&T===null||!w&&!j.prevProp||xt(w)||typeof w=="boolean")continue;const D=tu(j.prevProp,w);let m=D||b===c&&j.isActive&&!N&&S||x>v&&S,C=!1;const A=Array.isArray(w)?w:[w];let M=A.reduce(i(b),{});T===!1&&(M={});const{prevResolvedValues:U={}}=j,k={...U,...M},I=B=>{m=!0,f.has(B)&&(C=!0,f.delete(B)),j.needsAnimating[B]=!0;const G=e.getValue(B);G&&(G.liveStyle=!1)};for(const B in k){const G=M[B],ee=U[B];if(p.hasOwnProperty(B))continue;let je=!1;ss(G)&&ss(ee)?je=!ao(G,ee):je=G!==ee,je?G!=null?I(B):f.add(B):G!==void 0&&f.has(B)?I(B):j.protectedKeys[B]=!0}j.prevProp=w,j.prevResolvedValues=M,j.isActive&&(p={...p,...M}),n&&e.blockInitialAnimation&&(m=!1);const we=N&&D;m&&(!we||C)&&h.push(...A.map(B=>{const G={type:b};if(typeof B=="string"&&n&&!we&&e.manuallyAnimateOnMount&&e.parent){const{parent:ee}=e,je=Ae(ee,B);if(ee.enteringChildren&&je){const{delayChildren:Vo}=je.transition||{};G.delay=Mr(ee.enteringChildren,e,Vo)}}return{animation:B,options:G}}))}
vendor: 2,987 bytes, line 16
16if(f.size){const x={};if(typeof d.initial!="boolean"){const b=Ae(e,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(x.transition=b.transition)}f.forEach(b=>{const j=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),x[b]=j??null}),h.push({animation:x})}let g=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(h):Promise.resolve()}function l(c,d){var h;if(s[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,d)}),s[c].isActive=d;const u=r(c);for(const f in s)s[f].protectedKeys={};return u}return{animateChanges:r,setActive:l,setAnimateFunction:o,getState:()=>s,reset:()=>{s=In()}}}function tu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ao(t,e):!1}function me(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function In(){return{animate:me(!0),whileInView:me(),whileHover:me(),whileTap:me(),whileDrag:me(),whileFocus:me(),exit:me()}}function Bn(e,t){e.min=t.min,e.max=t.max}function Q(e,t){Bn(e.x,t.x),Bn(e.y,t.y)}function On(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const lo=1e-4,su=1-lo,nu=1+lo,co=.01,iu=0-co,ru=0+co;function K(e){return e.max-e.min}function ou(e,t,s){return Math.abs(e-t)<=s}function _n(e,t,s,n=.5){e.origin=n,e.originPoint=F(t.min,t.max,e.origin),e.scale=K(s)/K(t),e.translate=F(s.min,s.max,e.origin)-e.originPoint,(e.scale>=su&&e.scale<=nu||isNaN(e.scale))&&(e.scale=1),(e.translate>=iu&&e.translate<=ru||isNaN(e.translate))&&(e.translate=0)}function _e(e,t,s,n){_n(e.x,t.x,s.x,n?n.originX:void 0),_n(e.y,t.y,s.y,n?n.originY:void 0)}function Un(e,t,s){e.min=s.min+t.min,e.max=e.min+K(t)}function au(e,t,s){Un(e.x,t.x,s.x),Un(e.y,t.y,s.y)}function $n(e,t,s){e.min=t.min-s.min,e.max=e.min+K(t)}function mt(e,t,s){$n(e.x,t.x,s.x),$n(e.y,t.y,s.y)}function zn(e,t,s,n,i){return e-=t,e=ft(e,1/s,n),i!==void 0&&(e=ft(e,1/i,n)),e}function lu(e,t=0,s=1,n=.5,i,o=e,r=e){if(se.test(t)&&(t=parseFloat(t),t=F(r.min,r.max,t/100)-r.min),typeof t!="number")return;let l=F(o.min,o.max,n);e===o&&(l-=t),e.min=zn(e.min,t,s,l,i),e.max=zn(e.max,t,s,l,i)}function Wn(e,t,[s,n,i],o,r){lu(e,t[s],t[n],t[i],t.scale,o,r)}const cu=["x","scaleX","originX"],uu=["y","scaleY","originY"];function Kn(e,t,s,n){Wn(e.x,t,cu,s?s.x:void 0,n?n.x:void 0),Wn(e.y,t,uu,s?s.y:void 0,n?n.y:void 0)}function Gn(e){return e.translate===0&&e.scale===1}function uo(e){return Gn(e.x)&&Gn(e.y)}function Hn(e,t){return e.min===t.min&&e.max===t.max}function du(e,t){return Hn(e.x,t.x)&&Hn(e.y,t.y)}function Xn(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ho(e,t){return Xn(e.x,t.x)&&Xn(e.y,t.y)}function Yn(e){return K(e.x)/K(e.y)}function qn(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function X(e){return[e("x"),e("y")]}function hu(e,t,s){let n="";
vendor: 19,205 bytes, line 16
16const i=e.x.translate/t.x,o=e.y.translate/t.y,r=(s==null?void 0:s.z)||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:f,skewX:p,skewY:v}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),v&&(n+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const fo=["TopLeft","TopRight","BottomLeft","BottomRight"],fu=fo.length,Zn=e=>typeof e=="string"?parseFloat(e):e,Qn=e=>typeof e=="number"||P.test(e);function mu(e,t,s,n,i,o){i?(e.opacity=F(0,s.opacity??1,pu(n)),e.opacityExit=F(t.opacity??1,0,gu(n))):o&&(e.opacity=F(t.opacity??1,s.opacity??1,n));for(let r=0;r<fu;r++){const l=`border${fo[r]}Radius`;let c=Jn(t,l),d=Jn(s,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Qn(c)===Qn(d)?(e[l]=Math.max(F(Zn(c),Zn(d),n),0),(se.test(d)||se.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||s.rotate)&&(e.rotate=F(t.rotate||0,s.rotate||0,n))}function Jn(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pu=mo(0,.5,ar),gu=mo(.5,.95,Z);function mo(e,t,s){return n=>n<e?0:n>t?1:s($e(e,t,n))}function yu(e,t,s){const n=z(e)?e:Me(e);return n.start(zs("",n,t,s)),n.animation}function Ge(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}const xu=(e,t)=>e.depth-t.depth;class vu{constructor(){this.children=[],this.isDirty=!1}add(t){As(this.children,t),this.isDirty=!0}remove(t){Ns(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xu),this.isDirty=!1,this.children.forEach(t)}}function bu(e,t){const s=W.now(),n=({timestamp:i})=>{const o=i-s;o>=t&&(de(n),e(o-t))};return E.setup(n,!0),()=>de(n)}function it(e){return z(e)?e.get():e}class wu{constructor(){this.members=[]}add(t){As(this.members,t),t.scheduleRender()}remove(t){if(Ns(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(i=>t===i);if(s===0)return!1;let n;for(let i=s;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const i=n.options.layoutDependency,o=t.options.layoutDependency;i!==void 0&&o!==void 0&&i===o||(t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:l}=t.options;l===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const rt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Vt=["","X","Y","Z"],ju=1e3;let Su=0;function kt(e,t,s,n){const{latestValues:i}=t;i[e]&&(s[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function po(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=Er(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",E,!(i||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&po(n)}function go({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(r={},l=t==null?void 0:t()){this.id=Su++,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(Pu),this.nodes.forEach(Mu),this.nodes.forEach(Ru),this.nodes.forEach(Au)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new vu)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ms),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const c=this.eventHandlers.get(r);c&&c.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Kr(r)&&!Cc(r),this.instance=r;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),e(r,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=bu(f,250),rt.hasAnimatedSinceResize&&(rt.hasAnimatedSinceResize=!1,this.nodes.forEach(si)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||Fu,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=d.getProps(),b=!this.targetLayout||!ho(this.targetLayout,p),j=!h&&f;if(this.options.layoutRoot||this.resumeFrom||j||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...$s(v,"layout"),onPlay:g,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,j)}else h||si(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),de(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Vu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ei);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ti);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Du),this.nodes.forEach(Tu),this.nodes.forEach(Cu)):this.nodes.forEach(ti),this.clearAllSnapshots();const l=W.now();$.delta=ne(0,1e3/60,l-$.timestamp),$.timestamp=l,$.isProcessing=!0,Tt.update.process($),Tt.preRender.process($),Tt.render.process($),$.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Nu),this.sharedNodes.forEach(ku)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!K(this.snapshot.measuredBox.x)&&!K(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=_(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!uo(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;r&&this.instance&&(l||pe(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),Iu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:r}=this.options;if(!r)return _();const l=r.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Bu))){const{scroll:u}=this.root;u&&(Ce(l.x,u.offset.x),Ce(l.y,u.offset.y))}return l}removeElementScroll(r){var c;const l=_();if(Q(l,r),(c=this.scroll)!=null&&c.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Q(l,r),Ce(l.x,h.offset.x),Ce(l.y,h.offset.y))}return l}applyTransform(r,l=!1){const c=_();Q(c,r);for(let d=0;d<this.path.length;d++){const u=this.path[d];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Pe(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),pe(u.latestValues)&&Pe(c,u.latestValues)}return pe(this.latestValues)&&Pe(c,this.latestValues),c}removeTransform(r){const l=_();Q(l,r);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!pe(d.latestValues))continue;ls(d.latestValues)&&d.updateSnapshot();const u=_(),h=d.measurePageBox();Q(u,h),Kn(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return pe(this.latestValues)&&Kn(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==$.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=$.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_(),this.targetWithTransforms=_()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),au(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Q(this.target,this.layout.layoutBox),Qr(this.target,this.targetDelta)):Q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ls(this.parent.latestValues)||Zr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_(),this.relativeTargetOrigin=_(),mt(this.relativeTargetOrigin,l,c),Q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const r=this.getLead(),l=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===$.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;Q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Fc(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=_());const{target:p}=r;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(On(this.prevProjectionDelta.x,this.projectionDelta.x),On(this.prevProjectionDelta.y,this.projectionDelta.y)),_e(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!qn(this.projectionDelta.x,this.prevProjectionDelta.x)||!qn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Te(),this.projectionDelta=Te(),this.projectionDeltaWithTransform=Te()}setAnimationOrigin(r,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Te();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=_(),p=c?c.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,x=this.getStack(),b=!x||x.members.length<=1,j=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(Lu));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const T=S/1e3;ni(h.x,r.x,T),ni(h.y,r.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Eu(this.relativeTarget,this.relativeTargetOrigin,f,T),w&&du(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=_()),Q(w,this.relativeTarget)),g&&(this.animationValues=u,mu(u,d,this.latestValues,T,j,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var l,c,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(de(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{rt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Me(0)),this.currentAnimation=yu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ju),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=r;if(!(!l||!c||!d)){if(this!==r&&this.layout&&d&&yo(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||_();const h=K(this.layout.layoutBox.x);
vendor: 5,316 bytes, line 16
16c.x.min=r.target.x.min,c.x.max=c.x.min+h;const f=K(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+f}Q(l,c),Pe(l,u),_e(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new wu),this.sharedNodes.get(r).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var l;const{layoutId:r}=this.options;return r?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:r}=this.options;return r?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&kt("z",r,d,this.animationValues);for(let u=0;u<Vt.length;u++)kt(`rotate${Vt[u]}`,r,d,this.animationValues),kt(`skew${Vt[u]}`,r,d,this.animationValues);r.render();for(const u in d)r.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=it(l==null?void 0:l.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=it(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!pe(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=hu(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),r.transform=h;const{x:f,y:p}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?r.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in us){if(u[v]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:b}=us[v],j=h==="none"?u[v]:g(u[v],d);if(x){const w=x.length;for(let S=0;S<w;S++)r[x[S]]=j}else b?this.options.visualElement.renderState.vars[v]=j:r[v]=j}this.options.layoutId&&(r.pointerEvents=d===this?it(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var l;return(l=r.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(ei),this.root.sharedNodes.clear()}}}function Tu(e){e.updateLayout()}function Cu(e){var s;const t=((s=e.resumeFrom)==null?void 0:s.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,r=t.source!==e.layout.source;o==="size"?X(h=>{const f=r?t.measuredBox[h]:t.layoutBox[h],p=K(f);f.min=n[h].min,f.max=f.min+p}):yo(o,t.layoutBox,n)&&X(h=>{const f=r?t.measuredBox[h]:t.layoutBox[h],p=K(n[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const l=Te();_e(l,n,t.layoutBox);const c=Te();r?_e(c,e.applyTransform(i,!0),t.measuredBox):_e(c,n,t.layoutBox);const d=!uo(l);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const v=_();mt(v,t.layoutBox,f.layoutBox);const g=_();mt(g,n,p.layoutBox),ho(v,g)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=v,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Pu(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 Au(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Nu(e){e.clearSnapshot()}function ei(e){e.clearMeasurements()}function ti(e){e.isLayoutDirty=!1}function Du(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function si(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Mu(e){e.resolveTargetDelta()}function Ru(e){e.calcProjection()}
vendor: 33,306 bytes, lines 16-24
16function Vu(e){e.resetSkewAndRotation()}function ku(e){e.removeLeadSnapshot()}function ni(e,t,s){e.translate=F(t.translate,0,s),e.scale=F(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function ii(e,t,s,n){e.min=F(t.min,s.min,n),e.max=F(t.max,s.max,n)}function Eu(e,t,s,n){ii(e.x,t.x,s.x,n),ii(e.y,t.y,s.y,n)}function Lu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Fu={duration:.45,ease:[.4,0,.1,1]},ri=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oi=ri("applewebkit/")&&!ri("chrome/")?Math.round:Z;function ai(e){e.min=oi(e.min),e.max=oi(e.max)}function Iu(e){ai(e.x),ai(e.y)}function yo(e,t,s){return e==="position"||e==="preserve-aspect"&&!ou(Yn(t),Yn(s),.2)}function Bu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Ou=go({attachResizeListener:(e,t)=>Ge(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Et={current:void 0},xo=go({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Et.current){const e=new Ou({});e.mount(window),e.setOptions({layoutScroll:!0}),Et.current=e}return Et.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Js=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function li(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _u(...e){return t=>{let s=!1;const n=e.map(i=>{const o=li(i,t);return!s&&typeof o=="function"&&(s=!0),o});if(s)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():li(e[i],null)}}}}function Uu(...e){return y.useCallback(_u(...e),e)}class $u extends y.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,i=os(n)&&n.offsetWidth||0,o=os(n)&&n.offsetHeight||0,r=this.props.sizeRef.current;r.height=s.offsetHeight||0,r.width=s.offsetWidth||0,r.top=s.offsetTop,r.left=s.offsetLeft,r.right=i-r.width-r.left,r.bottom=o-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function zu({children:e,isPresent:t,anchorX:s,anchorY:n,root:i}){var h;const o=y.useId(),r=y.useRef(null),l=y.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=y.useContext(Js),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),u=Uu(r,d);return y.useInsertionEffect(()=>{const{width:f,height:p,top:v,left:g,right:x,bottom:b}=l.current;if(t||!r.current||!f||!p)return;const j=s==="left"?`left: ${g}`:`right: ${x}`,w=n==="bottom"?`bottom: ${b}`:`top: ${v}`;r.current.dataset.motionPopId=o;const S=document.createElement("style");c&&(S.nonce=c);const T=i??document.head;return T.appendChild(S),S.sheet&&S.sheet.insertRule(`
17          [data-motion-pop-id="${o}"] {
18            position: absolute !important;
19            width: ${f}px !important;
20            height: ${p}px !important;
21            ${j}px !important;
22            ${w}px !important;
23          }
24        `),()=>{T.contains(S)&&T.removeChild(S)}},[t]),a.jsx($u,{isPresent:t,childRef:r,sizeRef:l,children:y.cloneElement(e,{ref:u})})}const Wu=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:r,anchorX:l,anchorY:c,root:d})=>{const u=Ps(Ku),h=y.useId();let f=!0,p=y.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:s,custom:i,onExitComplete:v=>{u.set(v,!0);for(const g of u.values())if(!g)return;n&&n()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[s,u,n]);return o&&f&&(p={...p}),y.useMemo(()=>{u.forEach((v,g)=>u.set(g,!1))},[s]),y.useEffect(()=>{!s&&!u.size&&n&&n()},[s]),r==="popLayout"&&(e=a.jsx(zu,{isPresent:s,anchorX:l,anchorY:c,root:d,children:e})),a.jsx(gt.Provider,{value:p,children:e})};function Ku(){return new Map}function vo(e=!0){const t=y.useContext(gt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:i}=t,o=y.useId();y.useEffect(()=>{if(e)return i(o)},[e]);const r=y.useCallback(()=>e&&n&&n(o),[o,n,e]);return!s&&n?[!1,r]:[!0]}const et=e=>e.key||"";function ci(e){const t=[];return y.Children.forEach(e,s=>{y.isValidElement(s)&&t.push(s)}),t}const Gu=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:l="left",anchorY:c="top",root:d})=>{const[u,h]=vo(r),f=y.useMemo(()=>ci(e),[e]),p=r&&!u?[]:f.map(et),v=y.useRef(!0),g=y.useRef(f),x=Ps(()=>new Map),b=y.useRef(new Set),[j,w]=y.useState(f),[S,T]=y.useState(f);qi(()=>{v.current=!1,g.current=f;for(let m=0;m<S.length;m++){const C=et(S[m]);p.includes(C)?(x.delete(C),b.current.delete(C)):x.get(C)!==!0&&x.set(C,!1)}},[S,p.length,p.join("-")]);const N=[];if(f!==j){let m=[...f];for(let C=0;C<S.length;C++){const A=S[C],M=et(A);p.includes(M)||(m.splice(C,0,A),N.push(A))}return o==="wait"&&N.length&&(m=N),T(ci(m)),w(f),null}const{forceRender:D}=y.useContext(Cs);return a.jsx(a.Fragment,{children:S.map(m=>{const C=et(m),A=r&&!u?!1:f===S||p.includes(C),M=()=>{if(b.current.has(C))return;if(b.current.add(C),x.has(C))x.set(C,!0);else return;let U=!0;x.forEach(k=>{k||(U=!1)}),U&&(D==null||D(),T(g.current),r&&(h==null||h()),n&&n())};return a.jsx(Wu,{isPresent:A,initial:!v.current||s?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:d,onExitComplete:A?void 0:M,anchorX:l,anchorY:c,children:m},C)})})},bo=y.createContext({strict:!1}),ui={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let di=!1;function Hu(){if(di)return;const e={};for(const t in ui)e[t]={isEnabled:s=>ui[t].some(n=>!!s[n])};Xr(e),di=!0}function wo(){return Hu(),Vc()}function Xu(e){const t=wo();for(const s in e)t[s]={...t[s],...e[s]};Xr(t)}const Yu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function pt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yu.has(e)}let jo=e=>!pt(e);function qu(e){typeof e=="function"&&(jo=t=>t.startsWith("on")?!pt(t):e(t))}try{qu(require("@emotion/is-prop-valid").default)}catch{}function Zu(e,t,s){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(jo(i)||s===!0&&pt(i)||!t&&!pt(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}const bt=y.createContext({});function Qu(e,t){if(vt(e)){const{initial:s,animate:n}=e;return{initial:s===!1||Ke(s)?s:void 0,animate:Ke(n)?n:void 0}}return e.inherit!==!1?t:{}}function Ju(e){const{initial:t,animate:s}=Qu(e,y.useContext(bt));return y.useMemo(()=>({initial:t,animate:s}),[hi(t),hi(s)])}function hi(e){return Array.isArray(e)?e.join(" "):e}const en=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function So(e,t,s){for(const n in t)!z(t[n])&&!to(n,s)&&(e[n]=t[n])}function ed({transformTemplate:e},t){return y.useMemo(()=>{const s=en();return Zs(s,t,e),Object.assign({},s.vars,s.style)},[t])}function td(e,t){const s=e.style||{},n={};return So(n,s,e),Object.assign(n,ed(e,t)),n}function sd(e,t){const s={},n=td(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const To=()=>({...en(),attrs:{}});function nd(e,t,s,n){const i=y.useMemo(()=>{const o=To();return so(o,t,io(n),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};So(o,e.style,e),i.style={...o,...i.style}}return i}const id=["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 tn(e){return typeof e!="string"||e.includes("-")?!1:!!(id.indexOf(e)>-1||/[A-Z]/u.test(e))}function rd(e,t,s,{latestValues:n},i,o=!1,r){const c=(r??tn(e)?nd:sd)(t,n,i,e),d=Zu(t,typeof e=="string",o),u=e!==y.Fragment?{...d,...c,ref:s}:{},{children:h}=t,f=y.useMemo(()=>z(h)?h.get():h,[h]);return y.createElement(e,{...u,children:f})}function od({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,i){return{latestValues:ad(s,n,i,e),renderState:t()}}function ad(e,t,s,n){const i={},o=n(e,{});for(const f in o)i[f]=it(o[f]);let{initial:r,animate:l}=e;const c=vt(e),d=Hr(e);t&&d&&!c&&e.inherit!==!1&&(r===void 0&&(r=t.initial),l===void 0&&(l=t.animate));let u=s?s.initial===!1:!1;u=u||r===!1;const h=u?l:r;if(h&&typeof h!="boolean"&&!xt(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const v=Ws(e,f[p]);if(v){const{transitionEnd:g,transition:x,...b}=v;for(const j in b){let w=b[j];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(i[j]=w)}for(const j in g)i[j]=g[j]}}}return i}const Co=e=>(t,s)=>{const n=y.useContext(bt),i=y.useContext(gt),o=()=>od(e,t,n,i);return s?o():Ps(o)},ld=Co({scrapeMotionValuesFromProps:Qs,createRenderState:en}),cd=Co({scrapeMotionValuesFromProps:ro,createRenderState:To}),ud=Symbol.for("motionComponentSymbol");function dd(e,t,s){const n=y.useRef(s);y.useInsertionEffect(()=>{n.current=s});const i=y.useRef(null);return y.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o)),t&&(o?t.mount(o):t.unmount());const r=n.current;if(typeof r=="function")if(o){const c=r(o);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[t])}const Po=y.createContext({});function Fe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function hd(e,t,s,n,i,o){var b,j;const{visualElement:r}=y.useContext(bt),l=y.useContext(bo),c=y.useContext(gt),d=y.useContext(Js).reducedMotion,u=y.useRef(null),h=y.useRef(!1);n=n||l.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:r,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:o}),h.current&&u.current&&(u.current.manuallyAnimateOnMount=!0));const f=u.current,p=y.useContext(Po);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&fd(u.current,s,i,p);const v=y.useRef(!1);y.useInsertionEffect(()=>{f&&v.current&&f.update(s,c)});const g=s[kr],x=y.useRef(!!g&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,g))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,g)));return qi(()=>{h.current=!0,f&&(v.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),x.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!x.current&&f.animationState&&f.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,g)}),x.current=!1),f.enteringChildren=void 0)}),f}function fd(e,t,s,n){const{layoutId:i,layout:o,drag:r,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:Ao(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||l&&Fe(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function Ao(e){if(e)return e.options.allowProjection!==!1?e.projection:Ao(e.parent)}function Lt(e,{forwardMotionProps:t=!1,type:s}={},n,i){n&&Xu(n);const o=s?s==="svg":tn(e),r=o?cd:ld;function l(d,u){let h;const f={...y.useContext(Js),...d,layoutId:md(d)},{isStatic:p}=f,v=Ju(d),g=r(d,p);if(!p&&Yi){pd();const x=gd(f);h=x.MeasureLayout,v.visualElement=hd(e,g,f,i,x.ProjectionNode,o)}return a.jsxs(bt.Provider,{value:v,children:[h&&v.visualElement?a.jsx(h,{visualElement:v.visualElement,...f}):null,rd(e,d,dd(g,v.visualElement,u),g,p,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=y.forwardRef(l);return c[ud]=e,c}function md({layoutId:e}){const t=y.useContext(Cs).id;return t&&e!==void 0?t+"-"+e:e}function pd(e,t){y.useContext(bo).strict}function gd(e){const t=wo(),{drag:s,layout:n}=t;if(!s&&!n)return{};const i={...s,...n};return{MeasureLayout:s!=null&&s.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function yd(e,t){if(typeof Proxy>"u")return Lt;const s=new Map,n=(o,r)=>Lt(o,r,e,t),i=(o,r)=>n(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?n:(s.has(r)||s.set(r,Lt(r,void 0,e,t)),s.get(r))})}const xd=(e,t)=>t.isSVG??tn(e)?new Yc(t):new zc(t,{allowProjection:e!==y.Fragment});class vd extends fe{constructor(t){super(t),t.animationState||(t.animationState=eu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();xt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let bd=0;class wd extends fe{constructor(){super(...arguments),this.id=bd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);s&&!t&&i.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const jd={animation:{Feature:vd},exit:{Feature:wd}};function qe(e){return{point:{x:e.pageX,y:e.pageY}}}const Sd=e=>t=>Xs(t)&&e(t,qe(t));function Ue(e,t,s,n){return Ge(e,t,Sd(s),n)}const No=({current:e})=>e?e.ownerDocument.defaultView:null,fi=(e,t)=>Math.abs(e-t);function Td(e,t){const s=fi(e.x,t.x),n=fi(e.y,t.y);return Math.sqrt(s**2+n**2)}const mi=new Set(["auto","scroll"]);class Do{constructor(t,s,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=It(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=Td(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:x}=p,{timestamp:b}=$;this.history.push({...x,timestamp:b});const{onStart:j,onMove:w}=this.handlers;v||(j&&j(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ft(v,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=It(p.type==="pointercancel"?this.lastMoveEventInfo:Ft(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,j),x&&x(p,j)},!Xs(t))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=r,this.contextWindow=i||window;const c=qe(t),d=Ft(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=$;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=s;f&&f(t,It(d,this.history)),this.removeListeners=He(Ue(this.contextWindow,"pointermove",this.handlePointerMove),Ue(this.contextWindow,"pointerup",this.handlePointerUp),Ue(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let s=t.parentElement;for(;s;){const n=getComputedStyle(s);(mi.has(n.overflowX)||mi.has(n.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-s.x,y:i.y-s.y};o.x===0&&o.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,i),E.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),de(this.updatePoint)}}function Ft(e,t){return t?{point:t(e.point)}:e}function pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function It({point:e},t){return{point:e,delta:pi(e,Mo(t)),offset:pi(e,Cd(t)),velocity:Pd(t,.1)}}function Cd(e){return e[0]}function Mo(e){return e[e.length-1]}function Pd(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const i=Mo(e);for(;s>=0&&(n=e[s],!(i.timestamp-n.timestamp>te(t)));)s--;if(!n)return{x:0,y:0};const o=Y(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ad(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?F(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?F(s,e,n.max):Math.min(e,s)),e}function gi(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function Nd(e,{top:t,left:s,bottom:n,right:i}){return{x:gi(e.x,s,i),y:gi(e.y,t,n)}}function yi(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function Dd(e,t){return{x:yi(e.x,t.x),y:yi(e.y,t.y)}}function Md(e,t){let s=.5;const n=K(e),i=K(t);return i>n?s=$e(t.min,t.max-n,e.min):n>i&&(s=$e(e.min,e.max-i,t.min)),ne(0,1,s)}function Rd(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const ds=.35;function Vd(e=ds){return e===!1?e=0:e===!0&&(e=ds),{x:xi(e,"left","right"),y:xi(e,"top","bottom")}}function xi(e,t,s){return{min:vi(e,t),max:vi(e,s)}}function vi(e,t){return typeof e=="number"?e:e[t]||0}const kd=new WeakMap;class Ed{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{s?(this.stopAnimation(),this.snapToCursor(qe(h).point)):this.pauseAnimation()},r=(h,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:g}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bc(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),X(b=>{let j=this.getAxisMotionValue(b).get()||0;if(se.test(j)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[b];S&&(j=K(S)*(parseFloat(j)/100))}}this.originPoint[b]=j}),g&&E.postRender(()=>g(h,f)),ns(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:g,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(v&&this.currentDirection===null){this.currentDirection=Ld(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),x&&x(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>X(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Do(t,{onSessionStart:o,onStart:r,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:No(this.visualElement),element:this.visualElement.current})}stop(t,s){const n=t||this.latestPointerEvent,i=s||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!n)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&E.postRender(()=>l(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,n){const{drag:i}=this.getProps();if(!n||!tt(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=Ad(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&Fe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Nd(n.layoutBox,t):this.constraints=!1,this.elastic=Vd(s),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&X(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Rd(n.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!Fe(t))return!1;const n=t.current;De(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ic(n,i.root,this.visualElement.getTransformPagePoint());let r=Dd(i.layout.layoutBox,o);if(s){const l=s(Ec(r));this.hasMutatedConstraints=!!l,l&&(r=qr(l))}return r}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=X(u=>{if(!tt(u,s,this.currentDirection))return;let h=c&&c[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,v)});return Promise.all(d).then(l)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return ns(this.visualElement,t),n.start(zs(t,n,0,s,this.visualElement,!1))}stopAnimation(){X(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){X(t=>{var s;return(s=this.getAxisMotionValue(t).animation)==null?void 0:s.pause()})}getAnimationState(t){var s;return(s=this.getAxisMotionValue(t).animation)==null?void 0:s.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[s];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){X(s=>{const{drag:n}=this.getProps();if(!tt(s,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(s);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[s],c=o.get()||0;o.set(t[s]-F(r,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!Fe(s)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};X(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const c=l.get();i[r]=Md({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),X(r=>{if(!tt(r,t,null))return;const l=this.getAxisMotionValue(r),{min:c,max:d}=this.constraints[r];l.set(F(c,d,i[r]))})}addListeners(){if(!this.visualElement.current)return;kd.set(this.visualElement,this);const t=this.visualElement.current,s=Ue(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps(),h=c.target,f=h!==t&&Wr(h);d&&u&&!f&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();Fe(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),E.read(n);const r=Ge(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(X(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{r(),s(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=ds,dragMomentum:l=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:l}}}function tt(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function Ld(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class Fd extends fe{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Ed(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const bi=e=>(t,s)=>{e&&E.postRender(()=>e(t,s))};class Id extends fe{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new Do(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:No(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:bi(t),onStart:bi(s),onMove:n,onEnd:(o,r)=>{delete this.session,i&&E.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ue(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Bt=!1;class Bd extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;o&&(s.group&&s.group.add(o),n&&n.register&&i&&n.register(o),Bt&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:i,isPresent:o}=this.props,{projection:r}=n;return r&&(r.isPresent=o,t.layoutDependency!==s&&r.setOptions({...r.options,layoutDependency:s}),Bt=!0,i||t.layoutDependency!==s||s===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||E.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:i}=t;Bt=!0,i&&(i.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ro(e){const[t,s]=vo(),n=y.useContext(Cs);return a.jsx(Bd,{...e,layoutGroup:n,switchLayoutGroup:y.useContext(Po),isPresent:t,safeToRemove:s})}const Od={pan:{Feature:Id},drag:{Feature:Fd,ProjectionNode:xo,MeasureLayout:Ro}};function wi(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const i="onHover"+s,o=n[i];o&&E.postRender(()=>o(t,qe(t)))}class _d extends fe{mount(){const{current:t}=this.node;t&&(this.unmount=wc(t,(s,n)=>(wi(this.node,n,"Start"),i=>wi(this.node,i,"End"))))}unmount(){}}class Ud extends fe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=He(Ge(this.node.current,"focus",()=>this.onFocus()),Ge(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ji(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const i="onTap"+(s==="End"?"":s),o=n[i];o&&E.postRender(()=>o(t,qe(t)))}class $d extends fe{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(s,n)=>(ji(this.node,n,"Start"),(i,{success:o})=>ji(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const hs=new WeakMap,Ot=new WeakMap,zd=e=>{const t=hs.get(e.target);t&&t(e)},Wd=e=>{e.forEach(zd)};function Kd({root:e,...t}){const s=e||document;Ot.has(s)||Ot.set(s,{});const n=Ot.get(s),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(Wd,{root:e,...t})),n[i]}function Gd(e,t,s){const n=Kd(t);return hs.set(e,s),n.observe(e),()=>{hs.delete(e),n.unobserve(e)}}const Hd={some:0,all:1};class Xd extends fe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:i="some",once:o}=t,r={root:s?s.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:Hd[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=d?u:h;f&&f(c)};return Gd(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(Yd(t,s))&&this.startObserver()}unmount(){}}function Yd({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const qd={inView:{Feature:Xd},tap:{Feature:$d},focus:{Feature:Ud},hover:{Feature:_d}},Zd={layout:{ProjectionNode:xo,MeasureLayout:Ro}},Qd={...jd,...qd,...Od,...Zd},_t=yd(Qd,xd),Si={video:ce,audio:ie,screen:Ne},Ti={video:"Video",audio:"Audio",screen:"Screen Recording"};function Jd({open:e,onOpenChange:t,recordedBlob:s,defaultCategory:n,onSave:i,isSaving:o=!1}){const[r,l]=y.useState(`Recording ${lt(new Date,"MMM d, yyyy HH:mm")}`),[c,d]=y.useState(n),[u,h]=y.useState("draft"),[f,p]=y.useState(""),v=async()=>{!s||!r.trim()||await i({name:r.trim(),category:c,status:u,description:f.trim(),blob:s})},g=()=>{t(!1),l(`Recording ${lt(new Date,"MMM d, yyyy HH:mm")}`),d(n),h("draft"),p("")},x=Si[c];return a.jsx(ms,{open:e,onOpenChange:t,children:a.jsxs(ps,{className:"sm:max-w-md",children:[a.jsx(gs,{children:a.jsxs(ys,{className:"flex items-center gap-2",children:[a.jsx(Vi,{className:"h-5 w-5 text-accent"}),"Save Recording to Library"]})}),a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"relative aspect-video bg-muted rounded-lg overflow-hidden flex items-center justify-center",children:[a.jsx("div",{className:"p-4 rounded-full bg-muted-foreground
24/10",children:a.jsx(x,{className:"h-12 w-12 text-muted-foreground"})}),s&&a.jsxs(H,{variant:"secondary",className:"absolute bottom-2 right-2 text-xs",children:[(s.size/1024/1024).toFixed(1)," MB"]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"recording-name",children:"Recording Name"}),a.jsx(be,{id:"recording-name",value:r,onChange:b=>l(b.target.value),placeholder:"Enter a name for your recording",disabled:o})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{children:"Status"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:()=>h("draft"),disabled:o,className:q("flex-1 py-2 px-4 rounded-md border text-sm font-medium transition-all",u==="draft"?"bg-amber-500/10 border-amber-500/50 text-amber-600 dark:text-amber-400":"border-input hover:bg-muted"),children:"Draft"}),a.jsx("button",{type:"button",onClick:()=>h("completed"),disabled:o,className:q("flex-1 py-2 px-4 rounded-md border text-sm font-medium transition-all",u==="completed"?"bg-green-500/10 border-green-500/50 text-green-600 dark:text-green-400":"border-input hover:bg-muted"),children:"Completed"})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"category",children:"Category"}),a.jsxs(xs,{value:c,onValueChange:b=>d(b),disabled:o,children:[a.jsx(vs,{id:"category",children:a.jsx(bs,{})}),a.jsx(ws,{children:Object.keys(Ti).map(b=>{const j=Si[b];return a.jsx(js,{value:b,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(j,{className:"h-4 w-4"}),Ti[b]]})},b)})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"description",children:"Description (optional)"}),a.jsx(Ri,{id:"description",value:f,onChange:b=>p(b.target.value),placeholder:"Add notes about this recording...",rows:3,disabled:o})]})]}),a.jsxs(Ni,{className:"gap-2 sm:gap-0",children:[a.jsxs(R,{variant:"outline",onClick:g,disabled:o,children:[a.jsx(ot,{className:"h-4 w-4 mr-2"}),"Discard"]}),a.jsx(R,{onClick:v,disabled:o||!r.trim()||!s,children:o?a.jsxs(a.Fragment,{children:[a.jsx(ue,{className:"h-4 w-4 mr-2 animate-spin"}),"Uploading..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ki,{className:"h-4 w-4 mr-2"}),"Save to Library"]})})]})]})})}function eh(){const{user:e}=Io(),t=Di(),[s,n]=y.useState("camera"),[i,o]=y.useState(null),r=y.useRef(null),[l,c]=y.useState(!1),[d,u]=y.useState(null),[h,f]=y.useState(!1),{isRecording:p,isPreviewing:v,error:g,recordedBlob:x,recordingTime:b,startPreview:j,stopPreview:w,startRecording:S,stopRecording:T,videoRef:N}=ga({mode:s,autoStart:!0,onRecordingComplete:k=>{u(k),c(!0)}}),D=async k=>{if(p){V.error("Stop recording before switching modes");return}w(),n(k)},m=()=>{v?C():j().then(()=>setTimeout(()=>C(),500))},C=()=>{o(3);const k=setInterval(()=>{o(I=>I===null||I<=1?(clearInterval(k),S(),null):I-1)},1e3)},A=async k=>{if(!e){V.error("You must be logged in to save recordings");return}f(!0);try{const we=`${e.id}/${Date.now()}-${k.name.replace(/[^a-zA-Z0-9]/g,"_")}.webm`,{data:sn,error:B}=await ge.storage.from("recordings").upload(we,k.blob,{contentType:k.blob.type,upsert:!1});if(B)throw B;const{data:G}=ge.storage.from("recordings").getPublicUrl(sn.path),{error:ee}=await ge.from("video_assets").insert({user_id:e.id,name:k.name,asset_type:k.category,status:k.status,description:k.description||null,file_url:G.publicUrl,duration_seconds:null});if(ee)throw ee;t.invalidateQueries({queryKey:["video-assets"]}),c(!1),u(null),V.success("Recording saved to library!")}catch(I){V.error(I.message||"Failed to save recording")}finally{f(!1)}},M=()=>{if(!x)return;const k=URL.createObjectURL(x),I=document.createElement("a");I.href=k,I.download=`recording-${Date.now()}.webm`,document.body.appendChild(I),I.click(),document.body.removeChild(I),URL.revokeObjectURL(k),V.success("Recording downloaded!")},U=[{mode:"camera",icon:ce,label:"Camera"},{mode:"audio",icon:ie,label:"Audio"},{mode:"screen",icon:Ne,label:"Screen"}];return a.jsxs("div",{className:"space-y-6",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx("div",{className:"inline-flex bg-muted rounded-lg p-1 gap-1",children:U.map(({mode:k,icon:I,label:we})=>a.jsxs("button",{onClick:()=>D(k),className:q("flex items-center justify-center gap-2 px-6 py-2.5 rounded-md font-medium transition-all text-sm min-w-[120px]",s===k?"bg-accent text-accent-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted-foreground
24/10"),children:[a.jsx(I,{className:"h-4 w-4"}),we]},k))})}),a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(Ie,{className:"overflow-hidden",children:[a.jsxs("div",{className:"relative aspect-video bg-secondary",children:[s==="audio"?a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[a.jsx(_t.div,{animate:p?{scale:[1,1.1,1]}:{},transition:{repeat:1/0,duration:1.5},className:q("p-8 rounded-full transition-all",p?"bg-destructive/20":"bg-muted"),children:a.jsx(ie,{className:q("h-20 w-20 transition-colors",p?"text-destructive":"text-muted-foreground")})}),p&&a.jsx("p",{className:"mt-6 text-4xl font-mono font-bold",children:rn(b)}),!p&&!v&&a.jsx("p",{className:"mt-4 text-muted-foreground",children:"Ready to record audio"})]}):a.jsxs(a.Fragment,{children:[a.jsx("video",{ref:N,className:"w-full h-full object-cover",playsInline:!0,muted:!0}),!v&&!g&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"p-6 rounded-full bg-muted mx-auto mb-4 w-fit",children:s==="screen"?a.jsx(Ne,{className:"h-16 w-16 text-muted-foreground"}):a.jsx(ce,{className:"h-16 w-16 text-muted-foreground"})}),a.jsx("p",{className:"text-lg text-muted-foreground",children:s==="screen"?"Click Record Now to share your screen":"Initializing camera..."})]})}),g&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-destructive/10",children:a.jsxs("div",{className:"text-center p-4",children:[a.jsx("p",{className:"text-destructive font-semibold mb-2",children:"Camera Access Error"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:g}),a.jsx(R,{variant:"outline",size:"sm",onClick:j,children:"Retry"})]})})]}),a.jsx(Gu,{children:i!==null&&a.jsx(_t.div,{initial:{opacity:0}
24,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 flex items-center justify-center bg-black/70 z-20",children:a.jsx(_t.span,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.5,opacity:0},className:"text-9xl font-bold text-white",children:i},i)})}),p&&a.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-black/60 text-white px-4 py-2 rounded-full text-sm",children:[a.jsx("span",{className:"w-3 h-3 rounded-full bg-destructive animate-pulse"}),a.jsx("span",{className:"font-mono font-semibold",children:rn(b)})]})]}),a.jsxs("div",{className:"p-6 flex items-center justify-center gap-4 border-t bg-muted/30",children:[p?a.jsxs(R,{variant:"destructive",size:"lg",onClick:T,className:"gap-2 px-8",children:[a.jsx(Ei,{className:"h-5 w-5 fill-current"}),"Stop Recording"]}):a.jsxs(R,{size:"lg",onClick:m,disabled:i!==null,className:"gap-2 px-8 bg-accent hover:bg-accent/90 text-accent-foreground",children:[a.jsx(Mi,{className:"h-5 w-5 fill-current"}),"Start Recording"]}),a.jsxs(R,{variant:"outline",size:"lg",onClick:()=>{var k;return(k=r.current)==null?void 0:k.click()},children:[a.jsx(Ut,{className:"h-4 w-4 mr-2"}),"Import"]}),a.jsx("input",{ref:r,type:"file",accept:"video/*,audio/*",multiple:!0,className:"hidden",onChange:k=>{var I;(I=k.target.files)!=null&&I.length&&V.success(`${k.target.files.length} file(s) ready`)}}),x&&!p&&a.jsxs(R,{variant:"outline",size:"lg",onClick:M,children:[a.jsx($t,{className:"h-4 w-4 mr-2"}),"Download"]})]})]})}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-4xl mx-auto",children:[a.jsx(Ie,{children:a.jsxs(at,{className:"p-4",children:[a.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[a.jsx(ma,{className:"h-4 w-4 text-accent"}),"Pro Tips"]}),a.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-accent",children:"✓"}),"Use good lighting facing you"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-accent",children:"✓"}),"Position camera at eye level"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-accent",children:"✓"}),"Minimize background noise"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-accent",children:"✓"}),"Test audio levels first"]})]})]})}),a.jsx(Ie,{children:a.jsxs(at,{className:"p-4",children:[a.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[a.jsx(Ko,{className:"h-4 w-4 text-accent"}),"Storage"]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs(R,{variant:"outline",size:"sm",className:"w-full justify-start gap-2",onClick:M,disabled:!x,children:[a.jsx($t,{className:"h-4 w-4"}),"Download Locally"]}),a.jsxs(R,{variant:"outline",size:"sm",className:"w-full justify-start gap-2",disabled:!0,children:[a.jsx(Vi,{className:"h-4 w-4"}),"Save to Cloud"]})]})]})})]}),a.jsx(Jd,{open:l,onOpenChange:k=>{k||(c(!1),u(null))},recordedBlob:d,defaultCategory:s==="camera"?"video":s==="audio"?"audio":"screen",onSave:A,isSaving:h})]})}const Ci={video:ce,audio:ie,screen:Ne},Pi={video:"Video",audio:"Audio",screen:"Screen Recording"};function th({open:e,onOpenChange:t,asset:s,onSave:n,onDelete:i,isSaving:o=!1,isDeleting:r=!1}){const[l,c]=y.useState(""),[d,u]=y.useState("video"),[h,f]=y.useState("draft"),[p,v]=y.useState(""),[g,x]=y.useState(!1);y.useEffect(()=>{s&&(c(s.name),u(s.asset_type||"video"),f(s.status||"draft"),v(s.description||""))},[s]);const b=async()=>{!s||!l.trim()||await n(s.id,{name:l.trim(),asset_type:d,status:h,description:p.trim()||null})},j=async()=>{s&&(await i(s.id),x(!1))},w=Ci[d],S=o||r;return s?a.jsxs(a.Fragment,{children:[a.jsx(ms,{open:e,onOpenChange:t,children:a.jsxs(ps,{className:"sm:max-w-md",children:[a.jsx(gs,{children:a.jsxs(ys,{className:"flex items-center gap-2",children:[a.jsx(Ss,{className:"h-5 w-5 text-accent"}),"Edit Asset"]})}),a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"relative aspect-video bg-muted rounded-lg overflow-hidden flex items-center justify-center",children:[a.jsx("div",{className:"p-4 rounded-full bg-muted-foreground
24/10",children:a.jsx(w,{className:"h-12 w-12 text-muted-foreground"})}),a.jsxs("div",{className:"absolute bottom-2 left-2 right-2 flex items-center justify-between",children:[a.jsxs(H,{variant:"secondary",className:"text-xs",children:["Created ",lt(new Date(s.created_at),"MMM d, yyyy")]}),s.duration_seconds&&a.jsxs(H,{variant:"secondary",className:"text-xs",children:[Math.floor(s.duration_seconds/60),":",String(s.duration_seconds%60).padStart(2,"0")]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"asset-name",children:"Name"}),a.jsx(be,{id:"asset-name",value:l,onChange:T=>c(T.target.value),placeholder:"Enter a name for this asset",disabled:S})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{children:"Status"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:()=>f("draft"),disabled:S,className:q("flex-1 py-2 px-4 rounded-md border text-sm font-medium transition-all",h==="draft"?"bg-amber-500/10 border-amber-500/50 text-amber-600 dark:text-amber-400":"border-input hover:bg-muted"),children:"Draft"}),a.jsx("button",{type:"button",onClick:()=>f("completed"),disabled:S,className:q("flex-1 py-2 px-4 rounded-md border text-sm font-medium transition-all",h==="completed"?"bg-green-500/10 border-green-500/50 text-green-600 dark:text-green-400":"border-input hover:bg-muted"),children:"Completed"})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"asset-category",children:"Category"}),a.jsxs(xs,{value:d,onValueChange:T=>u(T),disabled:S,children:[a.jsx(vs,{id:"asset-category",children:a.jsx(bs,{})}),a.jsx(ws,{children:Object.keys(Pi).map(T=>{const N=Ci[T];return a.jsx(js,{value:T,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(N,{className:"h-4 w-4"}),Pi[T]]})},T)})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ae,{htmlFor:"asset-description",children:"Description (optional)"}),a.jsx(Ri,{id:"asset-description",value:p,onChange:T=>v(T.target.value),placeholder:"Add notes about this asset...",rows:3,disabled:S})]})]}),a.jsxs(Ni,{className:"flex-col sm:flex-row gap-2",children:[a.jsxs(R,{variant:"destructive",onClick:()=>x(!0),disabled:S,className:"w-full sm:w-auto",children:[a.jsx(Ts,{className:"h-4 w-4 mr-2"}),"Delete"]}),a.jsx("div",{className:"flex-1"}),a.jsx(R,{variant:"outline",onClick:()=>t(!1),disabled:S,children:"Cancel"}),a.jsx(R,{onClick:b,disabled:S||!l.trim(),children:o?a.jsxs(a.Fragment,{children:[a.jsx(ue,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ki,{className:"h-4 w-4 mr-2"}),"Save Changes"]})})]})]})}),a.jsx(Li,{open:g,onOpenChange:x,children:a.jsxs(Fi,{children:[a.jsxs(Ii,{children:[a.jsx(Bi,{children:"Delete Asset"}),a.jsxs(Oi,{children:['Are you sure you want to delete "',s.name,'"? This action cannot be undone and will also remove the file from storage.']})]}),a.jsxs(_i,{children:[a.jsx(Ui,{disabled:r,children:"Cancel"}),a.jsx($i,{onClick:j,disabled:r,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:r?a.jsxs(a.Fragment,{children:[a.jsx(ue,{className:"h-4 w-4 mr-2 animate-spin"}),"Deleting..."]}):"Delete"})]})]})})]}):null}function sh(){const e=Di(),t=y.useRef(null),[s,n]=y.useState(""),[i,o]=y.useState("all"),[r,l]=y.useState(!1),[c,d]=y.useState(!1),[u,h]=y.useState(null),[f,p]=y.useState(!1),[v,g]=y.useState(!1),{data:x}=Bo({queryKey:["video-assets"],queryFn:async()=>{const{data:m,error:C}=await ge.from("video_assets").select("*").is("composition_id",null).order("created_at",{ascending:!1});if(C)throw C;return m}}),b=x==null?void 0:x.filter(m=>{const C=s===""||m.name.toLowerCase().includes(s.toLowerCase()),A=i==="all"||m.asset_type===i;return C&&A}),j={all:(x==null?void 0:x.length)??0,video:(x==null?void 0:x.filter(m=>m.asset_type==="video").length)??0,audio:(x==null?void 0:x.filter(m=>m.asset_type==="audio").length)??0,screen:(x==null?void 0:x.filter(m=>m.asset_type==="screen").length)??0},w=async(m,C)=>{p(!0);try{const{error:A}=await ge.from("video_assets").update({name:C.name,asset_type:C.asset_type,status:C.status,description:C.description}).eq("id",m);if(A)throw A;
24e.invalidateQueries({queryKey:["video-assets"]}),d(!1),h(null),V.success("Asset updated successfully!")}catch(A){V.error(A.message||"Failed to update asset")}finally{p(!1)}},S=async m=>{g(!0);try{const C=x==null?void 0:x.find(M=>M.id===m);if(C!=null&&C.file_url){const U=new URL(C.file_url).pathname.match(/\/recordings\/(.+)$/);U&&await ge.storage.from("recordings").remove([U[1]])}const{error:A}=await ge.from("video_assets").delete().eq("id",m);if(A)throw A;e.invalidateQueries({queryKey:["video-assets"]}),d(!1),h(null),V.success("Asset deleted successfully!")}catch(C){V.error(C.message||"Failed to delete asset")}finally{g(!1)}},T=m=>{m.preventDefault(),m.stopPropagation(),l(!0)},N=m=>{m.preventDefault(),m.stopPropagation(),l(!1)},D=m=>{m.preventDefault(),m.stopPropagation(),l(!1),m.dataTransfer.files.length&&V.success(`${m.dataTransfer.files.length} file(s) ready to upload`)};return a.jsxs("div",{children:[a.jsx(Ie,{className:q("transition-all duration-200",r&&"ring-2 ring-accent ring-offset-2 bg-accent/5"),onDragOver:T,onDragLeave:N,onDrop:D,children:a.jsxs(at,{className:"p-6",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Asset Library"}),a.jsxs("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[a.jsxs("div",{className:"relative flex-1 sm:flex-initial",children:[a.jsx(Go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(be,{placeholder:"Search assets...",value:s,onChange:m=>n(m.target.value),className:"pl-9 w-full sm:w-[200px]"}),s&&a.jsx("button",{onClick:()=>n(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a.jsx(ot,{className:"h-3.5 w-3.5"})})]}),a.jsxs(R,{onClick:()=>{var m;return(m=t.current)==null?void 0:m.click()},className:"gap-2",children:[a.jsx(Ut,{className:"h-4 w-4"}),"Upload"]}),a.jsx("input",{ref:t,type:"file",accept:"video/*,audio/*",multiple:!0,className:"hidden",onChange:m=>{var C;(C=m.target.files)!=null&&C.length&&V.success(`${m.target.files.length} file(s) ready`)}})]})]}),a.jsx("div",{className:"flex items-center gap-2 mb-6 flex-wrap",children:["all","video","audio","screen"].map(m=>{const A={all:Ho,video:ce,audio:ie,screen:Ne}[m];return a.jsxs("button",{onClick:()=>o(m),className:q("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-all",i===m?"bg-accent text-accent-foreground shadow-sm":"bg-muted text-muted-foreground hover:text-foreground hover:bg-muted/80"),children:[a.jsx(A,{className:"h-4 w-4"}),a.jsx("span",{className:"capitalize",children:m}),a.jsx(H,{variant:"secondary",className:"ml-1 text-xs",children:j[m]})]},m)})}),r&&a.jsxs("div",{className:"mb-6 p-8 border-2 border-dashed border-accent rounded-lg bg-accent/10 text-center",children:[a.jsx(Ut,{className:"h-10 w-10 text-accent mx-auto mb-2"}),a.jsx("p",{className:"font-medium text-accent",children:"Drop files here to upload"})]}),b&&b.length>0?a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:b.map(m=>{const A={video:ce,audio:ie,screen:Ne}[m.asset_type]||ce;return a.jsxs("div",{onClick:()=>{h(m),d(!0)},className:"group relative aspect-video rounded-lg overflow-hidden bg-muted border cursor-pointer hover:ring-2 hover:ring-accent transition-all",children:[a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[a.jsx(A,{className:"h-8 w-8 text-muted-foreground"}),a.jsx(H,{variant:"outline",className:"mt-2 text-xs capitalize",children:m.asset_type})]}),a.jsx("div",{className:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx(R,{variant:"secondary",size:"icon",className:"h-7 w-7",children:a.jsx(Ss,{className:"h-3.5 w-3.5"})})}),a.jsx("div",{className:"absolute top-2 right-2",children:a.jsx(H,{variant:"secondary",className:q("text-xs capitalize",m.status==="completed"?"bg-green-500/20 text-green-600 dark:text-green-400 border-green-500/30":"bg-amber-500/20 text-amber-600 dar
24k:text-amber-400 border-amber-500/30"),children:m.status||"draft"})}),a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-2 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:[a.jsx("p",{className:"text-xs text-white truncate font-medium",children:m.name}),a.jsx("p",{className:"text-xs text-white/70",children:lt(new Date(m.created_at),"MMM d, h:mm a")})]})]},m.id)})}):a.jsxs("div",{className:"text-center py-16 border-2 border-dashed border-muted rounded-lg cursor-pointer hover:border-accent/50 transition-colors",onClick:()=>{var m;return(m=t.current)==null?void 0:m.click()},onDragOver:T,onDragLeave:N,onDrop:D,children:[a.jsx(zi,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),a.jsx("p",{className:"font-medium mb-1",children:s||i!=="all"?"No matching files found":"No media files yet"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:s||i!=="all"?"Try adjusting your search or filters":"Drag & drop files here or click to upload"}),(s||i!=="all")&&a.jsx(R,{variant:"outline",onClick:m=>{m.stopPropagation(),n(""),o("all")},children:"Clear Filters"})]})]})}),a.jsx(th,{open:c,onOpenChange:m=>{m||(d(!1),h(null))},asset:u,onSave:w,onDelete:S,isSaving:f,isDeleting:v})]})}function nh({session:e,readyCount:t,totalSteps:s,onEndSession:n}){const i=(e==null?void 0:e.status)==="live",o=(e==null?void 0:e.title)||(e==null?void 0:e.room_name)||"No active session";return a.jsx("div",{className:"sticky top-0 z-30 bg-card border-b shadow-sm",children:a.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsxs(H,{variant:"outline",className:i?"bg-destructive/10 text-destructive border-destructive/40 gap-1.5":"bg-muted text-muted-foreground border-border gap-1.5",children:[i?a.jsx(Wi,{className:"h-3 w-3 animate-pulse"}):a.jsx(Xo,{className:"h-3 w-3"}),i?"ON AIR":"OFF AIR"]}),a.jsx(St,{orientation:"vertical",className:"h-5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-display font-semibold truncate",children:o}),a.jsx("p",{className:"text-xs text-muted-foreground",children:e?`Session ${e.id.slice(0,8)}`:"Select a session to begin"})]}),i&&a.jsxs(a.Fragment,{children:[a.jsx(St,{orientation:"vertical",className:"h-5"}),a.jsx($o,{isRunning:!0,startedAt:e==null?void 0:e.started_at})]})]}),a.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground hidden sm:inline",children:"Readiness"}),a.jsx("div",{className:"flex items-center gap-1 shrink-0",children:Array.from({length:s}).map((r,l)=>a.jsx("span",{className:`h-2 w-2 rounded-full ${l<t?"bg-primary":"bg-muted"}`},l))}),a.jsxs("span",{className:"text-xs font-mono tabular-nums text-muted-foreground whitespace-nowrap shrink-0",children:[t,"/",s]})]}),e&&n&&a.jsxs(a.Fragment,{children:[a.jsx(St,{orientation:"vertical",className:"h-5"}),a.jsxs(R,{variant:"outline",size:"sm",onClick:n,children:[a.jsx(Ei,{className:"h-3.5 w-3.5 mr-1.5"}),"End Session"]})]})]})]})})}const ih={ready:{label:"Ready",icon:Ki,pillClass:"bg-primary/10 text-primary border-primary/30",borderClass:"border-l-primary"},pending:{label:"Pending",icon:Yo,pillClass:"bg-accent/20 text-accent-foreground border-accent/40",borderClass:"border-l-accent"},not_started:{label:"Not started",icon:Mi,pillClass:"bg-muted text-muted-foreground border-border",borderClass:"border-l-muted-foreground/30"},locked:{label:"Locked",icon:Gi,pillClass:"bg-muted text-muted-foreground border-border",borderClass:"border-l-muted-foreground/20"}};function Ze({stepNumber:e,title:t,subtitle:s,status:n,children:i,actions:o}){const r=ih[n],l=r.icon;return a.jsxs(Ie,{className:q("border-l-4 transition-colors",r.borderClass),children:[a.jsx(Uo,{className:"pb-3",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx("span",{className:"flex items-center justify-center h-7 w-7 rounded-full bg-muted text-xs font-mono font-semibold text-muted-foreground shrink-0",children:e}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h3",{className:"font-display font-semibold text-base",children:t}),s&&a.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s})]})]}),a.jsxs(H,{variant:"outline",className:q("gap-1 shrink-0",r.pillClass),children:[a.jsx(l,{className:"h-3 w-3"}),r.label]})]})}),a.jsxs(at,{className:"space-y-3",children:[i,o&&a.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:o})]})]})}function rh({session:e,open:t,onOpenChange:s}){if(!e)return null;const n=Array.isArray(e.local_recording_urls)&&e.local_recording_urls.length>0?e.local_recording_urls[0]:null,i=e.recording_url||n,o=async()=>
24{if(i)try{await navigator.clipboard.writeText(i),V.success("Shareable link copied to clipboard")}catch{V.error("Could not copy link")}};return a.jsx(ms,{open:t,onOpenChange:s,children:a.jsxs(ps,{className:"max-w-3xl",children:[a.jsxs(gs,{children:[a.jsxs(ys,{className:"flex items-center gap-2",children:[a.jsx("span",{className:"truncate",children:e.title||e.room_name}),a.jsx(H,{variant:"secondary",className:"text-xs",children:e.status})]}),e.ended_at&&a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Ended ",new Date(e.ended_at).toLocaleString()]})]}),i?a.jsxs("div",{className:"space-y-3",children:[a.jsx("video",{src:i,controls:!0,className:"w-full rounded-md bg-black aspect-video"},i),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs(R,{size:"sm",onClick:o,children:[a.jsx(zt,{className:"h-4 w-4 mr-1.5"}),"Copy shareable link"]}),a.jsx(R,{size:"sm",variant:"outline",asChild:!0,children:a.jsxs("a",{href:i,download:!0,target:"_blank",rel:"noopener noreferrer",children:[a.jsx($t,{className:"h-4 w-4 mr-1.5"}),"Download"]})}),a.jsx(R,{size:"sm",variant:"ghost",asChild:!0,children:a.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:[a.jsx(ia,{className:"h-4 w-4 mr-1.5"}),"Open in new tab"]})})]})]}):a.jsx("div",{className:"p-6 text-center text-sm text-muted-foreground bg-muted/30 rounded-md",children:"Recording still processing — check back in 2–5 minutes."})]})})}function oh({selectedId:e,onSelect:t,session:s}){const{data:n=[],isLoading:i}=Hi(),o=qo(),r=Zo(),l=Qo(),[c,d]=y.useState(!1),[u,h]=y.useState(""),[f,p]=y.useState(!1),[v,g]=y.useState(""),[x,b]=y.useState(null),[j,w]=y.useState(null),S=n.filter(m=>["scheduled","pre_flight","live"].includes(m.status)),T=s?"ready":"not_started",N=async()=>{var m;try{const C=await o.mutateAsync({title:u.trim()||void 0});V.success("Session created"),(m=C==null?void 0:C.session)!=null&&m.id&&t(C.session.id),d(!1),h("")}catch(C){V.error(C.message||"Failed to create")}},D=async()=>{if(s)try{await r.mutateAsync({sessionId:s.id,title:v.trim()}),p(!1),V.success("Title updated")}catch(m){V.error(m.message)}};return a.jsxs(Ze,{stepNumber:1,title:"Session",subtitle:"Select or create the recording session for this show",status:T,children:[a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(xs,{value:e??"",onValueChange:m=>t(m||null),disabled:i,children:[a.jsx(vs,{className:"flex-1",children:a.jsx(bs,{placeholder:i?"Loading sessions...":"Choose a session"})}),a.jsxs(ws,{children:[S.length===0&&a.jsx("div",{className:"px-2 py-3 text-xs text-muted-foreground",children:"No active sessions — create one below"}),S.map(m=>a.jsxs(js,{value:m.id,children:[m.title||m.room_name," · ",m.status]},m.id))]})]}),!c&&a.jsxs(R,{variant:"outline",size:"sm",onClick:()=>d(!0),children:[a.jsx(ra,{className:"h-4 w-4 mr-1"}),"New"]})]}),c&&a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted/30 rounded-md",children:[a.jsx(be,{autoFocus:!0,placeholder:"Session title (optional)",value:u,onChange:m=>h(m.target.value),onKeyDown:m=>m.key==="Enter"&&N(),className:"flex-1"}),a.jsx(R,{size:"sm",onClick:N,disabled:o.isPending,children:o.isPending?a.jsx(ue,{className:"h-4 w-4 animate-spin"}):a.jsx(nn,{className:"h-4 w-4"})}),a.jsx(R,{variant:"ghost",size:"sm",onClick:()=>{d(!1),h("")},children:a.jsx(ot,{className:"h-4 w-4"})})]}),s&&a.jsxs("div",{className:"p-3 bg-muted/30 rounded-md space-y-1.5",children:[a.jsx("div",{className:"flex items-center justify-between gap-2",children:f?a.jsxs("div",{className:"flex items-center gap-1 flex-1",children:[a.jsx(be,{value:v,autoFocus:!0,onChange:m=>g(m.target.value),onKeyDown:m=>{m.key==="Enter"&&D(),m.key==="Escape"&&p(!1)},className:"h-8 text-sm"}),a.jsx(R,{size:"sm",variant:"ghost",onClick:D,children:a.jsx(nn,{className:"h-3.5 w-3.5"})}),a.jsx(R,{size:"sm",variant:"ghost",onClick:()=>p(!1),children:a.jsx(ot,{className:"h-3.5 w-3.5"})})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"text-sm font-medium truncate",children:s.title||s.room_name}),a.jsxs(R,{variant:"ghost",size:"sm",className:"h-7",onClick:()=>{g(s.title||""),p(!0)},children:[a.jsx(Ss,{className:"h-3.5 w-3.5 mr-1"}),"Edit"]})]})}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Room: ",a.jsx("span",{className:"font-mono",children:s.room_name})]})]}),n.length>0&&a.jsxs("div",{className:"pt-2",children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"All sessions"}),a.jsx("div",{className:"border rounded-md divide-y max-h-64 overflow-y-auto",children:n.map(m=>{const C=["completed","ended"].includes(m.status),A=()=>{C?w(m):t(m.id)};return a.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-sm hover:bg-muted/40",children:[a.jsxs("button",{type:"button",onClick:A,className:"flex-1 text-left truncate cursor-pointer",children:[a.jsx("span",{className:`${m.id===e?"font-semibold":""} ${C?"text-muted-foreground line-through":""}`,children:m.title||m.room_name}),a.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["· ",m.status]}),C&&a.jsx("span",{className:"ml-2 text-[10px] text-primary italic",children:"(click to preview & share)"})]}),C&&a.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:M=>{M.stopPropagation(),w(m)},"aria-label":`Preview ${m.title||m.room_name}`,children:a.jsx(fa,{className:"h-3.5 w-3.5"})}),a.jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:M=>{M.stopPropagation(),b(m)},"aria-label":`Delete ${m.title||m.room_name}`,children:a.jsx(Ts,{className:"h-3.5 w-3.5"})})]},m.id)})})]})]}),a.jsx(Li,{open:!!x,onOpenChange:m=>!m&&b(null),children:a.jsxs(Fi,{children:[a.jsxs(Ii,{children:[a.jsx(Bi,{children:"Delete session?"}),a.jsxs(Oi,{children:["This permanently deletes ",a.jsxs("span",{className:"font-medium",children:['"',(x==null?void 0:x.title)||(x==null?void 0:x.room_name),'"']})," and its guest invites. This cannot be undone."]})]}),a.jsxs(_i,{children:[a.jsx(Ui,{children:"Cancel"}),a.jsx($i,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:async()=>
24{if(!x)return;const m=x;b(null);try{await l.mutateAsync(m.id),m.id===e&&t(null),V.success("Session deleted")}catch(C){V.error(C.message||"Failed to delete session")}},children:"Delete"})]})]})}),a.jsx(rh,{session:j,open:!!j,onOpenChange:m=>!m&&w(null)})]})}function ah({session:e}){const{data:t=[]}=Xi(e==null?void 0:e.id),s=Jo(),n=ea(),[i,o]=y.useState(""),[r,l]=y.useState(""),c=t.filter(g=>!g.is_admitted).length,d=e?t.length===0?"not_started":"ready":"locked",u=async()=>{if(!(!i.trim()||!e))try{await s.mutateAsync({session_id:e.id,guest_name:i.trim(),guest_email:r.trim()||void 0}),V.success(r.trim()?`Invite sent to ${r}`:"Invite created"),o(""),l("")}catch(g){V.error(g.message)}},h=(e==null?void 0:e.status)==="completed"||(e==null?void 0:e.status)==="ended",f=()=>{if(e){if(h){V.error("Session has ended — create a new session");return}if(!e.host_join_code){V.error("Session has no host code — recreate session");return}navigator.clipboard.writeText(zo(e.host_join_code)),V.success("One-click host link copied")}},p=g=>{if(h){V.error("Session has ended — create a new session");return}navigator.clipboard.writeText(Wo(g)),V.success("Guest join link copied")},v=e?`${t.length} invited · ${c} pending admit`:"Select a session first";return a.jsx(Ze,{stepNumber:2,title:"Guests & Invites",subtitle:v,status:d,children:e?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx(be,{placeholder:"Guest name",value:i,onChange:g=>o(g.target.value),className:"flex-1 min-w-[140px]"}),a.jsx(be,{placeholder:"Email (optional)",type:"email",value:r,onChange:g=>l(g.target.value),className:"flex-1 min-w-[180px]"}),a.jsxs(R,{size:"sm",onClick:u,disabled:s.isPending||!i.trim(),children:[s.isPending?a.jsx(ue,{className:"h-4 w-4 animate-spin"}):a.jsx(oa,{className:"h-4 w-4 mr-1"}),"Invite"]}),a.jsxs(R,{variant:"outline",size:"sm",onClick:f,children:[a.jsx(zt,{className:"h-4 w-4 mr-1"}),"Host link"]})]}),t.length>0&&a.jsx("div",{className:"space-y-1.5",children:t.map(g=>a.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/30 rounded-md",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("span",{className:"text-sm font-medium truncate",children:g.guest_name}),g.is_admitted?a.jsx(H,{variant:"outline",className:"text-[10px] h-4 px-1.5 shrink-0",children:"Admitted"}):g.status==="waiting"?a.jsx(H,{variant:"outline",className:"text-[10px] h-4 px-1.5 shrink-0",children:"Ready"}):g.guest_id?a.jsx(H,{className:"text-[10px] h-4 px-1.5 shrink-0 bg-emerald-600 hover:bg-emerald-600 text-white border-transparent",children:"Confirmed"}):a.jsx(H,{variant:"outline",className:"text-[10px] h-4 px-1.5 shrink-0",children:"Invited"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[!g.is_admitted&&a.jsx(H,{variant:"outline",className:"text-[10px] h-5 px-1.5 text-muted-foreground",children:"Waiting for guest"}),a.jsx(R,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>p(g.join_code),children:a.jsx(zt,{className:"h-3.5 w-3.5"})}),a.jsx(R,{size:"sm",variant:"ghost",className:"h-7 text-destructive",onClick:()=>n.mutate(g.id),children:a.jsx(Ts,{className:"h-3.5 w-3.5"})})]})]},g.id))})]}):a.jsx("p",{className:"text-sm text-muted-foreground",children:"Complete Step 1 to manage guests."})})}function lh({onStatusChange:e}){const[t,s]=y.useState(!1),[n,i]=y.useState(null),[o,r]=y.useState(null),[l,c]=y.useState(null),[d,u]=y.useState(0),h=y.useRef(null),f=y.useRef(null),p=y.useRef(null),v=y.useRef(null),g=n&&o&&l?"ready":n===!1||o===!1||l===!1?"pending":"not_started";y.useEffect(()=>{e(g)},[g,e]);const x=()=>{v.current&&cancelAnimationFrame(v.current),p.current&&p.current.close().catch(()=>{}),f.current&&f.current.getTracks().forEach(w=>w.stop()),f.current=null,p.current=null,h.current&&(h.current.srcObject=null)};y.useEffect(()=>()=>x(),[]);const b=async()=>{s(!0),i(null),r(null),c(null),x();try{const w=await navigator.mediaDevices.getUserMedia({audio:!0,video:{width:320,height:180}});f.current=w,i(w.getAudioTracks().length>0),r(w.getVideoTracks().length>0),h.current&&(h.current.srcObject=w,h.current.play().catch(()=>{}));const S=new AudioContext;p.current=S;const T=S.createMediaStreamSource(w),N=S.createAnalyser();N.fftSize=256,T.connect(N);const D=new Uint8Array(N.frequencyBinCount),m=()=>{N.getByteFrequencyData(D);const C=D.reduce((A,M)=>A+M,0)/D.length;u(Math.min(100,Math.round(C/255*100*2))),v.current=requestAnimationFrame(m)};m()}catch{i(!1),r(!1)}try{const w=performance.now();await fetch(window.location.origin+"/robots.txt",{cache:"no-store"});const S=performance.now()-w;c(S<1500)}catch{c(!1)}s(!1)},j=({ok:w,label:S,Icon:T})=>a.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/30 rounded-md",children:[a.jsx(T,{className:`h-4 w-4 ${w===!0?"text-primary":w===!1?"text-destructive":"text-muted-foreground"}`}),a.jsx("span",{className:"text-xs font-medium flex-1",children:S}),w===!0&&a.jsx(Ki,{className:"h-4 w-4 text-primary"}),w===!1&&a.jsx("span",{className:"text-xs text-destructive",children:"Failed"}),w===null&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})]});return a.jsxs(Ze,{stepNumber:3,title:"A/V Check",subtitle:"Verify mic, camera, and network before going live",status:g,actions:a.jsxs(R,{size:"sm",onClick:b,disabled:t,children:[t?a.jsx(ue,{className:"h-4 w-4 mr-1 animate-spin"}):a.jsx(ie,{className:"h-4 w-4 mr-1"}),n===null?"Run A/V test":"Re-run test"]}),children:[a.jsxs("div",{className:"grid sm:grid-cols-3 gap-2",children:[a.jsx(j,{ok:n,label:"Microphone",Icon:ie}),a.jsx(j,{ok:o,label:"Camera",Icon:aa}),a.jsx(j,{ok:l,label:"Network",Icon:pa})]}),n!==null&&a.jsxs("div",{className:"grid grid-cols-[120px_1fr] gap-3 items-center",children:[a.jsx("video",{ref:h,playsInl
24ine:!0,muted:!0,className:"rounded-md bg-black aspect-video w-full object-cover"}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Mic level"}),a.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${d}%`}})}),a.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Speak — bar should move. Below 10% indicates a quiet/muted mic."})]})]})]})}function ch({session:e}){const t=e?"ready":"locked",s=[{icon:Oo,label:"Rundown",note:"Set up live during the show"},{icon:ca,label:"Soundboard",note:"Cues available in Control Dock"},{icon:ua,label:"Brand Kit",note:"Lower-thirds & overlays in Control Dock"}];return a.jsx(Ze,{stepNumber:4,title:"Show Assets",subtitle:"Rundown, soundboard, and brand kit travel with you into the control room",status:t,actions:e&&a.jsx(R,{variant:"outline",size:"sm",asChild:!0,children:a.jsxs(Ai,{to:`/admin/producer/${e.id}`,children:[a.jsx(la,{className:"h-4 w-4 mr-1"}),"Open Asset Library"]})}),children:a.jsx("div",{className:"grid sm:grid-cols-3 gap-2",children:s.map(({icon:n,label:i,note:o})=>a.jsxs("div",{className:"p-3 bg-muted/30 rounded-md space-y-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(n,{className:"h-4 w-4 text-primary"}),a.jsx("span",{className:"text-sm font-medium",children:i})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:o})]},i))})})}function uh({session:e,unlocked:t}){const s=ko(),n=ta(),i=e&&t?"ready":"locked",o=!!e&&t,r=n.isPending,l=async()=>{if(!(!e||!o))try{e.status==="scheduled"&&await n.mutateAsync({sessionId:e.id,status:"pre_flight"}),s(`/admin/producer/${e.id}`)}catch(c){V.error((c==null?void 0:c.message)||"Failed to enter control room")}};return a.jsx(Ze,{stepNumber:5,title:"Enter Control Room",subtitle:o?"Session ready — enter the Control Room to prep, admit guests, and go live":"Create a session in Step 1 to unlock the Control Room",status:i,children:a.jsx(R,{size:"lg",className:"w-full text-base",disabled:!o||r,onClick:l,children:o?r?a.jsxs(a.Fragment,{children:[a.jsx(ue,{className:"h-5 w-5 mr-2 animate-spin"}),"Opening Control Room…"]}):a.jsxs(a.Fragment,{children:[a.jsx(_o,{className:"h-5 w-5 mr-2"}),"Enter Control Room"]}):a.jsxs(a.Fragment,{children:[a.jsx(Gi,{className:"h-5 w-5 mr-2"}),"Locked"]})})})}function df(){const[e]=Eo(),t=e.get("episode"),{data:s=[]}=Hi(),[n,i]=y.useState(null),[o,r]=y.useState(!1),[l,c]=y.useState("not_started"),d=sa(),u=na(),h=y.useRef(new Set);y.useEffect(()=>{if(o||!t||s.length===0)return;const m=s.find(C=>C.episode_id===t);m&&i(m.id),r(!0)},[o,t,s]);const f=y.useMemo(()=>s.find(m=>m.id===n)??null,[s,n]),{data:p=[]}=Xi(f==null?void 0:f.id),v=!!f&&f.room_url==="pending";y.useEffect(()=>{!f||!v||h.current.has(f.id)||(h.current.add(f.id),u.mutate({session_id:f.id},{onError:m=>{V.error(`Room provisioning failed: ${(m==null?void 0:m.message)||"unknown error"}`)}}))},[f==null?void 0:f.id,v]);const g=(f==null?void 0:f.status)==="live"||(f==null?void 0:f.status)==="recording",x=async()=>{if(f){if(g){V.error("Cannot re-provision while session is live or recording");return}if(!(f.room_url!=="pending"&&!confirm("Re-provision the studio room? The current Daily room and join links will be replaced. Anyone already in the room will be disconnected.")))try{await u.mutateAsync({session_id:f.id}),V.success("Studio room ready")}catch(m){V.error((m==null?void 0:m.message)||"Failed to provision room")}}},b=!!f,j=!!f&&p.length>0&&p.every(m=>m.is_admitted),w=l==="ready",S=!!f,T=b,N=[b,j,w,S,T].filter(Boolean).length,D=async()=>{if(f&&confirm(`End session "${f.title||f.room_name}"?`))try{await d.mutateAsync({session_id:f.id}),V.success("Session ended"),i(null)}catch(m){V.error(m.message||"Failed to end session")}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-display font-bold",children:"Recording Studio"}),a.jsx("p",{className:"text-muted-foreground",children:"Preflight console — guided checks before going live"})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[f&&a.jsxs(R,{variant:v?"default":"outline",size:"sm",onClick:x,disabled:u.isPending||g,title:g?"Disabled 
24while session is live":v?"Provision the Daily.co video room":"Replace the current room with a fresh one",children:[u.isPending?a.jsx(ue,{className:"h-4 w-4 mr-1 animate-spin"}):v?a.jsx(ce,{className:"h-4 w-4 mr-1"}):a.jsx(da,{className:"h-4 w-4 mr-1"}),u.isPending?"Provisioning…":v?"Provision Room":"Re-provision"]}),a.jsx(R,{asChild:!0,variant:"outline",size:"sm",children:a.jsxs(Ai,{to:"/admin/pipeline",children:[a.jsx(ha,{className:"h-4 w-4 mr-1"})," Back to Pipeline"]})})]})]}),a.jsxs(Lo,{defaultValue:"preflight",children:[a.jsxs(Fo,{children:[a.jsxs(wt,{value:"preflight",className:"gap-2",children:[a.jsx(Wi,{className:"h-4 w-4"}),"Preflight"]}),a.jsxs(wt,{value:"solo",className:"gap-2",children:[a.jsx(ie,{className:"h-4 w-4"}),"Solo Record"]}),a.jsxs(wt,{value:"library",className:"gap-2",children:[a.jsx(zi,{className:"h-4 w-4"}),"Asset Library"]})]}),a.jsxs(jt,{value:"preflight",className:"mt-0",children:[a.jsx(nh,{session:f,readyCount:N,totalSteps:5,onEndSession:f?D:void 0}),a.jsxs("div",{className:"space-y-4 mt-6",children:[a.jsx(oh,{selectedId:n,onSelect:i,session:f}),a.jsx(ah,{session:f}),a.jsx(lh,{onStatusChange:c}),a.jsx(ch,{session:f}),a.jsx(uh,{session:f,unlocked:T})]})]}),a.jsx(jt,{value:"solo",className:"mt-4",children:a.jsx(eh,{})}),a.jsx(jt,{value:"library",className:"mt-4",children:a.jsx(sh,{})})]})]})}export{df as default};

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.