@skybridge/devtools 0.16.6 → 0.16.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
56
56
  `;break;case"id":f=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?i(parseInt(x,10)):r(new QM(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:E}));break;default:r(new QM(`Unknown field "${T.length>20?`${T.slice(0,20)}…`:T}"`,{type:"unknown-field",field:T,value:x,line:E}));break}}function w(){d.length>0&&t({id:f,event:h||void 0,data:d.endsWith(`
57
57
  `)?d.slice(0,-1):d}),f=void 0,d="",h=""}function b(T={}){l&&T.consume&&y(l),c=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function wte(e){const t=[];let r="",i=0;for(;i<e.length;){const o=e.indexOf("\r",i),l=e.indexOf(`
58
58
  `,i);let c=-1;if(o!==-1&&l!==-1?c=Math.min(o,l):o!==-1?o===e.length-1?c=-1:c=o:l!==-1&&(c=l),c===-1){r=e.slice(i);break}else{const f=e.slice(i,c);t.push(f),i=c+1,e[i-1]==="\r"&&e[i]===`
59
- `&&i++}}return[t,r]}class _te extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let o;super({start(l){o=Ste({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){o.feed(l)}})}}const Ete={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class tp extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class xte{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Uee(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Ete}async _authThenStart(){if(!this._authProvider)throw new ep("No auth provider");let t;try{t=await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new ep;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=zT(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new tp(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),o)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},o)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:o,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new _te({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:b}=await m.read();if(b)break;if(w.id&&(c=w.id,f=!0,o?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const T=ME.parse(JSON.parse(w.data));cv(T)&&(d=!0,l!==void 0&&(T.id=l)),this.onmessage?.(T)}catch(T){this.onerror?.(T)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new ep("No auth provider");if(await N1(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ep("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:o}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:kT(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new tp(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:b}=ZM(f);if(this._resourceMetadataUrl=w,this._scope=b,await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ep;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:b,error:T}=ZM(f);if(T==="insufficient_scope"){const x=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new tp(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=x??void 0,await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new ep;return this.send(t)}}throw new tp(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),nW(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,y=f.headers.get("content-type");if(m)if(y?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:o},!1);else if(y?.includes("application/json")){const v=await f.json(),w=Array.isArray(v)?v.map(b=>ME.parse(b)):[ME.parse(v)];for(const b of w)this.onmessage?.(b)}else throw await f.body?.cancel(),new tp(-1,`Unexpected content type: ${y}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new tp(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class Tte{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new xte(r),this.client=new Pee({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:r??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const xb=new Tte;xb.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const Cte={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},qz=()=>{const{data:e}=QN({queryKey:["list-tools"],queryFn:()=>xb.listTools()});return e},Ote=()=>xb.getServerInfo(),Ate=()=>{const{setToolData:e}=lm();return WI({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const i=await xb.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Cte,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta,widgetState:null}}),i}})},gA=()=>{const[e]=PO();return qz().find(r=>r.name===e)??null},Vh=()=>{const e=gA();if(!e)throw new Error("No tool is currently selected");return e},Rte=e=>QN({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await xb.readResource(e)}});const Mte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),WM=e=>{const t=jte(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vz=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Dte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Nte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const kte=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Nte,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Vz("lucide",o),...!l&&!Dte(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const zl=(e,t)=>{const r=j.forwardRef(({className:i,...o},l)=>j.createElement(kte,{ref:l,iconNode:t,className:Vz(`lucide-${Mte(WM(e))}`,`lucide-${e}`,i),...o}));return r.displayName=WM(e),r};const zte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$te=zl("check",zte);const Pte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bz=zl("chevron-down",Pte);const Ute=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ite=zl("chevron-up",Ute);const Lte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qte=zl("circle-alert",Lte);const Vte=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Bte=zl("external-link",Vte);const Fte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hte=zl("loader-circle",Fte);const Gte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Kte=zl("moon",Gte);const Yte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Zte=zl("play",Yte);const Xte=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Qte=zl("sun",Xte);const Wte=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Jte=zl("trash",Wte);function $2(){return typeof window<"u"}function Xc(e){return yA(e)?(e.nodeName||"").toLowerCase():"#document"}function Ma(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $l(e){var t;return(t=(yA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yA(e){return $2()?e instanceof Node||e instanceof Ma(e).Node:!1}function Ur(e){return $2()?e instanceof Element||e instanceof Ma(e).Element:!1}function Wr(e){return $2()?e instanceof HTMLElement||e instanceof Ma(e).HTMLElement:!1}function YT(e){return!$2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ma(e).ShadowRoot}const ene=new Set(["inline","contents"]);function Bh(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=Vs(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!ene.has(o)}const tne=new Set(["table","td","th"]);function nne(e){return tne.has(Xc(e))}const rne=[":popover-open",":modal"];function P2(e){return rne.some(t=>{try{return e.matches(t)}catch{return!1}})}const ane=["transform","translate","scale","rotate","perspective"],ine=["transform","translate","scale","rotate","perspective","filter"],sne=["paint","layout","strict","content"];function vA(e){const t=U2(),r=Ur(e)?Vs(e):e;return ane.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||ine.some(i=>(r.willChange||"").includes(i))||sne.some(i=>(r.contain||"").includes(i))}function one(e){let t=nc(e);for(;Wr(t)&&!ec(t);){if(vA(t))return t;if(P2(t))return null;t=nc(t)}return null}function U2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lne=new Set(["html","body","#document"]);function ec(e){return lne.has(Xc(e))}function Vs(e){return Ma(e).getComputedStyle(e)}function I2(e){return Ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nc(e){if(Xc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||YT(e)&&e.host||$l(e);return YT(t)?t.host:t}function Fz(e){const t=nc(e);return ec(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wr(t)&&Bh(t)?t:Fz(t)}function Oc(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Fz(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),c=Ma(o);if(l){const f=ZT(c);return t.concat(c,c.visualViewport||[],Bh(o)?o:[],f&&r?Oc(f):[])}return t.concat(o,Oc(o,[],r))}function ZT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const JM={};function Al(e,t){const r=j.useRef(JM);return r.current===JM&&(r.current=e(t)),r}const YE=ob[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],une=YE&&YE!==j.useLayoutEffect?YE:e=>e();function Ct(e){const t=Al(cne).current;return t.next=e,une(t.effect),t.trampoline}function cne(){const e={next:void 0,callback:fne,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function fne(){}const dne=()=>{},St=typeof document<"u"?j.useLayoutEffect:dne;function XT(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Sv={};function L2(e,t,r,i,o){let l={...QT(e,Sv)};return t&&(l=fv(l,t)),r&&(l=fv(l,r)),i&&(l=fv(l,i)),o&&(l=fv(l,o)),l}function hne(e){if(e.length===0)return Sv;if(e.length===1)return QT(e[0],Sv);let t={...QT(e[0],Sv)};for(let r=1;r<e.length;r+=1)t=fv(t,e[r]);return t}function fv(e,t){return Hz(t)?t(e):pne(e,t)}function pne(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=XT(e.style,i);break}case"className":{e[r]=Gz(e.className,i);break}default:mne(r,i)?e[r]=gne(e[r],i):e[r]=i}}return e}function mne(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return r===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Hz(e){return typeof e=="function"}function QT(e,t){return Hz(e)?e(t):e??Sv}function gne(e,t){return t?e?r=>{if(yne(r)){const o=r;WT(o);const l=t(o);return o.baseUIHandlerPrevented||e?.(o),l}const i=t(r);return e?.(r),i}:t:e}function WT(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Gz(e,t){return t?e?t+" "+e:t:e}function yne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Pl(e,...t){const r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const Kz=j.createContext(void 0);function Yz(e=!1){const t=j.useContext(Kz);if(t===void 0&&!e)throw new Error(Pl(16));return t}function vne(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=o,!l&&r&&(h.tabIndex=t?o:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,o])}}function q2(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0}=e,l=j.useRef(null),c=Yz(!0)!==void 0,f=Ct(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=vne({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:o}),h=j.useCallback(()=>{const v=l.current;bne(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);St(h,[h]);const m=j.useCallback((v={})=>{const{onClick:w,onMouseDown:b,onKeyUp:T,onKeyDown:x,onPointerDown:E,...S}=v;return L2({type:o?"button":void 0,onClick(_){if(t){_.preventDefault();return}w?.(_)},onMouseDown(_){t||b?.(_)},onKeyDown(_){if(t||(WT(_),x?.(_)),_.baseUIHandlerPrevented)return;const A=_.target===_.currentTarget&&!o&&!f()&&!t,C=_.key==="Enter",M=_.key===" ";A&&((M||C)&&_.preventDefault(),C&&w?.(_))},onKeyUp(_){t||(WT(_),T?.(_)),!_.baseUIHandlerPrevented&&_.target===_.currentTarget&&!o&&!t&&_.key===" "&&w?.(_)},onPointerDown(_){if(t){_.preventDefault();return}E?.(_)}},o?void 0:{role:"button"},d,S)},[t,d,o,f]),y=Ct(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:y}}function bne(e){return Wr(e)&&e.tagName==="BUTTON"}function Ic(e,t,r,i){const o=Al(Zz).current;return wne(o,e,t,r,i)&&Xz(o,[e,t,r,i]),o.callback}function Sne(e){const t=Al(Zz).current;return _ne(t,e)&&Xz(t,e),t.callback}function Zz(){return{callback:null,cleanup:null,refs:[]}}function wne(e,t,r,i,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==o}function _ne(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function Xz(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[o]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=i[o];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const Ene=parseInt(j.version,10);function bA(e){return Ene>=e}function e4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(bA(19)?r?.ref:t.ref)??null}function xne(e,t){const r={};for(const i in e){const o=e[i];if(t?.hasOwnProperty(i)){const l=t[i](o);l!=null&&Object.assign(r,l);continue}o===!0?r[`data-${i.toLowerCase()}`]="":o&&(r[`data-${i.toLowerCase()}`]=o.toString())}return r}function Tne(e,t){return typeof e=="function"?e(t):e}function Cne(e,t){return typeof e=="function"?e(t):e}function $s(){}const Bp=Object.freeze([]),Ps=Object.freeze({}),One={style:{transition:"none"}},Ane="data-base-ui-click-trigger",Rne={fallbackAxisSide:"none"},Mne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function za(e,t,r={}){const i=t.render,o=jne(t,r);if(r.enabled===!1)return null;const l=r.state??Ps;return Dne(e,i,o,l)}function jne(e,t={}){const{className:r,style:i,render:o}=e,{state:l=Ps,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?Tne(r,l):void 0,y=h?Cne(i,l):void 0,v=h?xne(l,d):Ps,w=h?XT(v,Array.isArray(f)?hne(f):f)??Ps:Ps;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=Sne([w.ref,e4(o),...c]):w.ref=Ic(w.ref,e4(o),c):Ic(null,null)),h?(m!==void 0&&(w.className=Gz(w.className,m)),y!==void 0&&(w.style=XT(w.style,y)),w):Ps}function Dne(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const o=L2(r,t.props);return o.ref=r.ref,j.cloneElement(t,o)}if(e&&typeof e=="string")return Nne(e,r);throw new Error(Pl(8))}function Nne(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const kne=j.forwardRef(function(t,r){const{render:i,className:o,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,h=!!l,{getButtonProps:m,buttonRef:y}=q2({disabled:h,focusableWhenDisabled:c,native:f}),v=j.useMemo(()=>({disabled:h}),[h]);return za("button",t,{state:v,ref:[r,y],props:[d,m]})});function Qz(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qz(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function SA(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qz(e))&&(i&&(i+=" "),i+=t);return i}const t4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,n4=SA,Qc=(e,t)=>r=>{var i;if(t?.variants==null)return n4(e,r?.class,r?.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(h=>{const m=r?.[h],y=l?.[h];if(m===null)return null;const v=t4(m)||t4(y);return o[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,v]=m;return v===void 0||(h[y]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:v,...w}=m;return Object.entries(w).every(b=>{let[T,x]=b;return Array.isArray(x)?x.includes({...l,...f}[T]):{...l,...f}[T]===x})?[...h,y,v]:h},[]);return n4(e,c,d,r?.class,r?.className)},zne=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},$ne=(e,t)=>({classGroupId:e,validator:t}),Wz=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),VS="-",r4=[],Pne="arbitrary..",Une=e=>{const t=Lne(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Ine(c);const f=c.split(VS),d=f[0]===""&&f.length>1?1:0;return Jz(f,d,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=r[c];return d?h?zne(h,d):d:h||r4}return r[c]||r4}}},Jz=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],l=r.nextPart.get(o);if(l){const h=Jz(e,t+1,l);if(h)return h}const c=r.validators;if(c===null)return;const f=t===0?e.join(VS):e.slice(t).join(VS),d=c.length;for(let h=0;h<d;h++){const m=c[h];if(m.validator(f))return m.classGroupId}},Ine=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?Pne+i:void 0})(),Lne=e=>{const{theme:t,classGroups:r}=e;return qne(r,t)},qne=(e,t)=>{const r=Wz();for(const i in e){const o=e[i];wA(o,r,i,t)}return r},wA=(e,t,r,i)=>{const o=e.length;for(let l=0;l<o;l++){const c=e[l];Vne(c,t,r,i)}},Vne=(e,t,r,i)=>{if(typeof e=="string"){Bne(e,t,r);return}if(typeof e=="function"){Fne(e,t,r,i);return}Hne(e,t,r,i)},Bne=(e,t,r)=>{const i=e===""?t:e9(t,e);i.classGroupId=r},Fne=(e,t,r,i)=>{if(Gne(e)){wA(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push($ne(r,e))},Hne=(e,t,r,i)=>{const o=Object.entries(e),l=o.length;for(let c=0;c<l;c++){const[f,d]=o[c];wA(d,e9(t,f),r,i)}},e9=(e,t)=>{let r=e;const i=t.split(VS),o=i.length;for(let l=0;l<o;l++){const c=i[l];let f=r.nextPart.get(c);f||(f=Wz(),r.nextPart.set(c,f)),r=f}return r},Gne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Kne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const o=(l,c)=>{r[l]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return o(l,c),c},set(l,c){l in r?r[l]=c:o(l,c)}}},JT="!",a4=":",Yne=[],i4=(e,t,r,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:o}),Zne=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=o=>{const l=[];let c=0,f=0,d=0,h;const m=o.length;for(let T=0;T<m;T++){const x=o[T];if(c===0&&f===0){if(x===a4){l.push(o.slice(d,T)),d=T+1;continue}if(x==="/"){h=T;continue}}x==="["?c++:x==="]"?c--:x==="("?f++:x===")"&&f--}const y=l.length===0?o:o.slice(d);let v=y,w=!1;y.endsWith(JT)?(v=y.slice(0,-1),w=!0):y.startsWith(JT)&&(v=y.slice(1),w=!0);const b=h&&h>d?h-d:void 0;return i4(l,w,v,b)};if(t){const o=t+a4,l=i;i=c=>c.startsWith(o)?l(c.slice(o.length)):i4(Yne,!1,c,void 0,!0)}if(r){const o=i;i=l=>r({className:l,parseClassName:o})}return i},Xne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let o=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",d=t.has(c);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(c)):o.push(c)}return o.length>0&&(o.sort(),i.push(...o)),i}},Qne=e=>({cache:Kne(e.cacheSize),parseClassName:Zne(e),sortModifiers:Xne(e),...Une(e)}),Wne=/\s+/,Jne=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=t,c=[],f=e.trim().split(Wne);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:y,modifiers:v,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:T}=r(m);if(y){d=m+(d.length>0?" "+d:d);continue}let x=!!T,E=i(x?b.substring(0,T):b);if(!E){if(!x){d=m+(d.length>0?" "+d:d);continue}if(E=i(b),!E){d=m+(d.length>0?" "+d:d);continue}x=!1}const S=v.length===0?"":v.length===1?v[0]:l(v).join(":"),O=w?S+JT:S,_=O+E;if(c.indexOf(_)>-1)continue;c.push(_);const A=o(E,x);for(let C=0;C<A.length;++C){const M=A[C];c.push(O+M)}d=m+(d.length>0?" "+d:d)}return d},ere=(...e)=>{let t=0,r,i,o="";for(;t<e.length;)(r=e[t++])&&(i=t9(r))&&(o&&(o+=" "),o+=i);return o},t9=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=t9(e[i]))&&(r&&(r+=" "),r+=t);return r},tre=(e,...t)=>{let r,i,o,l;const c=d=>{const h=t.reduce((m,y)=>y(m),e());return r=Qne(h),i=r.cache.get,o=r.cache.set,l=f,f(d)},f=d=>{const h=i(d);if(h)return h;const m=Jne(d,r);return o(d,m),m};return l=c,(...d)=>l(ere(...d))},nre=[],Ca=e=>{const t=r=>r[e]||nre;return t.isThemeGetter=!0,t},n9=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r9=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rre=/^\d+\/\d+$/,are=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ire=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sre=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ore=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lre=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,np=e=>rre.test(e),pn=e=>!!e&&!Number.isNaN(Number(e)),gc=e=>!!e&&Number.isInteger(Number(e)),ZE=e=>e.endsWith("%")&&pn(e.slice(0,-1)),Qu=e=>are.test(e),ure=()=>!0,cre=e=>ire.test(e)&&!sre.test(e),a9=()=>!1,fre=e=>ore.test(e),dre=e=>lre.test(e),hre=e=>!ft(e)&&!dt(e),pre=e=>dm(e,o9,a9),ft=e=>n9.test(e),uh=e=>dm(e,l9,cre),XE=e=>dm(e,bre,pn),s4=e=>dm(e,i9,a9),mre=e=>dm(e,s9,dre),k1=e=>dm(e,u9,fre),dt=e=>r9.test(e),tv=e=>hm(e,l9),gre=e=>hm(e,Sre),o4=e=>hm(e,i9),yre=e=>hm(e,o9),vre=e=>hm(e,s9),z1=e=>hm(e,u9,!0),dm=(e,t,r)=>{const i=n9.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},hm=(e,t,r=!1)=>{const i=r9.exec(e);return i?i[1]?t(i[1]):r:!1},i9=e=>e==="position"||e==="percentage",s9=e=>e==="image"||e==="url",o9=e=>e==="length"||e==="size"||e==="bg-size",l9=e=>e==="length",bre=e=>e==="number",Sre=e=>e==="family-name",u9=e=>e==="shadow",wre=()=>{const e=Ca("color"),t=Ca("font"),r=Ca("text"),i=Ca("font-weight"),o=Ca("tracking"),l=Ca("leading"),c=Ca("breakpoint"),f=Ca("container"),d=Ca("spacing"),h=Ca("radius"),m=Ca("shadow"),y=Ca("inset-shadow"),v=Ca("text-shadow"),w=Ca("drop-shadow"),b=Ca("blur"),T=Ca("perspective"),x=Ca("aspect"),E=Ca("ease"),S=Ca("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[..._(),dt,ft],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[dt,ft,d],$=()=>[np,"full","auto",...D()],q=()=>[gc,"none","subgrid",dt,ft],V=()=>["auto",{span:["full",gc,dt,ft]},gc,dt,ft],Y=()=>[gc,"auto",dt,ft],Q=()=>["auto","min","max","fr",dt,ft],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],G=()=>[np,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],J=()=>[e,dt,ft],fe=()=>[..._(),o4,s4,{position:[dt,ft]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yre,pre,{size:[dt,ft]}],U=()=>[ZE,tv,uh],I=()=>["","none","full",h,dt,ft],P=()=>["",pn,tv,uh],F=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[pn,ZE,o4,s4],ge=()=>["","none",b,dt,ft],we=()=>["none",pn,dt,ft],De=()=>["none",pn,dt,ft],te=()=>[pn,dt,ft],he=()=>[np,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qu],breakpoint:[Qu],color:[ure],container:[Qu],"drop-shadow":[Qu],ease:["in","out","in-out"],font:[hre],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qu],shadow:[Qu],spacing:["px",pn],text:[Qu],"text-shadow":[Qu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",np,ft,dt,x]}],container:["container"],columns:[{columns:[pn,ft,dt,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[gc,"auto",dt,ft]}],basis:[{basis:[np,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pn,np,"auto","initial","none",ft]}],grow:[{grow:["",pn,dt,ft]}],shrink:[{shrink:["",pn,dt,ft]}],order:[{order:[gc,"first","last","none",dt,ft]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[f,"screen",...G()]}],"min-w":[{"min-w":[f,"screen","none",...G()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,tv,uh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,dt,XE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ZE,ft]}],"font-family":[{font:[gre,ft,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,dt,ft]}],"line-clamp":[{"line-clamp":[pn,"none",dt,XE]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",dt,ft]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,ft]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[pn,"from-font","auto",dt,uh]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[pn,"auto",dt,ft]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dt,ft]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dt,ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gc,dt,ft],radial:["",dt,ft],conic:[gc,dt,ft]},vre,mre]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pn,dt,ft]}],"outline-w":[{outline:["",pn,tv,uh]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",m,z1,k1]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",y,z1,k1]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[pn,uh]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",v,z1,k1]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[pn,dt,ft]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[dt,ft]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[pn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",dt,ft]}],filter:[{filter:["","none",dt,ft]}],blur:[{blur:ge()}],brightness:[{brightness:[pn,dt,ft]}],contrast:[{contrast:[pn,dt,ft]}],"drop-shadow":[{"drop-shadow":["","none",w,z1,k1]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",pn,dt,ft]}],"hue-rotate":[{"hue-rotate":[pn,dt,ft]}],invert:[{invert:["",pn,dt,ft]}],saturate:[{saturate:[pn,dt,ft]}],sepia:[{sepia:["",pn,dt,ft]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,ft]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[pn,dt,ft]}],"backdrop-contrast":[{"backdrop-contrast":[pn,dt,ft]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pn,dt,ft]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pn,dt,ft]}],"backdrop-invert":[{"backdrop-invert":["",pn,dt,ft]}],"backdrop-opacity":[{"backdrop-opacity":[pn,dt,ft]}],"backdrop-saturate":[{"backdrop-saturate":[pn,dt,ft]}],"backdrop-sepia":[{"backdrop-sepia":["",pn,dt,ft]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",dt,ft]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pn,"initial",dt,ft]}],ease:[{ease:["linear","initial",E,dt,ft]}],delay:[{delay:[pn,dt,ft]}],animate:[{animate:["none",S,dt,ft]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,dt,ft]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[dt,ft,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dt,ft]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dt,ft]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[pn,tv,uh,XE]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},c9=tre(wre);function Qn(...e){return c9(SA(e))}const _re=Qc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Bv({className:e,variant:t="default",size:r="default",...i}){return N.jsx(kne,{"data-slot":"button",className:Qn(_re({variant:t,size:r,className:e})),...i})}const Ere=()=>{const e=Ote(),t=e?.name,r=e?.version,[,i]=PO();return N.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:N.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),N.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),N.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[N.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),N.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),N.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[N.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),N.jsx("div",{className:"flex items-center gap-2",children:N.jsx(Bv,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:N.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",N.jsx(Bte,{className:"h-3.5 w-3.5"})]})})})]})})},f9=j.createContext({});function xre(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const _A=typeof window<"u",Tre=_A?j.useLayoutEffect:j.useEffect,EA=j.createContext(null);function xA(e,t){e.indexOf(t)===-1&&e.push(t)}function TA(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const rc=(e,t,r)=>r>t?t:r<e?e:r;let CA=()=>{};const ac={},d9=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function h9(e){return typeof e=="object"&&e!==null}const p9=e=>/^0[^.\s]+$/u.test(e);function OA(e){let t;return()=>(t===void 0&&(t=e()),t)}const ao=e=>e,Cre=(e,t)=>r=>t(e(r)),Tb=(...e)=>e.reduce(Cre),Fv=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class AA{constructor(){this.subscriptions=[]}add(t){return xA(this.subscriptions,t),()=>TA(this.subscriptions,t)}notify(t,r,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,i);else for(let l=0;l<o;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xl=e=>e*1e3,to=e=>e/1e3;function m9(e,t){return t?e*(1e3/t):0}const g9=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Ore=1e-7,Are=12;function Rre(e,t,r,i,o){let l,c,f=0;do c=t+(r-t)/2,l=g9(c,i,o)-e,l>0?r=c:t=c;while(Math.abs(l)>Ore&&++f<Are);return c}function Cb(e,t,r,i){if(e===t&&r===i)return ao;const o=l=>Rre(l,0,1,e,r);return l=>l===0||l===1?l:g9(o(l),t,i)}const y9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,v9=e=>t=>1-e(1-t),b9=Cb(.33,1.53,.69,.99),RA=v9(b9),S9=y9(RA),w9=e=>(e*=2)<1?.5*RA(e):.5*(2-Math.pow(2,-10*(e-1))),MA=e=>1-Math.sin(Math.acos(e)),_9=v9(MA),E9=y9(MA),Mre=Cb(.42,0,1,1),jre=Cb(0,0,.58,1),x9=Cb(.42,0,.58,1),Dre=e=>Array.isArray(e)&&typeof e[0]!="number",T9=e=>Array.isArray(e)&&typeof e[0]=="number",Nre={linear:ao,easeIn:Mre,easeInOut:x9,easeOut:jre,circIn:MA,circInOut:E9,circOut:_9,backIn:RA,backInOut:S9,backOut:b9,anticipate:w9},kre=e=>typeof e=="string",l4=e=>{if(T9(e)){CA(e.length===4);const[t,r,i,o]=e;return Cb(t,r,i,o)}else if(kre(e))return Nre[e];return e},$1=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zre(e,t){let r=new Set,i=new Set,o=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,y=!1,v=!1)=>{const b=v&&o?r:i;return y&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,o){l=!0;return}o=!0,[r,i]=[i,r],r.forEach(d),r.clear(),o=!1,l&&(l=!1,h.process(m))}};return h}const $re=40;function C9(e,t){let r=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=$1.reduce((O,_)=>(O[_]=zre(l),O),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:v,render:w,postRender:b}=c,T=()=>{const O=ac.useManualTiming?o.timestamp:performance.now();r=!1,ac.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(O-o.timestamp,$re),1)),o.timestamp=O,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),m.process(o),y.process(o),v.process(o),w.process(o),b.process(o),o.isProcessing=!1,r&&t&&(i=!1,e(T))},x=()=>{r=!0,i=!0,o.isProcessing||e(T)};return{schedule:$1.reduce((O,_)=>{const A=c[_];return O[_]=(C,M=!1,D=!1)=>(r||x(),A.schedule(C,M,D)),O},{}),cancel:O=>{for(let _=0;_<$1.length;_++)c[$1[_]].cancel(O)},state:o,steps:c}}const{schedule:Ir,cancel:Lc,state:oi,steps:QE}=C9(typeof requestAnimationFrame<"u"?requestAnimationFrame:ao,!0);let uS;function Pre(){uS=void 0}const Wi={now:()=>(uS===void 0&&Wi.set(oi.isProcessing||ac.useManualTiming?oi.timestamp:performance.now()),uS),set:e=>{uS=e,queueMicrotask(Pre)}},O9=e=>t=>typeof t=="string"&&t.startsWith(e),A9=O9("--"),Ure=O9("var(--"),jA=e=>Ure(e)?Ire.test(e.split("/*")[0].trim()):!1,Ire=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hv={...pm,transform:e=>rc(0,1,e)},P1={...pm,default:1},wv=e=>Math.round(e*1e5)/1e5,DA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lre(e){return e==null}const qre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,NA=(e,t)=>r=>!!(typeof r=="string"&&qre.test(r)&&r.startsWith(e)||t&&!Lre(r)&&Object.prototype.hasOwnProperty.call(r,t)),R9=(e,t,r)=>i=>{if(typeof i!="string")return i;const[o,l,c,f]=i.match(DA);return{[e]:parseFloat(o),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},Vre=e=>rc(0,255,e),WE={...pm,transform:e=>Math.round(Vre(e))},vh={test:NA("rgb","red"),parse:R9("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+WE.transform(e)+", "+WE.transform(t)+", "+WE.transform(r)+", "+wv(Hv.transform(i))+")"};function Bre(e){let t="",r="",i="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const eC={test:NA("#"),parse:Bre,transform:vh.transform},Ob=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vc=Ob("deg"),Tl=Ob("%"),lt=Ob("px"),Fre=Ob("vh"),Hre=Ob("vw"),u4={...Tl,parse:e=>Tl.parse(e)/100,transform:e=>Tl.transform(e*100)},gp={test:NA("hsl","hue"),parse:R9("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+Tl.transform(wv(t))+", "+Tl.transform(wv(r))+", "+wv(Hv.transform(i))+")"},sa={test:e=>vh.test(e)||eC.test(e)||gp.test(e),parse:e=>vh.test(e)?vh.parse(e):gp.test(e)?gp.parse(e):eC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?vh.transform(e):gp.transform(e),getAnimatableNone:e=>{const t=sa.parse(e);return t.alpha=0,sa.transform(t)}},Gre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kre(e){return isNaN(e)&&typeof e=="string"&&(e.match(DA)?.length||0)+(e.match(Gre)?.length||0)>0}const M9="number",j9="color",Yre="var",Zre="var(",c4="${}",Xre=/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 Gv(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},o=[];let l=0;const f=t.replace(Xre,d=>(sa.test(d)?(i.color.push(l),o.push(j9),r.push(sa.parse(d))):d.startsWith(Zre)?(i.var.push(l),o.push(Yre),r.push(d)):(i.number.push(l),o.push(M9),r.push(parseFloat(d))),++l,c4)).split(c4);return{values:r,split:f,indexes:i,types:o}}function D9(e){return Gv(e).values}function N9(e){const{split:t,types:r}=Gv(e),i=t.length;return o=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],o[c]!==void 0){const f=r[c];f===M9?l+=wv(o[c]):f===j9?l+=sa.transform(o[c]):l+=o[c]}return l}}const Qre=e=>typeof e=="number"?0:sa.test(e)?sa.getAnimatableNone(e):e;function Wre(e){const t=D9(e);return N9(e)(t.map(Qre))}const qc={test:Kre,parse:D9,createTransformer:N9,getAnimatableNone:Wre};function JE(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Jre({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let o=0,l=0,c=0;if(!t)o=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;o=JE(d,f,e+1/3),l=JE(d,f,e),c=JE(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function BS(e,t){return r=>r>0?t:e}const Hr=(e,t,r)=>e+(t-e)*r,ex=(e,t,r)=>{const i=e*e,o=r*(t*t-i)+i;return o<0?0:Math.sqrt(o)},eae=[eC,vh,gp],tae=e=>eae.find(t=>t.test(e));function f4(e){const t=tae(e);if(!t)return!1;let r=t.parse(e);return t===gp&&(r=Jre(r)),r}const d4=(e,t)=>{const r=f4(e),i=f4(t);if(!r||!i)return BS(e,t);const o={...r};return l=>(o.red=ex(r.red,i.red,l),o.green=ex(r.green,i.green,l),o.blue=ex(r.blue,i.blue,l),o.alpha=Hr(r.alpha,i.alpha,l),vh.transform(o))},tC=new Set(["none","hidden"]);function nae(e,t){return tC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function rae(e,t){return r=>Hr(e,t,r)}function kA(e){return typeof e=="number"?rae:typeof e=="string"?jA(e)?BS:sa.test(e)?d4:sae:Array.isArray(e)?k9:typeof e=="object"?sa.test(e)?d4:aae:BS}function k9(e,t){const r=[...e],i=r.length,o=e.map((l,c)=>kA(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=o[c](l);return r}}function aae(e,t){const r={...e,...t},i={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(i[o]=kA(e[o])(e[o],t[o]));return o=>{for(const l in i)r[l]=i[l](o);return r}}function iae(e,t){const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],c=e.indexes[l][i[l]],f=e.values[c]??0;r[o]=f,i[l]++}return r}const sae=(e,t)=>{const r=qc.createTransformer(t),i=Gv(e),o=Gv(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?tC.has(e)&&!o.values.length||tC.has(t)&&!i.values.length?nae(e,t):Tb(k9(iae(i,o),o.values),r):BS(e,t)};function z9(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Hr(e,t,r):kA(e)(e,t)}const oae=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ir.update(t,r),stop:()=>Lc(t),now:()=>oi.isProcessing?oi.timestamp:Wi.now()}},$9=(e,t,r=10)=>{let i="";const o=Math.max(Math.round(t/r),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},FS=2e4;function zA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<FS;)t+=r,i=e.next(t);return t>=FS?1/0:t}function lae(e,t=100,r){const i=r({...e,keyframes:[0,t]}),o=Math.min(zA(i),FS);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:to(o)}}const uae=5;function P9(e,t,r){const i=Math.max(t-uae,0);return m9(r-e(i),t-i)}const Qr={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},tx=.001;function cae({duration:e=Qr.duration,bounce:t=Qr.bounce,velocity:r=Qr.velocity,mass:i=Qr.mass}){let o,l,c=1-t;c=rc(Qr.minDamping,Qr.maxDamping,c),e=rc(Qr.minDuration,Qr.maxDuration,to(e)),c<1?(o=h=>{const m=h*c,y=m*e,v=m-r,w=nC(h,c),b=Math.exp(-y);return tx-v/w*b},l=h=>{const y=h*c*e,v=y*r+r,w=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-y),T=nC(Math.pow(h,2),c);return(-o(h)+tx>0?-1:1)*((v-w)*b)/T}):(o=h=>{const m=Math.exp(-h*e),y=(h-r)*e+1;return-tx+m*y},l=h=>{const m=Math.exp(-h*e),y=(r-h)*(e*e);return m*y});const f=5/e,d=dae(o,l,f);if(e=xl(e),isNaN(d))return{stiffness:Qr.stiffness,damping:Qr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const fae=12;function dae(e,t,r){let i=r;for(let o=1;o<fae;o++)i=i-e(i)/t(i);return i}function nC(e,t){return e*Math.sqrt(1-t*t)}const hae=["duration","bounce"],pae=["stiffness","damping","mass"];function h4(e,t){return t.some(r=>e[r]!==void 0)}function mae(e){let t={velocity:Qr.velocity,stiffness:Qr.stiffness,damping:Qr.damping,mass:Qr.mass,isResolvedFromDuration:!1,...e};if(!h4(e,pae)&&h4(e,hae))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),o=i*i,l=2*rc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Qr.mass,stiffness:o,damping:l}}else{const r=cae(e);t={...t,...r,mass:Qr.mass},t.isResolvedFromDuration=!0}return t}function HS(e=Qr.visualDuration,t=Qr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:y,velocity:v,isResolvedFromDuration:w}=mae({...r,velocity:-to(r.velocity||0)}),b=v||0,T=h/(2*Math.sqrt(d*m)),x=c-l,E=to(Math.sqrt(d/m)),S=Math.abs(x)<5;i||(i=S?Qr.restSpeed.granular:Qr.restSpeed.default),o||(o=S?Qr.restDelta.granular:Qr.restDelta.default);let O;if(T<1){const A=nC(E,T);O=C=>{const M=Math.exp(-T*E*C);return c-M*((b+T*E*x)/A*Math.sin(A*C)+x*Math.cos(A*C))}}else if(T===1)O=A=>c-Math.exp(-E*A)*(x+(b+E*x)*A);else{const A=E*Math.sqrt(T*T-1);O=C=>{const M=Math.exp(-T*E*C),D=Math.min(A*C,300);return c-M*((b+T*E*x)*Math.sinh(D)+A*x*Math.cosh(D))/A}}const _={calculatedDuration:w&&y||null,next:A=>{const C=O(A);if(w)f.done=A>=y;else{let M=A===0?b:0;T<1&&(M=A===0?xl(b):P9(O,A,C));const D=Math.abs(M)<=i,$=Math.abs(c-C)<=o;f.done=D&&$}return f.value=f.done?c:C,f},toString:()=>{const A=Math.min(zA(_),FS),C=$9(M=>_.next(A*M).value,A,30);return A+"ms "+C},toTransition:()=>{}};return _}HS.applyToOptions=e=>{const t=lae(e,100,HS);return e.ease=t.ease,e.duration=xl(t.duration),e.type="keyframes",e};function rC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],v={done:!1,value:y},w=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let T=r*t;const x=y+T,E=c===void 0?x:c(x);E!==x&&(T=E-y);const S=D=>-T*Math.exp(-D/i),O=D=>E+S(D),_=D=>{const $=S(D),q=O(D);v.done=Math.abs($)<=h,v.value=v.done?E:q};let A,C;const M=D=>{w(v.value)&&(A=D,C=HS({keyframes:[v.value,b(v.value)],velocity:P9(O,D,v.value),damping:o,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let $=!1;return!C&&A===void 0&&($=!0,_(D),M(D)),A!==void 0&&D>=A?C.next(D-A):(!$&&_(D),v)}}}function gae(e,t,r){const i=[],o=r||ac.mix||z9,l=e.length-1;for(let c=0;c<l;c++){let f=o(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||ao:t;f=Tb(d,f)}i.push(f)}return i}function yae(e,t,{clamp:r=!0,ease:i,mixer:o}={}){const l=e.length;if(CA(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=gae(t,i,o),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const v=Fv(e[y],e[y+1],m);return f[y](v)};return r?m=>h(rc(e[0],e[l-1],m)):h}function vae(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const o=Fv(0,t,i);e.push(Hr(r,1,o))}}function bae(e){const t=[0];return vae(t,e.length-1),t}function Sae(e,t){return e.map(r=>r*t)}function wae(e,t){return e.map(()=>t||x9).splice(0,e.length-1)}function _v({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const o=Dre(i)?i.map(l4):l4(i),l={done:!1,value:t[0]},c=Sae(r&&r.length===t.length?r:bae(t),e),f=yae(c,t,{ease:Array.isArray(o)?o:wae(t,o)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const _ae=e=>e!==null;function $A(e,{repeat:t,repeatType:r="loop"},i,o=1){const l=e.filter(_ae),f=o<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const Eae={decay:rC,inertia:rC,tween:_v,keyframes:_v,spring:HS};function U9(e){typeof e.type=="string"&&(e.type=Eae[e.type])}class PA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const xae=e=>e/100;class UA extends PA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Wi.now()&&this.tick(Wi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;U9(t);const{type:r=_v,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||_v;d!==_v&&typeof f[0]!="number"&&(this.mixKeyframes=Tb(xae,z9(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=zA(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:v,repeatDelay:w,type:b,onUpdate:T,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const E=this.currentTime-h*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?E<0:E>o;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let O=this.currentTime,_=i;if(y){const D=Math.min(this.currentTime,o)/f;let $=Math.floor(D),q=D%1;!q&&D>=1&&(q=1),q===1&&$--,$=Math.min($,y+1),$%2&&(v==="reverse"?(q=1-q,w&&(q-=w/f)):v==="mirror"&&(_=c)),O=rc(0,1,q)*f}const A=S?{done:!1,value:m[0]}:_.next(O);l&&(A.value=l(A.value));let{done:C}=A;!S&&d!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&b!==rC&&(A.value=$A(m,this.options,x,this.speed)),T&&T(A.value),M&&this.finish(),A}then(t,r){return this.finished.then(t,r)}get duration(){return to(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(this.currentTime)}set time(t){t=xl(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wi.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=to(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=oae,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),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(Wi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Tae(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bh=e=>e*180/Math.PI,aC=e=>{const t=bh(Math.atan2(e[1],e[0]));return iC(t)},Cae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:aC,rotateZ:aC,skewX:e=>bh(Math.atan(e[1])),skewY:e=>bh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},iC=e=>(e=e%360,e<0&&(e+=360),e),p4=aC,m4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),g4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Oae={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:m4,scaleY:g4,scale:e=>(m4(e)+g4(e))/2,rotateX:e=>iC(bh(Math.atan2(e[6],e[5]))),rotateY:e=>iC(bh(Math.atan2(-e[2],e[0]))),rotateZ:p4,rotate:p4,skewX:e=>bh(Math.atan(e[4])),skewY:e=>bh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sC(e){return e.includes("scale")?1:0}function oC(e,t){if(!e||e==="none")return sC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(r)i=Oae,o=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Cae,o=f}if(!o)return sC(t);const l=i[t],c=o[1].split(",").map(Rae);return typeof l=="function"?l(c):c[l]}const Aae=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return oC(r,t)};function Rae(e){return parseFloat(e.trim())}const mm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gm=new Set(mm),y4=e=>e===pm||e===lt,Mae=new Set(["x","y","z"]),jae=mm.filter(e=>!Mae.has(e));function Dae(e){const t=[];return jae.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const _h={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>oC(t,"x"),y:(e,{transform:t})=>oC(t,"y")};_h.translateX=_h.x;_h.translateY=_h.y;const Eh=new Set;let lC=!1,uC=!1,cC=!1;function I9(){if(uC){const e=Array.from(Eh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const o=Dae(i);o.length&&(r.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=r.get(i);o&&o.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}uC=!1,lC=!1,Eh.forEach(e=>e.complete(cC)),Eh.clear()}function L9(){Eh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uC=!0)})}function Nae(){cC=!0,L9(),I9(),cC=!1}class IA{constructor(t,r,i,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Eh.add(this),lC||(lC=!0,Ir.read(L9),Ir.resolveKeyframes(I9))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),o&&l===void 0&&o.set(t[0])}Tae(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Eh.delete(this)}cancel(){this.state==="scheduled"&&(Eh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kae=e=>e.startsWith("--");function zae(e,t,r){kae(t)?e.style.setProperty(t,r):e.style[t]=r}const $ae=OA(()=>window.ScrollTimeline!==void 0),Pae={};function Uae(e,t){const r=OA(e);return()=>Pae[t]??r()}const q9=Uae(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,v4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dv([0,.65,.55,1]),circOut:dv([.55,0,1,.45]),backIn:dv([.31,.01,.66,-.59]),backOut:dv([.33,1.53,.69,.99])};function V9(e,t){if(e)return typeof e=="function"?q9()?$9(e,t):"ease-out":T9(e)?dv(e):Array.isArray(e)?e.map(r=>V9(r,t)||v4.easeOut):v4[e]}function Iae(e,t,r,{delay:i=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const y=V9(f,o);Array.isArray(y)&&(m.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function B9(e){return typeof e=="function"&&"applyToOptions"in e}function Lae({type:e,...t}){return B9(e)&&q9()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class qae extends PA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:i,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,CA(typeof t.type!="string");const h=Lae(t);this.animation=Iae(r,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=$A(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):zae(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return to(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=xl(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$ae()?(this.animation.timeline=t,ao):r(this)}}const F9={anticipate:w9,backInOut:S9,circInOut:E9};function Vae(e){return e in F9}function Bae(e){typeof e.ease=="string"&&Vae(e.ease)&&(e.ease=F9[e.ease])}const b4=10;class Fae extends qae{constructor(t){Bae(t),U9(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:o,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new UA({...c,autoplay:!1}),d=xl(this.finishedTime??this.time);r.setWithVelocity(f.sample(d-b4).value,f.sample(d).value,b4),f.stop()}}const S4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(qc.test(e)||e==="0")&&!e.startsWith("url("));function Hae(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Gae(e,t,r,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=S4(o,t),f=S4(l,t);return!c||!f?!1:Hae(e)||(r==="spring"||B9(r))&&i}function fC(e){e.duration=0,e.type="keyframes"}const Kae=new Set(["opacity","clipPath","filter","transform"]),Yae=OA(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zae(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:o,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return Yae()&&r&&Kae.has(r)&&(r!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&c!=="inertia"}const Xae=40;class Qae extends PA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wi.now();const v={autoplay:t,delay:r,type:i,repeat:o,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...y},w=m?.KeyframeResolver||IA;this.keyframeResolver=new w(f,(b,T,x)=>this.onKeyframesResolved(b,T,v,!x),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Wi.now(),Gae(t,l,c,f)||((ac.instantAnimations||!d)&&m?.($A(t,i,r)),t[0]=t[t.length-1],fC(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Xae?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},w=!h&&Zae(v)?new Fae({...v,element:v.motionValue.owner.current}):new UA(v);w.finished.then(()=>this.notifyFinished()).catch(ao),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nae()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Wae=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jae(e){const t=Wae.exec(e);if(!t)return[,];const[,r,i,o]=t;return[`--${r??i}`,o]}function H9(e,t,r=1){const[i,o]=Jae(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return d9(c)?parseFloat(c):c}return jA(o)?H9(o,t,r+1):o}function LA(e,t){return e?.[t]??e?.default??e}const G9=new Set(["width","height","top","left","right","bottom",...mm]),eie={test:e=>e==="auto",parse:e=>e},K9=e=>t=>t.test(e),Y9=[pm,lt,Tl,vc,Hre,Fre,eie],w4=e=>Y9.find(K9(e));function tie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||p9(e):!0}const nie=new Set(["brightness","contrast","saturate","opacity"]);function rie(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(DA)||[];if(!i)return e;const o=r.replace(i,"");let l=nie.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+o+")"}const aie=/\b([a-z-]*)\(.*?\)/gu,dC={...qc,getAnimatableNone:e=>{const t=e.match(aie);return t?t.map(rie).join(" "):e}},_4={...pm,transform:Math.round},iie={rotate:vc,rotateX:vc,rotateY:vc,rotateZ:vc,scale:P1,scaleX:P1,scaleY:P1,scaleZ:P1,skew:vc,skewX:vc,skewY:vc,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:Hv,originX:u4,originY:u4,originZ:lt},qA={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,backgroundPositionX:lt,backgroundPositionY:lt,...iie,zIndex:_4,fillOpacity:Hv,strokeOpacity:Hv,numOctaves:_4},sie={...qA,color:sa,backgroundColor:sa,outlineColor:sa,fill:sa,stroke:sa,borderColor:sa,borderTopColor:sa,borderRightColor:sa,borderBottomColor:sa,borderLeftColor:sa,filter:dC,WebkitFilter:dC},Z9=e=>sie[e];function X9(e,t){let r=Z9(e);return r!==dC&&(r=qc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const oie=new Set(["auto","none","0"]);function lie(e,t,r){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!oie.has(l)&&Gv(l).values.length&&(o=e[i]),i++}if(o&&r)for(const l of t)e[l]=X9(r,o)}class uie extends IA{constructor(t,r,i,o,l){super(t,r,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),jA(h))){const m=H9(h,r.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!G9.has(i)||t.length!==2)return;const[o,l]=t,c=w4(o),f=w4(l);if(c!==f)if(y4(c)&&y4(f))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else _h[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||tie(t[o]))&&i.push(o);i.length&&lie(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_h[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=_h[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function cie(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=r?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const Q9=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function fie(e){return h9(e)&&"offsetHeight"in e}const E4=30,die=e=>!isNaN(parseFloat(e));class hie{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=Wi.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Wi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=die(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new AA);const i=this.events[t].add(r);return t==="change"?()=>{i(),Ir.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>E4)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,E4);return m9(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fp(e,t){return new hie(e,t)}const{schedule:VA}=C9(queueMicrotask,!1),al={x:!1,y:!1};function W9(){return al.x||al.y}function pie(e){return e==="x"||e==="y"?al[e]?null:(al[e]=!0,()=>{al[e]=!1}):al.x||al.y?null:(al.x=al.y=!0,()=>{al.x=al.y=!1})}function J9(e,t){const r=cie(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[r,o,()=>i.abort()]}function x4(e){return!(e.pointerType==="touch"||W9())}function mie(e,t,r={}){const[i,o,l]=J9(e,r),c=f=>{if(!x4(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const m=y=>{x4(y)&&(h(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,o)};return i.forEach(f=>{f.addEventListener("pointerenter",c,o)}),l}const e8=(e,t)=>t?e===t?!0:e8(e,t.parentElement):!1,BA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yie(e){return gie.has(e.tagName)||e.tabIndex!==-1}const cS=new WeakSet;function T4(e){return t=>{t.key==="Enter"&&e(t)}}function nx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vie=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=T4(()=>{if(cS.has(r))return;nx(r,"down");const o=T4(()=>{nx(r,"up")}),l=()=>nx(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function C4(e){return BA(e)&&!W9()}function bie(e,t,r={}){const[i,o,l]=J9(e,r),c=f=>{const d=f.currentTarget;if(!C4(f))return;cS.add(d);const h=t(d,f),m=(w,b)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),cS.has(d)&&cS.delete(d),C4(w)&&typeof h=="function"&&h(w,{success:b})},y=w=>{m(w,d===window||d===document||r.useGlobalTarget||e8(d,w.target))},v=w=>{m(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,o),fie(f)&&(f.addEventListener("focus",h=>vie(h,o)),!yie(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function t8(e){return h9(e)&&"ownerSVGElement"in e}function Sie(e){return t8(e)&&e.tagName==="svg"}const Ei=e=>!!(e&&e.getVelocity),wie=[...Y9,sa,qc],_ie=e=>wie.find(K9(e)),n8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Eie(e=!0){const t=j.useContext(EA);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:o}=t,l=j.useId();j.useEffect(()=>{if(e)return o(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const r8=j.createContext({strict:!1}),O4={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"]},Hp={};for(const e in O4)Hp[e]={isEnabled:t=>O4[e].some(r=>!!t[r])};function xie(e){for(const t in e)Hp[t]={...Hp[t],...e[t]}}const Tie=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 GS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tie.has(e)}let a8=e=>!GS(e);function Cie(e){typeof e=="function"&&(a8=t=>t.startsWith("on")?!GS(t):e(t))}try{Cie(require("@emotion/is-prop-valid").default)}catch{}function Oie(e,t,r){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(a8(o)||r===!0&&GS(o)||!t&&!GS(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const V2=j.createContext({});function B2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Kv(e){return typeof e=="string"||Array.isArray(e)}const FA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],HA=["initial",...FA];function F2(e){return B2(e.animate)||HA.some(t=>Kv(e[t]))}function i8(e){return!!(F2(e)||e.variants)}function Aie(e,t){if(F2(e)){const{initial:r,animate:i}=e;return{initial:r===!1||Kv(r)?r:void 0,animate:Kv(i)?i:void 0}}return e.inherit!==!1?t:{}}function Rie(e){const{initial:t,animate:r}=Aie(e,j.useContext(V2));return j.useMemo(()=>({initial:t,animate:r}),[A4(t),A4(r)])}function A4(e){return Array.isArray(e)?e.join(" "):e}function R4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nv={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(lt.test(e))e=parseFloat(e);else return e;const r=R4(e,t.target.x),i=R4(e,t.target.y);return`${r}% ${i}%`}},Mie={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,o=qc.parse(e);if(o.length>5)return i;const l=qc.createTransformer(e),c=typeof o[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;o[0+c]/=f,o[1+c]/=d;const h=Hr(f,d,.5);return typeof o[2+c]=="number"&&(o[2+c]/=h),typeof o[3+c]=="number"&&(o[3+c]/=h),l(o)}},hC={borderRadius:{...nv,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nv,borderTopRightRadius:nv,borderBottomLeftRadius:nv,borderBottomRightRadius:nv,boxShadow:Mie};function s8(e,{layout:t,layoutId:r}){return gm.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!hC[e]||e==="opacity")}const jie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Die=mm.length;function Nie(e,t,r){let i="",o=!0;for(let l=0;l<Die;l++){const c=mm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(c.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||r){const h=Q9(f,qA[c]);if(!d){o=!1;const m=jie[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,o?"":i):o&&(i="none"),i}function GA(e,t,r){const{style:i,vars:o,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(gm.has(d)){c=!0;continue}else if(A9(d)){o[d]=h;continue}else{const m=Q9(h,qA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=Nie(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}const KA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o8(e,t,r){for(const i in t)!Ei(t[i])&&!s8(i,r)&&(e[i]=t[i])}function kie({transformTemplate:e},t){return j.useMemo(()=>{const r=KA();return GA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function zie(e,t){const r=e.style||{},i={};return o8(i,r,e),Object.assign(i,kie(e,t)),i}function $ie(e,t){const r={},i=zie(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const Pie={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uie={offset:"strokeDashoffset",array:"strokeDasharray"};function Iie(e,t,r=1,i=0,o=!0){e.pathLength=1;const l=o?Pie:Uie;e[l.offset]=lt.transform(-i);const c=lt.transform(t),f=lt.transform(r);e[l.array]=`${c} ${f}`}const Lie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function l8(e,{attrX:t,attrY:r,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(GA(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of Lie)y[w]!==void 0&&(v[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),r!==void 0&&(y.y=r),i!==void 0&&(y.scale=i),o!==void 0&&Iie(y,o,l,c,!1)}const u8=()=>({...KA(),attrs:{}}),c8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qie(e,t,r,i){const o=j.useMemo(()=>{const l=u8();return l8(l,t,c8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};o8(l,e.style,e),o.style={...l,...o.style}}return o}const Vie=["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 YA(e){return typeof e!="string"||e.includes("-")?!1:!!(Vie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bie(e,t,r,{latestValues:i},o,l=!1,c){const d=(c??YA(e)?qie:$ie)(t,i,o,e),h=Oie(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:y}=t,v=j.useMemo(()=>Ei(y)?y.get():y,[y]);return j.createElement(e,{...m,children:v})}function M4(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function ZA(e,t,r,i){if(typeof t=="function"){const[o,l]=M4(i);t=t(r!==void 0?r:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=M4(i);t=t(r!==void 0?r:e.custom,o,l)}return t}function fS(e){return Ei(e)?e.get():e}function Fie({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,o){return{latestValues:Hie(r,i,o,e),renderState:t()}}function Hie(e,t,r,i){const o={},l=i(e,{});for(const v in l)o[v]=fS(l[v]);let{initial:c,animate:f}=e;const d=F2(e),h=i8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const y=m?f:c;if(y&&typeof y!="boolean"&&!B2(y)){const v=Array.isArray(y)?y:[y];for(let w=0;w<v.length;w++){const b=ZA(e,v[w]);if(b){const{transitionEnd:T,transition:x,...E}=b;for(const S in E){let O=E[S];if(Array.isArray(O)){const _=m?O.length-1:0;O=O[_]}O!==null&&(o[S]=O)}for(const S in T)o[S]=T[S]}}}return o}const f8=e=>(t,r)=>{const i=j.useContext(V2),o=j.useContext(EA),l=()=>Fie(e,t,i,o);return r?l():xre(l)};function XA(e,t,r){const{style:i}=e,o={};for(const l in i)(Ei(i[l])||t.style&&Ei(t.style[l])||s8(l,e)||r?.getValue(l)?.liveStyle!==void 0)&&(o[l]=i[l]);return o}const Gie=f8({scrapeMotionValuesFromProps:XA,createRenderState:KA});function d8(e,t,r){const i=XA(e,t,r);for(const o in e)if(Ei(e[o])||Ei(t[o])){const l=mm.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}const Kie=f8({scrapeMotionValuesFromProps:d8,createRenderState:u8}),Yie=Symbol.for("motionComponentSymbol");function yp(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function j4(e,t){if(typeof e=="function")return e(t);yp(e)&&(e.current=t)}function Zie(e,t,r){const i=j.useRef(null);return j.useCallback(o=>{if(o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r)if(o){const l=j4(r,o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):j4(r,o)},[t,e,r])}const QA=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xie="framerAppearId",h8="data-"+QA(Xie),p8=j.createContext({});function Qie(e,t,r,i,o,l){const{visualElement:c}=j.useContext(V2),f=j.useContext(r8),d=j.useContext(EA),h=j.useContext(n8).reducedMotion,m=j.useRef(null);i=i||f.renderer,!m.current&&i&&(m.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:l}));const y=m.current,v=j.useContext(p8);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&Wie(m.current,r,o,v);const w=j.useRef(!1);j.useInsertionEffect(()=>{y&&w.current&&y.update(r,d)});const b=r[h8],T=j.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return Tre(()=>{y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),T.current&&y.animationState&&y.animationState.animateChanges())}),j.useEffect(()=>{y&&(!T.current&&y.animationState&&y.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),T.current=!1),y.enteringChildren=void 0)}),y}function Wie(e,t,r,i){const{layoutId:o,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:m8(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||f&&yp(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function m8(e){if(e)return e.options.allowProjection!==!1?e.projection:m8(e.parent)}function rx(e,{forwardMotionProps:t=!1,type:r}={},i,o){i&&xie(i);const l=r?r==="svg":YA(e),c=l?Kie:Gie;function f(h,m){let y;const v={...j.useContext(n8),...h,layoutId:Jie(h)},{isStatic:w}=v,b=Rie(h),T=c(h,w);if(!w&&_A){ese();const x=tse(v);y=x.MeasureLayout,b.visualElement=Qie(e,T,v,o,x.ProjectionNode,l)}return N.jsxs(V2.Provider,{value:b,children:[y&&b.visualElement?N.jsx(y,{visualElement:b.visualElement,...v}):null,Bie(e,h,Zie(T,b.visualElement,m),T,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[Yie]=e,d}function Jie({layoutId:e}){const t=j.useContext(f9).id;return t&&e!==void 0?t+"-"+e:e}function ese(e,t){j.useContext(r8).strict}function tse(e){const{drag:t,layout:r}=Hp;if(!t&&!r)return{};const i={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function nse(e,t){if(typeof Proxy>"u")return rx;const r=new Map,i=(l,c)=>rx(l,c,e,t),o=(l,c)=>i(l,c);return new Proxy(o,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,rx(c,void 0,e,t)),r.get(c))})}function g8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function rse({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ase(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function ax(e){return e===void 0||e===1}function pC({scale:e,scaleX:t,scaleY:r}){return!ax(e)||!ax(t)||!ax(r)}function ph(e){return pC(e)||y8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function y8(e){return D4(e.x)||D4(e.y)}function D4(e){return e&&e!=="0%"}function KS(e,t,r){const i=e-r,o=t*i;return r+o}function N4(e,t,r,i,o){return o!==void 0&&(e=KS(e,o,i)),KS(e,r,i)+t}function mC(e,t=0,r=1,i,o){e.min=N4(e.min,t,r,i,o),e.max=N4(e.max,t,r,i,o)}function v8(e,{x:t,y:r}){mC(e.x,t.translate,t.scale,t.originPoint),mC(e.y,r.translate,r.scale,r.originPoint)}const k4=.999999999999,z4=1.0000000000001;function ise(e,t,r,i=!1){const o=r.length;if(!o)return;t.x=t.y=1;let l,c;for(let f=0;f<o;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&bp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,v8(e,c)),i&&ph(l.latestValues)&&bp(e,l.latestValues))}t.x<z4&&t.x>k4&&(t.x=1),t.y<z4&&t.y>k4&&(t.y=1)}function vp(e,t){e.min=e.min+t,e.max=e.max+t}function $4(e,t,r,i,o=.5){const l=Hr(e.min,e.max,o);mC(e,t,r,l,i)}function bp(e,t){$4(e.x,t.x,t.scaleX,t.scale,t.originX),$4(e.y,t.y,t.scaleY,t.scale,t.originY)}function b8(e,t){return g8(ase(e.getBoundingClientRect(),t))}function sse(e,t,r){const i=b8(e,r),{scroll:o}=t;return o&&(vp(i.x,o.offset.x),vp(i.y,o.offset.y)),i}const P4=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sp=()=>({x:P4(),y:P4()}),U4=()=>({min:0,max:0}),Oa=()=>({x:U4(),y:U4()}),gC={current:null},S8={current:!1};function ose(){if(S8.current=!0,!!_A)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gC.current=e.matches;e.addEventListener("change",t),t()}else gC.current=!1}const lse=new WeakMap;function use(e,t,r){for(const i in t){const o=t[i],l=r[i];if(Ei(o))e.addValue(i,o);else if(Ei(l))e.addValue(i,Fp(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(i);e.addValue(i,Fp(c!==void 0?c:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const I4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=IA,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 v=Wi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Ir.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=F2(r),this.isVariantNode=i8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in y){const w=y[v];d[v]!==void 0&&Ei(w)&&w.set(d[v])}}mount(t){this.current=t,lse.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((r,i)=>this.bindToMotionValue(i,r)),S8.current||ose(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gC.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Lc(this.notifyUpdate),Lc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=gm.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ir.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),r.owner&&r.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 Hp){const r=Hp[t];if(!r)continue;const{isEnabled:i,Feature:o}=r;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<I4.length;i++){const o=I4[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,c=t[l];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=use(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=Fp(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(d9(i)||p9(i))?i=parseFloat(i):!_ie(i)&&qc.test(r)&&(i=X9(t,r)),this.setBaseTarget(t,Ei(i)?i.get():i)),Ei(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=ZA(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ei(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new AA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){VA.render(this.render)}}class w8 extends cse{constructor(){super(...arguments),this.KeyframeResolver=uie}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ei(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function _8(e,{style:t,vars:r},i,o){const l=e.style;let c;for(c in t)l[c]=t[c];o?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function fse(e){return window.getComputedStyle(e)}class dse extends w8{constructor(){super(...arguments),this.type="html",this.renderInstance=_8}readValueFromInstance(t,r){if(gm.has(r))return this.projection?.isProjecting?sC(r):Aae(t,r);{const i=fse(t),o=(A9(r)?i.getPropertyValue(r):i[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return b8(t,r)}build(t,r,i){GA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return XA(t,r,i)}}const E8=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"]);function hse(e,t,r,i){_8(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(E8.has(o)?o:QA(o),t.attrs[o])}class pse extends w8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oa}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(gm.has(r)){const i=Z9(r);return i&&i.default||0}return r=E8.has(r)?r:QA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return d8(t,r,i)}build(t,r,i){l8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,o){hse(t,r,i,o)}mount(t){this.isSVGTag=c8(t.tagName),super.mount(t)}}const mse=(e,t)=>t.isSVG??YA(e)?new pse(t):new dse(t,{allowProjection:e!==j.Fragment});function Cp(e,t,r){const i=e.getProps();return ZA(i,t,r!==void 0?r:i.custom,e)}const yC=e=>Array.isArray(e);function gse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Fp(r))}function yse(e){return yC(e)?e[e.length-1]||0:e}function vse(e,t){const r=Cp(e,t);let{transitionEnd:i={},transition:o={},...l}=r||{};l={...l,...i};for(const c in l){const f=yse(l[c]);gse(e,c,f)}}function bse(e){return!!(Ei(e)&&e.add)}function vC(e,t){const r=e.getValue("willChange");if(bse(r))return r.add(t);if(!r&&ac.WillChange){const i=new ac.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function x8(e){return e.props[h8]}const Sse=e=>e!==null;function wse(e,{repeat:t,repeatType:r="loop"},i){const o=e.filter(Sse),l=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[l]}const _se={type:"spring",stiffness:500,damping:25,restSpeed:10},Ese=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xse={type:"keyframes",duration:.8},Tse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cse=(e,{keyframes:t})=>t.length>2?xse:gm.has(e)?e.startsWith("scale")?Ese(t[1]):_se:Tse;function Ose({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const WA=(e,t,r,i={},o,l)=>c=>{const f=LA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-xl(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:o};Ose(f)||Object.assign(m,Cse(e,m)),m.duration&&(m.duration=xl(m.duration)),m.repeatDelay&&(m.repeatDelay=xl(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(fC(m),m.delay===0&&(y=!0)),(ac.instantAnimations||ac.skipAnimations)&&(y=!0,fC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=wse(m.keyframes,f);if(v!==void 0){Ir.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new UA(m):new Qae(m)};function Ase({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function T8(e,t,{delay:r=0,transitionOverride:i,type:o}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:c,...f}=t;i&&(l=i);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const m in f){const y=e.getValue(m,e.latestValues[m]??null),v=f[m];if(v===void 0||h&&Ase(h,m))continue;const w={delay:r,...LA(l||{},m)},b=y.get();if(b!==void 0&&!y.isAnimating&&!Array.isArray(v)&&v===b&&!w.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const E=x8(e);if(E){const S=window.MotionHandoffAnimation(E,m,Ir);S!==null&&(w.startTime=S,T=!0)}}vC(e,m),y.start(WA(m,y,v,e.shouldReduceMotion&&G9.has(m)?{type:!1}:w,e,T));const x=y.animation;x&&d.push(x)}return c&&Promise.all(d).then(()=>{Ir.update(()=>{c&&vse(e,c)})}),d}function C8(e,t,r,i=0,o=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):o===1?l*i:f-l*i}function bC(e,t,r={}){const i=Cp(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);const l=i?()=>Promise.all(T8(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:y}=o;return Rse(e,t,d,h,m,y,r)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function Rse(e,t,r=0,i=0,o=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(bC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+C8(e.variantChildren,d,i,o,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function Mse(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(l=>bC(e,l,r));i=Promise.all(o)}else if(typeof t=="string")i=bC(e,t,r);else{const o=typeof t=="function"?Cp(e,t,r.custom):t;i=Promise.all(T8(e,o,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}function O8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const jse=HA.length;function A8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?A8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<jse;r++){const i=HA[r],o=e.props[i];(Kv(o)||o===!1)&&(t[i]=o)}return t}const Dse=[...FA].reverse(),Nse=FA.length;function kse(e){return t=>Promise.all(t.map(({animation:r,options:i})=>Mse(e,r,i)))}function zse(e){let t=kse(e),r=L4(),i=!0;const o=d=>(h,m)=>{const y=Cp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:w,...b}=y;h={...h,...b,...w}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=A8(e.parent)||{},y=[],v=new Set;let w={},b=1/0;for(let x=0;x<Nse;x++){const E=Dse[x],S=r[E],O=h[E]!==void 0?h[E]:m[E],_=Kv(O),A=E===d?S.isActive:null;A===!1&&(b=x);let C=O===m[E]&&O!==h[E]&&_;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),S.protectedKeys={...w},!S.isActive&&A===null||!O&&!S.prevProp||B2(O)||typeof O=="boolean")continue;const M=$se(S.prevProp,O);let D=M||E===d&&S.isActive&&!C&&_||x>b&&_,$=!1;const q=Array.isArray(O)?O:[O];let V=q.reduce(o(E),{});A===!1&&(V={});const{prevResolvedValues:Y={}}=S,Q={...Y,...V},ie=G=>{D=!0,v.has(G)&&($=!0,v.delete(G)),S.needsAnimating[G]=!0;const J=e.getValue(G);J&&(J.liveStyle=!1)};for(const G in Q){const J=V[G],fe=Y[G];if(w.hasOwnProperty(G))continue;let le=!1;yC(J)&&yC(fe)?le=!O8(J,fe):le=J!==fe,le?J!=null?ie(G):v.add(G):J!==void 0&&v.has(G)?ie(G):S.protectedKeys[G]=!0}S.prevProp=O,S.prevResolvedValues=V,S.isActive&&(w={...w,...V}),i&&e.blockInitialAnimation&&(D=!1);const se=C&&M;D&&(!se||$)&&y.push(...q.map(G=>{const J={type:E};if(typeof G=="string"&&i&&!se&&e.manuallyAnimateOnMount&&e.parent){const{parent:fe}=e,le=Cp(fe,G);if(fe.enteringChildren&&le){const{delayChildren:z}=le.transition||{};J.delay=C8(fe.enteringChildren,e,z)}}return{animation:G,options:J}}))}if(v.size){const x={};if(typeof h.initial!="boolean"){const E=Cp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);E&&E.transition&&(x.transition=E.transition)}v.forEach(E=>{const S=e.getBaseTarget(E),O=e.getValue(E);O&&(O.liveStyle=!0),x[E]=S??null}),y.push({animation:x})}let T=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(y):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const y in r)r[y].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=L4()}}}function $se(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!O8(t,e):!1}function ch(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function L4(){return{animate:ch(!0),whileInView:ch(),whileHover:ch(),whileTap:ch(),whileDrag:ch(),whileFocus:ch(),exit:ch()}}class Wc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Pse extends Wc{constructor(t){super(t),t.animationState||(t.animationState=zse(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();B2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Use=0;class Ise extends Wc{constructor(){super(...arguments),this.id=Use++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Lse={animation:{Feature:Pse},exit:{Feature:Ise}};function Yv(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}function Ab(e){return{point:{x:e.pageX,y:e.pageY}}}const qse=e=>t=>BA(t)&&e(t,Ab(t));function Ev(e,t,r,i){return Yv(e,t,qse(r),i)}const R8=1e-4,Vse=1-R8,Bse=1+R8,M8=.01,Fse=0-M8,Hse=0+M8;function Qi(e){return e.max-e.min}function Gse(e,t,r){return Math.abs(e-t)<=r}function q4(e,t,r,i=.5){e.origin=i,e.originPoint=Hr(t.min,t.max,e.origin),e.scale=Qi(r)/Qi(t),e.translate=Hr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Vse&&e.scale<=Bse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fse&&e.translate<=Hse||isNaN(e.translate))&&(e.translate=0)}function xv(e,t,r,i){q4(e.x,t.x,r.x,i?i.originX:void 0),q4(e.y,t.y,r.y,i?i.originY:void 0)}function V4(e,t,r){e.min=r.min+t.min,e.max=e.min+Qi(t)}function Kse(e,t,r){V4(e.x,t.x,r.x),V4(e.y,t.y,r.y)}function B4(e,t,r){e.min=t.min-r.min,e.max=e.min+Qi(t)}function YS(e,t,r){B4(e.x,t.x,r.x),B4(e.y,t.y,r.y)}function Qs(e){return[e("x"),e("y")]}const j8=({current:e})=>e?e.ownerDocument.defaultView:null,F4=(e,t)=>Math.abs(e-t);function Yse(e,t){const r=F4(e.x,t.x),i=F4(e.y,t.y);return Math.sqrt(r**2+i**2)}class D8{constructor(t,r,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=sx(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=Yse(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:T}=v,{timestamp:x}=oi;this.history.push({...T,timestamp:x});const{onStart:E,onMove:S}=this.handlers;w||(E&&E(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=ix(w,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:T,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=sx(v.type==="pointercancel"?this.lastMoveEventInfo:ix(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,E),T&&T(v,E)},!BA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=o||window;const f=Ab(t),d=ix(f,this.transformPagePoint),{point:h}=d,{timestamp:m}=oi;this.history=[{...h,timestamp:m}];const{onSessionStart:y}=r;y&&y(t,sx(d,this.history)),this.removeListeners=Tb(Ev(this.contextWindow,"pointermove",this.handlePointerMove),Ev(this.contextWindow,"pointerup",this.handlePointerUp),Ev(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lc(this.updatePoint)}}function ix(e,t){return t?{point:t(e.point)}:e}function H4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sx({point:e},t){return{point:e,delta:H4(e,N8(t)),offset:H4(e,Zse(t)),velocity:Xse(t,.1)}}function Zse(e){return e[0]}function N8(e){return e[e.length-1]}function Xse(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const o=N8(e);for(;r>=0&&(i=e[r],!(o.timestamp-i.timestamp>xl(t)));)r--;if(!i)return{x:0,y:0};const l=to(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Qse(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Hr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Hr(r,e,i.max):Math.min(e,r)),e}function G4(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Wse(e,{top:t,left:r,bottom:i,right:o}){return{x:G4(e.x,r,o),y:G4(e.y,t,i)}}function K4(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function Jse(e,t){return{x:K4(e.x,t.x),y:K4(e.y,t.y)}}function eoe(e,t){let r=.5;const i=Qi(e),o=Qi(t);return o>i?r=Fv(t.min,t.max-i,e.min):i>o&&(r=Fv(e.min,e.max-o,t.min)),rc(0,1,r)}function toe(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const SC=.35;function noe(e=SC){return e===!1?e=0:e===!0&&(e=SC),{x:Y4(e,"left","right"),y:Y4(e,"top","bottom")}}function Y4(e,t,r){return{min:Z4(e,t),max:Z4(e,r)}}function Z4(e,t){return typeof e=="number"?e:e[t]||0}const roe=new WeakMap;class aoe{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=Oa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Ab(y).point)},c=(y,v)=>{const{drag:w,dragPropagation:b,onDragStart:T}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pie(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(E=>{let S=this.getAxisMotionValue(E).get()||0;if(Tl.test(S)){const{projection:O}=this.visualElement;if(O&&O.layout){const _=O.layout.layoutBox[E];_&&(S=Qi(_)*(parseFloat(S)/100))}}this.originPoint[E]=S}),T&&Ir.postRender(()=>T(y,v)),vC(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:T,onDrag:x}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:E}=v;if(b&&this.currentDirection===null){this.currentDirection=ioe(E),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),x&&x(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qs(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new D8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:j8(this.visualElement)})}stop(t,r){const i=t||this.latestPointerEvent,o=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&Ir.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,i){const{drag:o}=this.getProps();if(!i||!U1(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Qse(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Wse(i.layoutBox,t):this.constraints=!1,this.elastic=noe(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qs(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=toe(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!yp(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=sse(i,o.root,this.visualElement.getTransformPagePoint());let c=Jse(o.layout.layoutBox,l);if(r){const f=r(rse(c));this.hasMutatedConstraints=!!f,f&&(c=g8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qs(m=>{if(!U1(m,r,this.currentDirection))return;let y=d&&d[m]||{};c&&(y={min:0,max:0});const v=o?200:1e6,w=o?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return vC(this.visualElement,t),i.start(WA(t,i,0,r,this.visualElement,!1))}stopAnimation(){Qs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[r];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Qs(r=>{const{drag:i}=this.getProps();if(!U1(r,i,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(r);if(o&&o.layout){const{min:c,max:f}=o.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Hr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qs(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();o[c]=eoe({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qs(c=>{if(!U1(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Hr(d,h,o[c]))})}addListeners(){if(!this.visualElement.current)return;roe.set(this.visualElement,this);const t=this.visualElement.current,r=Ev(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();yp(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ir.read(i);const c=Yv(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qs(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=SC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function U1(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function ioe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class soe extends Wc{constructor(t){super(t),this.removeGroupControls=ao,this.removeListeners=ao,this.controls=new aoe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ao}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const X4=e=>(t,r)=>{e&&Ir.postRender(()=>e(t,r))};class ooe extends Wc{constructor(){super(...arguments),this.removePointerDownListener=ao}onPointerDown(t){this.session=new D8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:j8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:X4(t),onStart:X4(r),onMove:i,onEnd:(l,c)=>{delete this.session,o&&Ir.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=Ev(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const dS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ox=!1;class loe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&o&&i.register(l),ox&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),dS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:o,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,ox=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Ir.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),VA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:o}=t;ox=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k8(e){const[t,r]=Eie(),i=j.useContext(f9);return N.jsx(loe,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(p8),isPresent:t,safeToRemove:r})}function uoe(e,t,r){const i=Ei(e)?e:Fp(e);return i.start(WA("",i,t,r)),i.animation}const coe=(e,t)=>e.depth-t.depth;class foe{constructor(){this.children=[],this.isDirty=!1}add(t){xA(this.children,t),this.isDirty=!0}remove(t){TA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(coe),this.isDirty=!1,this.children.forEach(t)}}function doe(e,t){const r=Wi.now(),i=({timestamp:o})=>{const l=o-r;l>=t&&(Lc(i),e(l-t))};return Ir.setup(i,!0),()=>Lc(i)}const z8=["TopLeft","TopRight","BottomLeft","BottomRight"],hoe=z8.length,Q4=e=>typeof e=="string"?parseFloat(e):e,W4=e=>typeof e=="number"||lt.test(e);function poe(e,t,r,i,o,l){o?(e.opacity=Hr(0,r.opacity??1,moe(i)),e.opacityExit=Hr(t.opacity??1,0,goe(i))):l&&(e.opacity=Hr(t.opacity??1,r.opacity??1,i));for(let c=0;c<hoe;c++){const f=`border${z8[c]}Radius`;let d=J4(t,f),h=J4(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||W4(d)===W4(h)?(e[f]=Math.max(Hr(Q4(d),Q4(h),i),0),(Tl.test(h)||Tl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Hr(t.rotate||0,r.rotate||0,i))}function J4(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const moe=$8(0,.5,_9),goe=$8(.5,.95,ao);function $8(e,t,r){return i=>i<e?0:i>t?1:r(Fv(e,t,i))}function ej(e,t){e.min=t.min,e.max=t.max}function nl(e,t){ej(e.x,t.x),ej(e.y,t.y)}function tj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nj(e,t,r,i,o){return e-=t,e=KS(e,1/r,i),o!==void 0&&(e=KS(e,1/o,i)),e}function yoe(e,t=0,r=1,i=.5,o,l=e,c=e){if(Tl.test(t)&&(t=parseFloat(t),t=Hr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Hr(l.min,l.max,i);e===l&&(f-=t),e.min=nj(e.min,t,r,f,o),e.max=nj(e.max,t,r,f,o)}function rj(e,t,[r,i,o],l,c){yoe(e,t[r],t[i],t[o],t.scale,l,c)}const voe=["x","scaleX","originX"],boe=["y","scaleY","originY"];function aj(e,t,r,i){rj(e.x,t,voe,r?r.x:void 0,i?i.x:void 0),rj(e.y,t,boe,r?r.y:void 0,i?i.y:void 0)}function ij(e){return e.translate===0&&e.scale===1}function P8(e){return ij(e.x)&&ij(e.y)}function sj(e,t){return e.min===t.min&&e.max===t.max}function Soe(e,t){return sj(e.x,t.x)&&sj(e.y,t.y)}function oj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function U8(e,t){return oj(e.x,t.x)&&oj(e.y,t.y)}function lj(e){return Qi(e.x)/Qi(e.y)}function uj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class woe{constructor(){this.members=[]}add(t){xA(this.members,t),t.scheduleRender()}remove(t){if(TA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let i;for(let o=r;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _oe(e,t,r){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((o||l||c)&&(i=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:y,rotateY:v,skewX:w,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),w&&(i+=`skewX(${w}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const lx=["","X","Y","Z"],Eoe=1e3;let xoe=0;function ux(e,t,r,i){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function I8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=x8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ir,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&I8(i)}function L8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(c={},f=t?.()){this.id=xoe++,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(Ooe),this.nodes.forEach(joe),this.nodes.forEach(Doe),this.nodes.forEach(Aoe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new foe)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new AA),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=t8(c)&&!Sie(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,y=0;const v=()=>this.root.updateBlockedByResize=!1;Ir.read(()=>{y=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=doe(v,250),dS.hasAnimatedSinceResize&&(dS.hasAnimatedSinceResize=!1,this.nodes.forEach(dj)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Poe,{onLayoutAnimationStart:T,onLayoutAnimationComplete:x}=h.getProps(),E=!this.targetLayout||!U8(this.targetLayout,w),S=!y&&v;if(this.options.layoutRoot||this.resumeFrom||S||y&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...LA(b,"layout"),onPlay:T,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(m,S)}else y||dj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Lc(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(Noe),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&I8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(cj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Moe),this.nodes.forEach(Toe),this.nodes.forEach(Coe)):this.nodes.forEach(fj),this.clearAllSnapshots();const f=Wi.now();oi.delta=rc(0,1e3/60,f-oi.timestamp),oi.timestamp=f,oi.isProcessing=!0,QE.update.process(oi),QE.preRender.process(oi),QE.render.process(oi),oi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,VA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Roe),this.sharedNodes.forEach(koe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ir.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ir.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qi(this.snapshot.measuredBox.x)&&!Qi(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Oa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!P8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||ph(this.latestValues)||m)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),Uoe(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Oa();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ioe))){const{scroll:h}=this.root;h&&(vp(f.x,h.offset.x),vp(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Oa();if(nl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:y}=h;h!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&nl(f,c),vp(f.x,m.offset.x),vp(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Oa();nl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&bp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),ph(m.latestValues)&&bp(d,m.latestValues)}return ph(this.latestValues)&&bp(d,this.latestValues),d}removeTransform(c){const f=Oa();nl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!ph(h.latestValues))continue;pC(h.latestValues)&&h.updateSnapshot();const m=Oa(),y=h.measurePageBox();nl(m,y),aj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return ph(this.latestValues)&&aj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==oi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=oi.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Oa(),this.targetWithTransforms=Oa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nl(this.target,this.layout.layoutBox),v8(this.target,this.targetDelta)):nl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pC(this.parent.latestValues)||y8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oa(),this.relativeTargetOrigin=Oa(),YS(this.relativeTargetOrigin,f,d),nl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===oi.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;nl(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;ise(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Oa());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tj(this.prevProjectionDelta.x,this.projectionDelta.x),tj(this.prevProjectionDelta.y,this.projectionDelta.y)),xv(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!uj(this.projectionDelta.x,this.prevProjectionDelta.x)||!uj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sp(),this.projectionDelta=Sp(),this.projectionDeltaWithTransform=Sp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},y=Sp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Oa(),w=d?d.source:void 0,b=this.layout?this.layout.source:void 0,T=w!==b,x=this.getStack(),E=!x||x.members.length<=1,S=!!(T&&!E&&this.options.crossfade===!0&&!this.path.some($oe));this.animationProgress=0;let O;this.mixTargetDelta=_=>{const A=_/1e3;hj(y.x,c.x,A),hj(y.y,c.y,A),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(YS(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zoe(this.relativeTarget,this.relativeTargetOrigin,v,A),O&&Soe(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Oa()),nl(O,this.relativeTarget)),T&&(this.animationValues=m,poe(m,h,this.latestValues,A,S,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Lc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update(()=>{dS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Fp(0)),this.currentAnimation=uoe(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Eoe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&q8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Oa();const y=Qi(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+y;const v=Qi(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}nl(f,d),bp(f,m),xv(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new woe),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&ux("z",c,h,this.animationValues);for(let m=0;m<lx.length;m++)ux(`rotate${lx[m]}`,c,h,this.animationValues),ux(`skew${lx[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=fS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=fS(f?.pointerEvents)||""),this.hasProjected&&!ph(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=_oe(this.projectionDeltaWithTransform,this.treeScale,m);d&&(y=d(m,y)),c.transform=y;const{x:v,y:w}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in hC){if(m[b]===void 0)continue;const{correct:T,applyTo:x,isCSSVariable:E}=hC[b],S=y==="none"?m[b]:T(m[b],h);if(x){const O=x.length;for(let _=0;_<O;_++)c[x[_]]=S}else E?this.options.visualElement.renderState.vars[b]=S:c[b]=S}this.options.layoutId&&(c.pointerEvents=h===this?fS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(cj),this.root.sharedNodes.clear()}}}function Toe(e){e.updateLayout()}function Coe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(y);y.min=r[m].min,y.max=y.min+v}):q8(o,t.layoutBox,r)&&Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(r[m]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=Sp();xv(c,r,t.layoutBox);const f=Sp();l?xv(f,e.applyTransform(i,!0),t.measuredBox):xv(f,r,t.layoutBox);const d=!P8(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:v}=m;if(y&&v){const w=Oa();YS(w,t.layoutBox,y.layoutBox);const b=Oa();YS(b,r,v.layoutBox),U8(w,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Ooe(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 Aoe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Roe(e){e.clearSnapshot()}function cj(e){e.clearMeasurements()}function fj(e){e.isLayoutDirty=!1}function Moe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function joe(e){e.resolveTargetDelta()}function Doe(e){e.calcProjection()}function Noe(e){e.resetSkewAndRotation()}function koe(e){e.removeLeadSnapshot()}function hj(e,t,r){e.translate=Hr(t.translate,0,r),e.scale=Hr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function pj(e,t,r,i){e.min=Hr(t.min,r.min,i),e.max=Hr(t.max,r.max,i)}function zoe(e,t,r,i){pj(e.x,t.x,r.x,i),pj(e.y,t.y,r.y,i)}function $oe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Poe={duration:.45,ease:[.4,0,.1,1]},mj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gj=mj("applewebkit/")&&!mj("chrome/")?Math.round:ao;function yj(e){e.min=gj(e.min),e.max=gj(e.max)}function Uoe(e){yj(e.x),yj(e.y)}function q8(e,t,r){return e==="position"||e==="preserve-aspect"&&!Gse(lj(t),lj(r),.2)}function Ioe(e){return e!==e.root&&e.scroll?.wasRoot}const Loe=L8({attachResizeListener:(e,t)=>Yv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cx={current:void 0},V8=L8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cx.current){const e=new Loe({});e.mount(window),e.setOptions({layoutScroll:!0}),cx.current=e}return cx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qoe={pan:{Feature:ooe},drag:{Feature:soe,ProjectionNode:V8,MeasureLayout:k8}};function vj(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,l=i[o];l&&Ir.postRender(()=>l(t,Ab(t)))}class Voe extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=mie(t,(r,i)=>(vj(this.node,i,"Start"),o=>vj(this.node,o,"End"))))}unmount(){}}class Boe extends Wc{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=Tb(Yv(this.node.current,"focus",()=>this.onFocus()),Yv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bj(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),l=i[o];l&&Ir.postRender(()=>l(t,Ab(t)))}class Foe extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=bie(t,(r,i)=>(bj(this.node,i,"Start"),(o,{success:l})=>bj(this.node,o,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wC=new WeakMap,fx=new WeakMap,Hoe=e=>{const t=wC.get(e.target);t&&t(e)},Goe=e=>{e.forEach(Hoe)};function Koe({root:e,...t}){const r=e||document;fx.has(r)||fx.set(r,{});const i=fx.get(r),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Goe,{root:e,...t})),i[o]}function Yoe(e,t,r){const i=Koe(t);return wC.set(e,r),i.observe(e),()=>{wC.delete(e),i.unobserve(e)}}const Zoe={some:0,all:1};class Xoe extends Wc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:Zoe[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(d)};return Yoe(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Qoe(t,r))&&this.startObserver()}unmount(){}}function Qoe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Woe={inView:{Feature:Xoe},tap:{Feature:Foe},focus:{Feature:Boe},hover:{Feature:Voe}},Joe={layout:{ProjectionNode:V8,MeasureLayout:k8}},ele={...Lse,...Woe,...qoe,...Joe},Sj=nse(ele,mse),B8=ks.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return N.jsx("div",{className:Qn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:N.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("title",{children:"Background Beams"}),N.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>N.jsx(Sj.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),N.jsxs("defs",{children:[t.map((r,i)=>N.jsxs(Sj.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[N.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),N.jsx("stop",{stopColor:"#111111"}),N.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),N.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),N.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[N.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});B8.displayName="BackgroundBeams";const tle=()=>N.jsxs(N.Fragment,{children:[N.jsx(B8,{className:"absolute inset-0"}),N.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:N.jsxs("div",{className:"text-center",children:[N.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),N.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Rn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function nle(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Rn(e.additionalItems)}function wj(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const tc="__additional_property",ZS="additionalProperties",Vc="allOf",jn="anyOf",oo="const",H2="default",JA="dependencies",rle="enum",ci="__errors",nr="$id",ale="if",Gp="items",ile="_$junk_option_schema_id$_",hS="$name",mn="oneOf",_C="patternProperties",Pn="properties",dx="readonly",F8="required",XS="submitButtonOptions",Ar="$ref",hv="$schema",H8="root",G8="_",sle=["discriminator","propertyName"],_j="formContext",ole="layoutGridLookupMap",eR="__rjsf_additionalProperties",K8="__rjsf_rootSchema",lle="ui:field",tR="ui:widget",Ac="ui:options",EC="ui:globalOptions",ule="https://json-schema.org/draft/2019-09/schema",pS="https://json-schema.org/draft/2020-12/schema";function At(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const o=e[i];return i===tR&&Rn(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Ac&&Rn(o)?{...r,...o}:{...r,[i.substring(3)]:o}},{...t}):{...t}}function Y8(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=At(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function xC(e){const t={[ci]:[],addError(r){this[ci].push(r)}};if(Array.isArray(e))return e.reduce((r,i,o)=>({...r,[o]:xC(i)}),t);if(zc(e)){const r=e;return Object.keys(r).reduce((i,o)=>({...i,[o]:xC(r[o])}),t)}return t}function pr(e,t){return yG(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const cle=Object.prototype;function pv(e){for(const t in e)if(cle.hasOwnProperty.call(e,t))return!1;return!0}const fle=["array","boolean","integer","null","number","object","string"];new Set(fle);const dle=["$defs","definitions","properties","patternProperties","dependencies"];new Set(dle);const hle=["items","allOf","oneOf","anyOf"];new Set(hle);const ple=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(ple);function mS(e){return typeof e=="object"}function gl(e){return mS(e)?pv(e):e===!0}function wp(e,t){return e<t?-1:e>t?1:0}function hx(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const o=new Set(e);for(let l=0;l<i;l++)o.add(t[l]);return Array.from(o)}function mle(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const o=e;e=t,t=o}const i=new Set(t);for(let o=0;o<e.length&&i.size>0;o++){const l=e[o];i.delete(l)&&r.push(l)}return r}function Ej(e){return e.length===0}function px(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let o=0;o<t.length;o++)if(t[o]!==r[o]){const l=e(t[o],r[o]);if(l!==0)return l}return 0}}function Z8(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const o=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(o[l],o[c])!==0&&++l!==c&&(o[l]=o[c]);return o.length=l+1,o}}function gle(e){return(t,r)=>{const i=[];let o=t.length,l=r.length;if(o===0||l===0)return i;if(o>l){const m=t;t=r,r=m;const y=o;o=l,l=y}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<o&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function yle(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const xj=yle,X8=()=>0,vle=e=>e===void 0,ble=e=>typeof e!="object",Tj={boolean:0,number:1,string:2};function Sle(e,t){const r=typeof e,i=typeof t;return r===i?wp(e,t):Tj[r]-Tj[i]}function wle(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const o=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];o.has(f)||e.push(f)}return e}function G2(e,t,r=X8){return(i,o)=>e(i)?e(o)?r(i,o):-1:e(o)?1:t(i,o)}function lp(e){return G2(vle,e)}function bc(e,t){return G2(r=>r===void 0||e(r),t)}function mx(e,t){return G2(Array.isArray,e,t)}const ia=lp(wp),gx=bc(e=>e===0,(e,t)=>e-t);function _le({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=xj(t,T=>Object.keys(T).sort());function i(T){return(x,E)=>{const S=r(x),O=r(E),_=Math.min(S.length,O.length);for(let A=0;A<_;A++){const C=wp(S[A],O[A]);if(C!==0)return C}if(S.length!==O.length)return S.length-O.length;for(let A=0;A<_;A++){const C=S[A],M=T(x[C],E[C]);if(M!==0)return M}return 0}}function o(T){const x=px(T),E=xj(e,Z8(T,{threshold:0}));return(S,O)=>x(E(S),E(O))}const l=o(wp);function c(T,x){if(mS(T)){if(mS(x)){const E=Object.keys(T),S=Object.keys(x),O=wle(E,S),_=O.length;for(let A=0;A<_;A++){const C=O[A];if(T[C]===x[C])continue;const D=(b[C]??f)(T[C],x[C]);if(D!==0)return D}return 0}return x===!0&&pv(T)?0:1}return mS(x)?T===!0&&pv(x)?0:-1:wp(T,x)}const f=lp(h),d=G2(ble,mx(i(f),px(h)),Sle);function h(T,x){return T===null?-1:x===null?1:d(T,x)}const m=lp(c),y=bc(pv,i(m)),v=lp(o(c)),w=bc(gl,c),b={$id:ia,$comment:ia,$defs:y,$ref:ia,$schema:ia,const:f,contains:m,contentEncoding:ia,contentMediaType:ia,default:f,definitions:y,description:ia,else:m,examples:f,exclusiveMaximum:ia,exclusiveMinimum:ia,format:ia,if:m,maximum:ia,maxItems:ia,maxLength:ia,maxProperties:ia,minimum:ia,multipleOf:ia,not:m,pattern:ia,propertyNames:m,readOnly:ia,then:m,title:ia,writeOnly:ia,uniqueItems:bc(T=>T===!1,X8),minLength:gx,minItems:gx,minProperties:gx,required:bc(Ej,l),enum:bc(Ej,o(h)),type:lp((T,x)=>{const E=Array.isArray(T),S=Array.isArray(x);return!E&&!S?wp(T,x):l(E?T:[T],S?x:[x])}),items:bc(T=>!Array.isArray(T)&&gl(T),mx(c,px(c))),anyOf:v,allOf:v,oneOf:v,properties:y,patternProperties:y,additionalProperties:w,additionalItems:w,dependencies:bc(pv,i(lp(mx(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function Cj(e){return e}const Q8=(e,t)=>e?Q8(t%e,e):t,Ele=(e,t)=>Math.abs(e*t)/Q8(e,t);function xle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*yx(e,t,r){const i=e.length,o=t.length;if(i>0&&o>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<o;f++)yield r(c,t[f])}}function vx(e,t){return e||t}function Oj(e){return(t,r)=>{const i={...t},o=Object.keys(r),l=o.length;for(let c=0;c<l;c++){const f=o[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function Tle(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function fh(e,t,r){r===void 0||gl(r)?delete e[t]:e[t]=r}const Cle=["properties","patternProperties","additionalProperties"];function Aj(e){const t=Object.keys(e),r=t.length,i=[];for(let o=0;o<r;o++){const l=t[o];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Rj=[[],[]];function Mj(e,t,r){const i=r.length;for(let o=0;o<i;o++){const l=r[o];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const Ole=["items","additionalItems"],Ale=["if","then","else"];function jj(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function bx(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function dh(e,t,r){return[e,t,r]}function Rle(e){const t=new Map;for(const[r,i,o]of e){const l=c=>{if(!o(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const Mle=[dh("minimum","maximum",e=>e.maximum>=e.minimum),dh("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),dh("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),dh("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),dh("minLength","maxLength",e=>e.maxLength>=e.minLength),dh("minItems","maxItems",e=>e.maxItems>=e.minItems),dh("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function jle({mergePatterns:e=xle,isSubRegExp:t=Object.is,intersectJson:r=mle,deduplicateJsonSchemaDef:i=Cj,defaultMerger:o=Cj,assigners:l=[],checks:c=Mle,mergers:f}={}){function d(_){const A=_.length;let C=_[0];for(let M=1;M<A;M++){const D=E(C,_[M]);if(D===!1)return!1;gl(D)||(C=D)}return C}function h(_,A,C,M,D,$,q){if(_.length=0,C===!1)return!1;if(_.push(C),D!==void 0){if(D===!1)return!1;_.push(D)}if(Mj(_,A,$))return!1;const Y=_.length<2;if(q===!1){if(Y)return;if(Mj(_,A,M))return!1}else Y&&q!==void 0&&_.push(q);return _.length===1?_[0]:d(_)}function m(_,A,C,M,D,$){const q=C.length;if(q>0&&D!==!1)if($)Object.assign(_,A);else for(let V=0;V<q;V++){const Y=C[V];M.has(Y)||(_[Y]=E(A[Y],D))}return _}const y=(_,{properties:A={},patternProperties:C,additionalProperties:M=!0},{properties:D={},patternProperties:$,additionalProperties:q=!0})=>{const V=gl(M),Y=gl(q);if(V&&Y)return fh(_,"properties",S(A,D)),fh(_,"patternProperties",C&&$?S(C,$):C??$),delete _.additionalProperties,_;const Q=E(M,q);fh(_,"additionalProperties",Q);const ie={},se=Object.keys(A),K=se.length,[G,J]=C?Aj(C):Rj,[fe,le]=$?Aj($):Rj,z=[],U=new Set,I=Y?void 0:q;for(let we=0;we<K;we++){const De=se[we];U.add(De);const te=h(z,De,A[De],G,D[De],fe,I);te!==void 0&&(ie[De]=te)}const P=Object.keys(D),F=P.length,re=V?void 0:M;for(let we=0;we<F;we++){const De=P[we];if(U.has(De))continue;const te=h(z,De,D[De],fe,void 0,G,re);te!==void 0&&(ie[De]=te)}fh(_,"properties",ie);let ue={};const ge=new Set;if(J.length>0&&le.length>0){const we=yx(J,le,(De,te)=>{t(De,te)&&ge.add(De),t(te,De)&&ge.add(te),ue[e(De,te)]=E(C[De],$[te])});for(;!we.next().done;);}return ue=m(ue,C,J,ge,q,Y),ue=m(ue,$,le,ge,M,V),fh(_,"patternProperties",ue),_},v=(_,{items:A=[],additionalItems:C},{items:M=[],additionalItems:D})=>{const $=Array.isArray(A),q=Array.isArray(M),V=[];if(_.items=V,$&&q){const[Y,Q,ie]=A.length<M.length?[A.length,C,M]:[M.length,D,A];let se=0;for(;se<Y;se++)V.push(E(A[se],M[se]));if(Q===!1)_.additionalItems=!1;else{const K=Q===void 0||gl(Q);for(;se<ie.length;se++)V.push(K?ie[se]:E(ie[se],Q));fh(_,"additionalItems",C!==void 0&&D!==void 0?E(C,D):C??D)}}else if($||q){const[Y,Q,ie]=$?[A,M,C]:[M,A,D];fh(_,"additionalItems",ie&&E(ie,Q));for(let se=0;se<Y.length;se++)V.push(E(Y[se],Q))}else delete _.additionalItems,_.items=E(A,M);return _},w=(_,A,C)=>{jj(_,A);const M=jj({},C);return _.allOf===void 0?_.allOf=[M]:_.allOf=_.allOf.concat(M),_};function b(_,A){return i(Array.from(yx(_,A,E)))}const T=Tle([[Cle,y],[Ole,v],[Ale,w],...l]),x=Rle(c);function E(_,A){if(_===!1||A===!1)return!1;if(gl(_))return gl(A)?!0:A;if(gl(A))return _;let C={..._};const M=new Set,D=new Set,$=Object.keys(A),q=$.length;for(let V=0;V<q;V++){const Y=$[V],Q=A[Y];if(Q===void 0)continue;const ie=x.get(Y);if(ie!==void 0){const J=ie.length;for(let fe=0;fe<J;fe++){const le=ie[fe];_[le.oppositeKey]!==void 0&&D.add(le.check)}}const se=_[Y];if(se===void 0){C[Y]=Q;continue}const K=T.get(Y);if(K){M.add(K);continue}const G=O[Y]??o;C[Y]=G(se,Q)}for(const V of M)C=V(C,_,A);for(const V of D)V(C);return C}const S=Oj(E),O={$id:o,$ref:o,$schema:o,$comment:o,$defs:S,definitions:S,type:(_,A)=>{if(_===A)return _;const C=Array.isArray(_),M=Array.isArray(A);if(!C&&!M){const D=bx(_,A);if(D!==void 0)return D}else if(C||M){const D=new Set;if(C&&M)for(const q of yx(_,A,bx))q!==void 0&&D.add(q);else{const q=C?_:A,V=C?A:_,Y=q.length;for(let Q=0;Q<Y;Q++){const ie=bx(V,q[Q]);ie!==void 0&&D.add(ie)}}const $=D.size;if($===1)return D.values().next().value;if($>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${_.toString()}, ${A.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(_,A)=>{const C=i([_,A]);return C.length===1?C[0]:{anyOf:C}},pattern:e,readOnly:vx,writeOnly:vx,enum:(_,A)=>{const C=r(_,A);if(C.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(_)}", "${JSON.stringify(A)}"`);return C},anyOf:b,oneOf:b,allOf:(_,A)=>i(_.concat(A)),propertyNames:E,contains:E,dependencies:Oj((_,A)=>Array.isArray(_)?Array.isArray(A)?hx(_,A):E(A,{required:_}):Array.isArray(A)?E(_,{required:A}):E(_,A)),examples:(_,A)=>{if(!Array.isArray(_)||!Array.isArray(A))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(_)}" and "${JSON.stringify(A)}"`);return hx(_,A)},multipleOf:(_,A)=>{let C=1;for(;!Number.isInteger(_)||!Number.isInteger(A);)C*=10,_*=10,A*=10;return Ele(_,A)/C},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:vx,required:hx,...f};return{mergeSchemaDefinitions:E,mergeArrayOfSchemaDefinitions:d}}function Dle(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:o,...l}=i;t.push(l);for(let c=o.length-1;c>=0;c--)r.push(o[c])}return t}function Nle(e){return t=>e(Dle(t))}var rv={},Dj;function kle(){if(Dj)return rv;Dj=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function o(h,m,y){for(var v,w,b=1,T=m.length;b<T;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),w=T>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),w&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!w)break;h=h[v]}var x=h[v];return y===void 0?delete h[v]:h[v]=y,x}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var y=m.length;if(y===1)return h;for(var v=1;v<y;){if(h=h[i(m[v++])],y===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,y){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return o(h,m,y)}function d(h){var m=l(h);return{get:function(y){return c(y,m)},set:function(y,v){return f(y,m,v)}}}return rv.get=c,rv.set=f,rv.compile=d,rv}var zle=kle();const Sx=Dl(zle);var $le=Nz();const nR=Dl($le);function QS(e,t){if(nr in e&&nR.equal(e[nr],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(Dn(i)){const o=QS(i,t);if(o!==void 0)return o}}else if(Dn(r)){const i=QS(r,t);if(i!==void 0)return i}}function TC(e,t){const r=Be(e,nr,t);Ar in e&&(e={...e,[Ar]:nR.resolve(r,e[Ar])});for(const[i,o]of Object.entries(e))Array.isArray(o)?e={...e,[i]:o.map(l=>Dn(l)?TC(l,r):l)}:Dn(o)&&(e={...e,[i]:TC(o,r)});return e}function rR(e,t){const r=t[e];return[Iv(t,[e]),r]}function W8(e,t={},r=[],i=Be(t,[nr])){const o=e||"";let l;if(o.startsWith("#")){const f=decodeURIComponent(o.substring(1));i===void 0||nr in t&&t[nr]===i?l=Sx.get(t,f):t[hv]===pS&&(l=QS(t,i.replace(/\/$/,"")),l!==void 0&&(l=Sx.get(l,f)))}else if(t[hv]===pS){const f=i?nR.resolve(i,o):o,[d,...h]=f.replace(/#\/?$/,"").split("#");l=QS(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[nr],oa(h)||(l=Sx.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[Ar];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...y]=r,v=[...y,o,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=rR(Ar,l),h=W8(d,t,[...r,o],i);return Object.keys(f).length>0?t[hv]===ule||t[hv]===pS?{[Vc]:[f,h]}:{...f,...h}:h}return l}function J8(e,t={},r=Be(t,[nr])){return W8(e,t,[],r)}function Rl(e){let t;const r=Be(e,sle);return $c(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function ll(e){let{type:t}=e;return!t&&e.const?Zv(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function ic(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];return e&&o in e&&Rn(c)?i[o]=ic(l,c):e&&t&&(ll(e)==="object"||ll(t)==="object")&&o===F8&&Array.isArray(l)&&Array.isArray(c)?i[o]=PG(l,c):i[o]=c,i},r)}function e$(e,t,r){var i;if(e&&r){const o=Be(e,r);if(o===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Be(c,[Pn,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===o||!((i=f.enum)===null||i===void 0)&&i.includes(o)))return l}}}function aR(e,t,r,i,o){if(t===void 0)return 0;const l=e$(t,r,o);if(a6(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(o&&_n(f,[Pn,o])){const d=Be(t,o),h=Be(f,[Pn,o],{});if(e.isValid(h,d,i))return c}else if(f[Pn]){const d={anyOf:Object.keys(f[Pn]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function xi(e,t,r={},i,o,l=!1){return Sl(e,t,r,i,void 0,void 0,o,l)[0]}function Ple(e,t,r,i,o,l,c){const{if:f,then:d,else:h,...m}=t,y=e.isValid(f,l||{},r);let v=[m],w=[];if(i)d&&typeof d!="boolean"&&(w=w.concat(Sl(e,d,r,l,i,o,c))),h&&typeof h!="boolean"&&(w=w.concat(Sl(e,h,r,l,i,o,c)));else{const b=y?d:h;b&&typeof b!="boolean"&&(w=w.concat(Sl(e,b,r,l,i,o,c)))}return w.length&&(v=w.map(b=>ic(m,b))),v.flatMap(b=>Sl(e,b,r,l,i,o,c))}function t$(e){return e.reduce((r,i)=>i.length>1?i.flatMap(o=>l6(r.length,l=>[...r[l]].concat(o))):(r.forEach(o=>o.push(i[0])),r),[[]])}function n$(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Vn(r,[i],e.patternProperties[i]),r),{})}function Ule(e,t,r,i,o,l,c,f){const d=r$(e,t,r,i,o,l,c,f);if(d.length>1||d[0]!==t)return d;if(JA in t)return a$(e,t,r,i,o,l,c).flatMap(m=>Sl(e,m,r,l,i,o,c));if(Vc in t&&Array.isArray(t[Vc])){const h=t.allOf.map(y=>Sl(e,y,r,l,i,o,c));return t$(h).map(y=>({...t,allOf:y}))}return[t]}function r$(e,t,r,i,o,l,c,f){const d=Op(t,r,o,void 0,f);return d!==t?Sl(e,d,r,l,i,o,c,f):[t]}function Op(e,t,r,i,o){if(!Rn(e))return e;let l=e;if(Ar in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...J8(c,t,i),...f},nr in l&&(i=l[nr])}if(Pn in l){const c=[],f=NG(l[Pn],(d,h,m)=>{const y=[...r];d[m]=Op(h,t,y,i,o),c.push(y)},{});bG(r,f6(eG(c))),l={...l,[Pn]:f}}if(Gp in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Op(l.items,t,r,i,o)}),o){let c,f;jn in e&&Array.isArray(e[jn])?(c=jn,f=l[jn]):mn in e&&Array.isArray(e[mn])&&(c=mn,f=l[mn]),c&&f&&(l={...l,[c]:f.map(d=>Op(d,t,r,i,o))})}return pr(e,l)?e:l}function Ile(e,t,r,i,o){const l={...t,properties:{...t.properties}},c=i&&Rn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(_C in l){const d=n$(l,f);if(!oa(d)){l.properties[f]=xi(e,{[Vc]:Object.values(d)},r,Be(c,[f]),o),Vn(l.properties,[f,tc],!0);return}}if(ZS in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?Ar in l.additionalProperties?d=xi(e,{[Ar]:Be(l.additionalProperties,[Ar])},r,c,o):"type"in l.additionalProperties?d={...l.additionalProperties}:jn in l.additionalProperties||mn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:Zv(Be(c,[f]))}:d={type:Zv(Be(c,[f]))},l.properties[f]=d,Vn(l.properties,[f,tc],!0)}else l.properties[f]={type:"null"},Vn(l.properties,[f,tc],!0)}}),l}const{compareSchemaDefinitions:Lle,compareSchemaValues:qle}=_le(),{mergeArrayOfSchemaDefinitions:Vle}=jle({intersectJson:gle(qle),deduplicateJsonSchemaDef:Z8(Lle)}),Ble=Nle(Vle);function Fle(e){return Ble(e)}function Sl(e,t,r,i,o=!1,l=[],c,f){return Rn(t)?Ule(e,t,r,o,l,i,c,f).flatMap(h=>{var m;let y=h;if(ale in y)return Ple(e,y,r,o,l,i,c);if(Vc in y){if(o){const{allOf:w,...b}=y;return[...w,b]}try{const w=[],b=[];(m=y.allOf)===null||m===void 0||m.forEach(T=>{typeof T=="object"&&T.contains?w.push(T):b.push(T)}),w.length&&(y={...y,allOf:b}),y=c?c(y):Fle(y),w.length&&(y.allOf=w)}catch(w){console.warn(`could not merge subschemas in allOf:
59
+ `&&i++}}return[t,r]}class _te extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let o;super({start(l){o=Ste({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){o.feed(l)}})}}const Ete={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class tp extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class xte{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Uee(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Ete}async _authThenStart(){if(!this._authProvider)throw new ep("No auth provider");let t;try{t=await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new ep;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=zT(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new tp(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),o)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},o)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:o,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new _te({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:b}=await m.read();if(b)break;if(w.id&&(c=w.id,f=!0,o?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const T=ME.parse(JSON.parse(w.data));cv(T)&&(d=!0,l!==void 0&&(T.id=l)),this.onmessage?.(T)}catch(T){this.onerror?.(T)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new ep("No auth provider");if(await N1(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ep("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:o}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:kT(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new tp(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:b}=ZM(f);if(this._resourceMetadataUrl=w,this._scope=b,await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ep;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:b,error:T}=ZM(f);if(T==="insufficient_scope"){const x=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new tp(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=x??void 0,await N1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new ep;return this.send(t)}}throw new tp(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),nW(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,y=f.headers.get("content-type");if(m)if(y?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:o},!1);else if(y?.includes("application/json")){const v=await f.json(),w=Array.isArray(v)?v.map(b=>ME.parse(b)):[ME.parse(v)];for(const b of w)this.onmessage?.(b)}else throw await f.body?.cancel(),new tp(-1,`Unexpected content type: ${y}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new tp(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class Tte{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new xte(r),this.client=new Pee({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:r??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const xb=new Tte;xb.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const Cte={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},qz=()=>{const{data:e}=QN({queryKey:["list-tools"],queryFn:()=>xb.listTools()});return e},Ote=()=>xb.getServerInfo(),Ate=()=>{const{setToolData:e}=lm();return WI({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const i=await xb.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Cte,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i._meta??null,widgetState:null}}),i}})},gA=()=>{const[e]=PO();return qz().find(r=>r.name===e)??null},Vh=()=>{const e=gA();if(!e)throw new Error("No tool is currently selected");return e},Rte=e=>QN({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await xb.readResource(e)}});const Mte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),WM=e=>{const t=jte(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vz=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Dte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Nte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const kte=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Nte,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Vz("lucide",o),...!l&&!Dte(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const zl=(e,t)=>{const r=j.forwardRef(({className:i,...o},l)=>j.createElement(kte,{ref:l,iconNode:t,className:Vz(`lucide-${Mte(WM(e))}`,`lucide-${e}`,i),...o}));return r.displayName=WM(e),r};const zte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$te=zl("check",zte);const Pte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bz=zl("chevron-down",Pte);const Ute=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ite=zl("chevron-up",Ute);const Lte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qte=zl("circle-alert",Lte);const Vte=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Bte=zl("external-link",Vte);const Fte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hte=zl("loader-circle",Fte);const Gte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Kte=zl("moon",Gte);const Yte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Zte=zl("play",Yte);const Xte=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Qte=zl("sun",Xte);const Wte=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Jte=zl("trash",Wte);function $2(){return typeof window<"u"}function Xc(e){return yA(e)?(e.nodeName||"").toLowerCase():"#document"}function Ma(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $l(e){var t;return(t=(yA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yA(e){return $2()?e instanceof Node||e instanceof Ma(e).Node:!1}function Ur(e){return $2()?e instanceof Element||e instanceof Ma(e).Element:!1}function Wr(e){return $2()?e instanceof HTMLElement||e instanceof Ma(e).HTMLElement:!1}function YT(e){return!$2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ma(e).ShadowRoot}const ene=new Set(["inline","contents"]);function Bh(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=Vs(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!ene.has(o)}const tne=new Set(["table","td","th"]);function nne(e){return tne.has(Xc(e))}const rne=[":popover-open",":modal"];function P2(e){return rne.some(t=>{try{return e.matches(t)}catch{return!1}})}const ane=["transform","translate","scale","rotate","perspective"],ine=["transform","translate","scale","rotate","perspective","filter"],sne=["paint","layout","strict","content"];function vA(e){const t=U2(),r=Ur(e)?Vs(e):e;return ane.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||ine.some(i=>(r.willChange||"").includes(i))||sne.some(i=>(r.contain||"").includes(i))}function one(e){let t=nc(e);for(;Wr(t)&&!ec(t);){if(vA(t))return t;if(P2(t))return null;t=nc(t)}return null}function U2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lne=new Set(["html","body","#document"]);function ec(e){return lne.has(Xc(e))}function Vs(e){return Ma(e).getComputedStyle(e)}function I2(e){return Ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nc(e){if(Xc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||YT(e)&&e.host||$l(e);return YT(t)?t.host:t}function Fz(e){const t=nc(e);return ec(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wr(t)&&Bh(t)?t:Fz(t)}function Oc(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Fz(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),c=Ma(o);if(l){const f=ZT(c);return t.concat(c,c.visualViewport||[],Bh(o)?o:[],f&&r?Oc(f):[])}return t.concat(o,Oc(o,[],r))}function ZT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const JM={};function Al(e,t){const r=j.useRef(JM);return r.current===JM&&(r.current=e(t)),r}const YE=ob[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],une=YE&&YE!==j.useLayoutEffect?YE:e=>e();function Ct(e){const t=Al(cne).current;return t.next=e,une(t.effect),t.trampoline}function cne(){const e={next:void 0,callback:fne,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function fne(){}const dne=()=>{},St=typeof document<"u"?j.useLayoutEffect:dne;function XT(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Sv={};function L2(e,t,r,i,o){let l={...QT(e,Sv)};return t&&(l=fv(l,t)),r&&(l=fv(l,r)),i&&(l=fv(l,i)),o&&(l=fv(l,o)),l}function hne(e){if(e.length===0)return Sv;if(e.length===1)return QT(e[0],Sv);let t={...QT(e[0],Sv)};for(let r=1;r<e.length;r+=1)t=fv(t,e[r]);return t}function fv(e,t){return Hz(t)?t(e):pne(e,t)}function pne(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=XT(e.style,i);break}case"className":{e[r]=Gz(e.className,i);break}default:mne(r,i)?e[r]=gne(e[r],i):e[r]=i}}return e}function mne(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return r===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Hz(e){return typeof e=="function"}function QT(e,t){return Hz(e)?e(t):e??Sv}function gne(e,t){return t?e?r=>{if(yne(r)){const o=r;WT(o);const l=t(o);return o.baseUIHandlerPrevented||e?.(o),l}const i=t(r);return e?.(r),i}:t:e}function WT(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Gz(e,t){return t?e?t+" "+e:t:e}function yne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Pl(e,...t){const r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const Kz=j.createContext(void 0);function Yz(e=!1){const t=j.useContext(Kz);if(t===void 0&&!e)throw new Error(Pl(16));return t}function vne(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=o,!l&&r&&(h.tabIndex=t?o:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,o])}}function q2(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0}=e,l=j.useRef(null),c=Yz(!0)!==void 0,f=Ct(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=vne({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:o}),h=j.useCallback(()=>{const v=l.current;bne(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);St(h,[h]);const m=j.useCallback((v={})=>{const{onClick:w,onMouseDown:b,onKeyUp:T,onKeyDown:x,onPointerDown:E,...S}=v;return L2({type:o?"button":void 0,onClick(_){if(t){_.preventDefault();return}w?.(_)},onMouseDown(_){t||b?.(_)},onKeyDown(_){if(t||(WT(_),x?.(_)),_.baseUIHandlerPrevented)return;const A=_.target===_.currentTarget&&!o&&!f()&&!t,C=_.key==="Enter",M=_.key===" ";A&&((M||C)&&_.preventDefault(),C&&w?.(_))},onKeyUp(_){t||(WT(_),T?.(_)),!_.baseUIHandlerPrevented&&_.target===_.currentTarget&&!o&&!t&&_.key===" "&&w?.(_)},onPointerDown(_){if(t){_.preventDefault();return}E?.(_)}},o?void 0:{role:"button"},d,S)},[t,d,o,f]),y=Ct(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:y}}function bne(e){return Wr(e)&&e.tagName==="BUTTON"}function Ic(e,t,r,i){const o=Al(Zz).current;return wne(o,e,t,r,i)&&Xz(o,[e,t,r,i]),o.callback}function Sne(e){const t=Al(Zz).current;return _ne(t,e)&&Xz(t,e),t.callback}function Zz(){return{callback:null,cleanup:null,refs:[]}}function wne(e,t,r,i,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==o}function _ne(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function Xz(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[o]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=i[o];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const Ene=parseInt(j.version,10);function bA(e){return Ene>=e}function e4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(bA(19)?r?.ref:t.ref)??null}function xne(e,t){const r={};for(const i in e){const o=e[i];if(t?.hasOwnProperty(i)){const l=t[i](o);l!=null&&Object.assign(r,l);continue}o===!0?r[`data-${i.toLowerCase()}`]="":o&&(r[`data-${i.toLowerCase()}`]=o.toString())}return r}function Tne(e,t){return typeof e=="function"?e(t):e}function Cne(e,t){return typeof e=="function"?e(t):e}function $s(){}const Bp=Object.freeze([]),Ps=Object.freeze({}),One={style:{transition:"none"}},Ane="data-base-ui-click-trigger",Rne={fallbackAxisSide:"none"},Mne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function za(e,t,r={}){const i=t.render,o=jne(t,r);if(r.enabled===!1)return null;const l=r.state??Ps;return Dne(e,i,o,l)}function jne(e,t={}){const{className:r,style:i,render:o}=e,{state:l=Ps,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?Tne(r,l):void 0,y=h?Cne(i,l):void 0,v=h?xne(l,d):Ps,w=h?XT(v,Array.isArray(f)?hne(f):f)??Ps:Ps;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=Sne([w.ref,e4(o),...c]):w.ref=Ic(w.ref,e4(o),c):Ic(null,null)),h?(m!==void 0&&(w.className=Gz(w.className,m)),y!==void 0&&(w.style=XT(w.style,y)),w):Ps}function Dne(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const o=L2(r,t.props);return o.ref=r.ref,j.cloneElement(t,o)}if(e&&typeof e=="string")return Nne(e,r);throw new Error(Pl(8))}function Nne(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const kne=j.forwardRef(function(t,r){const{render:i,className:o,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,h=!!l,{getButtonProps:m,buttonRef:y}=q2({disabled:h,focusableWhenDisabled:c,native:f}),v=j.useMemo(()=>({disabled:h}),[h]);return za("button",t,{state:v,ref:[r,y],props:[d,m]})});function Qz(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qz(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function SA(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qz(e))&&(i&&(i+=" "),i+=t);return i}const t4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,n4=SA,Qc=(e,t)=>r=>{var i;if(t?.variants==null)return n4(e,r?.class,r?.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(h=>{const m=r?.[h],y=l?.[h];if(m===null)return null;const v=t4(m)||t4(y);return o[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,v]=m;return v===void 0||(h[y]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:v,...w}=m;return Object.entries(w).every(b=>{let[T,x]=b;return Array.isArray(x)?x.includes({...l,...f}[T]):{...l,...f}[T]===x})?[...h,y,v]:h},[]);return n4(e,c,d,r?.class,r?.className)},zne=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},$ne=(e,t)=>({classGroupId:e,validator:t}),Wz=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),VS="-",r4=[],Pne="arbitrary..",Une=e=>{const t=Lne(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Ine(c);const f=c.split(VS),d=f[0]===""&&f.length>1?1:0;return Jz(f,d,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=r[c];return d?h?zne(h,d):d:h||r4}return r[c]||r4}}},Jz=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],l=r.nextPart.get(o);if(l){const h=Jz(e,t+1,l);if(h)return h}const c=r.validators;if(c===null)return;const f=t===0?e.join(VS):e.slice(t).join(VS),d=c.length;for(let h=0;h<d;h++){const m=c[h];if(m.validator(f))return m.classGroupId}},Ine=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?Pne+i:void 0})(),Lne=e=>{const{theme:t,classGroups:r}=e;return qne(r,t)},qne=(e,t)=>{const r=Wz();for(const i in e){const o=e[i];wA(o,r,i,t)}return r},wA=(e,t,r,i)=>{const o=e.length;for(let l=0;l<o;l++){const c=e[l];Vne(c,t,r,i)}},Vne=(e,t,r,i)=>{if(typeof e=="string"){Bne(e,t,r);return}if(typeof e=="function"){Fne(e,t,r,i);return}Hne(e,t,r,i)},Bne=(e,t,r)=>{const i=e===""?t:e9(t,e);i.classGroupId=r},Fne=(e,t,r,i)=>{if(Gne(e)){wA(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push($ne(r,e))},Hne=(e,t,r,i)=>{const o=Object.entries(e),l=o.length;for(let c=0;c<l;c++){const[f,d]=o[c];wA(d,e9(t,f),r,i)}},e9=(e,t)=>{let r=e;const i=t.split(VS),o=i.length;for(let l=0;l<o;l++){const c=i[l];let f=r.nextPart.get(c);f||(f=Wz(),r.nextPart.set(c,f)),r=f}return r},Gne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Kne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const o=(l,c)=>{r[l]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return o(l,c),c},set(l,c){l in r?r[l]=c:o(l,c)}}},JT="!",a4=":",Yne=[],i4=(e,t,r,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:o}),Zne=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=o=>{const l=[];let c=0,f=0,d=0,h;const m=o.length;for(let T=0;T<m;T++){const x=o[T];if(c===0&&f===0){if(x===a4){l.push(o.slice(d,T)),d=T+1;continue}if(x==="/"){h=T;continue}}x==="["?c++:x==="]"?c--:x==="("?f++:x===")"&&f--}const y=l.length===0?o:o.slice(d);let v=y,w=!1;y.endsWith(JT)?(v=y.slice(0,-1),w=!0):y.startsWith(JT)&&(v=y.slice(1),w=!0);const b=h&&h>d?h-d:void 0;return i4(l,w,v,b)};if(t){const o=t+a4,l=i;i=c=>c.startsWith(o)?l(c.slice(o.length)):i4(Yne,!1,c,void 0,!0)}if(r){const o=i;i=l=>r({className:l,parseClassName:o})}return i},Xne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let o=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",d=t.has(c);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(c)):o.push(c)}return o.length>0&&(o.sort(),i.push(...o)),i}},Qne=e=>({cache:Kne(e.cacheSize),parseClassName:Zne(e),sortModifiers:Xne(e),...Une(e)}),Wne=/\s+/,Jne=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=t,c=[],f=e.trim().split(Wne);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:y,modifiers:v,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:T}=r(m);if(y){d=m+(d.length>0?" "+d:d);continue}let x=!!T,E=i(x?b.substring(0,T):b);if(!E){if(!x){d=m+(d.length>0?" "+d:d);continue}if(E=i(b),!E){d=m+(d.length>0?" "+d:d);continue}x=!1}const S=v.length===0?"":v.length===1?v[0]:l(v).join(":"),O=w?S+JT:S,_=O+E;if(c.indexOf(_)>-1)continue;c.push(_);const A=o(E,x);for(let C=0;C<A.length;++C){const M=A[C];c.push(O+M)}d=m+(d.length>0?" "+d:d)}return d},ere=(...e)=>{let t=0,r,i,o="";for(;t<e.length;)(r=e[t++])&&(i=t9(r))&&(o&&(o+=" "),o+=i);return o},t9=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=t9(e[i]))&&(r&&(r+=" "),r+=t);return r},tre=(e,...t)=>{let r,i,o,l;const c=d=>{const h=t.reduce((m,y)=>y(m),e());return r=Qne(h),i=r.cache.get,o=r.cache.set,l=f,f(d)},f=d=>{const h=i(d);if(h)return h;const m=Jne(d,r);return o(d,m),m};return l=c,(...d)=>l(ere(...d))},nre=[],Ca=e=>{const t=r=>r[e]||nre;return t.isThemeGetter=!0,t},n9=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r9=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rre=/^\d+\/\d+$/,are=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ire=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sre=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ore=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lre=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,np=e=>rre.test(e),pn=e=>!!e&&!Number.isNaN(Number(e)),gc=e=>!!e&&Number.isInteger(Number(e)),ZE=e=>e.endsWith("%")&&pn(e.slice(0,-1)),Qu=e=>are.test(e),ure=()=>!0,cre=e=>ire.test(e)&&!sre.test(e),a9=()=>!1,fre=e=>ore.test(e),dre=e=>lre.test(e),hre=e=>!ft(e)&&!dt(e),pre=e=>dm(e,o9,a9),ft=e=>n9.test(e),uh=e=>dm(e,l9,cre),XE=e=>dm(e,bre,pn),s4=e=>dm(e,i9,a9),mre=e=>dm(e,s9,dre),k1=e=>dm(e,u9,fre),dt=e=>r9.test(e),tv=e=>hm(e,l9),gre=e=>hm(e,Sre),o4=e=>hm(e,i9),yre=e=>hm(e,o9),vre=e=>hm(e,s9),z1=e=>hm(e,u9,!0),dm=(e,t,r)=>{const i=n9.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},hm=(e,t,r=!1)=>{const i=r9.exec(e);return i?i[1]?t(i[1]):r:!1},i9=e=>e==="position"||e==="percentage",s9=e=>e==="image"||e==="url",o9=e=>e==="length"||e==="size"||e==="bg-size",l9=e=>e==="length",bre=e=>e==="number",Sre=e=>e==="family-name",u9=e=>e==="shadow",wre=()=>{const e=Ca("color"),t=Ca("font"),r=Ca("text"),i=Ca("font-weight"),o=Ca("tracking"),l=Ca("leading"),c=Ca("breakpoint"),f=Ca("container"),d=Ca("spacing"),h=Ca("radius"),m=Ca("shadow"),y=Ca("inset-shadow"),v=Ca("text-shadow"),w=Ca("drop-shadow"),b=Ca("blur"),T=Ca("perspective"),x=Ca("aspect"),E=Ca("ease"),S=Ca("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[..._(),dt,ft],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[dt,ft,d],$=()=>[np,"full","auto",...D()],q=()=>[gc,"none","subgrid",dt,ft],V=()=>["auto",{span:["full",gc,dt,ft]},gc,dt,ft],Y=()=>[gc,"auto",dt,ft],Q=()=>["auto","min","max","fr",dt,ft],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],G=()=>[np,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],J=()=>[e,dt,ft],fe=()=>[..._(),o4,s4,{position:[dt,ft]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yre,pre,{size:[dt,ft]}],U=()=>[ZE,tv,uh],I=()=>["","none","full",h,dt,ft],P=()=>["",pn,tv,uh],F=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[pn,ZE,o4,s4],ge=()=>["","none",b,dt,ft],we=()=>["none",pn,dt,ft],De=()=>["none",pn,dt,ft],te=()=>[pn,dt,ft],he=()=>[np,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qu],breakpoint:[Qu],color:[ure],container:[Qu],"drop-shadow":[Qu],ease:["in","out","in-out"],font:[hre],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qu],shadow:[Qu],spacing:["px",pn],text:[Qu],"text-shadow":[Qu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",np,ft,dt,x]}],container:["container"],columns:[{columns:[pn,ft,dt,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[gc,"auto",dt,ft]}],basis:[{basis:[np,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pn,np,"auto","initial","none",ft]}],grow:[{grow:["",pn,dt,ft]}],shrink:[{shrink:["",pn,dt,ft]}],order:[{order:[gc,"first","last","none",dt,ft]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[f,"screen",...G()]}],"min-w":[{"min-w":[f,"screen","none",...G()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,tv,uh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,dt,XE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ZE,ft]}],"font-family":[{font:[gre,ft,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,dt,ft]}],"line-clamp":[{"line-clamp":[pn,"none",dt,XE]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",dt,ft]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,ft]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[pn,"from-font","auto",dt,uh]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[pn,"auto",dt,ft]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dt,ft]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dt,ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gc,dt,ft],radial:["",dt,ft],conic:[gc,dt,ft]},vre,mre]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pn,dt,ft]}],"outline-w":[{outline:["",pn,tv,uh]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",m,z1,k1]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",y,z1,k1]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[pn,uh]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",v,z1,k1]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[pn,dt,ft]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[dt,ft]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[pn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",dt,ft]}],filter:[{filter:["","none",dt,ft]}],blur:[{blur:ge()}],brightness:[{brightness:[pn,dt,ft]}],contrast:[{contrast:[pn,dt,ft]}],"drop-shadow":[{"drop-shadow":["","none",w,z1,k1]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",pn,dt,ft]}],"hue-rotate":[{"hue-rotate":[pn,dt,ft]}],invert:[{invert:["",pn,dt,ft]}],saturate:[{saturate:[pn,dt,ft]}],sepia:[{sepia:["",pn,dt,ft]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,ft]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[pn,dt,ft]}],"backdrop-contrast":[{"backdrop-contrast":[pn,dt,ft]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pn,dt,ft]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pn,dt,ft]}],"backdrop-invert":[{"backdrop-invert":["",pn,dt,ft]}],"backdrop-opacity":[{"backdrop-opacity":[pn,dt,ft]}],"backdrop-saturate":[{"backdrop-saturate":[pn,dt,ft]}],"backdrop-sepia":[{"backdrop-sepia":["",pn,dt,ft]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",dt,ft]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pn,"initial",dt,ft]}],ease:[{ease:["linear","initial",E,dt,ft]}],delay:[{delay:[pn,dt,ft]}],animate:[{animate:["none",S,dt,ft]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,dt,ft]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[dt,ft,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dt,ft]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dt,ft]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[pn,tv,uh,XE]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},c9=tre(wre);function Qn(...e){return c9(SA(e))}const _re=Qc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Bv({className:e,variant:t="default",size:r="default",...i}){return N.jsx(kne,{"data-slot":"button",className:Qn(_re({variant:t,size:r,className:e})),...i})}const Ere=()=>{const e=Ote(),t=e?.name,r=e?.version,[,i]=PO();return N.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:N.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),N.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),N.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[N.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),N.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),N.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[N.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),N.jsx("div",{className:"flex items-center gap-2",children:N.jsx(Bv,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:N.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",N.jsx(Bte,{className:"h-3.5 w-3.5"})]})})})]})})},f9=j.createContext({});function xre(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const _A=typeof window<"u",Tre=_A?j.useLayoutEffect:j.useEffect,EA=j.createContext(null);function xA(e,t){e.indexOf(t)===-1&&e.push(t)}function TA(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const rc=(e,t,r)=>r>t?t:r<e?e:r;let CA=()=>{};const ac={},d9=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function h9(e){return typeof e=="object"&&e!==null}const p9=e=>/^0[^.\s]+$/u.test(e);function OA(e){let t;return()=>(t===void 0&&(t=e()),t)}const ao=e=>e,Cre=(e,t)=>r=>t(e(r)),Tb=(...e)=>e.reduce(Cre),Fv=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class AA{constructor(){this.subscriptions=[]}add(t){return xA(this.subscriptions,t),()=>TA(this.subscriptions,t)}notify(t,r,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,i);else for(let l=0;l<o;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xl=e=>e*1e3,to=e=>e/1e3;function m9(e,t){return t?e*(1e3/t):0}const g9=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Ore=1e-7,Are=12;function Rre(e,t,r,i,o){let l,c,f=0;do c=t+(r-t)/2,l=g9(c,i,o)-e,l>0?r=c:t=c;while(Math.abs(l)>Ore&&++f<Are);return c}function Cb(e,t,r,i){if(e===t&&r===i)return ao;const o=l=>Rre(l,0,1,e,r);return l=>l===0||l===1?l:g9(o(l),t,i)}const y9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,v9=e=>t=>1-e(1-t),b9=Cb(.33,1.53,.69,.99),RA=v9(b9),S9=y9(RA),w9=e=>(e*=2)<1?.5*RA(e):.5*(2-Math.pow(2,-10*(e-1))),MA=e=>1-Math.sin(Math.acos(e)),_9=v9(MA),E9=y9(MA),Mre=Cb(.42,0,1,1),jre=Cb(0,0,.58,1),x9=Cb(.42,0,.58,1),Dre=e=>Array.isArray(e)&&typeof e[0]!="number",T9=e=>Array.isArray(e)&&typeof e[0]=="number",Nre={linear:ao,easeIn:Mre,easeInOut:x9,easeOut:jre,circIn:MA,circInOut:E9,circOut:_9,backIn:RA,backInOut:S9,backOut:b9,anticipate:w9},kre=e=>typeof e=="string",l4=e=>{if(T9(e)){CA(e.length===4);const[t,r,i,o]=e;return Cb(t,r,i,o)}else if(kre(e))return Nre[e];return e},$1=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zre(e,t){let r=new Set,i=new Set,o=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,y=!1,v=!1)=>{const b=v&&o?r:i;return y&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,o){l=!0;return}o=!0,[r,i]=[i,r],r.forEach(d),r.clear(),o=!1,l&&(l=!1,h.process(m))}};return h}const $re=40;function C9(e,t){let r=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=$1.reduce((O,_)=>(O[_]=zre(l),O),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:v,render:w,postRender:b}=c,T=()=>{const O=ac.useManualTiming?o.timestamp:performance.now();r=!1,ac.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(O-o.timestamp,$re),1)),o.timestamp=O,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),m.process(o),y.process(o),v.process(o),w.process(o),b.process(o),o.isProcessing=!1,r&&t&&(i=!1,e(T))},x=()=>{r=!0,i=!0,o.isProcessing||e(T)};return{schedule:$1.reduce((O,_)=>{const A=c[_];return O[_]=(C,M=!1,D=!1)=>(r||x(),A.schedule(C,M,D)),O},{}),cancel:O=>{for(let _=0;_<$1.length;_++)c[$1[_]].cancel(O)},state:o,steps:c}}const{schedule:Ir,cancel:Lc,state:oi,steps:QE}=C9(typeof requestAnimationFrame<"u"?requestAnimationFrame:ao,!0);let uS;function Pre(){uS=void 0}const Wi={now:()=>(uS===void 0&&Wi.set(oi.isProcessing||ac.useManualTiming?oi.timestamp:performance.now()),uS),set:e=>{uS=e,queueMicrotask(Pre)}},O9=e=>t=>typeof t=="string"&&t.startsWith(e),A9=O9("--"),Ure=O9("var(--"),jA=e=>Ure(e)?Ire.test(e.split("/*")[0].trim()):!1,Ire=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hv={...pm,transform:e=>rc(0,1,e)},P1={...pm,default:1},wv=e=>Math.round(e*1e5)/1e5,DA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lre(e){return e==null}const qre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,NA=(e,t)=>r=>!!(typeof r=="string"&&qre.test(r)&&r.startsWith(e)||t&&!Lre(r)&&Object.prototype.hasOwnProperty.call(r,t)),R9=(e,t,r)=>i=>{if(typeof i!="string")return i;const[o,l,c,f]=i.match(DA);return{[e]:parseFloat(o),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},Vre=e=>rc(0,255,e),WE={...pm,transform:e=>Math.round(Vre(e))},vh={test:NA("rgb","red"),parse:R9("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+WE.transform(e)+", "+WE.transform(t)+", "+WE.transform(r)+", "+wv(Hv.transform(i))+")"};function Bre(e){let t="",r="",i="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const eC={test:NA("#"),parse:Bre,transform:vh.transform},Ob=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vc=Ob("deg"),Tl=Ob("%"),lt=Ob("px"),Fre=Ob("vh"),Hre=Ob("vw"),u4={...Tl,parse:e=>Tl.parse(e)/100,transform:e=>Tl.transform(e*100)},gp={test:NA("hsl","hue"),parse:R9("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+Tl.transform(wv(t))+", "+Tl.transform(wv(r))+", "+wv(Hv.transform(i))+")"},sa={test:e=>vh.test(e)||eC.test(e)||gp.test(e),parse:e=>vh.test(e)?vh.parse(e):gp.test(e)?gp.parse(e):eC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?vh.transform(e):gp.transform(e),getAnimatableNone:e=>{const t=sa.parse(e);return t.alpha=0,sa.transform(t)}},Gre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kre(e){return isNaN(e)&&typeof e=="string"&&(e.match(DA)?.length||0)+(e.match(Gre)?.length||0)>0}const M9="number",j9="color",Yre="var",Zre="var(",c4="${}",Xre=/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 Gv(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},o=[];let l=0;const f=t.replace(Xre,d=>(sa.test(d)?(i.color.push(l),o.push(j9),r.push(sa.parse(d))):d.startsWith(Zre)?(i.var.push(l),o.push(Yre),r.push(d)):(i.number.push(l),o.push(M9),r.push(parseFloat(d))),++l,c4)).split(c4);return{values:r,split:f,indexes:i,types:o}}function D9(e){return Gv(e).values}function N9(e){const{split:t,types:r}=Gv(e),i=t.length;return o=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],o[c]!==void 0){const f=r[c];f===M9?l+=wv(o[c]):f===j9?l+=sa.transform(o[c]):l+=o[c]}return l}}const Qre=e=>typeof e=="number"?0:sa.test(e)?sa.getAnimatableNone(e):e;function Wre(e){const t=D9(e);return N9(e)(t.map(Qre))}const qc={test:Kre,parse:D9,createTransformer:N9,getAnimatableNone:Wre};function JE(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Jre({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let o=0,l=0,c=0;if(!t)o=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;o=JE(d,f,e+1/3),l=JE(d,f,e),c=JE(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function BS(e,t){return r=>r>0?t:e}const Hr=(e,t,r)=>e+(t-e)*r,ex=(e,t,r)=>{const i=e*e,o=r*(t*t-i)+i;return o<0?0:Math.sqrt(o)},eae=[eC,vh,gp],tae=e=>eae.find(t=>t.test(e));function f4(e){const t=tae(e);if(!t)return!1;let r=t.parse(e);return t===gp&&(r=Jre(r)),r}const d4=(e,t)=>{const r=f4(e),i=f4(t);if(!r||!i)return BS(e,t);const o={...r};return l=>(o.red=ex(r.red,i.red,l),o.green=ex(r.green,i.green,l),o.blue=ex(r.blue,i.blue,l),o.alpha=Hr(r.alpha,i.alpha,l),vh.transform(o))},tC=new Set(["none","hidden"]);function nae(e,t){return tC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function rae(e,t){return r=>Hr(e,t,r)}function kA(e){return typeof e=="number"?rae:typeof e=="string"?jA(e)?BS:sa.test(e)?d4:sae:Array.isArray(e)?k9:typeof e=="object"?sa.test(e)?d4:aae:BS}function k9(e,t){const r=[...e],i=r.length,o=e.map((l,c)=>kA(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=o[c](l);return r}}function aae(e,t){const r={...e,...t},i={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(i[o]=kA(e[o])(e[o],t[o]));return o=>{for(const l in i)r[l]=i[l](o);return r}}function iae(e,t){const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],c=e.indexes[l][i[l]],f=e.values[c]??0;r[o]=f,i[l]++}return r}const sae=(e,t)=>{const r=qc.createTransformer(t),i=Gv(e),o=Gv(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?tC.has(e)&&!o.values.length||tC.has(t)&&!i.values.length?nae(e,t):Tb(k9(iae(i,o),o.values),r):BS(e,t)};function z9(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Hr(e,t,r):kA(e)(e,t)}const oae=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ir.update(t,r),stop:()=>Lc(t),now:()=>oi.isProcessing?oi.timestamp:Wi.now()}},$9=(e,t,r=10)=>{let i="";const o=Math.max(Math.round(t/r),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},FS=2e4;function zA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<FS;)t+=r,i=e.next(t);return t>=FS?1/0:t}function lae(e,t=100,r){const i=r({...e,keyframes:[0,t]}),o=Math.min(zA(i),FS);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:to(o)}}const uae=5;function P9(e,t,r){const i=Math.max(t-uae,0);return m9(r-e(i),t-i)}const Qr={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},tx=.001;function cae({duration:e=Qr.duration,bounce:t=Qr.bounce,velocity:r=Qr.velocity,mass:i=Qr.mass}){let o,l,c=1-t;c=rc(Qr.minDamping,Qr.maxDamping,c),e=rc(Qr.minDuration,Qr.maxDuration,to(e)),c<1?(o=h=>{const m=h*c,y=m*e,v=m-r,w=nC(h,c),b=Math.exp(-y);return tx-v/w*b},l=h=>{const y=h*c*e,v=y*r+r,w=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-y),T=nC(Math.pow(h,2),c);return(-o(h)+tx>0?-1:1)*((v-w)*b)/T}):(o=h=>{const m=Math.exp(-h*e),y=(h-r)*e+1;return-tx+m*y},l=h=>{const m=Math.exp(-h*e),y=(r-h)*(e*e);return m*y});const f=5/e,d=dae(o,l,f);if(e=xl(e),isNaN(d))return{stiffness:Qr.stiffness,damping:Qr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const fae=12;function dae(e,t,r){let i=r;for(let o=1;o<fae;o++)i=i-e(i)/t(i);return i}function nC(e,t){return e*Math.sqrt(1-t*t)}const hae=["duration","bounce"],pae=["stiffness","damping","mass"];function h4(e,t){return t.some(r=>e[r]!==void 0)}function mae(e){let t={velocity:Qr.velocity,stiffness:Qr.stiffness,damping:Qr.damping,mass:Qr.mass,isResolvedFromDuration:!1,...e};if(!h4(e,pae)&&h4(e,hae))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),o=i*i,l=2*rc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Qr.mass,stiffness:o,damping:l}}else{const r=cae(e);t={...t,...r,mass:Qr.mass},t.isResolvedFromDuration=!0}return t}function HS(e=Qr.visualDuration,t=Qr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:y,velocity:v,isResolvedFromDuration:w}=mae({...r,velocity:-to(r.velocity||0)}),b=v||0,T=h/(2*Math.sqrt(d*m)),x=c-l,E=to(Math.sqrt(d/m)),S=Math.abs(x)<5;i||(i=S?Qr.restSpeed.granular:Qr.restSpeed.default),o||(o=S?Qr.restDelta.granular:Qr.restDelta.default);let O;if(T<1){const A=nC(E,T);O=C=>{const M=Math.exp(-T*E*C);return c-M*((b+T*E*x)/A*Math.sin(A*C)+x*Math.cos(A*C))}}else if(T===1)O=A=>c-Math.exp(-E*A)*(x+(b+E*x)*A);else{const A=E*Math.sqrt(T*T-1);O=C=>{const M=Math.exp(-T*E*C),D=Math.min(A*C,300);return c-M*((b+T*E*x)*Math.sinh(D)+A*x*Math.cosh(D))/A}}const _={calculatedDuration:w&&y||null,next:A=>{const C=O(A);if(w)f.done=A>=y;else{let M=A===0?b:0;T<1&&(M=A===0?xl(b):P9(O,A,C));const D=Math.abs(M)<=i,$=Math.abs(c-C)<=o;f.done=D&&$}return f.value=f.done?c:C,f},toString:()=>{const A=Math.min(zA(_),FS),C=$9(M=>_.next(A*M).value,A,30);return A+"ms "+C},toTransition:()=>{}};return _}HS.applyToOptions=e=>{const t=lae(e,100,HS);return e.ease=t.ease,e.duration=xl(t.duration),e.type="keyframes",e};function rC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],v={done:!1,value:y},w=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let T=r*t;const x=y+T,E=c===void 0?x:c(x);E!==x&&(T=E-y);const S=D=>-T*Math.exp(-D/i),O=D=>E+S(D),_=D=>{const $=S(D),q=O(D);v.done=Math.abs($)<=h,v.value=v.done?E:q};let A,C;const M=D=>{w(v.value)&&(A=D,C=HS({keyframes:[v.value,b(v.value)],velocity:P9(O,D,v.value),damping:o,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let $=!1;return!C&&A===void 0&&($=!0,_(D),M(D)),A!==void 0&&D>=A?C.next(D-A):(!$&&_(D),v)}}}function gae(e,t,r){const i=[],o=r||ac.mix||z9,l=e.length-1;for(let c=0;c<l;c++){let f=o(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||ao:t;f=Tb(d,f)}i.push(f)}return i}function yae(e,t,{clamp:r=!0,ease:i,mixer:o}={}){const l=e.length;if(CA(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=gae(t,i,o),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const v=Fv(e[y],e[y+1],m);return f[y](v)};return r?m=>h(rc(e[0],e[l-1],m)):h}function vae(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const o=Fv(0,t,i);e.push(Hr(r,1,o))}}function bae(e){const t=[0];return vae(t,e.length-1),t}function Sae(e,t){return e.map(r=>r*t)}function wae(e,t){return e.map(()=>t||x9).splice(0,e.length-1)}function _v({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const o=Dre(i)?i.map(l4):l4(i),l={done:!1,value:t[0]},c=Sae(r&&r.length===t.length?r:bae(t),e),f=yae(c,t,{ease:Array.isArray(o)?o:wae(t,o)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const _ae=e=>e!==null;function $A(e,{repeat:t,repeatType:r="loop"},i,o=1){const l=e.filter(_ae),f=o<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const Eae={decay:rC,inertia:rC,tween:_v,keyframes:_v,spring:HS};function U9(e){typeof e.type=="string"&&(e.type=Eae[e.type])}class PA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const xae=e=>e/100;class UA extends PA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Wi.now()&&this.tick(Wi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;U9(t);const{type:r=_v,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||_v;d!==_v&&typeof f[0]!="number"&&(this.mixKeyframes=Tb(xae,z9(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=zA(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:v,repeatDelay:w,type:b,onUpdate:T,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const E=this.currentTime-h*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?E<0:E>o;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let O=this.currentTime,_=i;if(y){const D=Math.min(this.currentTime,o)/f;let $=Math.floor(D),q=D%1;!q&&D>=1&&(q=1),q===1&&$--,$=Math.min($,y+1),$%2&&(v==="reverse"?(q=1-q,w&&(q-=w/f)):v==="mirror"&&(_=c)),O=rc(0,1,q)*f}const A=S?{done:!1,value:m[0]}:_.next(O);l&&(A.value=l(A.value));let{done:C}=A;!S&&d!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&b!==rC&&(A.value=$A(m,this.options,x,this.speed)),T&&T(A.value),M&&this.finish(),A}then(t,r){return this.finished.then(t,r)}get duration(){return to(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(this.currentTime)}set time(t){t=xl(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wi.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=to(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=oae,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),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(Wi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Tae(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bh=e=>e*180/Math.PI,aC=e=>{const t=bh(Math.atan2(e[1],e[0]));return iC(t)},Cae={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:aC,rotateZ:aC,skewX:e=>bh(Math.atan(e[1])),skewY:e=>bh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},iC=e=>(e=e%360,e<0&&(e+=360),e),p4=aC,m4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),g4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Oae={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:m4,scaleY:g4,scale:e=>(m4(e)+g4(e))/2,rotateX:e=>iC(bh(Math.atan2(e[6],e[5]))),rotateY:e=>iC(bh(Math.atan2(-e[2],e[0]))),rotateZ:p4,rotate:p4,skewX:e=>bh(Math.atan(e[4])),skewY:e=>bh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sC(e){return e.includes("scale")?1:0}function oC(e,t){if(!e||e==="none")return sC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(r)i=Oae,o=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Cae,o=f}if(!o)return sC(t);const l=i[t],c=o[1].split(",").map(Rae);return typeof l=="function"?l(c):c[l]}const Aae=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return oC(r,t)};function Rae(e){return parseFloat(e.trim())}const mm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gm=new Set(mm),y4=e=>e===pm||e===lt,Mae=new Set(["x","y","z"]),jae=mm.filter(e=>!Mae.has(e));function Dae(e){const t=[];return jae.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const _h={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>oC(t,"x"),y:(e,{transform:t})=>oC(t,"y")};_h.translateX=_h.x;_h.translateY=_h.y;const Eh=new Set;let lC=!1,uC=!1,cC=!1;function I9(){if(uC){const e=Array.from(Eh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const o=Dae(i);o.length&&(r.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=r.get(i);o&&o.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}uC=!1,lC=!1,Eh.forEach(e=>e.complete(cC)),Eh.clear()}function L9(){Eh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uC=!0)})}function Nae(){cC=!0,L9(),I9(),cC=!1}class IA{constructor(t,r,i,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Eh.add(this),lC||(lC=!0,Ir.read(L9),Ir.resolveKeyframes(I9))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),o&&l===void 0&&o.set(t[0])}Tae(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Eh.delete(this)}cancel(){this.state==="scheduled"&&(Eh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kae=e=>e.startsWith("--");function zae(e,t,r){kae(t)?e.style.setProperty(t,r):e.style[t]=r}const $ae=OA(()=>window.ScrollTimeline!==void 0),Pae={};function Uae(e,t){const r=OA(e);return()=>Pae[t]??r()}const q9=Uae(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,v4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dv([0,.65,.55,1]),circOut:dv([.55,0,1,.45]),backIn:dv([.31,.01,.66,-.59]),backOut:dv([.33,1.53,.69,.99])};function V9(e,t){if(e)return typeof e=="function"?q9()?$9(e,t):"ease-out":T9(e)?dv(e):Array.isArray(e)?e.map(r=>V9(r,t)||v4.easeOut):v4[e]}function Iae(e,t,r,{delay:i=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const y=V9(f,o);Array.isArray(y)&&(m.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function B9(e){return typeof e=="function"&&"applyToOptions"in e}function Lae({type:e,...t}){return B9(e)&&q9()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class qae extends PA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:i,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,CA(typeof t.type!="string");const h=Lae(t);this.animation=Iae(r,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=$A(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):zae(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return to(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=xl(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$ae()?(this.animation.timeline=t,ao):r(this)}}const F9={anticipate:w9,backInOut:S9,circInOut:E9};function Vae(e){return e in F9}function Bae(e){typeof e.ease=="string"&&Vae(e.ease)&&(e.ease=F9[e.ease])}const b4=10;class Fae extends qae{constructor(t){Bae(t),U9(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:o,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new UA({...c,autoplay:!1}),d=xl(this.finishedTime??this.time);r.setWithVelocity(f.sample(d-b4).value,f.sample(d).value,b4),f.stop()}}const S4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(qc.test(e)||e==="0")&&!e.startsWith("url("));function Hae(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Gae(e,t,r,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=S4(o,t),f=S4(l,t);return!c||!f?!1:Hae(e)||(r==="spring"||B9(r))&&i}function fC(e){e.duration=0,e.type="keyframes"}const Kae=new Set(["opacity","clipPath","filter","transform"]),Yae=OA(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zae(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:o,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return Yae()&&r&&Kae.has(r)&&(r!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&c!=="inertia"}const Xae=40;class Qae extends PA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wi.now();const v={autoplay:t,delay:r,type:i,repeat:o,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...y},w=m?.KeyframeResolver||IA;this.keyframeResolver=new w(f,(b,T,x)=>this.onKeyframesResolved(b,T,v,!x),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Wi.now(),Gae(t,l,c,f)||((ac.instantAnimations||!d)&&m?.($A(t,i,r)),t[0]=t[t.length-1],fC(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Xae?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},w=!h&&Zae(v)?new Fae({...v,element:v.motionValue.owner.current}):new UA(v);w.finished.then(()=>this.notifyFinished()).catch(ao),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nae()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Wae=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jae(e){const t=Wae.exec(e);if(!t)return[,];const[,r,i,o]=t;return[`--${r??i}`,o]}function H9(e,t,r=1){const[i,o]=Jae(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return d9(c)?parseFloat(c):c}return jA(o)?H9(o,t,r+1):o}function LA(e,t){return e?.[t]??e?.default??e}const G9=new Set(["width","height","top","left","right","bottom",...mm]),eie={test:e=>e==="auto",parse:e=>e},K9=e=>t=>t.test(e),Y9=[pm,lt,Tl,vc,Hre,Fre,eie],w4=e=>Y9.find(K9(e));function tie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||p9(e):!0}const nie=new Set(["brightness","contrast","saturate","opacity"]);function rie(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(DA)||[];if(!i)return e;const o=r.replace(i,"");let l=nie.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+o+")"}const aie=/\b([a-z-]*)\(.*?\)/gu,dC={...qc,getAnimatableNone:e=>{const t=e.match(aie);return t?t.map(rie).join(" "):e}},_4={...pm,transform:Math.round},iie={rotate:vc,rotateX:vc,rotateY:vc,rotateZ:vc,scale:P1,scaleX:P1,scaleY:P1,scaleZ:P1,skew:vc,skewX:vc,skewY:vc,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:Hv,originX:u4,originY:u4,originZ:lt},qA={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,backgroundPositionX:lt,backgroundPositionY:lt,...iie,zIndex:_4,fillOpacity:Hv,strokeOpacity:Hv,numOctaves:_4},sie={...qA,color:sa,backgroundColor:sa,outlineColor:sa,fill:sa,stroke:sa,borderColor:sa,borderTopColor:sa,borderRightColor:sa,borderBottomColor:sa,borderLeftColor:sa,filter:dC,WebkitFilter:dC},Z9=e=>sie[e];function X9(e,t){let r=Z9(e);return r!==dC&&(r=qc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const oie=new Set(["auto","none","0"]);function lie(e,t,r){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!oie.has(l)&&Gv(l).values.length&&(o=e[i]),i++}if(o&&r)for(const l of t)e[l]=X9(r,o)}class uie extends IA{constructor(t,r,i,o,l){super(t,r,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),jA(h))){const m=H9(h,r.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!G9.has(i)||t.length!==2)return;const[o,l]=t,c=w4(o),f=w4(l);if(c!==f)if(y4(c)&&y4(f))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else _h[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||tie(t[o]))&&i.push(o);i.length&&lie(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_h[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=_h[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function cie(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=r?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const Q9=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function fie(e){return h9(e)&&"offsetHeight"in e}const E4=30,die=e=>!isNaN(parseFloat(e));class hie{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=Wi.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Wi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=die(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new AA);const i=this.events[t].add(r);return t==="change"?()=>{i(),Ir.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>E4)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,E4);return m9(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fp(e,t){return new hie(e,t)}const{schedule:VA}=C9(queueMicrotask,!1),al={x:!1,y:!1};function W9(){return al.x||al.y}function pie(e){return e==="x"||e==="y"?al[e]?null:(al[e]=!0,()=>{al[e]=!1}):al.x||al.y?null:(al.x=al.y=!0,()=>{al.x=al.y=!1})}function J9(e,t){const r=cie(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[r,o,()=>i.abort()]}function x4(e){return!(e.pointerType==="touch"||W9())}function mie(e,t,r={}){const[i,o,l]=J9(e,r),c=f=>{if(!x4(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const m=y=>{x4(y)&&(h(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,o)};return i.forEach(f=>{f.addEventListener("pointerenter",c,o)}),l}const e8=(e,t)=>t?e===t?!0:e8(e,t.parentElement):!1,BA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,gie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yie(e){return gie.has(e.tagName)||e.tabIndex!==-1}const cS=new WeakSet;function T4(e){return t=>{t.key==="Enter"&&e(t)}}function nx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vie=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=T4(()=>{if(cS.has(r))return;nx(r,"down");const o=T4(()=>{nx(r,"up")}),l=()=>nx(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function C4(e){return BA(e)&&!W9()}function bie(e,t,r={}){const[i,o,l]=J9(e,r),c=f=>{const d=f.currentTarget;if(!C4(f))return;cS.add(d);const h=t(d,f),m=(w,b)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),cS.has(d)&&cS.delete(d),C4(w)&&typeof h=="function"&&h(w,{success:b})},y=w=>{m(w,d===window||d===document||r.useGlobalTarget||e8(d,w.target))},v=w=>{m(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,o),fie(f)&&(f.addEventListener("focus",h=>vie(h,o)),!yie(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function t8(e){return h9(e)&&"ownerSVGElement"in e}function Sie(e){return t8(e)&&e.tagName==="svg"}const Ei=e=>!!(e&&e.getVelocity),wie=[...Y9,sa,qc],_ie=e=>wie.find(K9(e)),n8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Eie(e=!0){const t=j.useContext(EA);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:o}=t,l=j.useId();j.useEffect(()=>{if(e)return o(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const r8=j.createContext({strict:!1}),O4={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"]},Hp={};for(const e in O4)Hp[e]={isEnabled:t=>O4[e].some(r=>!!t[r])};function xie(e){for(const t in e)Hp[t]={...Hp[t],...e[t]}}const Tie=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 GS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tie.has(e)}let a8=e=>!GS(e);function Cie(e){typeof e=="function"&&(a8=t=>t.startsWith("on")?!GS(t):e(t))}try{Cie(require("@emotion/is-prop-valid").default)}catch{}function Oie(e,t,r){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(a8(o)||r===!0&&GS(o)||!t&&!GS(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const V2=j.createContext({});function B2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Kv(e){return typeof e=="string"||Array.isArray(e)}const FA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],HA=["initial",...FA];function F2(e){return B2(e.animate)||HA.some(t=>Kv(e[t]))}function i8(e){return!!(F2(e)||e.variants)}function Aie(e,t){if(F2(e)){const{initial:r,animate:i}=e;return{initial:r===!1||Kv(r)?r:void 0,animate:Kv(i)?i:void 0}}return e.inherit!==!1?t:{}}function Rie(e){const{initial:t,animate:r}=Aie(e,j.useContext(V2));return j.useMemo(()=>({initial:t,animate:r}),[A4(t),A4(r)])}function A4(e){return Array.isArray(e)?e.join(" "):e}function R4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nv={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(lt.test(e))e=parseFloat(e);else return e;const r=R4(e,t.target.x),i=R4(e,t.target.y);return`${r}% ${i}%`}},Mie={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,o=qc.parse(e);if(o.length>5)return i;const l=qc.createTransformer(e),c=typeof o[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;o[0+c]/=f,o[1+c]/=d;const h=Hr(f,d,.5);return typeof o[2+c]=="number"&&(o[2+c]/=h),typeof o[3+c]=="number"&&(o[3+c]/=h),l(o)}},hC={borderRadius:{...nv,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nv,borderTopRightRadius:nv,borderBottomLeftRadius:nv,borderBottomRightRadius:nv,boxShadow:Mie};function s8(e,{layout:t,layoutId:r}){return gm.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!hC[e]||e==="opacity")}const jie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Die=mm.length;function Nie(e,t,r){let i="",o=!0;for(let l=0;l<Die;l++){const c=mm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(c.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||r){const h=Q9(f,qA[c]);if(!d){o=!1;const m=jie[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,o?"":i):o&&(i="none"),i}function GA(e,t,r){const{style:i,vars:o,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(gm.has(d)){c=!0;continue}else if(A9(d)){o[d]=h;continue}else{const m=Q9(h,qA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=Nie(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}const KA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o8(e,t,r){for(const i in t)!Ei(t[i])&&!s8(i,r)&&(e[i]=t[i])}function kie({transformTemplate:e},t){return j.useMemo(()=>{const r=KA();return GA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function zie(e,t){const r=e.style||{},i={};return o8(i,r,e),Object.assign(i,kie(e,t)),i}function $ie(e,t){const r={},i=zie(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const Pie={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uie={offset:"strokeDashoffset",array:"strokeDasharray"};function Iie(e,t,r=1,i=0,o=!0){e.pathLength=1;const l=o?Pie:Uie;e[l.offset]=lt.transform(-i);const c=lt.transform(t),f=lt.transform(r);e[l.array]=`${c} ${f}`}const Lie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function l8(e,{attrX:t,attrY:r,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(GA(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of Lie)y[w]!==void 0&&(v[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),r!==void 0&&(y.y=r),i!==void 0&&(y.scale=i),o!==void 0&&Iie(y,o,l,c,!1)}const u8=()=>({...KA(),attrs:{}}),c8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qie(e,t,r,i){const o=j.useMemo(()=>{const l=u8();return l8(l,t,c8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};o8(l,e.style,e),o.style={...l,...o.style}}return o}const Vie=["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 YA(e){return typeof e!="string"||e.includes("-")?!1:!!(Vie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bie(e,t,r,{latestValues:i},o,l=!1,c){const d=(c??YA(e)?qie:$ie)(t,i,o,e),h=Oie(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:y}=t,v=j.useMemo(()=>Ei(y)?y.get():y,[y]);return j.createElement(e,{...m,children:v})}function M4(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function ZA(e,t,r,i){if(typeof t=="function"){const[o,l]=M4(i);t=t(r!==void 0?r:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=M4(i);t=t(r!==void 0?r:e.custom,o,l)}return t}function fS(e){return Ei(e)?e.get():e}function Fie({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,o){return{latestValues:Hie(r,i,o,e),renderState:t()}}function Hie(e,t,r,i){const o={},l=i(e,{});for(const v in l)o[v]=fS(l[v]);let{initial:c,animate:f}=e;const d=F2(e),h=i8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const y=m?f:c;if(y&&typeof y!="boolean"&&!B2(y)){const v=Array.isArray(y)?y:[y];for(let w=0;w<v.length;w++){const b=ZA(e,v[w]);if(b){const{transitionEnd:T,transition:x,...E}=b;for(const S in E){let O=E[S];if(Array.isArray(O)){const _=m?O.length-1:0;O=O[_]}O!==null&&(o[S]=O)}for(const S in T)o[S]=T[S]}}}return o}const f8=e=>(t,r)=>{const i=j.useContext(V2),o=j.useContext(EA),l=()=>Fie(e,t,i,o);return r?l():xre(l)};function XA(e,t,r){const{style:i}=e,o={};for(const l in i)(Ei(i[l])||t.style&&Ei(t.style[l])||s8(l,e)||r?.getValue(l)?.liveStyle!==void 0)&&(o[l]=i[l]);return o}const Gie=f8({scrapeMotionValuesFromProps:XA,createRenderState:KA});function d8(e,t,r){const i=XA(e,t,r);for(const o in e)if(Ei(e[o])||Ei(t[o])){const l=mm.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}const Kie=f8({scrapeMotionValuesFromProps:d8,createRenderState:u8}),Yie=Symbol.for("motionComponentSymbol");function yp(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function j4(e,t){if(typeof e=="function")return e(t);yp(e)&&(e.current=t)}function Zie(e,t,r){const i=j.useRef(null);return j.useCallback(o=>{if(o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r)if(o){const l=j4(r,o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):j4(r,o)},[t,e,r])}const QA=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xie="framerAppearId",h8="data-"+QA(Xie),p8=j.createContext({});function Qie(e,t,r,i,o,l){const{visualElement:c}=j.useContext(V2),f=j.useContext(r8),d=j.useContext(EA),h=j.useContext(n8).reducedMotion,m=j.useRef(null);i=i||f.renderer,!m.current&&i&&(m.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:l}));const y=m.current,v=j.useContext(p8);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&Wie(m.current,r,o,v);const w=j.useRef(!1);j.useInsertionEffect(()=>{y&&w.current&&y.update(r,d)});const b=r[h8],T=j.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return Tre(()=>{y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),T.current&&y.animationState&&y.animationState.animateChanges())}),j.useEffect(()=>{y&&(!T.current&&y.animationState&&y.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),T.current=!1),y.enteringChildren=void 0)}),y}function Wie(e,t,r,i){const{layoutId:o,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:m8(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||f&&yp(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function m8(e){if(e)return e.options.allowProjection!==!1?e.projection:m8(e.parent)}function rx(e,{forwardMotionProps:t=!1,type:r}={},i,o){i&&xie(i);const l=r?r==="svg":YA(e),c=l?Kie:Gie;function f(h,m){let y;const v={...j.useContext(n8),...h,layoutId:Jie(h)},{isStatic:w}=v,b=Rie(h),T=c(h,w);if(!w&&_A){ese();const x=tse(v);y=x.MeasureLayout,b.visualElement=Qie(e,T,v,o,x.ProjectionNode,l)}return N.jsxs(V2.Provider,{value:b,children:[y&&b.visualElement?N.jsx(y,{visualElement:b.visualElement,...v}):null,Bie(e,h,Zie(T,b.visualElement,m),T,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[Yie]=e,d}function Jie({layoutId:e}){const t=j.useContext(f9).id;return t&&e!==void 0?t+"-"+e:e}function ese(e,t){j.useContext(r8).strict}function tse(e){const{drag:t,layout:r}=Hp;if(!t&&!r)return{};const i={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function nse(e,t){if(typeof Proxy>"u")return rx;const r=new Map,i=(l,c)=>rx(l,c,e,t),o=(l,c)=>i(l,c);return new Proxy(o,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,rx(c,void 0,e,t)),r.get(c))})}function g8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function rse({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ase(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function ax(e){return e===void 0||e===1}function pC({scale:e,scaleX:t,scaleY:r}){return!ax(e)||!ax(t)||!ax(r)}function ph(e){return pC(e)||y8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function y8(e){return D4(e.x)||D4(e.y)}function D4(e){return e&&e!=="0%"}function KS(e,t,r){const i=e-r,o=t*i;return r+o}function N4(e,t,r,i,o){return o!==void 0&&(e=KS(e,o,i)),KS(e,r,i)+t}function mC(e,t=0,r=1,i,o){e.min=N4(e.min,t,r,i,o),e.max=N4(e.max,t,r,i,o)}function v8(e,{x:t,y:r}){mC(e.x,t.translate,t.scale,t.originPoint),mC(e.y,r.translate,r.scale,r.originPoint)}const k4=.999999999999,z4=1.0000000000001;function ise(e,t,r,i=!1){const o=r.length;if(!o)return;t.x=t.y=1;let l,c;for(let f=0;f<o;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&bp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,v8(e,c)),i&&ph(l.latestValues)&&bp(e,l.latestValues))}t.x<z4&&t.x>k4&&(t.x=1),t.y<z4&&t.y>k4&&(t.y=1)}function vp(e,t){e.min=e.min+t,e.max=e.max+t}function $4(e,t,r,i,o=.5){const l=Hr(e.min,e.max,o);mC(e,t,r,l,i)}function bp(e,t){$4(e.x,t.x,t.scaleX,t.scale,t.originX),$4(e.y,t.y,t.scaleY,t.scale,t.originY)}function b8(e,t){return g8(ase(e.getBoundingClientRect(),t))}function sse(e,t,r){const i=b8(e,r),{scroll:o}=t;return o&&(vp(i.x,o.offset.x),vp(i.y,o.offset.y)),i}const P4=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sp=()=>({x:P4(),y:P4()}),U4=()=>({min:0,max:0}),Oa=()=>({x:U4(),y:U4()}),gC={current:null},S8={current:!1};function ose(){if(S8.current=!0,!!_A)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gC.current=e.matches;e.addEventListener("change",t),t()}else gC.current=!1}const lse=new WeakMap;function use(e,t,r){for(const i in t){const o=t[i],l=r[i];if(Ei(o))e.addValue(i,o);else if(Ei(l))e.addValue(i,Fp(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(i);e.addValue(i,Fp(c!==void 0?c:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const I4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=IA,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 v=Wi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Ir.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=F2(r),this.isVariantNode=i8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in y){const w=y[v];d[v]!==void 0&&Ei(w)&&w.set(d[v])}}mount(t){this.current=t,lse.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((r,i)=>this.bindToMotionValue(i,r)),S8.current||ose(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gC.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Lc(this.notifyUpdate),Lc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=gm.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ir.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),r.owner&&r.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 Hp){const r=Hp[t];if(!r)continue;const{isEnabled:i,Feature:o}=r;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<I4.length;i++){const o=I4[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,c=t[l];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=use(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=Fp(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(d9(i)||p9(i))?i=parseFloat(i):!_ie(i)&&qc.test(r)&&(i=X9(t,r)),this.setBaseTarget(t,Ei(i)?i.get():i)),Ei(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=ZA(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Ei(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new AA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){VA.render(this.render)}}class w8 extends cse{constructor(){super(...arguments),this.KeyframeResolver=uie}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ei(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function _8(e,{style:t,vars:r},i,o){const l=e.style;let c;for(c in t)l[c]=t[c];o?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function fse(e){return window.getComputedStyle(e)}class dse extends w8{constructor(){super(...arguments),this.type="html",this.renderInstance=_8}readValueFromInstance(t,r){if(gm.has(r))return this.projection?.isProjecting?sC(r):Aae(t,r);{const i=fse(t),o=(A9(r)?i.getPropertyValue(r):i[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return b8(t,r)}build(t,r,i){GA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return XA(t,r,i)}}const E8=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"]);function hse(e,t,r,i){_8(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(E8.has(o)?o:QA(o),t.attrs[o])}class pse extends w8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oa}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(gm.has(r)){const i=Z9(r);return i&&i.default||0}return r=E8.has(r)?r:QA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return d8(t,r,i)}build(t,r,i){l8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,o){hse(t,r,i,o)}mount(t){this.isSVGTag=c8(t.tagName),super.mount(t)}}const mse=(e,t)=>t.isSVG??YA(e)?new pse(t):new dse(t,{allowProjection:e!==j.Fragment});function Cp(e,t,r){const i=e.getProps();return ZA(i,t,r!==void 0?r:i.custom,e)}const yC=e=>Array.isArray(e);function gse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Fp(r))}function yse(e){return yC(e)?e[e.length-1]||0:e}function vse(e,t){const r=Cp(e,t);let{transitionEnd:i={},transition:o={},...l}=r||{};l={...l,...i};for(const c in l){const f=yse(l[c]);gse(e,c,f)}}function bse(e){return!!(Ei(e)&&e.add)}function vC(e,t){const r=e.getValue("willChange");if(bse(r))return r.add(t);if(!r&&ac.WillChange){const i=new ac.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function x8(e){return e.props[h8]}const Sse=e=>e!==null;function wse(e,{repeat:t,repeatType:r="loop"},i){const o=e.filter(Sse),l=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[l]}const _se={type:"spring",stiffness:500,damping:25,restSpeed:10},Ese=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xse={type:"keyframes",duration:.8},Tse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cse=(e,{keyframes:t})=>t.length>2?xse:gm.has(e)?e.startsWith("scale")?Ese(t[1]):_se:Tse;function Ose({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const WA=(e,t,r,i={},o,l)=>c=>{const f=LA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-xl(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:o};Ose(f)||Object.assign(m,Cse(e,m)),m.duration&&(m.duration=xl(m.duration)),m.repeatDelay&&(m.repeatDelay=xl(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(fC(m),m.delay===0&&(y=!0)),(ac.instantAnimations||ac.skipAnimations)&&(y=!0,fC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=wse(m.keyframes,f);if(v!==void 0){Ir.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new UA(m):new Qae(m)};function Ase({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function T8(e,t,{delay:r=0,transitionOverride:i,type:o}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:c,...f}=t;i&&(l=i);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const m in f){const y=e.getValue(m,e.latestValues[m]??null),v=f[m];if(v===void 0||h&&Ase(h,m))continue;const w={delay:r,...LA(l||{},m)},b=y.get();if(b!==void 0&&!y.isAnimating&&!Array.isArray(v)&&v===b&&!w.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const E=x8(e);if(E){const S=window.MotionHandoffAnimation(E,m,Ir);S!==null&&(w.startTime=S,T=!0)}}vC(e,m),y.start(WA(m,y,v,e.shouldReduceMotion&&G9.has(m)?{type:!1}:w,e,T));const x=y.animation;x&&d.push(x)}return c&&Promise.all(d).then(()=>{Ir.update(()=>{c&&vse(e,c)})}),d}function C8(e,t,r,i=0,o=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):o===1?l*i:f-l*i}function bC(e,t,r={}){const i=Cp(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);const l=i?()=>Promise.all(T8(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:y}=o;return Rse(e,t,d,h,m,y,r)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function Rse(e,t,r=0,i=0,o=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(bC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+C8(e.variantChildren,d,i,o,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function Mse(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(l=>bC(e,l,r));i=Promise.all(o)}else if(typeof t=="string")i=bC(e,t,r);else{const o=typeof t=="function"?Cp(e,t,r.custom):t;i=Promise.all(T8(e,o,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}function O8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const jse=HA.length;function A8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?A8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<jse;r++){const i=HA[r],o=e.props[i];(Kv(o)||o===!1)&&(t[i]=o)}return t}const Dse=[...FA].reverse(),Nse=FA.length;function kse(e){return t=>Promise.all(t.map(({animation:r,options:i})=>Mse(e,r,i)))}function zse(e){let t=kse(e),r=L4(),i=!0;const o=d=>(h,m)=>{const y=Cp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:w,...b}=y;h={...h,...b,...w}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=A8(e.parent)||{},y=[],v=new Set;let w={},b=1/0;for(let x=0;x<Nse;x++){const E=Dse[x],S=r[E],O=h[E]!==void 0?h[E]:m[E],_=Kv(O),A=E===d?S.isActive:null;A===!1&&(b=x);let C=O===m[E]&&O!==h[E]&&_;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),S.protectedKeys={...w},!S.isActive&&A===null||!O&&!S.prevProp||B2(O)||typeof O=="boolean")continue;const M=$se(S.prevProp,O);let D=M||E===d&&S.isActive&&!C&&_||x>b&&_,$=!1;const q=Array.isArray(O)?O:[O];let V=q.reduce(o(E),{});A===!1&&(V={});const{prevResolvedValues:Y={}}=S,Q={...Y,...V},ie=G=>{D=!0,v.has(G)&&($=!0,v.delete(G)),S.needsAnimating[G]=!0;const J=e.getValue(G);J&&(J.liveStyle=!1)};for(const G in Q){const J=V[G],fe=Y[G];if(w.hasOwnProperty(G))continue;let le=!1;yC(J)&&yC(fe)?le=!O8(J,fe):le=J!==fe,le?J!=null?ie(G):v.add(G):J!==void 0&&v.has(G)?ie(G):S.protectedKeys[G]=!0}S.prevProp=O,S.prevResolvedValues=V,S.isActive&&(w={...w,...V}),i&&e.blockInitialAnimation&&(D=!1);const se=C&&M;D&&(!se||$)&&y.push(...q.map(G=>{const J={type:E};if(typeof G=="string"&&i&&!se&&e.manuallyAnimateOnMount&&e.parent){const{parent:fe}=e,le=Cp(fe,G);if(fe.enteringChildren&&le){const{delayChildren:z}=le.transition||{};J.delay=C8(fe.enteringChildren,e,z)}}return{animation:G,options:J}}))}if(v.size){const x={};if(typeof h.initial!="boolean"){const E=Cp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);E&&E.transition&&(x.transition=E.transition)}v.forEach(E=>{const S=e.getBaseTarget(E),O=e.getValue(E);O&&(O.liveStyle=!0),x[E]=S??null}),y.push({animation:x})}let T=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(y):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const y in r)r[y].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=L4()}}}function $se(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!O8(t,e):!1}function ch(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function L4(){return{animate:ch(!0),whileInView:ch(),whileHover:ch(),whileTap:ch(),whileDrag:ch(),whileFocus:ch(),exit:ch()}}class Wc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Pse extends Wc{constructor(t){super(t),t.animationState||(t.animationState=zse(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();B2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Use=0;class Ise extends Wc{constructor(){super(...arguments),this.id=Use++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Lse={animation:{Feature:Pse},exit:{Feature:Ise}};function Yv(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}function Ab(e){return{point:{x:e.pageX,y:e.pageY}}}const qse=e=>t=>BA(t)&&e(t,Ab(t));function Ev(e,t,r,i){return Yv(e,t,qse(r),i)}const R8=1e-4,Vse=1-R8,Bse=1+R8,M8=.01,Fse=0-M8,Hse=0+M8;function Qi(e){return e.max-e.min}function Gse(e,t,r){return Math.abs(e-t)<=r}function q4(e,t,r,i=.5){e.origin=i,e.originPoint=Hr(t.min,t.max,e.origin),e.scale=Qi(r)/Qi(t),e.translate=Hr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Vse&&e.scale<=Bse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fse&&e.translate<=Hse||isNaN(e.translate))&&(e.translate=0)}function xv(e,t,r,i){q4(e.x,t.x,r.x,i?i.originX:void 0),q4(e.y,t.y,r.y,i?i.originY:void 0)}function V4(e,t,r){e.min=r.min+t.min,e.max=e.min+Qi(t)}function Kse(e,t,r){V4(e.x,t.x,r.x),V4(e.y,t.y,r.y)}function B4(e,t,r){e.min=t.min-r.min,e.max=e.min+Qi(t)}function YS(e,t,r){B4(e.x,t.x,r.x),B4(e.y,t.y,r.y)}function Qs(e){return[e("x"),e("y")]}const j8=({current:e})=>e?e.ownerDocument.defaultView:null,F4=(e,t)=>Math.abs(e-t);function Yse(e,t){const r=F4(e.x,t.x),i=F4(e.y,t.y);return Math.sqrt(r**2+i**2)}class D8{constructor(t,r,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=sx(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=Yse(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:T}=v,{timestamp:x}=oi;this.history.push({...T,timestamp:x});const{onStart:E,onMove:S}=this.handlers;w||(E&&E(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=ix(w,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:T,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=sx(v.type==="pointercancel"?this.lastMoveEventInfo:ix(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,E),T&&T(v,E)},!BA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=o||window;const f=Ab(t),d=ix(f,this.transformPagePoint),{point:h}=d,{timestamp:m}=oi;this.history=[{...h,timestamp:m}];const{onSessionStart:y}=r;y&&y(t,sx(d,this.history)),this.removeListeners=Tb(Ev(this.contextWindow,"pointermove",this.handlePointerMove),Ev(this.contextWindow,"pointerup",this.handlePointerUp),Ev(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lc(this.updatePoint)}}function ix(e,t){return t?{point:t(e.point)}:e}function H4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sx({point:e},t){return{point:e,delta:H4(e,N8(t)),offset:H4(e,Zse(t)),velocity:Xse(t,.1)}}function Zse(e){return e[0]}function N8(e){return e[e.length-1]}function Xse(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const o=N8(e);for(;r>=0&&(i=e[r],!(o.timestamp-i.timestamp>xl(t)));)r--;if(!i)return{x:0,y:0};const l=to(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Qse(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Hr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Hr(r,e,i.max):Math.min(e,r)),e}function G4(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Wse(e,{top:t,left:r,bottom:i,right:o}){return{x:G4(e.x,r,o),y:G4(e.y,t,i)}}function K4(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function Jse(e,t){return{x:K4(e.x,t.x),y:K4(e.y,t.y)}}function eoe(e,t){let r=.5;const i=Qi(e),o=Qi(t);return o>i?r=Fv(t.min,t.max-i,e.min):i>o&&(r=Fv(e.min,e.max-o,t.min)),rc(0,1,r)}function toe(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const SC=.35;function noe(e=SC){return e===!1?e=0:e===!0&&(e=SC),{x:Y4(e,"left","right"),y:Y4(e,"top","bottom")}}function Y4(e,t,r){return{min:Z4(e,t),max:Z4(e,r)}}function Z4(e,t){return typeof e=="number"?e:e[t]||0}const roe=new WeakMap;class aoe{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=Oa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Ab(y).point)},c=(y,v)=>{const{drag:w,dragPropagation:b,onDragStart:T}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pie(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(E=>{let S=this.getAxisMotionValue(E).get()||0;if(Tl.test(S)){const{projection:O}=this.visualElement;if(O&&O.layout){const _=O.layout.layoutBox[E];_&&(S=Qi(_)*(parseFloat(S)/100))}}this.originPoint[E]=S}),T&&Ir.postRender(()=>T(y,v)),vC(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:T,onDrag:x}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:E}=v;if(b&&this.currentDirection===null){this.currentDirection=ioe(E),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),x&&x(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qs(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new D8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:j8(this.visualElement)})}stop(t,r){const i=t||this.latestPointerEvent,o=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&Ir.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,i){const{drag:o}=this.getProps();if(!i||!U1(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Qse(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Wse(i.layoutBox,t):this.constraints=!1,this.elastic=noe(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qs(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=toe(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!yp(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=sse(i,o.root,this.visualElement.getTransformPagePoint());let c=Jse(o.layout.layoutBox,l);if(r){const f=r(rse(c));this.hasMutatedConstraints=!!f,f&&(c=g8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qs(m=>{if(!U1(m,r,this.currentDirection))return;let y=d&&d[m]||{};c&&(y={min:0,max:0});const v=o?200:1e6,w=o?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return vC(this.visualElement,t),i.start(WA(t,i,0,r,this.visualElement,!1))}stopAnimation(){Qs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[r];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Qs(r=>{const{drag:i}=this.getProps();if(!U1(r,i,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(r);if(o&&o.layout){const{min:c,max:f}=o.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Hr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qs(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();o[c]=eoe({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qs(c=>{if(!U1(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Hr(d,h,o[c]))})}addListeners(){if(!this.visualElement.current)return;roe.set(this.visualElement,this);const t=this.visualElement.current,r=Ev(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();yp(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ir.read(i);const c=Yv(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qs(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=SC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function U1(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function ioe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class soe extends Wc{constructor(t){super(t),this.removeGroupControls=ao,this.removeListeners=ao,this.controls=new aoe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ao}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const X4=e=>(t,r)=>{e&&Ir.postRender(()=>e(t,r))};class ooe extends Wc{constructor(){super(...arguments),this.removePointerDownListener=ao}onPointerDown(t){this.session=new D8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:j8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:X4(t),onStart:X4(r),onMove:i,onEnd:(l,c)=>{delete this.session,o&&Ir.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=Ev(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const dS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ox=!1;class loe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&o&&i.register(l),ox&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),dS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:o,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,ox=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Ir.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),VA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:o}=t;ox=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function k8(e){const[t,r]=Eie(),i=j.useContext(f9);return N.jsx(loe,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(p8),isPresent:t,safeToRemove:r})}function uoe(e,t,r){const i=Ei(e)?e:Fp(e);return i.start(WA("",i,t,r)),i.animation}const coe=(e,t)=>e.depth-t.depth;class foe{constructor(){this.children=[],this.isDirty=!1}add(t){xA(this.children,t),this.isDirty=!0}remove(t){TA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(coe),this.isDirty=!1,this.children.forEach(t)}}function doe(e,t){const r=Wi.now(),i=({timestamp:o})=>{const l=o-r;l>=t&&(Lc(i),e(l-t))};return Ir.setup(i,!0),()=>Lc(i)}const z8=["TopLeft","TopRight","BottomLeft","BottomRight"],hoe=z8.length,Q4=e=>typeof e=="string"?parseFloat(e):e,W4=e=>typeof e=="number"||lt.test(e);function poe(e,t,r,i,o,l){o?(e.opacity=Hr(0,r.opacity??1,moe(i)),e.opacityExit=Hr(t.opacity??1,0,goe(i))):l&&(e.opacity=Hr(t.opacity??1,r.opacity??1,i));for(let c=0;c<hoe;c++){const f=`border${z8[c]}Radius`;let d=J4(t,f),h=J4(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||W4(d)===W4(h)?(e[f]=Math.max(Hr(Q4(d),Q4(h),i),0),(Tl.test(h)||Tl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Hr(t.rotate||0,r.rotate||0,i))}function J4(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const moe=$8(0,.5,_9),goe=$8(.5,.95,ao);function $8(e,t,r){return i=>i<e?0:i>t?1:r(Fv(e,t,i))}function ej(e,t){e.min=t.min,e.max=t.max}function nl(e,t){ej(e.x,t.x),ej(e.y,t.y)}function tj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nj(e,t,r,i,o){return e-=t,e=KS(e,1/r,i),o!==void 0&&(e=KS(e,1/o,i)),e}function yoe(e,t=0,r=1,i=.5,o,l=e,c=e){if(Tl.test(t)&&(t=parseFloat(t),t=Hr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Hr(l.min,l.max,i);e===l&&(f-=t),e.min=nj(e.min,t,r,f,o),e.max=nj(e.max,t,r,f,o)}function rj(e,t,[r,i,o],l,c){yoe(e,t[r],t[i],t[o],t.scale,l,c)}const voe=["x","scaleX","originX"],boe=["y","scaleY","originY"];function aj(e,t,r,i){rj(e.x,t,voe,r?r.x:void 0,i?i.x:void 0),rj(e.y,t,boe,r?r.y:void 0,i?i.y:void 0)}function ij(e){return e.translate===0&&e.scale===1}function P8(e){return ij(e.x)&&ij(e.y)}function sj(e,t){return e.min===t.min&&e.max===t.max}function Soe(e,t){return sj(e.x,t.x)&&sj(e.y,t.y)}function oj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function U8(e,t){return oj(e.x,t.x)&&oj(e.y,t.y)}function lj(e){return Qi(e.x)/Qi(e.y)}function uj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class woe{constructor(){this.members=[]}add(t){xA(this.members,t),t.scheduleRender()}remove(t){if(TA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let i;for(let o=r;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _oe(e,t,r){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((o||l||c)&&(i=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:y,rotateY:v,skewX:w,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),w&&(i+=`skewX(${w}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const lx=["","X","Y","Z"],Eoe=1e3;let xoe=0;function ux(e,t,r,i){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function I8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=x8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ir,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&I8(i)}function L8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(c={},f=t?.()){this.id=xoe++,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(Ooe),this.nodes.forEach(joe),this.nodes.forEach(Doe),this.nodes.forEach(Aoe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new foe)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new AA),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=t8(c)&&!Sie(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,y=0;const v=()=>this.root.updateBlockedByResize=!1;Ir.read(()=>{y=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=doe(v,250),dS.hasAnimatedSinceResize&&(dS.hasAnimatedSinceResize=!1,this.nodes.forEach(dj)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Poe,{onLayoutAnimationStart:T,onLayoutAnimationComplete:x}=h.getProps(),E=!this.targetLayout||!U8(this.targetLayout,w),S=!y&&v;if(this.options.layoutRoot||this.resumeFrom||S||y&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...LA(b,"layout"),onPlay:T,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(m,S)}else y||dj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Lc(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(Noe),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&I8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(cj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Moe),this.nodes.forEach(Toe),this.nodes.forEach(Coe)):this.nodes.forEach(fj),this.clearAllSnapshots();const f=Wi.now();oi.delta=rc(0,1e3/60,f-oi.timestamp),oi.timestamp=f,oi.isProcessing=!0,QE.update.process(oi),QE.preRender.process(oi),QE.render.process(oi),oi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,VA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Roe),this.sharedNodes.forEach(koe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ir.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ir.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qi(this.snapshot.measuredBox.x)&&!Qi(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Oa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!P8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||ph(this.latestValues)||m)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),Uoe(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Oa();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ioe))){const{scroll:h}=this.root;h&&(vp(f.x,h.offset.x),vp(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Oa();if(nl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:y}=h;h!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&nl(f,c),vp(f.x,m.offset.x),vp(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Oa();nl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&bp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),ph(m.latestValues)&&bp(d,m.latestValues)}return ph(this.latestValues)&&bp(d,this.latestValues),d}removeTransform(c){const f=Oa();nl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!ph(h.latestValues))continue;pC(h.latestValues)&&h.updateSnapshot();const m=Oa(),y=h.measurePageBox();nl(m,y),aj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return ph(this.latestValues)&&aj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==oi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=oi.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Oa(),this.targetWithTransforms=Oa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nl(this.target,this.layout.layoutBox),v8(this.target,this.targetDelta)):nl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pC(this.parent.latestValues)||y8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oa(),this.relativeTargetOrigin=Oa(),YS(this.relativeTargetOrigin,f,d),nl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===oi.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;nl(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;ise(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Oa());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tj(this.prevProjectionDelta.x,this.projectionDelta.x),tj(this.prevProjectionDelta.y,this.projectionDelta.y)),xv(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!uj(this.projectionDelta.x,this.prevProjectionDelta.x)||!uj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sp(),this.projectionDelta=Sp(),this.projectionDeltaWithTransform=Sp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},y=Sp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Oa(),w=d?d.source:void 0,b=this.layout?this.layout.source:void 0,T=w!==b,x=this.getStack(),E=!x||x.members.length<=1,S=!!(T&&!E&&this.options.crossfade===!0&&!this.path.some($oe));this.animationProgress=0;let O;this.mixTargetDelta=_=>{const A=_/1e3;hj(y.x,c.x,A),hj(y.y,c.y,A),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(YS(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zoe(this.relativeTarget,this.relativeTargetOrigin,v,A),O&&Soe(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Oa()),nl(O,this.relativeTarget)),T&&(this.animationValues=m,poe(m,h,this.latestValues,A,S,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Lc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update(()=>{dS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Fp(0)),this.currentAnimation=uoe(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Eoe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&q8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Oa();const y=Qi(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+y;const v=Qi(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}nl(f,d),bp(f,m),xv(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new woe),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&ux("z",c,h,this.animationValues);for(let m=0;m<lx.length;m++)ux(`rotate${lx[m]}`,c,h,this.animationValues),ux(`skew${lx[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=fS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=fS(f?.pointerEvents)||""),this.hasProjected&&!ph(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=_oe(this.projectionDeltaWithTransform,this.treeScale,m);d&&(y=d(m,y)),c.transform=y;const{x:v,y:w}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in hC){if(m[b]===void 0)continue;const{correct:T,applyTo:x,isCSSVariable:E}=hC[b],S=y==="none"?m[b]:T(m[b],h);if(x){const O=x.length;for(let _=0;_<O;_++)c[x[_]]=S}else E?this.options.visualElement.renderState.vars[b]=S:c[b]=S}this.options.layoutId&&(c.pointerEvents=h===this?fS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(cj),this.root.sharedNodes.clear()}}}function Toe(e){e.updateLayout()}function Coe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(y);y.min=r[m].min,y.max=y.min+v}):q8(o,t.layoutBox,r)&&Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(r[m]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=Sp();xv(c,r,t.layoutBox);const f=Sp();l?xv(f,e.applyTransform(i,!0),t.measuredBox):xv(f,r,t.layoutBox);const d=!P8(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:v}=m;if(y&&v){const w=Oa();YS(w,t.layoutBox,y.layoutBox);const b=Oa();YS(b,r,v.layoutBox),U8(w,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Ooe(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 Aoe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Roe(e){e.clearSnapshot()}function cj(e){e.clearMeasurements()}function fj(e){e.isLayoutDirty=!1}function Moe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function joe(e){e.resolveTargetDelta()}function Doe(e){e.calcProjection()}function Noe(e){e.resetSkewAndRotation()}function koe(e){e.removeLeadSnapshot()}function hj(e,t,r){e.translate=Hr(t.translate,0,r),e.scale=Hr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function pj(e,t,r,i){e.min=Hr(t.min,r.min,i),e.max=Hr(t.max,r.max,i)}function zoe(e,t,r,i){pj(e.x,t.x,r.x,i),pj(e.y,t.y,r.y,i)}function $oe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Poe={duration:.45,ease:[.4,0,.1,1]},mj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gj=mj("applewebkit/")&&!mj("chrome/")?Math.round:ao;function yj(e){e.min=gj(e.min),e.max=gj(e.max)}function Uoe(e){yj(e.x),yj(e.y)}function q8(e,t,r){return e==="position"||e==="preserve-aspect"&&!Gse(lj(t),lj(r),.2)}function Ioe(e){return e!==e.root&&e.scroll?.wasRoot}const Loe=L8({attachResizeListener:(e,t)=>Yv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cx={current:void 0},V8=L8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cx.current){const e=new Loe({});e.mount(window),e.setOptions({layoutScroll:!0}),cx.current=e}return cx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qoe={pan:{Feature:ooe},drag:{Feature:soe,ProjectionNode:V8,MeasureLayout:k8}};function vj(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,l=i[o];l&&Ir.postRender(()=>l(t,Ab(t)))}class Voe extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=mie(t,(r,i)=>(vj(this.node,i,"Start"),o=>vj(this.node,o,"End"))))}unmount(){}}class Boe extends Wc{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=Tb(Yv(this.node.current,"focus",()=>this.onFocus()),Yv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bj(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),l=i[o];l&&Ir.postRender(()=>l(t,Ab(t)))}class Foe extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=bie(t,(r,i)=>(bj(this.node,i,"Start"),(o,{success:l})=>bj(this.node,o,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wC=new WeakMap,fx=new WeakMap,Hoe=e=>{const t=wC.get(e.target);t&&t(e)},Goe=e=>{e.forEach(Hoe)};function Koe({root:e,...t}){const r=e||document;fx.has(r)||fx.set(r,{});const i=fx.get(r),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Goe,{root:e,...t})),i[o]}function Yoe(e,t,r){const i=Koe(t);return wC.set(e,r),i.observe(e),()=>{wC.delete(e),i.unobserve(e)}}const Zoe={some:0,all:1};class Xoe extends Wc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:Zoe[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(d)};return Yoe(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Qoe(t,r))&&this.startObserver()}unmount(){}}function Qoe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Woe={inView:{Feature:Xoe},tap:{Feature:Foe},focus:{Feature:Boe},hover:{Feature:Voe}},Joe={layout:{ProjectionNode:V8,MeasureLayout:k8}},ele={...Lse,...Woe,...qoe,...Joe},Sj=nse(ele,mse),B8=ks.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return N.jsx("div",{className:Qn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:N.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("title",{children:"Background Beams"}),N.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>N.jsx(Sj.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),N.jsxs("defs",{children:[t.map((r,i)=>N.jsxs(Sj.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[N.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),N.jsx("stop",{stopColor:"#111111"}),N.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),N.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),N.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[N.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});B8.displayName="BackgroundBeams";const tle=()=>N.jsxs(N.Fragment,{children:[N.jsx(B8,{className:"absolute inset-0"}),N.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:N.jsxs("div",{className:"text-center",children:[N.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),N.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Rn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function nle(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Rn(e.additionalItems)}function wj(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const tc="__additional_property",ZS="additionalProperties",Vc="allOf",jn="anyOf",oo="const",H2="default",JA="dependencies",rle="enum",ci="__errors",nr="$id",ale="if",Gp="items",ile="_$junk_option_schema_id$_",hS="$name",mn="oneOf",_C="patternProperties",Pn="properties",dx="readonly",F8="required",XS="submitButtonOptions",Ar="$ref",hv="$schema",H8="root",G8="_",sle=["discriminator","propertyName"],_j="formContext",ole="layoutGridLookupMap",eR="__rjsf_additionalProperties",K8="__rjsf_rootSchema",lle="ui:field",tR="ui:widget",Ac="ui:options",EC="ui:globalOptions",ule="https://json-schema.org/draft/2019-09/schema",pS="https://json-schema.org/draft/2020-12/schema";function At(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const o=e[i];return i===tR&&Rn(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Ac&&Rn(o)?{...r,...o}:{...r,[i.substring(3)]:o}},{...t}):{...t}}function Y8(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=At(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function xC(e){const t={[ci]:[],addError(r){this[ci].push(r)}};if(Array.isArray(e))return e.reduce((r,i,o)=>({...r,[o]:xC(i)}),t);if(zc(e)){const r=e;return Object.keys(r).reduce((i,o)=>({...i,[o]:xC(r[o])}),t)}return t}function pr(e,t){return yG(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const cle=Object.prototype;function pv(e){for(const t in e)if(cle.hasOwnProperty.call(e,t))return!1;return!0}const fle=["array","boolean","integer","null","number","object","string"];new Set(fle);const dle=["$defs","definitions","properties","patternProperties","dependencies"];new Set(dle);const hle=["items","allOf","oneOf","anyOf"];new Set(hle);const ple=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(ple);function mS(e){return typeof e=="object"}function gl(e){return mS(e)?pv(e):e===!0}function wp(e,t){return e<t?-1:e>t?1:0}function hx(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const o=new Set(e);for(let l=0;l<i;l++)o.add(t[l]);return Array.from(o)}function mle(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const o=e;e=t,t=o}const i=new Set(t);for(let o=0;o<e.length&&i.size>0;o++){const l=e[o];i.delete(l)&&r.push(l)}return r}function Ej(e){return e.length===0}function px(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let o=0;o<t.length;o++)if(t[o]!==r[o]){const l=e(t[o],r[o]);if(l!==0)return l}return 0}}function Z8(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const o=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(o[l],o[c])!==0&&++l!==c&&(o[l]=o[c]);return o.length=l+1,o}}function gle(e){return(t,r)=>{const i=[];let o=t.length,l=r.length;if(o===0||l===0)return i;if(o>l){const m=t;t=r,r=m;const y=o;o=l,l=y}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<o&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function yle(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const xj=yle,X8=()=>0,vle=e=>e===void 0,ble=e=>typeof e!="object",Tj={boolean:0,number:1,string:2};function Sle(e,t){const r=typeof e,i=typeof t;return r===i?wp(e,t):Tj[r]-Tj[i]}function wle(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const o=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];o.has(f)||e.push(f)}return e}function G2(e,t,r=X8){return(i,o)=>e(i)?e(o)?r(i,o):-1:e(o)?1:t(i,o)}function lp(e){return G2(vle,e)}function bc(e,t){return G2(r=>r===void 0||e(r),t)}function mx(e,t){return G2(Array.isArray,e,t)}const ia=lp(wp),gx=bc(e=>e===0,(e,t)=>e-t);function _le({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=xj(t,T=>Object.keys(T).sort());function i(T){return(x,E)=>{const S=r(x),O=r(E),_=Math.min(S.length,O.length);for(let A=0;A<_;A++){const C=wp(S[A],O[A]);if(C!==0)return C}if(S.length!==O.length)return S.length-O.length;for(let A=0;A<_;A++){const C=S[A],M=T(x[C],E[C]);if(M!==0)return M}return 0}}function o(T){const x=px(T),E=xj(e,Z8(T,{threshold:0}));return(S,O)=>x(E(S),E(O))}const l=o(wp);function c(T,x){if(mS(T)){if(mS(x)){const E=Object.keys(T),S=Object.keys(x),O=wle(E,S),_=O.length;for(let A=0;A<_;A++){const C=O[A];if(T[C]===x[C])continue;const D=(b[C]??f)(T[C],x[C]);if(D!==0)return D}return 0}return x===!0&&pv(T)?0:1}return mS(x)?T===!0&&pv(x)?0:-1:wp(T,x)}const f=lp(h),d=G2(ble,mx(i(f),px(h)),Sle);function h(T,x){return T===null?-1:x===null?1:d(T,x)}const m=lp(c),y=bc(pv,i(m)),v=lp(o(c)),w=bc(gl,c),b={$id:ia,$comment:ia,$defs:y,$ref:ia,$schema:ia,const:f,contains:m,contentEncoding:ia,contentMediaType:ia,default:f,definitions:y,description:ia,else:m,examples:f,exclusiveMaximum:ia,exclusiveMinimum:ia,format:ia,if:m,maximum:ia,maxItems:ia,maxLength:ia,maxProperties:ia,minimum:ia,multipleOf:ia,not:m,pattern:ia,propertyNames:m,readOnly:ia,then:m,title:ia,writeOnly:ia,uniqueItems:bc(T=>T===!1,X8),minLength:gx,minItems:gx,minProperties:gx,required:bc(Ej,l),enum:bc(Ej,o(h)),type:lp((T,x)=>{const E=Array.isArray(T),S=Array.isArray(x);return!E&&!S?wp(T,x):l(E?T:[T],S?x:[x])}),items:bc(T=>!Array.isArray(T)&&gl(T),mx(c,px(c))),anyOf:v,allOf:v,oneOf:v,properties:y,patternProperties:y,additionalProperties:w,additionalItems:w,dependencies:bc(pv,i(lp(mx(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function Cj(e){return e}const Q8=(e,t)=>e?Q8(t%e,e):t,Ele=(e,t)=>Math.abs(e*t)/Q8(e,t);function xle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*yx(e,t,r){const i=e.length,o=t.length;if(i>0&&o>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<o;f++)yield r(c,t[f])}}function vx(e,t){return e||t}function Oj(e){return(t,r)=>{const i={...t},o=Object.keys(r),l=o.length;for(let c=0;c<l;c++){const f=o[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function Tle(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function fh(e,t,r){r===void 0||gl(r)?delete e[t]:e[t]=r}const Cle=["properties","patternProperties","additionalProperties"];function Aj(e){const t=Object.keys(e),r=t.length,i=[];for(let o=0;o<r;o++){const l=t[o];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Rj=[[],[]];function Mj(e,t,r){const i=r.length;for(let o=0;o<i;o++){const l=r[o];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const Ole=["items","additionalItems"],Ale=["if","then","else"];function jj(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function bx(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function dh(e,t,r){return[e,t,r]}function Rle(e){const t=new Map;for(const[r,i,o]of e){const l=c=>{if(!o(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const Mle=[dh("minimum","maximum",e=>e.maximum>=e.minimum),dh("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),dh("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),dh("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),dh("minLength","maxLength",e=>e.maxLength>=e.minLength),dh("minItems","maxItems",e=>e.maxItems>=e.minItems),dh("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function jle({mergePatterns:e=xle,isSubRegExp:t=Object.is,intersectJson:r=mle,deduplicateJsonSchemaDef:i=Cj,defaultMerger:o=Cj,assigners:l=[],checks:c=Mle,mergers:f}={}){function d(_){const A=_.length;let C=_[0];for(let M=1;M<A;M++){const D=E(C,_[M]);if(D===!1)return!1;gl(D)||(C=D)}return C}function h(_,A,C,M,D,$,q){if(_.length=0,C===!1)return!1;if(_.push(C),D!==void 0){if(D===!1)return!1;_.push(D)}if(Mj(_,A,$))return!1;const Y=_.length<2;if(q===!1){if(Y)return;if(Mj(_,A,M))return!1}else Y&&q!==void 0&&_.push(q);return _.length===1?_[0]:d(_)}function m(_,A,C,M,D,$){const q=C.length;if(q>0&&D!==!1)if($)Object.assign(_,A);else for(let V=0;V<q;V++){const Y=C[V];M.has(Y)||(_[Y]=E(A[Y],D))}return _}const y=(_,{properties:A={},patternProperties:C,additionalProperties:M=!0},{properties:D={},patternProperties:$,additionalProperties:q=!0})=>{const V=gl(M),Y=gl(q);if(V&&Y)return fh(_,"properties",S(A,D)),fh(_,"patternProperties",C&&$?S(C,$):C??$),delete _.additionalProperties,_;const Q=E(M,q);fh(_,"additionalProperties",Q);const ie={},se=Object.keys(A),K=se.length,[G,J]=C?Aj(C):Rj,[fe,le]=$?Aj($):Rj,z=[],U=new Set,I=Y?void 0:q;for(let we=0;we<K;we++){const De=se[we];U.add(De);const te=h(z,De,A[De],G,D[De],fe,I);te!==void 0&&(ie[De]=te)}const P=Object.keys(D),F=P.length,re=V?void 0:M;for(let we=0;we<F;we++){const De=P[we];if(U.has(De))continue;const te=h(z,De,D[De],fe,void 0,G,re);te!==void 0&&(ie[De]=te)}fh(_,"properties",ie);let ue={};const ge=new Set;if(J.length>0&&le.length>0){const we=yx(J,le,(De,te)=>{t(De,te)&&ge.add(De),t(te,De)&&ge.add(te),ue[e(De,te)]=E(C[De],$[te])});for(;!we.next().done;);}return ue=m(ue,C,J,ge,q,Y),ue=m(ue,$,le,ge,M,V),fh(_,"patternProperties",ue),_},v=(_,{items:A=[],additionalItems:C},{items:M=[],additionalItems:D})=>{const $=Array.isArray(A),q=Array.isArray(M),V=[];if(_.items=V,$&&q){const[Y,Q,ie]=A.length<M.length?[A.length,C,M]:[M.length,D,A];let se=0;for(;se<Y;se++)V.push(E(A[se],M[se]));if(Q===!1)_.additionalItems=!1;else{const K=Q===void 0||gl(Q);for(;se<ie.length;se++)V.push(K?ie[se]:E(ie[se],Q));fh(_,"additionalItems",C!==void 0&&D!==void 0?E(C,D):C??D)}}else if($||q){const[Y,Q,ie]=$?[A,M,C]:[M,A,D];fh(_,"additionalItems",ie&&E(ie,Q));for(let se=0;se<Y.length;se++)V.push(E(Y[se],Q))}else delete _.additionalItems,_.items=E(A,M);return _},w=(_,A,C)=>{jj(_,A);const M=jj({},C);return _.allOf===void 0?_.allOf=[M]:_.allOf=_.allOf.concat(M),_};function b(_,A){return i(Array.from(yx(_,A,E)))}const T=Tle([[Cle,y],[Ole,v],[Ale,w],...l]),x=Rle(c);function E(_,A){if(_===!1||A===!1)return!1;if(gl(_))return gl(A)?!0:A;if(gl(A))return _;let C={..._};const M=new Set,D=new Set,$=Object.keys(A),q=$.length;for(let V=0;V<q;V++){const Y=$[V],Q=A[Y];if(Q===void 0)continue;const ie=x.get(Y);if(ie!==void 0){const J=ie.length;for(let fe=0;fe<J;fe++){const le=ie[fe];_[le.oppositeKey]!==void 0&&D.add(le.check)}}const se=_[Y];if(se===void 0){C[Y]=Q;continue}const K=T.get(Y);if(K){M.add(K);continue}const G=O[Y]??o;C[Y]=G(se,Q)}for(const V of M)C=V(C,_,A);for(const V of D)V(C);return C}const S=Oj(E),O={$id:o,$ref:o,$schema:o,$comment:o,$defs:S,definitions:S,type:(_,A)=>{if(_===A)return _;const C=Array.isArray(_),M=Array.isArray(A);if(!C&&!M){const D=bx(_,A);if(D!==void 0)return D}else if(C||M){const D=new Set;if(C&&M)for(const q of yx(_,A,bx))q!==void 0&&D.add(q);else{const q=C?_:A,V=C?A:_,Y=q.length;for(let Q=0;Q<Y;Q++){const ie=bx(V,q[Q]);ie!==void 0&&D.add(ie)}}const $=D.size;if($===1)return D.values().next().value;if($>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${_.toString()}, ${A.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(_,A)=>{const C=i([_,A]);return C.length===1?C[0]:{anyOf:C}},pattern:e,readOnly:vx,writeOnly:vx,enum:(_,A)=>{const C=r(_,A);if(C.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(_)}", "${JSON.stringify(A)}"`);return C},anyOf:b,oneOf:b,allOf:(_,A)=>i(_.concat(A)),propertyNames:E,contains:E,dependencies:Oj((_,A)=>Array.isArray(_)?Array.isArray(A)?hx(_,A):E(A,{required:_}):Array.isArray(A)?E(_,{required:A}):E(_,A)),examples:(_,A)=>{if(!Array.isArray(_)||!Array.isArray(A))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(_)}" and "${JSON.stringify(A)}"`);return hx(_,A)},multipleOf:(_,A)=>{let C=1;for(;!Number.isInteger(_)||!Number.isInteger(A);)C*=10,_*=10,A*=10;return Ele(_,A)/C},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:vx,required:hx,...f};return{mergeSchemaDefinitions:E,mergeArrayOfSchemaDefinitions:d}}function Dle(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:o,...l}=i;t.push(l);for(let c=o.length-1;c>=0;c--)r.push(o[c])}return t}function Nle(e){return t=>e(Dle(t))}var rv={},Dj;function kle(){if(Dj)return rv;Dj=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function o(h,m,y){for(var v,w,b=1,T=m.length;b<T;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),w=T>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),w&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!w)break;h=h[v]}var x=h[v];return y===void 0?delete h[v]:h[v]=y,x}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var y=m.length;if(y===1)return h;for(var v=1;v<y;){if(h=h[i(m[v++])],y===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,y){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return o(h,m,y)}function d(h){var m=l(h);return{get:function(y){return c(y,m)},set:function(y,v){return f(y,m,v)}}}return rv.get=c,rv.set=f,rv.compile=d,rv}var zle=kle();const Sx=Dl(zle);var $le=Nz();const nR=Dl($le);function QS(e,t){if(nr in e&&nR.equal(e[nr],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(Dn(i)){const o=QS(i,t);if(o!==void 0)return o}}else if(Dn(r)){const i=QS(r,t);if(i!==void 0)return i}}function TC(e,t){const r=Be(e,nr,t);Ar in e&&(e={...e,[Ar]:nR.resolve(r,e[Ar])});for(const[i,o]of Object.entries(e))Array.isArray(o)?e={...e,[i]:o.map(l=>Dn(l)?TC(l,r):l)}:Dn(o)&&(e={...e,[i]:TC(o,r)});return e}function rR(e,t){const r=t[e];return[Iv(t,[e]),r]}function W8(e,t={},r=[],i=Be(t,[nr])){const o=e||"";let l;if(o.startsWith("#")){const f=decodeURIComponent(o.substring(1));i===void 0||nr in t&&t[nr]===i?l=Sx.get(t,f):t[hv]===pS&&(l=QS(t,i.replace(/\/$/,"")),l!==void 0&&(l=Sx.get(l,f)))}else if(t[hv]===pS){const f=i?nR.resolve(i,o):o,[d,...h]=f.replace(/#\/?$/,"").split("#");l=QS(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[nr],oa(h)||(l=Sx.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[Ar];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...y]=r,v=[...y,o,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=rR(Ar,l),h=W8(d,t,[...r,o],i);return Object.keys(f).length>0?t[hv]===ule||t[hv]===pS?{[Vc]:[f,h]}:{...f,...h}:h}return l}function J8(e,t={},r=Be(t,[nr])){return W8(e,t,[],r)}function Rl(e){let t;const r=Be(e,sle);return $c(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function Zv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function ll(e){let{type:t}=e;return!t&&e.const?Zv(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function ic(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];return e&&o in e&&Rn(c)?i[o]=ic(l,c):e&&t&&(ll(e)==="object"||ll(t)==="object")&&o===F8&&Array.isArray(l)&&Array.isArray(c)?i[o]=PG(l,c):i[o]=c,i},r)}function e$(e,t,r){var i;if(e&&r){const o=Be(e,r);if(o===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Be(c,[Pn,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===o||!((i=f.enum)===null||i===void 0)&&i.includes(o)))return l}}}function aR(e,t,r,i,o){if(t===void 0)return 0;const l=e$(t,r,o);if(a6(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(o&&_n(f,[Pn,o])){const d=Be(t,o),h=Be(f,[Pn,o],{});if(e.isValid(h,d,i))return c}else if(f[Pn]){const d={anyOf:Object.keys(f[Pn]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function xi(e,t,r={},i,o,l=!1){return Sl(e,t,r,i,void 0,void 0,o,l)[0]}function Ple(e,t,r,i,o,l,c){const{if:f,then:d,else:h,...m}=t,y=e.isValid(f,l||{},r);let v=[m],w=[];if(i)d&&typeof d!="boolean"&&(w=w.concat(Sl(e,d,r,l,i,o,c))),h&&typeof h!="boolean"&&(w=w.concat(Sl(e,h,r,l,i,o,c)));else{const b=y?d:h;b&&typeof b!="boolean"&&(w=w.concat(Sl(e,b,r,l,i,o,c)))}return w.length&&(v=w.map(b=>ic(m,b))),v.flatMap(b=>Sl(e,b,r,l,i,o,c))}function t$(e){return e.reduce((r,i)=>i.length>1?i.flatMap(o=>l6(r.length,l=>[...r[l]].concat(o))):(r.forEach(o=>o.push(i[0])),r),[[]])}function n$(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Vn(r,[i],e.patternProperties[i]),r),{})}function Ule(e,t,r,i,o,l,c,f){const d=r$(e,t,r,i,o,l,c,f);if(d.length>1||d[0]!==t)return d;if(JA in t)return a$(e,t,r,i,o,l,c).flatMap(m=>Sl(e,m,r,l,i,o,c));if(Vc in t&&Array.isArray(t[Vc])){const h=t.allOf.map(y=>Sl(e,y,r,l,i,o,c));return t$(h).map(y=>({...t,allOf:y}))}return[t]}function r$(e,t,r,i,o,l,c,f){const d=Op(t,r,o,void 0,f);return d!==t?Sl(e,d,r,l,i,o,c,f):[t]}function Op(e,t,r,i,o){if(!Rn(e))return e;let l=e;if(Ar in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...J8(c,t,i),...f},nr in l&&(i=l[nr])}if(Pn in l){const c=[],f=NG(l[Pn],(d,h,m)=>{const y=[...r];d[m]=Op(h,t,y,i,o),c.push(y)},{});bG(r,f6(eG(c))),l={...l,[Pn]:f}}if(Gp in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Op(l.items,t,r,i,o)}),o){let c,f;jn in e&&Array.isArray(e[jn])?(c=jn,f=l[jn]):mn in e&&Array.isArray(e[mn])&&(c=mn,f=l[mn]),c&&f&&(l={...l,[c]:f.map(d=>Op(d,t,r,i,o))})}return pr(e,l)?e:l}function Ile(e,t,r,i,o){const l={...t,properties:{...t.properties}},c=i&&Rn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(_C in l){const d=n$(l,f);if(!oa(d)){l.properties[f]=xi(e,{[Vc]:Object.values(d)},r,Be(c,[f]),o),Vn(l.properties,[f,tc],!0);return}}if(ZS in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?Ar in l.additionalProperties?d=xi(e,{[Ar]:Be(l.additionalProperties,[Ar])},r,c,o):"type"in l.additionalProperties?d={...l.additionalProperties}:jn in l.additionalProperties||mn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:Zv(Be(c,[f]))}:d={type:Zv(Be(c,[f]))},l.properties[f]=d,Vn(l.properties,[f,tc],!0)}else l.properties[f]={type:"null"},Vn(l.properties,[f,tc],!0)}}),l}const{compareSchemaDefinitions:Lle,compareSchemaValues:qle}=_le(),{mergeArrayOfSchemaDefinitions:Vle}=jle({intersectJson:gle(qle),deduplicateJsonSchemaDef:Z8(Lle)}),Ble=Nle(Vle);function Fle(e){return Ble(e)}function Sl(e,t,r,i,o=!1,l=[],c,f){return Rn(t)?Ule(e,t,r,o,l,i,c,f).flatMap(h=>{var m;let y=h;if(ale in y)return Ple(e,y,r,o,l,i,c);if(Vc in y){if(o){const{allOf:w,...b}=y;return[...w,b]}try{const w=[],b=[];(m=y.allOf)===null||m===void 0||m.forEach(T=>{typeof T=="object"&&T.contains?w.push(T):b.push(T)}),w.length&&(y={...y,allOf:b}),y=c?c(y):Fle(y),w.length&&(y.allOf=w)}catch(w){console.warn(`could not merge subschemas in allOf:
60
60
  `,w);const{allOf:b,...T}=y;return T}}return Pn in y&&_C in y&&(y=Object.keys(y.properties).reduce((w,b)=>{const T=n$(w,b);return oa(T)||(w.properties[b]=xi(e,{allOf:[w.properties[b],...Object.values(T)]},r,Be(i,[b]),c)),w},{...y,properties:{...y.properties}})),_C in y||ZS in y&&y.additionalProperties!==!1?Ile(e,y,r,i,c):y}):[{}]}function Hle(e,t,r,i,o){let l;const{oneOf:c,anyOf:f,...d}=t;if(Array.isArray(c)?l=c:Array.isArray(f)&&(l=f),l){const h=o===void 0&&i?{}:o,m=Rl(t);l=l.map(v=>Op(v,r,[]));const y=aR(e,h,l,r,m);if(i)return l.map(v=>ic(d,v));t=ic(d,l[y])}return[t]}function a$(e,t,r,i,o,l,c){const{dependencies:f,...d}=t;return Hle(e,d,r,i,l).flatMap(m=>i$(e,f,m,r,i,o,l,c))}function i$(e,t,r,i,o,l,c,f){let d=[r];for(const h in t){if(!o&&Be(c,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,y]=rR(h,t);return Array.isArray(y)?d[0]=Gle(r,y):Rn(y)&&(d=Kle(e,r,i,h,y,o,l,c,f)),d.flatMap(v=>i$(e,m,v,i,o,l,c,f))}return d}function Gle(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function Kle(e,t,r,i,o,l,c,f,d){return Sl(e,o,r,f,l,c,d).flatMap(m=>{const{oneOf:y,...v}=m;if(t=ic(t,v),y===void 0)return t;const w=y.map(T=>typeof T=="boolean"||!(Ar in T)?[T]:r$(e,T,r,l,c,f));return t$(w).flatMap(T=>Yle(e,t,r,i,T,l,c,f,d))})}function Yle(e,t,r,i,o,l,c,f,d){const h=o.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:y}=m.properties;if(y){const v={type:"object",properties:{[i]:y}};return e.isValid(v,f,r)||l}return!1});return!l&&h.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):h.flatMap(m=>{const y=m,[v]=rR(i,y.properties),w={...y,properties:v};return Sl(e,w,r,f,l,c,d).map(T=>ic(t,T))})}function mv(e,t,r,i,o,l={},c){if(Array.isArray(r[o])){const d=Rl(r)||i,h=r[o].map(y=>xi(e,y,t,l,c)),m=Be(l,d);if(m!==void 0)return h.find(y=>Cc(Be(y,[Pn,d,H2],Be(y,[Pn,d,oo])),m))}}function s$(e,t,r,i,o){let l=r;if(_n(r,Ar)&&(l=xi(e,r,t,void 0,o)),oa(i))return l;const c=Array.isArray(i)?i:i.split("."),[f,...d]=c;if(f&&_n(l,f))return l=Be(l,f),s$(e,t,l,d,o)}function gS(e,t,r,i,o,l){const c=s$(e,t,r,i,l);return c===void 0?o:c}const Nj={title:"!@#$_UNKNOWN_$#@!"};function Zle(e,t,r,i,o={},l){const c=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=c.pop();c.length&&c.forEach(v=>{f=gS(e,t,f,[Pn,v],{},l),_n(f,mn)?f=mv(e,t,f,d,mn,Be(o,v),l):_n(f,jn)&&(f=mv(e,t,f,d,jn,Be(o,v),l))}),_n(f,mn)?f=mv(e,t,f,d,mn,o,l):_n(f,jn)&&(f=mv(e,t,f,d,jn,o,l));let h=gS(e,t,f,[Pn,d],Nj,l);h===Nj&&(h=void 0);const m=gS(e,t,f,F8,[],l);let y;return h&&Array.isArray(m)&&(y=m.includes(d)),{field:h,isRequired:y}}const Xle={type:"object",$id:ile,properties:{__not_really_there__:{type:"number"}}};function CC(e,t,r,i,o){let l=0;return r&&(Dn(r.properties)?l+=RG(r.properties,(c,f,d)=>{const h=Be(i,d);if(typeof f=="boolean")return c;if(_n(f,Ar)){const m=xi(e,f,t,h,o);return c+CC(e,t,m,h||{},o)}if((_n(f,mn)||_n(f,jn))&&h){const m=_n(f,mn)?mn:jn,y=Rl(f);return c+Xv(e,t,h,Be(f,m),-1,y,o)}if(f.type==="object")return Dn(h)&&(c+=1),c+CC(e,t,f,h,o);if(f.type===Zv(h)){let m=c+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return c},0):$c(r.type)&&r.type===Zv(i)&&(l+=1)),l}function Xv(e,t,r,i,o=-1,l,c){const f=i.map(v=>Op(v,t,[])),d=e$(r,i,l);if(a6(d))return d;const h=f.reduce((v,w,b)=>(aR(e,r,[Xle,w],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||l6(f.length,v=>h.push(v));const m=new Set,{bestIndex:y}=h.reduce((v,w)=>{const{bestScore:b}=v,T=f[w],x=CC(e,t,T,r,c);return m.add(x),x>b?{bestIndex:w,bestScore:x}:v},{bestIndex:o,bestScore:0});return m.size===1&&o>=0?o:y}function iR(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Rn(t))}function Qv(e,t,r=!1,i=!1,o=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],c=o?l:t,f=o?t:l,d=c.map((h,m)=>f[m]!==void 0?Qv(l[m],t[m],r,i,o):h);return(r||o)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(Rn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((c,f)=>{var d;const h=Be(t,f),m=Rn(e)&&f in e,y=f in t,v=(d=Be(e,f))!==null&&d!==void 0?d:{},w=m&&Object.entries(v).some(([,x])=>Rn(x)),b=m&&Rn(Be(e,f)),T=y&&Rn(h);return b&&T&&!w?(c[f]={...Be(e,f),...h},c):(c[f]=Qv(Be(e,f),h,r,i,o&&(m||!y)),c)},l)}return i&&(e!==void 0&&MS(t)||typeof t=="number"&&isNaN(t))||o&&!MS(t)?e:t}function Wv(e,t,r=!1){return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];if(e&&o in e&&Rn(c))i[o]=Wv(l,c,r);else if(r&&Array.isArray(l)&&Array.isArray(c)){let f=c;r==="preventDuplicates"&&(f=c.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[o]=l.concat(f)}else i[o]=c;return i},Object.assign({},e))}function o$(e){return Array.isArray(e.enum)&&e.enum.length===1||oo in e}function sR(e,t,r={},i){const o=xi(e,t,r,void 0,i),l=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(l)?l.every(c=>typeof c!="boolean"&&o$(c)):!1}function oR(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:sR(e,t.items,r,i)}function l$(e){const t=e[oo],r=ll(e);return Rn(t)&&$c(t?.$data)&&r!=="object"&&r!=="array"}function Qle(e){if(rle in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(oo in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Kp(e,t){if(e.enum){let l;if(t){const{enumNames:c}=At(t);l=c}return e.enum.map((c,f)=>({label:l?.[f]||String(c),value:c}))}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let o=Rl(e);if(t){const{optionsSchemaSelector:l=o}=At(t);o=l}return r&&r.map((l,c)=>{const{title:f}=At(i?.[c]),d=l;let h,m=f;if(o){const y=Be(d,[Pn,o],{});h=Be(y,H2,Be(y,oo)),m=m||y?.title||d.title||String(h)}else h=Qle(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const Wle=["string","number","integer","boolean","null"];var Yp;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Yp||(Yp={}));function wx(e,t=Yp.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const i=e.items[r];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Yp.Ignore&&Rn(e.additionalItems)?e.additionalItems:{}}function u$(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&oa(t)&&r===null?null:t}function kj(e,t,r,i,o,l=[],c={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=c;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!Rn(r)||!oa(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=o===void 0?l.includes(t):o;Rn(r)?h==="skipEmptyDefaults"?oa(r)||(e[t]=r):(!oa(r)||l.includes(t))&&(m||h!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(h==="populateAllDefaults"||h==="skipEmptyDefaults"||m&&l.includes(t))&&(e[t]=r)}}function Rc(e,t,r={}){const{parentDefaults:i,rawFormData:o,rootSchema:l={},includeUndefinedValues:c=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:y=!1,initialDefaultsGenerated:v}=r;let w=Rn(o)?o:{};const b=Rn(t)?t:{};let T=i,x=null,E=d,S=f;if(b[oo]!==void 0&&d?.constAsDefaults!=="never"&&!l$(b))T=b[oo];else if(Rn(T)&&Rn(b.default))T=Wv(T,b.default);else if(H2 in b&&!b[jn]&&!b[mn]&&!b[Ar])T=b.default;else if(Ar in b){const A=b[Ar];f.includes(A)||(S=f.concat(A),x=J8(A,l)),x&&!T&&(T=b.default),y&&x&&!Rn(o)&&(w=o)}else if(JA in b){const A={...zj(e,b,r,T),...w};x=a$(e,b,l,!1,[],A,h)[0]}else if(iR(b))T=b.items.map((A,C)=>Rc(e,A,{rootSchema:l,includeUndefinedValues:c,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[C]:void 0,rawFormData:w,required:m,shouldMergeDefaultsIntoFormData:y}));else if(mn in b){const{oneOf:A,...C}=b;if(A.length===0)return;const M=Rl(b),{type:D="null"}=C;!Array.isArray(D)&&Wle.includes(D)&&E?.constAsDefaults==="skipOneOf"&&(E={...E,constAsDefaults:"never"}),x=A[Xv(e,l,o??b.default,A,0,M,h)],x=ic(C,x)}else if(jn in b){const{anyOf:A,...C}=b;if(A.length===0)return;const M=Rl(b);x=A[Xv(e,l,o??b.default,A,0,M,h)],x=ic(C,x)}if(x)return Rc(e,x,{rootSchema:l,includeUndefinedValues:c,_recurseList:S,experimental_defaultFormStateBehavior:E,experimental_customMergeAllOf:h,parentDefaults:T,rawFormData:o??w,required:m,shouldMergeDefaultsIntoFormData:y,initialDefaultsGenerated:v});T===void 0&&(T=b.default);const O=zj(e,b,r,T);let _=O??T;if(y){const{arrayMinItems:A={}}=d||{},{mergeExtraDefaults:C}=A,M=Jle(e,b,l,o,d,h);(!Rn(o)||Vc in b)&&(_=Qv(_,M,C,!0))}return _}function Jle(e,t,r,i,o,l){const c=!o$(t)&&sR(e,t,r,l);let f=i;if(c){const h=Kp(t);f=h?.some(y=>pr(y.value,i))?i:void 0}return t[oo]&&o?.constAsDefaults==="always"&&(f=t.const),f}function eue(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:o=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},y){{const v=Rn(r)?r:{},w=t,b=c?.allOf==="populateDefaults"&&Vc in w?xi(e,w,i,v,f):w,T=b[oo],x=Object.keys(b.properties||{}).reduce((E,S)=>{var O;const _=Be(b,[Pn,S],{}),A=Rn(T)&&T[S]!==void 0,C=(Rn(_)&&oo in _||A)&&c?.constAsDefaults!=="never"&&!l$(_),M=Rc(e,_,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:o===!0,parentDefaults:Be(y,[S]),rawFormData:Be(v,[S]),required:(O=b.required)===null||O===void 0?void 0:O.includes(S),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return kj(E,S,M,o,d,b.required,c,C,_?.type==="null"),E},{});if(b.additionalProperties&&!m){const E=Rn(b.additionalProperties)?b.additionalProperties:{},S=new Set;Rn(y)&&Object.keys(y).filter(_=>!b.properties||!b.properties[_]).forEach(_=>S.add(_));const O=[];Object.keys(v).filter(_=>!b.properties||!b.properties[_]).forEach(_=>{S.add(_),O.push(_)}),S.forEach(_=>{var A;const C=Rc(e,E,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:o===!0,parentDefaults:Be(y,[_]),rawFormData:Be(v,[_]),required:(A=b.required)===null||A===void 0?void 0:A.includes(_),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});kj(x,_,C,o,d,O)})}return u$(t,x)}}function tue(e,t,{rawFormData:r,rootSchema:i={},_recurseList:o=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},y){var v,w;const b=t,T=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:x,mergeExtraDefaults:E}=T,S=x==="never",O=x==="requiredOnly",_=x==="all"||!S&&!O,A=(w=T?.computeSkipPopulate)!==null&&w!==void 0?w:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(y)&&(y=y.map((V,Y)=>{const Q=wx(b,Yp.Fallback,Y);return Rc(e,Q,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:V,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const V=wx(b);if(S)y=r;else{const Y=r.map((ie,se)=>Rc(e,V,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:ie,parentDefaults:Be(y,[se]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));y=Qv(y,Y,(O&&f||_)&&E)}}if((Rn(b)&&oo in b&&l?.constAsDefaults!=="never")===!1){if(S)return y??M;if(O&&!f)return y||void 0}let $;const q=Array.isArray(y)?y.length:0;if(!b.minItems||oR(e,b,i,c)||A(e,b,i)||b.minItems<=q)$=y||!f&&!d?y:M;else{const V=y||[],Y=wx(b,Yp.Invert),Q=Y.default,ie=Array.from({length:b.minItems-q},()=>Rc(e,Y,{parentDefaults:Q,rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:f,shouldMergeDefaultsIntoFormData:h}));$=V.concat(ie)}return u$(t,$)}function zj(e,t,r={},i){switch(ll(t)){case"object":return eue(e,t,r,i);case"array":return tue(e,t,r,i)}}function c$(e,t,r,i,o=!1,l,c,f){if(!Rn(t))throw new Error("Invalid schema: "+t);const d=xi(e,t,i,r,c),h=Rc(e,d,{rootSchema:i,includeUndefinedValues:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&Rn(d.default))return{...h,...r};if(Rn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return Qv(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function f$(e={}){return"widget"in At(e)&&At(e).widget!=="hidden"}function d$(e,t,r={},i,o){if(r[tR]==="files")return!0;if(t.items){const l=xi(e,t.items,i,void 0,o);return l.type==="string"&&l.format==="data-url"}return!1}function nue(e,t,r={},i,o,l){const c=At(r,o),{label:f=!0}=c;let d=!!f;if(d){const h=ll(t),m=Be(t,tc,!1);h==="array"&&(d=m||oR(e,t,i,l)||d$(e,t,r,i,l)||f$(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[tR]&&(d=!1),r&&r[lle]&&(d=!1)}return d}const rp=Symbol("no Value");function OC(e,t,r,i,o={},l){let c;if(_n(r,Pn)){const f={};if(_n(i,Pn)){const m=Be(i,Pn,{});Object.keys(m).forEach(y=>{_n(o,y)&&(f[y]=void 0)})}const d=Object.keys(Be(r,Pn,{})),h={};d.forEach(m=>{const y=Be(o,m);let v=Be(i,[Pn,m],{}),w=Be(r,[Pn,m],{});_n(v,Ar)&&(v=xi(e,v,t,y,l)),_n(w,Ar)&&(w=xi(e,w,t,y,l));const b=Be(v,"type"),T=Be(w,"type");if(!b||b===T)if(_n(f,m)&&delete f[m],T==="object"||T==="array"&&Array.isArray(y)){const x=OC(e,t,w,v,y,l);(x!==void 0||T==="array")&&(h[m]=x)}else{const x=Be(w,"default",rp),E=Be(v,"default",rp);x!==rp&&x!==y&&(E===y?f[m]=x:Be(w,"readOnly")===!0&&(f[m]=void 0));const S=Be(w,"const",rp),O=Be(v,"const",rp);S!==rp&&S!==y&&(f[m]=O===y?S:void 0)}}),c={...typeof o=="string"||Array.isArray(o)?void 0:o,...f,...h}}else if(Be(i,"type")==="array"&&Be(r,"type")==="array"&&Array.isArray(o)){let f=Be(i,"items"),d=Be(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){_n(f,Ar)&&(f=xi(e,f,t,o,l)),_n(d,Ar)&&(d=xi(e,d,t,o,l));const h=Be(f,"type"),m=Be(d,"type");if(!h||h===m){const y=Be(r,"maxItems",-1);m==="object"?c=o.reduce((v,w)=>{const b=OC(e,t,d,f,w,l);return b!==void 0&&(y<0||v.length<y)&&v.push(b),v},[]):c=y>0&&o.length>y?o.slice(0,y):o}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(c=o)}return c}function mh(e,t,r,i,o,l=[],c){if(Ar in t||JA in t||Vc in t){const d=xi(e,t,i,o,c);if(l.findIndex(m=>pr(m,d))===-1)return mh(e,d,r,i,o,l.concat(d),c)}let f={[hS]:r.replace(/^\./,"")};if(mn in t||jn in t){const d=mn in t?t.oneOf:t.anyOf,h=Rl(t),m=Xv(e,i,o,d,0,h,c),y=d[m];f={...f,...mh(e,y,r,i,o,l,c)}}if(ZS in t&&t[ZS]!==!1&&Vn(f,eR,!0),Gp in t&&Array.isArray(o)){const{items:d,additionalItems:h}=t;Array.isArray(d)?o.forEach((m,y)=>{d[y]?f[y]=mh(e,d[y],`${r}.${y}`,i,m,l,c):h?f[y]=mh(e,h,`${r}.${y}`,i,m,l,c):console.warn(`Unable to generate path schema for "${r}.${y}". No schema defined for it`)}):o.forEach((m,y)=>{f[y]=mh(e,d,`${r}.${y}`,i,m,l,c)})}else if(Pn in t)for(const d in t.properties){const h=Be(t,[Pn,d],{});f[d]=mh(e,h,`${r}.${d}`,i,Be(o,[d]),l,c)}return f}function rue(e,t,r="",i,o,l){return mh(e,t,r,i,o,void 0,l)}class aue{constructor(t,r,i,o){r&&r[hv]===pS?this.rootSchema=TC(r,Be(r,nr,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,i={},o){return!t||!r?!1:this.validator!==t||!pr(this.rootSchema,r)||!pr(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,r,i){return Zle(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,o){return mv(this.validator,this.rootSchema,t,r,i,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,o){return c$(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,r,i){return nue(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,o){return Xv(this.validator,this.rootSchema,t,r,i,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return aR(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return gS(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return d$(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return oR(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return sR(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,r,i){return xi(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return OC(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return rue(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function iue(e,t,r={},i){return new aue(e,t,r,i)}function sue(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,l]=i,[c,...f]=o.split(";"),d=c||"",h=decodeURI(((t=f.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(l),y=new Array(m.length);for(let w=0;w<m.length;w++)y[w]=m.charCodeAt(w);return{blob:new window.Blob([new Uint8Array(y)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function Sc(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function h$(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return h$(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:Sc(i,2)});return r}function $j(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++){const l=r[o];if(!Object.prototype.hasOwnProperty.call(t,l)||!Object.is(e[l],t[l]))return!1}return!0}function oue(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((o,l)=>{const c=i.findIndex(f=>f===`%${l+1}`);c>=0&&(i[c]=o)}),r=i.join("")}return r}function lue(e,t){return oue(e,t)}function Ra(e,t=[],r){if(Array.isArray(e))return e.map(l=>Ra(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),o=t[i];return o?o.value:r}function p$(e,t,r=[]){const i=Ra(e,r);return Array.isArray(t)?t.filter(o=>!pr(o,i)):pr(i,t)?void 0:t}function Rb(e,t){return Array.isArray(t)?t.some(r=>pr(r,e)):pr(t,e)}function m$(e,t=[],r=!1){const i=t.map((o,l)=>Rb(o.value,e)?String(l):void 0).filter(o=>typeof o<"u");return r?i:i[0]}function g$(e,t,r=[]){const i=Ra(e,r);if(!MS(i)){const o=r.findIndex(f=>i===f.value),l=r.map(({value:f})=>f);return t.slice(0,o).concat(i,t.slice(o)).sort((f,d)=>+(l.indexOf(f)>l.indexOf(d)))}return t}class y${constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?Be(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},MG(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?gb(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let o=Be(i,ci);return Array.isArray(o)||(o=[],i[ci]=o),Array.isArray(t)?Vn(i,ci,[...new Set([...o,...t])]):Vn(i,ci,[...new Set([...o,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),o=Array.isArray(t)?[...new Set([...t])]:[t];return Vn(i,ci,o),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Vn(r,ci,[]),this}}function Pj(e,t){const r=zc(e),i=zc(t);if(e===t||!r&&!i)return[];if(r&&!i)return eo(e);if(!r&&i)return eo(t);{const o=eo(CG(e,(c,f)=>!pr(c,Be(t,f)))),l=QH(eo(t),eo(e));return[...o,...l]}}function uue(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:o,month:l,year:c,hour:f,minute:d,second:h}=e,m={type:"day",range:[1,31],value:o},y={type:"month",range:[1,12],value:l},v={type:"year",range:r,value:c},w=[];switch(i){case"MDY":w.push(y,m,v);break;case"DMY":w.push(m,y,v);break;default:w.push(v,y,m)}return t&&w.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),w}function v$(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function b$(e,t,r={},i=!0){const o={type:t||"text",...v$(e)};return r.inputType?o.type=r.inputType:t||(e.type==="number"?(o.type="number",i&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),r.autocomplete&&(o.autoComplete=r.autocomplete),r.accept&&(o.accept=r.accept),o}const Uj={props:{disabled:!1},submitText:"Submit",norender:!1};function S$(e={}){const t=At(e);if(t&&t[XS]){const r=t[XS];return{...Uj,...r}}return Uj}function Ut(e,t,r={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(i,r[e])){const o=r[e];return i[o]}return r[e]||i[e]}function lR(){if(typeof process>"u"||Be(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,d6("test-id-")),e.get(r)}})}var _x={exports:{}},qn={};var Ij;function cue(){if(Ij)return qn;Ij=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function T(x){if(typeof x=="object"&&x!==null){var E=x.$$typeof;switch(E){case e:switch(x=x.type,x){case r:case o:case i:case h:case m:return x;default:switch(x=x&&x.$$typeof,x){case f:case c:case d:case v:case y:case l:return x;default:return E}}case t:return E}}}return qn.ContextConsumer=c,qn.ContextProvider=l,qn.Element=e,qn.ForwardRef=d,qn.Fragment=r,qn.Lazy=v,qn.Memo=y,qn.Portal=t,qn.Profiler=o,qn.StrictMode=i,qn.Suspense=h,qn.SuspenseList=m,qn.isAsyncMode=function(){return!1},qn.isConcurrentMode=function(){return!1},qn.isContextConsumer=function(x){return T(x)===c},qn.isContextProvider=function(x){return T(x)===l},qn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},qn.isForwardRef=function(x){return T(x)===d},qn.isFragment=function(x){return T(x)===r},qn.isLazy=function(x){return T(x)===v},qn.isMemo=function(x){return T(x)===y},qn.isPortal=function(x){return T(x)===t},qn.isProfiler=function(x){return T(x)===o},qn.isStrictMode=function(x){return T(x)===i},qn.isSuspense=function(x){return T(x)===h},qn.isSuspenseList=function(x){return T(x)===m},qn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===o||x===i||x===h||x===m||x===w||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===y||x.$$typeof===l||x.$$typeof===c||x.$$typeof===d||x.$$typeof===b||x.getModuleId!==void 0)},qn.typeOf=T,qn}var Lj;function fue(){return Lj||(Lj=1,_x.exports=cue()),_x.exports}var due=fue();const qj=Dl(due),Ex={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function hue(e){let t=Be(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...o})=>N.jsx(e,{options:{...r,...i},...o}),Vn(e,"MergedWidget",t)}return t}function Ml(e,t,r={}){const i=ll(e);if(typeof t=="function"||t&&qj.isForwardRef(j.createElement(t))||qj.isMemo(t))return hue(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const o=r[t];return Ml(e,o,r)}if(typeof i=="string"){if(!(i in Ex))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in Ex[i]){const o=r[Ex[i][t]];return Ml(e,o,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function pue(e){let t=0;for(let r=0;r<e.length;r+=1){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function mue(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function wl(e){return pue(mue(e))}function gue(e){return wl(e)}function yue(e,t,r={}){try{return Ml(e,t,r),!0}catch(i){const o=i;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw i}}function Fh(e,t){return`${$c(e)?e:e[nr]}__${t}`}function Hh(e){return Fh(e,"description")}function uR(e){return Fh(e,"error")}function Jv(e){return Fh(e,"examples")}function cR(e){return Fh(e,"help")}function K2(e){return Fh(e,"title")}function es(e,t=!1){const r=t?` ${Jv(e)}`:"";return`${uR(e)} ${Hh(e)} ${cR(e)}${r}`}function xh(e,t){return`${e}-${t}`}function _l(e,t){return Fh(e,t)}function xx(e,t){return Fh(e,`optional${t}`)}function ym(e){return!MS(e)&&(!Dn(e)||Array.isArray(e)||!oa(e))}function vue(e,t){const{rootSchema:r,schemaUtils:i}=e;if(Cc(t,r))return!0;if(Ar in r){const o=i.retrieveSchema(r);return Cc(t,o)}return!1}function w$(e,t,r){return t?r:e}function bue(e){return e?new Date(e).toJSON():void 0}function fR(e,t,r){const i=[ole];return _n(e,_j)&&i.unshift(_j),Be(e,[...i,t],r)}function Sue(e,t){if(!Array.isArray(t))return e;const r=m=>m.reduce((y,v)=>(y[v]=!0,y),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,o=r(e),l=t.filter(m=>m==="*"||o[m]),c=r(l),f=e.filter(m=>!c[m]),d=l.indexOf("*");if(d===-1){if(f.length)throw new Error(`uiSchema order list does not contain ${i(f)}`);return l}if(d!==l.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const h=[...l];return h.splice(d,1,...f),h}function Tx(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Tv(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Tv(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Tv(e.oneOf[0]);if(e.allOf){const t=r=>Tv(r);return e.allOf.some(t)}return!1}function _$(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:c,state:f}=e;return!$j(c,t)||!$j(f,r)}const{props:o,state:l}=e;return!pr(o,t)||!pr(l,r)}function Vj(e){const t=f6(e.map(r=>Dn(r)?ll(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function Mb(e,t,r,i){const{enableOptionalDataFieldForType:o=[]}=At(i,e.globalUiOptions);let l;return jn in t&&Array.isArray(t[jn])?l=Vj(t[jn]):mn in t&&Array.isArray(t[mn])?l=Vj(t[mn]):l=ll(t),!vue(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!o.find(c=>c===l)}function Bj(e,t=!0){const{year:r,month:i,day:o,hour:l=0,minute:c=0,second:f=0}=e,d=Date.UTC(r,i-1,o,l,c,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function dR(e,t=[]){if(!e)return[];let r=[];return ci in e&&(r=r.concat(e[ci].map(i=>{const o=`.${t.join(".")}`;return{property:o,message:i,stack:`${o} ${i}`}}))),Object.keys(e).reduce((i,o)=>{if(o!==ci){const l=e[o];zc(l)&&(i=i.concat(dR(l,[...t,o])))}return i},r)}function wue(e){const t=new y$;return e.length&&e.forEach(r=>{const{property:i,message:o}=r,l=i==="."?[]:u6(i);l.length>0&&l[0]===""&&l.splice(0,1),o&&t.addErrors(o,l)}),t.ErrorSchema}function lo(e,t,r,i){const o=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],c=o?o.concat(...l):l,f=[t.idPrefix,...c].join(t.idSeparator);let d;return t.nameGenerator&&c.length>0&&(d=t.nameGenerator(c,t.idPrefix,i)),{path:c,[nr]:f,...d!==void 0&&{name:d}}}function E$(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return zc(i)?{...t,[r]:E$(i)}:{...t,[r]:i}}},{})}function _ue(e){return Object.values(e).every(t=>t!==-1)}function Eue(e){const{className:t="form-control",type:r,range:i,value:o,select:l,rootId:c,name:f,disabled:d,readonly:h,autofocus:m,registry:y,onBlur:v,onFocus:w}=e,b=`${c}_${r}`,{SelectWidget:T}=y.widgets,x=j.useCallback(E=>l(r,E),[l,r]);return N.jsx(T,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:h$(i[0],i[1])},placeholder:r,value:o,disabled:d,readonly:h,autofocus:m,onChange:x,onBlur:v,onFocus:w,registry:y,label:"","aria-describedby":es(c)})}function xue(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:o,onChange:l,value:c}=e,[f,d]=j.useState(Tx(c,t));j.useEffect(()=>{d(Tx(c,t))},[t,c]);const h=j.useCallback((w,b)=>{const T={...f,[w]:typeof b>"u"?-1:b};_ue(T)?l(Bj(T,t)):d(T)},[f,l,t]),m=j.useCallback(w=>{w.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),y=j.useCallback(w=>{if(w.preventDefault(),r||i)return;const b=Tx(new Date().toJSON(),t);l(Bj(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>uue(f,t,o.yearsRange,o.format),[f,t,o.yearsRange,o.format]),handleChange:h,handleClear:m,handleSetNow:y}}function Gh(e){const t=j.useRef(e);return Cc(e,t.current)||(t.current=e),t.current}function Tue(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Cue(e){const{name:t,size:r,type:i}=e;return new Promise((o,l)=>{const c=new window.FileReader;c.onerror=l,c.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?o({dataURL:Tue(f.target.result,t),name:t,size:r,type:i}):o({dataURL:null,name:t,size:r,type:i})},c.readAsDataURL(e)})}function Oue(e){return Promise.all(Array.from(e).map(Cue))}function Fj(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:o}=sue(r);return[...t,{dataURL:r,name:o,size:i.size,type:i.type}]}catch{return t}},[])}function Aue(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),o=j.useMemo(()=>Array.isArray(e)?Fj(e):Fj([e||""]),[e]),l=j.useCallback(f=>{Oue(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),c=j.useCallback(f=>{if(r){const d=i.filter((h,m)=>m!==f);t(d)}else t(void 0)},[i,r,t]);return{filesInfo:o,handleChange:l,handleRemove:c}}function Rue(e){if(!e)return"";const t=new Date(e),r=Sc(t.getFullYear(),4),i=Sc(t.getMonth()+1,2),o=Sc(t.getDate(),2),l=Sc(t.getHours(),2),c=Sc(t.getMinutes(),2),f=Sc(t.getSeconds(),2),d=Sc(t.getMilliseconds(),3);return`${r}-${i}-${o}T${l}:${c}:${f}.${d}`}function yS(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:o}=e;let l=dR(t),c=t;return oa(o)||(c=Wv(o,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:c,errors:l}}function Mue(e){for(const t in e){const r=e,i=r[t];t===Ar&&typeof i=="string"&&i.startsWith("#")?r[t]=K8+i:r[t]=hR(i)}return e}function jue(e){for(let t=0;t<e.length;t++)e[t]=hR(e[t]);return e}function hR(e){return Array.isArray(e)?jue([...e]):Dn(e)?Mue({...e}):e}var yn;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(yn||(yn={}));function AC(){return d6("rjsf-array-item-")}function Hj(e){return Array.isArray(e)?e.map(t=>({key:AC(),item:t})):[]}function x$(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Due(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function T$(e,t,r,i){let{addable:o}=At(i,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=r.length<t.maxItems:o=!0),o}function C$(e,t,r,i){if(typeof e.items=="function")try{return e.items(t,r,i)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,o);return}else return e.items}function Nue(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let o=t.items;return i.useFallbackUiForUnsupportedType&&!o?o={}:iR(t)&&nle(t)&&(o=t.additionalItems),r.getDefaultFormState(o)}function kue(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:o=[],disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:y,registry:v,rawErrors:w,name:b,onSelectChange:T}=e,{widgets:x,schemaUtils:E,globalFormOptions:S,globalUiOptions:O}=v,_=E.retrieveSchema(t.items,o),A=Kp(_,i),{widget:C="select",title:M,...D}=At(i,O),$=Ml(t,C,x),q=M??t.title??b,V=E.getDisplayLabel(t,i,O),Y=Gh(lo("",S,r,!0));return N.jsx($,{id:Y[nr],name:b,multiple:!0,onChange:T,onBlur:m,onFocus:y,options:{...D,enumOptions:A},schema:t,uiSchema:i,registry:v,value:o,disabled:l,readonly:c,required:d,label:q,hideLabel:!V,placeholder:h,autofocus:f,rawErrors:w,htmlName:Y.name})}function zue(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:y,formData:v=[],registry:w,rawErrors:b,name:T,onSelectChange:x}=e,{widgets:E,schemaUtils:S,globalFormOptions:O,globalUiOptions:_}=w,{widget:A,title:C,...M}=At(i,_),D=Ml(t,A,E),$=C??t.title??T,q=S.getDisplayLabel(t,i,_),V=Gh(lo("",O,r,!0));return N.jsx(D,{id:V[nr],name:T,multiple:!0,onChange:x,onBlur:m,onFocus:y,options:M,schema:t,uiSchema:i,registry:w,value:v,disabled:o,readonly:l,hideError:d,required:f,label:$,hideLabel:!q,placeholder:h,autofocus:c,rawErrors:b,htmlName:V.name})}function $ue(e){const{schema:t,uiSchema:r,fieldPathId:i,name:o,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:y,formData:v=[],rawErrors:w,onSelectChange:b}=e,{widgets:T,schemaUtils:x,globalFormOptions:E,globalUiOptions:S}=y,{widget:O="files",title:_,...A}=At(r,S),C=Ml(t,O,T),M=_??t.title??o,D=x.getDisplayLabel(t,r,S),$=Gh(lo("",E,i,!0));return N.jsx(C,{options:A,id:$[nr],name:o,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:c,required:d,registry:y,autofocus:f,rawErrors:w,label:M,hideLabel:!D,htmlName:$.name})}function O$(e){const{itemKey:t,index:r,name:i,disabled:o,hideError:l,readonly:c,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:y=!0,canMoveUp:v,canMoveDown:w,itemSchema:b,itemData:T,itemUiSchema:x,itemFieldPathId:E,itemErrorSchema:S,autofocus:O,onBlur:_,onFocus:A,onChange:C,rawErrors:M,totalItems:D,title:$,handleAddItem:q,handleCopyItem:V,handleRemoveItem:Y,handleReorderItems:Q}=e,{schemaUtils:ie,fields:{ArraySchemaField:se,SchemaField:K},globalUiOptions:G}=f,J=Gh(E),fe=se||K,le=Ut("ArrayFieldItemTemplate",f,d),z=ie.getDisplayLabel(b,x,G),{description:U}=At(x),I=!!U||!!b.description,{orderable:P=!0,removable:F=!0,copyable:re=!1}=d,ue={moveUp:P&&v,moveDown:P&&w,copy:re&&m,remove:F&&y,toolbar:!1};ue.toolbar=Object.keys(ue).some(Te=>ue[Te]);const ge=j.useCallback(Te=>{q(Te,r+1)},[q,r]),we=j.useCallback(Te=>{V(Te,r)},[V,r]),De=j.useCallback(Te=>{Y(Te,r)},[Y,r]),te=j.useCallback(Te=>{Q(Te,r,r-1)},[Q,r]),he=j.useCallback(Te=>{Q(Te,r,r+1)},[Q,r]),Se={children:N.jsx(fe,{name:i,title:$,index:r,schema:b,uiSchema:x,formData:T,errorSchema:S,fieldPathId:J,required:Due(b),onChange:C,onBlur:_,onFocus:A,registry:f,disabled:o,readonly:c,hideError:l,autofocus:O,rawErrors:M}),buttonsProps:{fieldPathId:J,disabled:o,readonly:c,canAdd:m,hasCopy:ue.copy,hasMoveUp:ue.moveUp,hasMoveDown:ue.moveDown,hasRemove:ue.remove,index:r,totalItems:D,onAddItem:ge,onCopyItem:we,onRemoveItem:De,onMoveUpItem:te,onMoveDownItem:he,registry:f,schema:b,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:ue.toolbar,index:r,totalItems:D,readonly:c,registry:f,schema:b,uiSchema:x,parentUiSchema:h,displayLabel:z,hasDescription:I};return N.jsx(le,{...Se})}function Pue(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:o,formData:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:y=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:T,rawErrors:x,onChange:E,keyedFormData:S,handleAddItem:O,handleCopyItem:_,handleRemoveItem:A,handleReorderItems:C}=e,M=t.title||f||c,{schemaUtils:D,fields:$,formContext:q,globalFormOptions:V,globalUiOptions:Y}=w,{OptionalDataControlsField:Q}=$,ie=At(r,Y),se=Dn(t.items)?t.items:{},K=D.retrieveSchema(se),G=x$(S),J=Mb(w,t,y,r),fe=ym(l),le=T$(w,t,G,r)&&(!J||fe),z=fe?S:[],U=J?" rjsf-optional-array-field":"",I=e.childFieldPathId??o,P=J?N.jsx(Q,{...e,fieldPathId:I}):void 0,F={canAdd:le,items:z.map((ue,ge)=>{const{key:we,item:De}=ue,te=De,he=D.retrieveSchema(se,te),Se=i?i[ge]:void 0,Te=lo(ge,V,I),Re=C$(r,De,ge,q),Ce={itemKey:we,index:ge,name:c&&`${c}-${ge}`,registry:w,uiOptions:ie,hideError:v,readonly:h,disabled:d,required:y,title:M?`${M}-${ge+1}`:void 0,canAdd:le,canMoveUp:ge>0,canMoveDown:ge<G.length-1,itemSchema:he,itemFieldPathId:Te,itemErrorSchema:Se,itemData:te,itemUiSchema:Re,autofocus:m&&ge===0,onBlur:b,onFocus:T,rawErrors:x,totalItems:S.length,handleAddItem:O,handleCopyItem:_,handleRemoveItem:A,handleReorderItems:C,onChange:E};return N.jsx(O$,{...Ce},we)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${K.type}${U}`,disabled:d,fieldPathId:o,uiSchema:r,onAddClick:O,readonly:h,required:y,schema:t,title:M,formData:G,rawErrors:x,registry:w,optionalDataControl:P},re=Ut("ArrayFieldTemplate",w,ie);return N.jsx(re,{...F})}function Uue(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:o,fieldPathId:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:y=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:T,rawErrors:x,keyedFormData:E,onChange:S,handleAddItem:O,handleCopyItem:_,handleRemoveItem:A,handleReorderItems:C}=e;let{formData:M=[]}=e;const D=t.title||f||c,{schemaUtils:$,fields:q,formContext:V,globalFormOptions:Y,globalUiOptions:Q}=w,ie=At(r,Q),{OptionalDataControlsField:se}=q,K=Mb(w,t,y,r),G=ym(i),fe=(Dn(t.items)?t.items:[]).map((ge,we)=>$.retrieveSchema(ge,M[we])),le=Dn(t.additionalItems)?$.retrieveSchema(t.additionalItems,i):null,z=e.childFieldPathId??l;M.length<fe.length&&(M=M.concat(new Array(fe.length-M.length)));const U=G?E:[],I=K?" rjsf-optional-array-field":"",P=K?N.jsx(se,{...e,fieldPathId:z}):void 0,F=T$(w,t,M,r)&&!!le&&(!K||G),re={canAdd:F,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${I}`,disabled:d,fieldPathId:l,formData:i,items:U.map((ge,we)=>{const{key:De,item:te}=ge,he=te,Se=we>=fe.length,Te=(Se&&Dn(t.additionalItems)?$.retrieveSchema(t.additionalItems,he):fe[we])||{},Re=lo(we,Y,z);let Ce;Se?Ce=r.additionalItems:Array.isArray(r.items)?Ce=r.items[we]:Ce=C$(r,te,we,V);const Le=o?o[we]:void 0,nt={index:we,itemKey:De,name:c&&`${c}-${we}`,registry:w,uiOptions:ie,hideError:v,readonly:h,disabled:d,required:y,title:D?`${D}-${we+1}`:void 0,canAdd:F,canRemove:Se,canMoveUp:we>=fe.length+1,canMoveDown:Se&&we<M.length-1,itemSchema:Te,itemData:he,itemUiSchema:Ce,itemFieldPathId:Re,itemErrorSchema:Le,autofocus:m&&we===0,onBlur:b,onFocus:T,rawErrors:x,totalItems:E.length,onChange:S,handleAddItem:O,handleCopyItem:_,handleRemoveItem:A,handleReorderItems:C};return N.jsx(O$,{...nt},De)}),onAddClick:O,readonly:h,required:y,registry:w,schema:t,uiSchema:r,title:D,errorSchema:o,rawErrors:x,optionalDataControl:P},ue=Ut("ArrayFieldTemplate",w,ie);return N.jsx(ue,{...re})}function Iue(e=[]){const t=j.useMemo(()=>wl(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:Hj(e)}));let{keyedFormData:o,formDataHash:l}=r;if(t!==l){const f=Array.isArray(e)?e:[],d=o||[];o=f.length===d.length?d.map((h,m)=>({key:h.key,item:f[m]})):Hj(f),l=t,i({formDataHash:l,keyedFormData:o})}const c=j.useCallback(f=>{const d=x$(f),h=wl(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:o,updateKeyedFormData:c}}function Lue(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:o,registry:l,formData:c,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:y,updateKeyedFormData:v}=Iue(c),w=e.childFieldPathId??o,b=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const V in i){const Y=parseInt(V);M===void 0||Y<M?Vn(D,[Y],i[V]):Y>=M&&Vn(D,[Y+1],i[V])}}const $={key:AC(),item:Nue(l,t)},q=[...y];M!==void 0?q.splice(M,0,$):q.push($),f(v(q),w.path,D)},[y,l,t,f,v,i,w]),T=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const V in i){const Y=parseInt(V);Y<=M?Vn(D,[Y],i[V]):Y>M&&Vn(D,[Y+1],i[V])}}const $={key:AC(),item:gb(y[M].item)},q=[...y];M!==void 0?q.splice(M+1,0,$):q.push($),f(v(q),w.path,D)},[y,f,v,i,w]),x=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const q in i){const V=parseInt(q);V<M?Vn(D,[V],i[q]):V>M&&Vn(D,[V-1],i[q])}}const $=y.filter((q,V)=>V!==M);f(v($),w.path,D)},[y,f,v,i,w]),E=j.useCallback((C,M,D)=>{C&&(C.preventDefault(),C.currentTarget.blur());let $;if(i){$={};for(const Y in i){const Q=parseInt(Y);Q==M?Vn($,[D],i[M]):Q==D?Vn($,[M],i[D]):Vn($,[Y],i[Q])}}function q(){const Y=y.slice();return Y.splice(M,1),Y.splice(D,0,y[M]),Y}const V=q();f(v(V),w.path,$)},[y,f,v,i,w]),S=j.useCallback((C,M,D,$)=>{f(C===void 0?null:C,M,D,$)},[f]),O=j.useCallback(C=>{f(C,w.path,void 0,w?.[nr])},[f,w]),_={...e,formData:c,fieldPathId:w,onSelectChange:O},A={...e,handleAddItem:b,handleCopyItem:T,handleRemoveItem:x,handleReorderItems:E,keyedFormData:y,onChange:S};if(!(Gp in t)){if(!d.useFallbackUiForUnsupportedType){const M=At(r),D=Ut("UnsupportedFieldTemplate",l,M);return N.jsx(D,{schema:t,fieldPathId:o,reason:m(yn.MissingItems),registry:l})}const C={...t,[Gp]:{type:void 0}};_.schema=C,A.schema=C}return h.isMultiSelect(_.schema)?N.jsx(kue,{..._}):f$(r)?N.jsx(zue,{..._}):iR(_.schema)?N.jsx(Uue,{...A}):h.isFilesArray(_.schema,r)?N.jsx($ue,{..._}):N.jsx(Pue,{...A})}function que(e){const{schema:t,name:r,uiSchema:i,fieldPathId:o,formData:l,registry:c,required:f,disabled:d,readonly:h,hideError:m,autofocus:y,title:v,onChange:w,onFocus:b,onBlur:T,rawErrors:x}=e,{title:E}=t,{widgets:S,translateString:O,globalUiOptions:_}=c,{widget:A="checkbox",title:C,label:M=!0,enumNames:D,...$}=At(i,_),q=Ml(t,A,S),V=O(yn.YesLabel),Y=O(yn.NoLabel);let Q;const ie=C??E??v??r;if(Array.isArray(t.oneOf))Q=Kp({oneOf:t.oneOf.map(K=>{if(Dn(K))return{...K,title:K.title||(K.const===!0?V:Y)}}).filter(K=>K)},i);else{const K=t.enum??[!0,!1];!D&&K.length===2&&K.every(G=>typeof G=="boolean")?Q=[{value:K[0],label:K[0]?V:Y},{value:K[1],label:K[1]?V:Y}]:Q=Kp({enum:K},i)}const se=j.useCallback((K,G,J)=>w(K,o.path,G,J),[w,o]);return N.jsx(q,{options:{...$,enumOptions:Q},schema:t,uiSchema:i,id:o.$id,name:r,onChange:se,onFocus:b,onBlur:T,label:ie,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:c,autofocus:y,rawErrors:x,htmlName:o.name})}function Vue(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Bue(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Fue(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function Hue(e){const{id:t,formData:r,displayLabel:i=!0,schema:o,name:l,uiSchema:c,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:y,registry:v,fieldPathId:w,onChange:b,errorSchema:T}=e,{translateString:x,fields:E,globalFormOptions:S}=v,[O,_]=j.useState(Bue(r)),A=At(c),C=Gh(lo("__internal_type_selector",S,w)),M=x(yn.Type),D=j.useMemo(()=>Vue(M),[M]),$=Y=>{Y!=null&&(_(Y),b(Fue(r,Y),w.path,T,t))};if(!S.useFallbackUiForUnsupportedType){const{reason:Y=x(yn.UnknownFieldType,[String(o.type)])}=e,Q=Ut("UnsupportedFieldTemplate",v,A);return N.jsx(Q,{schema:o,fieldPathId:w,reason:Y,registry:v})}const q=Ut("FallbackFieldTemplate",v,A),{SchemaField:V}=E;return N.jsx(q,{schema:o,registry:v,typeSelector:N.jsx(V,{fieldPathId:C,name:`${l}__fallback_type`,schema:D,formData:O,onChange:$,onBlur:m,onFocus:y,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?wl(r):"__empty__"),schemaField:N.jsx(V,{...e,schema:{type:O,title:x(yn.Value),...O==="object"&&{additionalProperties:!0}}})})}var El;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(El||(El={}));var Cv;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Cv||(Cv={}));const Gue=/^\$lookup=(.+)/,Cx="layoutGrid";function Gj(e,t){return e??t}function Kue(e){return/^\d+?$/.test(e)}const Mc=lR();function Yue(e,t,r,i,o){const l=Be(r,[EC],{}),c=Be(r,e),f={...Be(c,[Ac],{}),...t,...l},d={...c};oa(f)||Vn(d,[Ac],f),oa(l)||Vn(d,[EC],l);let{readonly:h}=At(d);return(o===!0||i6(h)&&i===!0)&&(h=!0,_n(f,dx)?Vn(d,[Ac,dx],!0):Vn(d,`ui:${dx}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function Zue(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=xT([t]).sort(),o=xT([r]).sort();switch(e){case Cv.ALL:return Cc(i,o);case Cv.SOME:return o3(i,o).length>0;case Cv.NONE:return o3(i,o).length===0;default:return!1}}function Y2(e,t,r){let i={},o=e[t];if(zc(o)){const{children:l,className:c,...f}=o;if(o=l,c){const h=c.split(" ").map(m=>fR(r,m,m)).join(" ");i={...f,className:h}}else i=f}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:i}}function Kj(e,t,r){let i;if(Kue(r)&&e&&e?.type==="array"&&_n(e,Gp)){const o=Number(r),l=e[Gp];Array.isArray(l)?o>l.length?i=n6(l):i=l[o]:i=l,t={[nr]:t[nr],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:i,fieldPathId:t}}function Xue(e,t,r,i,o){const{schemaUtils:l,globalFormOptions:c}=e;let f=r,d=o;const h=t.split("."),m=h.pop();let y=l.retrieveSchema(f,i),v=i,w=y.readOnly;h.forEach(x=>{if(d=lo(x,c,d),_n(y,Pn))f=Be(y,[Pn,x],{});else if(y&&(_n(y,mn)||_n(y,jn))){const E=_n(y,mn)?mn:jn,S=l.findSelectedOptionInXxxOf(y,x,E,v);f=Be(S,[Pn,x],{})}else{const E=Kj(y,d,x);f=E.rawSchema??{},d=E.fieldPathId}v=Be(v,x,{}),y=l.retrieveSchema(f,v),w=Gj(y.readOnly,w)});let b,T=!1;if(oa(y)&&(y=void 0),y&&m){if(y&&(_n(y,mn)||_n(y,jn))){const E=_n(y,mn)?mn:jn;y=l.findSelectedOptionInXxxOf(y,m,E,v)}d=lo(m,c,d),T=y!==void 0&&Array.isArray(y.required)&&lG(y.required,m);const x=Kj(y,d,m);if(x.rawSchema?(y=x.rawSchema,d=x.fieldPathId):(y=Be(y,[Pn,m]),y=y&&l.retrieveSchema(y)),w=Gj(y?.readOnly,w),y&&(_n(y,mn)||_n(y,jn))){const E=_n(y,mn)?mn:jn,S=Rl(y);b={options:y[E],hasDiscriminator:!!S}}}return{schema:y,isRequired:T,isReadonly:w,optionsInfo:b,fieldPathId:d}}function Que(e,t){let r=e;return $c(r)&&(r=fR(t,r)),cb(r)?r:null}function Wue(e,t){let r,i=null,o={},l;if($c(t)||i6(t))r=t??"";else{const{name:c="",render:f,...d}=t;r=c,o=d,oa(o)||WH(o,(h,m)=>{if($c(h)){const y=Gue.exec(h);if(Array.isArray(y)&&y.length>1){const v=y[1];o[m]=fR(e,v,v)}}}),i=Que(f,e),!c&&i&&(l=N.jsx(i,{...d,"data-testid":Mc.uiComponent}))}return{name:r,UIComponent:i,uiProps:o,rendered:l}}function Z2(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:o,formData:l}=r,{schemaUtils:c}=i,f=c.retrieveSchema(o,l);return t.map(d=>j.createElement(pR,{...r,key:`layoutGrid-${wl(d)}`,schema:f,layoutGridSchema:d}))}function Jue(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:o}=r,{children:l,gridProps:c}=Y2(t,El.CONDITION,o),{operator:f,field:d="",value:h}=c,m=Be(i,d,null);return Zue(f,m,h)?N.jsx(Z2,{...r,childrenLayoutGridSchemaId:l}):null}function ece(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=Y2(t,El.COLUMN,i),f=At(o),d=Ut("GridTemplate",i,f);return N.jsx(d,{column:!0,"data-testid":Mc.col,...c,children:N.jsx(Z2,{...r,childrenLayoutGridSchemaId:l})})}function tce(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=Y2(t,El.COLUMNS,i),f=At(o),d=Ut("GridTemplate",i,f);return l.map(h=>N.jsx(d,{column:!0,"data-testid":Mc.col,...c,children:N.jsx(Z2,{...r,childrenLayoutGridSchemaId:[h]})},`column-${wl(h)}`))}function nce(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=Y2(t,El.ROW,i),f=At(o),d=Ut("GridTemplate",i,f);return N.jsx(d,{...c,"data-testid":Mc.row,children:N.jsx(Z2,{...r,childrenLayoutGridSchemaId:l})})}function rce(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:o,fieldPathId:l,onBlur:c,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:y,...v}=e,{onChange:w}=v,{fields:b}=m,{SchemaField:T,LayoutMultiSchemaField:x}=b,E=Wue(m,t),{name:S,UIComponent:O,uiProps:_}=E,{schema:A,isRequired:C,isReadonly:M,optionsInfo:D,fieldPathId:$}=Xue(m,S,r,d,l),q=Gh($);if(E.rendered)return E.rendered;if(A){const V=D?.hasDiscriminator?x:T,{fieldUiSchema:Y,uiReadonly:Q}=Yue(S,_,i,M,h);return N.jsx(V,{"data-testid":D?.hasDiscriminator?Mc.layoutMultiSchemaField:Mc.field,...v,name:S,required:C,readonly:Q,schema:A,uiSchema:Y,errorSchema:Be(o,S),fieldPathId:q,formData:Be(d,S),onChange:w,onBlur:c,onFocus:f,options:D?.options,registry:m})}return O?N.jsx(O,{"data-testid":Mc.uiComponent,...v,name:S,required:C,formData:d,readOnly:!!M||h,errorSchema:o,uiSchema:i,schema:r,fieldPathId:l,onBlur:c,onFocus:f,registry:m,..._}):null}function pR(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=At(t);if(!r&&Cx in i&&Dn(i[Cx])&&(r=i[Cx]),Dn(r)){if(El.ROW in r)return N.jsx(nce,{...e,layoutGridSchema:r});if(El.COLUMN in r)return N.jsx(ece,{...e,layoutGridSchema:r});if(El.COLUMNS in r)return N.jsx(tce,{...e,layoutGridSchema:r});if(El.CONDITION in r)return N.jsx(Jue,{...e,layoutGridSchema:r})}return N.jsx(rce,{...e,gridSchema:r})}pR.TEST_IDS=Mc;function ace(e){const{fieldPathId:t,title:r,schema:i,uiSchema:o,required:l,registry:c,name:f}=e,d=At(o,c.globalUiOptions),{title:h}=d,{title:m}=i,y=h||r||m||f;if(!y)return null;const v=Ut("TitleFieldTemplate",c,d);return N.jsx(v,{id:K2(t),title:y,required:l,schema:i,uiSchema:o,registry:c})}function Ox(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const c=Be(l,[Pn,t]);return Be(c,H2,Be(c,oo,i))===r})}function Yj(e,t,r,i,o){const l=t.map(d=>r.retrieveSchema(d,o));let c=e;_n(e,mn)?c={...e,[mn]:l}:_n(e,jn)&&(c={...e,[jn]:l});const f=Kp(c,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(c)}`);return f}function ice(e){const{name:t,baseType:r,disabled:i=!1,formData:o,fieldPathId:l,onBlur:c,onChange:f,options:d,onFocus:h,registry:m,uiSchema:y,schema:v,autofocus:w,readonly:b,required:T,errorSchema:x,hideError:E=!1}=e,{widgets:S,schemaUtils:O,globalUiOptions:_}=m,[A,C]=j.useState(Yj(v,d,O,y,o)),M=Be(l,nr),D=Rl(v),$=Ut("FieldErrorTemplate",m,d),q=Ut("FieldTemplate",m,d),V=wl(v),Y=wl(d),Q=y?wl(y):"",ie=o?wl(o):"";j.useEffect(()=>{C(Yj(v,d,O,y,o))},[V,Y,O,Q,ie]);const{widget:se=D?"radio":"select",title:K="",placeholder:G="",optionsSchemaSelector:J=D,hideError:fe,...le}=At(y);if(!J)throw new Error("No selector field provided for the LayoutMultiSchemaField");const z=Be(o,J);let U=Be(A[0]?.schema,[Pn,J],{});const I=Ox(A,J,z);U=U?.type?U:{...U,type:I?.type||r};const P=Ml(U,se,S),F=fe===void 0?E:!!fe,re=Be(x,[ci],[]),ue=Iv(x,[ci]),ge=O.getDisplayLabel(v,y,_),we=he=>{const Se=Ox(A,J,he),Te=Ox(A,J,z);let Re=O.sanitizeDataForNewSchema(Se,Te,o);Re&&Se&&(Re=O.getDefaultFormState(Se,Re,"excludeObjectChildren")),Re&&Vn(Re,J,he),f(Re,l.path,void 0,M)},De={enumOptions:A,...le},te=!F&&re.length>0?N.jsx($,{fieldPathId:l,schema:v,errors:re,registry:m}):void 0;return N.jsx(q,{id:M,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(A)&&oa(A),uiSchema:y,required:T,readonly:!!b,registry:m,displayLabel:ge,errors:te,onChange:f,onKeyRename:oS,onKeyRenameBlur:oS,onRemoveProperty:oS,children:N.jsx(P,{id:M,name:t,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(A)&&oa(A),uiSchema:y,autofocus:w,readonly:b,required:T,registry:m,multiple:!1,rawErrors:re,hideError:F,hideLabel:!ge,errorSchema:ue,placeholder:G,onChange:we,onBlur:c,onFocus:h,value:z,options:De,htmlName:l.name})})}class Zj extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:o}}=this.props,l=i.map(c=>o.retrieveSchema(c,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:o,fieldPathId:l}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!pr(t.options,o)){const{registry:{schemaUtils:d}}=this.props,h=o.map(m=>d.retrieveSchema(m,i));f={selectedOption:c,retrievedOptions:h}}if(!pr(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(c,i,d);r&&h!==c&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:o,registry:{schemaUtils:l}}=this.props,c=Rl(o);return l.getClosestMatchingOption(r,i,t,c)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:o,onChange:l,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,h=t!==void 0?parseInt(t,10):-1;if(h===r)return;const m=h>=0?i[h]:void 0,y=r>=0?i[r]:void 0;let v=d.sanitizeDataForNewSchema(m,y,o);m&&(v=d.getDefaultFormState(m,v,"excludeObjectChildren")),this.setState({selectedOption:h},()=>{l(v,f.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:r}=this.props;return`${t.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:r=!1,errorSchema:i={},formData:o,onBlur:l,onFocus:c,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:y}=this.props,{widgets:v,fields:w,translateString:b,globalUiOptions:T,schemaUtils:x}=h,{SchemaField:E}=w,S=Ut("MultiSchemaFieldTemplate",h,T),O=Mb(h,m,d,y),_=ym(o),{selectedOption:A,retrievedOptions:C}=this.state,{widget:M="select",placeholder:D,autofocus:$,autocomplete:q,title:V=m.title,...Y}=At(y,T),Q=Ml({type:"number"},M,v),ie=Be(i,ci,[]),se=Iv(i,[ci]),K=x.getDisplayLabel(m,y,T),G=A>=0&&C[A]||null;let J;if(G){const{required:re}=m;J=re?ic({required:re},G):G}let fe=[];mn in m&&y&&mn in y?Array.isArray(y[mn])?fe=y[mn]:console.warn(`uiSchema.oneOf is not an array for "${V||t}"`):jn in m&&y&&jn in y&&(Array.isArray(y[jn])?fe=y[jn]:console.warn(`uiSchema.anyOf is not an array for "${V||t}"`));let le=y;A>=0&&fe.length>A&&(le=fe[A]);const z=V?yn.TitleOptionPrefix:yn.OptionPrefix,U=V?[V]:[],I=C.map((re,ue)=>{const{title:ge=re.title}=At(fe[ue]);return{label:ge||b(z,U.concat(String(ue+1))),value:ue}}),P=!O||_?N.jsx(Q,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:c,disabled:r||oa(I),multiple:!1,rawErrors:ie,errorSchema:se,value:A>=0?A:void 0,options:{enumOptions:I,...Y},registry:h,placeholder:D,autocomplete:q,autofocus:$,label:V??t,hideLabel:!K,readonly:f}):void 0,F=J&&J.type!=="null"&&N.jsx(E,{...this.props,schema:J,uiSchema:le})||null;return N.jsx(S,{schema:m,registry:h,uiSchema:y,selector:P,optionSchemaField:F})}}const sce=/\.([0-9]*0)*$/,oce=/[0.]0*$/;function lce(e){const{registry:t,onChange:r,formData:i,value:o}=e,[l,c]=j.useState(o),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,y,v,w)=>{c(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match(sce)?wj(m.replace(oce,"")):wj(m);r(b,y,v,w)},[r]);if(typeof l=="string"&&typeof d=="number"){const m=new RegExp(`^(${String(d).replace(".","\\.")})?\\.?0*$`);l.match(m)&&(d=l)}return N.jsx(f,{...e,formData:d,onChange:h})}function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},yl.apply(null,arguments)}const I1=["strong","em","del","mark"],Xj=[["**",I1[0]],["__",I1[0]],["~~",I1[2]],["==",I1[3]],["*","em"],["_","em"]];function uce(e,t){for(var r=1,i=t+1;i<e.length&&r>0;)e[i]!=="\\"?(e[i]==="["&&r++,e[i]==="]"&&r--,i++):i+=2;if(r===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var o=e[i]==="("?")":"]",l=1;for(i++;i<e.length&&l>0;)e[i]!=="\\"?(e[i]==="("&&o===")"&&l++,e[i]===o&&l--,i++):i+=2;if(l===0)return i}return-1}function cce(e,t){if(!t||!t.inline&&!t.simple)return null;var r=e[0];if(r!=="*"&&r!=="_"&&r!=="~"&&r!=="=")return null;for(var i="",o=0,l="",c=0;c<6;c++){var f=Xj[c][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,o=f.length,l=Xj[c][1];break}}if(!i)return null;for(var d=o,h=!1,m=!1,y="",v=0,w="",b=!1,T="";d<e.length;){var x=e[d];if(b)w+=x,b=!1,T=x,d++;else if(x!=="\\")if(x!=="`"||v!==0){if(x==="["&&!h&&v===0){var E=uce(e,d);if(E!==-1){w+=e.slice(d,E),d=E,T=e[E-1];continue}}if(m)w+=x,y?x===y&&(y=""):x==='"'||x==="'"?y=x:x===">"&&(m=!1),T=x,d++;else if(x!=="<"||h){if(x===`
61
61
  `&&T===`
62
62
  `&&!h&&v===0)return null;if(!h&&v===0){for(var S=0;d+S<e.length&&e[d+S]===i[0];)S++;if(S>=o&&(o!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var O=[e.slice(0,d+S),l,w+e.slice(d+o,d+S)];return O.index=0,O.input=e,O}}w+=x,T=x,d++}else{var _=e[d+1],A=e.indexOf(">",d);if(A!==-1){var C=e.slice(d,A+1).endsWith("/>");_==="/"?v=Math.max(0,v-1):C||v++}m=!0,w+=x,T=x,d++}}else h=!h,w+=x,T=x,d++;else w+=x,b=!0,T=x,d++}return null}const fce=["children","options"],Qj=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Wj={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},dce=["style","script","pre"],hce=["src","href","data","formAction","srcDoc","action"],pce=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,mce=/\n{2,}$/,Jj=/^(\s*>[\s\S]*?)(?=\n\n|$)/,gce=/^ *> ?/gm,yce=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,vce=/^ {2,}\n/,bce=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,eD=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,tD=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Sce=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,wce=/^(?:\n *)*\n/,_ce=/\r\n?/g,Ece=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,xce=/^\[\^([^\]]+)]/,Tce=/\f/g,Cce=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Oce=/^\[(x|\s)\]/,nD=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,rD=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,aD=/^([^\n]+)\n *(=|-)\2{2,} *\n/,mR=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Ace(e){const t=mR.exec(e);if(!t)return null;const r=t[1],i=r.toLowerCase(),o=i.length+1;let l=t[0].length;e[l]===`