@tarot-ai/pixel 0.0.2 → 0.0.4

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.
@@ -0,0 +1,352 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["view-assets/App-BkF1Yv4U.js","view-assets/App-BEih8O7c.css"])))=>i.map(i=>d[i]);
2
+ var K1=Object.defineProperty;var J1=(t,a,l)=>a in t?K1(t,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[a]=l;var _i=(t,a,l)=>J1(t,typeof a!="symbol"?a+"":a,l);function ew(t,a){for(var l=0;l<a.length;l++){const o=a[l];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in t)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function tw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cd={exports:{}},ml={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Eg;function nw(){if(Eg)return ml;Eg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var f in s)f!=="key"&&(c[f]=s[f])}else c=s;return s=c.ref,{$$typeof:t,type:o,key:d,ref:s!==void 0?s:null,props:c}}return ml.Fragment=a,ml.jsx=l,ml.jsxs=l,ml}var Ag;function iw(){return Ag||(Ag=1,cd.exports=nw()),cd.exports}var m=iw(),ud={exports:{}},Ne={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Tg;function aw(){if(Tg)return Ne;Tg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function y($){return $===null||typeof $!="object"?null:($=w&&$[w]||$["@@iterator"],typeof $=="function"?$:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,j={};function A($,Z,ie){this.props=$,this.context=Z,this.refs=j,this.updater=ie||S}A.prototype.isReactComponent={},A.prototype.setState=function($,Z){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,Z,"setState")},A.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function _(){}_.prototype=A.prototype;function z($,Z,ie){this.props=$,this.context=Z,this.refs=j,this.updater=ie||S}var R=z.prototype=new _;R.constructor=z,C(R,A.prototype),R.isPureReactComponent=!0;var E=Array.isArray;function T(){}var D={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function V($,Z,ie){var re=ie.ref;return{$$typeof:t,type:$,key:Z,ref:re!==void 0?re:null,props:ie}}function te($,Z){return V($.type,Z,$.props)}function J($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function q($){var Z={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(ie){return Z[ie]})}var ne=/\/+/g;function ae($,Z){return typeof $=="object"&&$!==null&&$.key!=null?q(""+$.key):Z.toString(36)}function oe($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(T,T):($.status="pending",$.then(function(Z){$.status==="pending"&&($.status="fulfilled",$.value=Z)},function(Z){$.status==="pending"&&($.status="rejected",$.reason=Z)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function U($,Z,ie,re,fe){var pe=typeof $;(pe==="undefined"||pe==="boolean")&&($=null);var je=!1;if($===null)je=!0;else switch(pe){case"bigint":case"string":case"number":je=!0;break;case"object":switch($.$$typeof){case t:case a:je=!0;break;case x:return je=$._init,U(je($._payload),Z,ie,re,fe)}}if(je)return fe=fe($),je=re===""?"."+ae($,0):re,E(fe)?(ie="",je!=null&&(ie=je.replace(ne,"$&/")+"/"),U(fe,Z,ie,"",function($t){return $t})):fe!=null&&(J(fe)&&(fe=te(fe,ie+(fe.key==null||$&&$.key===fe.key?"":(""+fe.key).replace(ne,"$&/")+"/")+je)),Z.push(fe)),1;je=0;var et=re===""?".":re+":";if(E($))for(var ye=0;ye<$.length;ye++)re=$[ye],pe=et+ae(re,ye),je+=U(re,Z,ie,pe,fe);else if(ye=y($),typeof ye=="function")for($=ye.call($),ye=0;!(re=$.next()).done;)re=re.value,pe=et+ae(re,ye++),je+=U(re,Z,ie,pe,fe);else if(pe==="object"){if(typeof $.then=="function")return U(oe($),Z,ie,re,fe);throw Z=String($),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return je}function Q($,Z,ie){if($==null)return $;var re=[],fe=0;return U($,re,"","",function(pe){return Z.call(ie,pe,fe++)}),re}function K($){if($._status===-1){var Z=$._result;Z=Z(),Z.then(function(ie){($._status===0||$._status===-1)&&($._status=1,$._result=ie)},function(ie){($._status===0||$._status===-1)&&($._status=2,$._result=ie)}),$._status===-1&&($._status=0,$._result=Z)}if($._status===1)return $._result.default;throw $._result}var de=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},ee={map:Q,forEach:function($,Z,ie){Q($,function(){Z.apply(this,arguments)},ie)},count:function($){var Z=0;return Q($,function(){Z++}),Z},toArray:function($){return Q($,function(Z){return Z})||[]},only:function($){if(!J($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Ne.Activity=v,Ne.Children=ee,Ne.Component=A,Ne.Fragment=l,Ne.Profiler=s,Ne.PureComponent=z,Ne.StrictMode=o,Ne.Suspense=p,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ne.__COMPILER_RUNTIME={__proto__:null,c:function($){return D.H.useMemoCache($)}},Ne.cache=function($){return function(){return $.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function($,Z,ie){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var re=C({},$.props),fe=$.key;if(Z!=null)for(pe in Z.key!==void 0&&(fe=""+Z.key),Z)!k.call(Z,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&Z.ref===void 0||(re[pe]=Z[pe]);var pe=arguments.length-2;if(pe===1)re.children=ie;else if(1<pe){for(var je=Array(pe),et=0;et<pe;et++)je[et]=arguments[et+2];re.children=je}return V($.type,fe,re)},Ne.createContext=function($){return $={$$typeof:d,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:c,_context:$},$},Ne.createElement=function($,Z,ie){var re,fe={},pe=null;if(Z!=null)for(re in Z.key!==void 0&&(pe=""+Z.key),Z)k.call(Z,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(fe[re]=Z[re]);var je=arguments.length-2;if(je===1)fe.children=ie;else if(1<je){for(var et=Array(je),ye=0;ye<je;ye++)et[ye]=arguments[ye+2];fe.children=et}if($&&$.defaultProps)for(re in je=$.defaultProps,je)fe[re]===void 0&&(fe[re]=je[re]);return V($,pe,fe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function($){return{$$typeof:f,render:$}},Ne.isValidElement=J,Ne.lazy=function($){return{$$typeof:x,_payload:{_status:-1,_result:$},_init:K}},Ne.memo=function($,Z){return{$$typeof:g,type:$,compare:Z===void 0?null:Z}},Ne.startTransition=function($){var Z=D.T,ie={};D.T=ie;try{var re=$(),fe=D.S;fe!==null&&fe(ie,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(T,de)}catch(pe){de(pe)}finally{Z!==null&&ie.types!==null&&(Z.types=ie.types),D.T=Z}},Ne.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ne.use=function($){return D.H.use($)},Ne.useActionState=function($,Z,ie){return D.H.useActionState($,Z,ie)},Ne.useCallback=function($,Z){return D.H.useCallback($,Z)},Ne.useContext=function($){return D.H.useContext($)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function($,Z){return D.H.useDeferredValue($,Z)},Ne.useEffect=function($,Z){return D.H.useEffect($,Z)},Ne.useEffectEvent=function($){return D.H.useEffectEvent($)},Ne.useId=function(){return D.H.useId()},Ne.useImperativeHandle=function($,Z,ie){return D.H.useImperativeHandle($,Z,ie)},Ne.useInsertionEffect=function($,Z){return D.H.useInsertionEffect($,Z)},Ne.useLayoutEffect=function($,Z){return D.H.useLayoutEffect($,Z)},Ne.useMemo=function($,Z){return D.H.useMemo($,Z)},Ne.useOptimistic=function($,Z){return D.H.useOptimistic($,Z)},Ne.useReducer=function($,Z,ie){return D.H.useReducer($,Z,ie)},Ne.useRef=function($){return D.H.useRef($)},Ne.useState=function($){return D.H.useState($)},Ne.useSyncExternalStore=function($,Z,ie){return D.H.useSyncExternalStore($,Z,ie)},Ne.useTransition=function(){return D.H.useTransition()},Ne.version="19.2.7",Ne}var zg;function qd(){return zg||(zg=1,ud.exports=aw()),ud.exports}var N=qd();const so=tw(N),Pd=ew({__proto__:null,default:so},[N]);var dd={exports:{}},pl={},fd={exports:{}},hd={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Rg;function ow(){return Rg||(Rg=1,(function(t){function a(U,Q){var K=U.length;U.push(Q);e:for(;0<K;){var de=K-1>>>1,ee=U[de];if(0<s(ee,Q))U[de]=Q,U[K]=ee,K=de;else break e}}function l(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var Q=U[0],K=U.pop();if(K!==Q){U[0]=K;e:for(var de=0,ee=U.length,$=ee>>>1;de<$;){var Z=2*(de+1)-1,ie=U[Z],re=Z+1,fe=U[re];if(0>s(ie,K))re<ee&&0>s(fe,ie)?(U[de]=fe,U[re]=K,de=re):(U[de]=ie,U[Z]=K,de=Z);else if(re<ee&&0>s(fe,K))U[de]=fe,U[re]=K,de=re;else break e}}return Q}function s(U,Q){var K=U.sortIndex-Q.sortIndex;return K!==0?K:U.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var p=[],g=[],x=1,v=null,w=3,y=!1,S=!1,C=!1,j=!1,A=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function R(U){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=U)o(g),Q.sortIndex=Q.expirationTime,a(p,Q);else break;Q=l(g)}}function E(U){if(C=!1,R(U),!S)if(l(p)!==null)S=!0,T||(T=!0,q());else{var Q=l(g);Q!==null&&oe(E,Q.startTime-U)}}var T=!1,D=-1,k=5,V=-1;function te(){return j?!0:!(t.unstable_now()-V<k)}function J(){if(j=!1,T){var U=t.unstable_now();V=U;var Q=!0;try{e:{S=!1,C&&(C=!1,_(D),D=-1),y=!0;var K=w;try{t:{for(R(U),v=l(p);v!==null&&!(v.expirationTime>U&&te());){var de=v.callback;if(typeof de=="function"){v.callback=null,w=v.priorityLevel;var ee=de(v.expirationTime<=U);if(U=t.unstable_now(),typeof ee=="function"){v.callback=ee,R(U),Q=!0;break t}v===l(p)&&o(p),R(U)}else o(p);v=l(p)}if(v!==null)Q=!0;else{var $=l(g);$!==null&&oe(E,$.startTime-U),Q=!1}}break e}finally{v=null,w=K,y=!1}Q=void 0}}finally{Q?q():T=!1}}}var q;if(typeof z=="function")q=function(){z(J)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,ae=ne.port2;ne.port1.onmessage=J,q=function(){ae.postMessage(null)}}else q=function(){A(J,0)};function oe(U,Q){D=A(function(){U(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_next=function(U){switch(w){case 1:case 2:case 3:var Q=3;break;default:Q=w}var K=w;w=Q;try{return U()}finally{w=K}},t.unstable_requestPaint=function(){j=!0},t.unstable_runWithPriority=function(U,Q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var K=w;w=U;try{return Q()}finally{w=K}},t.unstable_scheduleCallback=function(U,Q,K){var de=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?de+K:de):K=de,U){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=K+ee,U={id:x++,callback:Q,priorityLevel:U,startTime:K,expirationTime:ee,sortIndex:-1},K>de?(U.sortIndex=K,a(g,U),l(p)===null&&U===l(g)&&(C?(_(D),D=-1):C=!0,oe(E,K-de))):(U.sortIndex=ee,a(p,U),S||y||(S=!0,T||(T=!0,q()))),U},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(U){var Q=w;return function(){var K=w;w=Q;try{return U.apply(this,arguments)}finally{w=K}}}})(hd)),hd}var Og;function lw(){return Og||(Og=1,fd.exports=ow()),fd.exports}var md={exports:{}},zt={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var kg;function rw(){if(kg)return zt;kg=1;var t=qd();function a(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,g,x){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:v==null?null:""+v,children:p,containerInfo:g,implementation:x}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,zt.createPortal=function(p,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return c(p,g,null,x)},zt.flushSync=function(p){var g=d.T,x=o.p;try{if(d.T=null,o.p=2,p)return p()}finally{d.T=g,o.p=x,o.d.f()}},zt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(p,g))},zt.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},zt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var x=g.as,v=f(x,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?o.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:y}):x==="script"&&o.d.X(p,{crossOrigin:v,integrity:w,fetchPriority:y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},zt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=f(g.as,g.crossOrigin);o.d.M(p,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(p)},zt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,v=f(x,g.crossOrigin);o.d.L(p,x,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},zt.preloadModule=function(p,g){if(typeof p=="string")if(g){var x=f(g.as,g.crossOrigin);o.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(p)},zt.requestFormReset=function(p){o.d.r(p)},zt.unstable_batchedUpdates=function(p,g){return p(g)},zt.useFormState=function(p,g,x){return d.H.useFormState(p,g,x)},zt.useFormStatus=function(){return d.H.useHostTransitionStatus()},zt.version="19.2.7",zt}var _g;function nv(){if(_g)return md.exports;_g=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),md.exports=rw(),md.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Dg;function sw(){if(Dg)return pl;Dg=1;var t=lw(),a=qd(),l=nv();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function f(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(o(188))}function g(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(o(188));return n!==e?null:e}for(var i=e,r=n;;){var u=i.return;if(u===null)break;var h=u.alternate;if(h===null){if(r=u.return,r!==null){i=r;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===i)return p(u),e;if(h===r)return p(u),n;h=h.sibling}throw Error(o(188))}if(i.return!==r.return)i=u,r=h;else{for(var b=!1,M=u.child;M;){if(M===i){b=!0,i=u,r=h;break}if(M===r){b=!0,r=u,i=h;break}M=M.sibling}if(!b){for(M=h.child;M;){if(M===i){b=!0,i=h,r=u;break}if(M===r){b=!0,r=h,i=u;break}M=M.sibling}if(!b)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),z=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case A:return"Profiler";case j:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList";case V:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case z:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case R:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return n=e.displayName||null,n!==null?n:ae(e.type)||"Memo";case k:n=e._payload,e=e._init;try{return ae(e(n))}catch{}}return null}var oe=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},de=[],ee=-1;function $(e){return{current:e}}function Z(e){0>ee||(e.current=de[ee],de[ee]=null,ee--)}function ie(e,n){ee++,de[ee]=e.current,e.current=n}var re=$(null),fe=$(null),pe=$(null),je=$(null);function et(e,n){switch(ie(pe,n),ie(fe,e),ie(re,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Fp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Fp(n),e=Wp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(re),ie(re,e)}function ye(){Z(re),Z(fe),Z(pe)}function $t(e){e.memoizedState!==null&&ie(je,e);var n=re.current,i=Wp(n,e.type);n!==i&&(ie(fe,e),ie(re,i))}function kt(e){fe.current===e&&(Z(re),Z(fe)),je.current===e&&(Z(je),ul._currentValue=K)}var Lt,on;function ft(e){if(Lt===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);Lt=n&&n[1]||"",on=-1<i.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Lt+e+on}var ve=!1;function De(e,n){if(!e||ve)return"";ve=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(X){var G=X}Reflect.construct(e,[],W)}else{try{W.call()}catch(X){G=X}e.call(W.prototype)}}else{try{throw Error()}catch(X){G=X}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(X){if(X&&G&&typeof X.stack=="string")return[X.stack,G.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),b=h[0],M=h[1];if(b&&M){var O=b.split(`
45
+ `),I=M.split(`
46
+ `);for(u=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;if(r===O.length||u===I.length)for(r=O.length-1,u=I.length-1;1<=r&&0<=u&&O[r]!==I[u];)u--;for(;1<=r&&0<=u;r--,u--)if(O[r]!==I[u]){if(r!==1||u!==1)do if(r--,u--,0>u||O[r]!==I[u]){var P=`
47
+ `+O[r].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=r&&0<=u);break}}}finally{ve=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ft(i):""}function we(e,n){switch(e.tag){case 26:case 27:case 5:return ft(e.type);case 16:return ft("Lazy");case 13:return e.child!==n&&n!==null?ft("Suspense Fallback"):ft("Suspense");case 19:return ft("SuspenseList");case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return ft("Activity");default:return""}}function Se(e){try{var n="",i=null;do n+=we(e,i),i=e,e=e.return;while(e);return n}catch(r){return`
48
+ Error generating stack: `+r.message+`
49
+ `+r.stack}}var Ae=Object.prototype.hasOwnProperty,me=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,le=t.unstable_shouldYield,xt=t.unstable_requestPaint,Fe=t.unstable_now,Sn=t.unstable_getCurrentPriorityLevel,_l=t.unstable_ImmediatePriority,_t=t.unstable_UserBlockingPriority,Vi=t.unstable_NormalPriority,Nn=t.unstable_LowPriority,si=t.unstable_IdlePriority,Xi=t.log,Dy=t.unstable_setDisableYieldValue,So=null,Qt=null;function ci(e){if(typeof Xi=="function"&&Dy(e),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(So,e)}catch{}}var Zt=Math.clz32?Math.clz32:Uy,$y=Math.log,Ly=Math.LN2;function Uy(e){return e>>>=0,e===0?32:31-($y(e)/Ly|0)|0}var Dl=256,$l=262144,Ll=4194304;function qi(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ul(e,n,i){var r=e.pendingLanes;if(r===0)return 0;var u=0,h=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var M=r&134217727;return M!==0?(r=M&~h,r!==0?u=qi(r):(b&=M,b!==0?u=qi(b):i||(i=M&~e,i!==0&&(u=qi(i))))):(M=r&~h,M!==0?u=qi(M):b!==0?u=qi(b):i||(i=r&~e,i!==0&&(u=qi(i)))),u===0?0:n!==0&&n!==u&&(n&h)===0&&(h=u&-u,i=n&-n,h>=i||h===32&&(i&4194048)!==0)?n:u}function No(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function By(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rf(){var e=Ll;return Ll<<=1,(Ll&62914560)===0&&(Ll=4194304),e}function Ws(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Co(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hy(e,n,i,r,u,h){var b=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var M=e.entanglements,O=e.expirationTimes,I=e.hiddenUpdates;for(i=b&~i;0<i;){var P=31-Zt(i),W=1<<P;M[P]=0,O[P]=-1;var G=I[P];if(G!==null)for(I[P]=null,P=0;P<G.length;P++){var X=G[P];X!==null&&(X.lane&=-536870913)}i&=~W}r!==0&&Of(e,r,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(b&~n))}function Of(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-Zt(n);e.entangledLanes|=n,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function kf(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var r=31-Zt(i),u=1<<r;u&n|e[r]&n&&(e[r]|=n),i&=~u}}function _f(e,n){var i=n&-n;return i=(i&42)!==0?1:Ks(i),(i&(e.suspendedLanes|n))!==0?0:i}function Ks(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Js(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Df(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:yg(e.type))}function $f(e,n){var i=Q.p;try{return Q.p=e,n()}finally{Q.p=i}}var ui=Math.random().toString(36).slice(2),Nt="__reactFiber$"+ui,Ut="__reactProps$"+ui,ya="__reactContainer$"+ui,ec="__reactEvents$"+ui,Yy="__reactListeners$"+ui,Iy="__reactHandles$"+ui,Lf="__reactResources$"+ui,Mo="__reactMarker$"+ui;function tc(e){delete e[Nt],delete e[Ut],delete e[ec],delete e[Yy],delete e[Iy]}function wa(e){var n=e[Nt];if(n)return n;for(var i=e.parentNode;i;){if(n=i[ya]||i[Nt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=ag(e);e!==null;){if(i=e[Nt])return i;e=ag(e)}return n}e=i,i=e.parentNode}return null}function Sa(e){if(e=e[Nt]||e[ya]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function jo(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function Na(e){var n=e[Lf];return n||(n=e[Lf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function vt(e){e[Mo]=!0}var Uf=new Set,Bf={};function Pi(e,n){Ca(e,n),Ca(e+"Capture",n)}function Ca(e,n){for(Bf[e]=n,e=0;e<n.length;e++)Uf.add(n[e])}var Gy=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hf={},Yf={};function Vy(e){return Ae.call(Yf,e)?!0:Ae.call(Hf,e)?!1:Gy.test(e)?Yf[e]=!0:(Hf[e]=!0,!1)}function Bl(e,n,i){if(Vy(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Hl(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Un(e,n,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+r)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function If(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Xy(e,n,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,h=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(b){i=""+b,h.call(this,b)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(b){i=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function nc(e){if(!e._valueTracker){var n=If(e)?"checked":"value";e._valueTracker=Xy(e,n,""+e[n])}}function Gf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),r="";return e&&(r=If(e)?e.checked?"true":"false":e.value),e=r,e!==i?(n.setValue(e),!0):!1}function Yl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var qy=/[\n"\\]/g;function rn(e){return e.replace(qy,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ic(e,n,i,r,u,h,b,M){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+ln(n)):e.value!==""+ln(n)&&(e.value=""+ln(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?ac(e,b,ln(n)):i!=null?ac(e,b,ln(i)):r!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+ln(M):e.removeAttribute("name")}function Vf(e,n,i,r,u,h,b,M){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){nc(e);return}i=i!=null?""+ln(i):"",n=n!=null?""+ln(n):i,M||n===e.value||(e.value=n),e.defaultValue=n}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=M?e.checked:!!r,e.defaultChecked=!!r,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),nc(e)}function ac(e,n,i){n==="number"&&Yl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ma(e,n,i,r){if(e=e.options,n){n={};for(var u=0;u<i.length;u++)n["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=n.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&r&&(e[i].defaultSelected=!0)}else{for(i=""+ln(i),n=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,r&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Xf(e,n,i){if(n!=null&&(n=""+ln(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+ln(i):""}function qf(e,n,i,r){if(n==null){if(r!=null){if(i!=null)throw Error(o(92));if(oe(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),n=i}i=ln(n),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),nc(e)}function ja(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Py=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Pf(e,n,i){var r=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":r?e.setProperty(n,i):typeof i!="number"||i===0||Py.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function Qf(e,n,i){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var u in n)r=n[u],n.hasOwnProperty(u)&&i[u]!==r&&Pf(e,u,r)}else for(var h in n)n.hasOwnProperty(h)&&Pf(e,h,n[h])}function oc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Zy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Il(e){return Zy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bn(){}var lc=null;function rc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,Aa=null;function Zf(e){var n=Sa(e);if(n&&(e=n.stateNode)){var i=e[Ut]||null;e:switch(e=n.stateNode,n.type){case"input":if(ic(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+rn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var r=i[n];if(r!==e&&r.form===e.form){var u=r[Ut]||null;if(!u)throw Error(o(90));ic(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<i.length;n++)r=i[n],r.form===e.form&&Gf(r)}break e;case"textarea":Xf(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ma(e,!!i.multiple,n,!1)}}}var sc=!1;function Ff(e,n,i){if(sc)return e(n,i);sc=!0;try{var r=e(n);return r}finally{if(sc=!1,(Ea!==null||Aa!==null)&&(Tr(),Ea&&(n=Ea,e=Aa,Aa=Ea=null,Zf(n),e)))for(n=0;n<e.length;n++)Zf(e[n])}}function Eo(e,n){var i=e.stateNode;if(i===null)return null;var r=i[Ut]||null;if(r===null)return null;i=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,n,typeof i));return i}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cc=!1;if(Hn)try{var Ao={};Object.defineProperty(Ao,"passive",{get:function(){cc=!0}}),window.addEventListener("test",Ao,Ao),window.removeEventListener("test",Ao,Ao)}catch{cc=!1}var di=null,uc=null,Gl=null;function Wf(){if(Gl)return Gl;var e,n=uc,i=n.length,r,u="value"in di?di.value:di.textContent,h=u.length;for(e=0;e<i&&n[e]===u[e];e++);var b=i-e;for(r=1;r<=b&&n[i-r]===u[h-r];r++);return Gl=u.slice(e,1<r?1-r:void 0)}function Vl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Xl(){return!0}function Kf(){return!1}function Bt(e){function n(i,r,u,h,b){this._reactName=i,this._targetInst=u,this.type=r,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(i=e[M],this[M]=i?i(h):h[M]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Xl:Kf,this.isPropagationStopped=Kf,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Xl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),n}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ql=Bt(Qi),To=v({},Qi,{view:0,detail:0}),Fy=Bt(To),dc,fc,zo,Pl=v({},To,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zo&&(zo&&e.type==="mousemove"?(dc=e.screenX-zo.screenX,fc=e.screenY-zo.screenY):fc=dc=0,zo=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),Jf=Bt(Pl),Wy=v({},Pl,{dataTransfer:0}),Ky=Bt(Wy),Jy=v({},To,{relatedTarget:0}),hc=Bt(Jy),e0=v({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=Bt(e0),n0=v({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i0=Bt(n0),a0=v({},Qi,{data:0}),eh=Bt(a0),o0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},l0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},r0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=r0[e])?!!n[e]:!1}function mc(){return s0}var c0=v({},To,{key:function(e){if(e.key){var n=o0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?l0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(e){return e.type==="keypress"?Vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),u0=Bt(c0),d0=v({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=Bt(d0),f0=v({},To,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),h0=Bt(f0),m0=v({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),p0=Bt(m0),g0=v({},Pl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),x0=Bt(g0),v0=v({},Qi,{newState:0,oldState:0}),b0=Bt(v0),y0=[9,13,27,32],pc=Hn&&"CompositionEvent"in window,Ro=null;Hn&&"documentMode"in document&&(Ro=document.documentMode);var w0=Hn&&"TextEvent"in window&&!Ro,nh=Hn&&(!pc||Ro&&8<Ro&&11>=Ro),ih=" ",ah=!1;function oh(e,n){switch(e){case"keyup":return y0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ta=!1;function S0(e,n){switch(e){case"compositionend":return lh(n);case"keypress":return n.which!==32?null:(ah=!0,ih);case"textInput":return e=n.data,e===ih&&ah?null:e;default:return null}}function N0(e,n){if(Ta)return e==="compositionend"||!pc&&oh(e,n)?(e=Wf(),Gl=uc=di=null,Ta=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return nh&&n.locale!=="ko"?null:n.data;default:return null}}var C0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!C0[e.type]:n==="textarea"}function sh(e,n,i,r){Ea?Aa?Aa.push(r):Aa=[r]:Ea=r,n=$r(n,"onChange"),0<n.length&&(i=new ql("onChange","change",null,i,r),e.push({event:i,listeners:n}))}var Oo=null,ko=null;function M0(e){Vp(e,0)}function Ql(e){var n=jo(e);if(Gf(n))return e}function ch(e,n){if(e==="change")return n}var uh=!1;if(Hn){var gc;if(Hn){var xc="oninput"in document;if(!xc){var dh=document.createElement("div");dh.setAttribute("oninput","return;"),xc=typeof dh.oninput=="function"}gc=xc}else gc=!1;uh=gc&&(!document.documentMode||9<document.documentMode)}function fh(){Oo&&(Oo.detachEvent("onpropertychange",hh),ko=Oo=null)}function hh(e){if(e.propertyName==="value"&&Ql(ko)){var n=[];sh(n,ko,e,rc(e)),Ff(M0,n)}}function j0(e,n,i){e==="focusin"?(fh(),Oo=n,ko=i,Oo.attachEvent("onpropertychange",hh)):e==="focusout"&&fh()}function E0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ql(ko)}function A0(e,n){if(e==="click")return Ql(n)}function T0(e,n){if(e==="input"||e==="change")return Ql(n)}function z0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ft=typeof Object.is=="function"?Object.is:z0;function _o(e,n){if(Ft(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var u=i[r];if(!Ae.call(n,u)||!Ft(e[u],n[u]))return!1}return!0}function mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ph(e,n){var i=mh(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=n&&r>=n)return{node:i,offset:n-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=mh(i)}}function gh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?gh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Yl(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Yl(e.document)}return n}function vc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var R0=Hn&&"documentMode"in document&&11>=document.documentMode,za=null,bc=null,Do=null,yc=!1;function vh(e,n,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;yc||za==null||za!==Yl(r)||(r=za,"selectionStart"in r&&vc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Do&&_o(Do,r)||(Do=r,r=$r(bc,"onSelect"),0<r.length&&(n=new ql("onSelect","select",null,n,i),e.push({event:n,listeners:r}),n.target=za)))}function Zi(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Ra={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},wc={},bh={};Hn&&(bh=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function Fi(e){if(wc[e])return wc[e];if(!Ra[e])return e;var n=Ra[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in bh)return wc[e]=n[i];return e}var yh=Fi("animationend"),wh=Fi("animationiteration"),Sh=Fi("animationstart"),O0=Fi("transitionrun"),k0=Fi("transitionstart"),_0=Fi("transitioncancel"),Nh=Fi("transitionend"),Ch=new Map,Sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sc.push("scrollEnd");function vn(e,n){Ch.set(e,n),Pi(n,[e])}var Zl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sn=[],Oa=0,Nc=0;function Fl(){for(var e=Oa,n=Nc=Oa=0;n<e;){var i=sn[n];sn[n++]=null;var r=sn[n];sn[n++]=null;var u=sn[n];sn[n++]=null;var h=sn[n];if(sn[n++]=null,r!==null&&u!==null){var b=r.pending;b===null?u.next=u:(u.next=b.next,b.next=u),r.pending=u}h!==0&&Mh(i,u,h)}}function Wl(e,n,i,r){sn[Oa++]=e,sn[Oa++]=n,sn[Oa++]=i,sn[Oa++]=r,Nc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Cc(e,n,i,r){return Wl(e,n,i,r),Kl(e)}function Wi(e,n){return Wl(e,null,null,n),Kl(e)}function Mh(e,n,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var u=!1,h=e.return;h!==null;)h.childLanes|=i,r=h.alternate,r!==null&&(r.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,u&&n!==null&&(u=31-Zt(i),e=h.hiddenUpdates,r=e[u],r===null?e[u]=[n]:r.push(n),n.lane=i|536870912),h):null}function Kl(e){if(50<il)throw il=0,ku=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ka={};function D0(e,n,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,n,i,r){return new D0(e,n,i,r)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,n){var i=e.alternate;return i===null?(i=Wt(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function jh(e,n){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Jl(e,n,i,r,u,h){var b=0;if(r=e,typeof e=="function")Mc(e)&&(b=1);else if(typeof e=="string")b=H1(e,i,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case V:return e=Wt(31,i,n,u),e.elementType=V,e.lanes=h,e;case C:return Ki(i.children,u,h,n);case j:b=8,u|=24;break;case A:return e=Wt(12,i,n,u|2),e.elementType=A,e.lanes=h,e;case E:return e=Wt(13,i,n,u),e.elementType=E,e.lanes=h,e;case T:return e=Wt(19,i,n,u),e.elementType=T,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:b=10;break e;case _:b=9;break e;case R:b=11;break e;case D:b=14;break e;case k:b=16,r=null;break e}b=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return n=Wt(b,i,n,u),n.elementType=e,n.type=r,n.lanes=h,n}function Ki(e,n,i,r){return e=Wt(7,e,r,n),e.lanes=i,e}function jc(e,n,i){return e=Wt(6,e,null,n),e.lanes=i,e}function Eh(e){var n=Wt(18,null,null,0);return n.stateNode=e,n}function Ec(e,n,i){return n=Wt(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Ah=new WeakMap;function cn(e,n){if(typeof e=="object"&&e!==null){var i=Ah.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Se(n)},Ah.set(e,n),n)}return{value:e,source:n,stack:Se(n)}}var _a=[],Da=0,er=null,$o=0,un=[],dn=0,fi=null,Cn=1,Mn="";function In(e,n){_a[Da++]=$o,_a[Da++]=er,er=e,$o=n}function Th(e,n,i){un[dn++]=Cn,un[dn++]=Mn,un[dn++]=fi,fi=e;var r=Cn;e=Mn;var u=32-Zt(r)-1;r&=~(1<<u),i+=1;var h=32-Zt(n)+u;if(30<h){var b=u-u%5;h=(r&(1<<b)-1).toString(32),r>>=b,u-=b,Cn=1<<32-Zt(n)+u|i<<u|r,Mn=h+e}else Cn=1<<h|i<<u|r,Mn=e}function Ac(e){e.return!==null&&(In(e,1),Th(e,1,0))}function Tc(e){for(;e===er;)er=_a[--Da],_a[Da]=null,$o=_a[--Da],_a[Da]=null;for(;e===fi;)fi=un[--dn],un[dn]=null,Mn=un[--dn],un[dn]=null,Cn=un[--dn],un[dn]=null}function zh(e,n){un[dn++]=Cn,un[dn++]=Mn,un[dn++]=fi,Cn=n.id,Mn=n.overflow,fi=e}var Ct=null,We=null,$e=!1,hi=null,fn=!1,zc=Error(o(519));function mi(e){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lo(cn(n,e)),zc}function Rh(e){var n=e.stateNode,i=e.type,r=e.memoizedProps;switch(n[Nt]=e,n[Ut]=r,i){case"dialog":ze("cancel",n),ze("close",n);break;case"iframe":case"object":case"embed":ze("load",n);break;case"video":case"audio":for(i=0;i<ol.length;i++)ze(ol[i],n);break;case"source":ze("error",n);break;case"img":case"image":case"link":ze("error",n),ze("load",n);break;case"details":ze("toggle",n);break;case"input":ze("invalid",n),Vf(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ze("invalid",n);break;case"textarea":ze("invalid",n),qf(n,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||r.suppressHydrationWarning===!0||Qp(n.textContent,i)?(r.popover!=null&&(ze("beforetoggle",n),ze("toggle",n)),r.onScroll!=null&&ze("scroll",n),r.onScrollEnd!=null&&ze("scrollend",n),r.onClick!=null&&(n.onclick=Bn),n=!0):n=!1,n||mi(e,!0)}function Oh(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Ct=Ct.return}}function $a(e){if(e!==Ct)return!1;if(!$e)return Oh(e),$e=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Qu(e.type,e.memoizedProps)),i=!i),i&&We&&mi(e),Oh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));We=ig(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));We=ig(e)}else n===27?(n=We,Ai(e.type)?(e=Ju,Ju=null,We=e):We=n):We=Ct?mn(e.stateNode.nextSibling):null;return!0}function Ji(){We=Ct=null,$e=!1}function Rc(){var e=hi;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),hi=null),e}function Lo(e){hi===null?hi=[e]:hi.push(e)}var Oc=$(null),ea=null,Gn=null;function pi(e,n,i){ie(Oc,n._currentValue),n._currentValue=i}function Vn(e){e._currentValue=Oc.current,Z(Oc)}function kc(e,n,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===i)break;e=e.return}}function _c(e,n,i,r){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var b=u.child;h=h.firstContext;e:for(;h!==null;){var M=h;h=u;for(var O=0;O<n.length;O++)if(M.context===n[O]){h.lanes|=i,M=h.alternate,M!==null&&(M.lanes|=i),kc(h.return,i,e),r||(b=null);break e}h=M.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(o(341));b.lanes|=i,h=b.alternate,h!==null&&(h.lanes|=i),kc(b,i,e),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===e){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function La(e,n,i,r){e=null;for(var u=n,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var M=u.type;Ft(u.pendingProps.value,b.value)||(e!==null?e.push(M):e=[M])}}else if(u===je.current){if(b=u.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(ul):e=[ul])}u=u.return}e!==null&&_c(n,e,i,r),n.flags|=262144}function tr(e){for(e=e.firstContext;e!==null;){if(!Ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){ea=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return kh(ea,e)}function nr(e,n){return ea===null&&ta(e),kh(e,n)}function kh(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},Gn===null){if(e===null)throw Error(o(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return i}var $0=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},L0=t.unstable_scheduleCallback,U0=t.unstable_NormalPriority,st={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dc(){return{controller:new $0,data:new Map,refCount:0}}function Uo(e){e.refCount--,e.refCount===0&&L0(U0,function(){e.controller.abort()})}var Bo=null,$c=0,Ua=0,Ba=null;function B0(e,n){if(Bo===null){var i=Bo=[];$c=0,Ua=Bu(),Ba={status:"pending",value:void 0,then:function(r){i.push(r)}}}return $c++,n.then(_h,_h),n}function _h(){if(--$c===0&&Bo!==null){Ba!==null&&(Ba.status="fulfilled");var e=Bo;Bo=null,Ua=0,Ba=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function H0(e,n){var i=[],r={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){r.status="fulfilled",r.value=n;for(var u=0;u<i.length;u++)(0,i[u])(n)},function(u){for(r.status="rejected",r.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),r}var Dh=U.S;U.S=function(e,n){vp=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&B0(e,n),Dh!==null&&Dh(e,n)};var na=$(null);function Lc(){var e=na.current;return e!==null?e:Qe.pooledCache}function ir(e,n){n===null?ie(na,na.current):ie(na,n.pool)}function $h(){var e=Lc();return e===null?null:{parent:st._currentValue,pool:e}}var Ha=Error(o(460)),Uc=Error(o(474)),ar=Error(o(542)),or={then:function(){}};function Lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uh(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(Bn,Bn),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hh(e),e;default:if(typeof n.status=="string")n.then(Bn,Bn);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(r){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=r}},function(r){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hh(e),e}throw aa=n,Ha}}function ia(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(aa=i,Ha):i}}var aa=null;function Bh(){if(aa===null)throw Error(o(459));var e=aa;return aa=null,e}function Hh(e){if(e===Ha||e===ar)throw Error(o(483))}var Ya=null,Ho=0;function lr(e){var n=Ho;return Ho+=1,Ya===null&&(Ya=[]),Uh(Ya,e,n)}function Yo(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function rr(e,n){throw n.$$typeof===w?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Yh(e){function n(B,L){if(e){var H=B.deletions;H===null?(B.deletions=[L],B.flags|=16):H.push(L)}}function i(B,L){if(!e)return null;for(;L!==null;)n(B,L),L=L.sibling;return null}function r(B){for(var L=new Map;B!==null;)B.key!==null?L.set(B.key,B):L.set(B.index,B),B=B.sibling;return L}function u(B,L){return B=Yn(B,L),B.index=0,B.sibling=null,B}function h(B,L,H){return B.index=H,e?(H=B.alternate,H!==null?(H=H.index,H<L?(B.flags|=67108866,L):H):(B.flags|=67108866,L)):(B.flags|=1048576,L)}function b(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function M(B,L,H,F){return L===null||L.tag!==6?(L=jc(H,B.mode,F),L.return=B,L):(L=u(L,H),L.return=B,L)}function O(B,L,H,F){var ge=H.type;return ge===C?P(B,L,H.props.children,F,H.key):L!==null&&(L.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===k&&ia(ge)===L.type)?(L=u(L,H.props),Yo(L,H),L.return=B,L):(L=Jl(H.type,H.key,H.props,null,B.mode,F),Yo(L,H),L.return=B,L)}function I(B,L,H,F){return L===null||L.tag!==4||L.stateNode.containerInfo!==H.containerInfo||L.stateNode.implementation!==H.implementation?(L=Ec(H,B.mode,F),L.return=B,L):(L=u(L,H.children||[]),L.return=B,L)}function P(B,L,H,F,ge){return L===null||L.tag!==7?(L=Ki(H,B.mode,F,ge),L.return=B,L):(L=u(L,H),L.return=B,L)}function W(B,L,H){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=jc(""+L,B.mode,H),L.return=B,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case y:return H=Jl(L.type,L.key,L.props,null,B.mode,H),Yo(H,L),H.return=B,H;case S:return L=Ec(L,B.mode,H),L.return=B,L;case k:return L=ia(L),W(B,L,H)}if(oe(L)||q(L))return L=Ki(L,B.mode,H,null),L.return=B,L;if(typeof L.then=="function")return W(B,lr(L),H);if(L.$$typeof===z)return W(B,nr(B,L),H);rr(B,L)}return null}function G(B,L,H,F){var ge=L!==null?L.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return ge!==null?null:M(B,L,""+H,F);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case y:return H.key===ge?O(B,L,H,F):null;case S:return H.key===ge?I(B,L,H,F):null;case k:return H=ia(H),G(B,L,H,F)}if(oe(H)||q(H))return ge!==null?null:P(B,L,H,F,null);if(typeof H.then=="function")return G(B,L,lr(H),F);if(H.$$typeof===z)return G(B,L,nr(B,H),F);rr(B,H)}return null}function X(B,L,H,F,ge){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return B=B.get(H)||null,M(L,B,""+F,ge);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case y:return B=B.get(F.key===null?H:F.key)||null,O(L,B,F,ge);case S:return B=B.get(F.key===null?H:F.key)||null,I(L,B,F,ge);case k:return F=ia(F),X(B,L,H,F,ge)}if(oe(F)||q(F))return B=B.get(H)||null,P(L,B,F,ge,null);if(typeof F.then=="function")return X(B,L,H,lr(F),ge);if(F.$$typeof===z)return X(B,L,H,nr(L,F),ge);rr(L,F)}return null}function ue(B,L,H,F){for(var ge=null,Ue=null,he=L,Me=L=0,ke=null;he!==null&&Me<H.length;Me++){he.index>Me?(ke=he,he=null):ke=he.sibling;var Be=G(B,he,H[Me],F);if(Be===null){he===null&&(he=ke);break}e&&he&&Be.alternate===null&&n(B,he),L=h(Be,L,Me),Ue===null?ge=Be:Ue.sibling=Be,Ue=Be,he=ke}if(Me===H.length)return i(B,he),$e&&In(B,Me),ge;if(he===null){for(;Me<H.length;Me++)he=W(B,H[Me],F),he!==null&&(L=h(he,L,Me),Ue===null?ge=he:Ue.sibling=he,Ue=he);return $e&&In(B,Me),ge}for(he=r(he);Me<H.length;Me++)ke=X(he,B,Me,H[Me],F),ke!==null&&(e&&ke.alternate!==null&&he.delete(ke.key===null?Me:ke.key),L=h(ke,L,Me),Ue===null?ge=ke:Ue.sibling=ke,Ue=ke);return e&&he.forEach(function(ki){return n(B,ki)}),$e&&In(B,Me),ge}function xe(B,L,H,F){if(H==null)throw Error(o(151));for(var ge=null,Ue=null,he=L,Me=L=0,ke=null,Be=H.next();he!==null&&!Be.done;Me++,Be=H.next()){he.index>Me?(ke=he,he=null):ke=he.sibling;var ki=G(B,he,Be.value,F);if(ki===null){he===null&&(he=ke);break}e&&he&&ki.alternate===null&&n(B,he),L=h(ki,L,Me),Ue===null?ge=ki:Ue.sibling=ki,Ue=ki,he=ke}if(Be.done)return i(B,he),$e&&In(B,Me),ge;if(he===null){for(;!Be.done;Me++,Be=H.next())Be=W(B,Be.value,F),Be!==null&&(L=h(Be,L,Me),Ue===null?ge=Be:Ue.sibling=Be,Ue=Be);return $e&&In(B,Me),ge}for(he=r(he);!Be.done;Me++,Be=H.next())Be=X(he,B,Me,Be.value,F),Be!==null&&(e&&Be.alternate!==null&&he.delete(Be.key===null?Me:Be.key),L=h(Be,L,Me),Ue===null?ge=Be:Ue.sibling=Be,Ue=Be);return e&&he.forEach(function(W1){return n(B,W1)}),$e&&In(B,Me),ge}function Pe(B,L,H,F){if(typeof H=="object"&&H!==null&&H.type===C&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case y:e:{for(var ge=H.key;L!==null;){if(L.key===ge){if(ge=H.type,ge===C){if(L.tag===7){i(B,L.sibling),F=u(L,H.props.children),F.return=B,B=F;break e}}else if(L.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===k&&ia(ge)===L.type){i(B,L.sibling),F=u(L,H.props),Yo(F,H),F.return=B,B=F;break e}i(B,L);break}else n(B,L);L=L.sibling}H.type===C?(F=Ki(H.props.children,B.mode,F,H.key),F.return=B,B=F):(F=Jl(H.type,H.key,H.props,null,B.mode,F),Yo(F,H),F.return=B,B=F)}return b(B);case S:e:{for(ge=H.key;L!==null;){if(L.key===ge)if(L.tag===4&&L.stateNode.containerInfo===H.containerInfo&&L.stateNode.implementation===H.implementation){i(B,L.sibling),F=u(L,H.children||[]),F.return=B,B=F;break e}else{i(B,L);break}else n(B,L);L=L.sibling}F=Ec(H,B.mode,F),F.return=B,B=F}return b(B);case k:return H=ia(H),Pe(B,L,H,F)}if(oe(H))return ue(B,L,H,F);if(q(H)){if(ge=q(H),typeof ge!="function")throw Error(o(150));return H=ge.call(H),xe(B,L,H,F)}if(typeof H.then=="function")return Pe(B,L,lr(H),F);if(H.$$typeof===z)return Pe(B,L,nr(B,H),F);rr(B,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,L!==null&&L.tag===6?(i(B,L.sibling),F=u(L,H),F.return=B,B=F):(i(B,L),F=jc(H,B.mode,F),F.return=B,B=F),b(B)):i(B,L)}return function(B,L,H,F){try{Ho=0;var ge=Pe(B,L,H,F);return Ya=null,ge}catch(he){if(he===Ha||he===ar)throw he;var Ue=Wt(29,he,null,B.mode);return Ue.lanes=F,Ue.return=B,Ue}finally{}}}var oa=Yh(!0),Ih=Yh(!1),gi=!1;function Bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vi(e,n,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(He&2)!==0){var u=r.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),r.pending=n,n=Kl(e),Mh(e,null,i),n}return Wl(e,r,n,i),Kl(e)}function Io(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var r=n.lanes;r&=e.pendingLanes,i|=r,n.lanes=i,kf(e,i)}}function Yc(e,n){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var u=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var b={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?u=h=b:h=h.next=b,i=i.next}while(i!==null);h===null?u=h=n:h=h.next=n}else u=h=n;i={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Ic=!1;function Go(){if(Ic){var e=Ba;if(e!==null)throw e}}function Vo(e,n,i,r){Ic=!1;var u=e.updateQueue;gi=!1;var h=u.firstBaseUpdate,b=u.lastBaseUpdate,M=u.shared.pending;if(M!==null){u.shared.pending=null;var O=M,I=O.next;O.next=null,b===null?h=I:b.next=I,b=O;var P=e.alternate;P!==null&&(P=P.updateQueue,M=P.lastBaseUpdate,M!==b&&(M===null?P.firstBaseUpdate=I:M.next=I,P.lastBaseUpdate=O))}if(h!==null){var W=u.baseState;b=0,P=I=O=null,M=h;do{var G=M.lane&-536870913,X=G!==M.lane;if(X?(Oe&G)===G:(r&G)===G){G!==0&&G===Ua&&(Ic=!0),P!==null&&(P=P.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ue=e,xe=M;G=n;var Pe=i;switch(xe.tag){case 1:if(ue=xe.payload,typeof ue=="function"){W=ue.call(Pe,W,G);break e}W=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=xe.payload,G=typeof ue=="function"?ue.call(Pe,W,G):ue,G==null)break e;W=v({},W,G);break e;case 2:gi=!0}}G=M.callback,G!==null&&(e.flags|=64,X&&(e.flags|=8192),X=u.callbacks,X===null?u.callbacks=[G]:X.push(G))}else X={lane:G,tag:M.tag,payload:M.payload,callback:M.callback,next:null},P===null?(I=P=X,O=W):P=P.next=X,b|=G;if(M=M.next,M===null){if(M=u.shared.pending,M===null)break;X=M,M=X.next,X.next=null,u.lastBaseUpdate=X,u.shared.pending=null}}while(!0);P===null&&(O=W),u.baseState=O,u.firstBaseUpdate=I,u.lastBaseUpdate=P,h===null&&(u.shared.lanes=0),Ni|=b,e.lanes=b,e.memoizedState=W}}function Gh(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function Vh(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Gh(i[e],n)}var Ia=$(null),sr=$(0);function Xh(e,n){e=Jn,ie(sr,e),ie(Ia,n),Jn=e|n.baseLanes}function Gc(){ie(sr,Jn),ie(Ia,Ia.current)}function Vc(){Jn=sr.current,Z(Ia),Z(sr)}var Kt=$(null),hn=null;function bi(e){var n=e.alternate;ie(lt,lt.current&1),ie(Kt,e),hn===null&&(n===null||Ia.current!==null||n.memoizedState!==null)&&(hn=e)}function Xc(e){ie(lt,lt.current),ie(Kt,e),hn===null&&(hn=e)}function qh(e){e.tag===22?(ie(lt,lt.current),ie(Kt,e),hn===null&&(hn=e)):yi()}function yi(){ie(lt,lt.current),ie(Kt,Kt.current)}function Jt(e){Z(Kt),hn===e&&(hn=null),Z(lt)}var lt=$(0);function cr(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Wu(i)||Ku(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xn=0,Ce=null,Xe=null,ct=null,ur=!1,Ga=!1,la=!1,dr=0,Xo=0,Va=null,Y0=0;function it(){throw Error(o(321))}function qc(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Ft(e[i],n[i]))return!1;return!0}function Pc(e,n,i,r,u,h){return Xn=h,Ce=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Tm:su,la=!1,h=i(r,u),la=!1,Ga&&(h=Qh(n,i,r,u)),Ph(e),h}function Ph(e){U.H=Qo;var n=Xe!==null&&Xe.next!==null;if(Xn=0,ct=Xe=Ce=null,ur=!1,Xo=0,Va=null,n)throw Error(o(300));e===null||ut||(e=e.dependencies,e!==null&&tr(e)&&(ut=!0))}function Qh(e,n,i,r){Ce=e;var u=0;do{if(Ga&&(Va=null),Xo=0,Ga=!1,25<=u)throw Error(o(301));if(u+=1,ct=Xe=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=zm,h=n(i,r)}while(Ga);return h}function I0(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?qo(n):n,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Ce.flags|=1024),n}function Qc(){var e=dr!==0;return dr=0,e}function Zc(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function Fc(e){if(ur){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}ur=!1}Xn=0,ct=Xe=Ce=null,Ga=!1,Xo=dr=0,Va=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ce.memoizedState=ct=e:ct=ct.next=e,ct}function rt(){if(Xe===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var n=ct===null?Ce.memoizedState:ct.next;if(n!==null)ct=n,Xe=e;else{if(e===null)throw Ce.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ct===null?Ce.memoizedState=ct=e:ct=ct.next=e}return ct}function fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qo(e){var n=Xo;return Xo+=1,Va===null&&(Va=[]),e=Uh(Va,e,n),n=Ce,(ct===null?n.memoizedState:ct.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Tm:su),e}function hr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qo(e);if(e.$$typeof===z)return Mt(e)}throw Error(o(438,String(e)))}function Wc(e){var n=null,i=Ce.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var r=Ce.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=fr(),Ce.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),r=0;r<e;r++)i[r]=te;return n.index++,i}function qn(e,n){return typeof n=="function"?n(e):n}function mr(e){var n=rt();return Kc(n,Xe,e)}function Kc(e,n,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var u=e.baseQueue,h=r.pending;if(h!==null){if(u!==null){var b=u.next;u.next=h.next,h.next=b}n.baseQueue=u=h,r.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{n=u.next;var M=b=null,O=null,I=n,P=!1;do{var W=I.lane&-536870913;if(W!==I.lane?(Oe&W)===W:(Xn&W)===W){var G=I.revertLane;if(G===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),W===Ua&&(P=!0);else if((Xn&G)===G){I=I.next,G===Ua&&(P=!0);continue}else W={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},O===null?(M=O=W,b=h):O=O.next=W,Ce.lanes|=G,Ni|=G;W=I.action,la&&i(h,W),h=I.hasEagerState?I.eagerState:i(h,W)}else G={lane:W,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},O===null?(M=O=G,b=h):O=O.next=G,Ce.lanes|=W,Ni|=W;I=I.next}while(I!==null&&I!==n);if(O===null?b=h:O.next=M,!Ft(h,e.memoizedState)&&(ut=!0,P&&(i=Ba,i!==null)))throw i;e.memoizedState=h,e.baseState=b,e.baseQueue=O,r.lastRenderedState=h}return u===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Jc(e){var n=rt(),i=n.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,u=i.pending,h=n.memoizedState;if(u!==null){i.pending=null;var b=u=u.next;do h=e(h,b.action),b=b.next;while(b!==u);Ft(h,n.memoizedState)||(ut=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,r]}function Zh(e,n,i){var r=Ce,u=rt(),h=$e;if(h){if(i===void 0)throw Error(o(407));i=i()}else i=n();var b=!Ft((Xe||u).memoizedState,i);if(b&&(u.memoizedState=i,ut=!0),u=u.queue,nu(Kh.bind(null,r,u,e),[e]),u.getSnapshot!==n||b||ct!==null&&ct.memoizedState.tag&1){if(r.flags|=2048,Xa(9,{destroy:void 0},Wh.bind(null,r,u,i,n),null),Qe===null)throw Error(o(349));h||(Xn&127)!==0||Fh(r,n,i)}return i}function Fh(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Ce.updateQueue,n===null?(n=fr(),Ce.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function Wh(e,n,i,r){n.value=i,n.getSnapshot=r,Jh(n)&&em(e)}function Kh(e,n,i){return i(function(){Jh(n)&&em(e)})}function Jh(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Ft(e,i)}catch{return!0}}function em(e){var n=Wi(e,2);n!==null&&Vt(n,e,2)}function eu(e){var n=Dt();if(typeof e=="function"){var i=e;if(e=i(),la){ci(!0);try{i()}finally{ci(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:e},n}function tm(e,n,i,r){return e.baseState=i,Kc(e,Xe,typeof r=="function"?r:qn)}function G0(e,n,i,r,u){if(xr(e))throw Error(o(485));if(e=n.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};U.T!==null?i(!0):h.isTransition=!1,r(h),i=n.pending,i===null?(h.next=n.pending=h,nm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function nm(e,n){var i=n.action,r=n.payload,u=e.state;if(n.isTransition){var h=U.T,b={};U.T=b;try{var M=i(u,r),O=U.S;O!==null&&O(b,M),im(e,n,M)}catch(I){tu(e,n,I)}finally{h!==null&&b.types!==null&&(h.types=b.types),U.T=h}}else try{h=i(u,r),im(e,n,h)}catch(I){tu(e,n,I)}}function im(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){am(e,n,r)},function(r){return tu(e,n,r)}):am(e,n,i)}function am(e,n,i){n.status="fulfilled",n.value=i,om(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,nm(e,i)))}function tu(e,n,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=i,om(n),n=n.next;while(n!==r)}e.action=null}function om(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function lm(e,n){return n}function rm(e,n){if($e){var i=Qe.formState;if(i!==null){e:{var r=Ce;if($e){if(We){t:{for(var u=We,h=fn;u.nodeType!==8;){if(!h){u=null;break t}if(u=mn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){We=mn(u.nextSibling),r=u.data==="F!";break e}}mi(r)}r=!1}r&&(n=i[0])}}return i=Dt(),i.memoizedState=i.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lm,lastRenderedState:n},i.queue=r,i=jm.bind(null,Ce,r),r.dispatch=i,r=eu(!1),h=ru.bind(null,Ce,!1,r.queue),r=Dt(),u={state:n,dispatch:null,action:e,pending:null},r.queue=u,i=G0.bind(null,Ce,u,h,i),u.dispatch=i,r.memoizedState=e,[n,i,!1]}function sm(e){var n=rt();return cm(n,Xe,e)}function cm(e,n,i){if(n=Kc(e,n,lm)[0],e=mr(qn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=qo(n)}catch(b){throw b===Ha?ar:b}else r=n;n=rt();var u=n.queue,h=u.dispatch;return i!==n.memoizedState&&(Ce.flags|=2048,Xa(9,{destroy:void 0},V0.bind(null,u,i),null)),[r,h,e]}function V0(e,n){e.action=n}function um(e){var n=rt(),i=Xe;if(i!==null)return cm(n,i,e);rt(),n=n.memoizedState,i=rt();var r=i.queue.dispatch;return i.memoizedState=e,[n,r,!1]}function Xa(e,n,i,r){return e={tag:e,create:i,deps:r,inst:n,next:null},n=Ce.updateQueue,n===null&&(n=fr(),Ce.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,n.lastEffect=e),e}function dm(){return rt().memoizedState}function pr(e,n,i,r){var u=Dt();Ce.flags|=e,u.memoizedState=Xa(1|n,{destroy:void 0},i,r===void 0?null:r)}function gr(e,n,i,r){var u=rt();r=r===void 0?null:r;var h=u.memoizedState.inst;Xe!==null&&r!==null&&qc(r,Xe.memoizedState.deps)?u.memoizedState=Xa(n,h,i,r):(Ce.flags|=e,u.memoizedState=Xa(1|n,h,i,r))}function fm(e,n){pr(8390656,8,e,n)}function nu(e,n){gr(2048,8,e,n)}function X0(e){Ce.flags|=4;var n=Ce.updateQueue;if(n===null)n=fr(),Ce.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function hm(e){var n=rt().memoizedState;return X0({ref:n,nextImpl:e}),function(){if((He&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function mm(e,n){return gr(4,2,e,n)}function pm(e,n){return gr(4,4,e,n)}function gm(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function xm(e,n,i){i=i!=null?i.concat([e]):null,gr(4,4,gm.bind(null,n,e),i)}function iu(){}function vm(e,n){var i=rt();n=n===void 0?null:n;var r=i.memoizedState;return n!==null&&qc(n,r[1])?r[0]:(i.memoizedState=[e,n],e)}function bm(e,n){var i=rt();n=n===void 0?null:n;var r=i.memoizedState;if(n!==null&&qc(n,r[1]))return r[0];if(r=e(),la){ci(!0);try{e()}finally{ci(!1)}}return i.memoizedState=[r,n],r}function au(e,n,i){return i===void 0||(Xn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=yp(),Ce.lanes|=e,Ni|=e,i)}function ym(e,n,i,r){return Ft(i,n)?i:Ia.current!==null?(e=au(e,i,r),Ft(e,n)||(ut=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Oe&261930)===0?(ut=!0,e.memoizedState=i):(e=yp(),Ce.lanes|=e,Ni|=e,n)}function wm(e,n,i,r,u){var h=Q.p;Q.p=h!==0&&8>h?h:8;var b=U.T,M={};U.T=M,ru(e,!1,n,i);try{var O=u(),I=U.S;if(I!==null&&I(M,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var P=H0(O,r);Po(e,n,P,nn(e))}else Po(e,n,r,nn(e))}catch(W){Po(e,n,{then:function(){},status:"rejected",reason:W},nn())}finally{Q.p=h,b!==null&&M.types!==null&&(b.types=M.types),U.T=b}}function q0(){}function ou(e,n,i,r){if(e.tag!==5)throw Error(o(476));var u=Sm(e).queue;wm(e,u,n,K,i===null?q0:function(){return Nm(e),i(r)})}function Sm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:K},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Nm(e){var n=Sm(e);n.next===null&&(n=e.alternate.memoizedState),Po(e,n.next.queue,{},nn())}function lu(){return Mt(ul)}function Cm(){return rt().memoizedState}function Mm(){return rt().memoizedState}function P0(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=nn();e=xi(i);var r=vi(n,e,i);r!==null&&(Vt(r,n,i),Io(r,n,i)),n={cache:Dc()},e.payload=n;return}n=n.return}}function Q0(e,n,i){var r=nn();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},xr(e)?Em(n,i):(i=Cc(e,n,i,r),i!==null&&(Vt(i,e,r),Am(i,n,r)))}function jm(e,n,i){var r=nn();Po(e,n,i,r)}function Po(e,n,i,r){var u={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(xr(e))Em(n,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,M=h(b,i);if(u.hasEagerState=!0,u.eagerState=M,Ft(M,b))return Wl(e,n,u,0),Qe===null&&Fl(),!1}catch{}finally{}if(i=Cc(e,n,u,r),i!==null)return Vt(i,e,r),Am(i,n,r),!0}return!1}function ru(e,n,i,r){if(r={lane:2,revertLane:Bu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},xr(e)){if(n)throw Error(o(479))}else n=Cc(e,i,r,2),n!==null&&Vt(n,e,2)}function xr(e){var n=e.alternate;return e===Ce||n!==null&&n===Ce}function Em(e,n){Ga=ur=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function Am(e,n,i){if((i&4194048)!==0){var r=n.lanes;r&=e.pendingLanes,i|=r,n.lanes=i,kf(e,i)}}var Qo={readContext:Mt,use:hr,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Qo.useEffectEvent=it;var Tm={readContext:Mt,use:hr,useCallback:function(e,n){return Dt().memoizedState=[e,n===void 0?null:n],e},useContext:Mt,useEffect:fm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,pr(4194308,4,gm.bind(null,n,e),i)},useLayoutEffect:function(e,n){return pr(4194308,4,e,n)},useInsertionEffect:function(e,n){pr(4,2,e,n)},useMemo:function(e,n){var i=Dt();n=n===void 0?null:n;var r=e();if(la){ci(!0);try{e()}finally{ci(!1)}}return i.memoizedState=[r,n],r},useReducer:function(e,n,i){var r=Dt();if(i!==void 0){var u=i(n);if(la){ci(!0);try{i(n)}finally{ci(!1)}}}else u=n;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=Q0.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var n=Dt();return e={current:e},n.memoizedState=e},useState:function(e){e=eu(e);var n=e.queue,i=jm.bind(null,Ce,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:iu,useDeferredValue:function(e,n){var i=Dt();return au(i,e,n)},useTransition:function(){var e=eu(!1);return e=wm.bind(null,Ce,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var r=Ce,u=Dt();if($e){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),Qe===null)throw Error(o(349));(Oe&127)!==0||Fh(r,n,i)}u.memoizedState=i;var h={value:i,getSnapshot:n};return u.queue=h,fm(Kh.bind(null,r,h,e),[e]),r.flags|=2048,Xa(9,{destroy:void 0},Wh.bind(null,r,h,i,n),null),i},useId:function(){var e=Dt(),n=Qe.identifierPrefix;if($e){var i=Mn,r=Cn;i=(r&~(1<<32-Zt(r)-1)).toString(32)+i,n="_"+n+"R_"+i,i=dr++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=Y0++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:lu,useFormState:rm,useActionState:rm,useOptimistic:function(e){var n=Dt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=ru.bind(null,Ce,!0,i),i.dispatch=n,[e,n]},useMemoCache:Wc,useCacheRefresh:function(){return Dt().memoizedState=P0.bind(null,Ce)},useEffectEvent:function(e){var n=Dt(),i={impl:e};return n.memoizedState=i,function(){if((He&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},su={readContext:Mt,use:hr,useCallback:vm,useContext:Mt,useEffect:nu,useImperativeHandle:xm,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:mr,useRef:dm,useState:function(){return mr(qn)},useDebugValue:iu,useDeferredValue:function(e,n){var i=rt();return ym(i,Xe.memoizedState,e,n)},useTransition:function(){var e=mr(qn)[0],n=rt().memoizedState;return[typeof e=="boolean"?e:qo(e),n]},useSyncExternalStore:Zh,useId:Cm,useHostTransitionStatus:lu,useFormState:sm,useActionState:sm,useOptimistic:function(e,n){var i=rt();return tm(i,Xe,e,n)},useMemoCache:Wc,useCacheRefresh:Mm};su.useEffectEvent=hm;var zm={readContext:Mt,use:hr,useCallback:vm,useContext:Mt,useEffect:nu,useImperativeHandle:xm,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:Jc,useRef:dm,useState:function(){return Jc(qn)},useDebugValue:iu,useDeferredValue:function(e,n){var i=rt();return Xe===null?au(i,e,n):ym(i,Xe.memoizedState,e,n)},useTransition:function(){var e=Jc(qn)[0],n=rt().memoizedState;return[typeof e=="boolean"?e:qo(e),n]},useSyncExternalStore:Zh,useId:Cm,useHostTransitionStatus:lu,useFormState:um,useActionState:um,useOptimistic:function(e,n){var i=rt();return Xe!==null?tm(i,Xe,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:Mm};zm.useEffectEvent=hm;function cu(e,n,i,r){n=e.memoizedState,i=i(r,n),i=i==null?n:v({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var uu={enqueueSetState:function(e,n,i){e=e._reactInternals;var r=nn(),u=xi(r);u.payload=n,i!=null&&(u.callback=i),n=vi(e,u,r),n!==null&&(Vt(n,e,r),Io(n,e,r))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var r=nn(),u=xi(r);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=vi(e,u,r),n!==null&&(Vt(n,e,r),Io(n,e,r))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=nn(),r=xi(i);r.tag=2,n!=null&&(r.callback=n),n=vi(e,r,i),n!==null&&(Vt(n,e,i),Io(n,e,i))}};function Rm(e,n,i,r,u,h,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,h,b):n.prototype&&n.prototype.isPureReactComponent?!_o(i,r)||!_o(u,h):!0}function Om(e,n,i,r){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,r),n.state!==e&&uu.enqueueReplaceState(n,n.state,null)}function ra(e,n){var i=n;if("ref"in n){i={};for(var r in n)r!=="ref"&&(i[r]=n[r])}if(e=e.defaultProps){i===n&&(i=v({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function km(e){Zl(e)}function _m(e){console.error(e)}function Dm(e){Zl(e)}function vr(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function $m(e,n,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function du(e,n,i){return i=xi(i),i.tag=3,i.payload={element:null},i.callback=function(){vr(e,n)},i}function Lm(e){return e=xi(e),e.tag=3,e}function Um(e,n,i,r){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var h=r.value;e.payload=function(){return u(h)},e.callback=function(){$m(n,i,r)}}var b=i.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){$m(n,i,r),typeof u!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var M=r.stack;this.componentDidCatch(r.value,{componentStack:M!==null?M:""})})}function Z0(e,n,i,r,u){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=i.alternate,n!==null&&La(n,i,u,!0),i=Kt.current,i!==null){switch(i.tag){case 31:case 13:return hn===null?zr():i.alternate===null&&at===0&&(at=3),i.flags&=-257,i.flags|=65536,i.lanes=u,r===or?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([r]):n.add(r),$u(e,r,u)),!1;case 22:return i.flags|=65536,r===or?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([r]):i.add(r)),$u(e,r,u)),!1}throw Error(o(435,i.tag))}return $u(e,r,u),zr(),!1}if($e)return n=Kt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,r!==zc&&(e=Error(o(422),{cause:r}),Lo(cn(e,i)))):(r!==zc&&(n=Error(o(423),{cause:r}),Lo(cn(n,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,r=cn(r,i),u=du(e.stateNode,r,u),Yc(e,u),at!==4&&(at=2)),!1;var h=Error(o(520),{cause:r});if(h=cn(h,i),nl===null?nl=[h]:nl.push(h),at!==4&&(at=2),n===null)return!0;r=cn(r,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=du(i.stateNode,r,e),Yc(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))))return i.flags|=65536,u&=-u,i.lanes|=u,u=Lm(u),Um(u,e,i,r),Yc(i,u),!1}i=i.return}while(i!==null);return!1}var fu=Error(o(461)),ut=!1;function jt(e,n,i,r){n.child=e===null?Ih(n,null,i,r):oa(n,e.child,i,r)}function Bm(e,n,i,r,u){i=i.render;var h=n.ref;if("ref"in r){var b={};for(var M in r)M!=="ref"&&(b[M]=r[M])}else b=r;return ta(n),r=Pc(e,n,i,b,h,u),M=Qc(),e!==null&&!ut?(Zc(e,n,u),Pn(e,n,u)):($e&&M&&Ac(n),n.flags|=1,jt(e,n,r,u),n.child)}function Hm(e,n,i,r,u){if(e===null){var h=i.type;return typeof h=="function"&&!Mc(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Ym(e,n,h,r,u)):(e=Jl(i.type,null,r,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!yu(e,u)){var b=h.memoizedProps;if(i=i.compare,i=i!==null?i:_o,i(b,r)&&e.ref===n.ref)return Pn(e,n,u)}return n.flags|=1,e=Yn(h,r),e.ref=n.ref,e.return=n,n.child=e}function Ym(e,n,i,r,u){if(e!==null){var h=e.memoizedProps;if(_o(h,r)&&e.ref===n.ref)if(ut=!1,n.pendingProps=r=h,yu(e,u))(e.flags&131072)!==0&&(ut=!0);else return n.lanes=e.lanes,Pn(e,n,u)}return hu(e,n,i,r,u)}function Im(e,n,i,r){var u=r.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,e!==null){for(r=n.child=e.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~h}else r=0,n.child=null;return Gm(e,n,h,i,r)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&ir(n,h!==null?h.cachePool:null),h!==null?Xh(n,h):Gc(),qh(n);else return r=n.lanes=536870912,Gm(e,n,h!==null?h.baseLanes|i:i,i,r)}else h!==null?(ir(n,h.cachePool),Xh(n,h),yi(),n.memoizedState=null):(e!==null&&ir(n,null),Gc(),yi());return jt(e,n,u,i),n.child}function Zo(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Gm(e,n,i,r,u){var h=Lc();return h=h===null?null:{parent:st._currentValue,pool:h},n.memoizedState={baseLanes:i,cachePool:h},e!==null&&ir(n,null),Gc(),qh(n),e!==null&&La(e,n,r,!0),n.childLanes=u,null}function br(e,n){return n=wr({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Vm(e,n,i){return oa(n,e.child,null,i),e=br(n,n.pendingProps),e.flags|=2,Jt(n),n.memoizedState=null,e}function F0(e,n,i){var r=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if($e){if(r.mode==="hidden")return e=br(n,r),n.lanes=536870912,Zo(null,e);if(Xc(n),(e=We)?(e=ng(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:fi!==null?{id:Cn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},i=Eh(e),i.return=n,n.child=i,Ct=n,We=null)):e=null,e===null)throw mi(n);return n.lanes=536870912,null}return br(n,r)}var h=e.memoizedState;if(h!==null){var b=h.dehydrated;if(Xc(n),u)if(n.flags&256)n.flags&=-257,n=Vm(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(o(558));else if(ut||La(e,n,i,!1),u=(i&e.childLanes)!==0,ut||u){if(r=Qe,r!==null&&(b=_f(r,i),b!==0&&b!==h.retryLane))throw h.retryLane=b,Wi(e,b),Vt(r,e,b),fu;zr(),n=Vm(e,n,i)}else e=h.treeContext,We=mn(b.nextSibling),Ct=n,$e=!0,hi=null,fn=!1,e!==null&&zh(n,e),n=br(n,r),n.flags|=4096;return n}return e=Yn(e.child,{mode:r.mode,children:r.children}),e.ref=n.ref,n.child=e,e.return=n,e}function yr(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function hu(e,n,i,r,u){return ta(n),i=Pc(e,n,i,r,void 0,u),r=Qc(),e!==null&&!ut?(Zc(e,n,u),Pn(e,n,u)):($e&&r&&Ac(n),n.flags|=1,jt(e,n,i,u),n.child)}function Xm(e,n,i,r,u,h){return ta(n),n.updateQueue=null,i=Qh(n,r,i,u),Ph(e),r=Qc(),e!==null&&!ut?(Zc(e,n,h),Pn(e,n,h)):($e&&r&&Ac(n),n.flags|=1,jt(e,n,i,h),n.child)}function qm(e,n,i,r,u){if(ta(n),n.stateNode===null){var h=ka,b=i.contextType;typeof b=="object"&&b!==null&&(h=Mt(b)),h=new i(r,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=uu,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=r,h.state=n.memoizedState,h.refs={},Bc(n),b=i.contextType,h.context=typeof b=="object"&&b!==null?Mt(b):ka,h.state=n.memoizedState,b=i.getDerivedStateFromProps,typeof b=="function"&&(cu(n,i,b,r),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&uu.enqueueReplaceState(h,h.state,null),Vo(n,r,h,u),Go(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(e===null){h=n.stateNode;var M=n.memoizedProps,O=ra(i,M);h.props=O;var I=h.context,P=i.contextType;b=ka,typeof P=="object"&&P!==null&&(b=Mt(P));var W=i.getDerivedStateFromProps;P=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,P||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(M||I!==b)&&Om(n,h,r,b),gi=!1;var G=n.memoizedState;h.state=G,Vo(n,r,h,u),Go(),I=n.memoizedState,M||G!==I||gi?(typeof W=="function"&&(cu(n,i,W,r),I=n.memoizedState),(O=gi||Rm(n,i,O,r,G,I,b))?(P||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=I),h.props=r,h.state=I,h.context=b,r=O):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{h=n.stateNode,Hc(e,n),b=n.memoizedProps,P=ra(i,b),h.props=P,W=n.pendingProps,G=h.context,I=i.contextType,O=ka,typeof I=="object"&&I!==null&&(O=Mt(I)),M=i.getDerivedStateFromProps,(I=typeof M=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==W||G!==O)&&Om(n,h,r,O),gi=!1,G=n.memoizedState,h.state=G,Vo(n,r,h,u),Go();var X=n.memoizedState;b!==W||G!==X||gi||e!==null&&e.dependencies!==null&&tr(e.dependencies)?(typeof M=="function"&&(cu(n,i,M,r),X=n.memoizedState),(P=gi||Rm(n,i,P,r,G,X,O)||e!==null&&e.dependencies!==null&&tr(e.dependencies))?(I||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,X,O),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,X,O)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&G===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&G===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=X),h.props=r,h.state=X,h.context=O,r=P):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&G===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&G===e.memoizedState||(n.flags|=1024),r=!1)}return h=r,yr(e,n),r=(n.flags&128)!==0,h||r?(h=n.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&r?(n.child=oa(n,e.child,null,u),n.child=oa(n,null,i,u)):jt(e,n,i,u),n.memoizedState=h.state,e=n.child):e=Pn(e,n,u),e}function Pm(e,n,i,r){return Ji(),n.flags|=256,jt(e,n,i,r),n.child}var mu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pu(e){return{baseLanes:e,cachePool:$h()}}function gu(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=tn),e}function Qm(e,n,i){var r=n.pendingProps,u=!1,h=(n.flags&128)!==0,b;if((b=h)||(b=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),b&&(u=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if($e){if(u?bi(n):yi(),(e=We)?(e=ng(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:fi!==null?{id:Cn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},i=Eh(e),i.return=n,n.child=i,Ct=n,We=null)):e=null,e===null)throw mi(n);return Ku(e)?n.lanes=32:n.lanes=536870912,null}var M=r.children;return r=r.fallback,u?(yi(),u=n.mode,M=wr({mode:"hidden",children:M},u),r=Ki(r,u,i,null),M.return=n,r.return=n,M.sibling=r,n.child=M,r=n.child,r.memoizedState=pu(i),r.childLanes=gu(e,b,i),n.memoizedState=mu,Zo(null,r)):(bi(n),xu(n,M))}var O=e.memoizedState;if(O!==null&&(M=O.dehydrated,M!==null)){if(h)n.flags&256?(bi(n),n.flags&=-257,n=vu(e,n,i)):n.memoizedState!==null?(yi(),n.child=e.child,n.flags|=128,n=null):(yi(),M=r.fallback,u=n.mode,r=wr({mode:"visible",children:r.children},u),M=Ki(M,u,i,null),M.flags|=2,r.return=n,M.return=n,r.sibling=M,n.child=r,oa(n,e.child,null,i),r=n.child,r.memoizedState=pu(i),r.childLanes=gu(e,b,i),n.memoizedState=mu,n=Zo(null,r));else if(bi(n),Ku(M)){if(b=M.nextSibling&&M.nextSibling.dataset,b)var I=b.dgst;b=I,r=Error(o(419)),r.stack="",r.digest=b,Lo({value:r,source:null,stack:null}),n=vu(e,n,i)}else if(ut||La(e,n,i,!1),b=(i&e.childLanes)!==0,ut||b){if(b=Qe,b!==null&&(r=_f(b,i),r!==0&&r!==O.retryLane))throw O.retryLane=r,Wi(e,r),Vt(b,e,r),fu;Wu(M)||zr(),n=vu(e,n,i)}else Wu(M)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,We=mn(M.nextSibling),Ct=n,$e=!0,hi=null,fn=!1,e!==null&&zh(n,e),n=xu(n,r.children),n.flags|=4096);return n}return u?(yi(),M=r.fallback,u=n.mode,O=e.child,I=O.sibling,r=Yn(O,{mode:"hidden",children:r.children}),r.subtreeFlags=O.subtreeFlags&65011712,I!==null?M=Yn(I,M):(M=Ki(M,u,i,null),M.flags|=2),M.return=n,r.return=n,r.sibling=M,n.child=r,Zo(null,r),r=n.child,M=e.child.memoizedState,M===null?M=pu(i):(u=M.cachePool,u!==null?(O=st._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=$h(),M={baseLanes:M.baseLanes|i,cachePool:u}),r.memoizedState=M,r.childLanes=gu(e,b,i),n.memoizedState=mu,Zo(e.child,r)):(bi(n),i=e.child,e=i.sibling,i=Yn(i,{mode:"visible",children:r.children}),i.return=n,i.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=i,n.memoizedState=null,i)}function xu(e,n){return n=wr({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function wr(e,n){return e=Wt(22,e,null,n),e.lanes=0,e}function vu(e,n,i){return oa(n,e.child,null,i),e=xu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Zm(e,n,i){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),kc(e.return,n,i)}function bu(e,n,i,r,u,h){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:u,treeForkCount:h}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=r,b.tail=i,b.tailMode=u,b.treeForkCount=h)}function Fm(e,n,i){var r=n.pendingProps,u=r.revealOrder,h=r.tail;r=r.children;var b=lt.current,M=(b&2)!==0;if(M?(b=b&1|2,n.flags|=128):b&=1,ie(lt,b),jt(e,n,r,i),r=$e?$o:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zm(e,i,n);else if(e.tag===19)Zm(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(i=n.child,u=null;i!==null;)e=i.alternate,e!==null&&cr(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=n.child,n.child=null):(u=i.sibling,i.sibling=null),bu(n,!1,u,i,h,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&cr(e)===null){n.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}bu(n,!0,i,null,h,r);break;case"together":bu(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function Pn(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Ni|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(La(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,i=Yn(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Yn(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function yu(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&tr(e)))}function W0(e,n,i){switch(n.tag){case 3:et(n,n.stateNode.containerInfo),pi(n,st,e.memoizedState.cache),Ji();break;case 27:case 5:$t(n);break;case 4:et(n,n.stateNode.containerInfo);break;case 10:pi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Xc(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(bi(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Qm(e,n,i):(bi(n),e=Pn(e,n,i),e!==null?e.sibling:null);bi(n);break;case 19:var u=(e.flags&128)!==0;if(r=(i&n.childLanes)!==0,r||(La(e,n,i,!1),r=(i&n.childLanes)!==0),u){if(r)return Fm(e,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ie(lt,lt.current),r)break;return null;case 22:return n.lanes=0,Im(e,n,i,n.pendingProps);case 24:pi(n,st,e.memoizedState.cache)}return Pn(e,n,i)}function Wm(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)ut=!0;else{if(!yu(e,i)&&(n.flags&128)===0)return ut=!1,W0(e,n,i);ut=(e.flags&131072)!==0}else ut=!1,$e&&(n.flags&1048576)!==0&&Th(n,$o,n.index);switch(n.lanes=0,n.tag){case 16:e:{var r=n.pendingProps;if(e=ia(n.elementType),n.type=e,typeof e=="function")Mc(e)?(r=ra(e,r),n.tag=1,n=qm(null,n,e,r,i)):(n.tag=0,n=hu(null,n,e,r,i));else{if(e!=null){var u=e.$$typeof;if(u===R){n.tag=11,n=Bm(null,n,e,r,i);break e}else if(u===D){n.tag=14,n=Hm(null,n,e,r,i);break e}}throw n=ae(e)||e,Error(o(306,n,""))}}return n;case 0:return hu(e,n,n.type,n.pendingProps,i);case 1:return r=n.type,u=ra(r,n.pendingProps),qm(e,n,r,u,i);case 3:e:{if(et(n,n.stateNode.containerInfo),e===null)throw Error(o(387));r=n.pendingProps;var h=n.memoizedState;u=h.element,Hc(e,n),Vo(n,r,null,i);var b=n.memoizedState;if(r=b.cache,pi(n,st,r),r!==h.cache&&_c(n,[st],i,!0),Go(),r=b.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=Pm(e,n,r,i);break e}else if(r!==u){u=cn(Error(o(424)),n),Lo(u),n=Pm(e,n,r,i);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=mn(e.firstChild),Ct=n,$e=!0,hi=null,fn=!0,i=Ih(n,null,r,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ji(),r===u){n=Pn(e,n,i);break e}jt(e,n,r,i)}n=n.child}return n;case 26:return yr(e,n),e===null?(i=sg(n.type,null,n.pendingProps,null))?n.memoizedState=i:$e||(i=n.type,e=n.pendingProps,r=Lr(pe.current).createElement(i),r[Nt]=n,r[Ut]=e,Et(r,i,e),vt(r),n.stateNode=r):n.memoizedState=sg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return $t(n),e===null&&$e&&(r=n.stateNode=og(n.type,n.pendingProps,pe.current),Ct=n,fn=!0,u=We,Ai(n.type)?(Ju=u,We=mn(r.firstChild)):We=u),jt(e,n,n.pendingProps.children,i),yr(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&$e&&((u=r=We)&&(r=E1(r,n.type,n.pendingProps,fn),r!==null?(n.stateNode=r,Ct=n,We=mn(r.firstChild),fn=!1,u=!0):u=!1),u||mi(n)),$t(n),u=n.type,h=n.pendingProps,b=e!==null?e.memoizedProps:null,r=h.children,Qu(u,h)?r=null:b!==null&&Qu(u,b)&&(n.flags|=32),n.memoizedState!==null&&(u=Pc(e,n,I0,null,null,i),ul._currentValue=u),yr(e,n),jt(e,n,r,i),n.child;case 6:return e===null&&$e&&((e=i=We)&&(i=A1(i,n.pendingProps,fn),i!==null?(n.stateNode=i,Ct=n,We=null,e=!0):e=!1),e||mi(n)),null;case 13:return Qm(e,n,i);case 4:return et(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=oa(n,null,r,i):jt(e,n,r,i),n.child;case 11:return Bm(e,n,n.type,n.pendingProps,i);case 7:return jt(e,n,n.pendingProps,i),n.child;case 8:return jt(e,n,n.pendingProps.children,i),n.child;case 12:return jt(e,n,n.pendingProps.children,i),n.child;case 10:return r=n.pendingProps,pi(n,n.type,r.value),jt(e,n,r.children,i),n.child;case 9:return u=n.type._context,r=n.pendingProps.children,ta(n),u=Mt(u),r=r(u),n.flags|=1,jt(e,n,r,i),n.child;case 14:return Hm(e,n,n.type,n.pendingProps,i);case 15:return Ym(e,n,n.type,n.pendingProps,i);case 19:return Fm(e,n,i);case 31:return F0(e,n,i);case 22:return Im(e,n,i,n.pendingProps);case 24:return ta(n),r=Mt(st),e===null?(u=Lc(),u===null&&(u=Qe,h=Dc(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=i),u=h),n.memoizedState={parent:r,cache:u},Bc(n),pi(n,st,u)):((e.lanes&i)!==0&&(Hc(e,n),Vo(n,null,null,i),Go()),u=e.memoizedState,h=n.memoizedState,u.parent!==r?(u={parent:r,cache:r},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),pi(n,st,r)):(r=h.cache,pi(n,st,r),r!==u.cache&&_c(n,[st],i,!0))),jt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Qn(e){e.flags|=4}function wu(e,n,i,r,u){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Cp())e.flags|=8192;else throw aa=or,Uc}else e.flags&=-16777217}function Km(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hg(n))if(Cp())e.flags|=8192;else throw aa=or,Uc}function Sr(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Rf():536870912,e.lanes|=n,Za|=n)}function Fo(e,n){if(!$e)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ke(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(n)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,r|=u.subtreeFlags&65011712,r|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=r,e.childLanes=i,n}function K0(e,n,i){var r=n.pendingProps;switch(Tc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(n),null;case 1:return Ke(n),null;case 3:return i=n.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Vn(st),ye(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&($a(n)?Qn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Rc())),Ke(n),null;case 26:var u=n.type,h=n.memoizedState;return e===null?(Qn(n),h!==null?(Ke(n),Km(n,h)):(Ke(n),wu(n,u,null,r,i))):h?h!==e.memoizedState?(Qn(n),Ke(n),Km(n,h)):(Ke(n),n.flags&=-16777217):(e=e.memoizedProps,e!==r&&Qn(n),Ke(n),wu(n,u,e,r,i)),null;case 27:if(kt(n),i=pe.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==r&&Qn(n);else{if(!r){if(n.stateNode===null)throw Error(o(166));return Ke(n),null}e=re.current,$a(n)?Rh(n):(e=og(u,r,i),n.stateNode=e,Qn(n))}return Ke(n),null;case 5:if(kt(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==r&&Qn(n);else{if(!r){if(n.stateNode===null)throw Error(o(166));return Ke(n),null}if(h=re.current,$a(n))Rh(n);else{var b=Lr(pe.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?b.createElement("select",{is:r.is}):b.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?b.createElement(u,{is:r.is}):b.createElement(u)}}h[Nt]=n,h[Ut]=r;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;e:switch(Et(h,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Qn(n)}}return Ke(n),wu(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==r&&Qn(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(o(166));if(e=pe.current,$a(n)){if(e=n.stateNode,i=n.memoizedProps,r=null,u=Ct,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[Nt]=n,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||Qp(e.nodeValue,i)),e||mi(n,!0)}else e=Lr(e).createTextNode(r),e[Nt]=n,n.stateNode=e}return Ke(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(r=$a(n),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Nt]=n}else Ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),e=!1}else i=Rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(Jt(n),n):(Jt(n),null);if((n.flags&128)!==0)throw Error(o(558))}return Ke(n),null;case 13:if(r=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=$a(n),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Nt]=n}else Ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),u=!1}else u=Rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Jt(n),n):(Jt(n),null)}return Jt(n),(n.flags&128)!==0?(n.lanes=i,n):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=n.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==u&&(r.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Sr(n,n.updateQueue),Ke(n),null);case 4:return ye(),e===null&&Gu(n.stateNode.containerInfo),Ke(n),null;case 10:return Vn(n.type),Ke(n),null;case 19:if(Z(lt),r=n.memoizedState,r===null)return Ke(n),null;if(u=(n.flags&128)!==0,h=r.rendering,h===null)if(u)Fo(r,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=cr(e),h!==null){for(n.flags|=128,Fo(r,!1),e=h.updateQueue,n.updateQueue=e,Sr(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)jh(i,e),i=i.sibling;return ie(lt,lt.current&1|2),$e&&In(n,r.treeForkCount),n.child}e=e.sibling}r.tail!==null&&Fe()>Er&&(n.flags|=128,u=!0,Fo(r,!1),n.lanes=4194304)}else{if(!u)if(e=cr(h),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,Sr(n,e),Fo(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!$e)return Ke(n),null}else 2*Fe()-r.renderingStartTime>Er&&i!==536870912&&(n.flags|=128,u=!0,Fo(r,!1),n.lanes=4194304);r.isBackwards?(h.sibling=n.child,n.child=h):(e=r.last,e!==null?e.sibling=h:n.child=h,r.last=h)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,i=lt.current,ie(lt,u?i&1|2:i&1),$e&&In(n,r.treeForkCount),e):(Ke(n),null);case 22:case 23:return Jt(n),Vc(),r=n.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(i&536870912)!==0&&(n.flags&128)===0&&(Ke(n),n.subtreeFlags&6&&(n.flags|=8192)):Ke(n),i=n.updateQueue,i!==null&&Sr(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==i&&(n.flags|=2048),e!==null&&Z(na),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Vn(st),Ke(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function J0(e,n){switch(Tc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Vn(st),ye(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return kt(n),null;case 31:if(n.memoizedState!==null){if(Jt(n),n.alternate===null)throw Error(o(340));Ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Jt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(lt),null;case 4:return ye(),null;case 10:return Vn(n.type),null;case 22:case 23:return Jt(n),Vc(),e!==null&&Z(na),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Vn(st),null;case 25:return null;default:return null}}function Jm(e,n){switch(Tc(n),n.tag){case 3:Vn(st),ye();break;case 26:case 27:case 5:kt(n);break;case 4:ye();break;case 31:n.memoizedState!==null&&Jt(n);break;case 13:Jt(n);break;case 19:Z(lt);break;case 10:Vn(n.type);break;case 22:case 23:Jt(n),Vc(),e!==null&&Z(na);break;case 24:Vn(st)}}function Wo(e,n){try{var i=n.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var u=r.next;i=u;do{if((i.tag&e)===e){r=void 0;var h=i.create,b=i.inst;r=h(),b.destroy=r}i=i.next}while(i!==u)}}catch(M){Ge(n,n.return,M)}}function wi(e,n,i){try{var r=n.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var h=u.next;r=h;do{if((r.tag&e)===e){var b=r.inst,M=b.destroy;if(M!==void 0){b.destroy=void 0,u=n;var O=i,I=M;try{I()}catch(P){Ge(u,O,P)}}}r=r.next}while(r!==h)}}catch(P){Ge(n,n.return,P)}}function ep(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{Vh(n,i)}catch(r){Ge(e,e.return,r)}}}function tp(e,n,i){i.props=ra(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ge(e,n,r)}}function Ko(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(u){Ge(e,n,u)}}function jn(e,n){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(u){Ge(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Ge(e,n,u)}else i.current=null}function np(e){var n=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(u){Ge(e,e.return,u)}}function Su(e,n,i){try{var r=e.stateNode;w1(r,e.type,i,n),r[Ut]=n}catch(u){Ge(e,e.return,u)}}function ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ai(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ai(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cu(e,n,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Bn));else if(r!==4&&(r===27&&Ai(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Cu(e,n,i),e=e.sibling;e!==null;)Cu(e,n,i),e=e.sibling}function Nr(e,n,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(r!==4&&(r===27&&Ai(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nr(e,n,i),e=e.sibling;e!==null;)Nr(e,n,i),e=e.sibling}function ap(e){var n=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);Et(n,r,i),n[Nt]=e,n[Ut]=i}catch(h){Ge(e,e.return,h)}}var Zn=!1,dt=!1,Mu=!1,op=typeof WeakSet=="function"?WeakSet:Set,bt=null;function e1(e,n){if(e=e.containerInfo,qu=Vr,e=xh(e),vc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var u=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var b=0,M=-1,O=-1,I=0,P=0,W=e,G=null;t:for(;;){for(var X;W!==i||u!==0&&W.nodeType!==3||(M=b+u),W!==h||r!==0&&W.nodeType!==3||(O=b+r),W.nodeType===3&&(b+=W.nodeValue.length),(X=W.firstChild)!==null;)G=W,W=X;for(;;){if(W===e)break t;if(G===i&&++I===u&&(M=b),G===h&&++P===r&&(O=b),(X=W.nextSibling)!==null)break;W=G,G=W.parentNode}W=X}i=M===-1||O===-1?null:{start:M,end:O}}else i=null}i=i||{start:0,end:0}}else i=null;for(Pu={focusedElem:e,selectionRange:i},Vr=!1,bt=n;bt!==null;)if(n=bt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,bt=e;else for(;bt!==null;){switch(n=bt,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,u=h.memoizedProps,h=h.memoizedState,r=i.stateNode;try{var ue=ra(i.type,u);e=r.getSnapshotBeforeUpdate(ue,h),r.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Ge(i,i.return,xe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Fu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=n.sibling,e!==null){e.return=n.return,bt=e;break}bt=n.return}}function lp(e,n,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(e,i),r&4&&Wo(5,i);break;case 1:if(Wn(e,i),r&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(b){Ge(i,i.return,b)}else{var u=ra(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ge(i,i.return,b)}}r&64&&ep(i),r&512&&Ko(i,i.return);break;case 3:if(Wn(e,i),r&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{Vh(e,n)}catch(b){Ge(i,i.return,b)}}break;case 27:n===null&&r&4&&ap(i);case 26:case 5:Wn(e,i),n===null&&r&4&&np(i),r&512&&Ko(i,i.return);break;case 12:Wn(e,i);break;case 31:Wn(e,i),r&4&&cp(e,i);break;case 13:Wn(e,i),r&4&&up(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=c1.bind(null,i),T1(e,i))));break;case 22:if(r=i.memoizedState!==null||Zn,!r){n=n!==null&&n.memoizedState!==null||dt,u=Zn;var h=dt;Zn=r,(dt=n)&&!h?Kn(e,i,(i.subtreeFlags&8772)!==0):Wn(e,i),Zn=u,dt=h}break;case 30:break;default:Wn(e,i)}}function rp(e){var n=e.alternate;n!==null&&(e.alternate=null,rp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&tc(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var tt=null,Ht=!1;function Fn(e,n,i){for(i=i.child;i!==null;)sp(e,n,i),i=i.sibling}function sp(e,n,i){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(So,i)}catch{}switch(i.tag){case 26:dt||jn(i,n),Fn(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:dt||jn(i,n);var r=tt,u=Ht;Ai(i.type)&&(tt=i.stateNode,Ht=!1),Fn(e,n,i),rl(i.stateNode),tt=r,Ht=u;break;case 5:dt||jn(i,n);case 6:if(r=tt,u=Ht,tt=null,Fn(e,n,i),tt=r,Ht=u,tt!==null)if(Ht)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(i.stateNode)}catch(h){Ge(i,n,h)}else try{tt.removeChild(i.stateNode)}catch(h){Ge(i,n,h)}break;case 18:tt!==null&&(Ht?(e=tt,eg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),io(e)):eg(tt,i.stateNode));break;case 4:r=tt,u=Ht,tt=i.stateNode.containerInfo,Ht=!0,Fn(e,n,i),tt=r,Ht=u;break;case 0:case 11:case 14:case 15:wi(2,i,n),dt||wi(4,i,n),Fn(e,n,i);break;case 1:dt||(jn(i,n),r=i.stateNode,typeof r.componentWillUnmount=="function"&&tp(i,n,r)),Fn(e,n,i);break;case 21:Fn(e,n,i);break;case 22:dt=(r=dt)||i.memoizedState!==null,Fn(e,n,i),dt=r;break;default:Fn(e,n,i)}}function cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(i){Ge(n,n.return,i)}}}function up(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{io(e)}catch(i){Ge(n,n.return,i)}}function t1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new op),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new op),n;default:throw Error(o(435,e.tag))}}function Cr(e,n){var i=t1(e);n.forEach(function(r){if(!i.has(r)){i.add(r);var u=u1.bind(null,e,r);r.then(u,u)}})}function Yt(e,n){var i=n.deletions;if(i!==null)for(var r=0;r<i.length;r++){var u=i[r],h=e,b=n,M=b;e:for(;M!==null;){switch(M.tag){case 27:if(Ai(M.type)){tt=M.stateNode,Ht=!1;break e}break;case 5:tt=M.stateNode,Ht=!1;break e;case 3:case 4:tt=M.stateNode.containerInfo,Ht=!0;break e}M=M.return}if(tt===null)throw Error(o(160));sp(h,b,u),tt=null,Ht=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)dp(n,e),n=n.sibling}var bn=null;function dp(e,n){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(n,e),It(e),r&4&&(wi(3,e,e.return),Wo(3,e),wi(5,e,e.return));break;case 1:Yt(n,e),It(e),r&512&&(dt||i===null||jn(i,i.return)),r&64&&Zn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var u=bn;if(Yt(n,e),It(e),r&512&&(dt||i===null||jn(i,i.return)),r&4){var h=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(r){case"title":h=u.getElementsByTagName("title")[0],(!h||h[Mo]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(r),u.head.insertBefore(h,u.querySelector("head > title"))),Et(h,r,i),h[Nt]=e,vt(h),r=h;break e;case"link":var b=dg("link","href",u).get(r+(i.href||""));if(b){for(var M=0;M<b.length;M++)if(h=b[M],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){b.splice(M,1);break t}}h=u.createElement(r),Et(h,r,i),u.head.appendChild(h);break;case"meta":if(b=dg("meta","content",u).get(r+(i.content||""))){for(M=0;M<b.length;M++)if(h=b[M],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){b.splice(M,1);break t}}h=u.createElement(r),Et(h,r,i),u.head.appendChild(h);break;default:throw Error(o(468,r))}h[Nt]=e,vt(h),r=h}e.stateNode=r}else fg(u,e.type,e.stateNode);else e.stateNode=ug(u,r,e.memoizedProps);else h!==r?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,r===null?fg(u,e.type,e.stateNode):ug(u,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Su(e,e.memoizedProps,i.memoizedProps)}break;case 27:Yt(n,e),It(e),r&512&&(dt||i===null||jn(i,i.return)),i!==null&&r&4&&Su(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Yt(n,e),It(e),r&512&&(dt||i===null||jn(i,i.return)),e.flags&32){u=e.stateNode;try{ja(u,"")}catch(ue){Ge(e,e.return,ue)}}r&4&&e.stateNode!=null&&(u=e.memoizedProps,Su(e,u,i!==null?i.memoizedProps:u)),r&1024&&(Mu=!0);break;case 6:if(Yt(n,e),It(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(ue){Ge(e,e.return,ue)}}break;case 3:if(Hr=null,u=bn,bn=Ur(n.containerInfo),Yt(n,e),bn=u,It(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{io(n.containerInfo)}catch(ue){Ge(e,e.return,ue)}Mu&&(Mu=!1,fp(e));break;case 4:r=bn,bn=Ur(e.stateNode.containerInfo),Yt(n,e),It(e),bn=r;break;case 12:Yt(n,e),It(e);break;case 31:Yt(n,e),It(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cr(e,r)));break;case 13:Yt(n,e),It(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(jr=Fe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cr(e,r)));break;case 22:u=e.memoizedState!==null;var O=i!==null&&i.memoizedState!==null,I=Zn,P=dt;if(Zn=I||u,dt=P||O,Yt(n,e),dt=P,Zn=I,It(e),r&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(i===null||O||Zn||dt||sa(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){O=i=n;try{if(h=O.stateNode,u)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{M=O.stateNode;var W=O.memoizedProps.style,G=W!=null&&W.hasOwnProperty("display")?W.display:null;M.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ue){Ge(O,O.return,ue)}}}else if(n.tag===6){if(i===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(ue){Ge(O,O.return,ue)}}}else if(n.tag===18){if(i===null){O=n;try{var X=O.stateNode;u?tg(X,!0):tg(O.stateNode,!1)}catch(ue){Ge(O,O.return,ue)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Cr(e,i))));break;case 19:Yt(n,e),It(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cr(e,r)));break;case 30:break;case 21:break;default:Yt(n,e),It(e)}}function It(e){var n=e.flags;if(n&2){try{for(var i,r=e.return;r!==null;){if(ip(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var u=i.stateNode,h=Nu(e);Nr(e,h,u);break;case 5:var b=i.stateNode;i.flags&32&&(ja(b,""),i.flags&=-33);var M=Nu(e);Nr(e,M,b);break;case 3:case 4:var O=i.stateNode.containerInfo,I=Nu(e);Cu(e,I,O);break;default:throw Error(o(161))}}catch(P){Ge(e,e.return,P)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function fp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;fp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Wn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)lp(e,n.alternate,n),n=n.sibling}function sa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:wi(4,n,n.return),sa(n);break;case 1:jn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&tp(n,n.return,i),sa(n);break;case 27:rl(n.stateNode);case 26:case 5:jn(n,n.return),sa(n);break;case 22:n.memoizedState===null&&sa(n);break;case 30:sa(n);break;default:sa(n)}e=e.sibling}}function Kn(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,u=e,h=n,b=h.flags;switch(h.tag){case 0:case 11:case 15:Kn(u,h,i),Wo(4,h);break;case 1:if(Kn(u,h,i),r=h,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(I){Ge(r,r.return,I)}if(r=h,u=r.updateQueue,u!==null){var M=r.stateNode;try{var O=u.shared.hiddenCallbacks;if(O!==null)for(u.shared.hiddenCallbacks=null,u=0;u<O.length;u++)Gh(O[u],M)}catch(I){Ge(r,r.return,I)}}i&&b&64&&ep(h),Ko(h,h.return);break;case 27:ap(h);case 26:case 5:Kn(u,h,i),i&&r===null&&b&4&&np(h),Ko(h,h.return);break;case 12:Kn(u,h,i);break;case 31:Kn(u,h,i),i&&b&4&&cp(u,h);break;case 13:Kn(u,h,i),i&&b&4&&up(u,h);break;case 22:h.memoizedState===null&&Kn(u,h,i),Ko(h,h.return);break;case 30:break;default:Kn(u,h,i)}n=n.sibling}}function ju(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Uo(i))}function Eu(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Uo(e))}function yn(e,n,i,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)hp(e,n,i,r),n=n.sibling}function hp(e,n,i,r){var u=n.flags;switch(n.tag){case 0:case 11:case 15:yn(e,n,i,r),u&2048&&Wo(9,n);break;case 1:yn(e,n,i,r);break;case 3:yn(e,n,i,r),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Uo(e)));break;case 12:if(u&2048){yn(e,n,i,r),e=n.stateNode;try{var h=n.memoizedProps,b=h.id,M=h.onPostCommit;typeof M=="function"&&M(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Ge(n,n.return,O)}}else yn(e,n,i,r);break;case 31:yn(e,n,i,r);break;case 13:yn(e,n,i,r);break;case 23:break;case 22:h=n.stateNode,b=n.alternate,n.memoizedState!==null?h._visibility&2?yn(e,n,i,r):Jo(e,n):h._visibility&2?yn(e,n,i,r):(h._visibility|=2,qa(e,n,i,r,(n.subtreeFlags&10256)!==0||!1)),u&2048&&ju(b,n);break;case 24:yn(e,n,i,r),u&2048&&Eu(n.alternate,n);break;default:yn(e,n,i,r)}}function qa(e,n,i,r,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,b=n,M=i,O=r,I=b.flags;switch(b.tag){case 0:case 11:case 15:qa(h,b,M,O,u),Wo(8,b);break;case 23:break;case 22:var P=b.stateNode;b.memoizedState!==null?P._visibility&2?qa(h,b,M,O,u):Jo(h,b):(P._visibility|=2,qa(h,b,M,O,u)),u&&I&2048&&ju(b.alternate,b);break;case 24:qa(h,b,M,O,u),u&&I&2048&&Eu(b.alternate,b);break;default:qa(h,b,M,O,u)}n=n.sibling}}function Jo(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,r=n,u=r.flags;switch(r.tag){case 22:Jo(i,r),u&2048&&ju(r.alternate,r);break;case 24:Jo(i,r),u&2048&&Eu(r.alternate,r);break;default:Jo(i,r)}n=n.sibling}}var el=8192;function Pa(e,n,i){if(e.subtreeFlags&el)for(e=e.child;e!==null;)mp(e,n,i),e=e.sibling}function mp(e,n,i){switch(e.tag){case 26:Pa(e,n,i),e.flags&el&&e.memoizedState!==null&&Y1(i,bn,e.memoizedState,e.memoizedProps);break;case 5:Pa(e,n,i);break;case 3:case 4:var r=bn;bn=Ur(e.stateNode.containerInfo),Pa(e,n,i),bn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=el,el=16777216,Pa(e,n,i),el=r):Pa(e,n,i));break;default:Pa(e,n,i)}}function pp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function tl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];bt=r,xp(r,e)}pp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gp(e),e=e.sibling}function gp(e){switch(e.tag){case 0:case 11:case 15:tl(e),e.flags&2048&&wi(9,e,e.return);break;case 3:tl(e);break;case 12:tl(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Mr(e)):tl(e);break;default:tl(e)}}function Mr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];bt=r,xp(r,e)}pp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:wi(8,n,n.return),Mr(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Mr(n));break;default:Mr(n)}e=e.sibling}}function xp(e,n){for(;bt!==null;){var i=bt;switch(i.tag){case 0:case 11:case 15:wi(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Uo(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,bt=r;else e:for(i=e;bt!==null;){r=bt;var u=r.sibling,h=r.return;if(rp(r),r===i){bt=null;break e}if(u!==null){u.return=h,bt=u;break e}bt=h}}}var n1={getCacheForType:function(e){var n=Mt(st),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return Mt(st).controller.signal}},i1=typeof WeakMap=="function"?WeakMap:Map,He=0,Qe=null,Te=null,Oe=0,Ie=0,en=null,Si=!1,Qa=!1,Au=!1,Jn=0,at=0,Ni=0,ca=0,Tu=0,tn=0,Za=0,nl=null,Gt=null,zu=!1,jr=0,vp=0,Er=1/0,Ar=null,Ci=null,ht=0,Mi=null,Fa=null,ei=0,Ru=0,Ou=null,bp=null,il=0,ku=null;function nn(){return(He&2)!==0&&Oe!==0?Oe&-Oe:U.T!==null?Bu():Df()}function yp(){if(tn===0)if((Oe&536870912)===0||$e){var e=$l;$l<<=1,($l&3932160)===0&&($l=262144),tn=e}else tn=536870912;return e=Kt.current,e!==null&&(e.flags|=32),tn}function Vt(e,n,i){(e===Qe&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),ji(e,Oe,tn,!1)),Co(e,i),((He&2)===0||e!==Qe)&&(e===Qe&&((He&2)===0&&(ca|=i),at===4&&ji(e,Oe,tn,!1)),En(e))}function wp(e,n,i){if((He&6)!==0)throw Error(o(327));var r=!i&&(n&127)===0&&(n&e.expiredLanes)===0||No(e,n),u=r?l1(e,n):Du(e,n,!0),h=r;do{if(u===0){Qa&&!r&&ji(e,n,0,!1);break}else{if(i=e.current.alternate,h&&!a1(i)){u=Du(e,n,!1),h=!1;continue}if(u===2){if(h=n,e.errorRecoveryDisabledLanes&h)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var M=e;u=nl;var O=M.current.memoizedState.isDehydrated;if(O&&(Wa(M,b).flags|=256),b=Du(M,b,!1),b!==2){if(Au&&!O){M.errorRecoveryDisabledLanes|=h,ca|=h,u=4;break e}h=Gt,Gt=u,h!==null&&(Gt===null?Gt=h:Gt.push.apply(Gt,h))}u=b}if(h=!1,u!==2)continue}}if(u===1){Wa(e,0),ji(e,n,0,!0);break}e:{switch(r=e,h=u,h){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:ji(r,n,tn,!Si);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(u=jr+300-Fe(),10<u)){if(ji(r,n,tn,!Si),Ul(r,0,!0)!==0)break e;ei=n,r.timeoutHandle=Kp(Sp.bind(null,r,i,Gt,Ar,zu,n,tn,ca,Za,Si,h,"Throttled",-0,0),u);break e}Sp(r,i,Gt,Ar,zu,n,tn,ca,Za,Si,h,null,-0,0)}}break}while(!0);En(e)}function Sp(e,n,i,r,u,h,b,M,O,I,P,W,G,X){if(e.timeoutHandle=-1,W=n.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},mp(n,h,W);var ue=(h&62914560)===h?jr-Fe():(h&4194048)===h?vp-Fe():0;if(ue=I1(W,ue),ue!==null){ei=h,e.cancelPendingCommit=ue(zp.bind(null,e,n,h,i,r,u,b,M,O,P,W,null,G,X)),ji(e,h,b,!I);return}}zp(e,n,h,i,r,u,b,M,O)}function a1(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var u=i[r],h=u.getSnapshot;u=u.value;try{if(!Ft(h(),u))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ji(e,n,i,r){n&=~Tu,n&=~ca,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var u=n;0<u;){var h=31-Zt(u),b=1<<h;r[h]=-1,u&=~b}i!==0&&Of(e,i,n)}function Tr(){return(He&6)===0?(al(0),!1):!0}function _u(){if(Te!==null){if(Ie===0)var e=Te.return;else e=Te,Gn=ea=null,Fc(e),Ya=null,Ho=0,e=Te;for(;e!==null;)Jm(e.alternate,e),e=e.return;Te=null}}function Wa(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,C1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ei=0,_u(),Qe=e,Te=i=Yn(e.current,null),Oe=n,Ie=0,en=null,Si=!1,Qa=No(e,n),Au=!1,Za=tn=Tu=ca=Ni=at=0,Gt=nl=null,zu=!1,(n&8)!==0&&(n|=n&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=n;0<r;){var u=31-Zt(r),h=1<<u;n|=e[u],r&=~h}return Jn=n,Fl(),i}function Np(e,n){Ce=null,U.H=Qo,n===Ha||n===ar?(n=Bh(),Ie=3):n===Uc?(n=Bh(),Ie=4):Ie=n===fu?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,en=n,Te===null&&(at=1,vr(e,cn(n,e.current)))}function Cp(){var e=Kt.current;return e===null?!0:(Oe&4194048)===Oe?hn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===hn:!1}function Mp(){var e=U.H;return U.H=Qo,e===null?Qo:e}function jp(){var e=U.A;return U.A=n1,e}function zr(){at=4,Si||(Oe&4194048)!==Oe&&Kt.current!==null||(Qa=!0),(Ni&134217727)===0&&(ca&134217727)===0||Qe===null||ji(Qe,Oe,tn,!1)}function Du(e,n,i){var r=He;He|=2;var u=Mp(),h=jp();(Qe!==e||Oe!==n)&&(Ar=null,Wa(e,n)),n=!1;var b=at;e:do try{if(Ie!==0&&Te!==null){var M=Te,O=en;switch(Ie){case 8:_u(),b=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(n=!0);var I=Ie;if(Ie=0,en=null,Ka(e,M,O,I),i&&Qa){b=0;break e}break;default:I=Ie,Ie=0,en=null,Ka(e,M,O,I)}}o1(),b=at;break}catch(P){Np(e,P)}while(!0);return n&&e.shellSuspendCounter++,Gn=ea=null,He=r,U.H=u,U.A=h,Te===null&&(Qe=null,Oe=0,Fl()),b}function o1(){for(;Te!==null;)Ep(Te)}function l1(e,n){var i=He;He|=2;var r=Mp(),u=jp();Qe!==e||Oe!==n?(Ar=null,Er=Fe()+500,Wa(e,n)):Qa=No(e,n);e:do try{if(Ie!==0&&Te!==null){n=Te;var h=en;t:switch(Ie){case 1:Ie=0,en=null,Ka(e,n,h,1);break;case 2:case 9:if(Lh(h)){Ie=0,en=null,Ap(n);break}n=function(){Ie!==2&&Ie!==9||Qe!==e||(Ie=7),En(e)},h.then(n,n);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Lh(h)?(Ie=0,en=null,Ap(n)):(Ie=0,en=null,Ka(e,n,h,7));break;case 5:var b=null;switch(Te.tag){case 26:b=Te.memoizedState;case 5:case 27:var M=Te;if(b?hg(b):M.stateNode.complete){Ie=0,en=null;var O=M.sibling;if(O!==null)Te=O;else{var I=M.return;I!==null?(Te=I,Rr(I)):Te=null}break t}}Ie=0,en=null,Ka(e,n,h,5);break;case 6:Ie=0,en=null,Ka(e,n,h,6);break;case 8:_u(),at=6;break e;default:throw Error(o(462))}}r1();break}catch(P){Np(e,P)}while(!0);return Gn=ea=null,U.H=r,U.A=u,He=i,Te!==null?0:(Qe=null,Oe=0,Fl(),at)}function r1(){for(;Te!==null&&!le();)Ep(Te)}function Ep(e){var n=Wm(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,n===null?Rr(e):Te=n}function Ap(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Xm(i,n,n.pendingProps,n.type,void 0,Oe);break;case 11:n=Xm(i,n,n.pendingProps,n.type.render,n.ref,Oe);break;case 5:Fc(n);default:Jm(i,n),n=Te=jh(n,Jn),n=Wm(i,n,Jn)}e.memoizedProps=e.pendingProps,n===null?Rr(e):Te=n}function Ka(e,n,i,r){Gn=ea=null,Fc(n),Ya=null,Ho=0;var u=n.return;try{if(Z0(e,u,n,i,Oe)){at=1,vr(e,cn(i,e.current)),Te=null;return}}catch(h){if(u!==null)throw Te=u,h;at=1,vr(e,cn(i,e.current)),Te=null;return}n.flags&32768?($e||r===1?e=!0:Qa||(Oe&536870912)!==0?e=!1:(Si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Kt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Tp(n,e)):Rr(n)}function Rr(e){var n=e;do{if((n.flags&32768)!==0){Tp(n,Si);return}e=n.return;var i=K0(n.alternate,n,Jn);if(i!==null){Te=i;return}if(n=n.sibling,n!==null){Te=n;return}Te=n=e}while(n!==null);at===0&&(at=5)}function Tp(e,n){do{var i=J0(e.alternate,e);if(i!==null){i.flags&=32767,Te=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Te=e;return}Te=e=i}while(e!==null);at=6,Te=null}function zp(e,n,i,r,u,h,b,M,O){e.cancelPendingCommit=null;do Or();while(ht!==0);if((He&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(h=n.lanes|n.childLanes,h|=Nc,Hy(e,i,h,b,M,O),e===Qe&&(Te=Qe=null,Oe=0),Fa=n,Mi=e,ei=i,Ru=h,Ou=u,bp=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,d1(Vi,function(){return Dp(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,u=Q.p,Q.p=2,b=He,He|=4;try{e1(e,n,i)}finally{He=b,Q.p=u,U.T=r}}ht=1,Rp(),Op(),kp()}}function Rp(){if(ht===1){ht=0;var e=Mi,n=Fa,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var r=Q.p;Q.p=2;var u=He;He|=4;try{dp(n,e);var h=Pu,b=xh(e.containerInfo),M=h.focusedElem,O=h.selectionRange;if(b!==M&&M&&M.ownerDocument&&gh(M.ownerDocument.documentElement,M)){if(O!==null&&vc(M)){var I=O.start,P=O.end;if(P===void 0&&(P=I),"selectionStart"in M)M.selectionStart=I,M.selectionEnd=Math.min(P,M.value.length);else{var W=M.ownerDocument||document,G=W&&W.defaultView||window;if(G.getSelection){var X=G.getSelection(),ue=M.textContent.length,xe=Math.min(O.start,ue),Pe=O.end===void 0?xe:Math.min(O.end,ue);!X.extend&&xe>Pe&&(b=Pe,Pe=xe,xe=b);var B=ph(M,xe),L=ph(M,Pe);if(B&&L&&(X.rangeCount!==1||X.anchorNode!==B.node||X.anchorOffset!==B.offset||X.focusNode!==L.node||X.focusOffset!==L.offset)){var H=W.createRange();H.setStart(B.node,B.offset),X.removeAllRanges(),xe>Pe?(X.addRange(H),X.extend(L.node,L.offset)):(H.setEnd(L.node,L.offset),X.addRange(H))}}}}for(W=[],X=M;X=X.parentNode;)X.nodeType===1&&W.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<W.length;M++){var F=W[M];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Vr=!!qu,Pu=qu=null}finally{He=u,Q.p=r,U.T=i}}e.current=n,ht=2}}function Op(){if(ht===2){ht=0;var e=Mi,n=Fa,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var r=Q.p;Q.p=2;var u=He;He|=4;try{lp(e,n.alternate,n)}finally{He=u,Q.p=r,U.T=i}}ht=3}}function kp(){if(ht===4||ht===3){ht=0,xt();var e=Mi,n=Fa,i=ei,r=bp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ht=5:(ht=0,Fa=Mi=null,_p(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ci=null),Js(i),n=n.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(So,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=U.T,u=Q.p,Q.p=2,U.T=null;try{for(var h=e.onRecoverableError,b=0;b<r.length;b++){var M=r[b];h(M.value,{componentStack:M.stack})}}finally{U.T=n,Q.p=u}}(ei&3)!==0&&Or(),En(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===ku?il++:(il=0,ku=e):il=0,al(0)}}function _p(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Uo(n)))}function Or(){return Rp(),Op(),kp(),Dp()}function Dp(){if(ht!==5)return!1;var e=Mi,n=Ru;Ru=0;var i=Js(ei),r=U.T,u=Q.p;try{Q.p=32>i?32:i,U.T=null,i=Ou,Ou=null;var h=Mi,b=ei;if(ht=0,Fa=Mi=null,ei=0,(He&6)!==0)throw Error(o(331));var M=He;if(He|=4,gp(h.current),hp(h,h.current,b,i),He=M,al(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(So,h)}catch{}return!0}finally{Q.p=u,U.T=r,_p(e,n)}}function $p(e,n,i){n=cn(i,n),n=du(e.stateNode,n,2),e=vi(e,n,2),e!==null&&(Co(e,2),En(e))}function Ge(e,n,i){if(e.tag===3)$p(e,e,i);else for(;n!==null;){if(n.tag===3){$p(n,e,i);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ci===null||!Ci.has(r))){e=cn(i,e),i=Lm(2),r=vi(n,i,2),r!==null&&(Um(i,r,n,e),Co(r,2),En(r));break}}n=n.return}}function $u(e,n,i){var r=e.pingCache;if(r===null){r=e.pingCache=new i1;var u=new Set;r.set(n,u)}else u=r.get(n),u===void 0&&(u=new Set,r.set(n,u));u.has(i)||(Au=!0,u.add(i),e=s1.bind(null,e,n,i),n.then(e,e))}function s1(e,n,i){var r=e.pingCache;r!==null&&r.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Qe===e&&(Oe&i)===i&&(at===4||at===3&&(Oe&62914560)===Oe&&300>Fe()-jr?(He&2)===0&&Wa(e,0):Tu|=i,Za===Oe&&(Za=0)),En(e)}function Lp(e,n){n===0&&(n=Rf()),e=Wi(e,n),e!==null&&(Co(e,n),En(e))}function c1(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Lp(e,i)}function u1(e,n){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(n),Lp(e,i)}function d1(e,n){return me(e,n)}var kr=null,Ja=null,Lu=!1,_r=!1,Uu=!1,Ei=0;function En(e){e!==Ja&&e.next===null&&(Ja===null?kr=Ja=e:Ja=Ja.next=e),_r=!0,Lu||(Lu=!0,h1())}function al(e,n){if(!Uu&&_r){Uu=!0;do for(var i=!1,r=kr;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var h=0;else{var b=r.suspendedLanes,M=r.pingedLanes;h=(1<<31-Zt(42|e)+1)-1,h&=u&~(b&~M),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Yp(r,h))}else h=Oe,h=Ul(r,r===Qe?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||No(r,h)||(i=!0,Yp(r,h));r=r.next}while(i);Uu=!1}}function f1(){Up()}function Up(){_r=Lu=!1;var e=0;Ei!==0&&N1()&&(e=Ei);for(var n=Fe(),i=null,r=kr;r!==null;){var u=r.next,h=Bp(r,n);h===0?(r.next=null,i===null?kr=u:i.next=u,u===null&&(Ja=i)):(i=r,(e!==0||(h&3)!==0)&&(_r=!0)),r=u}ht!==0&&ht!==5||al(e),Ei!==0&&(Ei=0)}function Bp(e,n){for(var i=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var b=31-Zt(h),M=1<<b,O=u[b];O===-1?((M&i)===0||(M&r)!==0)&&(u[b]=By(M,n)):O<=n&&(e.expiredLanes|=M),h&=~M}if(n=Qe,i=Oe,i=Ul(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===n&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Re(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||No(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(r!==null&&Re(r),Js(i)){case 2:case 8:i=_t;break;case 32:i=Vi;break;case 268435456:i=si;break;default:i=Vi}return r=Hp.bind(null,e),i=me(i,r),e.callbackPriority=n,e.callbackNode=i,n}return r!==null&&r!==null&&Re(r),e.callbackPriority=2,e.callbackNode=null,2}function Hp(e,n){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Or()&&e.callbackNode!==i)return null;var r=Oe;return r=Ul(e,e===Qe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wp(e,r,n),Bp(e,Fe()),e.callbackNode!=null&&e.callbackNode===i?Hp.bind(null,e):null)}function Yp(e,n){if(Or())return null;wp(e,n,!0)}function h1(){M1(function(){(He&6)!==0?me(_l,f1):Up()})}function Bu(){if(Ei===0){var e=Ua;e===0&&(e=Dl,Dl<<=1,(Dl&261888)===0&&(Dl=256)),Ei=e}return Ei}function Ip(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Il(""+e)}function Gp(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function m1(e,n,i,r,u){if(n==="submit"&&i&&i.stateNode===u){var h=Ip((u[Ut]||null).action),b=r.submitter;b&&(n=(n=b[Ut]||null)?Ip(n.formAction):b.getAttribute("formAction"),n!==null&&(h=n,b=null));var M=new ql("action","action",null,r,u);e.push({event:M,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ei!==0){var O=b?Gp(u,b):new FormData(u);ou(i,{pending:!0,data:O,method:u.method,action:h},null,O)}}else typeof h=="function"&&(M.preventDefault(),O=b?Gp(u,b):new FormData(u),ou(i,{pending:!0,data:O,method:u.method,action:h},h,O))},currentTarget:u}]})}}for(var Hu=0;Hu<Sc.length;Hu++){var Yu=Sc[Hu],p1=Yu.toLowerCase(),g1=Yu[0].toUpperCase()+Yu.slice(1);vn(p1,"on"+g1)}vn(yh,"onAnimationEnd"),vn(wh,"onAnimationIteration"),vn(Sh,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(O0,"onTransitionRun"),vn(k0,"onTransitionStart"),vn(_0,"onTransitionCancel"),vn(Nh,"onTransitionEnd"),Ca("onMouseEnter",["mouseout","mouseover"]),Ca("onMouseLeave",["mouseout","mouseover"]),Ca("onPointerEnter",["pointerout","pointerover"]),Ca("onPointerLeave",["pointerout","pointerover"]),Pi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ol="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),x1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ol));function Vp(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],u=r.event;r=r.listeners;e:{var h=void 0;if(n)for(var b=r.length-1;0<=b;b--){var M=r[b],O=M.instance,I=M.currentTarget;if(M=M.listener,O!==h&&u.isPropagationStopped())break e;h=M,u.currentTarget=I;try{h(u)}catch(P){Zl(P)}u.currentTarget=null,h=O}else for(b=0;b<r.length;b++){if(M=r[b],O=M.instance,I=M.currentTarget,M=M.listener,O!==h&&u.isPropagationStopped())break e;h=M,u.currentTarget=I;try{h(u)}catch(P){Zl(P)}u.currentTarget=null,h=O}}}}function ze(e,n){var i=n[ec];i===void 0&&(i=n[ec]=new Set);var r=e+"__bubble";i.has(r)||(Xp(n,e,2,!1),i.add(r))}function Iu(e,n,i){var r=0;n&&(r|=4),Xp(i,e,r,n)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function Gu(e){if(!e[Dr]){e[Dr]=!0,Uf.forEach(function(i){i!=="selectionchange"&&(x1.has(i)||Iu(i,!1,e),Iu(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Dr]||(n[Dr]=!0,Iu("selectionchange",!1,n))}}function Xp(e,n,i,r){switch(yg(n)){case 2:var u=X1;break;case 8:u=q1;break;default:u=ad}i=u.bind(null,n,i,e),u=void 0,!cc||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),r?u!==void 0?e.addEventListener(n,i,{capture:!0,passive:u}):e.addEventListener(n,i,!0):u!==void 0?e.addEventListener(n,i,{passive:u}):e.addEventListener(n,i,!1)}function Vu(e,n,i,r,u){var h=r;if((n&1)===0&&(n&2)===0&&r!==null)e:for(;;){if(r===null)return;var b=r.tag;if(b===3||b===4){var M=r.stateNode.containerInfo;if(M===u)break;if(b===4)for(b=r.return;b!==null;){var O=b.tag;if((O===3||O===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;M!==null;){if(b=wa(M),b===null)return;if(O=b.tag,O===5||O===6||O===26||O===27){r=h=b;continue e}M=M.parentNode}}r=r.return}Ff(function(){var I=h,P=rc(i),W=[];e:{var G=Ch.get(e);if(G!==void 0){var X=ql,ue=e;switch(e){case"keypress":if(Vl(i)===0)break e;case"keydown":case"keyup":X=u0;break;case"focusin":ue="focus",X=hc;break;case"focusout":ue="blur",X=hc;break;case"beforeblur":case"afterblur":X=hc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Ky;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=h0;break;case yh:case wh:case Sh:X=t0;break;case Nh:X=p0;break;case"scroll":case"scrollend":X=Fy;break;case"wheel":X=x0;break;case"copy":case"cut":case"paste":X=i0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=th;break;case"toggle":case"beforetoggle":X=b0}var xe=(n&4)!==0,Pe=!xe&&(e==="scroll"||e==="scrollend"),B=xe?G!==null?G+"Capture":null:G;xe=[];for(var L=I,H;L!==null;){var F=L;if(H=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||H===null||B===null||(F=Eo(L,B),F!=null&&xe.push(ll(L,F,H))),Pe)break;L=L.return}0<xe.length&&(G=new X(G,ue,null,i,P),W.push({event:G,listeners:xe}))}}if((n&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",G&&i!==lc&&(ue=i.relatedTarget||i.fromElement)&&(wa(ue)||ue[ya]))break e;if((X||G)&&(G=P.window===P?P:(G=P.ownerDocument)?G.defaultView||G.parentWindow:window,X?(ue=i.relatedTarget||i.toElement,X=I,ue=ue?wa(ue):null,ue!==null&&(Pe=c(ue),xe=ue.tag,ue!==Pe||xe!==5&&xe!==27&&xe!==6)&&(ue=null)):(X=null,ue=I),X!==ue)){if(xe=Jf,F="onMouseLeave",B="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(xe=th,F="onPointerLeave",B="onPointerEnter",L="pointer"),Pe=X==null?G:jo(X),H=ue==null?G:jo(ue),G=new xe(F,L+"leave",X,i,P),G.target=Pe,G.relatedTarget=H,F=null,wa(P)===I&&(xe=new xe(B,L+"enter",ue,i,P),xe.target=H,xe.relatedTarget=Pe,F=xe),Pe=F,X&&ue)t:{for(xe=v1,B=X,L=ue,H=0,F=B;F;F=xe(F))H++;F=0;for(var ge=L;ge;ge=xe(ge))F++;for(;0<H-F;)B=xe(B),H--;for(;0<F-H;)L=xe(L),F--;for(;H--;){if(B===L||L!==null&&B===L.alternate){xe=B;break t}B=xe(B),L=xe(L)}xe=null}else xe=null;X!==null&&qp(W,G,X,xe,!1),ue!==null&&Pe!==null&&qp(W,Pe,ue,xe,!0)}}e:{if(G=I?jo(I):window,X=G.nodeName&&G.nodeName.toLowerCase(),X==="select"||X==="input"&&G.type==="file")var Ue=ch;else if(rh(G))if(uh)Ue=T0;else{Ue=E0;var he=j0}else X=G.nodeName,!X||X.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?I&&oc(I.elementType)&&(Ue=ch):Ue=A0;if(Ue&&(Ue=Ue(e,I))){sh(W,Ue,i,P);break e}he&&he(e,G,I),e==="focusout"&&I&&G.type==="number"&&I.memoizedProps.value!=null&&ac(G,"number",G.value)}switch(he=I?jo(I):window,e){case"focusin":(rh(he)||he.contentEditable==="true")&&(za=he,bc=I,Do=null);break;case"focusout":Do=bc=za=null;break;case"mousedown":yc=!0;break;case"contextmenu":case"mouseup":case"dragend":yc=!1,vh(W,i,P);break;case"selectionchange":if(R0)break;case"keydown":case"keyup":vh(W,i,P)}var Me;if(pc)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ta?oh(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(nh&&i.locale!=="ko"&&(Ta||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ta&&(Me=Wf()):(di=P,uc="value"in di?di.value:di.textContent,Ta=!0)),he=$r(I,ke),0<he.length&&(ke=new eh(ke,e,null,i,P),W.push({event:ke,listeners:he}),Me?ke.data=Me:(Me=lh(i),Me!==null&&(ke.data=Me)))),(Me=w0?S0(e,i):N0(e,i))&&(ke=$r(I,"onBeforeInput"),0<ke.length&&(he=new eh("onBeforeInput","beforeinput",null,i,P),W.push({event:he,listeners:ke}),he.data=Me)),m1(W,e,I,i,P)}Vp(W,n)})}function ll(e,n,i){return{instance:e,listener:n,currentTarget:i}}function $r(e,n){for(var i=n+"Capture",r=[];e!==null;){var u=e,h=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=Eo(e,i),u!=null&&r.unshift(ll(e,u,h)),u=Eo(e,n),u!=null&&r.push(ll(e,u,h))),e.tag===3)return r;e=e.return}return[]}function v1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function qp(e,n,i,r,u){for(var h=n._reactName,b=[];i!==null&&i!==r;){var M=i,O=M.alternate,I=M.stateNode;if(M=M.tag,O!==null&&O===r)break;M!==5&&M!==26&&M!==27||I===null||(O=I,u?(I=Eo(i,h),I!=null&&b.unshift(ll(i,I,O))):u||(I=Eo(i,h),I!=null&&b.push(ll(i,I,O)))),i=i.return}b.length!==0&&e.push({event:n,listeners:b})}var b1=/\r\n?/g,y1=/\u0000|\uFFFD/g;function Pp(e){return(typeof e=="string"?e:""+e).replace(b1,`
50
+ `).replace(y1,"")}function Qp(e,n){return n=Pp(n),Pp(e)===n}function qe(e,n,i,r,u,h){switch(i){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||ja(e,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&ja(e,""+r);break;case"className":Hl(e,"class",r);break;case"tabIndex":Hl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Hl(e,i,r);break;case"style":Qf(e,r,h);break;case"data":if(n!=="object"){Hl(e,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Il(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(i==="formAction"?(n!=="input"&&qe(e,n,"name",u.name,u,null),qe(e,n,"formEncType",u.formEncType,u,null),qe(e,n,"formMethod",u.formMethod,u,null),qe(e,n,"formTarget",u.formTarget,u,null)):(qe(e,n,"encType",u.encType,u,null),qe(e,n,"method",u.method,u,null),qe(e,n,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Il(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=Bn);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Il(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":ze("beforetoggle",e),ze("toggle",e),Bl(e,"popover",r);break;case"xlinkActuate":Un(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Un(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Un(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Un(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Un(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Un(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Un(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Un(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Un(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Bl(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Qy.get(i)||i,Bl(e,i,r))}}function Xu(e,n,i,r,u,h){switch(i){case"style":Qf(e,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?ja(e,r):(typeof r=="number"||typeof r=="bigint")&&ja(e,""+r);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),n=i.slice(2,u?i.length-7:void 0),h=e[Ut]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,u),typeof r=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,r,u);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Bl(e,i,r)}}}function Et(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var r=!1,u=!1,h;for(h in i)if(i.hasOwnProperty(h)){var b=i[h];if(b!=null)switch(h){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:qe(e,n,h,b,i,null)}}u&&qe(e,n,"srcSet",i.srcSet,i,null),r&&qe(e,n,"src",i.src,i,null);return;case"input":ze("invalid",e);var M=h=b=u=null,O=null,I=null;for(r in i)if(i.hasOwnProperty(r)){var P=i[r];if(P!=null)switch(r){case"name":u=P;break;case"type":b=P;break;case"checked":O=P;break;case"defaultChecked":I=P;break;case"value":h=P;break;case"defaultValue":M=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,n));break;default:qe(e,n,r,P,i,null)}}Vf(e,h,M,O,I,b,u,!1);return;case"select":ze("invalid",e),r=b=h=null;for(u in i)if(i.hasOwnProperty(u)&&(M=i[u],M!=null))switch(u){case"value":h=M;break;case"defaultValue":b=M;break;case"multiple":r=M;default:qe(e,n,u,M,i,null)}n=h,i=b,e.multiple=!!r,n!=null?Ma(e,!!r,n,!1):i!=null&&Ma(e,!!r,i,!0);return;case"textarea":ze("invalid",e),h=u=r=null;for(b in i)if(i.hasOwnProperty(b)&&(M=i[b],M!=null))switch(b){case"value":r=M;break;case"defaultValue":u=M;break;case"children":h=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(91));break;default:qe(e,n,b,M,i,null)}qf(e,r,u,h);return;case"option":for(O in i)if(i.hasOwnProperty(O)&&(r=i[O],r!=null))switch(O){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:qe(e,n,O,r,i,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(r=0;r<ol.length;r++)ze(ol[r],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in i)if(i.hasOwnProperty(I)&&(r=i[I],r!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:qe(e,n,I,r,i,null)}return;default:if(oc(n)){for(P in i)i.hasOwnProperty(P)&&(r=i[P],r!==void 0&&Xu(e,n,P,r,i,void 0));return}}for(M in i)i.hasOwnProperty(M)&&(r=i[M],r!=null&&qe(e,n,M,r,i,null))}function w1(e,n,i,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,b=null,M=null,O=null,I=null,P=null;for(X in i){var W=i[X];if(i.hasOwnProperty(X)&&W!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":O=W;default:r.hasOwnProperty(X)||qe(e,n,X,null,r,W)}}for(var G in r){var X=r[G];if(W=i[G],r.hasOwnProperty(G)&&(X!=null||W!=null))switch(G){case"type":h=X;break;case"name":u=X;break;case"checked":I=X;break;case"defaultChecked":P=X;break;case"value":b=X;break;case"defaultValue":M=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,n));break;default:X!==W&&qe(e,n,G,X,r,W)}}ic(e,b,M,O,I,P,h,u);return;case"select":X=b=M=G=null;for(h in i)if(O=i[h],i.hasOwnProperty(h)&&O!=null)switch(h){case"value":break;case"multiple":X=O;default:r.hasOwnProperty(h)||qe(e,n,h,null,r,O)}for(u in r)if(h=r[u],O=i[u],r.hasOwnProperty(u)&&(h!=null||O!=null))switch(u){case"value":G=h;break;case"defaultValue":M=h;break;case"multiple":b=h;default:h!==O&&qe(e,n,u,h,r,O)}n=M,i=b,r=X,G!=null?Ma(e,!!i,G,!1):!!r!=!!i&&(n!=null?Ma(e,!!i,n,!0):Ma(e,!!i,i?[]:"",!1));return;case"textarea":X=G=null;for(M in i)if(u=i[M],i.hasOwnProperty(M)&&u!=null&&!r.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:qe(e,n,M,null,r,u)}for(b in r)if(u=r[b],h=i[b],r.hasOwnProperty(b)&&(u!=null||h!=null))switch(b){case"value":G=u;break;case"defaultValue":X=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==h&&qe(e,n,b,u,r,h)}Xf(e,G,X);return;case"option":for(var ue in i)if(G=i[ue],i.hasOwnProperty(ue)&&G!=null&&!r.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:qe(e,n,ue,null,r,G)}for(O in r)if(G=r[O],X=i[O],r.hasOwnProperty(O)&&G!==X&&(G!=null||X!=null))switch(O){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:qe(e,n,O,G,r,X)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var xe in i)G=i[xe],i.hasOwnProperty(xe)&&G!=null&&!r.hasOwnProperty(xe)&&qe(e,n,xe,null,r,G);for(I in r)if(G=r[I],X=i[I],r.hasOwnProperty(I)&&G!==X&&(G!=null||X!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,n));break;default:qe(e,n,I,G,r,X)}return;default:if(oc(n)){for(var Pe in i)G=i[Pe],i.hasOwnProperty(Pe)&&G!==void 0&&!r.hasOwnProperty(Pe)&&Xu(e,n,Pe,void 0,r,G);for(P in r)G=r[P],X=i[P],!r.hasOwnProperty(P)||G===X||G===void 0&&X===void 0||Xu(e,n,P,G,r,X);return}}for(var B in i)G=i[B],i.hasOwnProperty(B)&&G!=null&&!r.hasOwnProperty(B)&&qe(e,n,B,null,r,G);for(W in r)G=r[W],X=i[W],!r.hasOwnProperty(W)||G===X||G==null&&X==null||qe(e,n,W,G,r,X)}function Zp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var u=i[r],h=u.transferSize,b=u.initiatorType,M=u.duration;if(h&&M&&Zp(b)){for(b=0,M=u.responseEnd,r+=1;r<i.length;r++){var O=i[r],I=O.startTime;if(I>M)break;var P=O.transferSize,W=O.initiatorType;P&&Zp(W)&&(O=O.responseEnd,b+=P*(O<M?1:(M-I)/(O-I)))}if(--r,n+=8*(h+b)/(u.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var qu=null,Pu=null;function Lr(e){return e.nodeType===9?e:e.ownerDocument}function Fp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Wp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Qu(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Zu=null;function N1(){var e=window.event;return e&&e.type==="popstate"?e===Zu?!1:(Zu=e,!0):(Zu=null,!1)}var Kp=typeof setTimeout=="function"?setTimeout:void 0,C1=typeof clearTimeout=="function"?clearTimeout:void 0,Jp=typeof Promise=="function"?Promise:void 0,M1=typeof queueMicrotask=="function"?queueMicrotask:typeof Jp<"u"?function(e){return Jp.resolve(null).then(e).catch(j1)}:Kp;function j1(e){setTimeout(function(){throw e})}function Ai(e){return e==="head"}function eg(e,n){var i=n,r=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(u),io(n);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")rl(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,rl(i);for(var h=i.firstChild;h;){var b=h.nextSibling,M=h.nodeName;h[Mo]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=b}}else i==="body"&&rl(e.ownerDocument.body);i=u}while(i);io(n)}function tg(e,n){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Fu(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Fu(i),tc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function E1(e,n,i,r){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Mo])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function A1(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=mn(e.nextSibling),e===null))return null;return e}function ng(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function Wu(e){return e.data==="$?"||e.data==="$~"}function Ku(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function T1(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var r=function(){n(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function mn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Ju=null;function ig(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return mn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function ag(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function og(e,n,i){switch(n=Lr(i),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function rl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);tc(e)}var pn=new Map,lg=new Set;function Ur(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ti=Q.d;Q.d={f:z1,r:R1,D:O1,C:k1,L:_1,m:D1,X:L1,S:$1,M:U1};function z1(){var e=ti.f(),n=Tr();return e||n}function R1(e){var n=Sa(e);n!==null&&n.tag===5&&n.type==="form"?Nm(n):ti.r(e)}var eo=typeof document>"u"?null:document;function rg(e,n,i){var r=eo;if(r&&typeof n=="string"&&n){var u=rn(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),lg.has(u)||(lg.add(u),e={rel:e,crossOrigin:i,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),Et(n,"link",e),vt(n),r.head.appendChild(n)))}}function O1(e){ti.D(e),rg("dns-prefetch",e,null)}function k1(e,n){ti.C(e,n),rg("preconnect",e,n)}function _1(e,n,i){ti.L(e,n,i);var r=eo;if(r&&e&&n){var u='link[rel="preload"][as="'+rn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+rn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+rn(i.imageSizes)+'"]')):u+='[href="'+rn(e)+'"]';var h=u;switch(n){case"style":h=to(e);break;case"script":h=no(e)}pn.has(h)||(e=v({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),pn.set(h,e),r.querySelector(u)!==null||n==="style"&&r.querySelector(sl(h))||n==="script"&&r.querySelector(cl(h))||(n=r.createElement("link"),Et(n,"link",e),vt(n),r.head.appendChild(n)))}}function D1(e,n){ti.m(e,n);var i=eo;if(i&&e){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+rn(r)+'"][href="'+rn(e)+'"]',h=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=no(e)}if(!pn.has(h)&&(e=v({rel:"modulepreload",href:e},n),pn.set(h,e),i.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(cl(h)))return}r=i.createElement("link"),Et(r,"link",e),vt(r),i.head.appendChild(r)}}}function $1(e,n,i){ti.S(e,n,i);var r=eo;if(r&&e){var u=Na(r).hoistableStyles,h=to(e);n=n||"default";var b=u.get(h);if(!b){var M={loading:0,preload:null};if(b=r.querySelector(sl(h)))M.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},i),(i=pn.get(h))&&ed(e,i);var O=b=r.createElement("link");vt(O),Et(O,"link",e),O._p=new Promise(function(I,P){O.onload=I,O.onerror=P}),O.addEventListener("load",function(){M.loading|=1}),O.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Br(b,n,r)}b={type:"stylesheet",instance:b,count:1,state:M},u.set(h,b)}}}function L1(e,n){ti.X(e,n);var i=eo;if(i&&e){var r=Na(i).hoistableScripts,u=no(e),h=r.get(u);h||(h=i.querySelector(cl(u)),h||(e=v({src:e,async:!0},n),(n=pn.get(u))&&td(e,n),h=i.createElement("script"),vt(h),Et(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function U1(e,n){ti.M(e,n);var i=eo;if(i&&e){var r=Na(i).hoistableScripts,u=no(e),h=r.get(u);h||(h=i.querySelector(cl(u)),h||(e=v({src:e,async:!0,type:"module"},n),(n=pn.get(u))&&td(e,n),h=i.createElement("script"),vt(h),Et(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function sg(e,n,i,r){var u=(u=pe.current)?Ur(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=to(i.href),i=Na(u).hoistableStyles,r=i.get(n),r||(r={type:"style",instance:null,count:0,state:null},i.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=to(i.href);var h=Na(u).hoistableStyles,b=h.get(e);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,b),(h=u.querySelector(sl(e)))&&!h._p&&(b.instance=h,b.state.loading=5),pn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},pn.set(e,i),h||B1(u,e,i,b.state))),n&&r===null)throw Error(o(528,""));return b}if(n&&r!==null)throw Error(o(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=no(i),i=Na(u).hoistableScripts,r=i.get(n),r||(r={type:"script",instance:null,count:0,state:null},i.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function to(e){return'href="'+rn(e)+'"'}function sl(e){return'link[rel="stylesheet"]['+e+"]"}function cg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function B1(e,n,i,r){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=e.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),Et(n,"link",i),vt(n),e.head.appendChild(n))}function no(e){return'[src="'+rn(e)+'"]'}function cl(e){return"script[async]"+e}function ug(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+rn(i.href)+'"]');if(r)return n.instance=r,vt(r),r;var u=v({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),vt(r),Et(r,"style",u),Br(r,i.precedence,e),n.instance=r;case"stylesheet":u=to(i.href);var h=e.querySelector(sl(u));if(h)return n.state.loading|=4,n.instance=h,vt(h),h;r=cg(i),(u=pn.get(u))&&ed(r,u),h=(e.ownerDocument||e).createElement("link"),vt(h);var b=h;return b._p=new Promise(function(M,O){b.onload=M,b.onerror=O}),Et(h,"link",r),n.state.loading|=4,Br(h,i.precedence,e),n.instance=h;case"script":return h=no(i.src),(u=e.querySelector(cl(h)))?(n.instance=u,vt(u),u):(r=i,(u=pn.get(h))&&(r=v({},i),td(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),vt(u),Et(u,"link",r),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,Br(r,i.precedence,e));return n.instance}function Br(e,n,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,h=u,b=0;b<r.length;b++){var M=r[b];if(M.dataset.precedence===n)h=M;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function ed(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function td(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Hr=null;function dg(e,n,i){if(Hr===null){var r=new Map,u=Hr=new Map;u.set(i,r)}else u=Hr,r=u.get(i),r||(r=new Map,u.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var h=i[u];if(!(h[Mo]||h[Nt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(n)||"";b=e+b;var M=r.get(b);M?M.push(h):r.set(b,[h])}}return r}function fg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function H1(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function hg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Y1(e,n,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=to(r.href),h=n.querySelector(sl(u));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Yr.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=h,vt(h);return}h=n.ownerDocument||n,r=cg(r),(u=pn.get(u))&&ed(r,u),h=h.createElement("link"),vt(h);var b=h;b._p=new Promise(function(M,O){b.onload=M,b.onerror=O}),Et(h,"link",r),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Yr.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var nd=0;function I1(e,n){return e.stylesheets&&e.count===0&&Gr(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Gr(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&nd===0&&(nd=62500*S1());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gr(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>nd?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function Yr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ir=null;function Gr(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ir=new Map,n.forEach(G1,e),Ir=null,Yr.call(e))}function G1(e,n){if(!(n.state.loading&4)){var i=Ir.get(e);if(i)var r=i.get(null);else{i=new Map,Ir.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var b=u[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(i.set(b.dataset.precedence,b),r=b)}r&&i.set(null,r)}u=n.instance,b=u.getAttribute("data-precedence"),h=i.get(b)||r,h===r&&i.set(null,u),i.set(b,u),this.count++,r=Yr.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var ul={$$typeof:z,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function V1(e,n,i,r,u,h,b,M,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ws(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ws(0),this.hiddenUpdates=Ws(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function mg(e,n,i,r,u,h,b,M,O,I,P,W){return e=new V1(e,n,i,b,O,I,P,W,M),n=1,h===!0&&(n|=24),h=Wt(3,null,null,n),e.current=h,h.stateNode=e,n=Dc(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:r,isDehydrated:i,cache:n},Bc(h),e}function pg(e){return e?(e=ka,e):ka}function gg(e,n,i,r,u,h){u=pg(u),r.context===null?r.context=u:r.pendingContext=u,r=xi(n),r.payload={element:i},h=h===void 0?null:h,h!==null&&(r.callback=h),i=vi(e,r,n),i!==null&&(Vt(i,e,n),Io(i,e,n))}function xg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function id(e,n){xg(e,n),(e=e.alternate)&&xg(e,n)}function vg(e){if(e.tag===13||e.tag===31){var n=Wi(e,67108864);n!==null&&Vt(n,e,67108864),id(e,67108864)}}function bg(e){if(e.tag===13||e.tag===31){var n=nn();n=Ks(n);var i=Wi(e,n);i!==null&&Vt(i,e,n),id(e,n)}}var Vr=!0;function X1(e,n,i,r){var u=U.T;U.T=null;var h=Q.p;try{Q.p=2,ad(e,n,i,r)}finally{Q.p=h,U.T=u}}function q1(e,n,i,r){var u=U.T;U.T=null;var h=Q.p;try{Q.p=8,ad(e,n,i,r)}finally{Q.p=h,U.T=u}}function ad(e,n,i,r){if(Vr){var u=od(r);if(u===null)Vu(e,n,r,Xr,i),wg(e,r);else if(Q1(u,e,n,i,r))r.stopPropagation();else if(wg(e,r),n&4&&-1<P1.indexOf(e)){for(;u!==null;){var h=Sa(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=qi(h.pendingLanes);if(b!==0){var M=h;for(M.pendingLanes|=2,M.entangledLanes|=2;b;){var O=1<<31-Zt(b);M.entanglements[1]|=O,b&=~O}En(h),(He&6)===0&&(Er=Fe()+500,al(0))}}break;case 31:case 13:M=Wi(h,2),M!==null&&Vt(M,h,2),Tr(),id(h,2)}if(h=od(r),h===null&&Vu(e,n,r,Xr,i),h===u)break;u=h}u!==null&&r.stopPropagation()}else Vu(e,n,r,null,i)}}function od(e){return e=rc(e),ld(e)}var Xr=null;function ld(e){if(Xr=null,e=wa(e),e!==null){var n=c(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=d(n),e!==null)return e;e=null}else if(i===31){if(e=f(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Xr=e,null}function yg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Sn()){case _l:return 2;case _t:return 8;case Vi:case Nn:return 32;case si:return 268435456;default:return 32}default:return 32}}var rd=!1,Ti=null,zi=null,Ri=null,dl=new Map,fl=new Map,Oi=[],P1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function wg(e,n){switch(e){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":dl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fl.delete(n.pointerId)}}function hl(e,n,i,r,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:r,nativeEvent:h,targetContainers:[u]},n!==null&&(n=Sa(n),n!==null&&vg(n)),e):(e.eventSystemFlags|=r,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Q1(e,n,i,r,u){switch(n){case"focusin":return Ti=hl(Ti,e,n,i,r,u),!0;case"dragenter":return zi=hl(zi,e,n,i,r,u),!0;case"mouseover":return Ri=hl(Ri,e,n,i,r,u),!0;case"pointerover":var h=u.pointerId;return dl.set(h,hl(dl.get(h)||null,e,n,i,r,u)),!0;case"gotpointercapture":return h=u.pointerId,fl.set(h,hl(fl.get(h)||null,e,n,i,r,u)),!0}return!1}function Sg(e){var n=wa(e.target);if(n!==null){var i=c(n);if(i!==null){if(n=i.tag,n===13){if(n=d(i),n!==null){e.blockedOn=n,$f(e.priority,function(){bg(i)});return}}else if(n===31){if(n=f(i),n!==null){e.blockedOn=n,$f(e.priority,function(){bg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qr(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=od(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);lc=r,i.target.dispatchEvent(r),lc=null}else return n=Sa(i),n!==null&&vg(n),e.blockedOn=i,!1;n.shift()}return!0}function Ng(e,n,i){qr(e)&&i.delete(n)}function Z1(){rd=!1,Ti!==null&&qr(Ti)&&(Ti=null),zi!==null&&qr(zi)&&(zi=null),Ri!==null&&qr(Ri)&&(Ri=null),dl.forEach(Ng),fl.forEach(Ng)}function Pr(e,n){e.blockedOn===n&&(e.blockedOn=null,rd||(rd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Z1)))}var Qr=null;function Cg(e){Qr!==e&&(Qr=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Qr===e&&(Qr=null);for(var n=0;n<e.length;n+=3){var i=e[n],r=e[n+1],u=e[n+2];if(typeof r!="function"){if(ld(r||i)===null)continue;break}var h=Sa(i);h!==null&&(e.splice(n,3),n-=3,ou(h,{pending:!0,data:u,method:i.method,action:r},r,u))}}))}function io(e){function n(O){return Pr(O,e)}Ti!==null&&Pr(Ti,e),zi!==null&&Pr(zi,e),Ri!==null&&Pr(Ri,e),dl.forEach(n),fl.forEach(n);for(var i=0;i<Oi.length;i++){var r=Oi[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Oi.length&&(i=Oi[0],i.blockedOn===null);)Sg(i),i.blockedOn===null&&Oi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var u=i[r],h=i[r+1],b=u[Ut]||null;if(typeof h=="function")b||Cg(i);else if(b){var M=null;if(h&&h.hasAttribute("formAction")){if(u=h,b=h[Ut]||null)M=b.formAction;else if(ld(u)!==null)continue}else M=b.action;typeof M=="function"?i[r+1]=M:(i.splice(r,3),r-=3),Cg(i)}}}function Mg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function sd(e){this._internalRoot=e}Zr.prototype.render=sd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var i=n.current,r=nn();gg(i,r,e,n,null,null)},Zr.prototype.unmount=sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;gg(e.current,2,null,e,null,null),Tr(),n[ya]=null}};function Zr(e){this._internalRoot=e}Zr.prototype.unstable_scheduleHydration=function(e){if(e){var n=Df();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Oi.length&&n!==0&&n<Oi[i].priority;i++);Oi.splice(i,0,e),i===0&&Sg(e)}};var jg=a.version;if(jg!=="19.2.7")throw Error(o(527,jg,"19.2.7"));Q.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var F1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{So=Fr.inject(F1),Qt=Fr}catch{}}return pl.createRoot=function(e,n){if(!s(e))throw Error(o(299));var i=!1,r="",u=km,h=_m,b=Dm;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=mg(e,1,!1,null,null,i,r,null,u,h,b,Mg),e[ya]=n.current,Gu(e),new sd(n)},pl.hydrateRoot=function(e,n,i){if(!s(e))throw Error(o(299));var r=!1,u="",h=km,b=_m,M=Dm,O=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(M=i.onRecoverableError),i.formState!==void 0&&(O=i.formState)),n=mg(e,1,!0,n,i??null,r,u,O,h,b,M,Mg),n.context=pg(null),i=n.current,r=nn(),r=Ks(r),u=xi(r),u.callback=null,vi(i,u,r),i=r,n.current.lanes=i,Co(n,i),En(n),e[ya]=n.current,Gu(e),new Zr(n)},pl.version="19.2.7",pl}var $g;function cw(){if($g)return dd.exports;$g=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),dd.exports=sw(),dd.exports}var uw=cw();const dw="modulepreload",fw=function(t){return"/"+t},Lg={},hw=function(a,l,o){let s=Promise.resolve();if(l&&l.length>0){let d=function(g){return Promise.all(g.map(x=>Promise.resolve(x).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));s=d(l.map(g=>{if(g=fw(g),g in Lg)return;Lg[g]=!0;const x=g.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const w=document.createElement("link");if(w.rel=x?"stylesheet":dw,x||(w.as="script"),w.crossOrigin="",w.href=g,p&&w.setAttribute("nonce",p),document.head.appendChild(w),x)return new Promise((y,S)=>{w.addEventListener("load",y),w.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return s.then(d=>{for(const f of d||[])f.status==="rejected"&&c(f.reason);return a().catch(c)})},Ug=t=>Symbol.iterator in t,Bg=t=>"entries"in t,Hg=(t,a)=>{const l=t instanceof Map?t:new Map(t.entries()),o=a instanceof Map?a:new Map(a.entries());if(l.size!==o.size)return!1;for(const[s,c]of l)if(!o.has(s)||!Object.is(c,o.get(s)))return!1;return!0},mw=(t,a)=>{const l=t[Symbol.iterator](),o=a[Symbol.iterator]();let s=l.next(),c=o.next();for(;!s.done&&!c.done;){if(!Object.is(s.value,c.value))return!1;s=l.next(),c=o.next()}return!!s.done&&!!c.done};function pw(t,a){return Object.is(t,a)?!0:typeof t!="object"||t===null||typeof a!="object"||a===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(a)?!1:Ug(t)&&Ug(a)?Bg(t)&&Bg(a)?Hg(t,a):mw(t,a):Hg({entries:()=>Object.entries(t)},{entries:()=>Object.entries(a)})}function Pt(t){const a=so.useRef(void 0);return l=>{const o=t(l);return pw(a.current,o)?a.current:a.current=o}}function Y(t,a,l){return t==="zh-CN"?l:a}function gw(t,a,l){return!t.text||l?!1:!(a&&t.meta.exportReason==="text-rasterized")}function xw(t){const a=t.style.fills;if(!a||a.length===0)return"";if(a.length===1)return vw(a[0]);const l=[];for(let o=a.length-1;o>=0;o--){const s=bw(a[o]);s&&l.push(s)}return l.length===0?"":l.length===1?`background:${l[0]}`:`background:${l.join(", ")}`}function vw(t){if(t.type==="solid"&&t.color)return`background-color:${t.color}`;if(t.type==="linear-gradient"&&t.gradient){const a=t.gradient.stops.map(l=>`${l.color} ${l.offset}%`).join(", ");return`background:linear-gradient(${t.gradient.angle??180}deg, ${a})`}if(t.type==="radial-gradient"&&t.gradient){const a=t.gradient.stops.map(o=>`${o.color} ${o.offset}%`).join(", "),l=t.gradient.center;return l?`background:radial-gradient(circle at ${l.x*100}% ${l.y*100}%, ${a})`:`background:radial-gradient(circle, ${a})`}return t.type==="image"?"background:repeating-linear-gradient(45deg,#f0f0f0,#f0f0f0 10px,#e0e0e0 10px,#e0e0e0 20px)":""}function bw(t){if(t.type==="solid"&&t.color)return`linear-gradient(${t.color},${t.color})`;if(t.type==="linear-gradient"&&t.gradient){const a=t.gradient.stops.map(l=>`${l.color} ${l.offset}%`).join(", ");return`linear-gradient(${t.gradient.angle??180}deg, ${a})`}if(t.type==="radial-gradient"&&t.gradient){const a=t.gradient.stops.map(o=>`${o.color} ${o.offset}%`).join(", "),l=t.gradient.center;return l?`radial-gradient(circle at ${l.x*100}% ${l.y*100}%, ${a})`:`radial-gradient(circle, ${a})`}return null}function iv(t,a=2){if(Number.isInteger(t))return t;const l=Math.pow(10,a);return Math.round(t*l)/l}function nt(t){return`${iv(t)}px`}function av(t){return nt(t/2)}function yw(t){const a=t.style.strokes;if(!a||a.length===0)return"";const l=a[0];if(!(l.width>0||l.widths&&l.widths.some(d=>d>0)))return"";const c=l.strokeDashes&&l.strokeDashes.length>0?"dashed":"solid";if(l.position==="outside")return`box-shadow:0 0 0 ${nt(l.width)} ${l.color}`;if(l.widths){const[d,f,p,g]=l.widths;return`border-width:${nt(d)} ${nt(f)} ${nt(p)} ${nt(g)};border-style:${c};border-color:${l.color};box-sizing:border-box`}return`border:${nt(l.width)} ${c} ${l.color};box-sizing:border-box`}function xs(t,a){return t.type!=="drop"||t.spread?!1:a.type.toLowerCase()==="group"?!0:t.showShadowBehindNode!==!1}function Qd(t){var l;const a=(l=t.style.strokes)==null?void 0:l[0];return a&&a.position==="outside"&&a.width>0?a.width:0}function ov(t,a){if(xs(t,a))return`filter: drop-shadow(${nt(t.offsetX)} ${nt(t.offsetY)} ${av(t.blur)} ${t.color})`;const l=t.type==="inner"?"inset ":"",o=t.type==="inner"?t.spread:t.spread+Qd(a);return`box-shadow: ${l}${nt(t.offsetX)} ${nt(t.offsetY)} ${nt(t.blur)} ${nt(o)} ${t.color}`}function ww(t){const a=t.style.shadows;if(!a||a.length===0)return"";const l=a.filter(g=>g.type==="drop"),o=a.filter(g=>g.type==="inner"),s=[],c=l.filter(g=>xs(g,t)),d=l.filter(g=>!xs(g,t)),f=Qd(t);if(c.length>0){const g=c.map(x=>`drop-shadow(${nt(x.offsetX)} ${nt(x.offsetY)} ${av(x.blur)} ${x.color})`);s.push(`filter:${g.join(" ")}`)}const p=[...d.map(g=>`${nt(g.offsetX)} ${nt(g.offsetY)} ${nt(g.blur)} ${nt(g.spread+f)} ${g.color}`),...o.map(g=>`inset ${nt(g.offsetX)} ${nt(g.offsetY)} ${nt(g.blur)} ${nt(g.spread)} ${g.color}`)];return p.length>0&&s.push(`box-shadow:${p.join(", ")}`),s.join(";")}const Sw={MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"};function Nw(t,a,l,o,s){var S,C,j,A;if(!t.bbox)return{};const{x:c,y:d,width:f,height:p}=t.bbox,g=t.type==="text",x={overflow:t.style.overflow,zIndex:t.isVirtual?void 0:t.zIndex};if(a)x.position="absolute",x.left=0,x.top=0;else{x.position="absolute";const _=(()=>{const z=t.parentId?s[t.parentId]:void 0;if(z){const R=z.style.strokes;if(R&&R.length>0)return R[0].position!=="outside"?R[0].width:0}return 0})();_?(x.left=c-_,x.top=d-_):(x.left=c,x.top=d)}if(g){x.width=f;const _=(S=t.text)==null?void 0:S.textAutoResize;(l||_==="truncate"||_==="none")&&(x.height=p),_==="truncate"&&(x.overflow="hidden")}else if(x.width=f,t.type==="line"&&p<1&&t.style.strokes.length>0){const _=t.style.strokes[0],z=(_==null?void 0:_.width)||1;x.height=z,(_==null?void 0:_.position)==="center"&&(x.top=x.top-z/2)}else x.height=p;t.style.opacity!==1&&(x.opacity=iv(t.style.opacity));const v=t.style.blendMode;if(v&&v!=="PASS_THROUGH"&&v!=="NORMAL"){const _=Sw[v];_&&(x.mixBlendMode=_)}if(t.type==="ellipse")x.borderRadius="50%",x.overflow="hidden";else{const _=t.style.borderRadius;_.some(z=>z>0)&&(x.borderRadius=_.map(z=>`${z}px`).join(" "))}t.style.overflow==="hidden"&&(x.overflow="hidden");const w=l&&((C=t.image)==null?void 0:C.effectsCssOnly)===!0,y=!l||w;if(!o){if(t.type!=="text"&&!l){const _=xw(t);_&&Object.assign(x,ds(_))}if(t.type==="line"&&t.style.strokes.length>0){const _=t.style.strokes[0];_.color&&_.width>0&&(x.backgroundColor=_.color)}else if(y&&t.type!=="text"){const _=yw(t);_&&Object.assign(x,ds(_))}if(y){const _=ww(t);if(_){const z=ds(_);z.boxShadow&&x.boxShadow&&(z.boxShadow=`${x.boxShadow}, ${z.boxShadow}`),Object.assign(x,z)}}if(y&&((j=t.style.blurs)==null?void 0:j.length)>0){const _=t.style.blurs.find(E=>E.type==="layer"),z=t.style.blurs.find(E=>E.type==="background"),R=[];if(_&&R.push(`blur(${_.radius}px)`),z&&(x.backdropFilter=`blur(${z.radius}px)`),R.length>0){const E=x.filter?`${x.filter} `:"";x.filter=`${E}${R.join(" ")}`}}}return(A=t.computed)!=null&&A.transform&&(x.transform=t.computed.transform.value,x.transformOrigin=t.computed.transform.origin,l&&t.computed.originalBound?(x.left=a?0:t.computed.originalBound.x,x.top=a?0:t.computed.originalBound.y,x.width=t.computed.originalBound.width,x.height=t.computed.originalBound.height):a&&x.overflow==="hidden"&&(x.overflow="visible")),x}function Cw(t){var l;const a=(l=t.text)==null?void 0:l.textLayout;return!(a!=null&&a.hasWrapper)||!a.wrapperStyle?null:{...a.wrapperStyle,pointerEvents:"none"}}function Mw(t){if(!t.text)return{};const a=t.text,l=a.textLayout??{whiteSpace:"pre-wrap"},o=a.textAlign==="justified"?"justify":a.textAlign,s={display:"block",fontSize:a.fontSize,fontFamily:`'${a.fontFamily}', sans-serif`,fontWeight:a.fontWeight||400,color:a.color,textAlign:o,lineHeight:a.lineHeight?`${a.lineHeight}px`:"normal",whiteSpace:l.whiteSpace,wordBreak:l.wordBreak,pointerEvents:"none"};if(a.fillType&&a.fillType!=="solid"&&a.gradient&&(s.background=a.gradient,s.WebkitBackgroundClip="text",s.WebkitTextFillColor="transparent"),l.isTruncate){s.overflow="hidden",s.width="100%";const d=/^\d+$/.test(a.content.trim()),f=l.lineClamp&&l.lineClamp>1?l.lineClamp:void 0;f&&(s.display="-webkit-box",s.WebkitBoxOrient="vertical",s.WebkitLineClamp=f),d||(s.textOverflow="ellipsis")}a.letterSpacing&&(s.letterSpacing=a.letterSpacing),a.textDecoration&&(s.textDecoration=a.textDecoration);const c=t.style.strokes;if(c&&c.length>0){const d=c[0];d.width&&d.width>0&&(s.WebkitTextStroke=`${nt(d.width)} ${d.color}`)}return s}function ds(t){const a={},l=t.split(";").filter(o=>o.trim());for(const o of l){const[s,...c]=o.split(":");if(!s)continue;const d=c.join(":"),f=s.replace(/-([a-z])/g,(p,g)=>g.toUpperCase());a[f]=d}return a}function Ui(t,a="en"){var l,o;return t.type==="solid"?t.color??"":t.type==="linear-gradient"?`linear-gradient(${(l=t.gradient)==null?void 0:l.stops.map(s=>s.color).join(" -> ")})`:t.type==="radial-gradient"?`radial-gradient(${(o=t.gradient)==null?void 0:o.stops.map(s=>s.color).join(" -> ")})`:t.type==="image"?Y(a,"[image fill]","[图片填充]"):t.type}const Yg={MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion"},lv=(t,a=2)=>Number.isInteger(t)?t:Math.round(t*10**a)/10**a,Rt=t=>`${lv(t)}px`,jw=t=>Rt(t/2),Ew=t=>t.map(a=>`${a.color} ${a.offset}%`).join(", ");function Aw(t){if(t.type==="solid"&&t.color)return t.color;if(t.gradient){const a=Ew(t.gradient.stops);if(t.type==="linear-gradient")return`linear-gradient(${t.gradient.angle??180}deg, ${a})`;if(t.type==="radial-gradient"){const{center:l}=t.gradient;return l?`radial-gradient(circle at ${Math.round(l.x*100)}% ${Math.round(l.y*100)}%, ${a})`:`radial-gradient(circle, ${a})`}}return""}function vs(t,a,l="en",o){var A,_,z,R,E,T,D;const s=[],{style:c,type:d}=t,f=d==="text",p=!!a&&((A=t.image)==null?void 0:A.effectsCssOnly)===!0;if(a&&!p)return"";f||s.push(`width: ${Math.round(t.absoluteBbox.width)}px;`,`height: ${Math.round(t.absoluteBbox.height)}px;`),c.opacity!==1&&s.push(`opacity: ${lv(c.opacity)};`);const g=d.toLowerCase()==="ellipse"?"50%":((_=t.computed)==null?void 0:_.borderRadius)??(c.borderRadius.some(k=>k>0)?c.borderRadius.map(k=>Rt(k)).join(" "):void 0);if(g&&s.push(`border-radius: ${g};`),c.overflow==="hidden"&&s.push("overflow: hidden;"),!f&&!p){const k=new Set;for(const V of c.fills){const te=Aw(V);te&&!k.has(te)&&(k.add(te),s.push(V.type==="solid"?`background-color: ${te};`:`background: ${te};`))}}const x=(z=t.computed)==null?void 0:z.maskInfo;if(x!=null&&x.coversParent){if(x.background)for(const k of x.background.split(";")){const V=k.trim();if(!V)continue;const te=V.indexOf(":");s.push(te>0?`${V.slice(0,te)}: ${V.slice(te+1).trim()};`:`${V};`)}o&&s.push(`mask-image: url('${o}');`,"mask-size: 100% 100%;","mask-repeat: no-repeat;")}const v=Qd(t),w=[];if(f&&c.strokes.length>0){const k=c.strokes[0];k.width>0&&s.push(`-webkit-text-stroke: ${Rt(k.width)} ${k.color};`,"paint-order: stroke fill;")}else if(!f)for(const k of c.strokes){const V=(R=k.strokeDashes)!=null&&R.length?"dashed":"solid";if(k.position==="outside")w.push(`0 0 0 ${Rt(k.width)} ${k.color}`);else{if(k.widths){const[te,J,q,ne]=k.widths;s.push(`border-width: ${Rt(te)} ${Rt(J)} ${Rt(q)} ${Rt(ne)};`),s.push(`border-style: ${V};`),s.push(`border-color: ${k.color};`)}else s.push(`border: ${Rt(k.width)} ${V} ${k.color};`);s.push("box-sizing: border-box;")}}const y=[],S=[];for(const k of c.shadows){const V=`${Rt(k.offsetX)} ${Rt(k.offsetY)} ${Rt(k.blur)}`;k.type==="drop"?xs(k,t)?y.push(`drop-shadow(${Rt(k.offsetX)} ${Rt(k.offsetY)} ${jw(k.blur)} ${k.color})`):S.push(`${V} ${Rt(k.spread+v)} ${k.color}`):k.type==="inner"&&S.push(`inset ${V} ${Rt(k.spread)} ${k.color}`)}const C=[];for(const k of c.blurs??[])k.type==="layer"?y.push(`blur(${k.radius}px)`):k.type==="background"&&C.push(`blur(${k.radius}px)`);y.length&&s.push(`filter: ${y.join(" ")};`),C.length&&s.push(`backdrop-filter: ${C.join(" ")};`);const j=[...w,...S];if(j.length&&s.push(`box-shadow: ${j.join(", ")};`),c.blendMode&&Yg[c.blendMode]&&s.push(`mix-blend-mode: ${Yg[c.blendMode]};`),t.text){const k=t.text;s.push(`font-family: '${k.fontFamily}', sans-serif;`,`font-size: ${k.fontSize}px;`),k.fillType&&k.fillType!=="solid"&&k.gradient?s.push(`background: ${k.gradient};`,"-webkit-background-clip: text;","-webkit-text-fill-color: transparent;"):s.push(`color: ${k.color};`),k.fontWeight&&k.fontWeight!==400&&s.push(`font-weight: ${k.fontWeight};`),k.lineHeight&&s.push(`line-height: ${k.lineHeight}px;`),k.letterSpacing&&s.push(`letter-spacing: ${k.letterSpacing}px;`);const V=k.textAlign==="justified"?"justify":k.textAlign;V!=="left"&&s.push(`text-align: ${V};`);const te=k.textAlignVertical==="center"?"middle":k.textAlignVertical;if(te!=="top"&&s.push(`vertical-align: ${te};`),k.textDecoration&&s.push(`text-decoration: ${k.textDecoration};`),k.textAutoResize==="truncate"){const q=(E=k.textLayout)==null?void 0:E.lineClamp;q&&q>1?s.push("overflow: hidden;","display: -webkit-box;","-webkit-box-orient: vertical;",`-webkit-line-clamp: ${q};`,"text-overflow: ellipsis;","word-break: break-word;"):s.push("overflow: hidden;","text-overflow: ellipsis;","white-space: nowrap;")}const J=k.segments;if(J&&J.length>1){s.push("",Y(l,`/* Segmented text (${J.length} segments) — use <span> elements for distinct styles */`,`/* 分段文本(${J.length} 段)— 需要用 <span> 实现不同样式 */`));for(const q of J){const ne=[];q.color!==k.color&&ne.push(`color: ${q.color}`),q.fontSize!==k.fontSize&&ne.push(`font-size: ${q.fontSize}px`),q.fontWeight!==k.fontWeight&&ne.push(`font-weight: ${q.fontWeight}`),q.fontFamily!==k.fontFamily&&ne.push(`font-family: '${q.fontFamily}'`),q.textDecoration!==k.textDecoration&&ne.push(`text-decoration: ${q.textDecoration}`);const ae=ne.join("; ");s.push(`/* <span${ae?` style="${ae}"`:""}>${q.content.replace(/\n/g,"\\n")}</span> */`)}}}return(D=(T=t.computed)==null?void 0:T.transform)!=null&&D.value&&s.push(`transform: ${t.computed.transform.value};`,`transform-origin: ${t.computed.transform.origin};`),p&&s.length>0&&s.unshift(Y(l,"/* Apply these declarations to the <img> container; the effects are not baked into the image. */","/* 以下声明应用到 <img> 容器;这些效果未烘焙进图片。 */")),s.join(`
51
+ `)}function rv(t,a){if(!t.parentId)return[];const l=a.nodes[t.parentId];if(!l)return[];const o=l.children.map(d=>a.nodes[d]).filter(d=>!!d&&d.style.visible);if(o.length<2)return[];const s=[],c=o.findIndex(d=>d.id===t.id);if(c===-1)return[];for(let d=0;d<o.length;d++){if(d===c)continue;const f=o[d],p=zw(t,f);p!==null&&p>=0&&s.push({from:{id:t.id,name:t.name},to:{id:f.id,name:f.name},direction:"horizontal",distance:p,fromEdge:t.bbox.x<f.bbox.x?"right":"left",toEdge:t.bbox.x<f.bbox.x?"left":"right"});const g=Rw(t,f);g!==null&&g>=0&&s.push({from:{id:t.id,name:t.name},to:{id:f.id,name:f.name},direction:"vertical",distance:g,fromEdge:t.bbox.y<f.bbox.y?"bottom":"top",toEdge:t.bbox.y<f.bbox.y?"top":"bottom"})}return s.sort((d,f)=>d.distance-f.distance)}function sv(t,a,l,o){const s=[];for(const c of t.children){const d=a.nodes[c];if(!d||!d.style.visible)continue;const f=l+d.bbox.x,p=o+d.bbox.y;if(s.push({node:d,relX:f,relY:p,width:d.bbox.width,height:d.bbox.height}),d.style.overflow==="hidden")continue;const g=sv(d,a,f,p);s.push(...g)}return s}function Zd(t,a){var k;const l=t.children.map(V=>a.nodes[V]).filter(V=>!!V&&V.style.visible);if(l.length===0)return null;const s=((k=t.layout)==null?void 0:k.display)==="flex"?l.filter(V=>{var te;return((te=V.layout)==null?void 0:te.position)!=="absolute"||V.isVirtual}):l;if(s.length===0)return null;const c=Math.min(...s.map(V=>V.bbox.x)),d=Math.min(...s.map(V=>V.bbox.y)),f=Math.max(...s.map(V=>V.bbox.x+V.bbox.width)),p=Math.max(...s.map(V=>V.bbox.y+V.bbox.height)),g=Math.round(d),x=Math.round(c),v=Math.round(t.bbox.height-p),w=Math.round(t.bbox.width-f),y=g===w&&w===v&&v===x,S=sv(t,a,0,0),C=[];let j=0,A=null,_=0,z=null,R=0,E=null,T=0,D=null;for(const V of S){const te=-V.relY;te>j&&(j=te,A=V.node);const J=-V.relX;J>_&&(_=J,z=V.node);const q=V.relY+V.height-t.bbox.height;q>R&&(R=q,E=V.node);const ne=V.relX+V.width-t.bbox.width;ne>T&&(T=ne,D=V.node)}return j>0&&A&&C.push({side:"top",amount:Math.round(j),childId:A.id,childName:A.name}),_>0&&z&&C.push({side:"left",amount:Math.round(_),childId:z.id,childName:z.name}),R>0&&E&&C.push({side:"bottom",amount:Math.round(R),childId:E.id,childName:E.name}),T>0&&D&&C.push({side:"right",amount:Math.round(T),childId:D.id,childName:D.name}),{top:g,right:w,bottom:v,left:x,uniform:y,overflows:C}}function Tw(t,a){if(!t.parentId)return null;const l=a.nodes[t.parentId];return l?{top:Math.round(t.bbox.y),left:Math.round(t.bbox.x),bottom:Math.round(l.bbox.height-(t.bbox.y+t.bbox.height)),right:Math.round(l.bbox.width-(t.bbox.x+t.bbox.width))}:null}function Ig(t,a){if(!t.parentId)return[];const l=a.nodes[t.parentId];if(!l)return[];const o=l.children.map(v=>a.nodes[v]).filter(v=>!!v&&v.style.visible&&v.id!==t.id);if(o.length===0)return[];const s=t.bbox.x+t.bbox.width,c=t.bbox.y+t.bbox.height,d=[];let f=null,p=null,g=null,x=null;for(const v of o){const w=v.bbox.x+v.bbox.width,y=v.bbox.y+v.bbox.height;if(w<=t.bbox.x+1){const S=Math.round(t.bbox.x-w);S>=0&&(!f||S<f.dist)&&(f={sib:v,dist:S})}if(v.bbox.x>=s-1){const S=Math.round(v.bbox.x-s);S>=0&&(!p||S<p.dist)&&(p={sib:v,dist:S})}if(y<=t.bbox.y+1){const S=Math.round(t.bbox.y-y);S>=0&&(!g||S<g.dist)&&(g={sib:v,dist:S})}if(v.bbox.y>=c-1){const S=Math.round(v.bbox.y-c);S>=0&&(!x||S<x.dist)&&(x={sib:v,dist:S})}}return f&&d.push({siblingId:f.sib.id,siblingName:f.sib.name,axis:"horizontal",direction:"before",distance:f.dist}),p&&d.push({siblingId:p.sib.id,siblingName:p.sib.name,axis:"horizontal",direction:"after",distance:p.dist}),g&&d.push({siblingId:g.sib.id,siblingName:g.sib.name,axis:"vertical",direction:"before",distance:g.dist}),x&&d.push({siblingId:x.sib.id,siblingName:x.sib.name,axis:"vertical",direction:"after",distance:x.dist}),d}function zw(t,a){const l=t.bbox.y,o=t.bbox.y+t.bbox.height,s=a.bbox.y,c=a.bbox.y+a.bbox.height;return Math.min(o,c)-Math.max(l,s)<Math.min(t.bbox.height,a.bbox.height)*.1?null:t.bbox.x+t.bbox.width<=a.bbox.x+1?Math.round(a.bbox.x-(t.bbox.x+t.bbox.width)):a.bbox.x+a.bbox.width<=t.bbox.x+1?Math.round(t.bbox.x-(a.bbox.x+a.bbox.width)):null}function Rw(t,a){const l=t.bbox.x,o=t.bbox.x+t.bbox.width,s=a.bbox.x,c=a.bbox.x+a.bbox.width;return Math.min(o,c)-Math.max(l,s)<Math.min(t.bbox.width,a.bbox.width)*.1?null:t.bbox.y+t.bbox.height<=a.bbox.y+1?Math.round(a.bbox.y-(t.bbox.y+t.bbox.height)):a.bbox.y+a.bbox.height<=t.bbox.y+1?Math.round(t.bbox.y-(a.bbox.y+a.bbox.height)):null}function Je(t){return{x:t.bbox.x,y:t.bbox.y,w:t.bbox.width,h:t.bbox.height}}function Gg(t){var x;const a=Je(t),l=(x=t.meta)==null?void 0:x.rotation;if(!l||Math.abs(l)<.1)return a;const o=l*Math.PI/180,s=Math.abs(Math.cos(o)),c=Math.abs(Math.sin(o)),d=a.w*s+a.h*c,f=a.w*c+a.h*s,p=a.x+a.w/2,g=a.y+a.h/2;return{x:p-d/2,y:g-f/2,w:d,h:f}}function ot(t){return t.w*t.h}function oi(t,a){const l=Math.max(0,Math.min(t.x+t.w,a.x+a.w)-Math.max(t.x,a.x)),o=Math.max(0,Math.min(t.y+t.h,a.y+a.h)-Math.max(t.y,a.y));return l*o}function Ow(t,a){const l=oi(t,a),o=Math.min(ot(t),ot(a));return o>0?l/o:0}function kw(t){return t.bbox.x+t.bbox.width/2}function cv(t){return t.bbox.y+t.bbox.height/2}function Fd(t){return{lo:t.bbox.x,hi:t.bbox.x+t.bbox.width}}function Rs(t){return{lo:t.bbox.y,hi:t.bbox.y+t.bbox.height}}function ma(t,a=0){if(t.length===0)return[];const l=[...t].sort((s,c)=>s.lo-c.lo),o=[{...l[0]}];for(let s=1;s<l.length;s++){const c=o[o.length-1];l[s].lo<=c.hi+a?c.hi=Math.max(c.hi,l[s].hi):o.push({...l[s]})}return o}function Rd(t,a,l,o){const s=a.map(()=>[]);for(const c of t){const d=l(c),f=a.findIndex(p=>p.lo-o<=d&&d<=p.hi+o);f>=0&&s[f].push(c)}return s}function uv(t,a){if(t.length===0)return[];const l=new Map;for(let c=0;c<t.length;c++)l.set(c,[]);for(let c=0;c<t.length;c++)for(let d=c+1;d<t.length;d++)a(t[c],t[d])&&(l.get(c).push(d),l.get(d).push(c));const o=new Uint8Array(t.length),s=[];for(let c=0;c<t.length;c++){if(o[c])continue;const d=[],f=[c];for(o[c]=1;f.length>0;){const p=f.shift();d.push(t[p]);for(const g of l.get(p))o[g]||(o[g]=1,f.push(g))}s.push(d)}return s}function xa(t,a){return t.length>=2&&ma(t.map(Fd),a).length===t.length}function zl(t,a){return t.length>=2&&ma(t.map(Rs),a).length===t.length}function _w(t){const a=Math.min(...t.map(c=>c.bbox.x)),l=Math.min(...t.map(c=>c.bbox.y)),o=Math.max(...t.map(c=>c.bbox.x+c.bbox.width)),s=Math.max(...t.map(c=>c.bbox.y+c.bbox.height));return{x:a,y:l,w:o-a,h:s-l}}function dv(t=750){const a=t/750;return{snapTol:Math.max(2,Math.round(3*a)),bgCoverage:.9,containment:.95,alignTol:Math.max(2,Math.round(3*a)),ornamentalOverlaps:2,separatorRatio:.5,overlapSignificance:.3,sizeUniformTol:.8,stackingOverlap:.5}}let fv=dv();function pt(){return fv}function Dw(t){fv=dv(t)}const $w=["button","btn","close","link","tab","switch","toggle","input","checkbox","radio","select"],Lw=new Set(["rectangle","ellipse","line","vector"]);function va(t,a){return t.text?!0:t.children.some(l=>{const o=a.nodes[l];return o?va(o,a):!1})}function bs(t){return t.children.length>0||t.text?!1:t.type==="rectangle"||t.type==="ellipse"||t.type==="line"||t.type==="vector"||t.type==="image"&&t.children.length===0}function Wd(t){if(t.text||t.children.length>0)return!1;const{fills:a,strokes:l,shadows:o,blurs:s,opacity:c}=t.style;return a.length===0&&l.length===0&&o.length===0&&(!s||s.length===0)&&c>=1}function hv(t,a,l){return t.text||t.children.length>0?!1:oi(Je(t),a)/l>=pt().bgCoverage}function mv(t,a,l){if(t.text||t.children.length>0)return;const o=pt(),{width:s,height:c}=t.bbox;if(s>=a*o.separatorRatio&&(t.type==="line"&&c<=3||c>0&&s/c>8))return"horizontal";if(c>=l*o.separatorRatio&&(t.type==="line"&&s<=3||s>0&&c/s>8))return"vertical"}function Uw(t){if(t.meta.isMask)return"decorative";const a=t.name.toLowerCase();return $w.some(l=>a.includes(l))?"interactive":t.text?"text":t.type==="image"?"decorative":t.children.length>0?"container":bs(t)&&Wd(t)?"decorative":"container"}function Bw(t){return t.style.fills.length>0||t.style.strokes.length>0||t.style.shadows.length>0||t.style.borderRadius.some(a=>a>0)||t.style.opacity<1||t.style.overflow==="hidden"?"visual-boundary":"transparent"}function Hw(t,a,l){const o={x:0,y:0,w:a.bbox.width,h:a.bbox.height},s=ot(o),c=pt();if(t.meta.isMask)return{isDecorative:!0,reason:"mask-layer"};if(Wd(t))return{isDecorative:!0,reason:"ghost-layer"};if(s>0&&hv(t,o,s))return{isDecorative:!0,reason:"background-layer"};const d=mv(t,a.bbox.width,a.bbox.height);if(d)return{isDecorative:!0,reason:`${d}-separator`};if(!t.text&&t.children.length===0&&Lw.has(t.type)){const f=Je(t);let p=0;for(const g of l)g.id!==t.id&&oi(f,Je(g))>0&&p++;if(p>=c.ornamentalOverlaps)return{isDecorative:!0,reason:"ornamental-shape"}}return{isDecorative:!1}}function mo(t){return t.text?"text":t.type==="image"?"image":t.children.length>0?"container":"shape"}const Yw=(t,a)=>{if(!t.text||!a.text)return 1;let l=0,o=0;const s=Math.abs(t.text.fontSize-a.text.fontSize),c=Math.max(t.text.fontSize,a.text.fontSize),d=s<=4?0:Math.min(1,s/c);l+=d*.4,o+=.4;const f=t.text.fontWeight===a.text.fontWeight?0:1;l+=f*.2,o+=.2;const p=/\d/.test(t.text.content||""),g=/\d/.test(a.text.content||"");l+=(p===g?0:.5)*.2,o+=.2;const v=(t.text.content||"").length,w=(a.text.content||"").length,y=Math.min(v,w)/Math.max(v,w||1),S=y>=.5?0:1-y;return l+=S*.2,o+=.2,o>0?l/o*o:1},Iw=(t,a)=>{const l=t.bbox.width||1,o=t.bbox.height||1,s=a.bbox.width||1,c=a.bbox.height||1,d=Math.min(l,s)/Math.max(l,s),f=Math.min(o,c)/Math.max(o,c);return d<.75||f<.75?1:1-(d*.5+f*.5)},Gw=(t,a,l)=>{const o=t.children.map(D=>l.nodes[D]).filter(D=>!!D),s=a.children.map(D=>l.nodes[D]).filter(D=>!!D);if(o.length===0&&s.length===0){const D=t.bbox.width||1,k=t.bbox.height||1,V=a.bbox.width||1,te=a.bbox.height||1,J=Math.min(D,V)/Math.max(D,V),q=Math.min(k,te)/Math.max(k,te);return J<.8||q<.8?1:1-(J*.5+q*.5)}if(o.length===0||s.length===0)return 1;const c=t.bbox.width||1,d=t.bbox.height||1,f=a.bbox.width||1,p=a.bbox.height||1,g=Math.min(c,f)/Math.max(c,f),x=Math.min(d,p)/Math.max(d,p);if(g<.8||x<.8)return 1;const v=Vw(t,o,a,s);if(v<.5)return 1;const w=o.map(D=>Od(D)),y=s.map(D=>Od(D)),S=new Map,C=new Map;for(const D of w)S.set(D,(S.get(D)??0)+1);for(const D of y)C.set(D,(C.get(D)??0)+1);let j=0,A=0;const _=new Set([...S.keys(),...C.keys()]);for(const D of _){const k=S.get(D)??0,V=C.get(D)??0;j+=Math.min(k,V),A+=Math.max(k,V)}const z=A>0?j/A:0,R=1-(g*.5+x*.5),E=1-v,T=1-z;return E*.5+T*.3+R*.2};function Di(t,a,l){const o=Array.from({length:3},()=>new Set),s=t.bbox.width||1,c=t.bbox.height||1,d=t.bbox.x,f=t.bbox.y;for(const p of a){let g;if(l==="vertical"){const v=p.bbox.y+p.bbox.height/2-f;g=Math.max(0,Math.min(1,v/c))}else{const v=p.bbox.x+p.bbox.width/2-d;g=Math.max(0,Math.min(1,v/s))}const x=Math.min(2,Math.floor(g*3));if(x>=0&&x<3){const v=Od(p);o[x].add(v)}}return o}function Wr(t,a){let l=0;for(let o=0;o<3;o++){const s=t[o],c=a[o];if(s.size===0&&c.size===0){l+=1;continue}if(s.size===0||c.size===0)continue;const d=[...s].filter(p=>c.has(p)).length,f=new Set([...s,...c]).size;l+=d/f}return l/3}function Vw(t,a,l,o){const s=(t.bbox.width||1)/(t.bbox.height||1),c=(l.bbox.width||1)/(l.bbox.height||1),d=(s+c)/2,f=1.2;if(d>f){const p=Di(t,a,"horizontal"),g=Di(l,o,"horizontal");return Wr(p,g)}else if(d<1/f){const p=Di(t,a,"vertical"),g=Di(l,o,"vertical");return Wr(p,g)}else{const p=Di(t,a,"vertical"),g=Di(l,o,"vertical"),x=Wr(p,g),v=Di(t,a,"horizontal"),w=Di(l,o,"horizontal"),y=Wr(v,w);return Math.max(x,y)}}function Od(t){return t.text?"text":t.children.length>0?"container":"visual"}const Xw=(t,a)=>{var E,T;const l=((E=t.hints)==null?void 0:E.decorativeReason)||"",o=((T=a.hints)==null?void 0:T.decorativeReason)||"";if(l&&o&&l!==o)return 1;const s=t.bbox.width||1,c=t.bbox.height||1,d=a.bbox.width||1,f=a.bbox.height||1,p=Math.min(s,d)/Math.max(s,d),g=Math.min(c,f)/Math.max(c,f);if(p<.75||g<.75)return 1;let x=0;const v=1-(p*.5+g*.5);x+=v*.3;const w=t.style.borderRadius.some(D=>D>0),y=a.style.borderRadius.some(D=>D>0);if(w!==y)x+=.25;else if(w&&y){const D=Math.max(...t.style.borderRadius),k=Math.max(...a.style.borderRadius),V=Math.abs(D-k)/Math.max(D,k,1);x+=V*.25}const S=t.style.strokes.length>0,C=a.style.strokes.length>0;S!==C&&(x+=.2);const j=Vg(t),A=Vg(a);if((j&&!A||!j&&A)&&(x+=.15),j&&A){const D=qw(j,A);x+=D*.05}const _=t.style.opacity??1,z=a.style.opacity??1,R=Math.abs(_-z);return x+=R*.05,Math.min(1,x)};function Vg(t){const a=t.style.fills;if(!a||a.length===0)return null;for(const l of a)if(l.type==="solid"&&l.opacity>0&&l.color)return l.color;return null}function qw(t,a){const l=Xg(t),o=Xg(a);if(!l||!o)return .5;const s=(l.r-o.r)/255,c=(l.g-o.g)/255,d=(l.b-o.b)/255,f=Math.sqrt(s*s+c*c+d*d)/1.732;return Math.min(1,f)}function Xg(t){const a=t.replace(/^#/,"");if(a.length===3){const l=parseInt(a[0]+a[0],16),o=parseInt(a[1]+a[1],16),s=parseInt(a[2]+a[2],16);return{r:l,g:o,b:s}}if(a.length===6){const l=parseInt(a.slice(0,2),16),o=parseInt(a.slice(2,4),16),s=parseInt(a.slice(4,6),16);return{r:l,g:o,b:s}}return null}const qg=()=>1;function Pw(t,a){if(t!==a)return qg;switch(t){case"text":return Yw;case"image":return Iw;case"container":return Gw;case"shape":return Xw;default:return qg}}const Qw=.35;function pv(t,a,l){const o=mo(t),s=mo(a);return Pw(o,s)(t,a,l)}function Zw(t,a,l){const o=mo(t);if(o==="text")return;const s=a.filter(d=>{if(d.id===t.id)return!1;const f=mo(d);return o!==f||Fw(t,d)?!1:pv(t,d,l)<Qw});if(s.length===0)return;const c=Ww(t,l);return{similarIds:s.map(d=>d.id),signature:c}}function Fw(t,a){const l=t.bbox.width||1,o=t.bbox.height||1,s=a.bbox.width||1,c=a.bbox.height||1,d=Math.min(l,s)/Math.max(l,s),f=Math.min(o,c)/Math.max(o,c);if(d<.25||f<.25)return!0;const p=l*o,g=s*c;return Math.min(p,g)/Math.max(p,g)<.33}function Ww(t,a){const l=mo(t),o=t.children.map(c=>a.nodes[c]).filter(c=>!!c);if(o.length===0)return l;const s=o.map(c=>{const d=mo(c),f=c.children.length>0?`(${c.children.length})`:"";return d+f});return`${l}[${s.join(",")}]`}class Kw{constructor(a){_i(this,"parent");_i(this,"rank");this.parent=new Map,this.rank=new Map;for(const l of a)this.parent.set(l,l),this.rank.set(l,0)}find(a){return this.parent.get(a)!==a&&this.parent.set(a,this.find(this.parent.get(a))),this.parent.get(a)}union(a,l){const o=this.find(a),s=this.find(l);if(o===s)return;const c=this.rank.get(o),d=this.rank.get(s);c<d?this.parent.set(o,s):c>d?this.parent.set(s,o):(this.parent.set(s,o),this.rank.set(o,c+1))}getGroups(){const a=new Map;for(const l of this.parent.keys()){const o=this.find(l);a.has(o)||a.set(o,[]),a.get(o).push(l)}return[...a.values()].filter(l=>l.length>=2)}}const Jw=.35;function eS(t){const a=Object.values(t.nodes).filter(d=>!(d.children.length===0||d.type==="group"||!d.style.visible));if(a.length<2)return[];const l=a.map(d=>d.id),o=new Kw(l);for(let d=0;d<a.length;d++)for(let f=d+1;f<a.length;f++){const p=a[d],g=a[f];if(Pg(p.id,g.id,t)||Pg(g.id,p.id,t))continue;pv(p,g,t)<Jw&&o.union(p.id,g.id)}const s=o.getGroups(),c=[];for(const d of s){const f=d.map(v=>t.nodes[v]).filter(v=>!!v);if(f.length<2)continue;const p=f[0],g=p.children.map(v=>t.nodes[v]).filter(v=>!!v).map(v=>v.type),x=tS(p,t);c.push({signature:x,instances:f.map(v=>({nodeId:v.id,name:v.name})),childTypes:g,childCount:p.children.length,avgSize:{width:Math.round(f.reduce((v,w)=>v+w.bbox.width,0)/f.length),height:Math.round(f.reduce((v,w)=>v+w.bbox.height,0)/f.length)}})}return c.sort((d,f)=>f.instances.length-d.instances.length)}function Pg(t,a,l){let o=l.nodes[a];for(;o&&o.parentId;){if(o.parentId===t)return!0;o=l.nodes[o.parentId]}return!1}function tS(t,a){const l=t.children.map(s=>a.nodes[s]).filter(s=>!!s);if(l.length===0)return t.type;const o=l.map(s=>s.text?"text":s.type==="image"?"image":s.children.length>0?`container(${s.children.length})`:"shape");return`${t.type}[${o.join(",")}]`}function nS(t,a){return a.filter(l=>l.instances.some(o=>o.nodeId===t))}function iS(t,a){const o={"background-layer":["Background layer","背景层"],"ghost-layer":["Decorative overlay","装饰浮层"],"mask-child":["Mask layer","蒙版层"],"ornamental-shape":["Decorative shape","装饰形状"],"separator-line":["Separator","分隔线"]}[t];return o?Y(a,o[0],o[1]):t}function gv(t,a){return t.text?!0:t.children.some(l=>{const o=a.nodes[l];return o?gv(o,a):!1})}function kd(t,a){return t.children.some(l=>{var s;const o=a.nodes[l];return o?((s=o.hints)==null?void 0:s.role)==="decorative"?!0:kd(o,a):!1})}function aS(t,a){const l=a.absoluteBbox.width*a.absoluteBbox.height;if(l<=0)return 0;const o=t.absoluteBbox.width*t.absoluteBbox.height;return Math.min(o/l,1)}function oS(t,a,l){return Y(l,`Layer ${t+1} of ${a}`,`第${t+1}层/共${a}层`)}function xv(t,a,l="en"){var z;const o=t.children.map(R=>a.nodes[R]).filter(R=>!!R&&R.style.visible);if(o.length<2||!o.some(R=>{var E;return((E=R.hints)==null?void 0:E.role)==="decorative"||kd(R,a)})&&o.length<3)return null;const c=[],d=[];let f=0,p=0,g=0;for(let R=0;R<o.length;R++){const E=o[R],T=aS(E,t),D=oS(R,o.length,l);if(E.meta.isMask)f++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"likely-decorative",reason:Y(l,"Mask clipping layer (its style has been inherited by the parent)","蒙版裁切层(样式已继承至父容器)"),confidence:"high",coverageRatio:T,zPosition:D});else if(E.text)g++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"keep-text",reason:Y(l,"Text node","文本节点"),confidence:"high",coverageRatio:T,zPosition:D});else if(gv(E,a)&&E.type!=="frame"&&E.type!=="group")g++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"keep-code",reason:Y(l,"Subtree contains text","子树含文本"),confidence:"high",coverageRatio:T,zPosition:D});else if(E.type==="frame"||E.type==="group")kd(E,a)?(p++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"needs-review",reason:Y(l,"Container has decorative descendants","容器含装饰后代"),confidence:"low",coverageRatio:T,zPosition:D})):(g++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"keep-code",reason:Y(l,"Container contains only content layers","容器仅含内容层"),confidence:"high",coverageRatio:T,zPosition:D}));else if(E.meta.exportReason==="overlay-covered")f++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"likely-decorative",reason:Y(l,"Background below an overlay (can be ignored)","浮层下背景层(可忽略)"),confidence:"high",coverageRatio:T,zPosition:D});else if(bs(E)&&E.type!=="vector"&&E.type!=="image")if(((z=E.hints)==null?void 0:z.role)==="decorative"){f++;const k=E.hints.decorativeReason||"decorative-layer";c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"likely-decorative",reason:k==="decorative-layer"?Y(l,"Decorative layer","装饰层"):iS(k,l),confidence:"high",coverageRatio:T,zPosition:D})}else{const k=E.style.fills.some(te=>te.type!=="solid"),V=E.style.blendMode!=="PASS_THROUGH"&&E.style.blendMode!=="NORMAL";if(k||V){f++;const te=[];k&&te.push(Y(l,"Complex fill","复杂填充")),V&&te.push(Y(l,"Blend mode","混合模式")),E.style.opacity<1&&te.push(Y(l,"Opacity variation","透明度变化")),c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"likely-decorative",reason:te.join(", "),confidence:"high",coverageRatio:T,zPosition:D})}else g++,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"keep-code",reason:Y(l,"Solid-color shape (implement with CSS)","纯色形状(CSS 可实现)"),confidence:"high",coverageRatio:T,zPosition:D})}else{p++;let k;E.type==="image"?k=Y(l,"Image node","图片类型"):E.type==="vector"?k=Y(l,"Vector graphic","矢量图形"):E.type==="group"?k=Y(l,"Group","分组"):k=E.type,c.push({nodeId:E.id,name:E.name,type:E.type,strategy:"needs-review",reason:k,confidence:"low",coverageRatio:T,zPosition:D})}}const x=f+p;if(x===0)return null;const v=c.filter(R=>R.strategy==="likely-decorative"||R.strategy==="needs-review").reduce((R,E)=>R+E.coverageRatio,0),w=o.length>0?g/o.length:0;w>.7&&v<.5&&d.push(Y(l,`${Math.round(w*100)}% of layers are kept by count, while composite layers cover only ${Math.round(v*100)}% of the area. Prefer reproducing this with CSS.`,`保留层占比 ${Math.round(w*100)}%(按数量),合成层面积覆盖仅 ${Math.round(v*100)}%,建议优先用 CSS 还原。`));const y=p>0,S=c.filter(R=>R.strategy==="needs-review").map(R=>R.name),C=y?Y(l,`Take a screenshot of ${t.id} to determine whether these nodes are decorative or content: ${S.join(", ")}`,`请截图 ${t.id} 确认以下节点是装饰层还是内容:${S.join("、")}`):"",j=c.filter(R=>R.strategy==="likely-decorative").map(R=>R.name),A=[...j,...S];let _;return f>0&&g>0?(_=Y(l,`${j.join(", ")} can be combined into a background image`,`${j.join("、")} 可合成为背景图`),p>0&&(_+=Y(l,`; verify ${S.join(", ")} with a screenshot`,`;${S.join("、")} 需截图确认`))):p>0&&g>0?_=Y(l,`Use a screenshot to verify whether ${S.join(", ")} can be composited`,`${S.join("、")} 需截图确认是否可合成`):x>0?_=Y(l,`${A.join(", ")} may be exported together as one image`,`${A.join("、")} 可能整体导出为图片`):_="",{hasComposite:!0,summary:_,children:c,warnings:d,requiresScreenshot:y,reviewInstruction:C}}function lS(t,a,l="en"){const o=t.hints;if(!o)return[];const s=[];return s.push(...rS(o,l)),t.children.length>0&&s.push(...sS(o,t,a,l)),o.constraint&&s.push(...dS(o.constraint,l)),s}function rS(t,a){const l=[];if(t.role==="decorative"){const o=t.decorativeReason?` (${t.decorativeReason})`:"";l.push(`${Y(a,"- Decorative layer","- 装饰层")}${o}`)}return t.isGhost&&l.push(Y(a,"- Ghost node (no visible style)","- 幽灵节点 (无可见样式)")),t.isBackground&&l.push(Y(a,"- Background layer","- 背景层")),t.isSeparator&&l.push(Y(a,`- Separator: ${t.isSeparator}`,`- 分隔线: ${t.isSeparator}`)),l}function sS(t,a,l,o){const s=[];if(t.childrenAxis){const{xNonOverlapping:c,yNonOverlapping:d}=t.childrenAxis;c&&d?s.push(Y(o,"- Children have no significant overlap","- 子元素无明显重叠")):c?s.push(Y(o,"- Children are distributed along the X axis","- 子元素沿 X 轴分布")):d&&s.push(Y(o,"- Children are distributed along the Y axis","- 子元素沿 Y 轴分布"))}if(t.childrenSpacing){for(const c of t.childrenSpacing)if(c.uniform&&c.avgGap>0){const d=Y(o,c.axis==="x"?"Horizontal":"Vertical",c.axis==="x"?"横向":"纵向");s.push(Y(o,`- ${d} child spacing is approximately uniform: ${c.avgGap}px`,`- ${d}子元素间距近似统一: ${c.avgGap}px`))}}if(t.childrenAlignment){const c=t.childrenAlignment,d=[];c.topAligned&&d.push(Y(o,"top-aligned","顶部对齐")),c.bottomAligned&&d.push(Y(o,"bottom-aligned","底部对齐")),c.centerYAligned&&d.push(Y(o,"vertically centered","垂直居中对齐")),c.leftAligned&&d.push(Y(o,"left-aligned","左对齐")),c.rightAligned&&d.push(Y(o,"right-aligned","右对齐")),c.centerXAligned&&d.push(Y(o,"horizontally centered","水平居中对齐")),d.length>0&&s.push(Y(o,`- Child alignment: ${d.join(", ")}`,`- 子元素对齐: ${d.join(", ")}`))}if(t.childrenSizeUniformity){const{widthUniform:c,heightUniform:d,sizeRatio:f}=t.childrenSizeUniformity;f>=.8&&(c&&d?s.push(Y(o,"- Children have similar dimensions","- 子元素尺寸接近")):c?s.push(Y(o,"- Children have similar widths","- 子元素宽度接近")):d&&s.push(Y(o,"- Children have similar heights","- 子元素高度接近")))}return t.overflow&&s.push(Y(o,"- Children have visible overflow","- 子节点存在可见溢出")),t.scrollCandidate&&s.push(Y(o,"- Possible horizontal scroll/carousel region","- 疑似横向滚动/轮播区域")),s.push(...cS(t,a,l,o)),s}function cS(t,a,l,o){var g,x;const s=[],c=uS(a,l),d=new Set(c.flatMap(v=>v.nodeIds)),f=((g=t.stackingDetail)==null?void 0:g.groups.flatMap(v=>v.nodeIds))??[],p=((x=t.stackingDetail)==null?void 0:x.type)==="overlapping-similar"&&f.every(v=>d.has(v));if(t.stackingDetail&&!p)switch(t.stackingDetail.type){case"overlapping-similar":s.push(Y(o,"- Similar children overlap completely, possibly representing multiple states (such as selected/unselected) or a special layering effect","- 存在完全重叠的相似子元素,可能为多状态切换(如选中/未选中)或特殊叠加效果"));break;case"floating":case"contained-overlay":s.push(Y(o,"- Children overlap significantly; request overlap context when needed","- 子元素存在明显重叠,可按需调用 overlap-context"));break}for(const v of c)p&&v.nodeIds.every(y=>f.includes(y))?s.push(Y(o,`- Repeated structure: [${v.nodeIds.join(", ")}], ${v.count} instances that completely overlap and have similar structure; they may represent multiple states`,`- 重复结构: [${v.nodeIds.join(", ")}] 共 ${v.count} 个,完全重叠且结构相似,可能为多状态切换`)):s.push(Y(o,`- Repeated structure: [${v.nodeIds.join(", ")}], ${v.count} structurally similar instances (render as a loop or multiple states)`,`- 重复结构: [${v.nodeIds.join(", ")}] 共 ${v.count} 个,结构相似(可循环渲染或多状态)`));return s}function uS(t,a){var c;const l=t.children.map(d=>a.nodes[d]).filter(d=>!!d&&d.style.visible),o=new Map,s=[];for(const d of l){if(!((c=d.hints)!=null&&c.similarity))continue;const f=[d.id,...d.hints.similarity.similarIds].filter(g=>l.some(x=>x.id===g));if(f.length<2)continue;let p=-1;for(const g of f){const x=o.get(g);if(x!==void 0){p=x;break}}if(p>=0){const g=s[p];for(const x of f)g.add(x),o.set(x,p)}else{const g=new Set(f),x=s.length;s.push(g);for(const v of f)o.set(v,x)}}return s.filter(d=>d.size>=2).map(d=>({nodeIds:[...d],count:d.size}))}function dS(t,a){const l=[],o=[];return t.fillsParentWidth&&o.push(Y(a,"fills parent width","撑满父容器宽度")),t.fillsParentHeight&&o.push(Y(a,"fills parent height","撑满父容器高度")),t.centeredX&&o.push(Y(a,"horizontally centered","水平居中")),t.centeredY&&o.push(Y(a,"vertically centered","垂直居中")),t.symmetricPaddingX&&o.push(Y(a,"symmetric horizontal margins","左右对称边距")),t.symmetricPaddingY&&o.push(Y(a,"symmetric vertical margins","上下对称边距")),t.intrinsicSize&&o.push(Y(a,"intrinsic content size (smaller than parent)","内容尺寸(较小于父容器)")),o.length>0&&l.push(Y(a,`- Constraints: ${o.join(", ")}`,`- 约束: ${o.join(", ")}`)),l}function fS(t,a,l="en"){var c;const o=t.hints;if(!o)return"";const s=[];if(o.role==="decorative"&&s.push(Y(l,"[decorative]","[装饰]")),o.similarity&&s.push(Y(l,"[repeated]","[重复]")),o.containedBy){const d=(c=a.nodes[o.containedBy])==null?void 0:c.name,f=d?`${o.containedBy} (${d})`:o.containedBy;s.push(Y(l,`[contained-by ${f}]`,`[被 ${f} 包含]`))}if(o.constraint){const d=[];o.constraint.fillsParentWidth&&d.push(Y(l,"fills-width","撑满宽")),o.constraint.centeredX&&d.push(Y(l,"centered-x","水平居中")),o.constraint.intrinsicSize&&d.push(Y(l,"intrinsic-size","固有尺寸")),d.length>0&&s.push(`[${d.join(",")}]`)}return s.join(" ")}function Ve(t){return Number.isInteger(t)?t:Math.round(t*10)/10}function Qg(t){return Number.isInteger(t)?t:Math.round(t*100)/100}const hS=["button","btn","close","link","tab","switch","toggle","input","checkbox","radio","select"];function Zg(t,a,l){var s,c;const o=(c=(s=t.computed)==null?void 0:s.maskInfo)==null?void 0:c.childId;if(!(!o||!a(o)))return Y(l,"{MASK_ASSET_URL}","{蒙版资源URL}")}function vv(t,a){return t.text?!0:t.children.some(l=>{const o=a.nodes[l];return o?vv(o,a):!1})}function Fg(t,a){if(t.meta.isMask)return"decorative";const l=t.name.toLowerCase();return hS.some(o=>l.includes(o))?"interactive":t.text?"text":t.type==="image"?"decorative":t.children.length>0&&vv(t,a)?"container":"decorative"}function Cl(t,a){if(t.fontUrl)return t;const l=a(t.fontFamily,t.fontWeight);return l?{...t,fontUrl:l}:t}function fa(t){return!t||!t.includes(" ")?t:t.replace(/ /g,"&nbsp;")}function co(t,a="en"){var c;const l=[`${t.fontSize}px${t.lineHeight>0?` / ${t.lineHeight}px`:""}`,t.fontFamily,`w${t.fontWeight}`];t.fillType&&t.fillType!=="solid"?l.push(Y(a,`background-clip with [${t.gradient??t.fillType}]`,`使用 background-clip [${t.gradient??t.fillType}]`)):l.push(t.color),t.letterSpacing&&l.push(`letter-spacing: ${t.letterSpacing}px`);const o=t.textAlign==="justified"?"justify":t.textAlign;if(o&&o!=="left"){const d={justify:"两端",center:"居中",right:"右侧"}[o]??o;l.push(Y(a,`${o} x-align`,`水平对齐: ${d}`))}const s=t.textAlignVertical==="center"?"middle":t.textAlignVertical;if(s&&s!=="top"){const d={middle:"居中",bottom:"底部"}[s]??s;l.push(Y(a,`${s} y-align`,`垂直对齐: ${d}`))}if(t.textDecoration){const d={underline:"下划线","line-through":"删除线"}[t.textDecoration]??t.textDecoration;l.push(Y(a,t.textDecoration,d))}if(t.textAutoResize==="truncate"){const d=(c=t.textLayout)==null?void 0:c.lineClamp;d&&d>1?l.push(Y(a,`ellipsis (${d} lines clamp)`,`省略号(最多 ${d} 行)`)):l.push(Y(a,"ellipsis","省略号"))}return l.join(" ")}function fs(t,a="en"){return t.fontUrl?Y(a,`[define @font-face: '${t.fontFamily}' w${t.fontWeight} src(${t.fontUrl})]`,`[需定义 @font-face: '${t.fontFamily}' w${t.fontWeight} src(${t.fontUrl})]`):""}function An(t,a,l){l.length!==0&&(t.push(""),t.push(`${a}`),t.push(...l))}function mS(t,a,l,o){const s=a.text;if(!s)return;const c=s.segments&&s.segments.length>1,d=s.fillType&&s.fillType!=="solid";if(!(!c&&!d))if(c){const f=Cl(s,l),p=`${f.fontFamily}::${f.fontWeight}`;for(const g of s.segments){const x=Cl(g,l),v=`${x.fontFamily}::${x.fontWeight}`,w=v&&v!==p?` ${fs(x,o)}`:"";t.push(Y(o,` - Segment: "${fa(x.content)}" — ${co(x,o)}${w}`,` - 段: "${fa(x.content)}" — ${co(x,o)}${w}`))}}else d&&t.push(` - fill: ${s.fillType}${s.gradient?` (${s.gradient})`:""}`)}function Wg(t,a){return t==="horizontal"?a==="before"?"←":"→":a==="before"?"↑":"↓"}function bv(t,a,l){const o={...l,depth:l.depth??1,locale:l.locale??"en"};return yv(t,a,o,0)}function yv(t,a,l,o){var Z,ie,re,fe,pe,je,et,ye,$t,kt,Lt,on,ft;const{findAsset:s,designId:c,fontUrlResolver:d,depth:f,locale:p}=l,g=Math.min(o+2,6),x="#".repeat(g),v="#".repeat(Math.min(g+1,6)),w=s(t.id),y=Zg(t,s,p),S=vs(t,w,p,y),C=t.layout??null,j=Zd(t,a),A=(Z=a.nodes[a.rootNodeId])==null?void 0:Z.absoluteBbox,_=A?Ve(A.width):0,z=Fg(t,a),R=t.name.length>20?t.name.slice(0,20)+"…":t.name,E=[];E.push(`${x} ${t.id} (${R}) - ${t.type} [role:${z}]`);const T=[],D=[],k=[],V=[],te=w&&!w.renderPadding&&(Math.abs(w.width-t.absoluteBbox.width)>2||Math.abs(w.height-t.absoluteBbox.height)>2),J=te?w.width:Ve(t.absoluteBbox.width),q=te?w.height:Ve(t.absoluteBbox.height),ne=[],ae=t.parentId;if(ae){const ve=(()=>{const Se=a.nodes[ae];if(Se){const Ae=Se.style.strokes;if(Ae&&Ae.length>0)return Ae[0].position!=="outside"?Ae[0].width:0}return 0})(),De=Ve(t.bbox.x-ve),we=Ve(t.bbox.y-ve);ne.push(Y(p,`Position: (${De}, ${we})`,`位置: (${De}, ${we})`))}ne.push(Y(p,`Size: ${J}x${q}`,`尺寸: ${J}x${q}`)),o===0&&!t.parentId&&_>0&&ne.push(Y(p,`Design width: ${_}`,`设计稿宽: ${_}`)),t.parentId&&a.nodes[t.parentId]&&ne.push(Y(p,`Parent: ${t.parentId}`,`父: ${t.parentId}`)),ne.push(`zIndex: ${t.zIndex}`),T.push(`- ${ne.join(" | ")}`);const oe=Ig(t,a);if(oe.length>0){const ve=oe.map(De=>`${Wg(De.axis,De.direction)}${De.siblingId} ${De.distance}px`);T.push(Y(p,`- Nearest siblings: ${ve.join(" | ")}`,`- 近邻: ${ve.join(" | ")}`))}if(t.meta.componentName&&(T.push(Y(p,`- Design-system component: ${t.meta.componentName}`,`- 设计系统组件: ${t.meta.componentName}`)),k.push(Y(p,"- This node comes from a design-system component; prefer the corresponding frontend component-library component over a native implementation","- 此节点来自设计系统组件,应优先考虑使用对应的前端组件库组件而非原生实现"))),(ie=t.computed)!=null&&ie.transform?T.push(Y(p,`- Transform: ${t.computed.transform.value} (CSS transform) | bbox is the pre-transform value: (${Ve(t.bbox.x)}, ${Ve(t.bbox.y)}) ${Ve(t.bbox.width)}x${Ve(t.bbox.height)}`,`- 变换: ${t.computed.transform.value} (CSS transform) | bbox已为变换前值: (${Ve(t.bbox.x)}, ${Ve(t.bbox.y)}) ${Ve(t.bbox.width)}x${Ve(t.bbox.height)}`)):t.meta.rotation&&Ve(t.meta.rotation)!==0&&T.push(Y(p,`- Rotation: ${Ve(t.meta.rotation)}°`,`- 旋转: ${Ve(t.meta.rotation)}°`)),t.text){t.text.listMarker&&T.push(Y(p,`- List item (marker: ${t.text.listMarker})`,`- 列表项 (marker: ${t.text.listMarker})`)),T.push(Y(p,`- Text: "${fa(t.text.content)}"`,`- 文本: "${fa(t.text.content)}"`));const ve=Cl(t.text,d),De=fs(ve,p),we=t.style.opacity!==1?` opacity: ${Qg(t.style.opacity)}`:"";if(T.push(` ${co(ve,p)}${we}${De?` ${De}`:""}`),t.text.segments&&t.text.segments.length>1){const Se=`${ve.fontFamily}::${ve.fontWeight}`;for(const Ae of t.text.segments){const me=Cl(Ae,d),Re=`${me.fontFamily}::${me.fontWeight}`,le=Re&&Re!==Se?` ${fs(me,p)}`:"";T.push(Y(p,` - Segment: "${fa(me.content)}" — ${co(me,p)}${le}`,` - 段: "${fa(me.content)}" — ${co(me,p)}${le}`))}}(re=t.text.textLayout)!=null&&re.hasWrapper&&t.text.textAlignVertical&&T.push(Y(p,`- Vertical alignment: ${t.text.textAlignVertical} (requires an outer flex-column wrapper with justify-content: ${(fe=t.text.textLayout.wrapperStyle)==null?void 0:fe.justifyContent})`,`- 垂直对齐: ${t.text.textAlignVertical} (需要外层 flex column wrapper, justify-content: ${(pe=t.text.textLayout.wrapperStyle)==null?void 0:pe.justifyContent})`))}t.style.overflow==="visible"&&((et=(je=t.hints)==null?void 0:je.overflow)!=null&&et.hasOverflow)&&k.push(Y(p,"- This node has visible overflow; use overflow: hidden with care","- 当前节点存在可见溢出,谨慎设置 overflow: hidden")),t.meta.exportReason==="dashed-line"&&k.push(Y(p,"- Dashed decorative line; usually merge it with the parent into one background image instead of rendering it separately","- 虚线装饰线条,通常可与父元素合并导出为整体背景图,无需单独渲染"));const U=t.children.map(ve=>a.nodes[ve]).find(ve=>ve==null?void 0:ve.meta.isMask);if(U){const ve=U.style.fills,De=s(U.id),we=U.style.borderRadius,Se=we.some(me=>me>0),Ae=Math.abs(U.bbox.width-t.bbox.width)<2&&Math.abs(U.bbox.height-t.bbox.height)<2&&Math.abs(U.bbox.x)<2&&Math.abs(U.bbox.y)<2;D.push(Y(p,`- Detected mask child: ${U.id} (${U.name})`,`- 检测到蒙版子节点: ${U.id} (${U.name})`)),Ae&&Se?(V.push(Y(p,`- Inherit the mask on the parent: overflow: hidden + border-radius: ${we.map(me=>me+"px").join(" ")}`,`- 蒙版可继承到父容器: overflow: hidden + border-radius: ${we.map(me=>me+"px").join(" ")}`)),ve.length>0&&V.push(Y(p,`- Inherit the background on the parent: ${ve.map(me=>Ui(me,p)).join(", ")}`,`- 父容器背景可继承: ${ve.map(me=>Ui(me,p)).join(", ")}`))):Ae&&!De?(V.push(Y(p,"- Inherit the mask on the parent: overflow: hidden","- 蒙版可继承到父容器: overflow: hidden")),ve.length>0&&V.push(Y(p,`- Inherit the background on the parent: ${ve.map(me=>Ui(me,p)).join(", ")}`,`- 父容器背景可继承: ${ve.map(me=>Ui(me,p)).join(", ")}`))):Ae&&De?(V.push(Y(p,"- Inherit the mask on the parent: overflow: hidden + mask-image","- 蒙版可继承到父容器: overflow: hidden + mask-image")),V.push(Y(p,"- mask-image: url('{MASK_ASSET_URL}'); mask-size: 100% 100%; /* Obtain the URL through the tool; do not use a preview link directly. */","- mask-image: url('{蒙版资源URL}'); mask-size: 100% 100%; /* URL 需通过接口获取,勿直接使用预览链接 */")),ve.length>0&&V.push(Y(p,`- Inherit the background on the parent: ${ve.map(me=>Ui(me,p)).join(", ")}`,`- 父容器背景可继承: ${ve.map(me=>Ui(me,p)).join(", ")}`))):k.push(Y(p,"- The mask does not fully cover the parent","- 蒙版未完全覆盖父容器"))}const Q=((ye=t.hints)==null?void 0:ye.overlaps)??[],K=Q.length>0,de=[];if(C&&C.layoutSource==="design-tool"&&(de.push(`display: ${C.display};`),C.display==="flex"&&(C.flexDirection&&C.flexDirection!=="row"&&de.push(`flex-direction: ${C.flexDirection};`),C.flexWrap==="wrap"&&de.push("flex-wrap: wrap;"),C.gap&&C.gap>0&&de.push(`gap: ${C.gap}px;`),C.justifyContent&&C.justifyContent!=="flex-start"&&de.push(`justify-content: ${C.justifyContent};`),C.alignItems&&C.alignItems!=="stretch"&&de.push(`align-items: ${C.alignItems};`)),C.position==="relative"&&de.push("position: relative;")),(S||K||de.length>0)&&(T.push("CSS:"),T.push("```css"),S&&T.push(S),K&&T.push(`z-index: ${t.zIndex};`),de.length>0&&T.push(de.join(`
52
+ `)),T.push("```")),K){const ve=Q.filter(we=>{const Se=a.nodes[we.targetId];return Se&&t.zIndex>Se.zIndex}),De=Q.filter(we=>{const Se=a.nodes[we.targetId];return Se&&t.zIndex<=Se.zIndex});if(ve.length>0){const we=ve.map(Se=>`${Se.targetId}`).join("、");D.push(Y(p,`- Partially overlaps ${we}; the current node is above`,`- 与 ${we} 部分重叠,当前节点在上方`))}if(De.length>0){const we=De.map(Se=>`${Se.targetId}`).join("、");D.push(Y(p,`- Partially overlaps ${we}; the current node is below`,`- 与 ${we} 部分重叠,当前节点在下方`))}}if(w){const ve=(($t=t.image)==null?void 0:$t.hasImageFill)===!0,De=t.meta.exportReason,we=t.type==="text"&&De==="text-rasterized";if(we)T.push(Y(p,`- Text visual asset: ${J}x${q} ${w.format} — only restores a non-portable font; the node type and product semantics remain text`,`- 文字视觉资产: ${J}x${q} ${w.format} — 仅用于还原不可移植字体,节点类型与业务语义仍为 text`)),k.push(Y(p,"- Preserve the text-node semantics; this resource is only a visual text layer, not a business image or decorative image","- 保持文字节点语义;该资源只是文字视觉层,不要归类为业务图片或装饰图片"));else if(ve)T.push(Y(p,`- Image asset: ${J}x${q} ${w.format} — designer-uploaded (decide: load dynamic data through the application API | export static decoration as a composite)`,`- 图片资源: ${J}x${q} ${w.format} — 设计师上传(需判断: 动态数据走接口 | 静态装饰需合图导出)`));else{const Se=De?` (${De})`:"";T.push(Y(p,`- Image asset: ${J}x${q} ${w.format} — statically composited export${Se}`,`- 图片资源: ${J}x${q} ${w.format} — 静态合成导出${Se}`))}if(we){const Se=w.renderPadding,me=Se&&(Se.top>=1||Se.left>=1)?` style={{position:'absolute',left:${-Se.left},top:${-Se.top}}}`:"";T.push(Y(p,` Text visual layer: <img src="{URL}" width={${w.width}} height={${w.height}}${me} alt="" aria-hidden="true" />`,` 文字视觉层: <img src="{URL}" width={${w.width}} height={${w.height}}${me} alt="" aria-hidden="true" />`))}else if(te)T.push(` <img src="{URL}" width={${J}} height={${q}} />`);else if(De){const Se=w.renderPadding;Se&&(Se.top>=1||Se.left>=1)?T.push(` <img src="{URL}" width={${w.width}} height={${w.height}} style={{position:'absolute',left:${-Se.left},top:${-Se.top}}} />`):T.push(` <img src="{URL}" width={${J}} height={${q}} />`)}else T.push(` <img src="{URL}" width={${J}} height={${q}} />`)}const ee=lS(t,a,p);if(D.push(...ee),j){const{top:ve,right:De,bottom:we,left:Se}=j;if(ve>0&&De>0&&we>0&&Se>0&&(j.uniform?T.push(`- padding: ${ve}px`):T.push(`- padding: ${ve}px ${De}px ${we}px ${Se}px`)),j.overflows.length>0&&t.style.overflow!=="hidden"){const me=new Map;for(const Re of j.overflows){if(!t.children.includes(Re.childId))continue;const le=me.get(Re.childId);le?le.sides.push(`${Re.side} ${Re.amount}px`):me.set(Re.childId,{name:Re.childName,sides:[`${Re.side} ${Re.amount}px`]})}if(me.size>0){D.push(Y(p,"- Direct children have overflow:","- 直接子节点存在溢出:"));for(const[Re,le]of me){const xt=le.sides.join(", ");D.push(` - ${Re} (${le.name}): ${xt}`)}}}}const $=xv(t,a,p);if($){k.push(Y(p,"- Composite-layer analysis:","- 复合图层分析:"));for(const we of $.children){let Se=`- [${we.strategy}] ${we.nodeId} (${we.name}) [${we.type}] — ${we.reason}`;if(we.strategy==="needs-review"){const Ae=a.nodes[we.nodeId];if(Ae){const me=[];Ae.style.fills.length>0&&me.push(Y(p,"has fills","有填充色")),Ae.children.length>0&&me.push(Y(p,`has ${Ae.children.length} children`,`含 ${Ae.children.length} 个子节点`)),me.length>0&&(Se+=` | ${me.join("; ")}`)}}k.push(` ${Se}`)}const ve=$.children.filter(we=>we.strategy==="likely-decorative").map(we=>we.nodeId),De=$.children.filter(we=>we.strategy==="needs-review");if(ve.length>0&&(V.push(Y(p,`Composite export: call the MCP tool design_get_composite with ${JSON.stringify({designId:c,nodeId:t.id,include:ve})}`,`合并切图: 调用 MCP 工具 design_get_composite,参数 ${JSON.stringify({designId:c,nodeId:t.id,include:ve})}`)),V.push(Y(p,"- You can also exclude dynamic content with the exclude parameter","- 也可通过 exclude 参数排除动态内容"))),De.length>0){V.push(Y(p,"- Nodes requiring review (decide whether to add them to include after verification):","- 待判断节点(确认后再决定是否加入 include):"));const we=t.bbox.width,Se=t.bbox.height;for(const Ae of De){const me=a.nodes[Ae.nodeId],Re=Ae.name.length>20?Ae.name.slice(0,20)+"…":Ae.name;let le=` - ${Ae.nodeId} (${Re})`;const xt=me==null?void 0:me.meta.exportReason;if(xt==="dashed-line"?le+=Y(p," — dashed decoration, usually safe to composite"," — 虚线装饰,通常可合并导出"):xt==="vector"?le+=Y(p," — vector graphic"," — 矢量图形"):xt==="complex-fills"?le+=Y(p," — shape with complex fills"," — 复杂填充图形"):xt==="complex-mask"?le+=Y(p," — complex mask"," — 复杂蒙版"):(kt=me==null?void 0:me.image)!=null&&kt.hasImageFill?le+=Y(p," — has an image fill (determine whether it represents dynamic data)"," — 含图片填充(需判断是否动态数据)"):s(Ae.nodeId)&&(le+=Y(p," — has a pre-exported asset"," — 有预导出资源")),me&&t.style.overflow!=="hidden"){const Fe=me.bbox;(Fe.x<-1||Fe.y<-1||Fe.x+Fe.width>we+1||Fe.y+Fe.height>Se+1)&&(le+=Y(p," [overflow]"," [溢出]"))}V.push(le)}}}if(t.children.length>0){const ve=t.children.map(Re=>a.nodes[Re]).filter(Re=>!!Re),De=ve.some(Re=>{var le;return((le=Re.hints)==null?void 0:le.role)==="decorative"}),we=ve.some(Re=>{var le;return((le=Re.hints)==null?void 0:le.role)!=="decorative"});De&&we&&k.push(Y(p,"- mixed-container: contains both decorative and content layers","- mixed-container:同时包含装饰层和内容层"));const Se=(C==null?void 0:C.display)==="flex",Ae=[];for(const Re of t.children){const le=a.nodes[Re];if(!le)continue;const xt=s(Re),Fe=((Lt=le.hints)==null?void 0:Lt.role)??Fg(le,a),Sn=((on=le.layout)==null?void 0:on.position)==="absolute",_l=le.name.length>20?le.name.slice(0,20)+"…":le.name;let _t=`- ${le.id} (${_l}) ${le.type} [role:${Fe}]`;if(_t+=` ${Ve(le.bbox.width)}x${Ve(le.bbox.height)}`,_t+=` @(${Ve(le.bbox.x)},${Ve(le.bbox.y)})`,_t+=` zIndex=${le.zIndex}`,(ft=le.computed)!=null&&ft.transform?_t+=` ${le.computed.transform.value}${Y(p,"(has-css-transform)","(有 CSS 变换)")}`:le.meta.rotation&&Ve(le.meta.rotation)!==0&&(_t+=xt?` rot=${Ve(le.meta.rotation)}°${Y(p,"(asset-pre-rotated)","(资源已预旋转)")}`:` rot=${Ve(le.meta.rotation)}°${Y(p,"(needs-css-transform)","(需要 CSS 变换)")}`),le.text){const Nn=Cl(le.text,d),si=fs(Nn,p),Xi=le.style.opacity!==1?` opacity: ${Qg(le.style.opacity)}`:"";_t+=` "${fa(Nn.content)}" ${co(Nn,p)}${Xi}${si?` ${si}`:""}`}if(xt){const Nn=le.meta.exportReason==="text-rasterized"?Y(p,"has rasterized text visual asset","有文字栅格视觉资源"):Y(p,"has exported asset","有导出资源");_t+=` [${Nn} ${Ve(xt.width)}x${Ve(xt.height)} ${xt.format}]`}Sn?_t+=" [absolute]":Se&&(_t+=" [flex-item]"),le.meta.exportReason==="overlay-covered"&&(_t+=Y(p," [background below an overlay/dialog (content under the scrim is composited into one image); usually safe to ignore]"," [浮层/弹窗下方背景层(蒙层遮挡下的内容已合成为单图),通常可忽略]"));const Vi=fS(le,a,p);if(Vi&&(_t+=` ${Vi}`),Ae.push(_t),mS(Ae,le,d,p),Sn&&Ae.push(` position: absolute; left: ${Ve(le.bbox.x)}px; top: ${Ve(le.bbox.y)}px; width: ${Ve(le.bbox.width)}px; height: ${Ve(le.bbox.height)}px;`),Fe==="decorative"&&!xt&&!le.text){const Nn=vs(le,void 0,p,Zg(le,s,p));if(Nn){const si=Nn.split(`
53
+ `).filter(Xi=>!Xi.startsWith("width:")&&!Xi.startsWith("height:")&&Xi.trim());si.length>0&&Ae.push(` css: ${si.join(" ")}`)}}}const me=[];for(const Re of t.children){const le=a.nodes[Re];if(!le)continue;const xt=Ig(le,a);if(xt.length===0)continue;const Fe=xt.map(Sn=>`${Wg(Sn.axis,Sn.direction)}${Sn.siblingId} ${Sn.distance}px`);me.push(`- ${Re}: ${Fe.join(" | ")}`)}if(An(E,Y(p,`${v} Facts`,`${v} 基本信息`),T),An(E,Y(p,`${v} Analysis`,`${v} 分析推断`),D),An(E,Y(p,`${v} Implementation hints`,`${v} 实现线索`),k),An(E,Y(p,`${v} Recommended actions`,`${v} 操作建议`),V),An(E,Y(p,`${v} Children (${t.children.length})`,`${v} 子节点 (${t.children.length})`),Ae),An(E,Y(p,`${v} Child spacing`,`${v} 子节点间距`),me),o<f-1){const Re=t.children.map(le=>a.nodes[le]).filter(le=>!!le&&!le.text&&le.children.length>0);if(Re.length>0){E.push("");for(const le of Re)E.push(yv(le,a,l,o+1)),E.push("")}}}else An(E,Y(p,`${v} Facts`,`${v} 基本信息`),T),An(E,Y(p,`${v} Analysis`,`${v} 分析推断`),D),An(E,Y(p,`${v} Implementation hints`,`${v} 实现线索`),k),An(E,Y(p,`${v} Recommended actions`,`${v} 操作建议`),V);return E.join(`
54
+ `)}function pS(t){if(t.length<2)return[];const a=pt(),l=[];if(xa(t,a.snapTol)){const o=[...t].sort((f,p)=>f.bbox.x-p.bbox.x),s=[];for(let f=1;f<o.length;f++)s.push(Math.round(o[f].bbox.x-(o[f-1].bbox.x+o[f-1].bbox.width)));const c=s.length>0?Math.round(s.reduce((f,p)=>f+p,0)/s.length):0,d=s.length>0&&s.every(f=>Math.abs(f-s[0])<=1);l.push({axis:"x",gaps:s,uniform:d,avgGap:c})}if(zl(t,a.snapTol)){const o=[...t].sort((f,p)=>f.bbox.y-p.bbox.y),s=[];for(let f=1;f<o.length;f++)s.push(Math.round(o[f].bbox.y-(o[f-1].bbox.y+o[f-1].bbox.height)));const c=s.length>0?Math.round(s.reduce((f,p)=>f+p,0)/s.length):0,d=s.length>0&&s.every(f=>Math.abs(f-s[0])<=1);l.push({axis:"y",gaps:s,uniform:d,avgGap:c})}return l}function gS(t){if(t.length<2)return;const a=pt().alignTol,l=t.map(g=>g.bbox.y),o=t.map(g=>g.bbox.y+g.bbox.height),s=t.map(g=>g.bbox.y+g.bbox.height/2),c=t.map(g=>g.bbox.x),d=t.map(g=>g.bbox.x+g.bbox.width),f=t.map(g=>g.bbox.x+g.bbox.width/2),p=g=>Math.max(...g)-Math.min(...g);return{topAligned:p(l)<=a,bottomAligned:p(o)<=a,centerYAligned:p(s)<=a,leftAligned:p(c)<=a,rightAligned:p(d)<=a,centerXAligned:p(f)<=a}}function xS(t){if(t.length<2)return;const a=pt(),l=t.map(y=>y.bbox.width),o=t.map(y=>y.bbox.height),s=Math.max(...l),c=Math.min(...l),d=Math.max(...o),f=Math.min(...o),p=s>0&&c/s>=a.sizeUniformTol,g=d>0&&f/d>=a.sizeUniformTol,x=t.map(y=>s>0?y.bbox.width/s:1),v=t.map(y=>d>0?y.bbox.height/d:1),w=(x.reduce((y,S)=>y+S,0)+v.reduce((y,S)=>y+S,0))/(x.length+v.length);return{widthUniform:p,heightUniform:g,sizeRatio:Math.round(w*100)/100}}function Kg(t,a){const l=[];for(let o=1;o<t.length;o++)a==="x"?l.push(Math.round(t[o].bbox.x-(t[o-1].bbox.x+t[o-1].bbox.width))):l.push(Math.round(t[o].bbox.y-(t[o-1].bbox.y+t[o-1].bbox.height)));return l}function vS(t,a,l="en"){if(t.length<2)return;const o=pt(),s=ma(t.map(Rs),o.snapTol),c=ma(t.map(Fd),o.snapTol),d=[],f=new Set;if(s.length>=2&&s.length<t.length){const y=Rd(t,s,cv,o.snapTol);for(const S of y)if(!(S.length<2)&&xa(S,o.snapTol)){const C=[...S].sort((z,R)=>z.bbox.x-R.bbox.x),j=Kg(C,"x"),A=j.length>0&&j.every(z=>Math.abs(z-j[0])<=2),_=j.length>0?Math.round(j.reduce((z,R)=>z+R,0)/j.length):0;d.push({nodeIds:C.map(z=>z.id),axis:"horizontal",spacing:A?_:void 0,confidence:A?.9:.7,reason:A?Y(l,`${C.length} elements arranged horizontally with equal ${_}px spacing`,`${C.length} 个元素横向等距排列 (${_}px)`):Y(l,`${C.length} elements arranged horizontally`,`${C.length} 个元素横向排列`)});for(const z of C)f.add(z.id)}}if(c.length>=2&&c.length<t.length){const y=Rd(t,c,kw,o.snapTol);for(const S of y)if(!(S.length<2||S.every(j=>f.has(j.id)))&&zl(S,o.snapTol)){const j=[...S].sort((R,E)=>R.bbox.y-E.bbox.y),A=Kg(j,"y"),_=A.length>0&&A.every(R=>Math.abs(R-A[0])<=2),z=A.length>0?Math.round(A.reduce((R,E)=>R+E,0)/A.length):0;d.push({nodeIds:j.map(R=>R.id),axis:"vertical",spacing:_?z:void 0,confidence:_?.9:.7,reason:_?Y(l,`${j.length} elements arranged vertically with equal ${z}px spacing`,`${j.length} 个元素纵向等距排列 (${z}px)`):Y(l,`${j.length} elements arranged vertically`,`${j.length} 个元素纵向排列`)});for(const R of j)f.add(R.id)}}const p=t.filter(y=>!f.has(y.id));if(p.length>=2){const y=uv(p,(S,C)=>{const j=Je(S),A=Je(C),_=oi(j,A),z=Math.min(ot(j),ot(A));return z>0&&_/z>=o.stackingOverlap});for(const S of y)if(!(S.length<2)){d.push({nodeIds:S.map(C=>C.id),axis:"stack",confidence:.8,reason:Y(l,`${S.length} overlapping stacked elements`,`${S.length} 个元素重叠堆叠`)});for(const C of S)f.add(C.id)}}if(d.length===1&&d[0].nodeIds.length===t.length||d.length===0)return;const g=t.filter(y=>!f.has(y.id)).map(y=>y.id);let x,v,w;if(d.length>=2){const y=d.map(R=>{const E=R.nodeIds.map(T=>a.nodes[T]).filter(T=>!!T);return _w(E)}),S=y.every((R,E)=>y.every((T,D)=>E===D||R.y+R.h<=T.y+o.snapTol||T.y+T.h<=R.y+o.snapTol)),C=y.every((R,E)=>y.every((T,D)=>E===D||R.x+R.w<=T.x+o.snapTol||T.x+T.w<=R.x+o.snapTol));if(S){x="vertical";const R=[...y].sort((T,D)=>T.y-D.y),E=[];for(let T=1;T<R.length;T++)E.push(Math.round(R[T].y-(R[T-1].y+R[T-1].h)));E.length>0&&(v=Math.round(E.reduce((T,D)=>T+D,0)/E.length))}else if(C){x="horizontal";const R=[...y].sort((T,D)=>T.x-D.x),E=[];for(let T=1;T<R.length;T++)E.push(Math.round(R[T].x-(R[T-1].x+R[T-1].w)));E.length>0&&(v=Math.round(E.reduce((T,D)=>T+D,0)/E.length))}const j=y.map(R=>R.x),A=y.map(R=>R.x+R.w),_=y.map(R=>R.x+R.w/2),z=R=>Math.max(...R)-Math.min(...R);z(j)<=o.alignTol?w=Y(l,"left-aligned","左对齐"):z(A)<=o.alignTol?w=Y(l,"right-aligned","右对齐"):z(_)<=o.alignTol&&(w=Y(l,"horizontally centered","水平居中"))}return{groups:d,ungrouped:g,interGroupAxis:x,interGroupSpacing:v,interGroupAlignment:w}}function bS(t,a){const l=t.children.map(s=>a.nodes[s]).filter(s=>!!s);if(l.length===0)return;const o=l.map(s=>{const c=[s.type];return s.text&&c.push("T"),s.children.length>0&&c.push(`C${s.children.length}`),c.join(":")});return`${t.type}[${o.join(",")}]`}function yS(t){if(t.length<2)return;const a=pt(),o=uv(t,(s,c)=>{const d=Je(s),f=Je(c),p=oi(d,f),g=Math.min(ot(d),ot(f));return g>0&&p/g>=a.stackingOverlap}).filter(s=>s.length>=2).map(s=>{const c=s.map(Je);let d=0,f=0;for(let p=0;p<c.length;p++)for(let g=p+1;g<c.length;g++){const x=oi(c[p],c[g]),v=Math.min(ot(c[p]),ot(c[g]));v>0&&(d+=x/v,f++)}return{nodeIds:s.map(p=>p.id),overlapRatio:f>0?Math.round(d/f*100)/100:0}});return o.length>0?{groups:o}:void 0}function wS(t,a,l="en"){var s,c,d;if(t.length===0)return;const o=t;for(const f of t){const p=f.nodeIds.map(j=>a.nodes[j]).filter(j=>!!j);if(p.length<2)continue;const g=[...p].sort((j,A)=>ot(Je(A))-ot(Je(j))),x=g[0],v=g.slice(1),w=ot(Je(x)),y=w>0&&v.every(j=>oi(Je(j),Je(x))/ot(Je(j))>.8);if(y&&(((s=x.hints)==null?void 0:s.role)==="decorative"||bs(x)))return{type:"decorative-overlay",groups:o,reason:Y(l,`${x.name} is the bottom layer, with ${v.length} other elements overlaid on it`,`${x.name} 为底层,其余 ${v.length} 个元素叠加其上`)};if(!y&&(((c=x.hints)==null?void 0:c.role)==="decorative"||bs(x))&&v.every(A=>oi(Je(A),Je(x))/ot(Je(A))>.5))return{type:"decorative-overlay",groups:o,reason:Y(l,`${x.name} is the bottom layer, with ${v.length} other elements overlaid on it`,`${x.name} 为底层,其余 ${v.length} 个元素叠加其上`)};if(p.length>=2){const j=ot(Je(v[0]))/w,A=Ow(Je(v[0]),Je(x));if(j>=.15&&j<=.85&&A>=.7&&((d=x.hints)==null?void 0:d.role)!=="decorative")return{type:"contained-overlay",groups:o,reason:Y(l,`${v[0].name} is overlaid inside ${x.name} (area ratio ${Math.round(j*100)}%, containment ${Math.round(A*100)}%)`,`${v[0].name} 叠加在 ${x.name} 内部 (面积比 ${Math.round(j*100)}%, 包含率 ${Math.round(A*100)}%)`)}}const C=p.map(j=>bS(j,a)).filter(j=>!!j);if(C.length===p.length&&C.length>=2&&new Set(C).size===1&&f.overlapRatio>.7)return{type:"overlapping-similar",groups:o,reason:Y(l,`${p.length} structurally identical elements overlap completely, possibly representing multiple states or a special overlay effect`,`${p.length} 个结构相同的元素完全重叠,可能为多状态切换或特殊叠加效果`)};if(p.length===2){const[j,A]=g;if(ot(Je(A))/ot(Je(j))<.2)return{type:"floating",groups:o,reason:Y(l,`${A.name} floats above ${j.name}`,`${A.name} 浮动在 ${j.name} 上方`)}}}return{type:"unknown",groups:o,reason:Y(l,`${t.length} stacking groups with an undetermined type`,`${t.length} 个堆叠组,无法确定类型`)}}function SS(t,a,l){var y;const o=t.absoluteBbox;let s=!1,c=!1;for(const S of a){const C=S.absoluteBbox;(C.x<o.x-1||C.x+C.width>o.x+o.width+1)&&(s=!0),(C.y<o.y-1||C.y+C.height>o.y+o.height+1)&&(c=!0)}if(!s&&!c)return;const d=(y=l.nodes[l.rootNodeId])==null?void 0:y.absoluteBbox,f=(d==null?void 0:d.x)??0,p=f+((d==null?void 0:d.width)??o.width),g=[];for(const S of a){const C=S.absoluteBbox.x,j=C+S.absoluteBbox.width,A=Math.max(C,f),_=Math.min(j,p),z=Math.max(0,_-A);if(z<=0)continue;const R=S.absoluteBbox.width>0?z/S.absoluteBbox.width:1;g.push({nodeId:S.id,name:S.name,visibility:R>.95?"full":"partial",visiblePx:Math.round(z)})}const x=s&&c?"both":s?"x":"y",v=Math.round(x==="y"?o.height:o.width),w=Math.round((d==null?void 0:d.width)??o.width);return{hasOverflow:!0,direction:x,containerSize:v,viewportSize:w,visibleChildren:g}}function NS(t,a){var s;const l=(s=a.nodes[a.rootNodeId])==null?void 0:s.absoluteBbox;if(!l)return!1;const o=l.width;return o>0&&t.bbox.width>o*1.3}function CS(t,a,l){if(!a)return;const o=a.bbox,s=t.bbox;if(o.width<=0||o.height<=0)return;const c={};let d=!1;const f=s.width/o.width,p=s.height/o.height;f>=.95&&(c.fillsParentWidth=!0,d=!0),p>=.95&&(c.fillsParentHeight=!0,d=!0);const g=s.x,x=o.width-(s.x+s.width),v=s.y,w=o.height-(s.y+s.height),y=Math.max(3,o.width*.02);if(Math.abs(g-x)<=y&&f<.95&&(c.centeredX=!0,d=!0),Math.abs(v-w)<=y&&p<.95&&(c.centeredY=!0,d=!0),Math.abs(g-x)<=y&&g>0&&(c.symmetricPaddingX=!0,d=!0),Math.abs(v-w)<=y&&v>0&&(c.symmetricPaddingY=!0,d=!0),t.children.length>0){const S=t.children.map(C=>l.nodes[C]).filter(C=>!!C&&C.style.visible);if(S.length>0){const C=Math.min(...S.map(D=>D.bbox.x)),j=Math.min(...S.map(D=>D.bbox.y)),A=Math.max(...S.map(D=>D.bbox.x+D.bbox.width)),_=Math.max(...S.map(D=>D.bbox.y+D.bbox.height)),z=Math.max(0,Math.round(j)),R=Math.max(0,Math.round(C)),E=Math.max(0,Math.round(s.width-A)),T=Math.max(0,Math.round(s.height-_));(z>0||R>0||E>0||T>0)&&(c.paddingEstimate={top:z,right:E,bottom:T,left:R},d=!0)}}return f<.5&&p<.5&&(c.intrinsicSize=!0,d=!0),d?c:void 0}function wv(t,a){const l=t.children.map(s=>a.nodes[s]).filter(s=>!!s);if(l.length===0)return;const o=l.map(s=>{const c=[s.type];return s.text&&c.push("T"),s.children.length>0&&c.push(`C${s.children.length}`),s.style.fills.length>0&&c.push("F"),s.style.borderRadius.some(f=>f>0)&&c.push("R"),c.join(":")});return`${t.type}[${o.join(",")}]`}function MS(t,a,l,o="en"){if(t.length<2)return;const s=Jg(t,a,l,o);if(s)return s;const c=jS(t);if(c&&c.length>=2&&c.length<t.length){const d=Jg(c,a,l,o);if(d)return d.reason+=Y(o,` (${c.length} of ${t.length} content children)`,`(共 ${t.length} 个内容子元素中的 ${c.length} 个)`),d}}function jS(t){var o;const a=new Map;for(const s of t){if(!((o=s.hints)!=null&&o.similarity))continue;const c=[...s.hints.similarity.similarIds,s.id].sort().join(",");if(!a.has(c)){const d=[s,...s.hints.similarity.similarIds.map(f=>t.find(p=>p.id===f)).filter(f=>!!f)];a.set(c,d)}}if(a.size===0)return;let l;for(const s of a.values())(!l||s.length>l.length)&&(l=s);return l&&l.length>=2?l:void 0}function Jg(t,a,l,o){const s=ES(t,o);if(s)return s;const c=AS(t,l,o);if(c)return c;const d=TS(t,a,l,o);if(d)return d;const f=zS(t,a,o);if(f)return f}function ES(t,a){if(t.length<4)return;const l=pt(),o=t.map(C=>C.bbox.width),s=t.map(C=>C.bbox.height),c=Math.max(...o),d=Math.min(...o),f=Math.max(...s),p=Math.min(...s);if(c<=0||f<=0||d/c<.7||p/f<.7)return;const g=ma(t.map(Rs),l.snapTol);if(g.length<2)return;const v=Rd(t,g,cv,l.snapTol).filter(C=>C.length>0);if(v.length<2)return;const w=v.map(C=>C.length),y=Math.max(...w),S=Math.min(...w);if(!(y-S>1))return{type:"grid",nodeIds:t.map(C=>C.id),columns:y,rows:v.length,confidence:.85,reason:Y(a,`${v.length}-row × ${y}-column grid with similarly sized elements`,`${v.length} 行 × ${y} 列网格,元素尺寸相近`)}}function AS(t,a,l){if(t.length<3)return;const o=pt();if(!zl(t,o.snapTol))return;const s=t.map(x=>wv(x,a)),c=new Map;for(const x of s)x&&c.set(x,(c.get(x)??0)+1);const d=[...c.entries()].sort((x,v)=>v[1]-x[1])[0];if(!d||d[1]<t.length*.6)return;const f=t.map(x=>x.bbox.width),p=Math.max(...f),g=Math.min(...f);if(!(p>0&&g/p<.7))return{type:"list",nodeIds:t.map(x=>x.id),confidence:.85,reason:Y(l,`${t.length} structurally similar elements arranged vertically`,`${t.length} 个结构相似元素纵向排列`)}}function TS(t,a,l,o){if(t.length<2||t.length>8)return;const s=pt();if(!xa(t,s.snapTol))return;const c=t.map(w=>wv(w,l)),d=new Map;for(const w of c)w&&d.set(w,(d.get(w)??0)+1);const f=[...d.entries()].sort((w,y)=>y[1]-w[1])[0];if(!f||f[1]<t.length*.6)return;const p=t.map(w=>w.bbox.height);if(!(!(Math.min(...p)/Math.max(...p)>=.8)||p.reduce((w,y)=>w+y,0)/p.length>a.bbox.height*.3||!t.some(w=>va(w,l))))return{type:"tab-bar",nodeIds:t.map(w=>w.id),confidence:.75,reason:Y(o,`${t.length} short, similar elements with text arranged horizontally`,`${t.length} 个相似元素横向排列,含文本,高度较矮`)}}function zS(t,a,l){if(t.length<2)return;const o=pt();if(!xa(t,o.snapTol)||Math.max(...t.map(f=>f.bbox.x+f.bbox.width))-Math.min(...t.map(f=>f.bbox.x))<=a.bbox.width*1.1)return;const c=t.map(f=>f.bbox.width),d=t.map(f=>f.bbox.height);if(!(Math.min(...c)/Math.max(...c)<.7)&&!(Math.min(...d)/Math.max(...d)<.7))return{type:"carousel",nodeIds:t.map(f=>f.id),confidence:.8,reason:Y(l,`${t.length} similar elements overflow horizontally, suggesting a carousel or horizontal scroller`,`${t.length} 个相似元素横向溢出排列,疑似轮播/横滑`)}}const RS=new Set(["rectangle","ellipse","line","vector"]);function OS(t,a,l="en"){var p;const o=t.children.map(g=>a.nodes[g]).filter(g=>!!g&&g.style.visible);if(o.length<2)return;const s=kS(o,t,a,l);if(s)return s;const c=_S(o,a,l);if(c)return c;const d=DS(o,a,l);if(d)return d;const f=$S(o,t,a,l);if(f)return f;if(((p=t.hints)==null?void 0:p.containerType)==="visual-boundary"&&o.length>=2){const g=o.some(v=>v.type==="image"),x=o.some(v=>v.text||va(v,a));if(g&&x)return{role:"card",confidence:.7,reason:Y(l,"Container with a visual boundary that contains both an image and text","有视觉边界的容器,包含图片和文本")}}}function kS(t,a,l,o){if(t.length<2||t.length>4)return;const s=t.filter(g=>g.type==="ellipse"||g.type==="image"||g.type==="rectangle"&&g.style.borderRadius.some(x=>x>=Math.min(g.bbox.width,g.bbox.height)*.4)),c=t.filter(g=>g.text||va(g,l));if(s.length!==1||c.length===0)return;const d=s[0];if(Math.max(d.bbox.width,d.bbox.height)>a.bbox.height*.8)return;const p=d.bbox.width>0?d.bbox.height/d.bbox.width:0;if(!(p<.7||p>1.4))return{role:"avatar-name",confidence:.8,reason:Y(o,"Circular or square image with text, likely an avatar-and-name group","圆形/方形图片 + 文本,疑似头像+名称组合")}}function _S(t,a,l){if(t.length<2||t.length>3)return;const o=t.filter(c=>{const d=c.bbox.width<=48&&c.bbox.height<=48,f=c.type==="vector"||c.type==="image"||RS.has(c.type)&&c.children.length===0;return d&&f}),s=t.filter(c=>c.text||va(c,a));if(!(o.length!==1||s.length===0))return{role:"icon-text",confidence:.75,reason:Y(l,"Small icon with text","小图标 + 文本组合")}}function DS(t,a,l){if(t.length!==2)return;const o=pt();if(!t.every(f=>f.text||f.children.length>0&&va(f,a))||!xa(t,o.snapTol))return;const c=Math.abs(t[0].bbox.y-t[1].bbox.y),d=Math.abs(t[0].bbox.y+t[0].bbox.height/2-(t[1].bbox.y+t[1].bbox.height/2));if(!(c>o.alignTol&&d>o.alignTol))return{role:"label-value",confidence:.7,reason:Y(l,"Two horizontally aligned text elements, likely a label-value pair","两个文本元素横向对齐,疑似标签-值对")}}function $S(t,a,l,o){if(t.length<2)return;const s=pt(),c=t.filter(x=>x.type==="image"||x.style.fills.some(v=>v.type==="image")),d=t.filter(x=>x.text||va(x,l));if(c.length!==1||d.length===0)return;const f=c[0];if(f.bbox.width<a.bbox.width*.5)return;const p=f.bbox.y+f.bbox.height;if(!(Math.min(...d.map(x=>x.bbox.y))<p-s.snapTol))return{role:"thumbnail-title",confidence:.75,reason:Y(o,"Large image with text below, likely a thumbnail-title group","大图 + 下方文本,疑似缩略图-标题组合")}}function LS(t){const a=pt(),l=ma(t.map(Rs),a.snapTol),o=ma(t.map(Fd),a.snapTol);if(l.length>o.length)return"top-to-bottom";if(o.length>l.length)return"left-to-right";const s=Math.max(...t.map(d=>d.bbox.x+d.bbox.width))-Math.min(...t.map(d=>d.bbox.x));return Math.max(...t.map(d=>d.bbox.y+d.bbox.height))-Math.min(...t.map(d=>d.bbox.y))>=s?"top-to-bottom":"left-to-right"}function US(t){if(t.length<2)return;const a=pt();return{primaryDirection:zl(t,a.snapTol)?"top-to-bottom":xa(t,a.snapTol)?"left-to-right":LS(t)}}function Sv(t,a,l){const o=a.nodes[t];if(o)for(const s of o.children)l.add(s),Sv(s,a,l)}function BS(t,a,l){let o=a.nodes[t];for(;o!=null&&o.parentId;)l.add(o.parentId),o=a.nodes[o.parentId]}function HS(t,a){const l=t.absoluteBbox.x,o=t.absoluteBbox.y,s=l+t.absoluteBbox.width,c=o+t.absoluteBbox.height,d=a.absoluteBbox.x,f=a.absoluteBbox.y,p=d+a.absoluteBbox.width,g=f+a.absoluteBbox.height,x=Math.max(0,Math.min(s,p)-Math.max(l,d)),v=Math.max(0,Math.min(c,g)-Math.max(o,f)),w=x*v;if(w<=0)return 0;const y=Math.min(t.absoluteBbox.width*t.absoluteBbox.height,a.absoluteBbox.width*a.absoluteBbox.height);return y>0?w/y:0}function YS(t){var s;const a=Object.values(t.nodes).filter(c=>c.style.visible);if(a.length>500)return;const l=new Map;for(const c of a){const d=new Set;BS(c.id,t,d);const f=new Set;Sv(c.id,t,f),l.set(c.id,{node:c,ancestors:d,descendants:f})}const o=a.filter(c=>{var d;return c.children.length>0&&((d=c.hints)==null?void 0:d.role)==="container"});for(const c of o){const d=l.get(c.id);if(!d)continue;const f=[];for(const p of a){if(p.id===c.id||d.descendants.has(p.id)||d.ancestors.has(p.id)||p.absoluteBbox.width<2||p.absoluteBbox.height<2||p.id===t.rootNodeId)continue;const g=HS(c,p);if(g<.15)continue;const x=p.parentId?t.nodes[p.parentId]:void 0;f.push({nodeId:p.id,name:p.name,overlapRatio:Math.round(g*100)/100,structuralParent:p.parentId??"",structuralParentName:(x==null?void 0:x.name)??"",role:((s=p.hints)==null?void 0:s.role)??"container"})}if(f.length>0){f.sort((g,x)=>x.overlapRatio-g.overlapRatio);const p=f.slice(0,10);if(!c.hints)continue;c.hints.crossGroupOverlaps=p}}}function IS(t,a){const l=[],o=Gg(t),s=ot(o);if(!(s<=0)){for(const c of a){if(c.id===t.id)continue;const d=Gg(c),f=oi(o,d);if(f<=0)continue;const p=Math.min(s,ot(d)),g=p>0?f/p:0;g<.95&&l.push({targetId:c.id,ratio:Math.round(g*100)/100})}return l.length>0?l:void 0}}function GS(t,a){const l=pt(),o=Je(t),s=ot(o);if(!(s<=0))for(const c of a){if(c.id===t.id)continue;const d=Je(c),f=ot(d);if(f<=s)continue;const p=Math.max(0,Math.min(o.x+o.w,d.x+d.w)-Math.max(o.x,d.x)),g=Math.max(0,Math.min(o.y+o.h,d.y+d.h)-Math.max(o.y,d.y)),x=p*g,v=Math.min(s,f);if(v>0&&x/v>=l.containment)return c.id}}function VS(t,a,l){const o=Uw(t),s={role:o};o==="container"&&t.children.length>0&&(s.containerType=Bw(t));const c=a.nodes[t.parentId??""];if(c){const S=c.children.map(z=>a.nodes[z]).filter(z=>!!z&&z.style.visible),C=Hw(t,c,S);C.isDecorative&&(s.role="decorative",s.decorativeReason=C.reason);const j=mv(t,c.bbox.width,c.bbox.height);j&&(s.isSeparator=j),Wd(t)&&(s.isGhost=!0);const A={x:0,y:0,w:c.bbox.width,h:c.bbox.height},_=ot(A);_>0&&hv(t,A,_)&&(s.isBackground=!0),s.overlaps=IS(t,S),s.containedBy=GS(t,S),s.similarity=Zw(t,S,a)}const d=t.children.map(S=>a.nodes[S]).filter(S=>!!S&&S.style.visible);if(d.length<2)return s;const f=d.filter(S=>{const C=S.hints;return C?C.role!=="decorative"&&!C.isSeparator:!0});if(f.length>=2){s.childrenAxis={xNonOverlapping:xa(f,pt().snapTol),yNonOverlapping:zl(f,pt().snapTol)};const S=pS(f);S.length>0&&(s.childrenSpacing=S),s.childrenAlignment=gS(f),s.childrenSizeUniformity=xS(f);const C=vS(f,a,l);C&&(s.grouping=C);const j=US(f);j&&(s.contentFlow=j);const A=MS(f,t,a,l);A&&(s.layoutPattern=A)}const p=a.nodes[t.parentId??""],g=CS(t,p,a);g&&(s.constraint=g);const x=SS(t,d,a);x&&(s.overflow=x),NS(t,a)&&(s.scrollCandidate=!0);const v=d.filter(S=>{const C=S.hints;return!(C!=null&&C.isBackground)&&(C==null?void 0:C.decorativeReason)!=="mask-layer"}),w=yS(v);if(w){s.stacking=w;const S=wS(w.groups,a,l);S&&(s.stackingDetail=S)}const y=OS(t,a,l);return y&&(s.semantic=y),s}function XS(t,a="en"){const l=new Set;function o(s){if(l.has(s))return;l.add(s);const c=t.nodes[s];if(c){for(const d of c.children)o(d);c.hints=VS(c,t,a)}}o(t.rootNodeId),YS(t)}function _d(t,a="en"){var o,s;const l=((s=(o=t.modules[0])==null?void 0:o.bbox)==null?void 0:s.width)??750;Dw(l);for(const c of t.modules)XS(c,a)}function qS(t){const a={text:""},l=[],o=t.trim().split(/\s+/);for(const s of o){if(s.startsWith("#")){a.exactId=s.slice(1);continue}const c=s.indexOf(":");if(c>0){const d=s.slice(0,c).toLowerCase(),f=s.slice(c+1);switch(d){case"type":a.type=f.toLowerCase();break;case"asset":a.hasAsset=f==="true";break;case"parent":a.parentId=f;break;case"module":a.moduleId=f;break;default:l.push(s)}}else l.push(s)}return a.text=l.join(" "),a}function PS(t,a,l){if(!t.text&&!t.type&&t.hasAsset===void 0&&!t.parentId&&!t.exactId)return[];const o=[],s=QS(t.moduleId,a);for(const c of s){const d=Object.values(c.nodes);for(const f of d)ZS(f,t,l)&&o.push({node:f,moduleId:c.moduleId,moduleName:c.name})}return o}function QS(t,a){if(!t)return a.modules;const l=t.toLowerCase();return a.modules.filter(o=>o.moduleId===t||o.name.toLowerCase().includes(l))}function ZS(t,a,l){var o,s;if(a.exactId)return t.id===a.exactId;if(a.type&&t.type!==a.type||a.parentId&&t.parentId!==a.parentId||a.hasAsset!==void 0&&!!l(t.id)!==a.hasAsset)return!1;if(a.text){const c=a.text.toLowerCase(),d=t.name.toLowerCase().includes(c),f=((s=(o=t.text)==null?void 0:o.content)==null?void 0:s.toLowerCase().includes(c))??!1,p=t.id.toLowerCase().includes(c);if(!d&&!f&&!p)return!1}return!0}const ex=t=>{let a;const l=new Set,o=(g,x)=>{const v=typeof g=="function"?g(a):g;if(!Object.is(v,a)){const w=a;a=x??(typeof v!="object"||v===null)?v:Object.assign({},a,v),l.forEach(y=>y(a,w))}},s=()=>a,f={setState:o,getState:s,getInitialState:()=>p,subscribe:g=>(l.add(g),()=>l.delete(g))},p=a=t(o,s,f);return f},FS=(t=>t?ex(t):ex),WS=t=>t;function KS(t,a=WS){const l=so.useSyncExternalStore(t.subscribe,so.useCallback(()=>a(t.getState()),[t,a]),so.useCallback(()=>a(t.getInitialState()),[t,a]));return so.useDebugValue(l),l}const tx=t=>{const a=FS(t),l=o=>KS(a,o);return Object.assign(l,a),l},JS=(t=>t?tx(t):tx);function Nv(t){const a=t.match(/^\/design\/([^/?#]+)\/?$/);if(!a)return null;try{return decodeURIComponent(a[1])}catch{return null}}function Kr(t,a,l,o){if(t==="overview")return o==="map"?"#/?mode=map":"#/";let s=`#/module/${encodeURIComponent(a??"")}`;const c=[];return l&&c.push(`node=${encodeURIComponent(l)}`),o==="map"&&c.push("mode=map"),c.length>0&&(s+=`?${c.join("&")}`),s}function nx(t){const a=t.replace(/^#\/?/,""),l=a.match(/[?&]mode=(visual|map)/),o=l==null?void 0:l[1];if(!a||a==="/"||a.startsWith("?"))return{view:"overview",mode:o};const s=a.match(/^module\/([^?]+)/);if(s){const c=ix(s[1]),d=a.match(/[?&]node=([^&]+)/),f=a.match(/[?&]x=([^&]+)/),p=a.match(/[?&]y=([^&]+)/),g=f?parseFloat(f[1]):void 0,x=p?parseFloat(p[1]):void 0;return{view:"module",moduleId:c,nodeId:d!=null&&d[1]?ix(d[1]):void 0,pointX:g,pointY:x,mode:o}}return{view:"overview",mode:o}}function ix(t){try{return decodeURIComponent(t)}catch{return t}}function ax(t,a,l){const o=t.nodes[t.rootNodeId];if(!o)return;const s=o.absoluteBbox.x+a,c=o.absoluteBbox.y+l;let d,f=1/0;for(const p of Object.values(t.nodes)){if(!p.style.visible)continue;const{x:g,y:x,width:v,height:w}=p.absoluteBbox;if(s>=g&&s<=g+v&&c>=x&&c<=x+w){const y=v*w;y<f&&(f=y,d=p)}}return d==null?void 0:d.id}const Ze=JS((t,a)=>({designId:null,exportData:null,currentView:"overview",currentModuleId:null,selectedNodeId:null,fitTargetNodeId:null,searchQuery:"",displayMode:"visual",highlightedNodeIds:new Set,mapFocusNodeId:null,isDragging:!1,hiddenNodeIds:new Set,canvasBgColor:"dark",initDesignId:l=>t({designId:l}),setExportData:l=>{if(!l){t({exportData:null,currentView:"overview",currentModuleId:null,selectedNodeId:null,fitTargetNodeId:null});return}t({exportData:l});const{view:o,moduleId:s,nodeId:c,pointX:d,pointY:f,mode:p}=nx(window.location.hash);if(t({displayMode:p??"visual"}),o==="module"&&s){const g=l.modules.find(x=>x.moduleId===s);if(g){const x=c??(d!==void 0&&f!==void 0?ax(g,d,f):void 0);t({currentView:"module",currentModuleId:s,selectedNodeId:x??null,fitTargetNodeId:x??null});return}}t({currentView:"overview",currentModuleId:null,selectedNodeId:null,fitTargetNodeId:null})},navigateTo:(l,o,s)=>{const{displayMode:c}=a();t({currentView:l,currentModuleId:o??null,selectedNodeId:s??null,searchQuery:""}),window.location.hash=Kr(l,o,s,c)},selectModule:l=>{const{displayMode:o}=a();t({currentView:"module",currentModuleId:l,selectedNodeId:null,searchQuery:""}),window.location.hash=Kr("module",l,void 0,o)},selectNode:l=>{const{currentModuleId:o,displayMode:s}=a();t({selectedNodeId:l}),o&&(window.location.hash=Kr("module",o,l??void 0,s))},setSearchQuery:l=>t({searchQuery:l}),setDisplayMode:l=>{t({displayMode:l});const{currentView:o,currentModuleId:s,selectedNodeId:c}=a();window.location.hash=Kr(o,s??void 0,c??void 0,l)},setHighlightedNodes:l=>t({highlightedNodeIds:new Set(l)}),clearHighlightedNodes:()=>t({highlightedNodeIds:new Set}),setMapFocusNodeId:l=>t({mapFocusNodeId:l}),setFitTargetNodeId:l=>t({fitTargetNodeId:l}),setIsDragging:l=>t({isDragging:l}),toggleNodeVisibility:l=>{t(o=>{const s=new Set(o.hiddenNodeIds);return s.has(l)?s.delete(l):s.add(l),{hiddenNodeIds:s}})},toggleCanvasBgColor:()=>{t(l=>({canvasBgColor:l.canvasBgColor==="dark"?"light":"dark"}))},syncFromHash:()=>{const{exportData:l}=a();if(!l)return;const{view:o,moduleId:s,nodeId:c,pointX:d,pointY:f,mode:p}=nx(window.location.hash);if(t({displayMode:p??"visual"}),o==="module"&&s){const g=l.modules.find(x=>x.moduleId===s);if(g){const x=c??(d!==void 0&&f!==void 0?ax(g,d,f):void 0);t({currentView:"module",currentModuleId:s,selectedNodeId:x??null,fitTargetNodeId:x??null});return}}t({currentView:"overview",currentModuleId:null,selectedNodeId:null,fitTargetNodeId:null})},getCurrentModule:()=>{const{exportData:l,currentModuleId:o}=a();return l==null?void 0:l.modules.find(s=>s.moduleId===o)},getNode:l=>{const{exportData:o}=a();if(o){for(const s of o.modules)if(s.nodes[l])return s.nodes[l]}},getNodePath:l=>{const{exportData:o}=a();if(!o)return[];let s,c;for(const p of o.modules)if(p.nodes[l]){s=p.nodes[l],c=p;break}if(!s||!c)return[];const d=[s];let f=s;for(;f.parentId&&c.nodes[f.parentId];)f=c.nodes[f.parentId],d.unshift(f);return d},findNodeAsset:l=>{const{exportData:o}=a();return o==null?void 0:o.assets.find(s=>s.nodeId===l)},getModuleAssetCount:l=>{const{exportData:o}=a();if(!o)return 0;const s=o.modules.find(d=>d.moduleId===l);if(!s)return 0;const c=new Set(Object.keys(s.nodes));return o.assets.filter(d=>c.has(d.nodeId)).length},getModuleStats:l=>{const{exportData:o}=a(),s={nodes:0,assets:0,texts:0,images:0,frames:0};if(!o)return s;const c=o.modules.find(p=>p.moduleId===l);if(!c)return s;const d=Object.values(c.nodes),f=new Set(Object.keys(c.nodes));return{nodes:d.length,assets:o.assets.filter(p=>f.has(p.nodeId)).length,texts:d.filter(p=>p.text).length,images:d.filter(p=>p.type==="image").length,frames:d.filter(p=>p.type==="frame").length}}}));function Cv(t){var a,l,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(l=Cv(t[a]))&&(o&&(o+=" "),o+=l)}else for(l in t)t[l]&&(o&&(o+=" "),o+=l);return o}function Mv(){for(var t,a,l=0,o="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=Cv(t))&&(o&&(o+=" "),o+=a);return o}const ox=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,lx=Mv,jv=(t,a)=>l=>{var o;if((a==null?void 0:a.variants)==null)return lx(t,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:s,defaultVariants:c}=a,d=Object.keys(s).map(g=>{const x=l==null?void 0:l[g],v=c==null?void 0:c[g];if(x===null)return null;const w=ox(x)||ox(v);return s[g][w]}),f=l&&Object.entries(l).reduce((g,x)=>{let[v,w]=x;return w===void 0||(g[v]=w),g},{}),p=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((g,x)=>{let{class:v,className:w,...y}=x;return Object.entries(y).every(S=>{let[C,j]=S;return Array.isArray(j)?j.includes({...c,...f}[C]):{...c,...f}[C]===j})?[...g,v,w]:g},[]);return lx(t,d,p,l==null?void 0:l.class,l==null?void 0:l.className)};function rx(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function e2(...t){return a=>{let l=!1;const o=t.map(s=>{const c=rx(s,a);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<o.length;s++){const c=o[s];typeof c=="function"?c():rx(t[s],null)}}}}function Tt(...t){return N.useCallback(e2(...t),t)}function Kd(t){const a=N.forwardRef((l,o)=>{let{children:s,...c}=l,d=null,f=!1;const p=[];sx(s)&&typeof Jr=="function"&&(s=Jr(s._payload)),N.Children.forEach(s,w=>{var y;if(o2(w)){f=!0;const S=w;let C="child"in S.props?S.props.child:S.props.children;sx(C)&&typeof Jr=="function"&&(C=Jr(C._payload)),d=n2(S,C),p.push((y=d==null?void 0:d.props)==null?void 0:y.children)}else p.push(w)}),d?d=N.cloneElement(d,void 0,p):!f&&N.Children.count(s)===1&&N.isValidElement(s)&&(d=s);const g=d?a2(d):void 0,x=Tt(o,g);if(!d){if(s||s===0)throw new Error(f?c2(t):s2(t));return s}const v=i2(c,d.props??{});return d.type!==N.Fragment&&(v.ref=o?x:g),N.cloneElement(d,v)});return a.displayName=`${t}.Slot`,a}var Ev=Kd("Slot"),Av=Symbol.for("radix.slottable");function t2(t){const a=l=>"child"in l?l.children(l.child):l.children;return a.displayName=`${t}.Slottable`,a.__radixId=Av,a}var n2=(t,a)=>{if("child"in t.props){const l=t.props.child;return N.isValidElement(l)?N.cloneElement(l,void 0,t.props.children(l.props.children)):null}return N.isValidElement(a)?a:null};function i2(t,a){const l={...a};for(const o in a){const s=t[o],c=a[o];/^on[A-Z]/.test(o)?s&&c?l[o]=(...f)=>{const p=c(...f);return s(...f),p}:s&&(l[o]=s):o==="style"?l[o]={...s,...c}:o==="className"&&(l[o]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function a2(t){var o,s;let a=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}function o2(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Av}var l2=Symbol.for("react.lazy");function sx(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===l2&&"_payload"in t&&r2(t._payload)}function r2(t){return typeof t=="object"&&t!==null&&"then"in t}var s2=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,c2=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Jr=Pd[" use ".trim().toString()];const u2=(t,a)=>{const l=new Array(t.length+a.length);for(let o=0;o<t.length;o++)l[o]=t[o];for(let o=0;o<a.length;o++)l[t.length+o]=a[o];return l},d2=(t,a)=>({classGroupId:t,validator:a}),Tv=(t=new Map,a=null,l)=>({nextPart:t,validators:a,classGroupId:l}),ys="-",cx=[],f2="arbitrary..",h2=t=>{const a=p2(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return m2(d);const f=d.split(ys),p=f[0]===""&&f.length>1?1:0;return zv(f,p,a)},getConflictingClassGroupIds:(d,f)=>{if(f){const p=o[d],g=l[d];return p?g?u2(g,p):p:g||cx}return l[d]||cx}}},zv=(t,a,l)=>{if(t.length-a===0)return l.classGroupId;const s=t[a],c=l.nextPart.get(s);if(c){const g=zv(t,a+1,c);if(g)return g}const d=l.validators;if(d===null)return;const f=a===0?t.join(ys):t.slice(a).join(ys),p=d.length;for(let g=0;g<p;g++){const x=d[g];if(x.validator(f))return x.classGroupId}},m2=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),l=a.indexOf(":"),o=a.slice(0,l);return o?f2+o:void 0})(),p2=t=>{const{theme:a,classGroups:l}=t;return g2(l,a)},g2=(t,a)=>{const l=Tv();for(const o in t){const s=t[o];Jd(s,l,o,a)}return l},Jd=(t,a,l,o)=>{const s=t.length;for(let c=0;c<s;c++){const d=t[c];x2(d,a,l,o)}},x2=(t,a,l,o)=>{if(typeof t=="string"){v2(t,a,l);return}if(typeof t=="function"){b2(t,a,l,o);return}y2(t,a,l,o)},v2=(t,a,l)=>{const o=t===""?a:Rv(a,t);o.classGroupId=l},b2=(t,a,l,o)=>{if(w2(t)){Jd(t(o),a,l,o);return}a.validators===null&&(a.validators=[]),a.validators.push(d2(l,t))},y2=(t,a,l,o)=>{const s=Object.entries(t),c=s.length;for(let d=0;d<c;d++){const[f,p]=s[d];Jd(p,Rv(a,f),l,o)}},Rv=(t,a)=>{let l=t;const o=a.split(ys),s=o.length;for(let c=0;c<s;c++){const d=o[c];let f=l.nextPart.get(d);f||(f=Tv(),l.nextPart.set(d,f)),l=f}return l},w2=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,S2=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),o=Object.create(null);const s=(c,d)=>{l[c]=d,a++,a>t&&(a=0,o=l,l=Object.create(null))};return{get(c){let d=l[c];if(d!==void 0)return d;if((d=o[c])!==void 0)return s(c,d),d},set(c,d){c in l?l[c]=d:s(c,d)}}},Dd="!",ux=":",N2=[],dx=(t,a,l,o,s)=>({modifiers:t,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:o,isExternal:s}),C2=t=>{const{prefix:a,experimentalParseClassName:l}=t;let o=s=>{const c=[];let d=0,f=0,p=0,g;const x=s.length;for(let C=0;C<x;C++){const j=s[C];if(d===0&&f===0){if(j===ux){c.push(s.slice(p,C)),p=C+1;continue}if(j==="/"){g=C;continue}}j==="["?d++:j==="]"?d--:j==="("?f++:j===")"&&f--}const v=c.length===0?s:s.slice(p);let w=v,y=!1;v.endsWith(Dd)?(w=v.slice(0,-1),y=!0):v.startsWith(Dd)&&(w=v.slice(1),y=!0);const S=g&&g>p?g-p:void 0;return dx(c,y,w,S)};if(a){const s=a+ux,c=o;o=d=>d.startsWith(s)?c(d.slice(s.length)):dx(N2,!1,d,void 0,!0)}if(l){const s=o;o=c=>l({className:c,parseClassName:s})}return o},M2=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((l,o)=>{a.set(l,1e6+o)}),l=>{const o=[];let s=[];for(let c=0;c<l.length;c++){const d=l[c],f=d[0]==="[",p=a.has(d);f||p?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(d)):s.push(d)}return s.length>0&&(s.sort(),o.push(...s)),o}},j2=t=>({cache:S2(t.cacheSize),parseClassName:C2(t),sortModifiers:M2(t),postfixLookupClassGroupIds:E2(t),...h2(t)}),E2=t=>{const a=Object.create(null),l=t.postfixLookupClassGroups;if(l)for(let o=0;o<l.length;o++)a[l[o]]=!0;return a},A2=/\s+/,T2=(t,a)=>{const{parseClassName:l,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c,postfixLookupClassGroupIds:d}=a,f=[],p=t.trim().split(A2);let g="";for(let x=p.length-1;x>=0;x-=1){const v=p[x],{isExternal:w,modifiers:y,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:j}=l(v);if(w){g=v+(g.length>0?" "+g:g);continue}let A=!!j,_;if(A){const D=C.substring(0,j);_=o(D);const k=_&&d[_]?o(C):void 0;k&&k!==_&&(_=k,A=!1)}else _=o(C);if(!_){if(!A){g=v+(g.length>0?" "+g:g);continue}if(_=o(C),!_){g=v+(g.length>0?" "+g:g);continue}A=!1}const z=y.length===0?"":y.length===1?y[0]:c(y).join(":"),R=S?z+Dd:z,E=R+_;if(f.indexOf(E)>-1)continue;f.push(E);const T=s(_,A);for(let D=0;D<T.length;++D){const k=T[D];f.push(R+k)}g=v+(g.length>0?" "+g:g)}return g},z2=(...t)=>{let a=0,l,o,s="";for(;a<t.length;)(l=t[a++])&&(o=Ov(l))&&(s&&(s+=" "),s+=o);return s},Ov=t=>{if(typeof t=="string")return t;let a,l="";for(let o=0;o<t.length;o++)t[o]&&(a=Ov(t[o]))&&(l&&(l+=" "),l+=a);return l},R2=(t,...a)=>{let l,o,s,c;const d=p=>{const g=a.reduce((x,v)=>v(x),t());return l=j2(g),o=l.cache.get,s=l.cache.set,c=f,f(p)},f=p=>{const g=o(p);if(g)return g;const x=T2(p,l);return s(p,x),x};return c=d,(...p)=>c(z2(...p))},O2=[],mt=t=>{const a=l=>l[t]||O2;return a.isThemeGetter=!0,a},kv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_v=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D2=/\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$/,$2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$i=t=>k2.test(t),Ee=t=>!!t&&!Number.isNaN(Number(t)),Tn=t=>!!t&&Number.isInteger(Number(t)),pd=t=>t.endsWith("%")&&Ee(t.slice(0,-1)),ni=t=>_2.test(t),Dv=()=>!0,B2=t=>D2.test(t)&&!$2.test(t),ef=()=>!1,H2=t=>L2.test(t),Y2=t=>U2.test(t),I2=t=>!se(t)&&!ce(t),G2=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),V2=t=>Yi(t,Uv,ef),se=t=>kv.test(t),ua=t=>Yi(t,Bv,B2),fx=t=>Yi(t,K2,Ee),X2=t=>Yi(t,Yv,Dv),q2=t=>Yi(t,Hv,ef),hx=t=>Yi(t,$v,ef),P2=t=>Yi(t,Lv,Y2),es=t=>Yi(t,Iv,H2),ce=t=>_v.test(t),gl=t=>ba(t,Bv),Q2=t=>ba(t,Hv),mx=t=>ba(t,$v),Z2=t=>ba(t,Uv),F2=t=>ba(t,Lv),ts=t=>ba(t,Iv,!0),W2=t=>ba(t,Yv,!0),Yi=(t,a,l)=>{const o=kv.exec(t);return o?o[1]?a(o[1]):l(o[2]):!1},ba=(t,a,l=!1)=>{const o=_v.exec(t);return o?o[1]?a(o[1]):l:!1},$v=t=>t==="position"||t==="percentage",Lv=t=>t==="image"||t==="url",Uv=t=>t==="length"||t==="size"||t==="bg-size",Bv=t=>t==="length",K2=t=>t==="number",Hv=t=>t==="family-name",Yv=t=>t==="number"||t==="weight",Iv=t=>t==="shadow",J2=()=>{const t=mt("color"),a=mt("font"),l=mt("text"),o=mt("font-weight"),s=mt("tracking"),c=mt("leading"),d=mt("breakpoint"),f=mt("container"),p=mt("spacing"),g=mt("radius"),x=mt("shadow"),v=mt("inset-shadow"),w=mt("text-shadow"),y=mt("drop-shadow"),S=mt("blur"),C=mt("perspective"),j=mt("aspect"),A=mt("ease"),_=mt("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...R(),ce,se],T=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],k=()=>[ce,se,p],V=()=>[$i,"full","auto",...k()],te=()=>[Tn,"none","subgrid",ce,se],J=()=>["auto",{span:["full",Tn,ce,se]},Tn,ce,se],q=()=>[Tn,"auto",ce,se],ne=()=>["auto","min","max","fr",ce,se],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...k()],Q=()=>[$i,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],K=()=>[$i,"screen","full","dvw","lvw","svw","min","max","fit",...k()],de=()=>[$i,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],ee=()=>[t,ce,se],$=()=>[...R(),mx,hx,{position:[ce,se]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Z2,V2,{size:[ce,se]}],re=()=>[pd,gl,ua],fe=()=>["","none","full",g,ce,se],pe=()=>["",Ee,gl,ua],je=()=>["solid","dashed","dotted","double"],et=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Ee,pd,mx,hx],$t=()=>["","none",S,ce,se],kt=()=>["none",Ee,ce,se],Lt=()=>["none",Ee,ce,se],on=()=>[Ee,ce,se],ft=()=>[$i,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ni],breakpoint:[ni],color:[Dv],container:[ni],"drop-shadow":[ni],ease:["in","out","in-out"],font:[I2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ni],shadow:[ni],spacing:["px",Ee],text:[ni],"text-shadow":[ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$i,se,ce,j]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,se]}],"container-named":[G2],columns:[{columns:[Ee,se,ce,f]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:E()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Tn,"auto",ce,se]}],basis:[{basis:[$i,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ee,$i,"auto","initial","none",se]}],grow:[{grow:["",Ee,ce,se]}],shrink:[{shrink:["",Ee,ce,se]}],order:[{order:[Tn,"first","last","none",ce,se]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",l,gl,ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,W2,X2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pd,se]}],"font-family":[{font:[Q2,q2,a]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ce,se]}],"line-clamp":[{"line-clamp":[Ee,"none",ce,fx]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",ce,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ee,"from-font","auto",ce,ua]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ee,"auto",ce,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Tn,ce,se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,se]}],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",ce,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tn,ce,se],radial:["",ce,se],conic:[Tn,ce,se]},F2,P2]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ee,ce,se]}],"outline-w":[{outline:["",Ee,gl,ua]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",x,ts,es]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",v,ts,es]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ee,ua]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",w,ts,es]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ee,ce,se]}],"mix-blend":[{"mix-blend":[...et(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":et()}],"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":[Ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ce,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,se]}],filter:[{filter:["","none",ce,se]}],blur:[{blur:$t()}],brightness:[{brightness:[Ee,ce,se]}],contrast:[{contrast:[Ee,ce,se]}],"drop-shadow":[{"drop-shadow":["","none",y,ts,es]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ee,ce,se]}],"hue-rotate":[{"hue-rotate":[Ee,ce,se]}],invert:[{invert:["",Ee,ce,se]}],saturate:[{saturate:[Ee,ce,se]}],sepia:[{sepia:["",Ee,ce,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,se]}],"backdrop-blur":[{"backdrop-blur":$t()}],"backdrop-brightness":[{"backdrop-brightness":[Ee,ce,se]}],"backdrop-contrast":[{"backdrop-contrast":[Ee,ce,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ee,ce,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ee,ce,se]}],"backdrop-invert":[{"backdrop-invert":["",Ee,ce,se]}],"backdrop-opacity":[{"backdrop-opacity":[Ee,ce,se]}],"backdrop-saturate":[{"backdrop-saturate":[Ee,ce,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ee,ce,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ee,"initial",ce,se]}],ease:[{ease:["linear","initial",A,ce,se]}],delay:[{delay:[Ee,ce,se]}],animate:[{animate:["none",_,ce,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ce,se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:Lt()}],"scale-x":[{"scale-x":Lt()}],"scale-y":[{"scale-y":Lt()}],"scale-z":[{"scale-z":Lt()}],"scale-3d":["scale-3d"],skew:[{skew:on()}],"skew-x":[{"skew-x":on()}],"skew-y":[{"skew-y":on()}],transform:[{transform:[ce,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ft()}],"translate-x":[{"translate-x":ft()}],"translate-y":[{"translate-y":ft()}],"translate-z":[{"translate-z":ft()}],"translate-none":["translate-none"],zoom:[{zoom:[Tn,ce,se]}],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"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",ce,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ee()}],"scrollbar-track-color":[{"scrollbar-track":ee()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",ce,se]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ee,gl,ua,fx]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},eN=R2(J2);function Ot(...t){return eN(Mv(t))}const tN=jv("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Le({className:t,variant:a="default",asChild:l=!1,...o}){const s=l?Ev:"span";return m.jsx(s,{"data-slot":"badge","data-variant":a,className:Ot(tN({variant:a}),t),...o})}function Ye(t,a,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t==null||t(s),l===!1||!s||!s.defaultPrevented)return a==null?void 0:a(s)}}function Rl(t,a=[]){let l=[];function o(c,d){const f=N.createContext(d);f.displayName=c+"Context";const p=l.length;l=[...l,d];const g=v=>{var A;const{scope:w,children:y,...S}=v,C=((A=w==null?void 0:w[t])==null?void 0:A[p])||f,j=N.useMemo(()=>S,Object.values(S));return m.jsx(C.Provider,{value:j,children:y})};g.displayName=c+"Provider";function x(v,w,y={}){var A;const{optional:S=!1}=y,C=((A=w==null?void 0:w[t])==null?void 0:A[p])||f,j=N.useContext(C);if(j)return j;if(d!==void 0)return d;if(!S)throw new Error(`\`${v}\` must be used within \`${c}\``)}return[g,x]}const s=()=>{const c=l.map(d=>N.createContext(d));return function(f){const p=(f==null?void 0:f[t])||c;return N.useMemo(()=>({[`__scope${t}`]:{...f,[t]:p}}),[f,p])}};return s.scopeName=t,[o,nN(s,...a)]}function nN(...t){const a=t[0];if(t.length===1)return a;const l=()=>{const o=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const d=o.reduce((f,{useScope:p,scopeName:g})=>{const v=p(c)[`__scope${g}`];return{...f,...v}},{});return N.useMemo(()=>({[`__scope${a.scopeName}`]:d}),[d])}};return l.scopeName=a.scopeName,l}var kn=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},iN=Pd[" useInsertionEffect ".trim().toString()]||kn;function tf({prop:t,defaultProp:a,onChange:l=()=>{},caller:o}){const[s,c,d]=aN({defaultProp:a,onChange:l}),f=t!==void 0,p=f?t:s;{const x=N.useRef(t!==void 0);N.useEffect(()=>{const v=x.current;v!==f&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=f},[f,o])}const g=N.useCallback(x=>{var v;if(f){const w=oN(x)?x(t):x;w!==t&&((v=d.current)==null||v.call(d,w))}else c(x)},[f,t,c,d]);return[p,g]}function aN({defaultProp:t,onChange:a}){const[l,o]=N.useState(t),s=N.useRef(l),c=N.useRef(a);return iN(()=>{c.current=a},[a]),N.useEffect(()=>{var d;s.current!==l&&((d=c.current)==null||d.call(c,l),s.current=l)},[l,s]),[l,o,c]}function oN(t){return typeof t=="function"}const lN=["top","right","bottom","left"],Bi=Math.min,ii=Math.max,ws=Math.round,ns=Math.floor,ai=t=>({x:t,y:t}),rN={left:"right",right:"left",bottom:"top",top:"bottom"};function Gv(t,a,l){return ii(t,Bi(a,l))}function li(t,a){return typeof t=="function"?t(a):t}function Hi(t){return t.split("-")[0]}function vo(t){return t.split("-")[1]}function nf(t){return t==="x"?"y":"x"}function af(t){return t==="y"?"height":"width"}function On(t){const a=t[0];return a==="t"||a==="b"?"y":"x"}function of(t){return nf(On(t))}function sN(t,a,l){l===void 0&&(l=!1);const o=vo(t),s=of(t),c=af(s);let d=s==="x"?o===(l?"end":"start")?"right":"left":o==="start"?"bottom":"top";return a.reference[c]>a.floating[c]&&(d=Ss(d)),[d,Ss(d)]}function cN(t){const a=Ss(t);return[$d(t),a,$d(a)]}function $d(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const px=["left","right"],gx=["right","left"],uN=["top","bottom"],dN=["bottom","top"];function fN(t,a,l){switch(t){case"top":case"bottom":return l?a?gx:px:a?px:gx;case"left":case"right":return a?uN:dN;default:return[]}}function hN(t,a,l,o){const s=vo(t);let c=fN(Hi(t),l==="start",o);return s&&(c=c.map(d=>d+"-"+s),a&&(c=c.concat(c.map($d)))),c}function Ss(t){const a=Hi(t);return rN[a]+t.slice(a.length)}function mN(t){var a,l,o,s;return{top:(a=t.top)!=null?a:0,right:(l=t.right)!=null?l:0,bottom:(o=t.bottom)!=null?o:0,left:(s=t.left)!=null?s:0}}function Vv(t){return typeof t!="number"?mN(t):{top:t,right:t,bottom:t,left:t}}function Ns(t){const{x:a,y:l,width:o,height:s}=t;return{width:o,height:s,top:l,left:a,right:a+o,bottom:l+s,x:a,y:l}}function xx(t,a,l){let{reference:o,floating:s}=t;const c=On(a),d=of(a),f=af(d),p=Hi(a),g=c==="y",x=o.x+o.width/2-s.width/2,v=o.y+o.height/2-s.height/2,w=o[f]/2-s[f]/2;let y;switch(p){case"top":y={x,y:o.y-s.height};break;case"bottom":y={x,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:v};break;case"left":y={x:o.x-s.width,y:v};break;default:y={x:o.x,y:o.y}}const S=vo(a);return S&&(y[d]+=w*(S==="end"?1:-1)*(l&&g?-1:1)),y}async function pN(t,a){var l;a===void 0&&(a={});const{x:o,y:s,platform:c,rects:d,elements:f,strategy:p}=t,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:v="floating",altBoundary:w=!1,padding:y=0}=li(a,t),S=Vv(y),j=f[w?v==="floating"?"reference":"floating":v],A=Ns(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(j)))==null||l?j:j.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:g,rootBoundary:x,strategy:p})),_=v==="floating"?{x:o,y:s,width:d.floating.width,height:d.floating.height}:d.reference,z=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),R=await(c.isElement==null?void 0:c.isElement(z))&&await(c.getScale==null?void 0:c.getScale(z))||{x:1,y:1},E=Ns(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:_,offsetParent:z,strategy:p}):_);return{top:(A.top-E.top+S.top)/R.y,bottom:(E.bottom-A.bottom+S.bottom)/R.y,left:(A.left-E.left+S.left)/R.x,right:(E.right-A.right+S.right)/R.x}}const gN=50,xN=async(t,a,l)=>{const{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:d}=l,f=d.detectOverflow?d:{...d,detectOverflow:pN},p=await(d.isRTL==null?void 0:d.isRTL(a));let g=await d.getElementRects({reference:t,floating:a,strategy:s}),{x,y:v}=xx(g,o,p),w=o,y=0;const S={};for(let C=0;C<c.length;C++){const j=c[C];if(!j)continue;const{name:A,fn:_}=j,{x:z,y:R,data:E,reset:T}=await _({x,y:v,initialPlacement:o,placement:w,strategy:s,middlewareData:S,rects:g,platform:f,elements:{reference:t,floating:a}});x=z??x,v=R??v,S[A]={...S[A],...E},T&&y<gN&&(y++,typeof T=="object"&&(T.placement&&(w=T.placement),T.rects&&(g=T.rects===!0?await d.getElementRects({reference:t,floating:a,strategy:s}):T.rects),{x,y:v}=xx(g,w,p)),C=-1)}return{x,y:v,placement:w,strategy:s,middlewareData:S}},vN=t=>({name:"arrow",options:t,async fn(a){const{x:l,y:o,placement:s,rects:c,platform:d,elements:f,middlewareData:p}=a,{element:g,padding:x=0}=li(t,a)||{};if(g==null)return{};const v=Vv(x),w={x:l,y:o},y=of(s),S=af(y),C=await d.getDimensions(g),j=y==="y",A=j?"top":"left",_=j?"bottom":"right",z=j?"clientHeight":"clientWidth",R=c.reference[S]+c.reference[y]-w[y]-c.floating[S],E=w[y]-c.reference[y],T=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let D=T?T[z]:0;(!D||!await(d.isElement==null?void 0:d.isElement(T)))&&(D=f.floating[z]||c.floating[S]);const k=R/2-E/2,V=D/2-C[S]/2-1,te=Bi(v[A],V),J=Bi(v[_],V),q=D-C[S]-J,ne=D/2-C[S]/2+k,ae=Gv(te,ne,q),oe=!p.arrow&&vo(s)!=null&&ne!==ae&&c.reference[S]/2-(ne<te?te:J)-C[S]/2<0,U=oe?ne<te?ne-te:ne-q:0;return{[y]:w[y]+U,data:{[y]:ae,centerOffset:ne-ae-U,...oe&&{alignmentOffset:U}},reset:oe}}}),bN=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(a){var l,o;const{placement:s,middlewareData:c,rects:d,initialPlacement:f,platform:p,elements:g}=a,{mainAxis:x=!0,crossAxis:v=!0,fallbackPlacements:w,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...j}=li(t,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const A=Hi(s),_=On(f),z=Hi(f)===f,R=await(p.isRTL==null?void 0:p.isRTL(g.floating)),E=w||(z||!C?[Ss(f)]:cN(f)),T=S!=="none";!w&&T&&E.push(...hN(f,C,S,R));const D=[f,...E],k=await p.detectOverflow(a,j),V=[];let te=((o=c.flip)==null?void 0:o.overflows)||[];if(x&&V.push(k[A]),v){const ae=sN(s,d,R);V.push(k[ae[0]],k[ae[1]])}if(te=[...te,{placement:s,overflows:V}],!V.every(ae=>ae<=0)){var J,q;const ae=(((J=c.flip)==null?void 0:J.index)||0)+1,oe=D[ae];if(oe&&(!(v==="alignment"?_!==On(oe):!1)||te.every(K=>On(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:ae,overflows:te},reset:{placement:oe}};let U=(q=te.filter(Q=>Q.overflows[0]<=0).sort((Q,K)=>Q.overflows[1]-K.overflows[1])[0])==null?void 0:q.placement;if(!U)switch(y){case"bestFit":{var ne;const Q=(ne=te.filter(K=>{if(T){const de=On(K.placement);return de===_||de==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(de=>de>0).reduce((de,ee)=>de+ee,0)]).sort((K,de)=>K[1]-de[1])[0])==null?void 0:ne[0];Q&&(U=Q);break}case"initialPlacement":U=f;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function vx(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function bx(t){return lN.some(a=>t[a]>=0)}const yN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(a){const{rects:l,platform:o}=a,{strategy:s="referenceHidden",...c}=li(t,a);switch(s){case"referenceHidden":{const d=await o.detectOverflow(a,{...c,elementContext:"reference"}),f=vx(d,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:bx(f)}}}case"escaped":{const d=await o.detectOverflow(a,{...c,altBoundary:!0}),f=vx(d,l.floating);return{data:{escapedOffsets:f,escaped:bx(f)}}}default:return{}}}}},Xv=new Set(["left","top"]);async function wN(t,a){const{placement:l,platform:o,elements:s}=t,c=await(o.isRTL==null?void 0:o.isRTL(s.floating)),d=Hi(l),f=vo(l),p=On(l)==="y",g=Xv.has(d)?-1:1,x=c&&p?-1:1,v=li(a,t);let{mainAxis:w,crossAxis:y,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof S=="number"&&(y=f==="end"?S*-1:S),p?{x:y*x,y:w*g}:{x:w*g,y:y*x}}const SN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(a){var l,o;const{x:s,y:c,placement:d,middlewareData:f}=a,p=await wN(a,t);return d===((l=f.offset)==null?void 0:l.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:s+p.x,y:c+p.y,data:{...p,placement:d}}}}},NN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(a){const{x:l,y:o,placement:s,platform:c}=a,{mainAxis:d=!0,crossAxis:f=!1,limiter:p={fn:_=>{let{x:z,y:R}=_;return{x:z,y:R}}},...g}=li(t,a),x={x:l,y:o},v=await c.detectOverflow(a,g),w=On(s),y=nf(w);let S=x[y],C=x[w];const j=(_,z)=>Gv(z+v[_==="y"?"top":"left"],z,z-v[_==="y"?"bottom":"right"]);d&&(S=j(y,S)),f&&(C=j(w,C));const A=p.fn({...a,[y]:S,[w]:C});return{...A,data:{x:A.x-l,y:A.y-o,enabled:{[y]:d,[w]:f}}}}}},CN=function(t){return t===void 0&&(t={}),{options:t,fn(a){var l,o;const{x:s,y:c,placement:d,rects:f,middlewareData:p}=a,{offset:g=0,mainAxis:x=!0,crossAxis:v=!0}=li(t,a),w={x:s,y:c},y=On(d),S=nf(y);let C=w[S],j=w[y];const A=li(g,a),_=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(l=A.mainAxis)!=null?l:0,crossAxis:(o=A.crossAxis)!=null?o:0};if(x){const E=S==="y"?"height":"width",T=f.reference[S]-f.floating[E]+_.mainAxis,D=f.reference[S]+f.reference[E]-_.mainAxis;C<T?C=T:C>D&&(C=D)}if(v){var z,R;const E=S==="y"?"width":"height",T=Xv.has(Hi(d)),D=f.reference[y]-f.floating[E]+(T&&((z=p.offset)==null?void 0:z[y])||0)+(T?0:_.crossAxis),k=f.reference[y]+f.reference[E]+(T?0:((R=p.offset)==null?void 0:R[y])||0)-(T?_.crossAxis:0);j<D?j=D:j>k&&(j=k)}return{[S]:C,[y]:j}}}},MN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(a){const{placement:l,rects:o,platform:s,elements:c}=a,{apply:d=()=>{},...f}=li(t,a),p=await s.detectOverflow(a,f),g=Hi(l),x=vo(l),v=On(l)==="y",{width:w,height:y}=o.floating;let S,C;g==="top"||g==="bottom"?(S=g,C=x===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(C=g,S=x==="end"?"top":"bottom");const j=y-p.top-p.bottom,A=w-p.left-p.right,_=Bi(y-p[S],j),z=Bi(w-p[C],A),R=a.middlewareData.shift,E=!R;let T=_,D=z;R!=null&&R.enabled.x&&(D=A),R!=null&&R.enabled.y&&(T=j),E&&!x&&(v?D=w-2*ii(p.left,p.right):T=y-2*ii(p.top,p.bottom)),await d({...a,availableWidth:D,availableHeight:T});const k=await s.getDimensions(c.floating);return w!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function Os(){return typeof window<"u"}function bo(t){return qv(t)?(t.nodeName||"").toLowerCase():"#document"}function qt(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function ri(t){var a;return(a=(qv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function qv(t){return Os()?t instanceof Node||t instanceof qt(t).Node:!1}function _n(t){return Os()?t instanceof Element||t instanceof qt(t).Element:!1}function Ii(t){return Os()?t instanceof HTMLElement||t instanceof qt(t).HTMLElement:!1}function yx(t){return!Os()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof qt(t).ShadowRoot}function ks(t){const{overflow:a,overflowX:l,overflowY:o,display:s}=Dn(t);return/auto|scroll|overlay|hidden|clip/.test(a+o+l)&&s!=="inline"&&s!=="contents"}function jN(t){return/^(table|td|th)$/.test(bo(t))}function _s(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const EN=/transform|translate|scale|rotate|perspective|filter/,AN=/paint|layout|strict|content/,da=t=>!!t&&t!=="none";let gd;function lf(t){const a=_n(t)?Dn(t):t;return da(a.transform)||da(a.translate)||da(a.scale)||da(a.rotate)||da(a.perspective)||!rf()&&(da(a.backdropFilter)||da(a.filter))||EN.test(a.willChange||"")||AN.test(a.contain||"")}function TN(t){let a=pa(t);for(;Ii(a)&&!jl(a);){if(lf(a))return a;if(_s(a))return null;a=pa(a)}return null}function rf(){return gd==null&&(gd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gd}function jl(t){return/^(html|body|#document)$/.test(bo(t))}function Dn(t){return qt(t).getComputedStyle(t)}function Ds(t){return _n(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pa(t){if(bo(t)==="html")return t;const a=t.assignedSlot||t.parentNode||yx(t)&&t.host||ri(t);return yx(a)?a.host:a}function Pv(t){const a=pa(t);return jl(a)?(t.ownerDocument||t).body:Ii(a)&&ks(a)?a:Pv(a)}function El(t,a,l){var o;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Pv(t),c=s===((o=t.ownerDocument)==null?void 0:o.body),d=qt(s);if(c){const f=Ld(d);return a.concat(d,d.visualViewport||[],ks(s)?s:[],f&&l?El(f):[])}else return a.concat(s,El(s,[],l))}function Ld(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qv(t){const a=Dn(t);let l=parseFloat(a.width)||0,o=parseFloat(a.height)||0;const s=Ii(t),c=s?t.offsetWidth:l,d=s?t.offsetHeight:o,f=ws(l)!==c||ws(o)!==d;return f&&(l=c,o=d),{width:l,height:o,$:f}}function sf(t){return _n(t)?t:t.contextElement}function fo(t){const a=sf(t);if(!Ii(a))return ai(1);const l=a.getBoundingClientRect(),{width:o,height:s,$:c}=Qv(a);let d=(c?ws(l.width):l.width)/o,f=(c?ws(l.height):l.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const zN=ai(0);function Zv(t){const a=qt(t);return!rf()||!a.visualViewport?zN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function RN(t,a,l){return a===void 0&&(a=!1),!!l&&a&&l===qt(t)}function ga(t,a,l,o){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=sf(t);let d=ai(1);a&&(o?_n(o)&&(d=fo(o)):d=fo(t));const f=RN(c,l,o)?Zv(c):ai(0);let p=(s.left+f.x)/d.x,g=(s.top+f.y)/d.y,x=s.width/d.x,v=s.height/d.y;if(c&&o){const w=qt(c),y=_n(o)?qt(o):o;let S=w,C=Ld(S);for(;C&&y!==S;){const j=fo(C),A=C.getBoundingClientRect(),_=Dn(C),z=A.left+(C.clientLeft+parseFloat(_.paddingLeft))*j.x,R=A.top+(C.clientTop+parseFloat(_.paddingTop))*j.y;p*=j.x,g*=j.y,x*=j.x,v*=j.y,p+=z,g+=R,S=qt(C),C=Ld(S)}}return Ns({width:x,height:v,x:p,y:g})}function $s(t,a){const l=Ds(t).scrollLeft;return a?a.left+l:ga(ri(t)).left+l}function Fv(t,a){const l=t.getBoundingClientRect(),o=l.left+a.scrollLeft-$s(t,l),s=l.top+a.scrollTop;return{x:o,y:s}}function ON(t){let{elements:a,rect:l,offsetParent:o,strategy:s}=t;const c=s==="fixed",d=ri(o),f=a?_s(a.floating):!1;if(o===d||f&&c)return l;let p={scrollLeft:0,scrollTop:0},g=ai(1);const x=ai(0),v=Ii(o);if((v||!c)&&((bo(o)!=="body"||ks(d))&&(p=Ds(o)),v)){const y=ga(o);g=fo(o),x.x=y.x+o.clientLeft,x.y=y.y+o.clientTop}const w=d&&!v&&!c?Fv(d,p):ai(0);return{width:l.width*g.x,height:l.height*g.y,x:l.x*g.x-p.scrollLeft*g.x+x.x+w.x,y:l.y*g.y-p.scrollTop*g.y+x.y+w.y}}function kN(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function _N(t){const a=Ds(t),l=t.ownerDocument.body,o=ii(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=ii(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let c=-a.scrollLeft+$s(t);const d=-a.scrollTop;return Dn(l).direction==="rtl"&&(c+=ii(t.clientWidth,l.clientWidth)-o),{width:o,height:s,x:c,y:d}}const DN=25;function $N(t,a,l){l===void 0&&(l="viewport");const o=l==="layoutViewport",s=qt(t),c=ri(t),d=s.visualViewport;let f=c.clientWidth,p=c.clientHeight,g=0,x=0;if(d){const w=!rf()||a==="fixed";o?w||(g=-d.offsetLeft,x=-d.offsetTop):(f=d.width,p=d.height,w&&(g=d.offsetLeft,x=d.offsetTop))}if($s(c)<=0){const w=c.ownerDocument,y=w.body,S=getComputedStyle(y),C=w.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,j=Math.abs(c.clientWidth-y.clientWidth-C),A=getComputedStyle(c).scrollbarGutter==="stable both-edges"?j/2:j;A<=DN&&(f-=A)}return{width:f,height:p,x:g,y:x}}function LN(t,a){const l=ga(t,!0,a==="fixed"),o=l.top+t.clientTop,s=l.left+t.clientLeft,c=fo(t),d=t.clientWidth*c.x,f=t.clientHeight*c.y,p=s*c.x,g=o*c.y;return{width:d,height:f,x:p,y:g}}function wx(t,a,l){let o;if(a==="viewport"||a==="layoutViewport")o=$N(t,l,a);else if(a==="document")o=_N(ri(t));else if(_n(a))o=LN(a,l);else{const s=Zv(t);o={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Ns(o)}function UN(t,a){const l=a.get(t);if(l)return l;let o=El(t,[],!1).filter(f=>_n(f)&&bo(f)!=="body"),s=null;const c=Dn(t).position==="fixed";let d=c?pa(t):t;for(;_n(d)&&!jl(d);){const f=Dn(d),p=lf(d),g=s?s.position:c?"fixed":"";!p&&(g==="fixed"||g==="absolute"&&f.position==="static")?o=o.filter(v=>v!==d):s=f,d=pa(d)}return a.set(t,o),o}function BN(t){let{element:a,boundary:l,rootBoundary:o,strategy:s}=t;const d=[...l==="clippingAncestors"?_s(a)?[]:UN(a,this._c):[].concat(l),o],f=wx(a,d[0],s);let p=f.top,g=f.right,x=f.bottom,v=f.left;for(let w=1;w<d.length;w++){const y=wx(a,d[w],s);p=ii(y.top,p),g=Bi(y.right,g),x=Bi(y.bottom,x),v=ii(y.left,v)}return{width:g-v,height:x-p,x:v,y:p}}function HN(t){const{width:a,height:l}=Qv(t);return{width:a,height:l}}function YN(t,a,l){const o=Ii(a),s=ri(a),c=l==="fixed",d=ga(t,!0,c,a);let f={scrollLeft:0,scrollTop:0};const p=ai(0);if((o||!c)&&((bo(a)!=="body"||ks(s))&&(f=Ds(a)),o)){const w=ga(a,!0,c,a);p.x=w.x+a.clientLeft,p.y=w.y+a.clientTop}!o&&s&&(p.x=$s(s));const g=s&&!o&&!c?Fv(s,f):ai(0),x=d.left+f.scrollLeft-p.x-g.x,v=d.top+f.scrollTop-p.y-g.y;return{x,y:v,width:d.width,height:d.height}}function xd(t){return Dn(t).position==="static"}function Sx(t,a){if(!Ii(t)||Dn(t).position==="fixed")return null;if(a)return a(t);let l=t.offsetParent;return ri(t)===l&&(l=l.ownerDocument.body),l}function Wv(t,a){const l=qt(t);if(_s(t))return l;if(!Ii(t)){let s=pa(t);for(;s&&!jl(s);){if(_n(s)&&!xd(s))return s;s=pa(s)}return l}let o=Sx(t,a);for(;o&&jN(o)&&xd(o);)o=Sx(o,a);return o&&jl(o)&&xd(o)&&!lf(o)?l:o||TN(t)||l}const IN=async function(t){const a=this.getOffsetParent||Wv,l=this.getDimensions,o=await l(t.floating);return{reference:YN(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function GN(t){return Dn(t).direction==="rtl"}const VN={convertOffsetParentRelativeRectToViewportRelativeRect:ON,getDocumentElement:ri,getClippingRect:BN,getOffsetParent:Wv,getElementRects:IN,getClientRects:kN,getDimensions:HN,getScale:fo,isElement:_n,isRTL:GN};function Kv(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height}function XN(t,a,l){let o=null,s;const c=ri(t);function d(){var x;clearTimeout(s),(x=o)==null||x.disconnect(),o=null}function f(x,v){x===void 0&&(x=!1),v===void 0&&(v=1),d();const w=t.getBoundingClientRect(),{left:y,top:S,width:C,height:j}=w;if(x||a(),!C||!j)return;const A=ns(S),_=ns(c.clientWidth-(y+C)),z=ns(c.clientHeight-(S+j)),R=ns(y),T={rootMargin:-A+"px "+-_+"px "+-z+"px "+-R+"px",threshold:ii(0,Bi(1,v))||1};let D=!0;function k(V){const te=V[0].intersectionRatio;if(!Kv(w,t.getBoundingClientRect()))return f();if(te!==v){if(!D)return f();te?f(!1,te):s=setTimeout(()=>{f(!1,1e-7)},1e3)}D=!1}try{o=new IntersectionObserver(k,{...T,root:c.ownerDocument})}catch{o=new IntersectionObserver(k,T)}o.observe(t)}const p=qt(t),g=()=>f(l);return p.addEventListener("resize",g),f(!0),()=>{p.removeEventListener("resize",g),d()}}function qN(t,a,l,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,g=sf(t),x=s||c?[...g?El(g):[],...a?El(a):[]]:[];x.forEach(A=>{s&&A.addEventListener("scroll",l),c&&A.addEventListener("resize",l)});const v=g&&f?XN(g,l,c):null;let w=-1,y=null;d&&(y=new ResizeObserver(A=>{let[_]=A;_&&_.target===g&&y&&a&&(y.unobserve(a),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var z;(z=y)==null||z.observe(a)})),l()}),g&&!p&&y.observe(g),a&&y.observe(a));let S,C=p?ga(t):null;p&&j();function j(){const A=ga(t);C&&!Kv(C,A)&&l(),C=A,S=requestAnimationFrame(j)}return l(),()=>{var A;x.forEach(_=>{s&&_.removeEventListener("scroll",l),c&&_.removeEventListener("resize",l)}),v==null||v(),(A=y)==null||A.disconnect(),y=null,p&&cancelAnimationFrame(S)}}const PN=SN,QN=NN,ZN=bN,FN=MN,WN=yN,Nx=vN,KN=CN,JN=(t,a,l)=>{const o=new Map,s=l??{},c={...VN,...s.platform,_c:o};return xN(t,a,{...s,platform:c})};var cf=nv(),eC=typeof document<"u",tC=function(){},hs=eC?N.useLayoutEffect:tC;function Cs(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(typeof t=="function"&&t.toString()===a.toString())return!0;let l,o,s;if(t&&a&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==a.length)return!1;for(o=l;o--!==0;)if(!Cs(t[o],a[o]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(a).length)return!1;for(o=l;o--!==0;)if(!{}.hasOwnProperty.call(a,s[o]))return!1;for(o=l;o--!==0;){const c=s[o];if(!(c==="_owner"&&t.$$typeof)&&!Cs(t[c],a[c]))return!1}return!0}return t!==t&&a!==a}function Jv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Cx(t,a){const l=Jv(t);return Math.round(a*l)/l}function vd(t){const a=N.useRef(t);return hs(()=>{a.current=t}),a}function nC(t){t===void 0&&(t={});const{placement:a="bottom",strategy:l="absolute",middleware:o=[],platform:s,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:p,open:g}=t,[x,v]=N.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[w,y]=N.useState(o);Cs(w,o)||y(o);const[S,C]=N.useState(null),[j,A]=N.useState(null),_=N.useCallback(K=>{K!==T.current&&(T.current=K,C(K))},[]),z=N.useCallback(K=>{K!==D.current&&(D.current=K,A(K))},[]),R=c||S,E=d||j,T=N.useRef(null),D=N.useRef(null),k=N.useRef(x),V=p!=null,te=vd(p),J=vd(s),q=vd(g),ne=N.useCallback(()=>{if(!T.current||!D.current)return;const K={placement:a,strategy:l,middleware:w};J.current&&(K.platform=J.current),JN(T.current,D.current,K).then(de=>{const ee={...de,isPositioned:q.current!==!1};ae.current&&!Cs(k.current,ee)&&(k.current=ee,cf.flushSync(()=>{v(ee)}))})},[w,a,l,J,q]);hs(()=>{g===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[g]);const ae=N.useRef(!1);hs(()=>(ae.current=!0,()=>{ae.current=!1}),[]),hs(()=>{if(R&&(T.current=R),E&&(D.current=E),R&&E){if(te.current)return te.current(R,E,ne);ne()}},[R,E,ne,te,V]);const oe=N.useMemo(()=>({reference:T,floating:D,setReference:_,setFloating:z}),[_,z]),U=N.useMemo(()=>({reference:R,floating:E}),[R,E]),Q=N.useMemo(()=>{const K={position:l,left:0,top:0};if(!U.floating)return K;const de=Cx(U.floating,x.x),ee=Cx(U.floating,x.y);return f?{...K,transform:"translate("+de+"px, "+ee+"px)",...Jv(U.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:de,top:ee}},[l,f,U.floating,x.x,x.y]);return N.useMemo(()=>({...x,update:ne,refs:oe,elements:U,floatingStyles:Q}),[x,ne,oe,U,Q])}const iC=t=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:t,fn(l){const{element:o,padding:s}=typeof t=="function"?t(l):t;return o&&a(o)?o.current!=null?Nx({element:o.current,padding:s}).fn(l):{}:o?Nx({element:o,padding:s}).fn(l):{}}}},aC=(t,a)=>{const l=PN(t);return{name:l.name,fn:l.fn,options:[t,a]}},oC=(t,a)=>{const l=QN(t);return{name:l.name,fn:l.fn,options:[t,a]}},lC=(t,a)=>({fn:KN(t).fn,options:[t,a]}),rC=(t,a)=>{const l=ZN(t);return{name:l.name,fn:l.fn,options:[t,a]}},sC=(t,a)=>{const l=FN(t);return{name:l.name,fn:l.fn,options:[t,a]}},cC=(t,a)=>{const l=WN(t);return{name:l.name,fn:l.fn,options:[t,a]}},uC=(t,a)=>{const l=iC(t);return{name:l.name,fn:l.fn,options:[t,a]}};var dC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],St=dC.reduce((t,a)=>{const l=Kd(`Primitive.${a}`),o=N.forwardRef((s,c)=>{const{asChild:d,...f}=s,p=d?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(p,{...f,ref:c})});return o.displayName=`Primitive.${a}`,{...t,[a]:o}},{});function fC(t,a){t&&cf.flushSync(()=>t.dispatchEvent(a))}var hC="Arrow",eb=N.forwardRef((t,a)=>{const{children:l,width:o=10,height:s=5,...c}=t;return m.jsx(St.svg,{...c,ref:a,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?l:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});eb.displayName=hC;var mC=eb;function an(t){const a=N.useRef(t);return N.useEffect(()=>{a.current=t}),N.useMemo(()=>((...l)=>{var o;return(o=a.current)==null?void 0:o.call(a,...l)}),[])}function pC(t){const[a,l]=N.useState(void 0);return kn(()=>{if(t){l({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let d,f;if("borderBoxSize"in c){const p=c.borderBoxSize,g=Array.isArray(p)?p[0]:p;d=g.inlineSize,f=g.blockSize}else d=t.offsetWidth,f=t.offsetHeight;l({width:d,height:f})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else l(void 0)},[t]),a}var uf="Popper",[tb,yo]=Rl(uf),[gC,nb]=tb(uf),ib=t=>{const{__scopePopper:a,children:l}=t,[o,s]=N.useState(null),[c,d]=N.useState(void 0);return m.jsx(gC,{scope:a,anchor:o,onAnchorChange:s,placementState:c,setPlacementState:d,children:l})};ib.displayName=uf;var ab="PopperAnchor",ob=N.forwardRef((t,a)=>{const{__scopePopper:l,virtualRef:o,...s}=t,c=nb(ab,l),d=N.useRef(null),f=c.onAnchorChange,p=N.useCallback(S=>{d.current=S,S&&f(S)},[f]),g=Tt(a,p),x=N.useRef(null);N.useEffect(()=>{if(!o)return;const S=x.current;x.current=o.current,S!==x.current&&f(x.current)});const v=c.placementState&&ff(c.placementState),w=v==null?void 0:v[0],y=v==null?void 0:v[1];return o?null:m.jsx(St.div,{"data-radix-popper-side":w,"data-radix-popper-align":y,...s,ref:g})});ob.displayName=ab;var df="PopperContent",[xC,vC]=tb(df),lb=N.forwardRef((t,a)=>{var et,ye,$t,kt,Lt,on;const{__scopePopper:l,side:o="bottom",sideOffset:s=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:v="partial",hideWhenDetached:w=!1,updatePositionStrategy:y="optimized",onPlaced:S,...C}=t,j=nb(df,l),[A,_]=N.useState(null),z=Tt(a,_),[R,E]=N.useState(null),T=pC(R),D=(T==null?void 0:T.width)??0,k=(T==null?void 0:T.height)??0,V=o+(c!=="center"?"-"+c:""),te=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},J=Array.isArray(g)?g:[g],q=J.length>0,ne={padding:te,boundary:J.filter(yC),altBoundary:q},{refs:ae,floatingStyles:oe,placement:U,isPositioned:Q,middlewareData:K}=nC({strategy:"fixed",placement:V,whileElementsMounted:(...ft)=>qN(...ft,{animationFrame:y==="always"}),elements:{reference:j.anchor},middleware:[aC({mainAxis:s+k,alignmentAxis:d}),p&&oC({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?lC():void 0,...ne}),p&&rC({...ne}),sC({...ne,apply:({elements:ft,rects:ve,availableWidth:De,availableHeight:we})=>{const{width:Se,height:Ae}=ve.reference,me=ft.floating.style;me.setProperty("--radix-popper-available-width",`${De}px`),me.setProperty("--radix-popper-available-height",`${we}px`),me.setProperty("--radix-popper-anchor-width",`${Se}px`),me.setProperty("--radix-popper-anchor-height",`${Ae}px`)}}),R&&uC({element:R,padding:f}),wC({arrowWidth:D,arrowHeight:k}),w&&cC({strategy:"referenceHidden",...ne,boundary:q?ne.boundary:void 0})]}),de=j.setPlacementState;kn(()=>(de(U),()=>{de(void 0)}),[U,de]);const[ee,$]=ff(U),Z=an(S);kn(()=>{Q&&(Z==null||Z())},[Q,Z]);const ie=(et=K.arrow)==null?void 0:et.x,re=(ye=K.arrow)==null?void 0:ye.y,fe=(($t=K.arrow)==null?void 0:$t.centerOffset)!==0,[pe,je]=N.useState();return kn(()=>{A&&je(window.getComputedStyle(A).zIndex)},[A]),m.jsx("div",{ref:ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:Q?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(kt=K.transformOrigin)==null?void 0:kt.x,(Lt=K.transformOrigin)==null?void 0:Lt.y].join(" "),...((on=K.hide)==null?void 0:on.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m.jsx(xC,{scope:l,placedSide:ee,placedAlign:$,onArrowChange:E,arrowX:ie,arrowY:re,shouldHideArrow:fe,children:m.jsx(St.div,{"data-side":ee,"data-align":$,...C,ref:z,style:{...C.style,animation:Q?void 0:"none"}})})})});lb.displayName=df;var rb="PopperArrow",bC={top:"bottom",right:"left",bottom:"top",left:"right"},sb=N.forwardRef(function(a,l){const{__scopePopper:o,...s}=a,c=vC(rb,o),d=bC[c.placedSide];return m.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:m.jsx(mC,{...s,ref:l,style:{...s.style,display:"block"}})})});sb.displayName=rb;function yC(t){return t!==null}var wC=t=>({name:"transformOrigin",options:t,fn(a){var j,A,_;const{placement:l,rects:o,middlewareData:s}=a,d=((j=s.arrow)==null?void 0:j.centerOffset)!==0,f=d?0:t.arrowWidth,p=d?0:t.arrowHeight,[g,x]=ff(l),v={start:"0%",center:"50%",end:"100%"}[x],w=(((A=s.arrow)==null?void 0:A.x)??0)+f/2,y=(((_=s.arrow)==null?void 0:_.y)??0)+p/2;let S="",C="";return g==="bottom"?(S=d?v:`${w}px`,C=`${-p}px`):g==="top"?(S=d?v:`${w}px`,C=`${o.floating.height+p}px`):g==="right"?(S=`${-p}px`,C=d?v:`${y}px`):g==="left"&&(S=`${o.floating.width+p}px`,C=d?v:`${y}px`),{data:{x:S,y:C}}}});function ff(t){const[a,l="center"]=t.split("-");return[a,l]}var hf=ib,Ls=ob,mf=lb,pf=sb,SC="Portal",Us=N.forwardRef((t,a)=>{var f;const{container:l,...o}=t,[s,c]=N.useState(!1);kn(()=>c(!0),[]);const d=l||s&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return d?cf.createPortal(m.jsx(St.div,{...o,ref:a}),d):null});Us.displayName=SC;function NC(t,a){return N.useReducer((l,o)=>a[l][o]??l,t)}var wn=t=>{const{present:a,children:l}=t,o=CC(a),s=typeof l=="function"?l({present:o.isPresent}):N.Children.only(l),c=MC(o.ref,jC(s));return typeof l=="function"||o.isPresent?N.cloneElement(s,{ref:c}):null};wn.displayName="Presence";function CC(t){const[a,l]=N.useState(),o=N.useRef(null),s=N.useRef(t),c=N.useRef("none"),d=N.useRef(void 0),f=t?"mounted":"unmounted",[p,g]=NC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{p==="mounted"?(c.current=d.current??xl(o.current),d.current=void 0):c.current="none"},[p]),kn(()=>{const x=o.current,v=s.current;if(v!==t){const y=c.current,S=xl(x);t?(d.current=S,g("MOUNT")):S==="none"||(x==null?void 0:x.display)==="none"?g("UNMOUNT"):g(v&&y!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),kn(()=>{if(a){let x;const v=a.ownerDocument.defaultView??window,w=S=>{const j=xl(o.current).includes(CSS.escape(S.animationName));if(S.target===a&&j&&(g("ANIMATION_END"),!s.current)){const A=a.style.animationFillMode;a.style.animationFillMode="forwards",x=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=A)})}},y=S=>{S.target===a&&(c.current=xl(o.current))};return a.addEventListener("animationstart",y),a.addEventListener("animationcancel",w),a.addEventListener("animationend",w),()=>{v.clearTimeout(x),a.removeEventListener("animationstart",y),a.removeEventListener("animationcancel",w),a.removeEventListener("animationend",w)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:N.useCallback(x=>{if(x){const v=getComputedStyle(x);o.current=v,d.current=xl(v)}else o.current=null;l(x)},[])}}function Mx(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function MC(...t){const a=N.useRef(t);return a.current=t,N.useCallback(l=>{const o=a.current;let s=!1;const c=o.map(d=>{const f=Mx(d,l);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d<c.length;d++){const f=c[d];typeof f=="function"?f():Mx(o[d],null)}}},[])}function xl(t){return(t==null?void 0:t.animationName)||"none"}function jC(t){var o,s;let a=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?t.ref:(a=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var EC="DismissableLayer",Ud="dismissableLayer.update",AC="dismissableLayer.pointerDownOutside",TC="dismissableLayer.focusOutside",jx,cb=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Bs=N.forwardRef((t,a)=>{const{disableOutsidePointerEvents:l=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,...g}=t,x=N.useContext(cb),[v,w]=N.useState(null),y=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=N.useState({}),C=Tt(a,w),j=Array.from(x.layers),[A]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),_=A?j.indexOf(A):-1,z=v?j.indexOf(v):-1,R=x.layersWithOutsidePointerEventsDisabled.size>0,E=z>=_,T=N.useRef(!1),D=kC(J=>{c==null||c(J),f==null||f(J),J.defaultPrevented||p==null||p()},{ownerDocument:y,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:x.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(J=>{if(!(J instanceof Node))return!1;const q=[...x.branches].some(ne=>ne.contains(J));return E&&!q},[x.branches,E])}),k=_C(J=>{if(o&&T.current)return;const q=J.target;[...x.branches].some(ae=>ae.contains(q))||(d==null||d(J),f==null||f(J),J.defaultPrevented||p==null||p())},y),V=v?z===j.length-1:!1,te=an(J=>{J.key==="Escape"&&(s==null||s(J),!J.defaultPrevented&&p&&(J.preventDefault(),p()))});return N.useEffect(()=>{if(V)return y.addEventListener("keydown",te,{capture:!0}),()=>y.removeEventListener("keydown",te,{capture:!0})},[y,V,te]),N.useEffect(()=>{if(v)return l&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(jx=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(v)),x.layers.add(v),Ex(),()=>{l&&(x.layersWithOutsidePointerEventsDisabled.delete(v),x.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=jx))}},[v,y,l,x]),N.useEffect(()=>()=>{v&&(x.layers.delete(v),x.layersWithOutsidePointerEventsDisabled.delete(v),Ex())},[v,x]),N.useEffect(()=>{const J=()=>S({});return document.addEventListener(Ud,J),()=>document.removeEventListener(Ud,J)},[]),m.jsx(St.div,{...g,ref:C,style:{pointerEvents:R?E?"auto":"none":void 0,...t.style},onFocusCapture:Ye(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Ye(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ye(t.onPointerDownCapture,D.onPointerDownCapture)})});Bs.displayName=EC;var zC="DismissableLayerBranch",RC=N.forwardRef((t,a)=>{const l=N.useContext(cb),o=N.useRef(null),s=Tt(a,o);return N.useEffect(()=>{const c=o.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),m.jsx(St.div,{...t,ref:s})});RC.displayName=zC;var OC=()=>!0;function kC(t,a){const{ownerDocument:l=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=OC}=a,f=an(t),p=N.useRef(!1),g=N.useRef(!1),x=N.useRef(new Map),v=N.useRef(()=>{});return N.useEffect(()=>{function w(){g.current=!1,s.current=!1,x.current.clear()}function y(){return Array.from(x.current.values()).some(Boolean)}function S(z){if(!g.current)return;const R=z.target;R instanceof Node&&[...c].some(T=>T.contains(R))||x.current.set(z.type,!0),z.type==="click"&&window.setTimeout(()=>{g.current&&v.current()},0)}function C(z){g.current&&x.current.set(z.type,!1)}const j=z=>{if(z.target&&!p.current){let R=function(){l.removeEventListener("click",v.current);const T=y();w(),T||ub(AC,f,E,{discrete:!0})};if(!d(z.target)){l.removeEventListener("click",v.current),w(),p.current=!1;return}const E={originalEvent:z};g.current=!0,s.current=o&&z.button===0,x.current.clear(),!o||z.button!==0?R():(l.removeEventListener("click",v.current),v.current=R,l.addEventListener("click",v.current,{once:!0}))}else l.removeEventListener("click",v.current),w();p.current=!1},A=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const z of A)l.addEventListener(z,S,!0),l.addEventListener(z,C);const _=window.setTimeout(()=>{l.addEventListener("pointerdown",j)},0);return()=>{window.clearTimeout(_),l.removeEventListener("pointerdown",j),l.removeEventListener("click",v.current);for(const z of A)l.removeEventListener(z,S,!0),l.removeEventListener(z,C)}},[l,f,o,s,c,d]),{onPointerDownCapture:()=>p.current=!0}}function _C(t,a=globalThis==null?void 0:globalThis.document){const l=an(t),o=N.useRef(!1);return N.useEffect(()=>{const s=c=>{c.target&&!o.current&&ub(TC,l,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,l]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ex(){const t=new CustomEvent(Ud);document.dispatchEvent(t)}function ub(t,a,l,{discrete:o}){const s=l.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});a&&s.addEventListener(t,a,{once:!0}),o?fC(s,c):s.dispatchEvent(c)}var bd,Hs="HoverCard",[db]=Rl(Hs,[yo]),Ys=yo(),[DC,Is]=db(Hs),fb=t=>{const{__scopeHoverCard:a,children:l,open:o,defaultOpen:s,onOpenChange:c,openDelay:d=700,closeDelay:f=300}=t,p=Ys(a),g=N.useRef(0),x=N.useRef(0),v=N.useRef(!1),w=N.useRef(!1),[y,S]=tf({prop:o,defaultProp:s??!1,onChange:c,caller:Hs}),C=N.useCallback(()=>{clearTimeout(x.current),g.current=window.setTimeout(()=>S(!0),d)},[d,S]),j=N.useCallback(()=>{clearTimeout(g.current),!v.current&&!w.current&&(x.current=window.setTimeout(()=>S(!1),f))},[f,S]),A=N.useCallback(()=>S(!1),[S]);return N.useEffect(()=>()=>{clearTimeout(g.current),clearTimeout(x.current)},[]),m.jsx(DC,{scope:a,open:y,onOpenChange:S,onOpen:C,onClose:j,onDismiss:A,hasSelectionRef:v,isPointerDownOnContentRef:w,children:m.jsx(hf,{...p,children:l})})};fb.displayName=Hs;var hb="HoverCardTrigger",mb=N.forwardRef((t,a)=>{const{__scopeHoverCard:l,...o}=t,s=Is(hb,l),c=Ys(l);return m.jsx(Ls,{asChild:!0,...c,children:m.jsx(St.a,{"data-state":s.open?"open":"closed",...o,ref:a,onPointerEnter:Ye(t.onPointerEnter,js(s.onOpen)),onPointerLeave:Ye(t.onPointerLeave,js(s.onClose)),onFocus:Ye(t.onFocus,s.onOpen),onBlur:Ye(t.onBlur,s.onClose),onTouchStart:Ye(t.onTouchStart,d=>d.preventDefault())})})});mb.displayName=hb;var gf="HoverCardPortal",[$C,LC]=db(gf,{forceMount:void 0}),pb=t=>{const{__scopeHoverCard:a,forceMount:l,children:o,container:s}=t,c=Is(gf,a);return m.jsx($C,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};pb.displayName=gf;var Ms="HoverCardContent",gb=N.forwardRef((t,a)=>{const l=LC(Ms,t.__scopeHoverCard),{forceMount:o=l.forceMount,...s}=t,c=Is(Ms,t.__scopeHoverCard);return m.jsx(wn,{present:o||c.open,children:m.jsx(UC,{"data-state":c.open?"open":"closed",...s,onPointerEnter:Ye(t.onPointerEnter,js(c.onOpen)),onPointerLeave:Ye(t.onPointerLeave,js(c.onClose)),ref:a})})});gb.displayName=Ms;var UC=N.forwardRef((t,a)=>{const{__scopeHoverCard:l,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...f}=t,p=Is(Ms,l),g=Ys(l),x=N.useRef(null),v=Tt(a,x),[w,y]=N.useState(!1);return N.useEffect(()=>{if(w){const S=document.body;return bd=S.style.userSelect||S.style.webkitUserSelect,S.style.userSelect="none",S.style.webkitUserSelect="none",()=>{S.style.userSelect=bd,S.style.webkitUserSelect=bd}}},[w]),N.useEffect(()=>{if(x.current){const S=()=>{y(!1),p.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var j;((j=document.getSelection())==null?void 0:j.toString())!==""&&(p.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",S),()=>{document.removeEventListener("pointerup",S),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!1}}},[p.isPointerDownOnContentRef,p.hasSelectionRef]),N.useEffect(()=>{x.current&&YC(x.current).forEach(C=>C.setAttribute("tabindex","-1"))}),m.jsx(Bs,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:d,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:Ye(c,S=>{S.preventDefault()}),onDismiss:p.onDismiss,children:m.jsx(mf,{...g,...f,onPointerDown:Ye(f.onPointerDown,S=>{S.currentTarget.contains(S.target)&&y(!0),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!0}),ref:v,style:{...f.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),BC="HoverCardArrow",HC=N.forwardRef((t,a)=>{const{__scopeHoverCard:l,...o}=t,s=Ys(l);return m.jsx(pf,{...s,...o,ref:a})});HC.displayName=BC;function js(t){return a=>a.pointerType==="touch"?void 0:t()}function YC(t){const a=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;l.nextNode();)a.push(l.currentNode);return a}var IC=fb,GC=mb,VC=pb,XC=gb;function xf({...t}){return m.jsx(IC,{"data-slot":"hover-card",...t})}function vf({...t}){return m.jsx(GC,{"data-slot":"hover-card-trigger",...t})}function bf({className:t,align:a="center",sideOffset:l=4,...o}){return m.jsx(VC,{"data-slot":"hover-card-portal",children:m.jsx(XC,{"data-slot":"hover-card-content",align:a,sideOffset:l,className:Ot("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...o})})}/**
55
+ * @license lucide-react v0.560.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */const qC=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),PC=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,o)=>o?o.toUpperCase():l.toLowerCase()),Ax=t=>{const a=PC(t);return a.charAt(0).toUpperCase()+a.slice(1)},xb=(...t)=>t.filter((a,l,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===l).join(" ").trim(),QC=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
60
+ * @license lucide-react v0.560.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */var ZC={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"};/**
65
+ * @license lucide-react v0.560.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const FC=N.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:d,...f},p)=>N.createElement("svg",{ref:p,...ZC,width:a,height:a,stroke:t,strokeWidth:o?Number(l)*24/Number(a):l,className:xb("lucide",s),...!c&&!QC(f)&&{"aria-hidden":"true"},...f},[...d.map(([g,x])=>N.createElement(g,x)),...Array.isArray(c)?c:[c]]));/**
70
+ * @license lucide-react v0.560.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const _e=(t,a)=>{const l=N.forwardRef(({className:o,...s},c)=>N.createElement(FC,{ref:c,iconNode:a,className:xb(`lucide-${qC(Ax(t))}`,`lucide-${t}`,o),...s}));return l.displayName=Ax(t),l};/**
75
+ * @license lucide-react v0.560.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const WC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],KC=_e("arrow-left",WC);/**
80
+ * @license lucide-react v0.560.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const JC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],eM=_e("arrow-right",JC);/**
85
+ * @license lucide-react v0.560.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const tM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nM=_e("check",tM);/**
90
+ * @license lucide-react v0.560.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const iM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Gs=_e("chevron-down",iM);/**
95
+ * @license lucide-react v0.560.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const aM=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wo=_e("chevron-right",aM);/**
100
+ * @license lucide-react v0.560.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const oM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lM=_e("circle",oM);/**
105
+ * @license lucide-react v0.560.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const rM=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],sM=_e("code",rM);/**
110
+ * @license lucide-react v0.560.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const cM=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],uM=_e("component",cM);/**
115
+ * @license lucide-react v0.560.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const dM=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],yd=_e("copy",dM);/**
120
+ * @license lucide-react v0.560.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const fM=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],hM=_e("diamond",fM);/**
125
+ * @license lucide-react v0.560.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const mM=[["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"}]],pM=_e("external-link",mM);/**
130
+ * @license lucide-react v0.560.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const gM=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xM=_e("eye-off",gM);/**
135
+ * @license lucide-react v0.560.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const vM=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vb=_e("eye",vM);/**
140
+ * @license lucide-react v0.560.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const bM=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yM=_e("file-text",bM);/**
145
+ * @license lucide-react v0.560.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const wM=[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]],SM=_e("frame",wM);/**
150
+ * @license lucide-react v0.560.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const NM=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],CM=_e("group",NM);/**
155
+ * @license lucide-react v0.560.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const MM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],bb=_e("image",MM);/**
160
+ * @license lucide-react v0.560.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const jM=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],yb=_e("layers",jM);/**
165
+ * @license lucide-react v0.560.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const EM=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Bd=_e("layout-grid",EM);/**
170
+ * @license lucide-react v0.560.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const AM=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],TM=_e("maximize",AM);/**
175
+ * @license lucide-react v0.560.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const zM=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],RM=_e("menu",zM);/**
180
+ * @license lucide-react v0.560.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const OM=[["path",{d:"M5 12h14",key:"1ays0h"}]],yf=_e("minus",OM);/**
185
+ * @license lucide-react v0.560.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const kM=[["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"}]],_M=_e("moon",kM);/**
190
+ * @license lucide-react v0.560.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const DM=[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]],$M=_e("move-horizontal",DM);/**
195
+ * @license lucide-react v0.560.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const LM=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],UM=_e("package",LM);/**
200
+ * @license lucide-react v0.560.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const BM=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],wb=_e("palette",BM);/**
205
+ * @license lucide-react v0.560.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const HM=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],YM=_e("pen-tool",HM);/**
210
+ * @license lucide-react v0.560.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const IM=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sb=_e("plus",IM);/**
215
+ * @license lucide-react v0.560.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const GM=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],VM=_e("rotate-ccw",GM);/**
220
+ * @license lucide-react v0.560.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const XM=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],qM=_e("ruler",XM);/**
225
+ * @license lucide-react v0.560.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const PM=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],QM=_e("search",PM);/**
230
+ * @license lucide-react v0.560.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const ZM=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],FM=_e("settings",ZM);/**
235
+ * @license lucide-react v0.560.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const WM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],KM=_e("square",WM);/**
240
+ * @license lucide-react v0.560.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const JM=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]],ej=_e("sun-medium",JM);/**
245
+ * @license lucide-react v0.560.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const tj=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],Nb=_e("type",tj);/**
250
+ * @license lucide-react v0.560.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const nj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ij=_e("x",nj);function Vs(t,a){return{en:t,"zh-CN":a}}const aj=Vs({"app.documentTitle":"Tarot Pixel","app.name":"Tarot Pixel","common.loading":"Loading...","common.loadFailed":"Failed to load","common.retry":"Retry","common.unknownTime":"Unknown time","language.label":"Language","language.english":"English","language.simplifiedChinese":"Simplified Chinese","settings.title":"Preferences","menu.open":"Open menu","navigation.backToDesignOverview":"Back to design overview","navigation.backToDesignList":"Back to design list","navigation.myDesigns":"My designs"},{"app.documentTitle":"Tarot Pixel","app.name":"Tarot Pixel","common.loading":"加载中...","common.loadFailed":"加载失败","common.retry":"重试","common.unknownTime":"未知时间","language.label":"语言","language.english":"English","language.simplifiedChinese":"简体中文","settings.title":"偏好设置","menu.open":"打开菜单","navigation.backToDesignOverview":"返回设计稿概览","navigation.backToDesignList":"返回设计稿列表","navigation.myDesigns":"我的设计稿"}),oj=Vs({"dashboard.designList.loadFailed":"Failed to load designs","dashboard.delete.confirm":"Delete this export? Its link will no longer be available after deletion.","dashboard.delete.failed":"Failed to delete export","dashboard.delete.succeeded":"Export deleted","dashboard.copy.failed":"Failed to copy link","dashboard.copy.succeeded":"Link copied","dashboard.toast.close":"Close notification","dashboard.count.design.one":"{count} design","dashboard.count.design.other":"{count} designs","dashboard.count.export.one":"{count} export","dashboard.count.export.other":"{count} exports","dashboard.count.module.one":"{count} module","dashboard.count.module.other":"{count} modules","dashboard.search.placeholder":"Search designs or exports","dashboard.search.clear":"Clear search","dashboard.empty.noDesigns.title":"No designs yet","dashboard.empty.noDesigns.description":"Sync a design from a design tool plugin to see it here","dashboard.empty.noResults.title":"No matching results","dashboard.empty.noResults.description":"Try a different search term","dashboard.time.justNow":"Just now","dashboard.time.minute.one":"{count} minute ago","dashboard.time.minute.other":"{count} minutes ago","dashboard.time.hour.one":"{count} hour ago","dashboard.time.hour.other":"{count} hours ago","dashboard.time.day.one":"{count} day ago","dashboard.time.day.other":"{count} days ago","dashboard.export.unnamed":"Unnamed export","dashboard.export.titleWithMore":"{title} + {restCount} more","dashboard.export.latestAt":"Latest {time}","dashboard.export.latest":"Latest","dashboard.export.listLabel":"Exports","dashboard.export.expandList":"Expand export list","dashboard.export.collapseList":"Collapse export list","dashboard.export.selectSource":"Select a source design","dashboard.export.copyLink":"Copy export link","dashboard.export.delete":"Delete this export","dashboard.mobile.loadingDesigns":"Loading designs","dashboard.mobile.selectDesign":"Select a design","dashboard.mobile.noDesigns":"No designs","dashboard.mobile.selectExport":"Select an export","dashboard.mobile.exportVersion":"Export version","dashboard.module.preview":"Preview","dashboard.module.selectExport":"Select an export to view its modules","dashboard.module.loading":"Loading modules...","dashboard.module.loadFailed":"Failed to load modules","dashboard.module.empty":"This export has no modules","dashboard.module.open":"Open module {name}","dashboard.module.viewInMgdone":"View in mgdone"},{"dashboard.designList.loadFailed":"设计稿列表加载失败","dashboard.delete.confirm":"确定要删除这次导出吗?删除后对应链接将不可访问。","dashboard.delete.failed":"删除失败","dashboard.delete.succeeded":"删除成功","dashboard.copy.failed":"复制失败","dashboard.copy.succeeded":"链接已复制","dashboard.toast.close":"关闭通知","dashboard.count.design.one":"{count} 个","dashboard.count.design.other":"{count} 个","dashboard.count.export.one":"{count} 次导出","dashboard.count.export.other":"{count} 次导出","dashboard.count.module.one":"{count} 个模块","dashboard.count.module.other":"{count} 个模块","dashboard.search.placeholder":"搜索视觉稿或导出","dashboard.search.clear":"清空搜索","dashboard.empty.noDesigns.title":"暂无设计稿","dashboard.empty.noDesigns.description":"在设计工具插件中同步后显示","dashboard.empty.noResults.title":"无匹配结果","dashboard.empty.noResults.description":"换个关键词试试","dashboard.time.justNow":"刚刚","dashboard.time.minute.one":"{count} 分钟前","dashboard.time.minute.other":"{count} 分钟前","dashboard.time.hour.one":"{count} 小时前","dashboard.time.hour.other":"{count} 小时前","dashboard.time.day.one":"{count} 天前","dashboard.time.day.other":"{count} 天前","dashboard.export.unnamed":"未命名导出","dashboard.export.titleWithMore":"{title},另有 {restCount} 个模块","dashboard.export.latestAt":"最新 {time}","dashboard.export.latest":"最新","dashboard.export.listLabel":"导出","dashboard.export.expandList":"展开导出列表","dashboard.export.collapseList":"收起导出列表","dashboard.export.selectSource":"选择一个原始设计稿","dashboard.export.copyLink":"复制导出链接","dashboard.export.delete":"删除这次导出","dashboard.mobile.loadingDesigns":"加载设计稿","dashboard.mobile.selectDesign":"选择设计稿","dashboard.mobile.noDesigns":"暂无设计稿","dashboard.mobile.selectExport":"选择导出","dashboard.mobile.exportVersion":"导出版本","dashboard.module.preview":"预览","dashboard.module.selectExport":"选择一次导出查看模块","dashboard.module.loading":"加载模块中...","dashboard.module.loadFailed":"模块加载失败","dashboard.module.empty":"这次导出没有模块","dashboard.module.open":"打开模块 {name}","dashboard.module.viewInMgdone":"在 mgdone 中查看"}),lj=Vs({"detail.empty.selectNode":"Select a node to view its details","detail.empty.nodeNotFound":"Node not found","detail.header.componentId":"Component ID: {id}","detail.header.componentFallback":"Component","detail.section.path":"Path","detail.section.css":"CSS","detail.section.compositeAnalysis":"Composite-layer analysis","detail.section.layout":"Layout","detail.section.hints":"Hints analysis","detail.section.designToolLayout":"Design-tool layout","detail.section.spacing":"Spacing","detail.section.componentDetection":"Component detection","detail.section.appearance":"Appearance","detail.section.text":"Text","detail.section.asset":"Asset","detail.section.context":"Context","detail.section.nodeInfo":"Node info","detail.section.rawHints":"Hints","detail.section.compactContext":"Compact context","detail.section.children.one":"Child ({count})","detail.section.children.other":"Children ({count})","detail.action.copyCss":"Copy CSS","detail.action.copyCompositeAnalysis":"Copy composite-layer analysis","detail.action.copyAssetUrl":"Copy asset URL","detail.action.openAsset":"Open asset in a new tab","detail.field.position":"Position","detail.field.size":"Size","detail.field.parent":"Parent","detail.field.children":"Children","detail.field.display":"Display","detail.field.mainAxis":"Main axis","detail.field.gap":"Gap","detail.field.mainAxisAlignment":"Main-axis alignment","detail.field.crossAxisAlignment":"Cross-axis alignment","detail.field.padding":"Padding","detail.field.opacity":"Opacity","detail.field.borderRadius":"Border radius","detail.field.overflow":"Overflow","detail.field.blendMode":"Blend mode","detail.field.fill":"Fill","detail.field.stroke":"Stroke","detail.field.shadow":"Shadow","detail.field.content":"Content","detail.field.font":"Font","detail.field.fontSize":"Font size","detail.field.fontWeight":"Font weight","detail.field.color":"Color","detail.field.lineHeight":"Line height","detail.field.horizontalAlignment":"Horizontal alignment","detail.field.verticalAlignment":"Vertical alignment","detail.field.file":"File","detail.field.format":"Format","detail.field.url":"URL","detail.value.rootNode":"(root node)","detail.value.automatic":"Auto","detail.value.clipped":"Clipped","detail.value.visible":"Visible","detail.value.yes":"Yes","detail.value.no":"No","detail.value.yesHorizontal":"Yes (horizontal arrangement)","detail.value.yesVertical":"Yes (vertical arrangement)","detail.direction.top":"Top","detail.direction.right":"Right","detail.direction.bottom":"Bottom","detail.direction.left":"Left","detail.direction.horizontal":"Horizontal","detail.direction.vertical":"Vertical","detail.direction.both":"Both","detail.spacing.padding":"Padding","detail.spacing.uniform":"Uniform","detail.spacing.siblings":"Sibling spacing","detail.more.one":"+{count} more item...","detail.more.other":"+{count} more items...","detail.component.summary.one":"{count} child, {width}×{height}","detail.component.summary.other":"{count} children, {width}×{height}","detail.text.segments":"Text segments","detail.composite.strategy.decorative":"Decorative","detail.composite.strategy.review":"Review","detail.composite.strategy.text":"Text","detail.composite.strategy.code":"Code","detail.composite.assetSuggestion":"Exported asset: {file} ({width}×{height}) → use an img directly if this is decorative","detail.composite.preview":"Background preview (text layers excluded)","detail.export.compositeTitle":"Composite-layer export recommendation — {name} ({id}, sourceId: {sourceId})","detail.export.size":"Size: {width}×{height}","detail.export.decorativeHeading":"Decorative layers suitable for background compositing (high confidence):","detail.export.reviewHeading":"Layers requiring review (low confidence):","detail.export.keepHeading":"Layers to keep as code or text:","detail.export.itemWithCoverage":" - {name} ({type}) — {reason} [coverage {coverage}%]","detail.export.item":" - {name} ({type}) — {reason}","detail.hints.role.decorative":"Decorative","detail.hints.role.text":"Text","detail.hints.role.container":"Container","detail.hints.role.interactive":"Interactive","detail.hints.decorativeReason.maskChild":"Mask child","detail.hints.decorativeReason.maskLayer":"Mask layer","detail.hints.decorativeReason.ghostLayer":"Ghost layer (no visible styles)","detail.hints.decorativeReason.backgroundLayer":"Background layer","detail.hints.decorativeReason.ornamentalShape":"Decorative shape","detail.hints.decorativeReason.separator":"Separator","detail.hints.badge.ghost":"Ghost layer","detail.hints.badge.background":"Background layer","detail.hints.badge.horizontalSeparator":"Horizontal separator","detail.hints.badge.verticalSeparator":"Vertical separator","detail.hints.badge.scrollCandidate":"Possible scroll area","detail.hints.field.decorativeReason":"Decorative reason","detail.hints.field.containerType":"Container type","detail.hints.container.transparent":"Transparent container","detail.hints.container.visualBoundary":"Visual-boundary container","detail.hints.childrenAxis":"Child axes","detail.hints.field.xNonOverlapping":"No X-axis overlap","detail.hints.field.yNonOverlapping":"No Y-axis overlap","detail.hints.childrenSpacing":"Child spacing","detail.hints.spacing.uniform":"Uniform {gap}px","detail.hints.spacing.nonUniform":"Non-uniform [{gaps}{suffix}]","detail.hints.childrenAlignment":"Child alignment","detail.hints.alignment.top":"Top aligned","detail.hints.alignment.bottom":"Bottom aligned","detail.hints.alignment.centerY":"Vertically centered","detail.hints.alignment.left":"Left aligned","detail.hints.alignment.right":"Right aligned","detail.hints.alignment.centerX":"Horizontally centered","detail.hints.sizeUniformity":"Child size consistency","detail.hints.field.widthUniform":"Consistent widths","detail.hints.field.heightUniform":"Consistent heights","detail.hints.field.similarity":"Similarity","detail.hints.overflow":"Overflow detection","detail.hints.field.direction":"Direction","detail.hints.field.containerViewport":"Container / viewport","detail.hints.visibility.full":"Fully visible","detail.hints.visibility.partial":"Partially visible: {pixels}px","detail.hints.stackingGroups.one":"Stacking group ({count})","detail.hints.stackingGroups.other":"Stacking groups ({count})","detail.hints.overlaps":"Overlaps","detail.hints.similarSiblings":"Similar sibling nodes","detail.hints.field.structureSignature":"Structure signature","detail.hints.field.containedBy":"Contained by","detail.hints.grouping":"Visual grouping","detail.hints.axis.horizontal":"Horizontal","detail.hints.axis.vertical":"Vertical","detail.hints.axis.stack":"Stack","detail.hints.confidence":"Confidence {confidence}","detail.hints.ungrouped":"Ungrouped:","detail.hints.interGroup":"Between groups: {axis} arrangement","detail.hints.interGroupSpacing":", spacing {spacing}px","detail.hints.interGroupAlignment":", {alignment}","detail.hints.contentFlow":"Content flow","detail.hints.field.primaryDirection":"Primary direction","detail.hints.flow.topToBottom":"Top to bottom","detail.hints.flow.leftToRight":"Left to right","detail.hints.section.header":"Header","detail.hints.section.body":"Body","detail.hints.section.footer":"Footer","detail.hints.section.sidebar":"Sidebar","detail.hints.section.content":"Content","detail.hints.constraints":"Constraints","detail.hints.constraint.fillWidth":"Fill width","detail.hints.constraint.fillHeight":"Fill height","detail.hints.constraint.centerX":"Horizontally centered","detail.hints.constraint.centerY":"Vertically centered","detail.hints.constraint.symmetricX":"Symmetric horizontal padding","detail.hints.constraint.symmetricY":"Symmetric vertical padding","detail.hints.constraint.intrinsic":"Intrinsic size","detail.hints.constraint.padding":"Top {top} Right {right} Bottom {bottom} Left {left}px","detail.hints.layoutPattern":"Layout pattern: {type}","detail.hints.layoutPattern.list":"List","detail.hints.layoutPattern.grid":"Grid","detail.hints.layoutPattern.cardGroup":"Card group","detail.hints.layoutPattern.tabBar":"Tab bar","detail.hints.layoutPattern.carousel":"Carousel","detail.hints.layoutPattern.specification":"Specification","detail.hints.layoutPattern.specificationValue":"{rows} rows × {columns} columns","detail.hints.stackingDetail":"Stacking analysis: {type}","detail.hints.stacking.decorativeOverlay":"Decorative overlay","detail.hints.stacking.containedOverlay":"Contained overlay","detail.hints.stacking.overlappingSimilar":"Overlapping similar elements","detail.hints.stacking.floating":"Floating element","detail.hints.stacking.unknown":"Unknown","detail.hints.semantic":"Semantic inference: {role}","detail.hints.semantic.card":"Card","detail.hints.semantic.listItem":"List item","detail.hints.semantic.navItem":"Navigation item","detail.hints.semantic.avatarName":"Avatar + name","detail.hints.semantic.thumbnailTitle":"Thumbnail + title","detail.hints.semantic.iconText":"Icon + text","detail.hints.semantic.labelValue":"Label-value pair","detail.hints.semantic.mediaBlock":"Media block","detail.data.id":"ID","detail.data.name":"Name","detail.data.type":"Type","detail.data.sourceId":"Source ID","detail.data.boundingBox":"Bounding box","detail.data.parent":"Parent","detail.data.children":"Children","detail.data.root":"(root)","detail.data.asset":"Asset","detail.data.assetUrl":"Asset URL","detail.data.text":"Text","detail.data.font":"Font","detail.data.color":"Color","detail.data.alignment":"Alignment","detail.data.verticalAlignment":"Vertical alignment","detail.data.segmented":"Segmented ({count} parts, use <span>):","detail.data.style":"Style","detail.data.opacity":"Opacity","detail.data.overflow":"Overflow","detail.data.radius":"Radius","detail.data.fill":"Fill","detail.data.stroke":"Stroke","detail.data.shadow":"Shadow","detail.data.childList":"Children","detail.data.child.separator":"Separator","detail.data.child.background":"Background","detail.data.child.ghost":"Ghost"},{"detail.empty.selectNode":"选择一个节点查看详情","detail.empty.nodeNotFound":"节点未找到","detail.header.componentId":"组件 ID:{id}","detail.header.componentFallback":"组件","detail.section.path":"路径","detail.section.css":"CSS","detail.section.compositeAnalysis":"复合图层分析","detail.section.layout":"布局","detail.section.hints":"提示分析","detail.section.designToolLayout":"设计工具布局","detail.section.spacing":"间距标注","detail.section.componentDetection":"组件检测","detail.section.appearance":"外观","detail.section.text":"文本","detail.section.asset":"资源","detail.section.context":"上下文","detail.section.nodeInfo":"节点信息","detail.section.rawHints":"分析提示","detail.section.compactContext":"精简上下文","detail.section.children.one":"子节点({count})","detail.section.children.other":"子节点({count})","detail.action.copyCss":"复制 CSS","detail.action.copyCompositeAnalysis":"复制复合图层分析","detail.action.copyAssetUrl":"复制资源 URL","detail.action.openAsset":"在新标签页中打开资源","detail.field.position":"位置","detail.field.size":"尺寸","detail.field.parent":"父节点","detail.field.children":"子节点","detail.field.display":"显示","detail.field.mainAxis":"主轴","detail.field.gap":"间距","detail.field.mainAxisAlignment":"主轴对齐","detail.field.crossAxisAlignment":"交叉轴对齐","detail.field.padding":"内边距","detail.field.opacity":"透明度","detail.field.borderRadius":"圆角","detail.field.overflow":"溢出","detail.field.blendMode":"混合模式","detail.field.fill":"填充","detail.field.stroke":"描边","detail.field.shadow":"阴影","detail.field.content":"内容","detail.field.font":"字体","detail.field.fontSize":"字号","detail.field.fontWeight":"字重","detail.field.color":"颜色","detail.field.lineHeight":"行高","detail.field.horizontalAlignment":"水平对齐","detail.field.verticalAlignment":"垂直对齐","detail.field.file":"文件","detail.field.format":"格式","detail.field.url":"URL","detail.value.rootNode":"(根节点)","detail.value.automatic":"自动","detail.value.clipped":"裁剪","detail.value.visible":"可见","detail.value.yes":"是","detail.value.no":"否","detail.value.yesHorizontal":"是(横向排列)","detail.value.yesVertical":"是(纵向排列)","detail.direction.top":"上","detail.direction.right":"右","detail.direction.bottom":"下","detail.direction.left":"左","detail.direction.horizontal":"横向","detail.direction.vertical":"纵向","detail.direction.both":"双向","detail.spacing.padding":"内边距(Padding)","detail.spacing.uniform":"统一","detail.spacing.siblings":"兄弟间距","detail.more.one":"+{count} 更多...","detail.more.other":"+{count} 更多...","detail.component.summary.one":"{count} 个子节点,{width}×{height}","detail.component.summary.other":"{count} 个子节点,{width}×{height}","detail.text.segments":"文本分段","detail.composite.strategy.decorative":"装饰","detail.composite.strategy.review":"待确认","detail.composite.strategy.text":"文本","detail.composite.strategy.code":"代码","detail.composite.assetSuggestion":"已有导出资源:{file}({width}×{height})→ 若为装饰层可直接使用 img","detail.composite.preview":"背景预览(排除文本层)","detail.export.compositeTitle":"复合图层导出建议 — {name}({id},sourceId:{sourceId})","detail.export.size":"尺寸:{width}×{height}","detail.export.decorativeHeading":"可合成为背景的装饰层(高置信):","detail.export.reviewHeading":"需确认的层(低置信):","detail.export.keepHeading":"保留为代码或文本的层:","detail.export.itemWithCoverage":" - {name}({type})— {reason}[覆盖率 {coverage}%]","detail.export.item":" - {name}({type})— {reason}","detail.hints.role.decorative":"装饰层","detail.hints.role.text":"文本","detail.hints.role.container":"容器","detail.hints.role.interactive":"交互","detail.hints.decorativeReason.maskChild":"蒙版子节点","detail.hints.decorativeReason.maskLayer":"蒙版层","detail.hints.decorativeReason.ghostLayer":"幽灵层(无可见样式)","detail.hints.decorativeReason.backgroundLayer":"背景层","detail.hints.decorativeReason.ornamentalShape":"装饰性形状","detail.hints.decorativeReason.separator":"分隔线","detail.hints.badge.ghost":"幽灵层","detail.hints.badge.background":"背景层","detail.hints.badge.horizontalSeparator":"水平分隔线","detail.hints.badge.verticalSeparator":"垂直分隔线","detail.hints.badge.scrollCandidate":"疑似滚动区","detail.hints.field.decorativeReason":"装饰原因","detail.hints.field.containerType":"容器类型","detail.hints.container.transparent":"透明容器","detail.hints.container.visualBoundary":"视觉边界容器","detail.hints.childrenAxis":"子节点轴线","detail.hints.field.xNonOverlapping":"X 轴不重叠","detail.hints.field.yNonOverlapping":"Y 轴不重叠","detail.hints.childrenSpacing":"子节点间距","detail.hints.spacing.uniform":"均匀 {gap}px","detail.hints.spacing.nonUniform":"不均匀[{gaps}{suffix}]","detail.hints.childrenAlignment":"子节点对齐","detail.hints.alignment.top":"顶部对齐","detail.hints.alignment.bottom":"底部对齐","detail.hints.alignment.centerY":"垂直居中","detail.hints.alignment.left":"左对齐","detail.hints.alignment.right":"右对齐","detail.hints.alignment.centerX":"水平居中","detail.hints.sizeUniformity":"子节点尺寸一致性","detail.hints.field.widthUniform":"宽度一致","detail.hints.field.heightUniform":"高度一致","detail.hints.field.similarity":"相似度","detail.hints.overflow":"溢出检测","detail.hints.field.direction":"方向","detail.hints.field.containerViewport":"容器/视口","detail.hints.visibility.full":"完全可见","detail.hints.visibility.partial":"部分可见 {pixels}px","detail.hints.stackingGroups.one":"堆叠组({count})","detail.hints.stackingGroups.other":"堆叠组({count})","detail.hints.overlaps":"重叠关系","detail.hints.similarSiblings":"相似兄弟节点","detail.hints.field.structureSignature":"结构签名","detail.hints.field.containedBy":"被包含于","detail.hints.grouping":"视觉分组","detail.hints.axis.horizontal":"横向","detail.hints.axis.vertical":"纵向","detail.hints.axis.stack":"堆叠","detail.hints.confidence":"置信度 {confidence}","detail.hints.ungrouped":"未分组:","detail.hints.interGroup":"组间:{axis}排列","detail.hints.interGroupSpacing":",间距 {spacing}px","detail.hints.interGroupAlignment":",{alignment}","detail.hints.contentFlow":"内容流","detail.hints.field.primaryDirection":"主方向","detail.hints.flow.topToBottom":"从上到下","detail.hints.flow.leftToRight":"从左到右","detail.hints.section.header":"头部","detail.hints.section.body":"主体","detail.hints.section.footer":"底部","detail.hints.section.sidebar":"侧边栏","detail.hints.section.content":"内容区","detail.hints.constraints":"约束关系","detail.hints.constraint.fillWidth":"撑满宽度","detail.hints.constraint.fillHeight":"撑满高度","detail.hints.constraint.centerX":"水平居中","detail.hints.constraint.centerY":"垂直居中","detail.hints.constraint.symmetricX":"左右对称","detail.hints.constraint.symmetricY":"上下对称","detail.hints.constraint.intrinsic":"固有尺寸","detail.hints.constraint.padding":"上 {top} 右 {right} 下 {bottom} 左 {left}px","detail.hints.layoutPattern":"布局模式:{type}","detail.hints.layoutPattern.list":"列表","detail.hints.layoutPattern.grid":"网格","detail.hints.layoutPattern.cardGroup":"卡片组","detail.hints.layoutPattern.tabBar":"标签栏","detail.hints.layoutPattern.carousel":"轮播","detail.hints.layoutPattern.specification":"规格","detail.hints.layoutPattern.specificationValue":"{rows} 行 × {columns} 列","detail.hints.stackingDetail":"堆叠分析:{type}","detail.hints.stacking.decorativeOverlay":"装饰叠加","detail.hints.stacking.containedOverlay":"内容叠加","detail.hints.stacking.overlappingSimilar":"重叠的相似元素","detail.hints.stacking.floating":"浮动元素","detail.hints.stacking.unknown":"未知","detail.hints.semantic":"语义推断:{role}","detail.hints.semantic.card":"卡片","detail.hints.semantic.listItem":"列表项","detail.hints.semantic.navItem":"导航项","detail.hints.semantic.avatarName":"头像+名称","detail.hints.semantic.thumbnailTitle":"缩略图+标题","detail.hints.semantic.iconText":"图标+文本","detail.hints.semantic.labelValue":"标签-值对","detail.hints.semantic.mediaBlock":"媒体块","detail.data.id":"ID","detail.data.name":"名称","detail.data.type":"类型","detail.data.sourceId":"来源 ID","detail.data.boundingBox":"边界框","detail.data.parent":"父节点","detail.data.children":"子节点数","detail.data.root":"(根节点)","detail.data.asset":"资源","detail.data.assetUrl":"资源 URL","detail.data.text":"文本","detail.data.font":"字体","detail.data.color":"颜色","detail.data.alignment":"对齐","detail.data.verticalAlignment":"垂直对齐","detail.data.segmented":"分段文本({count} 段,使用 <span>):","detail.data.style":"样式","detail.data.opacity":"透明度","detail.data.overflow":"溢出","detail.data.radius":"圆角","detail.data.fill":"填充","detail.data.stroke":"描边","detail.data.shadow":"阴影","detail.data.childList":"子节点","detail.data.child.separator":"分隔线","detail.data.child.background":"背景","detail.data.child.ghost":"幽灵层"}),rj=Vs({"viewer.loadingDashboard":"Loading designs...","viewer.loadDesignFailed":"Unable to load design data","viewer.localizeFailed":"Unable to update the current design language","viewer.designDeleted":"This design was deleted or does not exist","viewer.invalidDesignUrl":"Invalid design URL","viewer.loadingDesign":"Loading design data...","viewer.overviewLabel":"Design modules overview","viewer.breadcrumb":"Breadcrumb","viewer.moduleAria":"Module: {name} — {width}×{height}, {count} nodes","viewer.canvas.switchLight":"Switch to a light canvas","viewer.canvas.switchDark":"Switch to a dark canvas","viewer.canvas.fitView":"Fit to view","viewer.canvas.fitWidth":"Fit to width","viewer.canvas.zoomOut":"Zoom out","viewer.canvas.zoomIn":"Zoom in","viewer.sidebar.layers":"Layers","viewer.sidebar.searchPlaceholder":"Search node names, text, or IDs (supports type:text, asset:true, #id, and more)","viewer.sidebar.clearSearch":"Clear search","viewer.sidebar.resultCount.one":"{count} result","viewer.sidebar.resultCount.other":"{count} results","viewer.node.show":"Show node","viewer.node.hide":"Hide node","viewer.map.childCount.one":"{count} child","viewer.map.childCount.other":"{count} children","viewer.reload.title":"Reload","viewer.reload.refreshing":"Refreshing...","viewer.reload.description":"Read the source data again through MCP and refresh the analysis.","viewer.reload.action":"Reload design data","viewer.reload.failed":"Unable to reload design data","viewer.module.switch":"Switch module","viewer.module.count.one":"{count} module","viewer.module.count.other":"{count} modules","viewer.mode.visual":"Visual","viewer.mode.visualAria":"Switch to visual mode","viewer.mode.map":"Map","viewer.mode.mapAria":"Switch to map mode","viewer.font.count.one":"{count} font","viewer.font.count.other":"{count} fonts","viewer.font.usedInModule":"Fonts used in this module","viewer.font.custom":"Custom","viewer.font.builtin":"Built-in","viewer.font.missing":"Missing","viewer.font.weightMissing":"w{weight} was not found in the font preset","viewer.font.weightsMissing":"w{weights} were not found in the font preset","viewer.stats.node.one":"{count} node","viewer.stats.node.other":"{count} nodes","viewer.stats.asset.one":"{count} asset","viewer.stats.asset.other":"{count} assets","viewer.stats.text.one":"{count} text layer","viewer.stats.text.other":"{count} text layers","viewer.stats.frame.one":"{count} frame","viewer.stats.frame.other":"{count} frames","viewer.transform.title":"Transform diff","viewer.transform.loading":"Loading raw data...","viewer.transform.loadFailed":"Unable to load raw data","viewer.transform.noChanges":"No structural changes","viewer.transform.originalChildren":"Original children","viewer.transform.virtualWrapper":"Virtual wrapper (created by layout transform)","viewer.transform.virtualDetail":"flex-{direction}, wrapping {count} items","viewer.transform.parentChanged":"Parent changed","viewer.transform.root":"(root)","viewer.transform.virtualChild":"+ {name} (virtual wrapper)","viewer.transform.groupedDetail":"Groups {count} items into flex-{direction}","viewer.transform.moved":"↳ {name} moved","viewer.transform.nowUnder":"Now under {name}","viewer.transform.flattened":"- {name} (flattened)","viewer.transform.reordered":"Children reordered","viewer.transform.movedSuffix":" (moved)","viewer.transform.goneSuffix":" (gone)"},{"viewer.loadingDashboard":"加载设计稿中...","viewer.loadDesignFailed":"无法加载设计数据","viewer.localizeFailed":"无法更新当前设计稿语言","viewer.designDeleted":"设计稿已删除或不存在","viewer.invalidDesignUrl":"无效的设计稿 URL","viewer.loadingDesign":"加载设计数据中...","viewer.overviewLabel":"设计稿模块概览","viewer.breadcrumb":"面包屑导航","viewer.moduleAria":"模块:{name} — {width}×{height},{count} 个节点","viewer.canvas.switchLight":"切换为白色背景","viewer.canvas.switchDark":"切换为黑色背景","viewer.canvas.fitView":"适应视图","viewer.canvas.fitWidth":"适应宽度","viewer.canvas.zoomOut":"缩小","viewer.canvas.zoomIn":"放大","viewer.sidebar.layers":"图层","viewer.sidebar.searchPlaceholder":"搜索节点名称、文本内容或 ID(支持 type:text / asset:true / #id 等高级语法)","viewer.sidebar.clearSearch":"清空搜索","viewer.sidebar.resultCount.one":"{count} 个结果","viewer.sidebar.resultCount.other":"{count} 个结果","viewer.node.show":"显示节点","viewer.node.hide":"隐藏节点","viewer.map.childCount.one":"{count} 个子节点","viewer.map.childCount.other":"{count} 个子节点","viewer.reload.title":"重新加载","viewer.reload.refreshing":"刷新中...","viewer.reload.description":"通过 MCP 重新读取源数据并刷新计算结果。","viewer.reload.action":"重新加载设计数据","viewer.reload.failed":"无法重新加载设计数据","viewer.module.switch":"切换模块","viewer.module.count.one":"{count} 个模块","viewer.module.count.other":"{count} 个模块","viewer.mode.visual":"视觉","viewer.mode.visualAria":"切换到视觉模式","viewer.mode.map":"地图","viewer.mode.mapAria":"切换到地图模式","viewer.font.count.one":"{count} 种字体","viewer.font.count.other":"{count} 种字体","viewer.font.usedInModule":"本模块使用字体","viewer.font.custom":"自定义","viewer.font.builtin":"内置","viewer.font.missing":"缺失","viewer.font.weightMissing":"w{weight} 未在预设字体中找到","viewer.font.weightsMissing":"w{weights} 未在预设中找到","viewer.stats.node.one":"{count} 个节点","viewer.stats.node.other":"{count} 个节点","viewer.stats.asset.one":"{count} 个资源","viewer.stats.asset.other":"{count} 个资源","viewer.stats.text.one":"{count} 个文本层","viewer.stats.text.other":"{count} 个文本层","viewer.stats.frame.one":"{count} 个容器","viewer.stats.frame.other":"{count} 个容器","viewer.transform.title":"结构变换差异","viewer.transform.loading":"正在加载原始数据...","viewer.transform.loadFailed":"无法加载原始数据","viewer.transform.noChanges":"无结构变化","viewer.transform.originalChildren":"原始子节点","viewer.transform.virtualWrapper":"虚拟容器(由布局转换创建)","viewer.transform.virtualDetail":"flex-{direction},包含 {count} 项","viewer.transform.parentChanged":"父节点已变化","viewer.transform.root":"(根节点)","viewer.transform.virtualChild":"+ {name}(虚拟容器)","viewer.transform.groupedDetail":"将 {count} 项归入 flex-{direction}","viewer.transform.moved":"↳ {name} 已移动","viewer.transform.nowUnder":"现位于 {name} 下","viewer.transform.flattened":"- {name}(已扁平化)","viewer.transform.reordered":"子节点已重新排序","viewer.transform.movedSuffix":"(已移动)","viewer.transform.goneSuffix":"(已移除)"}),sj=["en","zh-CN"],Cb="en",wf="tarot-pixel.locale",cj=[aj,oj,lj,rj],Tx=Object.fromEntries(sj.map(t=>[t,Object.assign({},...cj.map(a=>a[t]))])),uj="http://tarot-pixel.local";function ms(t){const a=t==null?void 0:t.trim().replaceAll("_","-").toLowerCase();return a?a==="zh"||a.startsWith("zh-")?"zh-CN":a==="en"||a.startsWith("en-")?"en":null:null}function dj({query:t,stored:a,systemLocale:l,languages:o=[]}){const s=mj(t);if(s)return s;const c=ms(a);if(c)return c;const d=ms(l);if(d)return d;for(const f of o){const p=ms(f);if(p)return p}return Cb}function zx(t,a,l={}){return(Tx[t][a]??Tx[Cb][a]??a).replace(/\{([A-Za-z][A-Za-z0-9]*)\}/g,(s,c)=>{const d=l[c];return d===void 0?s:String(d)})}function Rx(){try{return window.localStorage.getItem(wf)}catch{return null}}function Es(t,a){const l=new URL(t,uj);return l.searchParams.set("lang",a),/^[a-z][a-z\d+.-]*:/i.test(t)||t.startsWith("//")?l.toString():`${l.pathname}${l.search}${l.hash}`}function Mb(t){return new URLSearchParams(t).has("_screenshot_token")}function fj(t,a){const l=a.indexOf("?"),o=l>=0?a.slice(l+1):"",s=new URLSearchParams(o).get("mode")==="map";return Mb(t)&&!s}function hj(t){try{window.localStorage.setItem(wf,t)}catch{}}function mj(t){if(!t)return null;try{return ms(new URLSearchParams(t).get("lang"))}catch{return null}}const jb=N.createContext(null);function pj({children:t}){const[a,l]=N.useState(()=>wd(Rx())),o=N.useCallback(d=>{l(d),hj(d),window.history.replaceState(window.history.state,"",Es(window.location.href,d))},[]);N.useEffect(()=>{document.documentElement.lang=a,document.title=zx(a,"app.documentTitle")},[a]),N.useEffect(()=>{const d=p=>{p.key===wf&&l(wd(p.newValue))},f=()=>{l(wd(Rx()))};return window.addEventListener("storage",d),window.addEventListener("languagechange",f),()=>{window.removeEventListener("storage",d),window.removeEventListener("languagechange",f)}},[]);const s=N.useCallback((d,f)=>zx(a,d,f),[a]),c=N.useMemo(()=>({locale:a,setLocale:o,t:s}),[a,o,s]);return m.jsx(jb.Provider,{value:c,children:t})}function gt(){const t=N.useContext(jb);if(!t)throw new Error("useI18n 必须在 I18nProvider 内调用");return t}function wd(t){const a=window.navigator.languages.length?window.navigator.languages:window.navigator.language?[window.navigator.language]:[];return dj({query:window.location.search,stored:t,systemLocale:gj(),languages:a})}function gj(){try{return Intl.DateTimeFormat().resolvedOptions().locale||null}catch{return null}}function xj(){const{t}=gt(),{exportData:a,selectModule:l,getModuleStats:o}=Ze(Pt(s=>({exportData:s.exportData,selectModule:s.selectModule,getModuleStats:s.getModuleStats})));return a?m.jsxs("section",{id:"overview","aria-label":t("viewer.overviewLabel"),className:"h-full flex flex-col bg-background",children:[m.jsx("header",{id:"project-meta",className:"flex min-h-12 shrink-0 flex-wrap items-center gap-2 border-b bg-white py-2 pl-11 pr-3 sm:pr-5",children:m.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1 sm:gap-2",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx(wb,{className:"size-4 shrink-0 text-primary"}),m.jsx("h1",{className:"truncate text-sm font-semibold tracking-tight",children:a.source.fileName})]}),m.jsx("span",{className:"hidden shrink-0 text-border sm:inline",children:"·"}),m.jsx("span",{className:"hidden min-w-0 truncate text-xs text-muted-foreground sm:inline",children:a.source.pageName})]})}),m.jsx("div",{id:"module-grid",className:"flex-1 overflow-auto p-3 sm:p-6",children:m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4",children:a.modules.map(s=>{const c=o(s.moduleId);return m.jsx(vj,{mod:s,stats:c,onSelect:l,exportedAt:a.exportedAt},`${s.moduleId}`)})})})]}):null}function vj({mod:t,stats:a,onSelect:l,exportedAt:o}){var f;const{t:s}=gt(),c=p=>o?`${p}?_t=${encodeURIComponent(o)}`:p,d=m.jsxs("article",{"data-module-id":t.moduleId,"aria-label":s("viewer.moduleAria",{name:t.name,width:Math.round(t.bbox.width),height:Math.round(t.bbox.height),count:a.nodes}),className:"group border rounded-lg overflow-hidden bg-white hover:border-primary/20 hover:shadow-md hover:shadow-black/5 transition-all duration-200 cursor-pointer",onClick:()=>l(t.moduleId),children:[m.jsx(bj,{mod:t,exportedAt:o}),m.jsxs("div",{className:"px-3.5 py-3 space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsx("h3",{className:"text-[13px] font-medium truncate",children:t.name}),m.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono shrink-0",children:[Math.round(t.bbox.width),"×",Math.round(t.bbox.height)]})]}),m.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[m.jsx(is,{icon:yb,label:s(`viewer.stats.node.${a.nodes===1?"one":"other"}`,{count:a.nodes})}),m.jsx(is,{icon:bb,label:s(`viewer.stats.asset.${a.assets===1?"one":"other"}`,{count:a.assets})}),a.texts>0&&m.jsx(is,{icon:yM,label:s(`viewer.stats.text.${a.texts===1?"one":"other"}`,{count:a.texts})}),a.frames>0&&m.jsx(is,{icon:UM,label:s(`viewer.stats.frame.${a.frames===1?"one":"other"}`,{count:a.frames})})]})]})]});return(f=t.preview)!=null&&f.url?m.jsxs(xf,{openDelay:300,closeDelay:100,children:[m.jsx(vf,{asChild:!0,children:d}),m.jsxs(bf,{side:"right",align:"start",className:"w-auto max-w-[calc(100vw-32px)] p-1.5 sm:max-w-[520px]",children:[m.jsx("img",{src:c(t.preview.url),alt:t.name,className:"max-h-[80vh] max-w-full rounded object-contain sm:max-h-[600px] sm:max-w-[500px]",draggable:!1}),m.jsxs("p",{className:"text-[11px] text-muted-foreground text-center mt-1",children:[t.name," — ",Math.round(t.bbox.width)," × ",Math.round(t.bbox.height)]})]})]}):d}function is({icon:t,label:a}){return m.jsxs(Le,{variant:"secondary",className:"text-[10px] h-4.5 px-1.5 gap-1 font-normal text-muted-foreground",children:[m.jsx(t,{className:"size-2.5"}),a]})}function bj({mod:t,exportedAt:a}){var o;const l=s=>a?`${s}?_t=${encodeURIComponent(a)}`:s;return(o=t.preview)!=null&&o.url?m.jsx("div",{className:"relative flex h-36 items-center justify-center overflow-hidden border-b border-border/50 bg-neutral-100 sm:h-44",children:m.jsx("img",{src:l(t.preview.url),alt:t.name,className:"object-contain",style:{maxWidth:144,maxHeight:144},draggable:!1})}):m.jsx("div",{className:"relative flex h-36 items-center justify-center overflow-hidden border-b border-border/50 bg-neutral-100 sm:h-44",children:m.jsxs("div",{className:"text-xs text-muted-foreground/30 font-mono",children:[Math.round(t.bbox.width)," × ",Math.round(t.bbox.height)]})})}var yj=Pd[" useId ".trim().toString()]||(()=>{}),wj=0;function Eb(t){const[a,l]=N.useState(yj());return kn(()=>{l(o=>o??String(wj++))},[t]),t||(a?`radix-${a}`:"")}var Sj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nj="VisuallyHidden",Ab=N.forwardRef((t,a)=>m.jsx(St.span,{...t,ref:a,style:{...Sj,...t.style}}));Ab.displayName=Nj;var Cj=Ab,[Xs]=Rl("Tooltip",[yo]),qs=yo(),Tb="TooltipProvider",Mj=700,Hd="tooltip.open",[jj,Sf]=Xs(Tb),zb=t=>{const{__scopeTooltip:a,delayDuration:l=Mj,skipDelayDuration:o=300,disableHoverableContent:s=!1,children:c}=t,d=N.useRef(!0),f=N.useRef(!1),p=N.useRef(0);return N.useEffect(()=>{const g=p.current;return()=>window.clearTimeout(g)},[]),m.jsx(jj,{scope:a,isOpenDelayedRef:d,delayDuration:l,onOpen:N.useCallback(()=>{o<=0||(window.clearTimeout(p.current),d.current=!1)},[o]),onClose:N.useCallback(()=>{o<=0||(window.clearTimeout(p.current),p.current=window.setTimeout(()=>d.current=!0,o))},[o]),isPointerInTransitRef:f,onPointerInTransitChange:N.useCallback(g=>{f.current=g},[]),disableHoverableContent:s,children:c})};zb.displayName=Tb;var Al="Tooltip",[Ej,Ol]=Xs(Al),Rb=t=>{const{__scopeTooltip:a,children:l,open:o,defaultOpen:s,onOpenChange:c,disableHoverableContent:d,delayDuration:f}=t,p=Sf(Al,t.__scopeTooltip),g=qs(a),[x,v]=N.useState(null),w=Eb(),y=N.useRef(0),S=d??p.disableHoverableContent,C=f??p.delayDuration,j=N.useRef(!1),[A,_]=tf({prop:o,defaultProp:s??!1,onChange:D=>{D?(p.onOpen(),document.dispatchEvent(new CustomEvent(Hd))):p.onClose(),c==null||c(D)},caller:Al}),z=N.useMemo(()=>A?j.current?"delayed-open":"instant-open":"closed",[A]),R=N.useCallback(()=>{window.clearTimeout(y.current),y.current=0,j.current=!1,_(!0)},[_]),E=N.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),T=N.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{j.current=!0,_(!0),y.current=0},C)},[C,_]);return N.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),m.jsx(hf,{...g,children:m.jsx(Ej,{scope:a,contentId:w,open:A,stateAttribute:z,trigger:x,onTriggerChange:v,onTriggerEnter:N.useCallback(()=>{p.isOpenDelayedRef.current?T():R()},[p.isOpenDelayedRef,T,R]),onTriggerLeave:N.useCallback(()=>{S?E():(window.clearTimeout(y.current),y.current=0)},[E,S]),onOpen:R,onClose:E,disableHoverableContent:S,children:l})})};Rb.displayName=Al;var Yd="TooltipTrigger",Ob=N.forwardRef((t,a)=>{const{__scopeTooltip:l,...o}=t,s=Ol(Yd,l),c=Sf(Yd,l),d=qs(l),f=N.useRef(null),p=Tt(a,f,s.onTriggerChange),g=N.useRef(!1),x=N.useRef(!1),v=N.useCallback(()=>g.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),m.jsx(Ls,{asChild:!0,...d,children:m.jsx(St.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:p,onPointerMove:Ye(t.onPointerMove,w=>{w.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:Ye(t.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:Ye(t.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:Ye(t.onFocus,()=>{g.current||s.onOpen()}),onBlur:Ye(t.onBlur,s.onClose),onClick:Ye(t.onClick,s.onClose)})})});Ob.displayName=Yd;var Nf="TooltipPortal",[Aj,Tj]=Xs(Nf,{forceMount:void 0}),kb=t=>{const{__scopeTooltip:a,forceMount:l,children:o,container:s}=t,c=Ol(Nf,a);return m.jsx(Aj,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};kb.displayName=Nf;var po="TooltipContent",_b=N.forwardRef((t,a)=>{const l=Tj(po,t.__scopeTooltip),{forceMount:o=l.forceMount,side:s="top",...c}=t,d=Ol(po,t.__scopeTooltip);return m.jsx(wn,{present:o||d.open,children:d.disableHoverableContent?m.jsx(Db,{side:s,...c,ref:a}):m.jsx(zj,{side:s,...c,ref:a})})}),zj=N.forwardRef((t,a)=>{const l=Ol(po,t.__scopeTooltip),o=Sf(po,t.__scopeTooltip),s=N.useRef(null),c=Tt(a,s),[d,f]=N.useState(null),{trigger:p,onClose:g}=l,x=s.current,{onPointerInTransitChange:v}=o,w=N.useCallback(()=>{f(null),v(!1)},[v]),y=N.useCallback((S,C)=>{const j=S.currentTarget,A={x:S.clientX,y:S.clientY},_=_j(A,j.getBoundingClientRect()),z=Dj(A,_),R=$j(C.getBoundingClientRect()),E=Uj([...z,...R]);f(E),v(!0)},[v]);return N.useEffect(()=>()=>w(),[w]),N.useEffect(()=>{if(p&&x){const S=j=>y(j,x),C=j=>y(j,p);return p.addEventListener("pointerleave",S),x.addEventListener("pointerleave",C),()=>{p.removeEventListener("pointerleave",S),x.removeEventListener("pointerleave",C)}}},[p,x,y,w]),N.useEffect(()=>{if(d){const S=C=>{const j=C.target,A={x:C.clientX,y:C.clientY},_=(p==null?void 0:p.contains(j))||(x==null?void 0:x.contains(j)),z=!Lj(A,d);_?w():z&&(w(),g())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[p,x,d,g,w]),m.jsx(Db,{...t,ref:c})}),[Rj,Oj]=Xs(Al,{isInside:!1}),kj=t2("TooltipContent"),Db=N.forwardRef((t,a)=>{const{__scopeTooltip:l,children:o,"aria-label":s,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=t,p=Ol(po,l),g=qs(l),{onClose:x}=p;return N.useEffect(()=>(document.addEventListener(Hd,x),()=>document.removeEventListener(Hd,x)),[x]),N.useEffect(()=>{if(p.trigger){const v=w=>{w.target instanceof Node&&w.target.contains(p.trigger)&&x()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[p.trigger,x]),m.jsx(Bs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:v=>v.preventDefault(),onDismiss:x,children:m.jsxs(mf,{"data-state":p.stateAttribute,...g,...f,ref:a,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(kj,{children:o}),m.jsx(Rj,{scope:l,isInside:!0,children:m.jsx(Cj,{id:p.contentId,role:"tooltip",children:s||o})})]})})});_b.displayName=po;var $b="TooltipArrow",Lb=N.forwardRef((t,a)=>{const{__scopeTooltip:l,...o}=t,s=qs(l);return Oj($b,l).isInside?null:m.jsx(pf,{...s,...o,ref:a})});Lb.displayName=$b;function _j(t,a){const l=Math.abs(a.top-t.y),o=Math.abs(a.bottom-t.y),s=Math.abs(a.right-t.x),c=Math.abs(a.left-t.x);switch(Math.min(l,o,s,c)){case c:return"left";case s:return"right";case l:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Dj(t,a,l=5){const o=[];switch(a){case"top":o.push({x:t.x-l,y:t.y+l},{x:t.x+l,y:t.y+l});break;case"bottom":o.push({x:t.x-l,y:t.y-l},{x:t.x+l,y:t.y-l});break;case"left":o.push({x:t.x+l,y:t.y-l},{x:t.x+l,y:t.y+l});break;case"right":o.push({x:t.x-l,y:t.y-l},{x:t.x-l,y:t.y+l});break}return o}function $j(t){const{top:a,right:l,bottom:o,left:s}=t;return[{x:s,y:a},{x:l,y:a},{x:l,y:o},{x:s,y:o}]}function Lj(t,a){const{x:l,y:o}=t;let s=!1;for(let c=0,d=a.length-1;c<a.length;d=c++){const f=a[c],p=a[d],g=f.x,x=f.y,v=p.x,w=p.y;x>o!=w>o&&l<(v-g)*(o-x)/(w-x)+g&&(s=!s)}return s}function Uj(t){const a=t.slice();return a.sort((l,o)=>l.x<o.x?-1:l.x>o.x?1:l.y<o.y?-1:l.y>o.y?1:0),Bj(a)}function Bj(t){if(t.length<=1)return t.slice();const a=[];for(let o=0;o<t.length;o++){const s=t[o];for(;a.length>=2;){const c=a[a.length-1],d=a[a.length-2];if((c.x-d.x)*(s.y-d.y)>=(c.y-d.y)*(s.x-d.x))a.pop();else break}a.push(s)}a.pop();const l=[];for(let o=t.length-1;o>=0;o--){const s=t[o];for(;l.length>=2;){const c=l[l.length-1],d=l[l.length-2];if((c.x-d.x)*(s.y-d.y)>=(c.y-d.y)*(s.x-d.x))l.pop();else break}l.push(s)}return l.pop(),a.length===1&&l.length===1&&a[0].x===l[0].x&&a[0].y===l[0].y?a:a.concat(l)}var Hj=zb,Yj=Rb,Ij=Ob,Gj=kb,Vj=_b,Xj=Lb;function Ox({delayDuration:t=0,...a}){return m.jsx(Hj,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function vl({...t}){return m.jsx(Yj,{"data-slot":"tooltip",...t})}function bl({...t}){return m.jsx(Ij,{"data-slot":"tooltip-trigger",...t})}function yl({className:t,sideOffset:a=0,children:l,...o}){return m.jsx(Gj,{children:m.jsxs(Vj,{"data-slot":"tooltip-content",sideOffset:a,className:Ot("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...o,children:[l,m.jsx(Xj,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}const qj=jv("group/button cursor-pointer inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",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 aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",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-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg 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-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),gn=N.forwardRef(({className:t,variant:a="default",size:l="default",asChild:o=!1,...s},c)=>{const d=o?Ev:"button";return m.jsx(d,{ref:c,"data-slot":"button","data-variant":a,"data-size":l,className:Ot(qj({variant:a,size:l,className:t})),...s})});gn.displayName="Button";var Pj=N.createContext(void 0);function Qj(t){const a=N.useContext(Pj);return t||a||"ltr"}function Zj(t,[a,l]){return Math.min(l,Math.max(a,t))}function Fj(t,a){return N.useReducer((l,o)=>a[l][o]??l,t)}var Cf="ScrollArea",[Ub]=Rl(Cf),[Wj,xn]=Ub(Cf),Bb=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,type:o="hover",dir:s,scrollHideDelay:c=600,...d}=t,[f,p]=N.useState(null),[g,x]=N.useState(null),[v,w]=N.useState(null),[y,S]=N.useState(null),[C,j]=N.useState(null),[A,_]=N.useState(0),[z,R]=N.useState(0),[E,T]=N.useState(!1),[D,k]=N.useState(!1),V=Tt(a,p),te=Qj(s);return m.jsx(Wj,{scope:l,type:o,dir:te,scrollHideDelay:c,scrollArea:f,viewport:g,onViewportChange:x,content:v,onContentChange:w,scrollbarX:y,onScrollbarXChange:S,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:C,onScrollbarYChange:j,scrollbarYEnabled:D,onScrollbarYEnabledChange:k,onCornerWidthChange:_,onCornerHeightChange:R,children:m.jsx(St.div,{dir:te,...d,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":z+"px",...t.style}})})});Bb.displayName=Cf;var Hb="ScrollAreaViewport",Yb=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,children:o,nonce:s,...c}=t,d=xn(Hb,l),f=N.useRef(null),p=Tt(a,f,d.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx(Kj,{nonce:s}),m.jsx(St.div,{"data-radix-scroll-area-viewport":"",...c,ref:p,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...t.style},children:m.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});Yb.displayName=Hb;var Kj=N.memo(({nonce:t})=>m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),(t,a)=>t.nonce===a.nonce),$n="ScrollAreaScrollbar",Ib=N.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=xn($n,t.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:d}=s,f=t.orientation==="horizontal";return N.useEffect(()=>(f?c(!0):d(!0),()=>{f?c(!1):d(!1)}),[f,c,d]),s.type==="hover"?m.jsx(Jj,{...o,ref:a,forceMount:l}):s.type==="scroll"?m.jsx(eE,{...o,ref:a,forceMount:l}):s.type==="auto"?m.jsx(Gb,{...o,ref:a,forceMount:l}):s.type==="always"?m.jsx(Mf,{...o,ref:a,"data-state":"visible"}):null});Ib.displayName=$n;var Jj=N.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=xn($n,t.__scopeScrollArea),[c,d]=N.useState(!1);return N.useEffect(()=>{const f=s.scrollArea;let p=0;if(f){const g=()=>{window.clearTimeout(p),d(!0)},x=()=>{p=window.setTimeout(()=>d(!1),s.scrollHideDelay)};return f.addEventListener("pointerenter",g),f.addEventListener("pointerleave",x),()=>{window.clearTimeout(p),f.removeEventListener("pointerenter",g),f.removeEventListener("pointerleave",x)}}},[s.scrollArea,s.scrollHideDelay]),m.jsx(wn,{present:l||c,children:m.jsx(Gb,{"data-state":c?"visible":"hidden",...o,ref:a})})}),eE=N.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=xn($n,t.__scopeScrollArea),c=t.orientation==="horizontal",d=Qs(()=>p("SCROLL_END"),100),[f,p]=Fj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return N.useEffect(()=>{if(f==="idle"){const g=window.setTimeout(()=>p("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(g)}},[f,s.scrollHideDelay,p]),N.useEffect(()=>{const g=s.viewport,x=c?"scrollLeft":"scrollTop";if(g){let v=g[x];const w=()=>{const y=g[x];v!==y&&(p("SCROLL"),d()),v=y};return g.addEventListener("scroll",w),()=>g.removeEventListener("scroll",w)}},[s.viewport,c,p,d]),m.jsx(wn,{present:l||f!=="hidden",children:m.jsx(Mf,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:a,onPointerEnter:Ye(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:Ye(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),Gb=N.forwardRef((t,a)=>{const l=xn($n,t.__scopeScrollArea),{forceMount:o,...s}=t,[c,d]=N.useState(!1),f=t.orientation==="horizontal",p=Qs(()=>{if(l.viewport){const g=l.viewport.offsetWidth<l.viewport.scrollWidth,x=l.viewport.offsetHeight<l.viewport.scrollHeight;d(f?g:x)}},10);return go(l.viewport,p),go(l.content,p),m.jsx(wn,{present:o||c,children:m.jsx(Mf,{"data-state":c?"visible":"hidden",...s,ref:a})})}),Mf=N.forwardRef((t,a)=>{const{orientation:l="vertical",...o}=t,s=xn($n,t.__scopeScrollArea),c=N.useRef(null),d=N.useRef(0),[f,p]=N.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),g=Qb(f.viewport,f.content),x={...o,sizes:f,onSizesChange:p,hasThumb:g>0&&g<1,onThumbChange:w=>c.current=w,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:w=>d.current=w};function v(w,y){return lE(w,d.current,f,y)}return l==="horizontal"?m.jsx(tE,{...x,ref:a,onThumbPositionChange:()=>{if(s.viewport&&c.current){const w=s.viewport.scrollLeft,y=kx(w,f,s.dir);c.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:w=>{s.viewport&&(s.viewport.scrollLeft=w)},onDragScroll:w=>{s.viewport&&(s.viewport.scrollLeft=v(w,s.dir))}}):l==="vertical"?m.jsx(nE,{...x,ref:a,onThumbPositionChange:()=>{if(s.viewport&&c.current){const w=s.viewport.scrollTop,y=kx(w,f);c.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:w=>{s.viewport&&(s.viewport.scrollTop=w)},onDragScroll:w=>{s.viewport&&(s.viewport.scrollTop=v(w))}}):null}),tE=N.forwardRef((t,a)=>{const{sizes:l,onSizesChange:o,...s}=t,c=xn($n,t.__scopeScrollArea),[d,f]=N.useState(),p=N.useRef(null),g=Tt(a,p,c.onScrollbarXChange);return N.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),m.jsx(Xb,{"data-orientation":"horizontal",...s,ref:g,sizes:l,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ps(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.x),onDragScroll:x=>t.onDragScroll(x.x),onWheelScroll:(x,v)=>{if(c.viewport){const w=c.viewport.scrollLeft+x.deltaX;t.onWheelScroll(w),Fb(w,v)&&x.preventDefault()}},onResize:()=>{p.current&&c.viewport&&d&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Ts(d.paddingLeft),paddingEnd:Ts(d.paddingRight)}})}})}),nE=N.forwardRef((t,a)=>{const{sizes:l,onSizesChange:o,...s}=t,c=xn($n,t.__scopeScrollArea),[d,f]=N.useState(),p=N.useRef(null),g=Tt(a,p,c.onScrollbarYChange);return N.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),m.jsx(Xb,{"data-orientation":"vertical",...s,ref:g,sizes:l,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ps(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.y),onDragScroll:x=>t.onDragScroll(x.y),onWheelScroll:(x,v)=>{if(c.viewport){const w=c.viewport.scrollTop+x.deltaY;t.onWheelScroll(w),Fb(w,v)&&x.preventDefault()}},onResize:()=>{p.current&&c.viewport&&d&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Ts(d.paddingTop),paddingEnd:Ts(d.paddingBottom)}})}})}),[iE,Vb]=Ub($n),Xb=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,sizes:o,hasThumb:s,onThumbChange:c,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:p,onDragScroll:g,onWheelScroll:x,onResize:v,...w}=t,y=xn($n,l),[S,C]=N.useState(null),j=Tt(a,C),A=N.useRef(null),_=N.useRef(""),z=y.viewport,R=o.content-o.viewport,E=an(x),T=an(p),D=Qs(v,10);function k(V){if(A.current){const te=V.clientX-A.current.left,J=V.clientY-A.current.top;g({x:te,y:J})}}return N.useEffect(()=>{const V=te=>{const J=te.target;(S==null?void 0:S.contains(J))&&E(te,R)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[z,S,R,E]),N.useEffect(T,[o,T]),go(S,D),go(y.content,D),m.jsx(iE,{scope:l,scrollbar:S,hasThumb:s,onThumbChange:an(c),onThumbPointerUp:an(d),onThumbPositionChange:T,onThumbPointerDown:an(f),children:m.jsx(St.div,{...w,ref:j,style:{position:"absolute",...w.style},onPointerDown:Ye(t.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),A.current=S.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),k(V))}),onPointerMove:Ye(t.onPointerMove,k),onPointerUp:Ye(t.onPointerUp,V=>{const te=V.target;te.hasPointerCapture(V.pointerId)&&te.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=_.current,y.viewport&&(y.viewport.style.scrollBehavior=""),A.current=null})})})}),As="ScrollAreaThumb",qb=N.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=Vb(As,t.__scopeScrollArea);return m.jsx(wn,{present:l||s.hasThumb,children:m.jsx(aE,{ref:a,...o})})}),aE=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,style:o,...s}=t,c=xn(As,l),d=Vb(As,l),{onThumbPositionChange:f}=d,p=Tt(a,d.onThumbChange),g=N.useRef(void 0),x=Qs(()=>{g.current&&(g.current(),g.current=void 0)},100);return N.useEffect(()=>{const v=c.viewport;if(v){const w=()=>{if(x(),!g.current){const y=rE(v,f);g.current=y,f()}};return f(),v.addEventListener("scroll",w),()=>v.removeEventListener("scroll",w)}},[c.viewport,x,f]),m.jsx(St.div,{"data-state":d.hasThumb?"visible":"hidden",...s,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Ye(t.onPointerDownCapture,v=>{const y=v.target.getBoundingClientRect(),S=v.clientX-y.left,C=v.clientY-y.top;d.onThumbPointerDown({x:S,y:C})}),onPointerUp:Ye(t.onPointerUp,d.onThumbPointerUp)})});qb.displayName=As;var jf="ScrollAreaCorner",Pb=N.forwardRef((t,a)=>{const l=xn(jf,t.__scopeScrollArea),o=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&o?m.jsx(oE,{...t,ref:a}):null});Pb.displayName=jf;var oE=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,...o}=t,s=xn(jf,l),[c,d]=N.useState(0),[f,p]=N.useState(0),g=!!(c&&f),{onCornerWidthChange:x,onCornerHeightChange:v}=s;return go(s.scrollbarX,()=>{var y;const w=((y=s.scrollbarX)==null?void 0:y.offsetHeight)||0;s.onCornerHeightChange(w),p(w)}),go(s.scrollbarY,()=>{var y;const w=((y=s.scrollbarY)==null?void 0:y.offsetWidth)||0;s.onCornerWidthChange(w),d(w)}),N.useEffect(()=>()=>{x(0),v(0)},[x,v]),g?m.jsx(St.div,{...o,ref:a,style:{width:c,height:f,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Ts(t){return t?parseInt(t,10):0}function Qb(t,a){const l=t/a;return isNaN(l)?0:l}function Ps(t){const a=Qb(t.viewport,t.content),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=(t.scrollbar.size-l)*a;return Math.max(o,18)}function lE(t,a,l,o="ltr"){const s=Ps(l),c=s/2,d=a||c,f=s-d,p=l.scrollbar.paddingStart+d,g=l.scrollbar.size-l.scrollbar.paddingEnd-f,x=l.content-l.viewport,v=o==="ltr"?[0,x]:[x*-1,0];return Zb([p,g],v)(t)}function kx(t,a,l="ltr"){const o=Ps(a),s=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,c=a.scrollbar.size-s,d=a.content-a.viewport,f=c-o,p=l==="ltr"?[0,d]:[d*-1,0],g=Zj(t,p);return Zb([0,d],[0,f])(g)}function Zb(t,a){return l=>{if(t[0]===t[1]||a[0]===a[1])return a[0];const o=(a[1]-a[0])/(t[1]-t[0]);return a[0]+o*(l-t[0])}}function Fb(t,a){return t>0&&t<a}var rE=(t,a=()=>{})=>{let l={left:t.scrollLeft,top:t.scrollTop},o=0;return(function s(){const c={left:t.scrollLeft,top:t.scrollTop},d=l.left!==c.left,f=l.top!==c.top;(d||f)&&a(),l=c,o=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(o)};function Qs(t,a){const l=an(t),o=N.useRef(0);return N.useEffect(()=>()=>window.clearTimeout(o.current),[]),N.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(l,a)},[l,a])}function go(t,a){const l=an(a);kn(()=>{let o=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(l)});return s.observe(t),()=>{window.cancelAnimationFrame(o),s.unobserve(t)}}},[t,l])}var sE=Bb,cE=Yb,uE=Pb;function Tl({className:t,children:a,...l}){return m.jsxs(sE,{"data-slot":"scroll-area",className:Ot("relative",t),...l,children:[m.jsx(cE,{"data-slot":"scroll-area-viewport",style:{overflow:"auto"},className:"size-full min-w-0 overflow-hidden rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),m.jsx(dE,{}),m.jsx(uE,{})]})}function dE({className:t,orientation:a="vertical",...l}){return m.jsx(Ib,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:Ot("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",t),...l,children:m.jsx(qb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function fE({className:t,type:a,...l}){return m.jsx("input",{type:a,"data-slot":"input",className:Ot("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...l})}const hE={frame:SM,group:CM,text:Nb,rectangle:KM,ellipse:lM,image:bb,vector:YM,line:yf,section:Bd};function Wb({type:t,className:a}){const l=hE[t]??hM;return m.jsx(l,{className:Ot("size-3.5 shrink-0",a)})}function mE(){const{selectedNodeId:t,searchQuery:a,selectNode:l,mod:o,hiddenNodeIds:s,toggleNodeVisibility:c}=Ze(Pt(y=>({selectedNodeId:y.selectedNodeId,searchQuery:y.searchQuery,selectNode:y.selectNode,mod:y.getCurrentModule(),hiddenNodeIds:y.hiddenNodeIds,toggleNodeVisibility:y.toggleNodeVisibility}))),d=N.useRef(null),[f,p]=N.useState(()=>{const y=new Set,S=(C,j)=>{if(j<2){y.add(C);const A=o==null?void 0:o.nodes[C];if(A)for(const _ of A.children)S(_,j+1)}};return o&&S(o.rootNodeId,0),y});N.useEffect(()=>{if(!t||!o)return;const y=new Set;let S=t;for(;S;){const C=o.nodes[S];if(!C)break;S=C.parentId,S&&y.add(S)}p(C=>{const j=new Set(C);return y.forEach(A=>j.add(A)),j}),requestAnimationFrame(()=>{var j;const C=(j=d.current)==null?void 0:j.querySelector(`[data-node-id="${t}"]`);C&&C.scrollIntoView({block:"nearest",behavior:"auto"})})},[t,o]);const g=N.useCallback((y,S)=>{S.stopPropagation(),p(C=>{const j=new Set(C);return j.has(y)?j.delete(y):j.add(y),j})},[]),x=N.useCallback(y=>l(y),[l]);if(!o)return null;const v=o.nodes[o.rootNodeId];if(!v)return null;const w=N.useMemo(()=>{if(!t||!o)return new Set;const y=o.nodes[t];if(!y||y.children.length===0)return new Set;const S=new Set,C=j=>{S.add(j);const A=o.nodes[j];if(A)for(const _ of A.children)C(_)};for(const j of y.children)C(j);return S},[t,o]);return m.jsx("div",{ref:d,className:"py-0.5 min-w-0",children:m.jsx(Kb,{node:v,mod:o,depth:0,filter:a,selectedId:t,selectedDescendants:w,expandedNodes:f,hiddenNodeIds:s,onClick:x,onToggleExpand:g,onToggleVisibility:c})})}function Kb({node:t,mod:a,depth:l,filter:o,selectedId:s,selectedDescendants:c,expandedNodes:d,hiddenNodeIds:f,onClick:p,onToggleExpand:g,onToggleVisibility:x}){var R,E;const{t:v}=gt(),w=f.has(t.id),y=!o||t.name.toLowerCase().includes(o.toLowerCase())||t.type.includes(o.toLowerCase())||(((E=(R=t.text)==null?void 0:R.content)==null?void 0:E.toLowerCase().includes(o.toLowerCase()))??!1),S=t.children.map(T=>a.nodes[T]).filter(Boolean),C=S.length>0,j=d.has(t.id),A=j?S.map(T=>m.jsx(Kb,{node:T,mod:a,depth:l+1,filter:o,selectedId:s,selectedDescendants:c,expandedNodes:d,hiddenNodeIds:f,onClick:p,onToggleExpand:g,onToggleVisibility:x},T.id)):null;if(!y&&!S.length&&o)return null;const _=t.id===s,z=c.has(t.id);return m.jsxs(m.Fragment,{children:[m.jsxs("div",{"data-node-id":t.id,"data-type":t.type,role:"button",tabIndex:0,onClick:T=>{T.stopPropagation(),p(t.id)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),p(t.id))},className:Ot("group flex items-center gap-1 w-full min-w-0 max-w-full text-left h-7 pr-1 text-xs cursor-pointer",_?"bg-sidebar-primary/15 text-sidebar-accent-foreground font-medium":z?"bg-sidebar-primary/8":"text-sidebar-foreground hover:bg-sidebar-accent/50",!y&&o&&"opacity-30",w&&"opacity-40"),style:{paddingLeft:l*12+4},children:[C?m.jsx("span",{onClick:T=>g(t.id,T),className:"w-4 h-4 flex items-center justify-center shrink-0 cursor-pointer hover:bg-muted rounded-sm",children:m.jsx(wo,{className:Ot("size-3 text-muted-foreground transition-transform duration-150",j&&"rotate-90")})}):m.jsx("span",{className:"w-4 h-4 shrink-0"}),m.jsx(Wb,{type:t.type,className:Ot("size-3 shrink-0",_?"text-sidebar-primary":"text-muted-foreground")}),m.jsx("span",{className:Ot("truncate block flex-1 min-w-0 text-foreground",l===0&&"font-semibold"),style:{maxWidth:120},title:t.name,children:t.name}),m.jsx(Le,{variant:"ghost",className:"text-[9px] h-3.5 px-1 text-muted-foreground font-normal shrink-0",children:t.type}),m.jsx("span",{onClick:T=>{T.stopPropagation(),x(t.id)},className:Ot("w-4 h-4 flex items-center justify-center shrink-0 rounded-sm transition-opacity",w?"opacity-100 text-muted-foreground":"opacity-0 group-hover:opacity-100 text-muted-foreground/60 hover:text-muted-foreground"),title:v(w?"viewer.node.show":"viewer.node.hide"),children:w?m.jsx(xM,{className:"size-3"}):m.jsx(vb,{className:"size-3"})})]}),A]})}function pE(){const{t}=gt(),{exportData:a,searchQuery:l,setSearchQuery:o,findNodeAsset:s,selectNode:c}=Ze(),d=Ze(g=>g.getCurrentModule()),f=N.useMemo(()=>{if(!a||!l.trim())return null;const g=qS(l);return!g.moduleId&&d&&(g.moduleId=d.moduleId),PS(g,a,s)},[a,l,s,d]);if(!a||!d)return null;const p=f!==null;return m.jsxs("aside",{id:"sidebar",className:"hidden min-h-0 min-w-0 flex-col overflow-hidden border-r bg-white xl:flex",children:[m.jsxs("div",{className:"px-3 py-2.5 border-b space-y-2",onClick:()=>c(null),children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("span",{className:"text-[11px] font-medium uppercase tracking-widest text-muted-foreground",children:t("viewer.sidebar.layers")}),m.jsx(Le,{variant:"secondary",className:"text-[10px] h-4.5 px-1.5 font-mono font-normal text-muted-foreground",children:Object.keys(d.nodes).length})]}),m.jsxs("div",{className:"relative",children:[m.jsx(QM,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3 text-muted-foreground/50 pointer-events-none"}),m.jsx(fE,{id:"search-input",value:l,onChange:g=>o(g.target.value),placeholder:t("viewer.sidebar.searchPlaceholder"),className:`h-7 pl-7 text-[10px] bg-muted/50 placeholder:text-muted-foreground rounded-md ${l?"pr-5":""}`}),l&&m.jsx("button",{type:"button","aria-label":t("viewer.sidebar.clearSearch"),title:t("viewer.sidebar.clearSearch"),onClick:()=>o(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground/50 hover:text-muted-foreground transition-colors",children:m.jsx(ij,{className:"size-3"})})]})]}),p?m.jsx(Tl,{className:"flex-1 overflow-hidden min-w-0",onClick:()=>c(null),children:m.jsxs("div",{className:"py-1 min-w-0",children:[m.jsx("div",{className:"px-3 py-1 text-[10px] text-muted-foreground",children:t(`viewer.sidebar.resultCount.${f.length===1?"one":"other"}`,{count:f.length})}),f.map(g=>m.jsxs("button",{"data-node-id":g.node.id,className:"flex items-center gap-1.5 w-full text-left h-7 px-3 text-xs hover:bg-sidebar-accent/50",onClick:x=>{x.stopPropagation(),c(g.node.id)},children:[m.jsx(Le,{variant:"ghost",className:"text-[9px] h-3.5 px-1 text-sidebar-foreground/40 font-normal shrink-0",children:g.node.type}),m.jsx("span",{className:"truncate flex-1",children:g.node.name}),g.node.text&&m.jsxs("span",{className:"text-[10px] text-muted-foreground truncate max-w-[80px]",children:['"',g.node.text.content,'"']})]},g.node.id))]})}):m.jsx(Tl,{className:"flex-1 overflow-hidden min-w-0",onClick:()=>c(null),children:m.jsx(mE,{})})]})}function gE(t,a){const o=document.elementsFromPoint(t,a).filter(s=>s instanceof HTMLElement&&!!s.dataset.nodeId).map(s=>({id:s.dataset.nodeId,area:(s.offsetWidth||1)*(s.offsetHeight||1)}));return o.length===0?null:o.reduce((s,c)=>s.area<=c.area?s:c).id}function xE({asset:t,node:a}){var c;const l=(c=a.image)==null?void 0:c.position,o=a.type==="text"&&a.meta.exportReason==="text-rasterized",s={alt:o?"":a.name,"aria-hidden":o?!0:void 0};if((l==null?void 0:l.mode)==="offset"){const d={position:"absolute",pointerEvents:"none",maxWidth:"none",height:"auto",left:l.left,top:l.top};return l.width!=null&&(d.width=l.width),l.height!=null&&(d.height=l.height),m.jsx("img",{style:d,src:t.url,...s,draggable:!1})}if((l==null?void 0:l.mode)==="center"){const d={position:"absolute",pointerEvents:"none",maxWidth:"none",left:"50%",top:"50%",transform:l.transform??"translate(-50%, -50%)",transformOrigin:l.transformOrigin??"center"};return l.width!=null&&(d.width=l.width),l.height!=null&&(d.height=l.height),m.jsx("img",{className:"block",style:d,src:t.url,...s,draggable:!1})}return m.jsx("img",{className:"absolute inset-0 w-full h-full pointer-events-none block",src:t.url,...s,draggable:!1})}function _x(t){return!t||!t.includes(" ")?t:t.replace(/ /g," ")}function vE({node:t}){if(!t.text)return null;if(t.text.listMarkerGeometry&&t.text.content.trim()===""){const{path:d,fillRule:f}=t.text.listMarkerGeometry,p=t.text.color;return m.jsx("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"visible",pointerEvents:"none"},children:m.jsx("path",{d,fill:p,fillRule:f})})}const a=t.text.segments&&t.text.segments.length>1,l=t.text.listMarker,o=Mw(t),s=Cw(t);l&&(o.display="list-item",o.listStylePosition="inside",o.paddingLeft="0.25em");const c=a?t.text.segments.map((d,f)=>m.jsx("span",{style:{fontSize:d.fontSize,fontFamily:`'${d.fontFamily}', sans-serif`,fontWeight:d.fontWeight,color:d.color,letterSpacing:d.letterSpacing||void 0,lineHeight:d.lineHeight?`${d.lineHeight}px`:void 0,...d.textDecoration?{textDecoration:d.textDecoration}:{}},children:_x(d.content)},f)):_x(t.text.content);return s?m.jsx("span",{style:s,children:m.jsx("span",{style:o,children:c})}):m.jsx("span",{style:o,children:c})}const Jb=N.memo(function t({node:a,mod:l,isRoot:o=!1,screenshotMode:s=!1,coveredByAncestor:c}){var R,E,T;const{selectNode:d,findNodeAsset:f,displayMode:p,hiddenNodeIds:g}=Ze(Pt(D=>({selectNode:D.selectNode,findNodeAsset:D.findNodeAsset,displayMode:D.displayMode,hiddenNodeIds:D.hiddenNodeIds}))),x=f(a.id),v=p==="map",w=(R=a.text)!=null&&R.content?`${a.name} - ${a.text.content}`:a.name,y=N.useMemo(()=>{var ne;if(!((ne=a.computed)!=null&&ne.maskInfo))return{maskChildId:void 0,hideMaskChild:!1};const{childId:D,coversParent:k,shouldHide:V,background:te}=a.computed.maskInfo;if(!k)return{maskChildId:D,hideMaskChild:!1};const J={},q=f(D);return q&&(J.WebkitMaskImage=`url(${q.url})`,J.maskImage=`url(${q.url})`,J.WebkitMaskSize="100% 100%",J.maskSize="100% 100%",J.WebkitMaskRepeat="no-repeat",J.maskRepeat="no-repeat"),te&&Object.assign(J,ds(te)),{maskChildId:D,hideMaskChild:V,styleUpdates:J}},[a,f]),S=N.useMemo(()=>Nw(a,o,!!x,c,l.nodes),[a,o,x,c,l]),C=y.styleUpdates?{...S,...y.styleUpdates}:S;if(!a.style.visible||g.has(a.id))return null;const j=!!x&&a.children.length===0,A=c||j,{maskChildId:_,hideMaskChild:z}=y;return m.jsxs("div",{"data-node-id":a.id,"data-type":a.type,"data-name":a.name,"data-parent-id":a.parentId??"","data-has-children":a.children.length>0,"data-has-asset":!!x,"data-effects-css-only":x&&((E=a.image)==null?void 0:E.effectsCssOnly)===!0?"true":void 0,"data-virtual":a.isVirtual?"true":void 0,"data-bbox":`${Math.round(a.bbox.x)},${Math.round(a.bbox.y)},${Math.round(a.bbox.width)},${Math.round(a.bbox.height)}`,"data-text":((T=a.text)==null?void 0:T.content)??"","aria-label":`${w} - ${a.type} - ${Math.round(a.bbox.width)}×${Math.round(a.bbox.height)}`,role:"region",className:`design-node ${v?"":"cursor-pointer"}`,style:{...C,...o&&s?{overflow:"visible"}:void 0},onClick:D=>{if(Ze.getState().isDragging){D.stopPropagation();return}D.stopPropagation();const k=gE(D.clientX,D.clientY);d(k??a.id)},children:[x&&!c&&m.jsx(xE,{asset:x,node:a}),gw(a,!!x,c)&&m.jsx(vE,{node:a}),a.children.map(D=>l.nodes[D]).filter(Boolean).map(D=>{var k;return m.jsx(t,{node:D,mod:l,coveredByAncestor:D.id===_?z&&!((k=D.style.strokes)!=null&&k.some(V=>V.width>0)):A},D.id)})]})});function Sd(t,a){let l=t.bbox.x,o=t.bbox.y,s=t.parentId;for(;s;){const c=a.nodes[s];if(!c||c.id===a.rootNodeId)break;l+=c.bbox.x,o+=c.bbox.y,s=c.parentId}return{x:l,y:o,w:t.bbox.width,h:t.bbox.height}}function bE({mod:t}){const a=Ze(x=>x.selectedNodeId),l=a?t.nodes[a]:void 0,o=N.useMemo(()=>l?rv(l,t):[],[l,t]),s=N.useMemo(()=>l?Zd(l,t):null,[l,t]),c=N.useMemo(()=>l?Tw(l,t):null,[l,t]);if(!l)return null;const d=Sd(l,t),f=o.slice(0,4),p=l.parentId?t.nodes[l.parentId]:void 0,g=p?p.id===t.rootNodeId?{x:0,y:0,w:p.bbox.width,h:p.bbox.height}:Sd(p,t):void 0;return m.jsxs("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%",zIndex:9999,overflow:"visible"},children:[s&&m.jsx(yE,{rect:d,padding:s}),c&&g&&m.jsx(wE,{nodeRect:d,parentRect:g,spacing:c}),f.map((x,v)=>{const w=t.nodes[x.to.id];if(!w)return null;const y=d,S=Sd(w,t);if(x.direction==="horizontal"){const T=y.x<S.x?y:S,D=y.x<S.x?S:y,k=T.x+T.w,V=D.x,te=Math.max(y.y,S.y),J=Math.min(y.y+y.h,S.y+S.h),q=(te+J)/2;return m.jsxs("g",{children:[m.jsx("line",{x1:k,y1:q,x2:V,y2:q,stroke:"#f43f5e",strokeWidth:1.5}),m.jsx("line",{x1:k,y1:q-8,x2:k,y2:q+8,stroke:"#f43f5e",strokeWidth:2}),m.jsx("line",{x1:V,y1:q-8,x2:V,y2:q+8,stroke:"#f43f5e",strokeWidth:2}),m.jsx(Dx,{x:(k+V)/2,y:q-6,value:x.distance})]},`h-${v}`)}const C=y.y<S.y?y:S,j=y.y<S.y?S:y,A=C.y+C.h,_=j.y,z=Math.max(y.x,S.x),R=Math.min(y.x+y.w,S.x+S.w),E=(z+R)/2;return m.jsxs("g",{children:[m.jsx("line",{x1:E,y1:A,x2:E,y2:_,stroke:"#f43f5e",strokeWidth:1.5}),m.jsx("line",{x1:E-8,y1:A,x2:E+8,y2:A,stroke:"#f43f5e",strokeWidth:2}),m.jsx("line",{x1:E-8,y1:_,x2:E+8,y2:_,stroke:"#f43f5e",strokeWidth:2}),m.jsx(Dx,{x:E+6,y:(A+_)/2,value:x.distance})]},`v-${v}`)})]})}function Dx({x:t,y:a,value:l}){const o=`${l}`,s=Math.max(32,o.length*12+10);return m.jsxs("g",{children:[m.jsx("rect",{x:t-s/2,y:a-10,width:s,height:20,rx:4,fill:"#f43f5e",opacity:.92}),m.jsx("text",{x:t,y:a+4,textAnchor:"middle",fill:"#fff",fontSize:14,fontFamily:"monospace",fontWeight:700,children:l})]})}function yE({rect:t,padding:a}){const l=[];if(a.top>2){const o=t.x+t.w/2;l.push(m.jsxs("g",{children:[m.jsx("line",{x1:o,y1:t.y,x2:o,y2:t.y+a.top,stroke:"#3b82f6",strokeWidth:1,strokeDasharray:"3 2"}),m.jsx(as,{x:o+6,y:t.y+a.top/2,value:a.top})]},"pt"))}if(a.bottom>2){const o=t.x+t.w/2,s=t.y+t.h-a.bottom,c=t.y+t.h;l.push(m.jsxs("g",{children:[m.jsx("line",{x1:o,y1:s,x2:o,y2:c,stroke:"#3b82f6",strokeWidth:1,strokeDasharray:"3 2"}),m.jsx(as,{x:o+6,y:(s+c)/2,value:a.bottom})]},"pb"))}if(a.left>2){const o=t.y+t.h/2;l.push(m.jsxs("g",{children:[m.jsx("line",{x1:t.x,y1:o,x2:t.x+a.left,y2:o,stroke:"#3b82f6",strokeWidth:1,strokeDasharray:"3 2"}),m.jsx(as,{x:t.x+a.left/2,y:o-6,value:a.left})]},"pl"))}if(a.right>2){const o=t.y+t.h/2,s=t.x+t.w-a.right,c=t.x+t.w;l.push(m.jsxs("g",{children:[m.jsx("line",{x1:s,y1:o,x2:c,y2:o,stroke:"#3b82f6",strokeWidth:1,strokeDasharray:"3 2"}),m.jsx(as,{x:(s+c)/2,y:o-6,value:a.right})]},"pr"))}return m.jsx(m.Fragment,{children:l})}function as({x:t,y:a,value:l}){const o=`${l}`,s=Math.max(28,o.length*10+10);return m.jsxs("g",{children:[m.jsx("rect",{x:t-s/2,y:a-9,width:s,height:18,rx:3,fill:"#3b82f6",opacity:.88}),m.jsx("text",{x:t,y:a+4,textAnchor:"middle",fill:"#fff",fontSize:12,fontFamily:"monospace",fontWeight:700,children:l})]})}const Xt="#10b981";function wE({nodeRect:t,parentRect:a,spacing:l}){const o=[];if(o.push(m.jsx("rect",{x:a.x,y:a.y,width:a.w,height:a.h,fill:"none",stroke:Xt,strokeWidth:1,strokeDasharray:"6 3",opacity:.5},"parent-outline")),l.top>0){const s=t.x+t.w/2;o.push(m.jsxs("g",{children:[m.jsx("line",{x1:s,y1:a.y,x2:s,y2:t.y,stroke:Xt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:s-4,y1:a.y,x2:s+4,y2:a.y,stroke:Xt,strokeWidth:1.5}),m.jsx("line",{x1:s-4,y1:t.y,x2:s+4,y2:t.y,stroke:Xt,strokeWidth:1.5}),m.jsx(os,{x:s+6,y:(a.y+t.y)/2,value:l.top})]},"parent-top"))}if(l.bottom>0){const s=t.x+t.w/2,c=t.y+t.h,d=a.y+a.h;o.push(m.jsxs("g",{children:[m.jsx("line",{x1:s,y1:c,x2:s,y2:d,stroke:Xt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:s-4,y1:c,x2:s+4,y2:c,stroke:Xt,strokeWidth:1.5}),m.jsx("line",{x1:s-4,y1:d,x2:s+4,y2:d,stroke:Xt,strokeWidth:1.5}),m.jsx(os,{x:s+6,y:(c+d)/2,value:l.bottom})]},"parent-bottom"))}if(l.left>0){const s=t.y+t.h/2;o.push(m.jsxs("g",{children:[m.jsx("line",{x1:a.x,y1:s,x2:t.x,y2:s,stroke:Xt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:a.x,y1:s-4,x2:a.x,y2:s+4,stroke:Xt,strokeWidth:1.5}),m.jsx("line",{x1:t.x,y1:s-4,x2:t.x,y2:s+4,stroke:Xt,strokeWidth:1.5}),m.jsx(os,{x:(a.x+t.x)/2,y:s-6,value:l.left})]},"parent-left"))}if(l.right>0){const s=t.y+t.h/2,c=t.x+t.w,d=a.x+a.w;o.push(m.jsxs("g",{children:[m.jsx("line",{x1:c,y1:s,x2:d,y2:s,stroke:Xt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:c,y1:s-4,x2:c,y2:s+4,stroke:Xt,strokeWidth:1.5}),m.jsx("line",{x1:d,y1:s-4,x2:d,y2:s+4,stroke:Xt,strokeWidth:1.5}),m.jsx(os,{x:(c+d)/2,y:s-6,value:l.right})]},"parent-right"))}return m.jsx(m.Fragment,{children:o})}function os({x:t,y:a,value:l}){const o=`${l}`,s=Math.max(28,o.length*10+10);return m.jsxs("g",{children:[m.jsx("rect",{x:t-s/2,y:a-9,width:s,height:18,rx:3,fill:Xt,opacity:.88}),m.jsx("text",{x:t,y:a+4,textAnchor:"middle",fill:"#fff",fontSize:12,fontFamily:"monospace",fontWeight:700,children:l})]})}function ey(t,a){for(const l of t.querySelectorAll("[data-node-id]"))if(l.dataset.nodeId===a)return l;return null}function $x(t,a,l){const o=ey(t,a);if(!o)return null;const s=t.getBoundingClientRect(),c=o.getBoundingClientRect(),d=Math.max(l,1e-4);return{id:a,x:(c.left-s.left)/d,y:(c.top-s.top)/d,width:c.width/d,height:c.height/d}}function SE({containerRef:t,moduleData:a,zoom:l}){const{selectedNodeId:o,highlightedNodeIds:s,hiddenNodeIds:c,displayMode:d}=Ze(Pt(j=>({selectedNodeId:j.selectedNodeId,highlightedNodeIds:j.highlightedNodeIds,hiddenNodeIds:j.hiddenNodeIds,displayMode:j.displayMode}))),[f,p]=N.useState(null),[g,x]=N.useState([]),v=d==="map";if(N.useLayoutEffect(()=>{const j=t.current;if(!j||v){p(null),x([]);return}const A=[...s].filter(T=>!c.has(T));let _=0;const z=()=>{_=0,p(o&&!c.has(o)?$x(j,o,l):null),x(A.flatMap(T=>{const D=$x(j,T,l);return D?[D]:[]}))},R=()=>{_||(_=window.requestAnimationFrame(z))};z(),window.addEventListener("resize",R);const E=typeof ResizeObserver>"u"?null:new ResizeObserver(R);E==null||E.observe(j);for(const T of[o,...A]){if(!T)continue;const D=ey(j,T);D&&(E==null||E.observe(D))}return()=>{_&&window.cancelAnimationFrame(_),window.removeEventListener("resize",R),E==null||E.disconnect()}},[t,c,s,v,a,o,l]),!f&&g.length===0)return null;const w=Math.max(l,1e-4),y=2/w,S=1/w,C=(j,A,_)=>m.jsx("rect",{x:j.x-S,y:j.y-S,width:j.width+S*2,height:j.height+S*2,fill:"none",stroke:A,strokeWidth:y},_);return m.jsxs("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%",zIndex:1e4,overflow:"visible"},children:[g.map(j=>C(j,"rgba(234, 88, 12, 0.9)",`hl-${j.id}`)),f&&C(f,"#2563eb","selected")]})}const At=22,ty=8,ny=7.5,uo=3,NE=100,CE="#ff4800",ME="#ff4800",Nd=20,jE=8,EE=10;function Id(t,a){return t.x<a.x+a.w&&t.x+t.w>a.x&&t.y<a.y+a.h&&t.y+t.h>a.y}function iy(t,a){return t.length>a?t.slice(0,a)+"…":t}function ay(t){return t.length*ny+ty}function zs(t,a,l){return Math.max(a,Math.min(t,l))}function AE(t,a,l,o,s){if(!a)return[];const c=TE(t,a,l,o,s);return OE(c,o,s)}function TE(t,a,l,o,s){const c=[];for(const d of t){const f=Ef(d.absoluteBbox,a,l);if(!zE(f,o,s))continue;const p=iy(d.name,jE),g=`${d.id} · ${p}`,x=ay(g),v=zs(f.x+f.width/2,0,o),w=zs(f.y+f.height/2,0,s),{idealX:y,idealY:S}=RE(v,w,x,o);c.push({nodeId:d.id,labelText:g,labelW:x,dotX:v,dotY:w,idealX:y,idealY:S})}return c.sort((d,f)=>d.idealY-f.idealY||d.idealX-f.idealX),c}function Ef(t,a,l){return{x:(t.x-a.x)*l.zoom+l.panX,y:(t.y-a.y)*l.zoom+l.panY,width:t.width*l.zoom,height:t.height*l.zoom}}function zE(t,a,l){return!(t.x+t.width<0||t.x>a||t.y+t.height<0||t.y>l)}function RE(t,a,l,o){let s=t,c=a-At-uo;return c<0&&(c=a+uo),s=zs(s,uo,o-l-uo),{idealX:s,idealY:c}}function OE(t,a,l){const o=[],s=[];for(const c of t){const d=kE(c,o,a,l);o.push({x:d.x,y:d.y,w:c.labelW,h:At}),s.push({nodeId:c.nodeId,labelText:c.labelText,labelW:c.labelW,...d,dotX:c.dotX,dotY:c.dotY})}return s}function kE(t,a,l,o){for(let s=0;s<40;s++){const c=t.idealY+s*(At+uo);if(c+At>o+10)break;const d=_E(t.idealX,t.labelW,l);for(const f of d){const p={x:f,y:c,w:t.labelW,h:At};if(!a.some(g=>Id(p,g)))return{x:f,y:c}}}return{x:t.idealX,y:Math.min(t.idealY,o-At-uo)}}function _E(t,a,l){const o=[t],s=t+a+4;s+a<=l&&o.push(s);const c=t-a-4;return c>=0&&o.push(c),o}function DE(t,a,l,o){return t<a?"left":a<t?"right":l<o/2?"left":"right"}function $E(t,a,l,o,s){if(!a)return new Map;const c=LE(l,a),d=[...t].sort((x,v)=>x.absoluteBbox.y-v.absoluteBbox.y),f=new Map,p=[],g={left:0,right:0};for(const x of d){const v=Ef(x.absoluteBbox,a,l),w=v.x+v.width/2,y=DE(g.left,g.right,w,o),S=UE(x,a,l,s,c,y,p);f.set(x.id,S),p.push({x:S.labelX,y:S.labelY,w:S.width,h:S.height});const{leftX:C}=oy(c,S.width),j=S.labelX<C+S.width?"left":"right";g[j]++}return f}function LE(t,a){return{left:t.panX,right:t.panX+a.width*t.zoom,top:t.panY}}function UE(t,a,l,o,s,c,d){const f=Ef(t.absoluteBbox,a,l),p=iy(t.name,EE),g=`${t.id} · ${p}`,x=ay(g),{leftX:v,rightX:w}=oy(s,x),y=zs(f.y+f.height/2-At/2,s.top,o-At-10),{labelX:S,labelY:C}=BE(c==="left"?v:w,y,x,d,c,v,w),{anchorX:j,anchorY:A}=HE(f,s,o,S);return{nodeId:t.id,labelX:S,labelY:C,anchorX:j,anchorY:A,width:x,height:At,labelText:g}}function oy(t,a){return{leftX:t.left-a-40,rightX:t.right+40}}function BE(t,a,l,o,s,c,d){let f=t,p=a,g={x:f,y:p,w:l,h:At},x=0;for(;o.some(v=>Id(g,v))&&x<Nd;)p+=At+8,g={x:f,y:p,w:l,h:At},x++;if(x>=Nd)for(f=s==="left"?d:c,p=a,g={x:f,y:p,w:l,h:At},x=0;o.some(v=>Id(g,v))&&x<Nd;)p+=At+8,g={x:f,y:p,w:l,h:At},x++;return{labelX:f,labelY:p}}function HE(t,a,l,o){const s=Math.max(t.x,a.left),c=Math.min(t.x+t.width,a.right),d=Math.max(t.y,a.top),f=Math.min(t.y+t.height,l);return{anchorX:o<a.left?s:c,anchorY:(d+f)/2}}function YE({camera:t,mod:a,areaRef:l}){const{selectedNodeId:o,selectNode:s}=Ze(Pt(w=>({selectedNodeId:w.selectedNodeId,selectNode:w.selectNode}))),{root:c,focusNode:d,directChildren:f}=N.useMemo(()=>{const w=a.nodes[a.rootNodeId],y=o??a.rootNodeId,S=a.nodes[y]??w,C=S?S.children.map(j=>a.nodes[j]).filter(j=>!!j&&j.style.visible):[];return{root:w,focusNode:S,directChildren:C}},[a.nodes,a.rootNodeId,o]),p=IE(l),g=GE(c,t,p.width),x=N.useMemo(()=>g==="tooltip"?AE(f,c==null?void 0:c.absoluteBbox,t,p.width,p.height):[],[g,f,c,t,p]),v=N.useMemo(()=>g==="line"?$E(f,c==null?void 0:c.absoluteBbox,t,p.width,p.height):new Map,[g,f,c,t,p.width,p.height]);return!c||!d?null:m.jsxs("svg",{"data-node-map-overlay":!0,className:"absolute inset-0 pointer-events-none z-40",width:p.width,height:p.height,children:[m.jsx(VE,{focusNode:d,childrenCount:f.length}),g==="tooltip"&&m.jsx(XE,{tooltips:x,onSelectNode:s}),g==="line"&&m.jsx(qE,{childNodes:f,labelPlacements:v,onSelectNode:s})]})}function IE(t){var l;const a=(l=t.current)==null?void 0:l.getBoundingClientRect();return{width:(a==null?void 0:a.width)??800,height:(a==null?void 0:a.height)??600}}function GE(t,a,l){const o=t?t.absoluteBbox.width*a.zoom:0,s=a.panX,c=l-(a.panX+o);return Math.max(s,c)>=NE?"line":"tooltip"}function VE({focusNode:t,childrenCount:a}){const{t:l}=gt(),o=l(`viewer.map.childCount.${a===1?"one":"other"}`,{count:a}),s=`${t.id} · ${t.name} (${o})`,c=s.length*ny+20;return m.jsxs("g",{transform:"translate(12, 12)",children:[m.jsx("rect",{x:"0",y:"0",width:c,height:"24",rx:"4",fill:"rgba(0,0,0,0.75)"}),m.jsx("text",{x:"10",y:"16",fill:"#fff",fontSize:"12",fontWeight:"700",fontFamily:"ui-monospace, monospace",children:s})]})}function XE({tooltips:t,onSelectNode:a}){return m.jsx(m.Fragment,{children:t.map(l=>m.jsxs("g",{className:"pointer-events-auto cursor-pointer",onClick:()=>a(l.nodeId),children:[m.jsx("circle",{cx:l.dotX,cy:l.dotY,r:"3",fill:"rgba(0,0,0,0.85)"}),m.jsx("rect",{x:l.x,y:l.y,width:l.labelW,height:At,rx:"3",fill:"rgba(0,0,0,0.82)"}),m.jsx("text",{x:l.x+ty,y:l.y+At/2+4,fill:"#fff",fontSize:"11",fontWeight:"600",fontFamily:"ui-monospace, monospace",style:{userSelect:"none"},children:l.labelText})]},l.nodeId))})}function qE({childNodes:t,labelPlacements:a,onSelectNode:l}){return m.jsx(m.Fragment,{children:t.map(o=>{const s=a.get(o.id);if(!s)return null;const c=s.labelX<s.anchorX?s.labelX+s.width:s.labelX,d=s.labelY+s.height/2;return m.jsxs("g",{className:"pointer-events-auto",onClick:()=>l(o.id),children:[m.jsx("line",{x1:s.anchorX,y1:s.anchorY,x2:c,y2:d,stroke:ME,strokeWidth:"2"}),m.jsx("circle",{cx:s.anchorX,cy:s.anchorY,r:"4",fill:CE}),m.jsx("text",{x:s.labelX+s.width/2,y:s.labelY+s.height/2+5,textAnchor:"middle",fill:"#fff",fontSize:"12",fontWeight:"600",fontFamily:"ui-monospace, monospace",style:{userSelect:"none"},children:s.labelText})]},o.id)})})}function PE(t,a){let l=t.absoluteBbox.x,o=t.absoluteBbox.y,s=t.absoluteBbox.x+t.absoluteBbox.width,c=t.absoluteBbox.y+t.absoluteBbox.height,d=t.parentId;for(;d;){const g=a.nodes[d];if(!g)break;g.style.overflow==="hidden"&&(l=Math.max(l,g.absoluteBbox.x),o=Math.max(o,g.absoluteBbox.y),s=Math.min(s,g.absoluteBbox.x+g.absoluteBbox.width),c=Math.min(c,g.absoluteBbox.y+g.absoluteBbox.height)),d=g.parentId}const f=Math.max(0,s-l),p=Math.max(0,c-o);return f>0&&p>0?{x:l,y:o,width:f,height:p}:{...t.absoluteBbox}}const QE=24;function ha(t,a){return Math.max(QE,t-a*2)}function ZE(t,a,l){const s=Math.min(ha(t.width,40)/l.bbox.width,ha(t.height,40)/l.bbox.height,2),c=Math.min(ha(t.width,60)/a.width,ha(t.height,60)/a.height,s*1.5),d=a.x-l.absoluteBbox.x,f=a.y-l.absoluteBbox.y;return{zoom:c,panX:(t.width-a.width*c)/2-d*c,panY:(t.height-a.height*c)/2-f*c}}function Lx({screenshotMode:t=!1}={}){const{t:a}=gt(),{mod:l,selectNode:o,displayMode:s,fitTargetNodeId:c,setFitTargetNodeId:d,canvasBgColor:f,toggleCanvasBgColor:p}=Ze(Pt(q=>({mod:q.getCurrentModule(),selectNode:q.selectNode,displayMode:q.displayMode,fitTargetNodeId:q.fitTargetNodeId,setFitTargetNodeId:q.setFitTargetNodeId,canvasBgColor:q.canvasBgColor,toggleCanvasBgColor:q.toggleCanvasBgColor}))),g=N.useRef(null),x=N.useRef(null),[v,w]=N.useState({zoom:1,panX:0,panY:0}),[y,S]=N.useState(!1),[C,j]=N.useState(!1),A=N.useRef({x:0,y:0}),_=N.useRef(s),z=N.useCallback(()=>{const q=g.current;if(!q||!l)return 1;const ne=q.getBoundingClientRect(),ae=l.nodes[l.rootNodeId];if(!ae)return 1;const oe=40,U=ha(ne.width,oe)/ae.bbox.width,Q=ha(ne.height,oe)/ae.bbox.height;return Math.min(U,Q,2)},[l]),R=N.useCallback(()=>{const q=g.current;if(!q||!l)return!1;const ne=q.getBoundingClientRect(),ae=l.nodes[l.rootNodeId];if(!ae)return!1;const oe=z(),U=ae.bbox.width,Q=ae.bbox.height;return w({zoom:oe,panX:(ne.width-U*oe)/2,panY:(ne.height-Q*oe)/2}),!0},[l,z]),E=N.useCallback(()=>{const q=g.current;if(!q||!l)return;const ne=q.getBoundingClientRect(),ae=l.nodes[l.rootNodeId];if(!ae)return;const oe=40,U=Math.min(ha(ne.width,oe)/ae.bbox.width,2),Q=ae.bbox.width;w({zoom:U,panX:(ne.width-Q*U)/2,panY:oe})},[l]);N.useEffect(()=>{if(!c||!l||!y)return;if(s==="visual"){d(null);return}const q=l.nodes[c],ne=g.current,ae=l.nodes[l.rootNodeId];!q||!ne||!ae||(w(ZE(ne.getBoundingClientRect(),PE(q,l),ae)),d(null))},[c,l,y,s,d]),N.useEffect(()=>{_.current!=="visual"&&s==="visual"&&y&&R(),_.current=s},[s,y,R]);const T=N.useCallback((q,ne,ae)=>{w(oe=>{const U=Math.max(.05,Math.min(10,oe.zoom*q)),Q=U/oe.zoom;return{zoom:U,panX:ne-(ne-oe.panX)*Q,panY:ae-(ae-oe.panY)*Q}})},[]),D=N.useCallback(q=>{const ne=g.current;if(!ne)return;const ae=ne.getBoundingClientRect();T(q,ae.width/2,ae.height/2)},[T]);N.useEffect(()=>{const q=g.current;if(!q)return;R()&&S(!0);const ne=ae=>{if(ae.preventDefault(),ae.ctrlKey||ae.metaKey){const oe=q.getBoundingClientRect(),U=ae.clientX-oe.left,Q=ae.clientY-oe.top,K=ae.deltaY>0?.92:1.08;T(K,U,Q)}else w(oe=>({...oe,panX:oe.panX-ae.deltaX,panY:oe.panY-ae.deltaY}))};return q.addEventListener("wheel",ne,{passive:!1}),()=>q.removeEventListener("wheel",ne)},[R,T]);const k=N.useCallback(q=>{q.button===0&&(q.target.closest("[data-node-id]")||o(null),q.preventDefault(),j(!0),A.current={x:q.clientX,y:q.clientY})},[o]),V=N.useCallback(()=>{const q=g.current;if(!q||!l)return;const ne=q.getBoundingClientRect(),ae=l.nodes[l.rootNodeId];if(!ae)return;const oe=z(),U=.01;w(Q=>{let K;if(oe>=1-U?K=(Q.zoom>=oe-U,oe):Q.zoom<oe-U?K=oe:Q.zoom<1-U?K=1:K=oe,Math.abs(K-oe)<U){const Z=ae.bbox.width,ie=ae.bbox.height;return{zoom:oe,panX:(ne.width-Z*oe)/2,panY:(ne.height-ie*oe)/2}}const de=ne.width/2,ee=ne.height/2,$=K/Q.zoom;return{zoom:K,panX:de-(de-Q.panX)*$,panY:ee-(ee-Q.panY)*$}})},[l,z]);N.useEffect(()=>{if(!C)return;const q=ae=>{const oe=ae.clientX-A.current.x,U=ae.clientY-A.current.y;(Math.abs(oe)>3||Math.abs(U)>3)&&Ze.getState().setIsDragging(!0),w(Q=>({...Q,panX:Q.panX+oe,panY:Q.panY+U})),A.current={x:ae.clientX,y:ae.clientY}},ne=()=>{j(!1),requestAnimationFrame(()=>{Ze.getState().setIsDragging(!1)})};return window.addEventListener("mousemove",q),window.addEventListener("mouseup",ne),()=>{window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",ne)}},[C]);const te=f==="dark"?"bg-[#0d0d0d]":"bg-white";if(!l)return m.jsx("main",{id:"canvas",className:te});const J=l.nodes[l.rootNodeId];return J?m.jsxs("main",{id:"canvas",ref:g,className:Ot("relative overflow-hidden",te,C?"cursor-grabbing":"cursor-grab"),onMouseDown:k,onDoubleClick:V,children:[m.jsxs("div",{ref:x,className:t?"will-change-transform":"will-change-transform transition-opacity duration-200",style:{width:J.bbox.width,height:J.bbox.height,position:"relative",transform:`translate(${v.panX}px, ${v.panY}px) scale(${v.zoom})`,transformOrigin:"0 0",opacity:t||y?1:0},children:[m.jsx(Jb,{node:J,mod:l,isRoot:!0,screenshotMode:t,coveredByAncestor:!1}),!t&&m.jsx(SE,{containerRef:x,moduleData:l,zoom:v.zoom}),m.jsx(bE,{mod:l})]}),s==="map"&&m.jsx(YE,{camera:v,mod:l,areaRef:g}),!t&&m.jsxs("div",{"data-screenshot-hide":!0,className:"absolute bottom-3 left-1/2 z-50 flex max-w-[calc(100vw-24px)] -translate-x-1/2 items-center gap-0.5 rounded-lg border border-white/10 bg-black/80 p-1 backdrop-blur-md sm:bottom-4",children:[m.jsxs(vl,{children:[m.jsx(bl,{asChild:!0,children:m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":a(f==="dark"?"viewer.canvas.switchLight":"viewer.canvas.switchDark"),className:"text-white/50 hover:text-white hover:bg-white/10 rounded-md",onClick:p,children:f==="dark"?m.jsx(ej,{className:"size-3"}):m.jsx(_M,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a(f==="dark"?"viewer.canvas.switchLight":"viewer.canvas.switchDark")})]}),m.jsx("div",{className:"h-3.5 w-px bg-white/10 mx-0.5"}),m.jsxs(vl,{children:[m.jsx(bl,{asChild:!0,children:m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":a("viewer.canvas.fitView"),className:"text-white/50 hover:text-white hover:bg-white/10 rounded-md",onClick:R,children:m.jsx(TM,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a("viewer.canvas.fitView")})]}),m.jsxs(vl,{children:[m.jsx(bl,{asChild:!0,children:m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":a("viewer.canvas.fitWidth"),className:"text-white/50 hover:text-white hover:bg-white/10 rounded-md",onClick:E,children:m.jsx($M,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a("viewer.canvas.fitWidth")})]}),m.jsx("div",{className:"h-3.5 w-px bg-white/10 mx-0.5"}),m.jsxs(vl,{children:[m.jsx(bl,{asChild:!0,children:m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":a("viewer.canvas.zoomOut"),className:"text-white/50 hover:text-white hover:bg-white/10 rounded-md",onClick:()=>D(1/1.25),children:m.jsx(yf,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a("viewer.canvas.zoomOut")})]}),m.jsxs("span",{className:"text-[10px] text-white/35 w-10 text-center tabular-nums select-none font-mono",children:[Math.round(v.zoom*100),"%"]}),m.jsxs(vl,{children:[m.jsx(bl,{asChild:!0,children:m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":a("viewer.canvas.zoomIn"),className:"text-white/50 hover:text-white hover:bg-white/10 rounded-md",onClick:()=>D(1.25),children:m.jsx(Sb,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a("viewer.canvas.zoomIn")})]})]})]}):m.jsx("main",{id:"canvas",className:te})}const FE="0.0.4",Ux="/mcp",Bx="2025-06-18",Hx=-32001;class wt extends Error{constructor(a,l,o="INVALID_RESPONSE",s){super(a),this.code=l,this.reason=o,this.domainCode=s,this.name="McpClientError"}}class WE{constructor(){_i(this,"requestId",0);_i(this,"sessionId",null);_i(this,"initialized",!1);_i(this,"negotiatedProtocolVersion",Bx);_i(this,"initializePromise",null)}async callTool(a,l,o){await this.ensureInitialized();let s;try{s=await this.request("tools/call",{name:a,arguments:l},o)}catch(d){if(!(d instanceof wt)||d.reason!=="SESSION_EXPIRED")throw d;await this.ensureInitialized(),s=await this.request("tools/call",{name:a,arguments:l},o)}const c=this.extractToolPayload(s);if(s.isError){const d=lA(c);throw new wt(d.message||`MCP tool ${a} failed`,void 0,"TOOL_ERROR",d.code)}return c}close(){const a=this.sessionId;this.resetSession(),this.initializePromise=null,a&&fetch(Ux,{method:"DELETE",headers:{Accept:"application/json, text/event-stream","MCP-Protocol-Version":this.negotiatedProtocolVersion,"MCP-Session-Id":a},keepalive:!0}).then(l=>{var o;return(o=l.body)==null?void 0:o.cancel()}).catch(()=>{})}async ensureInitialized(){if(!this.initialized)return this.initializePromise||(this.initializePromise=this.initialize().finally(()=>{this.initializePromise=null})),this.initializePromise}resetSession(){this.sessionId=null,this.initialized=!1}sessionExpiredError(a){return this.resetSession(),new wt(a,Hx,"SESSION_EXPIRED")}async initialize(){const a=await this.request("initialize",{protocolVersion:Bx,capabilities:{},clientInfo:{name:"tarot-pixel-view",version:FE}});a.protocolVersion&&(this.negotiatedProtocolVersion=a.protocolVersion),await this.notify("notifications/initialized"),this.initialized=!0}async request(a,l,o){const s=++this.requestId,c=await this.post({jsonrpc:"2.0",id:s,method:a,params:l},o),d=await this.readJsonRpcResponse(c,s);if("error"in d)throw d.error.code===Hx?this.sessionExpiredError(d.error.message):new wt(d.error.message,d.error.code,"RPC_ERROR");return d.result}async notify(a){const l=await this.post({jsonrpc:"2.0",method:a});if(!l.ok)throw new wt(`MCP notification failed with HTTP ${l.status}`,void 0,"REQUEST_FAILED")}async post(a,l){const o=this.sessionId!==null,s={Accept:"application/json, text/event-stream","Content-Type":"application/json","MCP-Protocol-Version":this.negotiatedProtocolVersion};this.sessionId&&(s["Mcp-Session-Id"]=this.sessionId);const c=await fetch(Ux,{method:"POST",headers:s,body:JSON.stringify(a),signal:l}),d=c.headers.get("Mcp-Session-Id");if(d&&(this.sessionId=d),!c.ok)throw c.status===404&&o?this.sessionExpiredError("The MCP session has expired"):new wt(`MCP request failed with HTTP ${c.status}`,void 0,"REQUEST_FAILED");return c}async readJsonRpcResponse(a,l){if(a.status===202||a.status===204)throw new wt("The MCP request did not return a JSON-RPC result",void 0,"EMPTY_RESPONSE");if((a.headers.get("content-type")??"").includes("text/event-stream")){const d=(await a.text()).split(/\r?\n\r?\n/).flatMap(f=>{const p=f.split(/\r?\n/).filter(g=>g.startsWith("data:")).map(g=>g.slice(5).trim()).join(`
255
+ `);if(!p)return[];try{return[JSON.parse(p)]}catch{return[]}}).find(f=>f.id===l);if(!d)throw new wt("The MCP SSE response did not include the matching result",void 0,"INVALID_RESPONSE");return d}return await a.json()}extractToolPayload(a){var o,s;if(a.structuredContent!==void 0)return a.structuredContent;const l=(s=(o=a.content)==null?void 0:o.find(c=>c.type==="text"))==null?void 0:s.text;if(l===void 0)throw new wt("The MCP tool response did not include structured data",void 0,"INVALID_RESPONSE");try{return JSON.parse(l)}catch{return l}}}const Ln=new WE;typeof window<"u"&&window.addEventListener("pagehide",()=>Ln.close());function Af(t,a){if(!t.data||!Array.isArray(t.data.modules))throw new wt(`MCP tool ${a} returned invalid design data`);return t.data}async function KE(t,a){const l=await Ln.callTool("design_get_data",{designId:t},a);return Af(l,"design_get_data")}async function JE(t,a){const l=await Ln.callTool("design_get_snapshot",{designId:t},a),o=Af(l,"design_get_snapshot");if(typeof l.revision!="string"||!l.revision)throw new wt("MCP tool design_get_snapshot returned an invalid revision");return{data:o,revision:l.revision}}async function eA(t,a){const l=await Ln.callTool("design_get_raw",{designId:t},a);return Af(l,"design_get_raw")}async function tA(t,a){const l=await Ln.callTool("design_get_revision",{designId:t},a);if(typeof l.revision!="string")throw new wt("MCP tool design_get_revision returned an invalid revision");return l.revision}async function oz(t,a){const l=await Ln.callTool("design_get_overview",{designId:t},a);if(!Array.isArray(l.modules)||l.modules.some(o=>!o||typeof o.moduleId!="string"||typeof o.name!="string"||!nA(o.bbox)||!iA(o.preview))||l.exportedAt!==void 0&&typeof l.exportedAt!="string")throw new wt("MCP tool design_get_overview returned an invalid module list");return l}function nA(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const a=t;return[a.x,a.y,a.width,a.height].every(l=>typeof l=="number"&&Number.isFinite(l))}function iA(t){if(t==null)return!0;if(typeof t!="object"||Array.isArray(t))return!1;const a=t;return typeof a.url=="string"&&typeof a.width=="number"&&Number.isFinite(a.width)&&typeof a.height=="number"&&Number.isFinite(a.height)}async function lz(t){const a=await Ln.callTool("design_list",{},t);if(!Array.isArray(a.designs))throw new wt("MCP tool design_list returned an invalid list");return a.designs}async function rz(t,a){const l=await Ln.callTool("design_delete",{designId:t},a);if(typeof l.deleted!="boolean")throw new wt("MCP tool design_delete returned an invalid result");return l.deleted}async function aA(t){const a=await Ln.callTool("font_registry_get",{},t);return Array.isArray(a.fonts)?a.fonts:[]}async function oA(t,a){const l=await Ln.callTool("design_reload",{designId:t},a);if(l.success!==!0||typeof l.revision!="string")throw new wt("MCP tool design_reload returned an invalid result");return{success:!0,revision:l.revision}}function lA(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const a=t.error;return!a||typeof a!="object"?{}:{code:typeof a.code=="string"?a.code:void 0,message:typeof a.message=="string"?a.message:void 0}}const rA={".ttf":"truetype",".otf":"opentype",".woff":"woff",".woff2":"woff2",".eot":"embedded-opentype",".svg":"svg"},Yx="tarot-pixel-custom-fonts",sA=6e4;function cA(t){if(typeof t!="string")return null;try{const a=new URL(t,window.location.origin);return a.origin!==window.location.origin||!/^\/local-fonts\/[a-f0-9]{64}\.woff2$/.test(a.pathname)?null:a.href}catch{return null}}function Cd(t){return t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/[\r\n\f]/g," ")}function uA(t){const a=t.split("?")[0],l=a.slice(a.lastIndexOf(".")).toLowerCase();return rA[l]||"truetype"}const dA=()=>{};let Gd=dA,wl=null,Ix=0,Gx=!1,Tf=new Map;async function fA(){return Gx&&Date.now()-Ix<sA?Gd:wl||(wl=(async()=>{const t=new Map,a=new Map,l=await aA();for(const s of l){if(typeof s.family!="string"||!Array.isArray(s.styles))continue;const c=s.family.trim().toLowerCase();let d=t.get(c);d||(d=new Map,t.set(c,d));let f=a.get(c);f||(f=new Set,a.set(c,f));for(const p of s.styles){const g=cA(p.url);typeof p.style=="string"&&/^(?:[1-9]\d{0,2}|1000)$/.test(p.style)&&g&&(d.set(p.style,g),f.add(p.style))}}const o=(s,c)=>{const d=t.get(s.trim().toLowerCase());return d==null?void 0:d.get(`${c}`)};return Gd=o,Tf=a,Ix=Date.now(),Gx=!0,o})().finally(()=>{wl=null}),wl)}function hA(t){return Tf.has(t.trim().toLowerCase())}function Vx(t,a){const l=Tf.get(t.trim().toLowerCase());return(l==null?void 0:l.has(`${a}`))??!1}function ly(){return Gd}function mA(t,a,l){const o=t.text;if(!o)return;const s=l(o.fontFamily,o.fontWeight);if(s){const c=`${o.fontFamily}::${o.fontWeight}`;a.has(c)||a.set(c,{fontFamily:o.fontFamily,fontWeight:o.fontWeight,fontUrl:s})}if(o.segments)for(const c of o.segments){const d=l(c.fontFamily,c.fontWeight);if(d){const f=`${c.fontFamily}::${c.fontWeight}`;a.has(f)||a.set(f,{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontUrl:d})}}}async function ry(t){const a=await fA(),l=new Map;for(const d of t.modules)for(const f of Object.values(d.nodes))mA(f,l,a);const o=document.getElementById(Yx);if(o&&o.remove(),l.size===0)return;const s=Array.from(l.values()).map(({fontFamily:d,fontWeight:f,fontUrl:p})=>`@font-face {
256
+ font-family: '${Cd(d)}';
257
+ src: url('${Cd(p)}') format('${uA(p)}');
258
+ font-weight: ${f};
259
+ font-display: swap;
260
+ }`).join(`
261
+
262
+ `),c=document.createElement("style");c.id=Yx,c.textContent=s,document.head.appendChild(c),await Promise.all(Array.from(l.values()).map(({fontFamily:d,fontWeight:f})=>document.fonts.load(`${f} 16px '${Cd(d)}'`))),await document.fonts.ready}var pA="Separator",Xx="horizontal",gA=["horizontal","vertical"],sy=N.forwardRef((t,a)=>{const{decorative:l,orientation:o=Xx,...s}=t,c=xA(o)?o:Xx,f=l?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return m.jsx(St.div,{"data-orientation":c,...f,...s,ref:a})});sy.displayName=pA;function xA(t){return gA.includes(t)}var vA=sy;function yt({className:t,orientation:a="horizontal",decorative:l=!0,...o}){return m.jsx(vA,{"data-slot":"separator",decorative:l,orientation:a,className:Ot("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",t),...o})}function bA(){const{locale:t,t:a}=gt(),l=N.useRef(t);l.current=t;const[o,s]=N.useState(!1),[c,d]=N.useState(!1),[f,p]=N.useState(!1),{designId:g,setExportData:x}=Ze(Pt(w=>({designId:w.designId,setExportData:w.setExportData}))),v=N.useCallback(async()=>{d(!0),p(!1);try{if(!g)return;await oA(g);const w=await KE(g);if(await ry(w),_d(w,l.current),Ze.getState().designId!==g)return;x(w)}catch{p(!0)}finally{d(!1)}},[g,x]);return m.jsxs("div",{className:"border rounded-md overflow-hidden",children:[m.jsxs("button",{type:"button",className:"flex items-center w-full px-2 py-1.5 text-[10px] font-medium uppercase tracking-widest text-muted-foreground hover:bg-muted/50 transition-colors",onClick:()=>s(!o),children:[o?m.jsx(Gs,{className:"size-3 mr-1"}):m.jsx(wo,{className:"size-3 mr-1"}),a("viewer.reload.title"),c&&m.jsx("span",{className:"ml-auto text-[9px] text-primary animate-pulse",children:a("viewer.reload.refreshing")})]}),o&&m.jsxs("div",{className:"px-2 pb-2 space-y-2",children:[m.jsx("p",{className:"text-[10px] text-muted-foreground",children:a("viewer.reload.description")}),f&&m.jsx("p",{className:"text-[10px] text-destructive",children:a("viewer.reload.failed")}),m.jsxs(gn,{variant:"outline",size:"sm",className:"w-full h-6 text-[10px]",onClick:v,disabled:c,children:[m.jsx(VM,{className:"size-3 mr-1"}),a("viewer.reload.action")]})]})]})}function yA(t,a,l,o){var g,x,v;const s=[],c=a.nodes[t];if(!c)return s;if(c.isVirtual)return s.push({type:"added",label:o("viewer.transform.virtualWrapper"),detail:o("viewer.transform.virtualDetail",{direction:((g=c.layout)==null?void 0:g.flexDirection)??"row",count:c.children.length})}),s;if(!l)return s;const d=l.nodes[t];if(!d)return s;if(d.parentId!==c.parentId){const w=d.parentId?l.nodes[d.parentId]:void 0,y=c.parentId?a.nodes[c.parentId]:void 0;s.push({type:"reparented",label:o("viewer.transform.parentChanged"),detail:`${(w==null?void 0:w.name)??d.parentId??o("viewer.transform.root")} → ${(y==null?void 0:y.name)??c.parentId??o("viewer.transform.root")}`})}const f=new Set(d.children),p=new Set(c.children);for(const w of c.children)if(!f.has(w)){const y=a.nodes[w];y!=null&&y.isVirtual&&s.push({type:"added",label:o("viewer.transform.virtualChild",{name:y.name}),detail:o("viewer.transform.groupedDetail",{count:y.children.length,direction:((x=y.layout)==null?void 0:x.flexDirection)??"row"})})}for(const w of d.children)if(!p.has(w)){const y=l.nodes[w],S=a.nodes[w];S&&S.parentId!==t?s.push({type:"reparented",label:o("viewer.transform.moved",{name:(y==null?void 0:y.name)??w}),detail:o("viewer.transform.nowUnder",{name:((v=a.nodes[S.parentId??""])==null?void 0:v.name)??S.parentId??o("viewer.transform.root")})}):S||s.push({type:"removed",label:o("viewer.transform.flattened",{name:(y==null?void 0:y.name)??w})})}return s.length===0&&d.children.length===c.children.length&&d.children.some((y,S)=>c.children[S]!==y)&&s.push({type:"reordered",label:o("viewer.transform.reordered")}),s}function wA({nodeId:t,mod:a}){var y;const{t:l}=gt(),[o,s]=N.useState(!1),[c,d]=N.useState(null),[f,p]=N.useState(!1),g=Ze(S=>S.selectNode),x=Ze(S=>S.designId);N.useEffect(()=>{if(!o||c||!x)return;const S=new AbortController;return p(!1),eA(x,S.signal).then(C=>{S.signal.aborted||d(C)}).catch(()=>{S.signal.aborted||p(!0)}),()=>S.abort()},[x,o,c]);const v=N.useMemo(()=>{if(c)return c.modules.find(S=>S.moduleId===a.moduleId)},[c,a.moduleId]),w=N.useMemo(()=>o?yA(t,a,v,l):[],[t,a,v,o,l]);return m.jsxs("div",{className:"border rounded-md overflow-hidden",children:[m.jsxs("button",{type:"button",className:"flex items-center w-full px-2 py-1.5 text-[10px] font-medium uppercase tracking-widest text-muted-foreground hover:bg-muted/50 transition-colors",onClick:()=>s(!o),children:[o?m.jsx(Gs,{className:"size-3 mr-1"}):m.jsx(wo,{className:"size-3 mr-1"}),l("viewer.transform.title")]}),o&&m.jsxs("div",{className:"px-2 pb-2 space-y-1",children:[!c&&!f&&m.jsx("p",{className:"text-[10px] text-muted-foreground animate-pulse",children:l("viewer.transform.loading")}),f&&m.jsx("p",{className:"text-[10px] text-destructive",children:l("viewer.transform.loadFailed")}),c&&w.length===0&&m.jsx("p",{className:"text-[10px] text-muted-foreground",children:l("viewer.transform.noChanges")}),w.map((S,C)=>m.jsxs("div",{className:`flex items-start gap-1.5 text-[11px] font-mono rounded px-1.5 py-0.5 ${S.type==="added"?"bg-emerald-50 text-emerald-700":S.type==="removed"?"bg-red-50 text-red-700":S.type==="reparented"?"bg-amber-50 text-amber-700":"bg-blue-50 text-blue-700"}`,children:[S.type==="added"&&m.jsx(Sb,{className:"size-3 shrink-0 mt-0.5"}),S.type==="removed"&&m.jsx(yf,{className:"size-3 shrink-0 mt-0.5"}),S.type==="reparented"&&m.jsx(eM,{className:"size-3 shrink-0 mt-0.5"}),m.jsxs("div",{children:[m.jsx("p",{className:"leading-tight",children:S.label}),S.detail&&m.jsx("p",{className:"text-[10px] opacity-70",children:S.detail})]})]},C)),v&&!((y=a.nodes[t])!=null&&y.isVirtual)&&v.nodes[t]&&m.jsxs("div",{className:"mt-1.5 pt-1.5 border-t",children:[m.jsx("p",{className:"text-[9px] uppercase tracking-widest text-muted-foreground mb-1",children:l("viewer.transform.originalChildren")}),m.jsx("div",{className:"space-y-0.5",children:v.nodes[t].children.map(S=>{const C=v.nodes[S],j=!!a.nodes[S],A=j&&a.nodes[S].parentId!==t;return m.jsxs("button",{className:`block w-full text-left text-[10px] font-mono px-1 py-0.5 rounded transition-colors ${A?"text-amber-600 hover:bg-amber-50":j?"text-muted-foreground hover:bg-muted/50":"text-red-400 line-through"}`,onClick:()=>j&&g(S),disabled:!j,children:[(C==null?void 0:C.name)??S,A&&l("viewer.transform.movedSuffix"),!j&&l("viewer.transform.goneSuffix")]},S)})})]})]})]})}const SA={decorative:"detail.hints.role.decorative",text:"detail.hints.role.text",container:"detail.hints.role.container",interactive:"detail.hints.role.interactive"},NA={"mask-child":"detail.hints.decorativeReason.maskChild","mask-layer":"detail.hints.decorativeReason.maskLayer","ghost-layer":"detail.hints.decorativeReason.ghostLayer","background-layer":"detail.hints.decorativeReason.backgroundLayer","ornamental-shape":"detail.hints.decorativeReason.ornamentalShape","separator-line":"detail.hints.decorativeReason.separator","horizontal-separator":"detail.hints.decorativeReason.separator","vertical-separator":"detail.hints.decorativeReason.separator"},CA={list:"detail.hints.layoutPattern.list",grid:"detail.hints.layoutPattern.grid","card-group":"detail.hints.layoutPattern.cardGroup","tab-bar":"detail.hints.layoutPattern.tabBar",carousel:"detail.hints.layoutPattern.carousel"},MA={"decorative-overlay":"detail.hints.stacking.decorativeOverlay","contained-overlay":"detail.hints.stacking.containedOverlay","overlapping-similar":"detail.hints.stacking.overlappingSimilar",floating:"detail.hints.stacking.floating",unknown:"detail.hints.stacking.unknown"},jA={card:"detail.hints.semantic.card","list-item":"detail.hints.semantic.listItem","nav-item":"detail.hints.semantic.navItem","avatar-name":"detail.hints.semantic.avatarName","thumbnail-title":"detail.hints.semantic.thumbnailTitle","icon-text":"detail.hints.semantic.iconText","label-value":"detail.hints.semantic.labelValue","media-block":"detail.hints.semantic.mediaBlock"};function Vd(t,a){return t(SA[a])}function cy(t,a){const l=NA[a];return l?t(l):a}function Ml(t,a){return`${t}.${a===1?"one":"other"}`}function EA(){const{t}=gt(),{selectedNodeId:a,displayMode:l,getCurrentModule:o}=Ze(Pt(d=>({selectedNodeId:d.selectedNodeId,displayMode:d.displayMode,getCurrentModule:d.getCurrentModule}))),s=o();if(!a||!s)return m.jsx("aside",{id:"detail-panel",className:"hidden md:flex items-center justify-center bg-white border-l overflow-hidden",children:m.jsx("p",{className:"text-xs text-muted-foreground",children:t("detail.empty.selectNode")})});const c=s.nodes[a];return c?l==="map"?m.jsx(OA,{node:c,mod:s}):m.jsx(AA,{node:c,mod:s}):m.jsx("aside",{id:"detail-panel",className:"hidden md:flex items-center justify-center bg-white border-l overflow-hidden",children:m.jsx("p",{className:"text-xs text-muted-foreground",children:t("detail.empty.nodeNotFound")})})}function AA({node:t,mod:a}){var R;const{locale:l,t:o}=gt(),{findNodeAsset:s,getNodePath:c,selectNode:d,designId:f}=Ze(Pt(E=>({findNodeAsset:E.findNodeAsset,getNodePath:E.getNodePath,selectNode:E.selectNode,designId:E.designId}))),p=N.useCallback(E=>{E.target.closest("[data-node-id]")||d(null)},[d]),g=s(t.id),x=c(t.id),v=N.useCallback(E=>s(E),[s]),w=N.useMemo(()=>bv(t,a,{findAsset:v,designId:f,fontUrlResolver:ly(),locale:l}),[t,a,v,f,l]),y=N.useMemo(()=>vs(t,g,l),[t,g,l]),S=t.layout??null,C=N.useMemo(()=>xv(t,a,l),[t,a,l]),j=N.useMemo(()=>rv(t,a),[t,a]),A=N.useMemo(()=>Zd(t,a),[t,a]),_=N.useMemo(()=>eS(a),[a]),z=N.useMemo(()=>nS(t.id,_),[t.id,_]);return m.jsx("aside",{id:"detail-panel",className:"hidden md:flex flex-col bg-white border-l overflow-hidden","data-node-id":t.id,onClick:p,children:m.jsx(Tl,{className:"h-full w-full",children:m.jsxs("div",{className:"p-3.5 space-y-4 max-w-full overflow-hidden",children:[m.jsxs("div",{id:"detail-header",className:"flex items-start gap-2.5 min-w-0",children:[m.jsx(Wb,{type:t.type,className:"mt-0.5 text-muted-foreground shrink-0"}),m.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[m.jsx("p",{className:"text-[13px] font-medium truncate",children:t.name}),m.jsxs("div",{className:"flex items-center gap-1.5 mt-1 min-w-0 flex-wrap",children:[m.jsx(Le,{variant:"secondary",className:"text-[10px] h-4 px-1.5 font-normal text-muted-foreground shrink-0",children:t.type}),t.meta.componentId&&m.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",title:o("detail.header.componentId",{id:t.meta.componentId}),children:["· ",t.meta.componentName||o("detail.header.componentFallback")]}),m.jsx("span",{className:"text-[10px] text-muted-foreground font-mono truncate",children:t.id})]})]})]}),x.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs("div",{id:"detail-path",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-2",children:o("detail.section.path")}),m.jsx("div",{className:"flex items-center flex-wrap gap-0.5 text-[11px]",children:x.map((E,T)=>m.jsxs("span",{className:"flex items-center gap-0.5",children:[T>0&&m.jsx(wo,{className:"size-2.5 text-muted-foreground/40 shrink-0"}),m.jsx("button",{className:E.id===t.id?"font-medium text-foreground":"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>d(E.id),children:E.name})]},E.id))})]})]}),m.jsx(yt,{}),y&&m.jsx(Sl,{id:"detail-css",title:o("detail.section.css"),icon:sM,defaultOpen:!0,children:m.jsxs("div",{className:"relative group/css",children:[m.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all leading-relaxed bg-muted/50 rounded-md p-2 text-foreground",children:m.jsx(_A,{text:y})}),m.jsx(gn,{variant:"ghost",size:"icon-xs",className:"absolute top-1 right-1 opacity-0 group-hover/css:opacity-100 transition-opacity","aria-label":o("detail.action.copyCss"),title:o("detail.action.copyCss"),onClick:()=>navigator.clipboard.writeText(y),children:m.jsx(yd,{className:"size-3"})})]})}),C&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs("div",{className:"rounded-md bg-muted/60 border p-2.5",children:[m.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[m.jsx("p",{className:"text-[11px] font-medium text-foreground/80",children:o("detail.section.compositeAnalysis")}),m.jsx(gn,{variant:"ghost",size:"icon-xs","aria-label":o("detail.action.copyCompositeAnalysis"),title:o("detail.action.copyCompositeAnalysis"),onClick:()=>{const E=TA(t,C,o);navigator.clipboard.writeText(E)},children:m.jsx(yd,{className:"size-3"})})]}),m.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:C.summary}),C.requiresScreenshot&&m.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:C.reviewInstruction}),C.warnings.length>0&&m.jsx("div",{className:"space-y-1 mb-2",children:C.warnings.map((E,T)=>m.jsx("p",{className:"text-[10px] text-muted-foreground",children:E},T))}),m.jsx("div",{className:"space-y-1.5",children:C.children.map(E=>{const T=s(E.nodeId),D=T&&E.type==="image";return m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] min-w-0",children:[m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 shrink-0",children:E.strategy==="likely-decorative"?o("detail.composite.strategy.decorative"):E.strategy==="needs-review"?o("detail.composite.strategy.review"):E.strategy==="keep-text"?o("detail.composite.strategy.text"):o("detail.composite.strategy.code")}),m.jsxs("button",{className:"text-primary hover:underline truncate min-w-0",onClick:()=>d(E.nodeId),title:`${E.nodeId} (${E.name})`,children:[E.nodeId," (",E.name,")"]}),m.jsx("span",{className:"text-muted-foreground truncate shrink text-[9px]",title:E.reason,children:E.reason}),m.jsxs("span",{className:"text-muted-foreground shrink-0 text-[9px]",children:["(",Math.round(E.coverageRatio*100),"%)"]})]}),D&&E.strategy==="needs-review"&&m.jsx("p",{className:"text-[9px] text-muted-foreground ml-6 mt-0.5",children:o("detail.composite.assetSuggestion",{file:T.fileName,width:T.width,height:T.height})})]},E.nodeId)})}),m.jsx(RA,{node:t,mod:a}),m.jsxs("p",{className:"text-[9px] text-muted-foreground/60 mt-2 font-mono",children:[o("detail.data.sourceId"),": ",t.sourceId]})]})]}),m.jsx(yt,{}),m.jsxs(Nl,{id:"detail-layout",title:o("detail.section.layout"),children:[m.jsx(be,{label:o("detail.field.position"),value:`${Math.round(t.absoluteBbox.x)}, ${Math.round(t.absoluteBbox.y)}`}),m.jsx(be,{label:o("detail.field.size"),value:`${Math.round(t.absoluteBbox.width)} x ${Math.round(t.absoluteBbox.height)}`}),m.jsx(be,{label:o("detail.field.parent"),value:t.parentId?((R=a.nodes[t.parentId])==null?void 0:R.name)??t.parentId:o("detail.value.rootNode")}),m.jsx(be,{label:o("detail.field.children"),value:String(t.children.length)})]}),t.hints&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsx(Sl,{id:"detail-hints",title:o("detail.section.hints"),icon:Bd,defaultOpen:!0,children:m.jsx(zA,{hints:t.hints,node:t,mod:a,selectNode:d})})]}),(S==null?void 0:S.layoutSource)==="design-tool"&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs(Sl,{id:"detail-layout-infer",title:o("detail.section.designToolLayout"),icon:Bd,children:[m.jsx(be,{label:o("detail.field.display"),value:S.display}),S.flexDirection&&m.jsx(be,{label:o("detail.field.mainAxis"),value:S.flexDirection}),typeof S.gap=="number"&&S.gap>0&&m.jsx(be,{label:o("detail.field.gap"),value:`${S.gap}px`}),S.justifyContent&&m.jsx(be,{label:o("detail.field.mainAxisAlignment"),value:S.justifyContent}),S.alignItems&&m.jsx(be,{label:o("detail.field.crossAxisAlignment"),value:S.alignItems})]})]}),(j.length>0||A)&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs(Sl,{id:"detail-spacing",title:o("detail.section.spacing"),icon:qM,defaultOpen:!0,children:[A&&m.jsxs("div",{className:"mb-2",children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:o("detail.spacing.padding")}),A.uniform?m.jsx(be,{label:o("detail.spacing.uniform"),value:`${A.top}px`}):m.jsxs(m.Fragment,{children:[m.jsx(be,{label:o("detail.direction.top"),value:`${A.top}px`}),m.jsx(be,{label:o("detail.direction.right"),value:`${A.right}px`}),m.jsx(be,{label:o("detail.direction.bottom"),value:`${A.bottom}px`}),m.jsx(be,{label:o("detail.direction.left"),value:`${A.left}px`})]})]}),j.length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:o("detail.spacing.siblings")}),j.slice(0,8).map((E,T)=>m.jsxs("div",{className:"flex items-center gap-1 py-0.5 text-[11px]",children:[m.jsx("button",{className:"text-primary hover:underline truncate max-w-[120px]",onClick:()=>d(E.to.id),children:E.to.name}),m.jsx("span",{className:"text-muted-foreground",children:E.direction==="horizontal"?o("detail.direction.horizontal"):o("detail.direction.vertical")}),m.jsxs(Le,{variant:"outline",className:"text-[10px] h-4 px-1 font-mono",children:[E.distance,"px"]})]},T)),j.length>8&&m.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:o(Ml("detail.more",j.length-8),{count:j.length-8})})]})]})]}),z.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsx(Sl,{id:"detail-component",title:o("detail.section.componentDetection"),icon:uM,children:z.map((E,T)=>m.jsxs("div",{className:"mb-2 last:mb-0",children:[m.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[m.jsxs(Le,{variant:"secondary",className:"text-[10px] h-4 px-1.5 font-mono",children:[E.instances.length,"x"]}),m.jsx("span",{className:"text-[11px] text-muted-foreground",children:o(Ml("detail.component.summary",E.childCount),{count:E.childCount,width:Math.round(E.avgSize.width),height:Math.round(E.avgSize.height)})})]}),m.jsxs("div",{className:"space-y-0.5",children:[E.instances.slice(0,5).map(D=>m.jsxs("button",{className:"block text-[11px] text-primary hover:underline truncate w-full text-left",onClick:()=>d(D.nodeId),children:[D.name,m.jsx("span",{className:"text-muted-foreground ml-1 font-mono",children:D.nodeId})]},D.nodeId)),E.instances.length>5&&m.jsx("p",{className:"text-[10px] text-muted-foreground",children:o(Ml("detail.more",E.instances.length-5),{count:E.instances.length-5})})]})]},T))})]}),m.jsx(yt,{}),m.jsxs(Nl,{id:"detail-style",title:o("detail.section.appearance"),children:[m.jsx(be,{label:o("detail.field.opacity"),value:String(t.style.opacity)}),t.style.borderRadius.some(E=>E>0)&&m.jsx(be,{label:o("detail.field.borderRadius"),value:t.style.borderRadius.join(", ")+"px"}),m.jsx(be,{label:o("detail.field.overflow"),value:t.style.overflow==="hidden"?o("detail.value.clipped"):o("detail.value.visible")}),t.style.blendMode!=="PASS_THROUGH"&&t.style.blendMode!=="NORMAL"&&m.jsx(be,{label:o("detail.field.blendMode"),value:t.style.blendMode}),t.style.fills.map((E,T)=>m.jsx(be,{label:o("detail.field.fill"),value:Ui(E,l)},`f${T}`)),t.style.strokes.map((E,T)=>m.jsx(be,{label:o("detail.field.stroke"),value:`${E.width}px ${E.color} (${E.position})`},`s${T}`)),t.style.shadows.map((E,T)=>m.jsx(be,{label:o("detail.field.shadow"),value:ov(E,t)},`sh${T}`))]}),t.text&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs(Nl,{id:"detail-text",title:o("detail.section.text"),children:[m.jsx(be,{label:o("detail.field.content"),value:t.text.content}),m.jsx(be,{label:o("detail.field.font"),value:t.text.fontFamily}),m.jsx(be,{label:o("detail.field.fontSize"),value:`${t.text.fontSize}px`}),m.jsx(be,{label:o("detail.field.fontWeight"),value:String(t.text.fontWeight)}),m.jsx(be,{label:o("detail.field.color"),value:t.text.color}),m.jsx(be,{label:o("detail.field.lineHeight"),value:t.text.lineHeight?`${t.text.lineHeight}px`:o("detail.value.automatic")}),m.jsx(be,{label:o("detail.field.horizontalAlignment"),value:t.text.textAlign}),t.text.textAlignVertical&&t.text.textAlignVertical!=="top"&&m.jsx(be,{label:o("detail.field.verticalAlignment"),value:t.text.textAlignVertical}),t.text.segments&&t.text.segments.length>1&&m.jsxs("div",{className:"mt-2",children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:o("detail.text.segments")}),m.jsx("div",{className:"space-y-1",children:t.text.segments.map((E,T)=>m.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[m.jsx("span",{className:"inline-block size-2.5 rounded-sm shrink-0 border",style:{backgroundColor:E.color}}),m.jsx("span",{className:"font-mono truncate",children:E.content}),m.jsx("span",{className:"text-muted-foreground shrink-0",children:E.color}),E.fontSize!==t.text.fontSize&&m.jsxs(Le,{variant:"outline",className:"text-[10px] h-4 px-1 font-mono shrink-0",children:[E.fontSize,"px"]})]},T))})]})]})]}),g&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs(Nl,{id:"detail-asset",title:o("detail.section.asset"),children:[m.jsx("div",{className:"flex items-center justify-center rounded-md overflow-hidden border bg-[repeating-conic-gradient(var(--color-muted)_0%_25%,transparent_0%_50%)] bg-size-[10px_10px] mb-2",children:m.jsx("img",{src:g.url,alt:g.fileName,className:"w-[80%] block object-contain"})}),m.jsx(be,{label:o("detail.field.file"),value:g.fileName}),m.jsx(be,{label:o("detail.field.size"),value:`${g.width} x ${g.height}`}),m.jsx(be,{label:o("detail.field.format"),value:g.format}),m.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[m.jsx("span",{className:"text-[11px] text-muted-foreground",children:o("detail.field.url")}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] font-mono text-primary hover:underline truncate max-w-[160px]",children:g.fileName}),m.jsx(gn,{variant:"ghost",size:"icon-xs",className:"shrink-0","aria-label":o("detail.action.copyAssetUrl"),title:o("detail.action.copyAssetUrl"),onClick:()=>navigator.clipboard.writeText(g.url),children:m.jsx(yd,{className:"size-2.5"})}),m.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer","aria-label":o("detail.action.openAsset"),title:o("detail.action.openAsset"),children:m.jsx(pM,{className:"size-2.5 text-muted-foreground hover:text-foreground"})})]})]})]})]}),m.jsx(yt,{}),m.jsx(Nl,{id:"detail-context",title:o("detail.section.context"),children:m.jsx(uy,{text:w,selectNode:d})})]})})})}function TA(t,a,l){let o=`${l("detail.export.compositeTitle",{name:t.name,id:t.id,sourceId:t.sourceId})}
263
+ `;if(o+=`${l("detail.export.size",{width:Math.round(t.absoluteBbox.width),height:Math.round(t.absoluteBbox.height)})}
264
+
265
+ `,o+=`${a.summary}
266
+
267
+ `,a.requiresScreenshot&&(o+=`${a.reviewInstruction}
268
+
269
+ `),a.warnings.length>0){for(const f of a.warnings)o+=`${f}
270
+ `;o+=`
271
+ `}const s=a.children.filter(f=>f.strategy==="likely-decorative"),c=a.children.filter(f=>f.strategy==="needs-review"),d=a.children.filter(f=>f.strategy==="keep-text"||f.strategy==="keep-code");if(s.length>0){o+=`${l("detail.export.decorativeHeading")}
272
+ `;for(const f of s)o+=`${l("detail.export.itemWithCoverage",{name:f.name,type:f.type,reason:f.reason,coverage:Math.round(f.coverageRatio*100)})}
273
+ `;o+=`
274
+ `}if(c.length>0){o+=`${l("detail.export.reviewHeading")}
275
+ `;for(const f of c)o+=`${l("detail.export.itemWithCoverage",{name:f.name,type:f.type,reason:f.reason,coverage:Math.round(f.coverageRatio*100)})}
276
+ `;o+=`
277
+ `}if(d.length>0){o+=`${l("detail.export.keepHeading")}
278
+ `;for(const f of d)o+=`${l("detail.export.item",{name:f.name,type:f.type,reason:f.reason})}
279
+ `}return o}function zA({hints:t,mod:a,selectNode:l}){var s,c,d;const{t:o}=gt();return m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[m.jsx(Le,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:Vd(o,t.role)}),t.isGhost&&m.jsx(Le,{variant:"outline",className:"text-[10px] h-4 px-1",children:o("detail.hints.badge.ghost")}),t.isBackground&&m.jsx(Le,{variant:"outline",className:"text-[10px] h-4 px-1",children:o("detail.hints.badge.background")}),t.isSeparator&&m.jsx(Le,{variant:"outline",className:"text-[10px] h-4 px-1",children:t.isSeparator==="horizontal"?o("detail.hints.badge.horizontalSeparator"):o("detail.hints.badge.verticalSeparator")}),t.scrollCandidate&&m.jsx(Le,{variant:"outline",className:"text-[10px] h-4 px-1 text-amber-600",children:o("detail.hints.badge.scrollCandidate")})]}),t.decorativeReason&&m.jsx(be,{label:o("detail.hints.field.decorativeReason"),value:cy(o,t.decorativeReason)}),t.containerType&&m.jsx(be,{label:o("detail.hints.field.containerType"),value:t.containerType==="transparent"?o("detail.hints.container.transparent"):o("detail.hints.container.visualBoundary")}),t.childrenAxis&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.childrenAxis")}),m.jsx(be,{label:o("detail.hints.field.xNonOverlapping"),value:t.childrenAxis.xNonOverlapping?o("detail.value.yesHorizontal"):o("detail.value.no")}),m.jsx(be,{label:o("detail.hints.field.yNonOverlapping"),value:t.childrenAxis.yNonOverlapping?o("detail.value.yesVertical"):o("detail.value.no")})]}),t.childrenSpacing&&t.childrenSpacing.length>0&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.childrenSpacing")}),t.childrenSpacing.map((f,p)=>m.jsx("div",{className:"space-y-0.5",children:m.jsx(be,{label:f.axis==="x"?o("detail.direction.horizontal"):o("detail.direction.vertical"),value:f.uniform?o("detail.hints.spacing.uniform",{gap:f.avgGap}):o("detail.hints.spacing.nonUniform",{gaps:f.gaps.slice(0,5).join(", "),suffix:f.gaps.length>5?"...":""})})},p))]}),t.childrenAlignment&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.childrenAlignment")}),t.childrenAlignment.topAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.top")}),t.childrenAlignment.bottomAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.bottom")}),t.childrenAlignment.centerYAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.centerY")}),t.childrenAlignment.leftAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.left")}),t.childrenAlignment.rightAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.right")}),t.childrenAlignment.centerXAligned&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.centerX")})]}),t.childrenSizeUniformity&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.sizeUniformity")}),m.jsx(be,{label:o("detail.hints.field.widthUniform"),value:t.childrenSizeUniformity.widthUniform?o("detail.value.yes"):o("detail.value.no")}),m.jsx(be,{label:o("detail.hints.field.heightUniform"),value:t.childrenSizeUniformity.heightUniform?o("detail.value.yes"):o("detail.value.no")}),m.jsx(be,{label:o("detail.hints.field.similarity"),value:t.childrenSizeUniformity.sizeRatio.toFixed(2)})]}),((s=t.overflow)==null?void 0:s.hasOverflow)&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.overflow")}),m.jsx(be,{label:o("detail.hints.field.direction"),value:t.overflow.direction==="x"?o("detail.direction.horizontal"):t.overflow.direction==="y"?o("detail.direction.vertical"):o("detail.direction.both")}),m.jsx(be,{label:o("detail.hints.field.containerViewport"),value:`${t.overflow.containerSize} / ${t.overflow.viewportSize}px`}),t.overflow.visibleChildren.length>0&&m.jsx("div",{className:"mt-1 space-y-0.5",children:t.overflow.visibleChildren.map(f=>m.jsxs("button",{className:"block text-[10px] text-primary hover:underline font-mono",onClick:()=>l(f.nodeId),children:[f.nodeId," (",f.name,") —"," ",f.visibility==="full"?o("detail.hints.visibility.full"):o("detail.hints.visibility.partial",{pixels:f.visiblePx})]},f.nodeId))})]}),t.stacking&&t.stacking.groups.length>0&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o(Ml("detail.hints.stackingGroups",t.stacking.groups.length),{count:t.stacking.groups.length})}),t.stacking.groups.map((f,p)=>m.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.jsxs(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1",children:[Math.round(f.overlapRatio*100),"%"]}),f.nodeIds.map(g=>{var x;return m.jsx(ao,{id:g,name:(x=a.nodes[g])==null?void 0:x.name,onClick:()=>l(g)},g)})]},p))]}),t.overlaps&&t.overlaps.length>0&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.overlaps")}),t.overlaps.map((f,p)=>{var g;return m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(ao,{id:f.targetId,name:(g=a.nodes[f.targetId])==null?void 0:g.name,onClick:()=>l(f.targetId)}),m.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[Math.round(f.ratio*100),"%"]})]},p)})]}),t.similarity&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.similarSiblings")}),m.jsx(be,{label:o("detail.hints.field.structureSignature"),value:t.similarity.signature}),m.jsx("div",{className:"flex items-center gap-1 flex-wrap mt-1",children:t.similarity.similarIds.map(f=>{var p;return m.jsx(ao,{id:f,name:(p=a.nodes[f])==null?void 0:p.name,onClick:()=>l(f)},f)})})]}),t.containedBy&&m.jsx(be,{label:o("detail.hints.field.containedBy"),value:((c=a.nodes[t.containedBy])==null?void 0:c.name)??t.containedBy}),t.grouping&&m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.grouping")}),t.grouping.groups.map((f,p)=>m.jsxs("div",{className:"space-y-0.5",children:[m.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1",children:o(`detail.hints.axis.${f.axis}`)}),f.spacing!==void 0&&m.jsxs(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1",children:[f.spacing,"px"]}),m.jsx("span",{className:"text-[9px] text-muted-foreground",children:o("detail.hints.confidence",{confidence:f.confidence})})]}),m.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:f.nodeIds.map(g=>{var x;return m.jsx(ao,{id:g,name:(x=a.nodes[g])==null?void 0:x.name,onClick:()=>l(g)},g)})})]},p)),t.grouping.ungrouped.length>0&&m.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.jsx("span",{className:"text-[9px] text-muted-foreground",children:o("detail.hints.ungrouped")}),t.grouping.ungrouped.map(f=>{var p;return m.jsx(ao,{id:f,name:(p=a.nodes[f])==null?void 0:p.name,onClick:()=>l(f)},f)})]}),t.grouping.interGroupAxis&&m.jsxs("p",{className:"text-[9px] text-muted-foreground",children:[o("detail.hints.interGroup",{axis:t.grouping.interGroupAxis==="vertical"?o("detail.hints.axis.vertical"):o("detail.hints.axis.horizontal")}),t.grouping.interGroupSpacing!==void 0&&o("detail.hints.interGroupSpacing",{spacing:t.grouping.interGroupSpacing}),t.grouping.interGroupAlignment&&o("detail.hints.interGroupAlignment",{alignment:t.grouping.interGroupAlignment})]})]}),t.contentFlow&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.contentFlow")}),m.jsx(be,{label:o("detail.hints.field.primaryDirection"),value:t.contentFlow.primaryDirection==="top-to-bottom"?o("detail.hints.flow.topToBottom"):o("detail.hints.flow.leftToRight")}),(d=t.contentFlow.sections)==null?void 0:d.map((f,p)=>m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1",children:o(`detail.hints.section.${f.role}`)}),f.nodeIds.map(g=>{var x;return m.jsx(ao,{id:g,name:(x=a.nodes[g])==null?void 0:x.name,onClick:()=>l(g)},g)})]},p))]}),t.constraint&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.constraints")}),t.constraint.fillsParentWidth&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.fillWidth")}),t.constraint.fillsParentHeight&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.fillHeight")}),t.constraint.centeredX&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.centerX")}),t.constraint.centeredY&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.centerY")}),t.constraint.symmetricPaddingX&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.symmetricX")}),t.constraint.symmetricPaddingY&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.symmetricY")}),t.constraint.intrinsicSize&&m.jsx(Le,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.intrinsic")}),t.constraint.paddingEstimate&&m.jsx(be,{label:o("detail.field.padding"),value:o("detail.hints.constraint.padding",{top:t.constraint.paddingEstimate.top,right:t.constraint.paddingEstimate.right,bottom:t.constraint.paddingEstimate.bottom,left:t.constraint.paddingEstimate.left})})]}),t.layoutPattern&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.layoutPattern",{type:o(CA[t.layoutPattern.type])})}),m.jsx("p",{className:"text-[9px] text-muted-foreground",children:t.layoutPattern.reason}),t.layoutPattern.columns&&t.layoutPattern.rows&&m.jsx(be,{label:o("detail.hints.layoutPattern.specification"),value:o("detail.hints.layoutPattern.specificationValue",{rows:t.layoutPattern.rows,columns:t.layoutPattern.columns})})]}),t.stackingDetail&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80 mb-1",children:o("detail.hints.stackingDetail",{type:o(MA[t.stackingDetail.type])})}),m.jsx("p",{className:"text-[9px] text-muted-foreground",children:t.stackingDetail.reason})]}),t.semantic&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("p",{className:"text-[10px] font-semibold text-foreground/80",children:o("detail.hints.semantic",{role:o(jA[t.semantic.role])})}),m.jsx("p",{className:"text-[9px] text-muted-foreground",children:t.semantic.reason})]})]})}function Sl({id:t,title:a,icon:l,defaultOpen:o=!1,children:s}){const[c,d]=N.useState(o);return m.jsxs("div",{id:t,children:[m.jsxs("button",{className:"flex items-center gap-1.5 w-full text-left group",onClick:()=>d(!c),children:[m.jsx(l,{className:"size-3 text-muted-foreground"}),m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground flex-1",children:a}),m.jsx(Gs,{className:`size-3 text-muted-foreground transition-transform ${c?"":"-rotate-90"}`})]}),c&&m.jsx("div",{className:"mt-2 space-y-px",children:s})]})}function Nl({id:t,title:a,children:l}){return m.jsxs("div",{id:t,children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-2",children:a}),m.jsx("div",{className:"space-y-px",children:l})]})}function be({label:t,value:a}){return m.jsxs("div",{className:"flex justify-between items-start gap-3 py-0.5",children:[m.jsx("span",{className:"text-[11px] text-muted-foreground shrink-0",children:t}),m.jsx("span",{className:"text-[11px] text-foreground text-right break-all font-mono leading-relaxed min-w-0",children:a})]})}function ao({id:t,name:a,onClick:l}){return m.jsxs("button",{className:"text-[10px] text-primary hover:underline font-mono",onClick:l,children:[t,a?` (${a})`:""]})}function uy({text:t,selectNode:a}){const l=/\b(node_[a-zA-Z0-9_-]+)\b/g,o=[];let s=0,c;for(;(c=l.exec(t))!==null;)c.index>s&&o.push(t.slice(s,c.index)),o.push({id:c[1]}),s=c.index+c[0].length;return s<t.length&&o.push(t.slice(s)),m.jsx("pre",{className:"text-[11px] text-muted-foreground font-mono whitespace-pre-wrap break-all leading-relaxed bg-muted/50 rounded-md p-2",children:o.map((d,f)=>typeof d=="string"?m.jsx("span",{children:d},f):m.jsx("button",{className:"text-primary hover:underline",onClick:()=>a(d.id),children:d.id},f))})}function RA({node:t,mod:a}){var A;const{t:l}=gt(),o=`composite-${t.id}`,s=240,c=t.bbox.width,d=t.bbox.height,f=(A=t.computed)==null?void 0:A.visualBounds,p=(f==null?void 0:f.minX)??0,g=(f==null?void 0:f.minY)??0,x=(f==null?void 0:f.maxX)??c,v=(f==null?void 0:f.maxY)??d,w=x-p,y=v-g,S=Math.min(s/w,1),C=Math.ceil(w*S)+4,j=Math.ceil(y*S)+4;return m.jsxs("div",{className:"mt-2",children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:l("detail.composite.preview")}),m.jsxs("div",{className:"rounded border overflow-hidden bg-[repeating-conic-gradient(var(--color-muted)_0%_25%,transparent_0%_50%)] bg-size-[8px_8px]",style:{width:C,height:j},children:[m.jsx("style",{children:`
280
+ #${o} [data-type="text"] { visibility: hidden !important; }
281
+ #${o} [data-node-id] { cursor: default !important; outline: none !important; box-shadow: none !important; }
282
+ `}),m.jsx("div",{id:o,style:{position:"relative",width:c,height:d,transform:`scale(${S})`,transformOrigin:"0 0",marginLeft:-p*S+2,marginTop:-g*S+2,pointerEvents:"none"},children:m.jsx(Jb,{node:t,mod:a,isRoot:!0,coveredByAncestor:!1})})]})]})}function OA({node:t,mod:a}){var w;const{locale:l,t:o}=gt(),{findNodeAsset:s,selectNode:c,designId:d}=Ze(Pt(y=>({findNodeAsset:y.findNodeAsset,selectNode:y.selectNode,designId:y.designId}))),f=s(t.id),p=N.useMemo(()=>vs(t,f,l),[t,f,l]),g=N.useCallback(y=>s(y),[s]),x=N.useMemo(()=>bv(t,a,{findAsset:g,designId:d,fontUrlResolver:ly(),locale:l}),[t,a,g,d,l]),v=N.useMemo(()=>{let y="";if(y+=`${o("detail.data.id")}: ${t.id}
283
+ `,y+=`${o("detail.data.name")}: ${t.name}
284
+ `,y+=`${o("detail.data.type")}: ${t.type}
285
+ `,y+=`${o("detail.data.sourceId")}: ${t.sourceId}
286
+ `,y+=`${o("detail.data.boundingBox")}: x=${Math.round(t.absoluteBbox.x)} y=${Math.round(t.absoluteBbox.y)} w=${Math.round(t.absoluteBbox.width)} h=${Math.round(t.absoluteBbox.height)}
287
+ `,y+=`${o("detail.data.parent")}: ${t.parentId??o("detail.data.root")}
288
+ `,y+=`${o("detail.data.children")}: ${t.children.length}
289
+ `,f&&(y+=`
290
+ ${o("detail.data.asset")}: ${f.fileName} (${f.width}x${f.height} ${f.format})
291
+ `,y+=`${o("detail.data.assetUrl")}: ${f.url}
292
+ `),t.text&&(y+=`
293
+ ${o("detail.data.text")}: "${t.text.content}"
294
+ `,y+=`${o("detail.data.font")}: ${t.text.fontFamily} ${t.text.fontSize}px w${t.text.fontWeight}
295
+ `,y+=`${o("detail.data.color")}: ${t.text.color}
296
+ `,y+=`${o("detail.data.alignment")}: ${t.text.textAlign}
297
+ `,t.text.textAlignVertical&&t.text.textAlignVertical!=="top"&&(y+=`${o("detail.data.verticalAlignment")}: ${t.text.textAlignVertical}
298
+ `),t.text.segments&&t.text.segments.length>1)){y+=`${o("detail.data.segmented",{count:t.text.segments.length})}
299
+ `;for(const S of t.text.segments){const C=[];S.color!==t.text.color&&C.push(`color: ${S.color}`),S.fontSize!==t.text.fontSize&&C.push(`${S.fontSize}px`),S.fontWeight!==t.text.fontWeight&&C.push(`w${S.fontWeight}`);const j=C.length>0?` [${C.join(", ")}]`:"";y+=` "${S.content.replace(/\n/g,"\\n")}"${j}
300
+ `}}y+=`
301
+ ${o("detail.data.style")}:
302
+ `,y+=` ${o("detail.data.opacity")}: ${t.style.opacity}
303
+ `,y+=` ${o("detail.data.overflow")}: ${t.style.overflow}
304
+ `,t.style.borderRadius.some(S=>S>0)&&(y+=` ${o("detail.data.radius")}: ${t.style.borderRadius.join(" ")}px
305
+ `);for(const S of t.style.fills)y+=` ${o("detail.data.fill")}: ${Ui(S,l)}
306
+ `;for(const S of t.style.strokes)y+=` ${o("detail.data.stroke")}: ${S.width}px ${S.color} (${S.position})
307
+ `;for(const S of t.style.shadows)y+=` ${ov(S,t)}
308
+ `;if(t.children.length>0){y+=`
309
+ ${o("detail.data.childList")}:
310
+ `;for(const S of t.children){const C=a.nodes[S];C&&(y+=` ${C.id} (${C.name}) ${C.type} ${Math.round(C.bbox.width)}x${Math.round(C.bbox.height)}`,C.text&&(y+=` "${C.text.content}"`),y+=`
311
+ `)}}return y},[t,a,f,l,o]);return m.jsx("aside",{id:"detail-panel",className:"hidden md:flex flex-col bg-white border-l overflow-hidden","data-node-id":t.id,children:m.jsx(Tl,{className:"h-full w-full",children:m.jsxs("div",{className:"p-3.5 space-y-3 max-w-full overflow-hidden",children:[m.jsxs("div",{id:"detail-header",children:[m.jsx("p",{className:"text-[13px] font-mono font-medium",children:t.name}),m.jsxs("p",{className:"text-[10px] text-muted-foreground font-mono",children:[t.id," · ",t.type]})]}),m.jsx(bA,{}),m.jsx(wA,{nodeId:t.id,mod:a}),m.jsx(yt,{}),m.jsxs("div",{id:"detail-plain-text",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o("detail.section.nodeInfo")}),m.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all leading-relaxed text-foreground bg-muted/50 rounded-md p-2",children:v})]}),t.hints&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs("div",{id:"detail-hints-data",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o("detail.section.rawHints")}),m.jsx("div",{className:"space-y-1.5",children:m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"text-[11px] font-medium",children:Vd(o,t.hints.role)}),t.hints.decorativeReason&&m.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",cy(o,t.hints.decorativeReason),")"]})]})}),m.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all leading-relaxed text-foreground bg-muted/50 rounded-md p-2 mt-1.5",children:JSON.stringify(t.hints,null,2)})]})]}),((w=t.layout)==null?void 0:w.layoutSource)==="design-tool"&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs("div",{id:"detail-layout-info",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o("detail.section.designToolLayout")}),m.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all leading-relaxed text-foreground bg-muted/50 rounded-md p-2",children:Object.entries(t.layout).filter(([,y])=>y!==void 0).map(([y,S])=>`${y}: ${S}`).join(`
312
+ `)})]})]}),m.jsx(yt,{}),m.jsxs("div",{id:"detail-css",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o("detail.section.css")}),m.jsx("pre",{className:"text-[11px] font-mono whitespace-pre-wrap break-all leading-relaxed text-foreground bg-muted/50 rounded-md p-2",children:p})]}),m.jsx(yt,{}),m.jsxs("div",{id:"detail-context",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o("detail.section.compactContext")}),m.jsx(uy,{text:x,selectNode:c})]}),t.children.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{}),m.jsxs("div",{id:"detail-children",children:[m.jsx("p",{className:"text-[10px] font-medium uppercase tracking-widest text-muted-foreground mb-1",children:o(Ml("detail.section.children",t.children.length),{count:t.children.length})}),m.jsx("div",{className:"space-y-0.5",children:t.children.map(y=>{var j,A,_,z;const S=a.nodes[y];if(!S)return null;const C=(j=S.hints)==null?void 0:j.role;return m.jsxs("button",{className:"block w-full text-left text-[11px] font-mono hover:bg-muted/50 px-1.5 py-0.5 rounded transition-colors",onClick:()=>c(y),children:[m.jsx("span",{className:"text-primary",children:S.id})," ",m.jsxs("span",{className:"text-muted-foreground",children:["(",S.name,")"]})," ",m.jsxs("span",{className:"text-muted-foreground",children:[S.type,C?` · ${Vd(o,C)}`:""]}),((A=S.hints)==null?void 0:A.isSeparator)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.separator")}),((_=S.hints)==null?void 0:_.isBackground)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.background")}),((z=S.hints)==null?void 0:z.isGhost)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.ghost")})]},y)})})]})]})]})})})}const kA=/url\(['"]?([^'")\s]+)['"]?\)/g;function _A({text:t}){const a=[];let l=0;for(const o of t.matchAll(kA)){const s=o.index;s>l&&a.push(t.slice(l,s)),a.push({url:o[1]}),l=s+o[0].length}return l<t.length&&a.push(t.slice(l)),a.length<=1?m.jsx(m.Fragment,{children:t}):m.jsx(m.Fragment,{children:a.map((o,s)=>{if(typeof o=="string")return m.jsx("span",{children:o},s);const c=/\.(png|jpg|jpeg|gif|svg|webp)(\?|$)/i.test(o.url);return m.jsxs(xf,{openDelay:200,closeDelay:100,children:[m.jsx(vf,{asChild:!0,children:m.jsxs("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline cursor-pointer",onClick:d=>d.stopPropagation(),children:["url('",o.url,"')"]})}),c&&m.jsxs(bf,{side:"left",className:"w-48 p-1.5",children:[m.jsx("img",{src:o.url,alt:"",className:"w-full rounded border bg-[repeating-conic-gradient(var(--color-muted)_0%_25%,transparent_0%_50%)] bg-size-[8px_8px]"}),m.jsx("p",{className:"text-[10px] text-muted-foreground mt-1 truncate font-mono",children:o.url.split("/").pop()})]})]},s)})})}const DA=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong","helvetica","helvetica neue","arial","arial black","arial narrow","times","times new roman","courier","courier new","georgia","palatino","palatino linotype","book antiqua","verdana","tahoma","trebuchet ms","impact","comic sans ms","geneva","monaco","menlo","optima","futura","gill sans","apple color emoji","apple system","-apple-system","sf pro","sf pro text","sf pro display","sf compact","segoe ui","segoe ui emoji","segoe ui symbol","calibri","cambria","candara","constantia","corbel","consolas","lucida console","lucida sans unicode","lucida grande","symbol","wingdings","webdings","roboto","noto sans","noto serif","noto sans sc","noto serif sc","droid sans","droid serif","droid sans mono","simsun","宋体","simhei","黑体","microsoft yahei","微软雅黑","microsoft jhenghei","微軟正黑體","kaiti","楷体","stfangsong","stkaiti","stsong","stheiti","stxihei","pingfang sc","pingfang tc","pingfang hk","hiragino sans gb","hiragino mincho pro","hiragino kaku gothic pro","meiryo","yu gothic","yu mincho","ms gothic","ms mincho","malgun gothic","apple sd gothic neo"]);function $A(t){return hA(t)?"custom":DA.has(t.trim().toLowerCase())?"builtin":"unknown"}function LA(t){const a=new Map,l=(o,s,c)=>{let d=a.get(o);d||(d={count:0,sizes:new Set,weights:new Set},a.set(o,d)),d.count++,d.sizes.add(s),d.weights.add(c)};for(const o of Object.values(t.nodes))if(o.text&&(l(o.text.fontFamily,o.text.fontSize,o.text.fontWeight),o.text.segments))for(const s of o.text.segments)s.fontFamily!==o.text.fontFamily&&l(s.fontFamily,s.fontSize,s.fontWeight);return[...a.entries()].map(([o,s])=>({fontFamily:o,count:s.count,fontSizes:[...s.sizes].sort((c,d)=>c-d),fontWeights:[...s.weights].sort((c,d)=>c-d)})).sort((o,s)=>s.count-o.count)}function UA(t,a){var o;const l=[];for(const s of Object.values(t.nodes))if(s.text){if(s.text.fontFamily===a){l.push(s.id);continue}(o=s.text.segments)!=null&&o.some(c=>c.fontFamily===a)&&l.push(s.id)}return l}function BA({mod:t}){const{t:a}=gt(),[l,o]=N.useState(!1),[s,c]=N.useState(null),d=N.useRef(null),f=N.useMemo(()=>LA(t),[t]),{setHighlightedNodes:p,clearHighlightedNodes:g}=Ze(Pt(w=>({setHighlightedNodes:w.setHighlightedNodes,clearHighlightedNodes:w.clearHighlightedNodes}))),x=N.useCallback(w=>{if(s===w)c(null),g();else{c(w);const y=UA(t,w);p(y)}},[s,t,p,g]);if(N.useEffect(()=>{if(!l)return;const w=y=>{d.current&&!d.current.contains(y.target)&&(o(!1),c(null),g())};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[l,g]),f.length===0)return null;const v=a(`viewer.font.count.${f.length===1?"one":"other"}`,{count:f.length});return m.jsxs("div",{className:"relative",ref:d,children:[m.jsxs("button",{type:"button","aria-label":v,title:a("viewer.font.usedInModule"),className:`flex items-center gap-1 whitespace-nowrap rounded-md px-1.5 py-1 text-[11px] transition-colors sm:px-2 ${l?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,onClick:()=>{const w=!l;o(w),w||(c(null),g())},children:[m.jsx(Nb,{className:"size-3"}),m.jsx("span",{className:"hidden sm:inline",children:v})]}),l&&m.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 max-h-80 w-[min(18rem,calc(100vw-24px))] overflow-auto rounded-lg border bg-white shadow-lg",children:[m.jsx("div",{className:"sticky top-0 bg-white border-b px-3 py-1.5",children:m.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:a("viewer.font.usedInModule")})}),m.jsx("div",{className:"divide-y",children:f.map(w=>{const y=$A(w.fontFamily),S=y==="custom"?w.fontWeights.filter(A=>!Vx(w.fontFamily,A)):[],C=S.length>0,j={custom:{label:a("viewer.font.custom"),className:"bg-blue-50 text-blue-600 border-blue-200 hover:bg-blue-50"},builtin:{label:a("viewer.font.builtin"),className:"bg-muted text-muted-foreground border-transparent hover:bg-muted"},unknown:{label:a("viewer.font.missing"),className:"bg-orange-50 text-orange-500 border-orange-200 hover:bg-orange-50"}};return m.jsxs("div",{className:`px-3 py-2 space-y-1 cursor-pointer transition-colors ${s===w.fontFamily?"bg-primary/10":"hover:bg-muted/50"}`,onClick:()=>x(w.fontFamily),children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsx("span",{className:`text-xs font-medium truncate ${s===w.fontFamily?"text-primary":""}`,style:{fontFamily:`'${w.fontFamily}', sans-serif`},children:w.fontFamily}),m.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[m.jsx(Le,{variant:"outline",className:`text-[10px] h-4 px-1.5 font-normal ${j[y].className}`,children:j[y].label}),m.jsx(Le,{variant:"secondary",className:"text-[10px] h-4 px-1.5 font-normal text-muted-foreground",children:w.count})]})]}),m.jsxs("div",{className:"flex gap-x-3 text-[10px] text-muted-foreground",children:[m.jsxs("span",{children:[w.fontSizes.join(", "),"px"]}),m.jsx("span",{className:"flex items-center gap-1",children:w.fontWeights.map(A=>{const _=y==="custom"&&!Vx(w.fontFamily,A);return m.jsxs("span",{className:`inline-flex items-center gap-0.5 ${_?"text-amber-500":""}`,title:_?a("viewer.font.weightMissing",{weight:A}):void 0,children:["w",A,_&&m.jsx("span",{className:"text-[9px]",children:"⚠"})]},A)})})]}),C&&m.jsx("p",{className:"text-[10px] text-amber-500 leading-tight",children:a("viewer.font.weightsMissing",{weights:S.join(", w")})})]},w.fontFamily)})})]})]})}var ls=0,zn=null;function HA(){N.useEffect(()=>{zn||(zn={start:qx(),end:qx()});const{start:t,end:a}=zn;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),ls++,()=>{ls===1&&(zn==null||zn.start.remove(),zn==null||zn.end.remove(),zn=null),ls=Math.max(0,ls-1)}},[])}function qx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Md="focusScope.autoFocusOnMount",jd="focusScope.autoFocusOnUnmount",Px={bubbles:!1,cancelable:!0},YA="FocusScope",dy=N.forwardRef((t,a)=>{const{loop:l=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...d}=t,[f,p]=N.useState(null),g=an(s),x=an(c),v=N.useRef(null),w=Tt(a,p),y=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(o){let C=function(z){if(y.paused||!f)return;const R=z.target;f.contains(R)?v.current=R:Li(v.current,{select:!0})},j=function(z){if(y.paused||!f)return;const R=z.relatedTarget;R!==null&&(f.contains(R)||Li(v.current,{select:!0}))},A=function(z){if(document.activeElement===document.body)for(const E of z)E.removedNodes.length>0&&Li(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",j);const _=new MutationObserver(A);return f&&_.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",j),_.disconnect()}}},[o,f,y.paused]),N.useEffect(()=>{if(f){Zx.add(y);const C=document.activeElement;if(!f.contains(C)){const A=new CustomEvent(Md,Px);f.addEventListener(Md,g),f.dispatchEvent(A),A.defaultPrevented||(IA(PA(fy(f)),{select:!0}),document.activeElement===C&&Li(f))}return()=>{f.removeEventListener(Md,g),setTimeout(()=>{const A=new CustomEvent(jd,Px);f.addEventListener(jd,x),f.dispatchEvent(A),A.defaultPrevented||Li(C??document.body,{select:!0}),f.removeEventListener(jd,x),Zx.remove(y)},0)}}},[f,g,x,y]);const S=N.useCallback(C=>{if(!l&&!o||y.paused)return;const j=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(j&&A){const _=C.currentTarget,[z,R]=GA(_);z&&R?!C.shiftKey&&A===R?(C.preventDefault(),l&&Li(z,{select:!0})):C.shiftKey&&A===z&&(C.preventDefault(),l&&Li(R,{select:!0})):A===_&&C.preventDefault()}},[l,o,y.paused]);return m.jsx(St.div,{tabIndex:-1,...d,ref:w,onKeyDown:S})});dy.displayName=YA;function IA(t,{select:a=!1}={}){const l=document.activeElement;for(const o of t)if(Li(o,{select:a}),document.activeElement!==l)return}function GA(t){const a=fy(t),l=Qx(a,t),o=Qx(a.reverse(),t);return[l,o]}function fy(t){const a=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Qx(t,a){const l=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(l?!o.checkVisibility({checkVisibilityCSS:!0}):VA(o,{upTo:a})))return o}function VA(t,{upTo:a}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(a!==void 0&&t===a)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function XA(t){return t instanceof HTMLInputElement&&"select"in t}function Li(t,{select:a=!1}={}){if(t&&t.focus){const l=document.activeElement;t.focus({preventScroll:!0}),t!==l&&XA(t)&&a&&t.select()}}var Zx=qA();function qA(){let t=[];return{add(a){const l=t[0];a!==l&&(l==null||l.pause()),t=Fx(t,a),t.unshift(a)},remove(a){var l;t=Fx(t,a),(l=t[0])==null||l.resume()}}}function Fx(t,a){const l=[...t],o=l.indexOf(a);return o!==-1&&l.splice(o,1),l}function PA(t){return t.filter(a=>a.tagName!=="A")}var QA=function(t){if(typeof document>"u")return null;var a=Array.isArray(t)?t[0]:t;return a.ownerDocument.body},oo=new WeakMap,rs=new WeakMap,ss={},Ed=0,hy=function(t){return t&&(t.host||hy(t.parentNode))},ZA=function(t,a){return a.map(function(l){if(t.contains(l))return l;var o=hy(l);return o&&t.contains(o)?o:(console.error("aria-hidden",l,"in not contained inside",t,". Doing nothing"),null)}).filter(function(l){return!!l})},FA=function(t,a,l,o){var s=ZA(a,Array.isArray(t)?t:[t]);ss[l]||(ss[l]=new WeakMap);var c=ss[l],d=[],f=new Set,p=new Set(s),g=function(v){!v||f.has(v)||(f.add(v),g(v.parentNode))};s.forEach(g);var x=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(w){if(f.has(w))x(w);else try{var y=w.getAttribute(o),S=y!==null&&y!=="false",C=(oo.get(w)||0)+1,j=(c.get(w)||0)+1;oo.set(w,C),c.set(w,j),d.push(w),C===1&&S&&rs.set(w,!0),j===1&&w.setAttribute(l,"true"),S||w.setAttribute(o,"true")}catch(A){console.error("aria-hidden: cannot operate on ",w,A)}})};return x(a),f.clear(),Ed++,function(){d.forEach(function(v){var w=oo.get(v)-1,y=c.get(v)-1;oo.set(v,w),c.set(v,y),w||(rs.has(v)||v.removeAttribute(o),rs.delete(v)),y||v.removeAttribute(l)}),Ed--,Ed||(oo=new WeakMap,oo=new WeakMap,rs=new WeakMap,ss={})}},WA=function(t,a,l){l===void 0&&(l="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),s=QA(t);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),FA(o,s,l,"aria-hidden")):function(){return null}},Rn=function(){return Rn=Object.assign||function(a){for(var l,o=1,s=arguments.length;o<s;o++){l=arguments[o];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(a[c]=l[c])}return a},Rn.apply(this,arguments)};function my(t,a){var l={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&a.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(t);s<o.length;s++)a.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(t,o[s])&&(l[o[s]]=t[o[s]]);return l}function KA(t,a,l){if(l||arguments.length===2)for(var o=0,s=a.length,c;o<s;o++)(c||!(o in a))&&(c||(c=Array.prototype.slice.call(a,0,o)),c[o]=a[o]);return t.concat(c||Array.prototype.slice.call(a))}var ps="right-scroll-bar-position",gs="width-before-scroll-bar",JA="with-scroll-bars-hidden",eT="--removed-body-scroll-bar-size";function Ad(t,a){return typeof t=="function"?t(a):t&&(t.current=a),t}function tT(t,a){var l=N.useState(function(){return{value:t,callback:a,facade:{get current(){return l.value},set current(o){var s=l.value;s!==o&&(l.value=o,l.callback(o,s))}}}})[0];return l.callback=a,l.facade}var nT=typeof window<"u"?N.useLayoutEffect:N.useEffect,Wx=new WeakMap;function iT(t,a){var l=tT(null,function(o){return t.forEach(function(s){return Ad(s,o)})});return nT(function(){var o=Wx.get(l);if(o){var s=new Set(o),c=new Set(t),d=l.current;s.forEach(function(f){c.has(f)||Ad(f,null)}),c.forEach(function(f){s.has(f)||Ad(f,d)})}Wx.set(l,t)},[t]),l}function aT(t){return t}function oT(t,a){a===void 0&&(a=aT);var l=[],o=!1,s={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:t},useMedium:function(c){var d=a(c,o);return l.push(d),function(){l=l.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(o=!0;l.length;){var d=l;l=[],d.forEach(c)}l={push:function(f){return c(f)},filter:function(){return l}}},assignMedium:function(c){o=!0;var d=[];if(l.length){var f=l;l=[],f.forEach(c),d=l}var p=function(){var x=d;d=[],x.forEach(c)},g=function(){return Promise.resolve().then(p)};g(),l={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),l}}}};return s}function lT(t){t===void 0&&(t={});var a=oT(null);return a.options=Rn({async:!0,ssr:!1},t),a}var py=function(t){var a=t.sideCar,l=my(t,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=a.read();if(!o)throw new Error("Sidecar medium not found");return N.createElement(o,Rn({},l))};py.isSideCarExport=!0;function rT(t,a){return t.useMedium(a),py}var gy=lT(),Td=function(){},Zs=N.forwardRef(function(t,a){var l=N.useRef(null),o=N.useState({onScrollCapture:Td,onWheelCapture:Td,onTouchMoveCapture:Td}),s=o[0],c=o[1],d=t.forwardProps,f=t.children,p=t.className,g=t.removeScrollBar,x=t.enabled,v=t.shards,w=t.sideCar,y=t.noRelative,S=t.noIsolation,C=t.inert,j=t.allowPinchZoom,A=t.as,_=A===void 0?"div":A,z=t.gapMode,R=my(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=w,T=iT([l,a]),D=Rn(Rn({},R),s);return N.createElement(N.Fragment,null,x&&N.createElement(E,{sideCar:gy,removeScrollBar:g,shards:v,noRelative:y,noIsolation:S,inert:C,setCallbacks:c,allowPinchZoom:!!j,lockRef:l,gapMode:z}),d?N.cloneElement(N.Children.only(f),Rn(Rn({},D),{ref:T})):N.createElement(_,Rn({},D,{className:p,ref:T}),f))});Zs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zs.classNames={fullWidth:gs,zeroRight:ps};var sT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var a=sT();return a&&t.setAttribute("nonce",a),t}function uT(t,a){t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a))}function dT(t){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(t)}var fT=function(){var t=0,a=null;return{add:function(l){t==0&&(a=cT())&&(uT(a,l),dT(a)),t++},remove:function(){t--,!t&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},hT=function(){var t=fT();return function(a,l){N.useEffect(function(){return t.add(a),function(){t.remove()}},[a&&l])}},xy=function(){var t=hT(),a=function(l){var o=l.styles,s=l.dynamic;return t(o,s),null};return a},mT={left:0,top:0,right:0,gap:0},zd=function(t){return parseInt(t||"",10)||0},pT=function(t){var a=window.getComputedStyle(document.body),l=a[t==="padding"?"paddingLeft":"marginLeft"],o=a[t==="padding"?"paddingTop":"marginTop"],s=a[t==="padding"?"paddingRight":"marginRight"];return[zd(l),zd(o),zd(s)]},gT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return mT;var a=pT(t),l=document.documentElement.clientWidth,o=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,o-l+a[2]-a[0])}},xT=xy(),ho="data-scroll-locked",vT=function(t,a,l,o){var s=t.left,c=t.top,d=t.right,f=t.gap;return l===void 0&&(l="margin"),`
313
+ .`.concat(JA,` {
314
+ overflow: hidden `).concat(o,`;
315
+ padding-right: `).concat(f,"px ").concat(o,`;
316
+ }
317
+ body[`).concat(ho,`] {
318
+ overflow: hidden `).concat(o,`;
319
+ overscroll-behavior: contain;
320
+ `).concat([a&&"position: relative ".concat(o,";"),l==="margin"&&`
321
+ padding-left: `.concat(s,`px;
322
+ padding-top: `).concat(c,`px;
323
+ padding-right: `).concat(d,`px;
324
+ margin-left:0;
325
+ margin-top:0;
326
+ margin-right: `).concat(f,"px ").concat(o,`;
327
+ `),l==="padding"&&"padding-right: ".concat(f,"px ").concat(o,";")].filter(Boolean).join(""),`
328
+ }
329
+
330
+ .`).concat(ps,` {
331
+ right: `).concat(f,"px ").concat(o,`;
332
+ }
333
+
334
+ .`).concat(gs,` {
335
+ margin-right: `).concat(f,"px ").concat(o,`;
336
+ }
337
+
338
+ .`).concat(ps," .").concat(ps,` {
339
+ right: 0 `).concat(o,`;
340
+ }
341
+
342
+ .`).concat(gs," .").concat(gs,` {
343
+ margin-right: 0 `).concat(o,`;
344
+ }
345
+
346
+ body[`).concat(ho,`] {
347
+ `).concat(eT,": ").concat(f,`px;
348
+ }
349
+ `)},Kx=function(){var t=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(t)?t:0},bT=function(){N.useEffect(function(){return document.body.setAttribute(ho,(Kx()+1).toString()),function(){var t=Kx()-1;t<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,t.toString())}},[])},yT=function(t){var a=t.noRelative,l=t.noImportant,o=t.gapMode,s=o===void 0?"margin":o;bT();var c=N.useMemo(function(){return gT(s)},[s]);return N.createElement(xT,{styles:vT(c,!a,s,l?"":"!important")})},Xd=!1;if(typeof window<"u")try{var cs=Object.defineProperty({},"passive",{get:function(){return Xd=!0,!0}});window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Xd=!1}var lo=Xd?{passive:!1}:!1,wT=function(t){return t.tagName==="TEXTAREA"},vy=function(t,a){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!wT(t)&&l[a]==="visible")},ST=function(t){return vy(t,"overflowY")},NT=function(t){return vy(t,"overflowX")},Jx=function(t,a){var l=a.ownerDocument,o=a;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=by(t,o);if(s){var c=yy(t,o),d=c[1],f=c[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==l.body);return!1},CT=function(t){var a=t.scrollTop,l=t.scrollHeight,o=t.clientHeight;return[a,l,o]},MT=function(t){var a=t.scrollLeft,l=t.scrollWidth,o=t.clientWidth;return[a,l,o]},by=function(t,a){return t==="v"?ST(a):NT(a)},yy=function(t,a){return t==="v"?CT(a):MT(a)},jT=function(t,a){return t==="h"&&a==="rtl"?-1:1},ET=function(t,a,l,o,s){var c=jT(t,window.getComputedStyle(a).direction),d=c*o,f=l.target,p=a.contains(f),g=!1,x=d>0,v=0,w=0;do{if(!f)break;var y=yy(t,f),S=y[0],C=y[1],j=y[2],A=C-j-c*S;(S||A)&&by(t,f)&&(v+=A,w+=S);var _=f.parentNode;f=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!p&&f!==document.body||p&&(a.contains(f)||a===f));return(x&&Math.abs(v)<1||!x&&Math.abs(w)<1)&&(g=!0),g},us=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ev=function(t){return[t.deltaX,t.deltaY]},tv=function(t){return t&&"current"in t?t.current:t},AT=function(t,a){return t[0]===a[0]&&t[1]===a[1]},TT=function(t){return`
350
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
351
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
352
+ `)},zT=0,ro=[];function RT(t){var a=N.useRef([]),l=N.useRef([0,0]),o=N.useRef(),s=N.useState(zT++)[0],c=N.useState(xy)[0],d=N.useRef(t);N.useEffect(function(){d.current=t},[t]),N.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var C=KA([t.lockRef.current],(t.shards||[]).map(tv),!0).filter(Boolean);return C.forEach(function(j){return j.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var f=N.useCallback(function(C,j){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var A=us(C),_=l.current,z="deltaX"in C?C.deltaX:_[0]-A[0],R="deltaY"in C?C.deltaY:_[1]-A[1],E,T=C.target,D=Math.abs(z)>Math.abs(R)?"h":"v";if("touches"in C&&D==="h"&&T.type==="range")return!1;var k=window.getSelection(),V=k&&k.anchorNode,te=V?V===T||V.contains(T):!1;if(te)return!1;var J=Jx(D,T);if(!J)return!0;if(J?E=D:(E=D==="v"?"h":"v",J=Jx(D,T)),!J)return!1;if(!o.current&&"changedTouches"in C&&(z||R)&&(o.current=E),!E)return!0;var q=o.current||E;return ET(q,j,C,q==="h"?z:R)},[]),p=N.useCallback(function(C){var j=C;if(!(!ro.length||ro[ro.length-1]!==c)){var A="deltaY"in j?ev(j):us(j),_=a.current.filter(function(E){return E.name===j.type&&(E.target===j.target||j.target===E.shadowParent)&&AT(E.delta,A)})[0];if(_&&_.should){j.cancelable&&j.preventDefault();return}if(!_){var z=(d.current.shards||[]).map(tv).filter(Boolean).filter(function(E){return E.contains(j.target)}),R=z.length>0?f(j,z[0]):!d.current.noIsolation;R&&j.cancelable&&j.preventDefault()}}},[]),g=N.useCallback(function(C,j,A,_){var z={name:C,delta:j,target:A,should:_,shadowParent:OT(A)};a.current.push(z),setTimeout(function(){a.current=a.current.filter(function(R){return R!==z})},1)},[]),x=N.useCallback(function(C){l.current=us(C),o.current=void 0},[]),v=N.useCallback(function(C){g(C.type,ev(C),C.target,f(C,t.lockRef.current))},[]),w=N.useCallback(function(C){g(C.type,us(C),C.target,f(C,t.lockRef.current))},[]);N.useEffect(function(){return ro.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:w}),document.addEventListener("wheel",p,lo),document.addEventListener("touchmove",p,lo),document.addEventListener("touchstart",x,lo),function(){ro=ro.filter(function(C){return C!==c}),document.removeEventListener("wheel",p,lo),document.removeEventListener("touchmove",p,lo),document.removeEventListener("touchstart",x,lo)}},[]);var y=t.removeScrollBar,S=t.inert;return N.createElement(N.Fragment,null,S?N.createElement(c,{styles:TT(s)}):null,y?N.createElement(yT,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function OT(t){for(var a=null;t!==null;)t instanceof ShadowRoot&&(a=t.host,t=t.host),t=t.parentNode;return a}const kT=rT(gy,RT);var wy=N.forwardRef(function(t,a){return N.createElement(Zs,Rn({},t,{ref:a,sideCar:kT}))});wy.classNames=Zs.classNames;var Fs="Popover",[Sy]=Rl(Fs,[yo]),kl=yo(),[_T,Gi]=Sy(Fs),Ny=t=>{const{__scopePopover:a,children:l,open:o,defaultOpen:s,onOpenChange:c,modal:d=!1}=t,f=kl(a),p=N.useRef(null),[g,x]=N.useState(!1),[v,w]=tf({prop:o,defaultProp:s??!1,onChange:c,caller:Fs});return m.jsx(hf,{...f,children:m.jsx(_T,{scope:a,contentId:Eb(),triggerRef:p,open:v,onOpenChange:w,onOpenToggle:N.useCallback(()=>w(y=>!y),[w]),hasCustomAnchor:g,onCustomAnchorAdd:N.useCallback(()=>x(!0),[]),onCustomAnchorRemove:N.useCallback(()=>x(!1),[]),modal:d,children:l})})};Ny.displayName=Fs;var Cy="PopoverAnchor",DT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(Cy,l),c=kl(l),{onCustomAnchorAdd:d,onCustomAnchorRemove:f}=s;return N.useEffect(()=>(d(),()=>f()),[d,f]),m.jsx(Ls,{...c,...o,ref:a})});DT.displayName=Cy;var My="PopoverTrigger",jy=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(My,l),c=kl(l),d=Tt(a,s.triggerRef),f=m.jsx(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Ry(s.open),...o,ref:d,onClick:Ye(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?f:m.jsx(Ls,{asChild:!0,...c,children:f})});jy.displayName=My;var zf="PopoverPortal",[$T,LT]=Sy(zf,{forceMount:void 0}),Ey=t=>{const{__scopePopover:a,forceMount:l,children:o,container:s}=t,c=Gi(zf,a);return m.jsx($T,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};Ey.displayName=zf;var xo="PopoverContent",Ay=N.forwardRef((t,a)=>{const l=LT(xo,t.__scopePopover),{forceMount:o=l.forceMount,...s}=t,c=Gi(xo,t.__scopePopover);return m.jsx(wn,{present:o||c.open,children:c.modal?m.jsx(BT,{...s,ref:a}):m.jsx(HT,{...s,ref:a})})});Ay.displayName=xo;var UT=Kd("PopoverContent.RemoveScroll"),BT=N.forwardRef((t,a)=>{const l=Gi(xo,t.__scopePopover),o=N.useRef(null),s=Tt(a,o),c=N.useRef(!1);return N.useEffect(()=>{const d=o.current;if(d)return WA(d)},[]),m.jsx(wy,{as:UT,allowPinchZoom:!0,children:m.jsx(Ty,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(t.onCloseAutoFocus,d=>{var f;d.preventDefault(),c.current||(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ye(t.onPointerDownOutside,d=>{const f=d.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,g=f.button===2||p;c.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),HT=N.forwardRef((t,a)=>{const l=Gi(xo,t.__scopePopover),o=N.useRef(!1),s=N.useRef(!1);return m.jsx(Ty,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var d,f;(d=t.onCloseAutoFocus)==null||d.call(t,c),c.defaultPrevented||(o.current||(f=l.triggerRef.current)==null||f.focus(),c.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:c=>{var p,g;(p=t.onInteractOutside)==null||p.call(t,c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=c.target;((g=l.triggerRef.current)==null?void 0:g.contains(d))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),Ty=N.forwardRef((t,a)=>{const{__scopePopover:l,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:x,...v}=t,w=Gi(xo,l),y=kl(l);return HA(),m.jsx(dy,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:c,children:m.jsx(Bs,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:x,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:g,onDismiss:()=>w.onOpenChange(!1),deferPointerDownOutside:!0,children:m.jsx(mf,{"data-state":Ry(w.open),role:"dialog",id:w.contentId,...y,...v,ref:a,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),zy="PopoverClose",YT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(zy,l);return m.jsx(St.button,{type:"button",...o,ref:a,onClick:Ye(t.onClick,()=>s.onOpenChange(!1))})});YT.displayName=zy;var IT="PopoverArrow",GT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=kl(l);return m.jsx(pf,{...s,...o,ref:a})});GT.displayName=IT;function Ry(t){return t?"open":"closed"}var VT=Ny,XT=jy,qT=Ey,PT=Ay;function Oy({...t}){return m.jsx(VT,{"data-slot":"popover",...t})}function ky({...t}){return m.jsx(XT,{"data-slot":"popover-trigger",...t})}function _y({className:t,align:a="start",sideOffset:l=6,...o}){return m.jsx(qT,{"data-slot":"popover-portal",children:m.jsx(PT,{"data-slot":"popover-content",align:a,sideOffset:l,className:Ot("z-50 origin-(--radix-popover-content-transform-origin) rounded-lg bg-popover p-2 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...o})})}function QT({currentModuleId:t,currentModuleName:a}){const{t:l}=gt(),[o,s]=N.useState(!1),{modules:c,selectModule:d,exportedAt:f}=Ze(Pt(g=>{var x,v;return{modules:((x=g.exportData)==null?void 0:x.modules)??[],selectModule:g.selectModule,exportedAt:(v=g.exportData)==null?void 0:v.exportedAt}})),p=g=>f?`${g}?_t=${encodeURIComponent(f)}`:g;return m.jsxs(Oy,{open:o,onOpenChange:s,children:[m.jsx(ky,{asChild:!0,children:m.jsxs("button",{className:"flex min-w-0 max-w-[38vw] items-center gap-1 truncate font-medium transition-colors hover:text-primary sm:max-w-60 lg:max-w-72","aria-label":l("viewer.module.switch"),children:[m.jsx("span",{className:"truncate",children:a}),m.jsx(Gs,{className:"size-3 text-muted-foreground/60 shrink-0"})]})}),m.jsxs(_y,{side:"bottom",align:"start",className:"w-[min(18rem,calc(100vw-24px))] p-1.5",sideOffset:8,children:[m.jsx("div",{className:"px-2 py-1 text-[10px] uppercase tracking-widest text-muted-foreground",children:l(`viewer.module.count.${c.length===1?"one":"other"}`,{count:c.length})}),m.jsx(Tl,{className:"max-h-80 overflow-auto",children:m.jsx("ul",{className:"space-y-0.5",children:c.map(g=>{var w,y;const x=g.moduleId===t,v=m.jsxs("button",{className:`flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-left text-xs hover:bg-secondary/70 transition-colors ${x?"bg-secondary":""}`,onClick:()=>{x||d(g.moduleId),s(!1)},children:[m.jsx("div",{className:"size-9 rounded-md bg-neutral-100 border border-border/60 flex items-center justify-center shrink-0 overflow-hidden",children:(w=g.preview)!=null&&w.url?m.jsx("img",{src:p(g.preview.url),alt:"",className:"max-w-full max-h-full object-contain",draggable:!1}):m.jsxs("span",{className:"text-[9px] text-muted-foreground/40 font-mono",children:[Math.round(g.bbox.width),"×",Math.round(g.bbox.height)]})}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"truncate font-medium",children:g.name}),m.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono",children:[Math.round(g.bbox.width)," × ",Math.round(g.bbox.height)]})]}),x&&m.jsx(nM,{className:"size-3.5 text-primary shrink-0"})]});return m.jsx("li",{children:(y=g.preview)!=null&&y.url?m.jsxs(xf,{openDelay:150,closeDelay:0,children:[m.jsx(vf,{asChild:!0,children:v}),m.jsx(bf,{side:"left",align:"start",sideOffset:12,className:"w-auto p-1",children:m.jsx("img",{src:p(g.preview.url),alt:g.name,className:"block max-h-[60vh] max-w-[min(320px,calc(100vw-32px))] rounded object-contain",draggable:!1})})]}):v},g.moduleId)})})})]})]})}const ZT=fj(window.location.search,window.location.hash);function FT(){const{locale:t,t:a}=gt(),{designId:l,displayMode:o,setDisplayMode:s,mod:c,source:d}=Ze(Pt(f=>{var p;return{designId:f.designId,displayMode:f.displayMode,setDisplayMode:f.setDisplayMode,mod:f.getCurrentModule(),source:(p=f.exportData)==null?void 0:p.source}}));return c?ZT?m.jsx(Ox,{children:m.jsx("div",{"data-view":"module","data-mode":o,className:"h-dvh",children:m.jsx(Lx,{screenshotMode:!0})})}):m.jsx(Ox,{children:m.jsxs("div",{id:"module-view","data-view":"module","data-mode":o,className:"h-full flex flex-col overflow-hidden",children:[m.jsxs("header",{id:"module-header",className:"flex min-h-12 shrink-0 flex-wrap items-center justify-between gap-2 border-b bg-white py-2 pl-11 pr-3 sm:pr-4",children:[m.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:m.jsxs("nav",{id:"module-breadcrumb",className:"flex min-w-0 items-center gap-1 text-xs sm:gap-1.5","aria-label":a("viewer.breadcrumb"),children:[d&&m.jsxs("a",{href:Es(l?`/design/${encodeURIComponent(l)}`:"/",t),className:"group flex min-w-0 items-center gap-1 rounded-[4px] text-muted-foreground underline-offset-3 transition-colors hover:text-foreground hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:[m.jsx(wb,{className:"size-3.5 shrink-0 text-primary"}),m.jsx("span",{className:"max-w-[32vw] truncate text-foreground/80 group-hover:text-foreground sm:max-w-40",children:d.fileName}),m.jsx("span",{className:"hidden max-w-28 truncate text-muted-foreground/60 group-hover:text-muted-foreground md:inline-block lg:max-w-32",children:d.pageName})]}),m.jsx(wo,{className:"size-3 shrink-0 text-muted-foreground/30"}),m.jsx(QT,{currentModuleId:c.moduleId,currentModuleName:c.name})]})}),m.jsxs("div",{id:"module-summary",className:"flex min-w-0 shrink-0 items-center gap-1.5 sm:gap-2",children:[m.jsx(BA,{mod:c}),m.jsxs("div",{id:"mode-switch",className:"flex items-center rounded-md bg-secondary/50 p-0.5",children:[m.jsxs(gn,{variant:o==="visual"?"secondary":"ghost",size:"icon-xs","aria-label":a("viewer.mode.visualAria"),className:"h-6 w-auto gap-1.5 rounded-[4px] px-1.5 text-[11px] sm:px-2",onClick:()=>s("visual"),children:[m.jsx(vb,{className:"size-3"}),m.jsx("span",{children:a("viewer.mode.visual")})]}),m.jsxs(gn,{variant:o==="map"?"secondary":"ghost",size:"icon-xs","aria-label":a("viewer.mode.mapAria"),className:"h-6 w-auto gap-1.5 rounded-[4px] px-1.5 text-[11px] sm:px-2",onClick:()=>s("map"),children:[m.jsx(yb,{className:"size-3"}),m.jsx("span",{children:a("viewer.mode.map")})]})]})]})]}),m.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-1 overflow-hidden *:min-w-0 xl:grid-cols-[260px_minmax(0,1fr)_300px] [&>*:nth-child(3)]:hidden xl:[&>*:nth-child(3)]:flex",children:[m.jsx(pE,{}),m.jsx(Lx,{}),m.jsx(EA,{})]})]})}):null}function WT(t,a,l){if(t==="/")return null;const o=Nv(t);return o&&a==="module"?{href:Es(`/design/${encodeURIComponent(o)}`,l),labelKey:"navigation.backToDesignOverview"}:{href:Es("/",l),labelKey:"navigation.backToDesignList"}}function KT(){const{locale:t,setLocale:a,t:l}=gt(),[o,s]=N.useState(!1),c=N.useRef(null),d=Ze(p=>p.currentView),f=WT(window.location.pathname,d,t);return m.jsx("div",{className:"fixed left-2 top-0 z-[70] flex h-12 items-center",children:m.jsxs(Oy,{open:o,onOpenChange:s,children:[m.jsx(ky,{asChild:!0,children:m.jsx("button",{ref:c,type:"button","aria-label":l("menu.open"),title:l("menu.open"),className:"flex size-7 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 data-[state=open]:bg-muted data-[state=open]:text-foreground",children:m.jsx(RM,{className:"size-3.5","aria-hidden":"true"})})}),m.jsx(_y,{side:"bottom",align:"start",sideOffset:10,className:"z-[80] w-44 overflow-visible p-2",onOpenAutoFocus:p=>{var g;p.preventDefault(),(g=c.current)==null||g.focus({preventScroll:!0})},children:m.jsxs("nav",{className:"space-y-1","aria-label":l("menu.open"),children:[f&&m.jsxs("a",{href:f.href,className:"flex h-9 items-center gap-2 rounded-md px-2.5 text-xs text-foreground transition-colors hover:bg-muted",children:[m.jsx(KC,{className:"size-3.5 text-muted-foreground","aria-hidden":"true"}),m.jsx("span",{children:l(f.labelKey)})]}),m.jsxs("div",{className:"group/preferences relative",children:[m.jsxs("button",{type:"button","aria-haspopup":"dialog","aria-controls":"app-preferences-panel",className:"flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-left text-xs text-foreground transition-colors group-hover/preferences:bg-muted focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:[m.jsx(FM,{className:"size-3.5 text-muted-foreground","aria-hidden":"true"}),m.jsx("span",{className:"flex-1",children:l("settings.title")}),m.jsx(wo,{className:"size-3.5 text-muted-foreground","aria-hidden":"true"})]}),m.jsx("section",{id:"app-preferences-panel",role:"dialog",className:"invisible absolute -top-2 left-[calc(100%+0.5rem)] z-10 w-44 rounded-lg bg-popover p-3 text-popover-foreground opacity-0 shadow-md ring-1 ring-foreground/10 transition-opacity before:absolute before:-left-2 before:top-0 before:h-full before:w-2 group-focus-within/preferences:visible group-focus-within/preferences:opacity-100 group-hover/preferences:visible group-hover/preferences:opacity-100 max-[640px]:left-0 max-[640px]:top-[calc(100%+0.5rem)] max-[640px]:w-[min(11rem,calc(100vw-2rem))] max-[640px]:before:-top-2 max-[640px]:before:left-0 max-[640px]:before:h-2 max-[640px]:before:w-full","aria-label":l("settings.title"),children:m.jsxs("label",{className:"block text-xs text-muted-foreground",children:[m.jsx("span",{className:"block",children:l("language.label")}),m.jsxs("select",{className:"mt-1.5 h-8 w-full rounded-md border bg-white px-2 text-xs text-foreground outline-none focus:border-primary/40 focus:ring-2 focus:ring-primary/15","aria-label":l("language.label"),value:t,onChange:p=>a(p.target.value),children:[m.jsx("option",{value:"en",children:l("language.english")}),m.jsx("option",{value:"zh-CN",children:l("language.simplifiedChinese")})]})]})})]})]})})]})})}const JT=2e3,ez=N.lazy(()=>hw(()=>import("./App-BkF1Yv4U.js"),__vite__mapDeps([0,1])).then(t=>({default:t.Dashboard})));function tz(){const t=Nv(window.location.pathname),a=Mb(window.location.search),l=window.location.pathname==="/"?m.jsx(N.Suspense,{fallback:m.jsx(nz,{}),children:m.jsx(ez,{})}):m.jsx(iz,{routeDesignId:t});return a?m.jsx("div",{className:"h-dvh overflow-hidden",children:l}):m.jsxs("div",{className:"h-dvh overflow-hidden",children:[m.jsx("div",{className:"h-full",children:l}),m.jsx(KT,{})]})}function nz(){const{t}=gt();return m.jsx("div",{className:"flex h-full items-center justify-center bg-[#fafafa] text-sm text-[#999]",children:t("viewer.loadingDashboard")})}function iz({routeDesignId:t}){const{locale:a,t:l}=gt(),{exportData:o,currentView:s,designId:c,initDesignId:d,setExportData:f,syncFromHash:p}=Ze(Pt(z=>({exportData:z.exportData,currentView:z.currentView,designId:z.designId,initDesignId:z.initDesignId,setExportData:z.setExportData,syncFromHash:z.syncFromHash}))),[g,x]=N.useState(null),[v,w]=N.useState(!1),y=N.useRef(null),S=N.useRef(0),C=N.useRef(a),j=N.useRef(a);C.current=a,N.useEffect(()=>{t&&d(t)},[d,t]);const A=N.useCallback(async z=>{if(!c)return!1;const R=++S.current;try{const{data:E,revision:T}=await JE(c,z);return await ry(E),z!=null&&z.aborted||R!==S.current||(_d(E,C.current),z!=null&&z.aborted||R!==S.current)?!1:(f(E),y.current=T,x(null),w(!1),document.documentElement.setAttribute("data-loaded","true"),!0)}catch(E){return z!=null&&z.aborted||R!==S.current||x(E instanceof wt&&E.domainCode==="DESIGN_NOT_FOUND"?"design-deleted":"load-failed"),!1}},[c,f]);N.useEffect(()=>{if(!c)return;const z=new AbortController;return document.documentElement.removeAttribute("data-loaded"),y.current=null,A(z.signal),()=>z.abort()},[c,A]),N.useEffect(()=>{if(j.current===a)return;j.current=a;const z=Ze.getState().exportData;if(z)try{const R=structuredClone(z);if(_d(R,a),C.current!==a||Ze.getState().exportData!==z)return;f(R),w(!1)}catch{C.current===a&&w(!0)}},[a,f]);const _=N.useRef(A);return N.useEffect(()=>{_.current=A}),N.useEffect(()=>{if(!c)return;let z=!1;const R=async()=>{if(!z){z=!0;try{const T=await tA(c),D=y.current;(D===null||T!==D)&&await _.current()}catch(T){T instanceof wt&&T.domainCode==="DESIGN_NOT_FOUND"&&(f(null),x("design-deleted"),document.documentElement.removeAttribute("data-loaded"))}finally{z=!1}}},E=window.setInterval(()=>void R(),JT);return()=>window.clearInterval(E)},[c,f]),N.useEffect(()=>{const z=()=>p();return window.addEventListener("hashchange",z),()=>window.removeEventListener("hashchange",z)},[p]),c?!o&&g?m.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 px-6 text-center","data-view":"empty",children:[m.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:l("app.name")}),m.jsx("p",{className:"text-sm text-destructive",children:l(g==="design-deleted"?"viewer.designDeleted":"viewer.loadDesignFailed")}),m.jsx("button",{type:"button",className:"rounded-md border px-3 py-1.5 text-sm hover:bg-muted",onClick:()=>void A(),children:l("common.retry")})]}):o?m.jsxs(m.Fragment,{children:[s==="module"?m.jsx(FT,{}):m.jsx(xj,{}),v&&m.jsx("div",{role:"alert",className:"fixed bottom-3 right-3 z-[60] max-w-xs rounded-md border border-destructive/20 bg-white px-3 py-2 text-xs text-destructive shadow-md",children:l("viewer.localizeFailed")})]}):m.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center gap-4","data-view":"empty",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center",children:m.jsxs("svg",{viewBox:"0 0 24 24",className:"size-4 text-primary",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),m.jsx("path",{d:"M2 17l10 5 10-5"}),m.jsx("path",{d:"M2 12l10 5 10-5"})]})}),m.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:l("app.name")})]}),m.jsx("p",{className:"text-sm text-muted-foreground",children:l("viewer.loadingDesign")})]}):m.jsx("div",{className:"relative flex h-full flex-col items-center justify-center gap-4","data-view":"empty",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:l("viewer.invalidDesignUrl")})})}uw.createRoot(document.getElementById("app")).render(m.jsx(N.StrictMode,{children:m.jsx(pj,{children:m.jsx(tz,{})})}));export{wo as C,Cb as D,pM as E,UM as P,IC as R,QM as S,GC as T,ij as X,Mv as a,Ot as b,_e as c,rz as d,so as e,VC as f,oz as g,XC as h,Gs as i,m as j,nM as k,lz as l,wb as m,N as r,zx as t,gt as u,Es as w};