@tarot-ai/pixel 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -20
- package/dist/index.cjs +63 -51
- package/dist/view/index.html +2 -2
- package/dist/view/view-assets/{App-D5VfGkce.js → App-su3Zx5n_.js} +1 -1
- package/dist/view/view-assets/index-9F2BQ-_e.js +352 -0
- package/dist/view/view-assets/index-CVVd8wWv.css +1 -0
- package/package.json +10 -3
- package/dist/view/view-assets/index-CMO4vRwl.js +0 -352
- package/dist/view/view-assets/index-CfsmYNhW.css +0 -1
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["view-assets/App-D5VfGkce.js","view-assets/App-BEih8O7c.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var P1=Object.defineProperty;var Q1=(t,a,l)=>a in t?P1(t,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[a]=l;var _i=(t,a,l)=>Q1(t,typeof a!="symbol"?a+"":a,l);function Z1(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 F1(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 jg;function W1(){if(jg)return ml;jg=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 Eg;function K1(){return Eg||(Eg=1,cd.exports=W1()),cd.exports}var m=K1(),ud={exports:{}},Me={};/**
|
|
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 Ag;function J1(){if(Ag)return Me;Ag=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"),S=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=S&&D[S]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function E(D,P,ne){this.props=D,this.context=P,this.refs=A,this.updater=ne||y}E.prototype.isReactComponent={},E.prototype.setState=function(D,P){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,P,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function R(){}R.prototype=E.prototype;function z(D,P,ne){this.props=D,this.context=P,this.refs=A,this.updater=ne||y}var T=z.prototype=new R;T.constructor=z,C(T,E.prototype),T.isPureReactComponent=!0;var j=Array.isArray;function k(){}var _={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function Z(D,P,ne){var re=ne.ref;return{$$typeof:t,type:D,key:P,ref:re!==void 0?re:null,props:ne}}function te(D,P){return Z(D.type,P,D.props)}function ee(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function K(D){var P={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ne){return P[ne]})}var le=/\/+/g;function oe(D,P){return typeof D=="object"&&D!==null&&D.key!=null?K(""+D.key):P.toString(36)}function ie(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(k,k):(D.status="pending",D.then(function(P){D.status==="pending"&&(D.status="fulfilled",D.value=P)},function(P){D.status==="pending"&&(D.status="rejected",D.reason=P)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function L(D,P,ne,re,fe){var pe=typeof D;(pe==="undefined"||pe==="boolean")&&(D=null);var Ae=!1;if(D===null)Ae=!0;else switch(pe){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(D.$$typeof){case t:case a:Ae=!0;break;case x:return Ae=D._init,L(Ae(D._payload),P,ne,re,fe)}}if(Ae)return fe=fe(D),Ae=re===""?"."+oe(D,0):re,j(fe)?(ne="",Ae!=null&&(ne=Ae.replace(le,"$&/")+"/"),L(fe,P,ne,"",function(Dt){return Dt})):fe!=null&&(ee(fe)&&(fe=te(fe,ne+(fe.key==null||D&&D.key===fe.key?"":(""+fe.key).replace(le,"$&/")+"/")+Ae)),P.push(fe)),1;Ae=0;var et=re===""?".":re+":";if(j(D))for(var Se=0;Se<D.length;Se++)re=D[Se],pe=et+oe(re,Se),Ae+=L(re,P,ne,pe,fe);else if(Se=w(D),typeof Se=="function")for(D=Se.call(D),Se=0;!(re=D.next()).done;)re=re.value,pe=et+oe(re,Se++),Ae+=L(re,P,ne,pe,fe);else if(pe==="object"){if(typeof D.then=="function")return L(ie(D),P,ne,re,fe);throw P=String(D),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function q(D,P,ne){if(D==null)return D;var re=[],fe=0;return L(D,re,"","",function(pe){return P.call(ne,pe,fe++)}),re}function W(D){if(D._status===-1){var P=D._result;P=P(),P.then(function(ne){(D._status===0||D._status===-1)&&(D._status=1,D._result=ne)},function(ne){(D._status===0||D._status===-1)&&(D._status=2,D._result=ne)}),D._status===-1&&(D._status=0,D._result=P)}if(D._status===1)return D._result.default;throw D._result}var ge=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},J={map:q,forEach:function(D,P,ne){q(D,function(){P.apply(this,arguments)},ne)},count:function(D){var P=0;return q(D,function(){P++}),P},toArray:function(D){return q(D,function(P){return P})||[]},only:function(D){if(!ee(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Me.Activity=v,Me.Children=J,Me.Component=E,Me.Fragment=l,Me.Profiler=s,Me.PureComponent=z,Me.StrictMode=o,Me.Suspense=p,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Me.__COMPILER_RUNTIME={__proto__:null,c:function(D){return _.H.useMemoCache(D)}},Me.cache=function(D){return function(){return D.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(D,P,ne){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var re=C({},D.props),fe=D.key;if(P!=null)for(pe in P.key!==void 0&&(fe=""+P.key),P)!I.call(P,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&P.ref===void 0||(re[pe]=P[pe]);var pe=arguments.length-2;if(pe===1)re.children=ne;else if(1<pe){for(var Ae=Array(pe),et=0;et<pe;et++)Ae[et]=arguments[et+2];re.children=Ae}return Z(D.type,fe,re)},Me.createContext=function(D){return D={$$typeof:d,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:c,_context:D},D},Me.createElement=function(D,P,ne){var re,fe={},pe=null;if(P!=null)for(re in P.key!==void 0&&(pe=""+P.key),P)I.call(P,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(fe[re]=P[re]);var Ae=arguments.length-2;if(Ae===1)fe.children=ne;else if(1<Ae){for(var et=Array(Ae),Se=0;Se<Ae;Se++)et[Se]=arguments[Se+2];fe.children=et}if(D&&D.defaultProps)for(re in Ae=D.defaultProps,Ae)fe[re]===void 0&&(fe[re]=Ae[re]);return Z(D,pe,fe)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(D){return{$$typeof:f,render:D}},Me.isValidElement=ee,Me.lazy=function(D){return{$$typeof:x,_payload:{_status:-1,_result:D},_init:W}},Me.memo=function(D,P){return{$$typeof:g,type:D,compare:P===void 0?null:P}},Me.startTransition=function(D){var P=_.T,ne={};_.T=ne;try{var re=D(),fe=_.S;fe!==null&&fe(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(k,ge)}catch(pe){ge(pe)}finally{P!==null&&ne.types!==null&&(P.types=ne.types),_.T=P}},Me.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Me.use=function(D){return _.H.use(D)},Me.useActionState=function(D,P,ne){return _.H.useActionState(D,P,ne)},Me.useCallback=function(D,P){return _.H.useCallback(D,P)},Me.useContext=function(D){return _.H.useContext(D)},Me.useDebugValue=function(){},Me.useDeferredValue=function(D,P){return _.H.useDeferredValue(D,P)},Me.useEffect=function(D,P){return _.H.useEffect(D,P)},Me.useEffectEvent=function(D){return _.H.useEffectEvent(D)},Me.useId=function(){return _.H.useId()},Me.useImperativeHandle=function(D,P,ne){return _.H.useImperativeHandle(D,P,ne)},Me.useInsertionEffect=function(D,P){return _.H.useInsertionEffect(D,P)},Me.useLayoutEffect=function(D,P){return _.H.useLayoutEffect(D,P)},Me.useMemo=function(D,P){return _.H.useMemo(D,P)},Me.useOptimistic=function(D,P){return _.H.useOptimistic(D,P)},Me.useReducer=function(D,P,ne){return _.H.useReducer(D,P,ne)},Me.useRef=function(D){return _.H.useRef(D)},Me.useState=function(D){return _.H.useState(D)},Me.useSyncExternalStore=function(D,P,ne){return _.H.useSyncExternalStore(D,P,ne)},Me.useTransition=function(){return _.H.useTransition()},Me.version="19.2.7",Me}var Tg;function qd(){return Tg||(Tg=1,ud.exports=J1()),ud.exports}var N=qd();const so=F1(N),Pd=Z1({__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 zg;function ew(){return zg||(zg=1,(function(t){function a(L,q){var W=L.length;L.push(q);e:for(;0<W;){var ge=W-1>>>1,J=L[ge];if(0<s(J,q))L[ge]=q,L[W]=J,W=ge;else break e}}function l(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var q=L[0],W=L.pop();if(W!==q){L[0]=W;e:for(var ge=0,J=L.length,D=J>>>1;ge<D;){var P=2*(ge+1)-1,ne=L[P],re=P+1,fe=L[re];if(0>s(ne,W))re<J&&0>s(fe,ne)?(L[ge]=fe,L[re]=W,ge=re):(L[ge]=ne,L[P]=W,ge=P);else if(re<J&&0>s(fe,W))L[ge]=fe,L[re]=W,ge=re;else break e}}return q}function s(L,q){var W=L.sortIndex-q.sortIndex;return W!==0?W:L.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,S=3,w=!1,y=!1,C=!1,A=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function T(L){for(var q=l(g);q!==null;){if(q.callback===null)o(g);else if(q.startTime<=L)o(g),q.sortIndex=q.expirationTime,a(p,q);else break;q=l(g)}}function j(L){if(C=!1,T(L),!y)if(l(p)!==null)y=!0,k||(k=!0,K());else{var q=l(g);q!==null&&ie(j,q.startTime-L)}}var k=!1,_=-1,I=5,Z=-1;function te(){return A?!0:!(t.unstable_now()-Z<I)}function ee(){if(A=!1,k){var L=t.unstable_now();Z=L;var q=!0;try{e:{y=!1,C&&(C=!1,R(_),_=-1),w=!0;var W=S;try{t:{for(T(L),v=l(p);v!==null&&!(v.expirationTime>L&&te());){var ge=v.callback;if(typeof ge=="function"){v.callback=null,S=v.priorityLevel;var J=ge(v.expirationTime<=L);if(L=t.unstable_now(),typeof J=="function"){v.callback=J,T(L),q=!0;break t}v===l(p)&&o(p),T(L)}else o(p);v=l(p)}if(v!==null)q=!0;else{var D=l(g);D!==null&&ie(j,D.startTime-L),q=!1}}break e}finally{v=null,S=W,w=!1}q=void 0}}finally{q?K():k=!1}}}var K;if(typeof z=="function")K=function(){z(ee)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,oe=le.port2;le.port1.onmessage=ee,K=function(){oe.postMessage(null)}}else K=function(){E(ee,0)};function ie(L,q){_=E(function(){L(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(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(L){switch(S){case 1:case 2:case 3:var q=3;break;default:q=S}var W=S;S=q;try{return L()}finally{S=W}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(L,q){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=S;S=L;try{return q()}finally{S=W}},t.unstable_scheduleCallback=function(L,q,W){var ge=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ge+W:ge):W=ge,L){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=W+J,L={id:x++,callback:q,priorityLevel:L,startTime:W,expirationTime:J,sortIndex:-1},W>ge?(L.sortIndex=W,a(g,L),l(p)===null&&L===l(g)&&(C?(R(_),_=-1):C=!0,ie(j,W-ge))):(L.sortIndex=J,a(p,L),y||w||(y=!0,k||(k=!0,K()))),L},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(L){var q=S;return function(){var W=S;S=q;try{return L.apply(this,arguments)}finally{S=W}}}})(hd)),hd}var Rg;function tw(){return Rg||(Rg=1,fd.exports=ew()),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 Og;function nw(){if(Og)return zt;Og=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),S=typeof g.integrity=="string"?g.integrity:void 0,w=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:S,fetchPriority:w}):x==="script"&&o.d.X(p,{crossOrigin:v,integrity:S,fetchPriority:w,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 kg;function Jx(){if(kg)return md.exports;kg=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=nw(),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 _g;function iw(){if(_g)return pl;_g=1;var t=tw(),a=qd(),l=Jx();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,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),z=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case E:return"Profiler";case A:return"StrictMode";case j:return"Suspense";case k:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case y:return"Portal";case z:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case I:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var ie=Array.isArray,L=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,W={pending:!1,data:null,method:null,action:null},ge=[],J=-1;function D(e){return{current:e}}function P(e){0>J||(e.current=ge[J],ge[J]=null,J--)}function ne(e,n){J++,ge[J]=e.current,e.current=n}var re=D(null),fe=D(null),pe=D(null),Ae=D(null);function et(e,n){switch(ne(pe,n),ne(fe,e),ne(re,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Zp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Zp(n),e=Fp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(re),ne(re,e)}function Se(){P(re),P(fe),P(pe)}function Dt(e){e.memoizedState!==null&&ne(Ae,e);var n=re.current,i=Fp(n,e.type);n!==i&&(ne(fe,e),ne(re,i))}function Ot(e){fe.current===e&&(P(re),P(fe)),Ae.current===e&&(P(Ae),ul._currentValue=W)}var $t,an;function ft(e){if($t===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);$t=n&&n[1]||"",an=-1<i.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+$t+e+an}var be=!1;function $e(e,n){if(!e||be)return"";be=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(V){var G=V}Reflect.construct(e,[],F)}else{try{F.call()}catch(V){G=V}e.call(F.prototype)}}else{try{throw Error()}catch(V){G=V}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(V){if(V&&G&&typeof V.stack=="string")return[V.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
|
-
`),Y=M.split(`
|
|
46
|
-
`);for(u=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;if(r===O.length||u===Y.length)for(r=O.length-1,u=Y.length-1;1<=r&&0<=u&&O[r]!==Y[u];)u--;for(;1<=r&&0<=u;r--,u--)if(O[r]!==Y[u]){if(r!==1||u!==1)do if(r--,u--,0>u||O[r]!==Y[u]){var X=`
|
|
47
|
-
`+O[r].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=r&&0<=u);break}}}finally{be=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ft(i):""}function Ne(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 $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return ft("Activity");default:return""}}function ye(e){try{var n="",i=null;do n+=Ne(e,i),i=e,e=e.return;while(e);return n}catch(r){return`
|
|
48
|
-
Error generating stack: `+r.message+`
|
|
49
|
-
`+r.stack}}var Ce=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,de=t.unstable_cancelCallback,ae=t.unstable_shouldYield,tt=t.unstable_requestPaint,Fe=t.unstable_now,Sn=t.unstable_getCurrentPriorityLevel,_l=t.unstable_ImmediatePriority,kt=t.unstable_UserBlockingPriority,Vi=t.unstable_NormalPriority,Nn=t.unstable_LowPriority,si=t.unstable_IdlePriority,Xi=t.log,zy=t.unstable_setDisableYieldValue,So=null,Pt=null;function ci(e){if(typeof Xi=="function"&&zy(e),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(So,e)}catch{}}var Qt=Math.clz32?Math.clz32:ky,Ry=Math.log,Oy=Math.LN2;function ky(e){return e>>>=0,e===0?32:31-(Ry(e)/Oy|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 _y(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 zf(){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 Dy(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,Y=e.hiddenUpdates;for(i=b&~i;0<i;){var X=31-Qt(i),F=1<<X;M[X]=0,O[X]=-1;var G=Y[X];if(G!==null)for(Y[X]=null,X=0;X<G.length;X++){var V=G[X];V!==null&&(V.lane&=-536870913)}i&=~F}r!==0&&Rf(e,r,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(b&~n))}function Rf(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-Qt(n);e.entangledLanes|=n,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Of(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var r=31-Qt(i),u=1<<r;u&n|e[r]&n&&(e[r]|=n),i&=~u}}function kf(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 _f(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:bg(e.type))}function Df(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,Lt="__reactProps$"+ui,ya="__reactContainer$"+ui,ec="__reactEvents$"+ui,$y="__reactListeners$"+ui,Ly="__reactHandles$"+ui,$f="__reactResources$"+ui,Mo="__reactMarker$"+ui;function tc(e){delete e[Nt],delete e[Lt],delete e[ec],delete e[$y],delete e[Ly]}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=ig(e);e!==null;){if(i=e[Nt])return i;e=ig(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[$f];return n||(n=e[$f]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function xt(e){e[Mo]=!0}var Lf=new Set,Uf={};function Pi(e,n){Ca(e,n),Ca(e+"Capture",n)}function Ca(e,n){for(Uf[e]=n,e=0;e<n.length;e++)Lf.add(n[e])}var Uy=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]*$"),Bf={},Hf={};function By(e){return Ce.call(Hf,e)?!0:Ce.call(Bf,e)?!1:Uy.test(e)?Hf[e]=!0:(Bf[e]=!0,!1)}function Bl(e,n,i){if(By(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 on(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Hy(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=Yf(e)?"checked":"value";e._valueTracker=Hy(e,n,""+e[n])}}function If(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),r="";return e&&(r=Yf(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 Yy=/[\n"\\]/g;function ln(e){return e.replace(Yy,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=""+on(n)):e.value!==""+on(n)&&(e.value=""+on(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?ac(e,b,on(n)):i!=null?ac(e,b,on(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=""+on(M):e.removeAttribute("name")}function Gf(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?""+on(i):"",n=n!=null?""+on(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=""+on(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 Vf(e,n,i){if(n!=null&&(n=""+on(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+on(i):""}function Xf(e,n,i,r){if(n==null){if(r!=null){if(i!=null)throw Error(o(92));if(ie(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),n=i}i=on(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 Iy=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 qf(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||Iy.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function Pf(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&&qf(e,u,r)}else for(var h in n)n.hasOwnProperty(h)&&qf(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 Gy=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"]]),Vy=/^[\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 Vy.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 Qf(e){var n=Sa(e);if(n&&(e=n.stateNode)){var i=e[Lt]||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="'+ln(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var r=i[n];if(r!==e&&r.form===e.form){var u=r[Lt]||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&&If(r)}break e;case"textarea":Vf(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ma(e,!!i.multiple,n,!1)}}}var sc=!1;function Zf(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,Qf(n),e)))for(n=0;n<e.length;n++)Qf(e[n])}}function Eo(e,n){var i=e.stateNode;if(i===null)return null;var r=i[Lt]||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 Ff(){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 Wf(){return!1}function Ut(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:Wf,this.isPropagationStopped=Wf,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=Ut(Qi),To=v({},Qi,{view:0,detail:0}),Xy=Ut(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}}),Kf=Ut(Pl),qy=v({},Pl,{dataTransfer:0}),Py=Ut(qy),Qy=v({},To,{relatedTarget:0}),hc=Ut(Qy),Zy=v({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),Fy=Ut(Zy),Wy=v({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ky=Ut(Wy),Jy=v({},Qi,{data:0}),Jf=Ut(Jy),e0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0={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"},n0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=n0[e])?!!n[e]:!1}function mc(){return i0}var a0=v({},To,{key:function(e){if(e.key){var n=e0[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"?t0[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}}),o0=Ut(a0),l0=v({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=Ut(l0),r0=v({},To,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),s0=Ut(r0),c0=v({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),u0=Ut(c0),d0=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}),f0=Ut(d0),h0=v({},Qi,{newState:0,oldState:0}),m0=Ut(h0),p0=[9,13,27,32],pc=Hn&&"CompositionEvent"in window,Ro=null;Hn&&"documentMode"in document&&(Ro=document.documentMode);var g0=Hn&&"TextEvent"in window&&!Ro,th=Hn&&(!pc||Ro&&8<Ro&&11>=Ro),nh=" ",ih=!1;function ah(e,n){switch(e){case"keyup":return p0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ta=!1;function x0(e,n){switch(e){case"compositionend":return oh(n);case"keypress":return n.which!==32?null:(ih=!0,nh);case"textInput":return e=n.data,e===nh&&ih?null:e;default:return null}}function v0(e,n){if(Ta)return e==="compositionend"||!pc&&ah(e,n)?(e=Ff(),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 th&&n.locale!=="ko"?null:n.data;default:return null}}var b0={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 lh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!b0[e.type]:n==="textarea"}function rh(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 y0(e){Gp(e,0)}function Ql(e){var n=jo(e);if(If(n))return e}function sh(e,n){if(e==="change")return n}var ch=!1;if(Hn){var gc;if(Hn){var xc="oninput"in document;if(!xc){var uh=document.createElement("div");uh.setAttribute("oninput","return;"),xc=typeof uh.oninput=="function"}gc=xc}else gc=!1;ch=gc&&(!document.documentMode||9<document.documentMode)}function dh(){Oo&&(Oo.detachEvent("onpropertychange",fh),ko=Oo=null)}function fh(e){if(e.propertyName==="value"&&Ql(ko)){var n=[];rh(n,ko,e,rc(e)),Zf(y0,n)}}function w0(e,n,i){e==="focusin"?(dh(),Oo=n,ko=i,Oo.attachEvent("onpropertychange",fh)):e==="focusout"&&dh()}function S0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ql(ko)}function N0(e,n){if(e==="click")return Ql(n)}function C0(e,n){if(e==="input"||e==="change")return Ql(n)}function M0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Zt=typeof Object.is=="function"?Object.is:M0;function _o(e,n){if(Zt(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(!Ce.call(n,u)||!Zt(e[u],n[u]))return!1}return!0}function hh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,n){var i=hh(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=hh(i)}}function ph(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?ph(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function gh(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 j0=Hn&&"documentMode"in document&&11>=document.documentMode,za=null,bc=null,Do=null,yc=!1;function xh(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={},vh={};Hn&&(vh=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 vh)return wc[e]=n[i];return e}var bh=Fi("animationend"),yh=Fi("animationiteration"),wh=Fi("animationstart"),E0=Fi("transitionrun"),A0=Fi("transitionstart"),T0=Fi("transitioncancel"),Sh=Fi("transitionend"),Nh=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){Nh.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)},rn=[],Oa=0,Nc=0;function Fl(){for(var e=Oa,n=Nc=Oa=0;n<e;){var i=rn[n];rn[n++]=null;var r=rn[n];rn[n++]=null;var u=rn[n];rn[n++]=null;var h=rn[n];if(rn[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&&Ch(i,u,h)}}function Wl(e,n,i,r){rn[Oa++]=e,rn[Oa++]=n,rn[Oa++]=i,rn[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 Ch(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-Qt(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 z0(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 Ft(e,n,i,r){return new z0(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=Ft(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 Mh(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=D1(e,i,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=Ft(31,i,n,u),e.elementType=Z,e.lanes=h,e;case C:return Ki(i.children,u,h,n);case A:b=8,u|=24;break;case E:return e=Ft(12,i,n,u|2),e.elementType=E,e.lanes=h,e;case j:return e=Ft(13,i,n,u),e.elementType=j,e.lanes=h,e;case k:return e=Ft(19,i,n,u),e.elementType=k,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:b=10;break e;case R:b=9;break e;case T:b=11;break e;case _:b=14;break e;case I:b=16,r=null;break e}b=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return n=Ft(b,i,n,u),n.elementType=e,n.type=r,n.lanes=h,n}function Ki(e,n,i,r){return e=Ft(7,e,r,n),e.lanes=i,e}function jc(e,n,i){return e=Ft(6,e,null,n),e.lanes=i,e}function jh(e){var n=Ft(18,null,null,0);return n.stateNode=e,n}function Ec(e,n,i){return n=Ft(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Eh=new WeakMap;function sn(e,n){if(typeof e=="object"&&e!==null){var i=Eh.get(e);return i!==void 0?i:(n={value:e,source:n,stack:ye(n)},Eh.set(e,n),n)}return{value:e,source:n,stack:ye(n)}}var _a=[],Da=0,er=null,$o=0,cn=[],un=0,fi=null,Cn=1,Mn="";function In(e,n){_a[Da++]=$o,_a[Da++]=er,er=e,$o=n}function Ah(e,n,i){cn[un++]=Cn,cn[un++]=Mn,cn[un++]=fi,fi=e;var r=Cn;e=Mn;var u=32-Qt(r)-1;r&=~(1<<u),i+=1;var h=32-Qt(n)+u;if(30<h){var b=u-u%5;h=(r&(1<<b)-1).toString(32),r>>=b,u-=b,Cn=1<<32-Qt(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),Ah(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=cn[--un],cn[un]=null,Mn=cn[--un],cn[un]=null,Cn=cn[--un],cn[un]=null}function Th(e,n){cn[un++]=Cn,cn[un++]=Mn,cn[un++]=fi,Cn=n.id,Mn=n.overflow,fi=e}var Ct=null,We=null,Le=!1,hi=null,dn=!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(sn(n,e)),zc}function zh(e){var n=e.stateNode,i=e.type,r=e.memoizedProps;switch(n[Nt]=e,n[Lt]=r,i){case"dialog":Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":case"embed":Oe("load",n);break;case"video":case"audio":for(i=0;i<ol.length;i++)Oe(ol[i],n);break;case"source":Oe("error",n);break;case"img":case"image":case"link":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"input":Oe("invalid",n),Gf(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Oe("invalid",n);break;case"textarea":Oe("invalid",n),Xf(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||Pp(n.textContent,i)?(r.popover!=null&&(Oe("beforetoggle",n),Oe("toggle",n)),r.onScroll!=null&&Oe("scroll",n),r.onScrollEnd!=null&&Oe("scrollend",n),r.onClick!=null&&(n.onclick=Bn),n=!0):n=!1,n||mi(e,!0)}function Rh(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:dn=!1;return;case 27:case 3:dn=!0;return;default:Ct=Ct.return}}function $a(e){if(e!==Ct)return!1;if(!Le)return Rh(e),Le=!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),Rh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));We=ng(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));We=ng(e)}else n===27?(n=We,Ai(e.type)?(e=Ju,Ju=null,We=e):We=n):We=Ct?hn(e.stateNode.nextSibling):null;return!0}function Ji(){We=Ct=null,Le=!1}function Rc(){var e=hi;return e!==null&&(It===null?It=e:It.push.apply(It,e),hi=null),e}function Lo(e){hi===null?hi=[e]:hi.push(e)}var Oc=D(null),ea=null,Gn=null;function pi(e,n,i){ne(Oc,n._currentValue),n._currentValue=i}function Vn(e){e._currentValue=Oc.current,P(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;Zt(u.pendingProps.value,b.value)||(e!==null?e.push(M):e=[M])}}else if(u===Ae.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(!Zt(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 Oh(ea,e)}function nr(e,n){return ea===null&&ta(e),Oh(e,n)}function Oh(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 R0=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()})}},O0=t.unstable_scheduleCallback,k0=t.unstable_NormalPriority,st={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dc(){return{controller:new R0,data:new Map,refCount:0}}function Uo(e){e.refCount--,e.refCount===0&&O0(k0,function(){e.controller.abort()})}var Bo=null,$c=0,Ua=0,Ba=null;function _0(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(kh,kh),n}function kh(){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 D0(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 _h=L.S;L.S=function(e,n){xp=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&_0(e,n),_h!==null&&_h(e,n)};var na=D(null);function Lc(){var e=na.current;return e!==null?e:Qe.pooledCache}function ir(e,n){n===null?ne(na,na.current):ne(na,n.pool)}function Dh(){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 $h(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lh(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,Bh(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,Bh(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 Uh(){if(aa===null)throw Error(o(459));var e=aa;return aa=null,e}function Bh(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=[]),Lh(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===S?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Hh(e){function n(U,$){if(e){var H=U.deletions;H===null?(U.deletions=[$],U.flags|=16):H.push($)}}function i(U,$){if(!e)return null;for(;$!==null;)n(U,$),$=$.sibling;return null}function r(U){for(var $=new Map;U!==null;)U.key!==null?$.set(U.key,U):$.set(U.index,U),U=U.sibling;return $}function u(U,$){return U=Yn(U,$),U.index=0,U.sibling=null,U}function h(U,$,H){return U.index=H,e?(H=U.alternate,H!==null?(H=H.index,H<$?(U.flags|=67108866,$):H):(U.flags|=67108866,$)):(U.flags|=1048576,$)}function b(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function M(U,$,H,Q){return $===null||$.tag!==6?($=jc(H,U.mode,Q),$.return=U,$):($=u($,H),$.return=U,$)}function O(U,$,H,Q){var xe=H.type;return xe===C?X(U,$,H.props.children,Q,H.key):$!==null&&($.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===I&&ia(xe)===$.type)?($=u($,H.props),Yo($,H),$.return=U,$):($=Jl(H.type,H.key,H.props,null,U.mode,Q),Yo($,H),$.return=U,$)}function Y(U,$,H,Q){return $===null||$.tag!==4||$.stateNode.containerInfo!==H.containerInfo||$.stateNode.implementation!==H.implementation?($=Ec(H,U.mode,Q),$.return=U,$):($=u($,H.children||[]),$.return=U,$)}function X(U,$,H,Q,xe){return $===null||$.tag!==7?($=Ki(H,U.mode,Q,xe),$.return=U,$):($=u($,H),$.return=U,$)}function F(U,$,H){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=jc(""+$,U.mode,H),$.return=U,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case w:return H=Jl($.type,$.key,$.props,null,U.mode,H),Yo(H,$),H.return=U,H;case y:return $=Ec($,U.mode,H),$.return=U,$;case I:return $=ia($),F(U,$,H)}if(ie($)||K($))return $=Ki($,U.mode,H,null),$.return=U,$;if(typeof $.then=="function")return F(U,lr($),H);if($.$$typeof===z)return F(U,nr(U,$),H);rr(U,$)}return null}function G(U,$,H,Q){var xe=$!==null?$.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return xe!==null?null:M(U,$,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case w:return H.key===xe?O(U,$,H,Q):null;case y:return H.key===xe?Y(U,$,H,Q):null;case I:return H=ia(H),G(U,$,H,Q)}if(ie(H)||K(H))return xe!==null?null:X(U,$,H,Q,null);if(typeof H.then=="function")return G(U,$,lr(H),Q);if(H.$$typeof===z)return G(U,$,nr(U,H),Q);rr(U,H)}return null}function V(U,$,H,Q,xe){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return U=U.get(H)||null,M($,U,""+Q,xe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return U=U.get(Q.key===null?H:Q.key)||null,O($,U,Q,xe);case y:return U=U.get(Q.key===null?H:Q.key)||null,Y($,U,Q,xe);case I:return Q=ia(Q),V(U,$,H,Q,xe)}if(ie(Q)||K(Q))return U=U.get(H)||null,X($,U,Q,xe,null);if(typeof Q.then=="function")return V(U,$,H,lr(Q),xe);if(Q.$$typeof===z)return V(U,$,H,nr($,Q),xe);rr($,Q)}return null}function ue(U,$,H,Q){for(var xe=null,Be=null,me=$,Ee=$=0,_e=null;me!==null&&Ee<H.length;Ee++){me.index>Ee?(_e=me,me=null):_e=me.sibling;var He=G(U,me,H[Ee],Q);if(He===null){me===null&&(me=_e);break}e&&me&&He.alternate===null&&n(U,me),$=h(He,$,Ee),Be===null?xe=He:Be.sibling=He,Be=He,me=_e}if(Ee===H.length)return i(U,me),Le&&In(U,Ee),xe;if(me===null){for(;Ee<H.length;Ee++)me=F(U,H[Ee],Q),me!==null&&($=h(me,$,Ee),Be===null?xe=me:Be.sibling=me,Be=me);return Le&&In(U,Ee),xe}for(me=r(me);Ee<H.length;Ee++)_e=V(me,U,Ee,H[Ee],Q),_e!==null&&(e&&_e.alternate!==null&&me.delete(_e.key===null?Ee:_e.key),$=h(_e,$,Ee),Be===null?xe=_e:Be.sibling=_e,Be=_e);return e&&me.forEach(function(ki){return n(U,ki)}),Le&&In(U,Ee),xe}function ve(U,$,H,Q){if(H==null)throw Error(o(151));for(var xe=null,Be=null,me=$,Ee=$=0,_e=null,He=H.next();me!==null&&!He.done;Ee++,He=H.next()){me.index>Ee?(_e=me,me=null):_e=me.sibling;var ki=G(U,me,He.value,Q);if(ki===null){me===null&&(me=_e);break}e&&me&&ki.alternate===null&&n(U,me),$=h(ki,$,Ee),Be===null?xe=ki:Be.sibling=ki,Be=ki,me=_e}if(He.done)return i(U,me),Le&&In(U,Ee),xe;if(me===null){for(;!He.done;Ee++,He=H.next())He=F(U,He.value,Q),He!==null&&($=h(He,$,Ee),Be===null?xe=He:Be.sibling=He,Be=He);return Le&&In(U,Ee),xe}for(me=r(me);!He.done;Ee++,He=H.next())He=V(me,U,Ee,He.value,Q),He!==null&&(e&&He.alternate!==null&&me.delete(He.key===null?Ee:He.key),$=h(He,$,Ee),Be===null?xe=He:Be.sibling=He,Be=He);return e&&me.forEach(function(q1){return n(U,q1)}),Le&&In(U,Ee),xe}function Pe(U,$,H,Q){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 w:e:{for(var xe=H.key;$!==null;){if($.key===xe){if(xe=H.type,xe===C){if($.tag===7){i(U,$.sibling),Q=u($,H.props.children),Q.return=U,U=Q;break e}}else if($.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===I&&ia(xe)===$.type){i(U,$.sibling),Q=u($,H.props),Yo(Q,H),Q.return=U,U=Q;break e}i(U,$);break}else n(U,$);$=$.sibling}H.type===C?(Q=Ki(H.props.children,U.mode,Q,H.key),Q.return=U,U=Q):(Q=Jl(H.type,H.key,H.props,null,U.mode,Q),Yo(Q,H),Q.return=U,U=Q)}return b(U);case y:e:{for(xe=H.key;$!==null;){if($.key===xe)if($.tag===4&&$.stateNode.containerInfo===H.containerInfo&&$.stateNode.implementation===H.implementation){i(U,$.sibling),Q=u($,H.children||[]),Q.return=U,U=Q;break e}else{i(U,$);break}else n(U,$);$=$.sibling}Q=Ec(H,U.mode,Q),Q.return=U,U=Q}return b(U);case I:return H=ia(H),Pe(U,$,H,Q)}if(ie(H))return ue(U,$,H,Q);if(K(H)){if(xe=K(H),typeof xe!="function")throw Error(o(150));return H=xe.call(H),ve(U,$,H,Q)}if(typeof H.then=="function")return Pe(U,$,lr(H),Q);if(H.$$typeof===z)return Pe(U,$,nr(U,H),Q);rr(U,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,$!==null&&$.tag===6?(i(U,$.sibling),Q=u($,H),Q.return=U,U=Q):(i(U,$),Q=jc(H,U.mode,Q),Q.return=U,U=Q),b(U)):i(U,$)}return function(U,$,H,Q){try{Ho=0;var xe=Pe(U,$,H,Q);return Ya=null,xe}catch(me){if(me===Ha||me===ar)throw me;var Be=Ft(29,me,null,U.mode);return Be.lanes=Q,Be.return=U,Be}finally{}}}var oa=Hh(!0),Yh=Hh(!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,(Ye&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),Ch(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,Of(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,Y=O.next;O.next=null,b===null?h=Y:b.next=Y,b=O;var X=e.alternate;X!==null&&(X=X.updateQueue,M=X.lastBaseUpdate,M!==b&&(M===null?X.firstBaseUpdate=Y:M.next=Y,X.lastBaseUpdate=O))}if(h!==null){var F=u.baseState;b=0,X=Y=O=null,M=h;do{var G=M.lane&-536870913,V=G!==M.lane;if(V?(ke&G)===G:(r&G)===G){G!==0&&G===Ua&&(Ic=!0),X!==null&&(X=X.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ue=e,ve=M;G=n;var Pe=i;switch(ve.tag){case 1:if(ue=ve.payload,typeof ue=="function"){F=ue.call(Pe,F,G);break e}F=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ve.payload,G=typeof ue=="function"?ue.call(Pe,F,G):ue,G==null)break e;F=v({},F,G);break e;case 2:gi=!0}}G=M.callback,G!==null&&(e.flags|=64,V&&(e.flags|=8192),V=u.callbacks,V===null?u.callbacks=[G]:V.push(G))}else V={lane:G,tag:M.tag,payload:M.payload,callback:M.callback,next:null},X===null?(Y=X=V,O=F):X=X.next=V,b|=G;if(M=M.next,M===null){if(M=u.shared.pending,M===null)break;V=M,M=V.next,V.next=null,u.lastBaseUpdate=V,u.shared.pending=null}}while(!0);X===null&&(O=F),u.baseState=O,u.firstBaseUpdate=Y,u.lastBaseUpdate=X,h===null&&(u.shared.lanes=0),Ni|=b,e.lanes=b,e.memoizedState=F}}function Ih(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function Gh(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Ih(i[e],n)}var Ia=D(null),sr=D(0);function Vh(e,n){e=Jn,ne(sr,e),ne(Ia,n),Jn=e|n.baseLanes}function Gc(){ne(sr,Jn),ne(Ia,Ia.current)}function Vc(){Jn=sr.current,P(Ia),P(sr)}var Wt=D(null),fn=null;function bi(e){var n=e.alternate;ne(lt,lt.current&1),ne(Wt,e),fn===null&&(n===null||Ia.current!==null||n.memoizedState!==null)&&(fn=e)}function Xc(e){ne(lt,lt.current),ne(Wt,e),fn===null&&(fn=e)}function Xh(e){e.tag===22?(ne(lt,lt.current),ne(Wt,e),fn===null&&(fn=e)):yi()}function yi(){ne(lt,lt.current),ne(Wt,Wt.current)}function Kt(e){P(Wt),fn===e&&(fn=null),P(lt)}var lt=D(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,je=null,Xe=null,ct=null,ur=!1,Ga=!1,la=!1,dr=0,Xo=0,Va=null,$0=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(!Zt(e[i],n[i]))return!1;return!0}function Pc(e,n,i,r,u,h){return Xn=h,je=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=e===null||e.memoizedState===null?Am:su,la=!1,h=i(r,u),la=!1,Ga&&(h=Ph(n,i,r,u)),qh(e),h}function qh(e){L.H=Qo;var n=Xe!==null&&Xe.next!==null;if(Xn=0,ct=Xe=je=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 Ph(e,n,i,r){je=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)}L.H=Tm,h=n(i,r)}while(Ga);return h}function L0(){var e=L.H,n=e.useState()[0];return n=typeof n.then=="function"?qo(n):n,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(je.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=je=null,Ga=!1,Xo=dr=0,Va=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?je.memoizedState=ct=e:ct=ct.next=e,ct}function rt(){if(Xe===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var n=ct===null?je.memoizedState:ct.next;if(n!==null)ct=n,Xe=e;else{if(e===null)throw je.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?je.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=Lh(Va,e,n),n=je,(ct===null?n.memoizedState:ct.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?Am: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=je.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var r=je.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(),je.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,Y=n,X=!1;do{var F=Y.lane&-536870913;if(F!==Y.lane?(ke&F)===F:(Xn&F)===F){var G=Y.revertLane;if(G===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),F===Ua&&(X=!0);else if((Xn&G)===G){Y=Y.next,G===Ua&&(X=!0);continue}else F={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},O===null?(M=O=F,b=h):O=O.next=F,je.lanes|=G,Ni|=G;F=Y.action,la&&i(h,F),h=Y.hasEagerState?Y.eagerState:i(h,F)}else G={lane:F,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},O===null?(M=O=G,b=h):O=O.next=G,je.lanes|=F,Ni|=F;Y=Y.next}while(Y!==null&&Y!==n);if(O===null?b=h:O.next=M,!Zt(h,e.memoizedState)&&(ut=!0,X&&(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);Zt(h,n.memoizedState)||(ut=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,r]}function Qh(e,n,i){var r=je,u=rt(),h=Le;if(h){if(i===void 0)throw Error(o(407));i=i()}else i=n();var b=!Zt((Xe||u).memoizedState,i);if(b&&(u.memoizedState=i,ut=!0),u=u.queue,nu(Wh.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},Fh.bind(null,r,u,i,n),null),Qe===null)throw Error(o(349));h||(Xn&127)!==0||Zh(r,n,i)}return i}function Zh(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=je.updateQueue,n===null?(n=fr(),je.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function Fh(e,n,i,r){n.value=i,n.getSnapshot=r,Kh(n)&&Jh(e)}function Wh(e,n,i){return i(function(){Kh(n)&&Jh(e)})}function Kh(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Zt(e,i)}catch{return!0}}function Jh(e){var n=Wi(e,2);n!==null&&Gt(n,e,2)}function eu(e){var n=_t();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 em(e,n,i,r){return e.baseState=i,Kc(e,Xe,typeof r=="function"?r:qn)}function U0(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)}};L.T!==null?i(!0):h.isTransition=!1,r(h),i=n.pending,i===null?(h.next=n.pending=h,tm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function tm(e,n){var i=n.action,r=n.payload,u=e.state;if(n.isTransition){var h=L.T,b={};L.T=b;try{var M=i(u,r),O=L.S;O!==null&&O(b,M),nm(e,n,M)}catch(Y){tu(e,n,Y)}finally{h!==null&&b.types!==null&&(h.types=b.types),L.T=h}}else try{h=i(u,r),nm(e,n,h)}catch(Y){tu(e,n,Y)}}function nm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){im(e,n,r)},function(r){return tu(e,n,r)}):im(e,n,i)}function im(e,n,i){n.status="fulfilled",n.value=i,am(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,tm(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,am(n),n=n.next;while(n!==r)}e.action=null}function am(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function om(e,n){return n}function lm(e,n){if(Le){var i=Qe.formState;if(i!==null){e:{var r=je;if(Le){if(We){t:{for(var u=We,h=dn;u.nodeType!==8;){if(!h){u=null;break t}if(u=hn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){We=hn(u.nextSibling),r=u.data==="F!";break e}}mi(r)}r=!1}r&&(n=i[0])}}return i=_t(),i.memoizedState=i.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:om,lastRenderedState:n},i.queue=r,i=Mm.bind(null,je,r),r.dispatch=i,r=eu(!1),h=ru.bind(null,je,!1,r.queue),r=_t(),u={state:n,dispatch:null,action:e,pending:null},r.queue=u,i=U0.bind(null,je,u,h,i),u.dispatch=i,r.memoizedState=e,[n,i,!1]}function rm(e){var n=rt();return sm(n,Xe,e)}function sm(e,n,i){if(n=Kc(e,n,om)[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&&(je.flags|=2048,Xa(9,{destroy:void 0},B0.bind(null,u,i),null)),[r,h,e]}function B0(e,n){e.action=n}function cm(e){var n=rt(),i=Xe;if(i!==null)return sm(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=je.updateQueue,n===null&&(n=fr(),je.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 um(){return rt().memoizedState}function pr(e,n,i,r){var u=_t();je.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):(je.flags|=e,u.memoizedState=Xa(1|n,h,i,r))}function dm(e,n){pr(8390656,8,e,n)}function nu(e,n){gr(2048,8,e,n)}function H0(e){je.flags|=4;var n=je.updateQueue;if(n===null)n=fr(),je.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function fm(e){var n=rt().memoizedState;return H0({ref:n,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function hm(e,n){return gr(4,2,e,n)}function mm(e,n){return gr(4,4,e,n)}function pm(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 gm(e,n,i){i=i!=null?i.concat([e]):null,gr(4,4,pm.bind(null,n,e),i)}function iu(){}function xm(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 vm(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&&(ke&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=bp(),je.lanes|=e,Ni|=e,i)}function bm(e,n,i,r){return Zt(i,n)?i:Ia.current!==null?(e=au(e,i,r),Zt(e,n)||(ut=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(ke&261930)===0?(ut=!0,e.memoizedState=i):(e=bp(),je.lanes|=e,Ni|=e,n)}function ym(e,n,i,r,u){var h=q.p;q.p=h!==0&&8>h?h:8;var b=L.T,M={};L.T=M,ru(e,!1,n,i);try{var O=u(),Y=L.S;if(Y!==null&&Y(M,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var X=D0(O,r);Po(e,n,X,tn(e))}else Po(e,n,r,tn(e))}catch(F){Po(e,n,{then:function(){},status:"rejected",reason:F},tn())}finally{q.p=h,b!==null&&M.types!==null&&(b.types=M.types),L.T=b}}function Y0(){}function ou(e,n,i,r){if(e.tag!==5)throw Error(o(476));var u=wm(e).queue;ym(e,u,n,W,i===null?Y0:function(){return Sm(e),i(r)})}function wm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:W},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 Sm(e){var n=wm(e);n.next===null&&(n=e.alternate.memoizedState),Po(e,n.next.queue,{},tn())}function lu(){return Mt(ul)}function Nm(){return rt().memoizedState}function Cm(){return rt().memoizedState}function I0(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=tn();e=xi(i);var r=vi(n,e,i);r!==null&&(Gt(r,n,i),Io(r,n,i)),n={cache:Dc()},e.payload=n;return}n=n.return}}function G0(e,n,i){var r=tn();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},xr(e)?jm(n,i):(i=Cc(e,n,i,r),i!==null&&(Gt(i,e,r),Em(i,n,r)))}function Mm(e,n,i){var r=tn();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))jm(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,Zt(M,b))return Wl(e,n,u,0),Qe===null&&Fl(),!1}catch{}finally{}if(i=Cc(e,n,u,r),i!==null)return Gt(i,e,r),Em(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&&Gt(n,e,2)}function xr(e){var n=e.alternate;return e===je||n!==null&&n===je}function jm(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 Em(e,n,i){if((i&4194048)!==0){var r=n.lanes;r&=e.pendingLanes,i|=r,n.lanes=i,Of(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 Am={readContext:Mt,use:hr,useCallback:function(e,n){return _t().memoizedState=[e,n===void 0?null:n],e},useContext:Mt,useEffect:dm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,pr(4194308,4,pm.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=_t();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=_t();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=G0.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var n=_t();return e={current:e},n.memoizedState=e},useState:function(e){e=eu(e);var n=e.queue,i=Mm.bind(null,je,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:iu,useDeferredValue:function(e,n){var i=_t();return au(i,e,n)},useTransition:function(){var e=eu(!1);return e=ym.bind(null,je,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var r=je,u=_t();if(Le){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),Qe===null)throw Error(o(349));(ke&127)!==0||Zh(r,n,i)}u.memoizedState=i;var h={value:i,getSnapshot:n};return u.queue=h,dm(Wh.bind(null,r,h,e),[e]),r.flags|=2048,Xa(9,{destroy:void 0},Fh.bind(null,r,h,i,n),null),i},useId:function(){var e=_t(),n=Qe.identifierPrefix;if(Le){var i=Mn,r=Cn;i=(r&~(1<<32-Qt(r)-1)).toString(32)+i,n="_"+n+"R_"+i,i=dr++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=$0++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:lu,useFormState:lm,useActionState:lm,useOptimistic:function(e){var n=_t();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,je,!0,i),i.dispatch=n,[e,n]},useMemoCache:Wc,useCacheRefresh:function(){return _t().memoizedState=I0.bind(null,je)},useEffectEvent:function(e){var n=_t(),i={impl:e};return n.memoizedState=i,function(){if((Ye&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},su={readContext:Mt,use:hr,useCallback:xm,useContext:Mt,useEffect:nu,useImperativeHandle:gm,useInsertionEffect:hm,useLayoutEffect:mm,useMemo:vm,useReducer:mr,useRef:um,useState:function(){return mr(qn)},useDebugValue:iu,useDeferredValue:function(e,n){var i=rt();return bm(i,Xe.memoizedState,e,n)},useTransition:function(){var e=mr(qn)[0],n=rt().memoizedState;return[typeof e=="boolean"?e:qo(e),n]},useSyncExternalStore:Qh,useId:Nm,useHostTransitionStatus:lu,useFormState:rm,useActionState:rm,useOptimistic:function(e,n){var i=rt();return em(i,Xe,e,n)},useMemoCache:Wc,useCacheRefresh:Cm};su.useEffectEvent=fm;var Tm={readContext:Mt,use:hr,useCallback:xm,useContext:Mt,useEffect:nu,useImperativeHandle:gm,useInsertionEffect:hm,useLayoutEffect:mm,useMemo:vm,useReducer:Jc,useRef:um,useState:function(){return Jc(qn)},useDebugValue:iu,useDeferredValue:function(e,n){var i=rt();return Xe===null?au(i,e,n):bm(i,Xe.memoizedState,e,n)},useTransition:function(){var e=Jc(qn)[0],n=rt().memoizedState;return[typeof e=="boolean"?e:qo(e),n]},useSyncExternalStore:Qh,useId:Nm,useHostTransitionStatus:lu,useFormState:cm,useActionState:cm,useOptimistic:function(e,n){var i=rt();return Xe!==null?em(i,Xe,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:Cm};Tm.useEffectEvent=fm;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=tn(),u=xi(r);u.payload=n,i!=null&&(u.callback=i),n=vi(e,u,r),n!==null&&(Gt(n,e,r),Io(n,e,r))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var r=tn(),u=xi(r);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=vi(e,u,r),n!==null&&(Gt(n,e,r),Io(n,e,r))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=tn(),r=xi(i);r.tag=2,n!=null&&(r.callback=n),n=vi(e,r,i),n!==null&&(Gt(n,e,i),Io(n,e,i))}};function zm(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 Rm(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 Om(e){Zl(e)}function km(e){console.error(e)}function _m(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 Dm(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 $m(e){return e=xi(e),e.tag=3,e}function Lm(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(){Dm(n,i,r)}}var b=i.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Dm(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 V0(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=Wt.current,i!==null){switch(i.tag){case 31:case 13:return fn===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(Le)return n=Wt.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(sn(e,i)))):(r!==zc&&(n=Error(o(423),{cause:r}),Lo(sn(n,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,r=sn(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=sn(h,i),nl===null?nl=[h]:nl.push(h),at!==4&&(at=2),n===null)return!0;r=sn(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=$m(u),Lm(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?Yh(n,null,i,r):oa(n,e.child,i,r)}function Um(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)):(Le&&M&&Ac(n),n.flags|=1,jt(e,n,r,u),n.child)}function Bm(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,Hm(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 Hm(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 Ym(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 Im(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?Vh(n,h):Gc(),Xh(n);else return r=n.lanes=536870912,Im(e,n,h!==null?h.baseLanes|i:i,i,r)}else h!==null?(ir(n,h.cachePool),Vh(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 Im(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(),Xh(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 Gm(e,n,i){return oa(n,e.child,null,i),e=br(n,n.pendingProps),e.flags|=2,Kt(n),n.memoizedState=null,e}function X0(e,n,i){var r=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Le){if(r.mode==="hidden")return e=br(n,r),n.lanes=536870912,Zo(null,e);if(Xc(n),(e=We)?(e=tg(e,dn),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=jh(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=Gm(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=kf(r,i),b!==0&&b!==h.retryLane))throw h.retryLane=b,Wi(e,b),Gt(r,e,b),fu;zr(),n=Gm(e,n,i)}else e=h.treeContext,We=hn(b.nextSibling),Ct=n,Le=!0,hi=null,dn=!1,e!==null&&Th(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)):(Le&&r&&Ac(n),n.flags|=1,jt(e,n,i,u),n.child)}function Vm(e,n,i,r,u,h){return ta(n),n.updateQueue=null,i=Ph(n,r,i,u),qh(e),r=Qc(),e!==null&&!ut?(Zc(e,n,h),Pn(e,n,h)):(Le&&r&&Ac(n),n.flags|=1,jt(e,n,i,h),n.child)}function Xm(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 Y=h.context,X=i.contextType;b=ka,typeof X=="object"&&X!==null&&(b=Mt(X));var F=i.getDerivedStateFromProps;X=typeof F=="function"||typeof h.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,X||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(M||Y!==b)&&Rm(n,h,r,b),gi=!1;var G=n.memoizedState;h.state=G,Vo(n,r,h,u),Go(),Y=n.memoizedState,M||G!==Y||gi?(typeof F=="function"&&(cu(n,i,F,r),Y=n.memoizedState),(O=gi||zm(n,i,O,r,G,Y,b))?(X||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=Y),h.props=r,h.state=Y,h.context=b,r=O):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{h=n.stateNode,Hc(e,n),b=n.memoizedProps,X=ra(i,b),h.props=X,F=n.pendingProps,G=h.context,Y=i.contextType,O=ka,typeof Y=="object"&&Y!==null&&(O=Mt(Y)),M=i.getDerivedStateFromProps,(Y=typeof M=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==F||G!==O)&&Rm(n,h,r,O),gi=!1,G=n.memoizedState,h.state=G,Vo(n,r,h,u),Go();var V=n.memoizedState;b!==F||G!==V||gi||e!==null&&e.dependencies!==null&&tr(e.dependencies)?(typeof M=="function"&&(cu(n,i,M,r),V=n.memoizedState),(X=gi||zm(n,i,X,r,G,V,O)||e!==null&&e.dependencies!==null&&tr(e.dependencies))?(Y||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,V,O),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,V,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=V),h.props=r,h.state=V,h.context=O,r=X):(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 qm(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:Dh()}}function gu(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=en),e}function Pm(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(Le){if(u?bi(n):yi(),(e=We)?(e=tg(e,dn),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=jh(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 Y=b.dgst;b=Y,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=kf(b,i),r!==0&&r!==O.retryLane))throw O.retryLane=r,Wi(e,r),Gt(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=hn(M.nextSibling),Ct=n,Le=!0,hi=null,dn=!1,e!==null&&Th(n,e),n=xu(n,r.children),n.flags|=4096);return n}return u?(yi(),M=r.fallback,u=n.mode,O=e.child,Y=O.sibling,r=Yn(O,{mode:"hidden",children:r.children}),r.subtreeFlags=O.subtreeFlags&65011712,Y!==null?M=Yn(Y,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=Dh(),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=Ft(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 Qm(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 Zm(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,ne(lt,b),jt(e,n,r,i),r=Le?$o:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qm(e,i,n);else if(e.tag===19)Qm(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 q0(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:Dt(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?Pm(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 Zm(e,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ne(lt,lt.current),r)break;return null;case 22:return n.lanes=0,Ym(e,n,i,n.pendingProps);case 24:pi(n,st,e.memoizedState.cache)}return Pn(e,n,i)}function Fm(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,q0(e,n,i);ut=(e.flags&131072)!==0}else ut=!1,Le&&(n.flags&1048576)!==0&&Ah(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=Xm(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===T){n.tag=11,n=Um(null,n,e,r,i);break e}else if(u===_){n.tag=14,n=Bm(null,n,e,r,i);break e}}throw n=oe(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),Xm(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=qm(e,n,r,i);break e}else if(r!==u){u=sn(Error(o(424)),n),Lo(u),n=qm(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=hn(e.firstChild),Ct=n,Le=!0,hi=null,dn=!0,i=Yh(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=rg(n.type,null,n.pendingProps,null))?n.memoizedState=i:Le||(i=n.type,e=n.pendingProps,r=Lr(pe.current).createElement(i),r[Nt]=n,r[Lt]=e,Et(r,i,e),xt(r),n.stateNode=r):n.memoizedState=rg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Dt(n),e===null&&Le&&(r=n.stateNode=ag(n.type,n.pendingProps,pe.current),Ct=n,dn=!0,u=We,Ai(n.type)?(Ju=u,We=hn(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&&Le&&((u=r=We)&&(r=S1(r,n.type,n.pendingProps,dn),r!==null?(n.stateNode=r,Ct=n,We=hn(r.firstChild),dn=!1,u=!0):u=!1),u||mi(n)),Dt(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,L0,null,null,i),ul._currentValue=u),yr(e,n),jt(e,n,r,i),n.child;case 6:return e===null&&Le&&((e=i=We)&&(i=N1(i,n.pendingProps,dn),i!==null?(n.stateNode=i,Ct=n,We=null,e=!0):e=!1),e||mi(n)),null;case 13:return Pm(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 Um(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 Bm(e,n,n.type,n.pendingProps,i);case 15:return Hm(e,n,n.type,n.pendingProps,i);case 19:return Zm(e,n,i);case 31:return X0(e,n,i);case 22:return Ym(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(Np())e.flags|=8192;else throw aa=or,Uc}else e.flags&=-16777217}function Wm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fg(n))if(Np())e.flags|=8192;else throw aa=or,Uc}function Sr(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?zf():536870912,e.lanes|=n,Za|=n)}function Fo(e,n){if(!Le)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 P0(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),Se(),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),Wm(n,h)):(Ke(n),wu(n,u,null,r,i))):h?h!==e.memoizedState?(Qn(n),Ke(n),Wm(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(Ot(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)?zh(n):(e=ag(u,r,i),n.stateNode=e,Qn(n))}return Ke(n),null;case 5:if(Ot(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))zh(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[Lt]=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||Pp(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?(Kt(n),n):(Kt(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?(Kt(n),n):(Kt(n),null)}return Kt(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 Se(),e===null&&Gu(n.stateNode.containerInfo),Ke(n),null;case 10:return Vn(n.type),Ke(n),null;case 19:if(P(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;)Mh(i,e),i=i.sibling;return ne(lt,lt.current&1|2),Le&&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&&!Le)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,ne(lt,u?i&1|2:i&1),Le&&In(n,r.treeForkCount),e):(Ke(n),null);case 22:case 23:return Kt(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&&P(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 Q0(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),Se(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ot(n),null;case 31:if(n.memoizedState!==null){if(Kt(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(Kt(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 P(lt),null;case 4:return Se(),null;case 10:return Vn(n.type),null;case 22:case 23:return Kt(n),Vc(),e!==null&&P(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 Km(e,n){switch(Tc(n),n.tag){case 3:Vn(st),Se();break;case 26:case 27:case 5:Ot(n);break;case 4:Se();break;case 31:n.memoizedState!==null&&Kt(n);break;case 13:Kt(n);break;case 19:P(lt);break;case 10:Vn(n.type);break;case 22:case 23:Kt(n),Vc(),e!==null&&P(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){Ve(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,Y=M;try{Y()}catch(X){Ve(u,O,X)}}}r=r.next}while(r!==h)}}catch(X){Ve(n,n.return,X)}}function Jm(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{Gh(n,i)}catch(r){Ve(e,e.return,r)}}}function ep(e,n,i){i.props=ra(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ve(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){Ve(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){Ve(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){Ve(e,n,u)}else i.current=null}function tp(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){Ve(e,e.return,u)}}function Su(e,n,i){try{var r=e.stateNode;g1(r,e.type,i,n),r[Lt]=n}catch(u){Ve(e,e.return,u)}}function np(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||np(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 ip(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[Lt]=i}catch(h){Ve(e,e.return,h)}}var Zn=!1,dt=!1,Mu=!1,ap=typeof WeakSet=="function"?WeakSet:Set,vt=null;function Z0(e,n){if(e=e.containerInfo,qu=Vr,e=gh(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,Y=0,X=0,F=e,G=null;t:for(;;){for(var V;F!==i||u!==0&&F.nodeType!==3||(M=b+u),F!==h||r!==0&&F.nodeType!==3||(O=b+r),F.nodeType===3&&(b+=F.nodeValue.length),(V=F.firstChild)!==null;)G=F,F=V;for(;;){if(F===e)break t;if(G===i&&++Y===u&&(M=b),G===h&&++X===r&&(O=b),(V=F.nextSibling)!==null)break;F=G,G=F.parentNode}F=V}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,vt=n;vt!==null;)if(n=vt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,vt=e;else for(;vt!==null;){switch(n=vt,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(ve){Ve(i,i.return,ve)}}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,vt=e;break}vt=n.return}}function op(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){Ve(i,i.return,b)}else{var u=ra(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ve(i,i.return,b)}}r&64&&Jm(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{Gh(e,n)}catch(b){Ve(i,i.return,b)}}break;case 27:n===null&&r&4&&ip(i);case 26:case 5:Wn(e,i),n===null&&r&4&&tp(i),r&512&&Ko(i,i.return);break;case 12:Wn(e,i);break;case 31:Wn(e,i),r&4&&sp(e,i);break;case 13:Wn(e,i),r&4&&cp(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=a1.bind(null,i),C1(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 lp(e){var n=e.alternate;n!==null&&(e.alternate=null,lp(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 nt=null,Bt=!1;function Fn(e,n,i){for(i=i.child;i!==null;)rp(e,n,i),i=i.sibling}function rp(e,n,i){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.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=nt,u=Bt;Ai(i.type)&&(nt=i.stateNode,Bt=!1),Fn(e,n,i),rl(i.stateNode),nt=r,Bt=u;break;case 5:dt||jn(i,n);case 6:if(r=nt,u=Bt,nt=null,Fn(e,n,i),nt=r,Bt=u,nt!==null)if(Bt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(i.stateNode)}catch(h){Ve(i,n,h)}else try{nt.removeChild(i.stateNode)}catch(h){Ve(i,n,h)}break;case 18:nt!==null&&(Bt?(e=nt,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),io(e)):Jp(nt,i.stateNode));break;case 4:r=nt,u=Bt,nt=i.stateNode.containerInfo,Bt=!0,Fn(e,n,i),nt=r,Bt=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"&&ep(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 sp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(i){Ve(n,n.return,i)}}}function cp(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){Ve(n,n.return,i)}}function F0(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new ap),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new ap),n;default:throw Error(o(435,e.tag))}}function Cr(e,n){var i=F0(e);n.forEach(function(r){if(!i.has(r)){i.add(r);var u=o1.bind(null,e,r);r.then(u,u)}})}function Ht(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)){nt=M.stateNode,Bt=!1;break e}break;case 5:nt=M.stateNode,Bt=!1;break e;case 3:case 4:nt=M.stateNode.containerInfo,Bt=!0;break e}M=M.return}if(nt===null)throw Error(o(160));rp(h,b,u),nt=null,Bt=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)up(n,e),n=n.sibling}var bn=null;function up(e,n){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(n,e),Yt(e),r&4&&(wi(3,e,e.return),Wo(3,e),wi(5,e,e.return));break;case 1:Ht(n,e),Yt(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(Ht(n,e),Yt(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,xt(h),r=h;break e;case"link":var b=ug("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=ug("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,xt(h),r=h}e.stateNode=r}else dg(u,e.type,e.stateNode);else e.stateNode=cg(u,r,e.memoizedProps);else h!==r?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,r===null?dg(u,e.type,e.stateNode):cg(u,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Su(e,e.memoizedProps,i.memoizedProps)}break;case 27:Ht(n,e),Yt(e),r&512&&(dt||i===null||jn(i,i.return)),i!==null&&r&4&&Su(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Ht(n,e),Yt(e),r&512&&(dt||i===null||jn(i,i.return)),e.flags&32){u=e.stateNode;try{ja(u,"")}catch(ue){Ve(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(Ht(n,e),Yt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(ue){Ve(e,e.return,ue)}}break;case 3:if(Hr=null,u=bn,bn=Ur(n.containerInfo),Ht(n,e),bn=u,Yt(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{io(n.containerInfo)}catch(ue){Ve(e,e.return,ue)}Mu&&(Mu=!1,dp(e));break;case 4:r=bn,bn=Ur(e.stateNode.containerInfo),Ht(n,e),Yt(e),bn=r;break;case 12:Ht(n,e),Yt(e);break;case 31:Ht(n,e),Yt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cr(e,r)));break;case 13:Ht(n,e),Yt(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,Y=Zn,X=dt;if(Zn=Y||u,dt=X||O,Ht(n,e),dt=X,Zn=Y,Yt(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 F=O.memoizedProps.style,G=F!=null&&F.hasOwnProperty("display")?F.display:null;M.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ue){Ve(O,O.return,ue)}}}else if(n.tag===6){if(i===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(ue){Ve(O,O.return,ue)}}}else if(n.tag===18){if(i===null){O=n;try{var V=O.stateNode;u?eg(V,!0):eg(O.stateNode,!1)}catch(ue){Ve(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:Ht(n,e),Yt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cr(e,r)));break;case 30:break;case 21:break;default:Ht(n,e),Yt(e)}}function Yt(e){var n=e.flags;if(n&2){try{for(var i,r=e.return;r!==null;){if(np(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,Y=Nu(e);Cu(e,Y,O);break;default:throw Error(o(161))}}catch(X){Ve(e,e.return,X)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function dp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;dp(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;)op(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"&&ep(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(Y){Ve(r,r.return,Y)}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++)Ih(O[u],M)}catch(Y){Ve(r,r.return,Y)}}i&&b&64&&Jm(h),Ko(h,h.return);break;case 27:ip(h);case 26:case 5:Kn(u,h,i),i&&r===null&&b&4&&tp(h),Ko(h,h.return);break;case 12:Kn(u,h,i);break;case 31:Kn(u,h,i),i&&b&4&&sp(u,h);break;case 13:Kn(u,h,i),i&&b&4&&cp(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;)fp(e,n,i,r),n=n.sibling}function fp(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){Ve(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,Y=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 X=b.stateNode;b.memoizedState!==null?X._visibility&2?qa(h,b,M,O,u):Jo(h,b):(X._visibility|=2,qa(h,b,M,O,u)),u&&Y&2048&&ju(b.alternate,b);break;case 24:qa(h,b,M,O,u),u&&Y&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;)hp(e,n,i),e=e.sibling}function hp(e,n,i){switch(e.tag){case 26:Pa(e,n,i),e.flags&el&&e.memoizedState!==null&&$1(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 mp(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];vt=r,gp(r,e)}mp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pp(e),e=e.sibling}function pp(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];vt=r,gp(r,e)}mp(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 gp(e,n){for(;vt!==null;){var i=vt;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,vt=r;else e:for(i=e;vt!==null;){r=vt;var u=r.sibling,h=r.return;if(lp(r),r===i){vt=null;break e}if(u!==null){u.return=h,vt=u;break e}vt=h}}}var W0={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}},K0=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Qe=null,Re=null,ke=0,Ge=0,Jt=null,Si=!1,Qa=!1,Au=!1,Jn=0,at=0,Ni=0,ca=0,Tu=0,en=0,Za=0,nl=null,It=null,zu=!1,jr=0,xp=0,Er=1/0,Ar=null,Ci=null,ht=0,Mi=null,Fa=null,ei=0,Ru=0,Ou=null,vp=null,il=0,ku=null;function tn(){return(Ye&2)!==0&&ke!==0?ke&-ke:L.T!==null?Bu():_f()}function bp(){if(en===0)if((ke&536870912)===0||Le){var e=$l;$l<<=1,($l&3932160)===0&&($l=262144),en=e}else en=536870912;return e=Wt.current,e!==null&&(e.flags|=32),en}function Gt(e,n,i){(e===Qe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),ji(e,ke,en,!1)),Co(e,i),((Ye&2)===0||e!==Qe)&&(e===Qe&&((Ye&2)===0&&(ca|=i),at===4&&ji(e,ke,en,!1)),En(e))}function yp(e,n,i){if((Ye&6)!==0)throw Error(o(327));var r=!i&&(n&127)===0&&(n&e.expiredLanes)===0||No(e,n),u=r?t1(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&&!J0(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=It,It=u,h!==null&&(It===null?It=h:It.push.apply(It,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,en,!Si);break e;case 2:It=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,en,!Si),Ul(r,0,!0)!==0)break e;ei=n,r.timeoutHandle=Wp(wp.bind(null,r,i,It,Ar,zu,n,en,ca,Za,Si,h,"Throttled",-0,0),u);break e}wp(r,i,It,Ar,zu,n,en,ca,Za,Si,h,null,-0,0)}}break}while(!0);En(e)}function wp(e,n,i,r,u,h,b,M,O,Y,X,F,G,V){if(e.timeoutHandle=-1,F=n.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},hp(n,h,F);var ue=(h&62914560)===h?jr-Fe():(h&4194048)===h?xp-Fe():0;if(ue=L1(F,ue),ue!==null){ei=h,e.cancelPendingCommit=ue(Tp.bind(null,e,n,h,i,r,u,b,M,O,X,F,null,G,V)),ji(e,h,b,!Y);return}}Tp(e,n,h,i,r,u,b,M,O)}function J0(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(!Zt(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-Qt(u),b=1<<h;r[h]=-1,u&=~b}i!==0&&Rf(e,i,n)}function Tr(){return(Ye&6)===0?(al(0),!1):!0}function _u(){if(Re!==null){if(Ge===0)var e=Re.return;else e=Re,Gn=ea=null,Fc(e),Ya=null,Ho=0,e=Re;for(;e!==null;)Km(e.alternate,e),e=e.return;Re=null}}function Wa(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,b1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ei=0,_u(),Qe=e,Re=i=Yn(e.current,null),ke=n,Ge=0,Jt=null,Si=!1,Qa=No(e,n),Au=!1,Za=en=Tu=ca=Ni=at=0,It=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-Qt(r),h=1<<u;n|=e[u],r&=~h}return Jn=n,Fl(),i}function Sp(e,n){je=null,L.H=Qo,n===Ha||n===ar?(n=Uh(),Ge=3):n===Uc?(n=Uh(),Ge=4):Ge=n===fu?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Jt=n,Re===null&&(at=1,vr(e,sn(n,e.current)))}function Np(){var e=Wt.current;return e===null?!0:(ke&4194048)===ke?fn===null:(ke&62914560)===ke||(ke&536870912)!==0?e===fn:!1}function Cp(){var e=L.H;return L.H=Qo,e===null?Qo:e}function Mp(){var e=L.A;return L.A=W0,e}function zr(){at=4,Si||(ke&4194048)!==ke&&Wt.current!==null||(Qa=!0),(Ni&134217727)===0&&(ca&134217727)===0||Qe===null||ji(Qe,ke,en,!1)}function Du(e,n,i){var r=Ye;Ye|=2;var u=Cp(),h=Mp();(Qe!==e||ke!==n)&&(Ar=null,Wa(e,n)),n=!1;var b=at;e:do try{if(Ge!==0&&Re!==null){var M=Re,O=Jt;switch(Ge){case 8:_u(),b=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(n=!0);var Y=Ge;if(Ge=0,Jt=null,Ka(e,M,O,Y),i&&Qa){b=0;break e}break;default:Y=Ge,Ge=0,Jt=null,Ka(e,M,O,Y)}}e1(),b=at;break}catch(X){Sp(e,X)}while(!0);return n&&e.shellSuspendCounter++,Gn=ea=null,Ye=r,L.H=u,L.A=h,Re===null&&(Qe=null,ke=0,Fl()),b}function e1(){for(;Re!==null;)jp(Re)}function t1(e,n){var i=Ye;Ye|=2;var r=Cp(),u=Mp();Qe!==e||ke!==n?(Ar=null,Er=Fe()+500,Wa(e,n)):Qa=No(e,n);e:do try{if(Ge!==0&&Re!==null){n=Re;var h=Jt;t:switch(Ge){case 1:Ge=0,Jt=null,Ka(e,n,h,1);break;case 2:case 9:if($h(h)){Ge=0,Jt=null,Ep(n);break}n=function(){Ge!==2&&Ge!==9||Qe!==e||(Ge=7),En(e)},h.then(n,n);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:$h(h)?(Ge=0,Jt=null,Ep(n)):(Ge=0,Jt=null,Ka(e,n,h,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var M=Re;if(b?fg(b):M.stateNode.complete){Ge=0,Jt=null;var O=M.sibling;if(O!==null)Re=O;else{var Y=M.return;Y!==null?(Re=Y,Rr(Y)):Re=null}break t}}Ge=0,Jt=null,Ka(e,n,h,5);break;case 6:Ge=0,Jt=null,Ka(e,n,h,6);break;case 8:_u(),at=6;break e;default:throw Error(o(462))}}n1();break}catch(X){Sp(e,X)}while(!0);return Gn=ea=null,L.H=r,L.A=u,Ye=i,Re!==null?0:(Qe=null,ke=0,Fl(),at)}function n1(){for(;Re!==null&&!ae();)jp(Re)}function jp(e){var n=Fm(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,n===null?Rr(e):Re=n}function Ep(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Vm(i,n,n.pendingProps,n.type,void 0,ke);break;case 11:n=Vm(i,n,n.pendingProps,n.type.render,n.ref,ke);break;case 5:Fc(n);default:Km(i,n),n=Re=Mh(n,Jn),n=Fm(i,n,Jn)}e.memoizedProps=e.pendingProps,n===null?Rr(e):Re=n}function Ka(e,n,i,r){Gn=ea=null,Fc(n),Ya=null,Ho=0;var u=n.return;try{if(V0(e,u,n,i,ke)){at=1,vr(e,sn(i,e.current)),Re=null;return}}catch(h){if(u!==null)throw Re=u,h;at=1,vr(e,sn(i,e.current)),Re=null;return}n.flags&32768?(Le||r===1?e=!0:Qa||(ke&536870912)!==0?e=!1:(Si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Wt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ap(n,e)):Rr(n)}function Rr(e){var n=e;do{if((n.flags&32768)!==0){Ap(n,Si);return}e=n.return;var i=P0(n.alternate,n,Jn);if(i!==null){Re=i;return}if(n=n.sibling,n!==null){Re=n;return}Re=n=e}while(n!==null);at===0&&(at=5)}function Ap(e,n){do{var i=Q0(e.alternate,e);if(i!==null){i.flags&=32767,Re=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Re=e;return}Re=e=i}while(e!==null);at=6,Re=null}function Tp(e,n,i,r,u,h,b,M,O){e.cancelPendingCommit=null;do Or();while(ht!==0);if((Ye&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,Dy(e,i,h,b,M,O),e===Qe&&(Re=Qe=null,ke=0),Fa=n,Mi=e,ei=i,Ru=h,Ou=u,vp=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,l1(Vi,function(){return _p(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=L.T,L.T=null,u=q.p,q.p=2,b=Ye,Ye|=4;try{Z0(e,n,i)}finally{Ye=b,q.p=u,L.T=r}}ht=1,zp(),Rp(),Op()}}function zp(){if(ht===1){ht=0;var e=Mi,n=Fa,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=L.T,L.T=null;var r=q.p;q.p=2;var u=Ye;Ye|=4;try{up(n,e);var h=Pu,b=gh(e.containerInfo),M=h.focusedElem,O=h.selectionRange;if(b!==M&&M&&M.ownerDocument&&ph(M.ownerDocument.documentElement,M)){if(O!==null&&vc(M)){var Y=O.start,X=O.end;if(X===void 0&&(X=Y),"selectionStart"in M)M.selectionStart=Y,M.selectionEnd=Math.min(X,M.value.length);else{var F=M.ownerDocument||document,G=F&&F.defaultView||window;if(G.getSelection){var V=G.getSelection(),ue=M.textContent.length,ve=Math.min(O.start,ue),Pe=O.end===void 0?ve:Math.min(O.end,ue);!V.extend&&ve>Pe&&(b=Pe,Pe=ve,ve=b);var U=mh(M,ve),$=mh(M,Pe);if(U&&$&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==$.node||V.focusOffset!==$.offset)){var H=F.createRange();H.setStart(U.node,U.offset),V.removeAllRanges(),ve>Pe?(V.addRange(H),V.extend($.node,$.offset)):(H.setEnd($.node,$.offset),V.addRange(H))}}}}for(F=[],V=M;V=V.parentNode;)V.nodeType===1&&F.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<F.length;M++){var Q=F[M];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Vr=!!qu,Pu=qu=null}finally{Ye=u,q.p=r,L.T=i}}e.current=n,ht=2}}function Rp(){if(ht===2){ht=0;var e=Mi,n=Fa,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=L.T,L.T=null;var r=q.p;q.p=2;var u=Ye;Ye|=4;try{op(e,n.alternate,n)}finally{Ye=u,q.p=r,L.T=i}}ht=3}}function Op(){if(ht===4||ht===3){ht=0,tt();var e=Mi,n=Fa,i=ei,r=vp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ht=5:(ht=0,Fa=Mi=null,kp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ci=null),Js(i),n=n.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(So,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=L.T,u=q.p,q.p=2,L.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{L.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 kp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Uo(n)))}function Or(){return zp(),Rp(),Op(),_p()}function _p(){if(ht!==5)return!1;var e=Mi,n=Ru;Ru=0;var i=Js(ei),r=L.T,u=q.p;try{q.p=32>i?32:i,L.T=null,i=Ou,Ou=null;var h=Mi,b=ei;if(ht=0,Fa=Mi=null,ei=0,(Ye&6)!==0)throw Error(o(331));var M=Ye;if(Ye|=4,pp(h.current),fp(h,h.current,b,i),Ye=M,al(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(So,h)}catch{}return!0}finally{q.p=u,L.T=r,kp(e,n)}}function Dp(e,n,i){n=sn(i,n),n=du(e.stateNode,n,2),e=vi(e,n,2),e!==null&&(Co(e,2),En(e))}function Ve(e,n,i){if(e.tag===3)Dp(e,e,i);else for(;n!==null;){if(n.tag===3){Dp(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=sn(i,e),i=$m(2),r=vi(n,i,2),r!==null&&(Lm(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 K0;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=i1.bind(null,e,n,i),n.then(e,e))}function i1(e,n,i){var r=e.pingCache;r!==null&&r.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Qe===e&&(ke&i)===i&&(at===4||at===3&&(ke&62914560)===ke&&300>Fe()-jr?(Ye&2)===0&&Wa(e,0):Tu|=i,Za===ke&&(Za=0)),En(e)}function $p(e,n){n===0&&(n=zf()),e=Wi(e,n),e!==null&&(Co(e,n),En(e))}function a1(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),$p(e,i)}function o1(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),$p(e,i)}function l1(e,n){return he(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,s1())}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-Qt(42|e)+1)-1,h&=u&~(b&~M),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Hp(r,h))}else h=ke,h=Ul(r,r===Qe?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||No(r,h)||(i=!0,Hp(r,h));r=r.next}while(i);Uu=!1}}function r1(){Lp()}function Lp(){_r=Lu=!1;var e=0;Ei!==0&&v1()&&(e=Ei);for(var n=Fe(),i=null,r=kr;r!==null;){var u=r.next,h=Up(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 Up(e,n){for(var i=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var b=31-Qt(h),M=1<<b,O=u[b];O===-1?((M&i)===0||(M&r)!==0)&&(u[b]=_y(M,n)):O<=n&&(e.expiredLanes|=M),h&=~M}if(n=Qe,i=ke,i=Ul(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===n&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&de(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&&de(r),Js(i)){case 2:case 8:i=kt;break;case 32:i=Vi;break;case 268435456:i=si;break;default:i=Vi}return r=Bp.bind(null,e),i=he(i,r),e.callbackPriority=n,e.callbackNode=i,n}return r!==null&&r!==null&&de(r),e.callbackPriority=2,e.callbackNode=null,2}function Bp(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=ke;return r=Ul(e,e===Qe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yp(e,r,n),Up(e,Fe()),e.callbackNode!=null&&e.callbackNode===i?Bp.bind(null,e):null)}function Hp(e,n){if(Or())return null;yp(e,n,!0)}function s1(){y1(function(){(Ye&6)!==0?he(_l,r1):Lp()})}function Bu(){if(Ei===0){var e=Ua;e===0&&(e=Dl,Dl<<=1,(Dl&261888)===0&&(Dl=256)),Ei=e}return Ei}function Yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Il(""+e)}function Ip(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 c1(e,n,i,r,u){if(n==="submit"&&i&&i.stateNode===u){var h=Yp((u[Lt]||null).action),b=r.submitter;b&&(n=(n=b[Lt]||null)?Yp(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?Ip(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?Ip(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],u1=Yu.toLowerCase(),d1=Yu[0].toUpperCase()+Yu.slice(1);vn(u1,"on"+d1)}vn(bh,"onAnimationEnd"),vn(yh,"onAnimationIteration"),vn(wh,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(E0,"onTransitionRun"),vn(A0,"onTransitionStart"),vn(T0,"onTransitionCancel"),vn(Sh,"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(" "),f1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ol));function Gp(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,Y=M.currentTarget;if(M=M.listener,O!==h&&u.isPropagationStopped())break e;h=M,u.currentTarget=Y;try{h(u)}catch(X){Zl(X)}u.currentTarget=null,h=O}else for(b=0;b<r.length;b++){if(M=r[b],O=M.instance,Y=M.currentTarget,M=M.listener,O!==h&&u.isPropagationStopped())break e;h=M,u.currentTarget=Y;try{h(u)}catch(X){Zl(X)}u.currentTarget=null,h=O}}}}function Oe(e,n){var i=n[ec];i===void 0&&(i=n[ec]=new Set);var r=e+"__bubble";i.has(r)||(Vp(n,e,2,!1),i.add(r))}function Iu(e,n,i){var r=0;n&&(r|=4),Vp(i,e,r,n)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function Gu(e){if(!e[Dr]){e[Dr]=!0,Lf.forEach(function(i){i!=="selectionchange"&&(f1.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 Vp(e,n,i,r){switch(bg(n)){case 2:var u=H1;break;case 8:u=Y1;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}Zf(function(){var Y=h,X=rc(i),F=[];e:{var G=Nh.get(e);if(G!==void 0){var V=ql,ue=e;switch(e){case"keypress":if(Vl(i)===0)break e;case"keydown":case"keyup":V=o0;break;case"focusin":ue="focus",V=hc;break;case"focusout":ue="blur",V=hc;break;case"beforeblur":case"afterblur":V=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":V=Kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Py;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=s0;break;case bh:case yh:case wh:V=Fy;break;case Sh:V=u0;break;case"scroll":case"scrollend":V=Xy;break;case"wheel":V=f0;break;case"copy":case"cut":case"paste":V=Ky;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=eh;break;case"toggle":case"beforetoggle":V=m0}var ve=(n&4)!==0,Pe=!ve&&(e==="scroll"||e==="scrollend"),U=ve?G!==null?G+"Capture":null:G;ve=[];for(var $=Y,H;$!==null;){var Q=$;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||U===null||(Q=Eo($,U),Q!=null&&ve.push(ll($,Q,H))),Pe)break;$=$.return}0<ve.length&&(G=new V(G,ue,null,i,X),F.push({event:G,listeners:ve}))}}if((n&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",G&&i!==lc&&(ue=i.relatedTarget||i.fromElement)&&(wa(ue)||ue[ya]))break e;if((V||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,V?(ue=i.relatedTarget||i.toElement,V=Y,ue=ue?wa(ue):null,ue!==null&&(Pe=c(ue),ve=ue.tag,ue!==Pe||ve!==5&&ve!==27&&ve!==6)&&(ue=null)):(V=null,ue=Y),V!==ue)){if(ve=Kf,Q="onMouseLeave",U="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ve=eh,Q="onPointerLeave",U="onPointerEnter",$="pointer"),Pe=V==null?G:jo(V),H=ue==null?G:jo(ue),G=new ve(Q,$+"leave",V,i,X),G.target=Pe,G.relatedTarget=H,Q=null,wa(X)===Y&&(ve=new ve(U,$+"enter",ue,i,X),ve.target=H,ve.relatedTarget=Pe,Q=ve),Pe=Q,V&&ue)t:{for(ve=h1,U=V,$=ue,H=0,Q=U;Q;Q=ve(Q))H++;Q=0;for(var xe=$;xe;xe=ve(xe))Q++;for(;0<H-Q;)U=ve(U),H--;for(;0<Q-H;)$=ve($),Q--;for(;H--;){if(U===$||$!==null&&U===$.alternate){ve=U;break t}U=ve(U),$=ve($)}ve=null}else ve=null;V!==null&&Xp(F,G,V,ve,!1),ue!==null&&Pe!==null&&Xp(F,Pe,ue,ve,!0)}}e:{if(G=Y?jo(Y):window,V=G.nodeName&&G.nodeName.toLowerCase(),V==="select"||V==="input"&&G.type==="file")var Be=sh;else if(lh(G))if(ch)Be=C0;else{Be=S0;var me=w0}else V=G.nodeName,!V||V.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?Y&&oc(Y.elementType)&&(Be=sh):Be=N0;if(Be&&(Be=Be(e,Y))){rh(F,Be,i,X);break e}me&&me(e,G,Y),e==="focusout"&&Y&&G.type==="number"&&Y.memoizedProps.value!=null&&ac(G,"number",G.value)}switch(me=Y?jo(Y):window,e){case"focusin":(lh(me)||me.contentEditable==="true")&&(za=me,bc=Y,Do=null);break;case"focusout":Do=bc=za=null;break;case"mousedown":yc=!0;break;case"contextmenu":case"mouseup":case"dragend":yc=!1,xh(F,i,X);break;case"selectionchange":if(j0)break;case"keydown":case"keyup":xh(F,i,X)}var Ee;if(pc)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Ta?ah(e,i)&&(_e="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(_e="onCompositionStart");_e&&(th&&i.locale!=="ko"&&(Ta||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Ta&&(Ee=Ff()):(di=X,uc="value"in di?di.value:di.textContent,Ta=!0)),me=$r(Y,_e),0<me.length&&(_e=new Jf(_e,e,null,i,X),F.push({event:_e,listeners:me}),Ee?_e.data=Ee:(Ee=oh(i),Ee!==null&&(_e.data=Ee)))),(Ee=g0?x0(e,i):v0(e,i))&&(_e=$r(Y,"onBeforeInput"),0<_e.length&&(me=new Jf("onBeforeInput","beforeinput",null,i,X),F.push({event:me,listeners:_e}),me.data=Ee)),c1(F,e,Y,i,X)}Gp(F,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 h1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xp(e,n,i,r,u){for(var h=n._reactName,b=[];i!==null&&i!==r;){var M=i,O=M.alternate,Y=M.stateNode;if(M=M.tag,O!==null&&O===r)break;M!==5&&M!==26&&M!==27||Y===null||(O=Y,u?(Y=Eo(i,h),Y!=null&&b.unshift(ll(i,Y,O))):u||(Y=Eo(i,h),Y!=null&&b.push(ll(i,Y,O)))),i=i.return}b.length!==0&&e.push({event:n,listeners:b})}var m1=/\r\n?/g,p1=/\u0000|\uFFFD/g;function qp(e){return(typeof e=="string"?e:""+e).replace(m1,`
|
|
50
|
-
`).replace(p1,"")}function Pp(e,n){return n=qp(n),qp(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":Pf(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&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("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":Oe("beforetoggle",e),Oe("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=Gy.get(i)||i,Bl(e,i,r))}}function Xu(e,n,i,r,u,h){switch(i){case"style":Pf(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&&Oe("scroll",e);break;case"onScrollEnd":r!=null&&Oe("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(!Uf.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[Lt]||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":Oe("error",e),Oe("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":Oe("invalid",e);var M=h=b=u=null,O=null,Y=null;for(r in i)if(i.hasOwnProperty(r)){var X=i[r];if(X!=null)switch(r){case"name":u=X;break;case"type":b=X;break;case"checked":O=X;break;case"defaultChecked":Y=X;break;case"value":h=X;break;case"defaultValue":M=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,n));break;default:qe(e,n,r,X,i,null)}}Gf(e,h,M,O,Y,b,u,!1);return;case"select":Oe("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":Oe("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)}Xf(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":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(r=0;r<ol.length;r++)Oe(ol[r],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("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(Y in i)if(i.hasOwnProperty(Y)&&(r=i[Y],r!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:qe(e,n,Y,r,i,null)}return;default:if(oc(n)){for(X in i)i.hasOwnProperty(X)&&(r=i[X],r!==void 0&&Xu(e,n,X,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 g1(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,Y=null,X=null;for(V in i){var F=i[V];if(i.hasOwnProperty(V)&&F!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":O=F;default:r.hasOwnProperty(V)||qe(e,n,V,null,r,F)}}for(var G in r){var V=r[G];if(F=i[G],r.hasOwnProperty(G)&&(V!=null||F!=null))switch(G){case"type":h=V;break;case"name":u=V;break;case"checked":Y=V;break;case"defaultChecked":X=V;break;case"value":b=V;break;case"defaultValue":M=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,n));break;default:V!==F&&qe(e,n,G,V,r,F)}}ic(e,b,M,O,Y,X,h,u);return;case"select":V=b=M=G=null;for(h in i)if(O=i[h],i.hasOwnProperty(h)&&O!=null)switch(h){case"value":break;case"multiple":V=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=V,G!=null?Ma(e,!!i,G,!1):!!r!=!!i&&(n!=null?Ma(e,!!i,n,!0):Ma(e,!!i,i?[]:"",!1));return;case"textarea":V=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":V=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)}Vf(e,G,V);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],V=i[O],r.hasOwnProperty(O)&&G!==V&&(G!=null||V!=null))switch(O){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:qe(e,n,O,G,r,V)}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 ve in i)G=i[ve],i.hasOwnProperty(ve)&&G!=null&&!r.hasOwnProperty(ve)&&qe(e,n,ve,null,r,G);for(Y in r)if(G=r[Y],V=i[Y],r.hasOwnProperty(Y)&&G!==V&&(G!=null||V!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,n));break;default:qe(e,n,Y,G,r,V)}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(X in r)G=r[X],V=i[X],!r.hasOwnProperty(X)||G===V||G===void 0&&V===void 0||Xu(e,n,X,G,r,V);return}}for(var U in i)G=i[U],i.hasOwnProperty(U)&&G!=null&&!r.hasOwnProperty(U)&&qe(e,n,U,null,r,G);for(F in r)G=r[F],V=i[F],!r.hasOwnProperty(F)||G===V||G==null&&V==null||qe(e,n,F,G,r,V)}function Qp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function x1(){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&&Qp(b)){for(b=0,M=u.responseEnd,r+=1;r<i.length;r++){var O=i[r],Y=O.startTime;if(Y>M)break;var X=O.transferSize,F=O.initiatorType;X&&Qp(F)&&(O=O.responseEnd,b+=X*(O<M?1:(M-Y)/(O-Y)))}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 Zp(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 Fp(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 v1(){var e=window.event;return e&&e.type==="popstate"?e===Zu?!1:(Zu=e,!0):(Zu=null,!1)}var Wp=typeof setTimeout=="function"?setTimeout:void 0,b1=typeof clearTimeout=="function"?clearTimeout:void 0,Kp=typeof Promise=="function"?Promise:void 0,y1=typeof queueMicrotask=="function"?queueMicrotask:typeof Kp<"u"?function(e){return Kp.resolve(null).then(e).catch(w1)}:Wp;function w1(e){setTimeout(function(){throw e})}function Ai(e){return e==="head"}function Jp(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 eg(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 S1(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=hn(e.nextSibling),e===null)break}return null}function N1(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=hn(e.nextSibling),e===null))return null;return e}function tg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=hn(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 C1(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 hn(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 ng(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return hn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function ig(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 ag(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 mn=new Map,og=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:M1,r:j1,D:E1,C:A1,L:T1,m:z1,X:O1,S:R1,M:k1};function M1(){var e=ti.f(),n=Tr();return e||n}function j1(e){var n=Sa(e);n!==null&&n.tag===5&&n.type==="form"?Sm(n):ti.r(e)}var eo=typeof document>"u"?null:document;function lg(e,n,i){var r=eo;if(r&&typeof n=="string"&&n){var u=ln(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),og.has(u)||(og.add(u),e={rel:e,crossOrigin:i,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),Et(n,"link",e),xt(n),r.head.appendChild(n)))}}function E1(e){ti.D(e),lg("dns-prefetch",e,null)}function A1(e,n){ti.C(e,n),lg("preconnect",e,n)}function T1(e,n,i){ti.L(e,n,i);var r=eo;if(r&&e&&n){var u='link[rel="preload"][as="'+ln(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+ln(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+ln(i.imageSizes)+'"]')):u+='[href="'+ln(e)+'"]';var h=u;switch(n){case"style":h=to(e);break;case"script":h=no(e)}mn.has(h)||(e=v({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),mn.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),xt(n),r.head.appendChild(n)))}}function z1(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="'+ln(r)+'"][href="'+ln(e)+'"]',h=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=no(e)}if(!mn.has(h)&&(e=v({rel:"modulepreload",href:e},n),mn.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),xt(r),i.head.appendChild(r)}}}function R1(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=mn.get(h))&&ed(e,i);var O=b=r.createElement("link");xt(O),Et(O,"link",e),O._p=new Promise(function(Y,X){O.onload=Y,O.onerror=X}),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 O1(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=mn.get(u))&&td(e,n),h=i.createElement("script"),xt(h),Et(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function k1(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=mn.get(u))&&td(e,n),h=i.createElement("script"),xt(h),Et(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(u,h))}}function rg(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),mn.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},mn.set(e,i),h||_1(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="'+ln(e)+'"'}function sl(e){return'link[rel="stylesheet"]['+e+"]"}function sg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function _1(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),xt(n),e.head.appendChild(n))}function no(e){return'[src="'+ln(e)+'"]'}function cl(e){return"script[async]"+e}function cg(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+ln(i.href)+'"]');if(r)return n.instance=r,xt(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"),xt(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,xt(h),h;r=sg(i),(u=mn.get(u))&&ed(r,u),h=(e.ownerDocument||e).createElement("link"),xt(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,xt(u),u):(r=i,(u=mn.get(h))&&(r=v({},i),td(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),xt(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 ug(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 dg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function D1(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 fg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $1(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,xt(h);return}h=n.ownerDocument||n,r=sg(r),(u=mn.get(u))&&ed(r,u),h=h.createElement("link"),xt(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 L1(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*x1());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(U1,e),Ir=null,Yr.call(e))}function U1(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:W,_currentValue2:W,_threadCount:0};function B1(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 hg(e,n,i,r,u,h,b,M,O,Y,X,F){return e=new B1(e,n,i,b,O,Y,X,F,M),n=1,h===!0&&(n|=24),h=Ft(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 mg(e){return e?(e=ka,e):ka}function pg(e,n,i,r,u,h){u=mg(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&&(Gt(i,e,n),Io(i,e,n))}function gg(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){gg(e,n),(e=e.alternate)&&gg(e,n)}function xg(e){if(e.tag===13||e.tag===31){var n=Wi(e,67108864);n!==null&&Gt(n,e,67108864),id(e,67108864)}}function vg(e){if(e.tag===13||e.tag===31){var n=tn();n=Ks(n);var i=Wi(e,n);i!==null&&Gt(i,e,n),id(e,n)}}var Vr=!0;function H1(e,n,i,r){var u=L.T;L.T=null;var h=q.p;try{q.p=2,ad(e,n,i,r)}finally{q.p=h,L.T=u}}function Y1(e,n,i,r){var u=L.T;L.T=null;var h=q.p;try{q.p=8,ad(e,n,i,r)}finally{q.p=h,L.T=u}}function ad(e,n,i,r){if(Vr){var u=od(r);if(u===null)Vu(e,n,r,Xr,i),yg(e,r);else if(G1(u,e,n,i,r))r.stopPropagation();else if(yg(e,r),n&4&&-1<I1.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-Qt(b);M.entanglements[1]|=O,b&=~O}En(h),(Ye&6)===0&&(Er=Fe()+500,al(0))}}break;case 31:case 13:M=Wi(h,2),M!==null&&Gt(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 bg(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 kt: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=[],I1="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 yg(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&&xg(n)),e):(e.eventSystemFlags|=r,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function G1(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 wg(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,Df(e.priority,function(){vg(i)});return}}else if(n===31){if(n=f(i),n!==null){e.blockedOn=n,Df(e.priority,function(){vg(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&&xg(n),e.blockedOn=i,!1;n.shift()}return!0}function Sg(e,n,i){qr(e)&&i.delete(n)}function V1(){rd=!1,Ti!==null&&qr(Ti)&&(Ti=null),zi!==null&&qr(zi)&&(zi=null),Ri!==null&&qr(Ri)&&(Ri=null),dl.forEach(Sg),fl.forEach(Sg)}function Pr(e,n){e.blockedOn===n&&(e.blockedOn=null,rd||(rd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,V1)))}var Qr=null;function Ng(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);)wg(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[Lt]||null;if(typeof h=="function")b||Ng(i);else if(b){var M=null;if(h&&h.hasAttribute("formAction")){if(u=h,b=h[Lt]||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),Ng(i)}}}function Cg(){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=tn();pg(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;pg(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=_f();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&&wg(e)}};var Mg=a.version;if(Mg!=="19.2.7")throw Error(o(527,Mg,"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 X1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,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(X1),Pt=Fr}catch{}}return pl.createRoot=function(e,n){if(!s(e))throw Error(o(299));var i=!1,r="",u=Om,h=km,b=_m;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=hg(e,1,!1,null,null,i,r,null,u,h,b,Cg),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=Om,b=km,M=_m,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=hg(e,1,!0,n,i??null,r,u,O,h,b,M,Cg),n.context=mg(null),i=n.current,r=tn(),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 Dg;function aw(){if(Dg)return dd.exports;Dg=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=iw(),dd.exports}var ow=aw();const lw="modulepreload",rw=function(t){return"/"+t},$g={},sw=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=rw(g),g in $g)return;$g[g]=!0;const x=g.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const S=document.createElement("link");if(S.rel=x?"stylesheet":lw,x||(S.as="script"),S.crossOrigin="",S.href=g,p&&S.setAttribute("nonce",p),document.head.appendChild(S),x)return new Promise((w,y)=>{S.addEventListener("load",w),S.addEventListener("error",()=>y(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)})},Lg=t=>Symbol.iterator in t,Ug=t=>"entries"in t,Bg=(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},cw=(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 uw(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:Lg(t)&&Lg(a)?Ug(t)&&Ug(a)?Bg(t,a):cw(t,a):Bg({entries:()=>Object.entries(t)},{entries:()=>Object.entries(a)})}function qt(t){const a=so.useRef(void 0);return l=>{const o=t(l);return uw(a.current,o)?a.current:a.current=o}}function B(t,a,l){return t==="zh-CN"?l:a}const Hg={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"},ev=(t,a=2)=>Number.isInteger(t)?t:Math.round(t*10**a)/10**a,pn=t=>`${ev(t)}px`,dw=t=>t.map(a=>`${a.color} ${a.offset}%`).join(", ");function fw(t){if(t.type==="solid"&&t.color)return t.color;if(t.gradient){const a=dw(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"){var S,w,y,C,A;const o=[],{style:s,type:c}=t,d=c==="text";if(a)return"";if(d||o.push(`width: ${Math.round(t.absoluteBbox.width)}px;`,`height: ${Math.round(t.absoluteBbox.height)}px;`),s.opacity!==1&&o.push(`opacity: ${ev(s.opacity)};`),(S=t.computed)!=null&&S.borderRadius&&o.push(`border-radius: ${t.computed.borderRadius};`),s.overflow==="hidden"&&o.push("overflow: hidden;"),!d){const E=new Set;for(const R of s.fills){const z=fw(R);z&&!E.has(z)&&(E.add(z),o.push(R.type==="solid"?`background-color: ${z};`:`background: ${z};`))}}const f=s.strokes.length>0&&s.strokes[0].position==="outside"&&s.strokes[0].width>0?s.strokes[0].width:0,p=[];if(d&&s.strokes.length>0){const E=s.strokes[0];E.width>0&&o.push(`-webkit-text-stroke: ${pn(E.width)} ${E.color};`,"paint-order: stroke fill;")}else if(!d)for(const E of s.strokes){const R=(w=E.strokeDashes)!=null&&w.length?"dashed":"solid";if(E.position==="outside")p.push(`0 0 0 ${pn(E.width)} ${E.color}`);else{if(E.widths){const[z,T,j,k]=E.widths;o.push(`border-width: ${pn(z)} ${pn(T)} ${pn(j)} ${pn(k)};`),o.push(`border-style: ${R};`),o.push(`border-color: ${E.color};`)}else o.push(`border: ${pn(E.width)} ${R} ${E.color};`);o.push("box-sizing: border-box;")}}const g=[],x=[];for(const E of s.shadows){const R=`${pn(E.offsetX)} ${pn(E.offsetY)} ${pn(E.blur)}`;E.type==="drop"?E.spread?x.push(`${R} ${pn(E.spread+f)} ${E.color}`):g.push(`drop-shadow(${R} ${E.color})`):E.type==="inner"&&x.push(`inset ${R} ${pn(E.spread)} ${E.color}`)}g.length&&o.push(`filter: ${g.join(" ")};`);const v=[...p,...x];if(v.length&&o.push(`box-shadow: ${v.join(", ")};`),s.blendMode&&Hg[s.blendMode]&&o.push(`mix-blend-mode: ${Hg[s.blendMode]};`),t.text){const E=t.text;o.push(`font-family: '${E.fontFamily}', sans-serif;`,`font-size: ${E.fontSize}px;`),E.fillType&&E.fillType!=="solid"&&E.gradient?o.push(`background: ${E.gradient};`,"-webkit-background-clip: text;","-webkit-text-fill-color: transparent;"):o.push(`color: ${E.color};`),E.fontWeight&&E.fontWeight!==400&&o.push(`font-weight: ${E.fontWeight};`),E.lineHeight&&o.push(`line-height: ${E.lineHeight}px;`),E.letterSpacing&&o.push(`letter-spacing: ${E.letterSpacing}px;`);const R=E.textAlign==="justified"?"justify":E.textAlign;R!=="left"&&o.push(`text-align: ${R};`);const z=E.textAlignVertical==="center"?"middle":E.textAlignVertical;if(z!=="top"&&o.push(`vertical-align: ${z};`),E.textDecoration&&o.push(`text-decoration: ${E.textDecoration};`),E.textAutoResize==="truncate"){const j=(y=E.textLayout)==null?void 0:y.lineClamp;j&&j>1?o.push("overflow: hidden;","display: -webkit-box;","-webkit-box-orient: vertical;",`-webkit-line-clamp: ${j};`,"text-overflow: ellipsis;","word-break: break-word;"):o.push("overflow: hidden;","text-overflow: ellipsis;","white-space: nowrap;")}const T=E.segments;if(T&&T.length>1){o.push("",B(l,`/* Segmented text (${T.length} segments) — use <span> elements for distinct styles */`,`/* 分段文本(${T.length} 段)— 需要用 <span> 实现不同样式 */`));for(const j of T){const k=[];j.color!==E.color&&k.push(`color: ${j.color}`),j.fontSize!==E.fontSize&&k.push(`font-size: ${j.fontSize}px`),j.fontWeight!==E.fontWeight&&k.push(`font-weight: ${j.fontWeight}`),j.fontFamily!==E.fontFamily&&k.push(`font-family: '${j.fontFamily}'`),j.textDecoration!==E.textDecoration&&k.push(`text-decoration: ${j.textDecoration}`);const _=k.join("; ");o.push(`/* <span${_?` style="${_}"`:""}>${j.content.replace(/\n/g,"\\n")}</span> */`)}}}for(const E of s.blurs??[])E.type==="layer"?o.push(`filter: blur(${E.radius}px);`):E.type==="background"&&o.push(`backdrop-filter: blur(${E.radius}px);`);return(A=(C=t.computed)==null?void 0:C.transform)!=null&&A.value&&o.push(`transform: ${t.computed.transform.value};`,`transform-origin: ${t.computed.transform.origin};`),o.join(`
|
|
51
|
-
`)}function tv(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=mw(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=pw(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 nv(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=nv(d,a,f,p);s.push(...g)}return s}function Qd(t,a){var I;const l=t.children.map(Z=>a.nodes[Z]).filter(Z=>!!Z&&Z.style.visible);if(l.length===0)return null;const s=((I=t.layout)==null?void 0:I.display)==="flex"?l.filter(Z=>{var te;return((te=Z.layout)==null?void 0:te.position)!=="absolute"||Z.isVirtual}):l;if(s.length===0)return null;const c=Math.min(...s.map(Z=>Z.bbox.x)),d=Math.min(...s.map(Z=>Z.bbox.y)),f=Math.max(...s.map(Z=>Z.bbox.x+Z.bbox.width)),p=Math.max(...s.map(Z=>Z.bbox.y+Z.bbox.height)),g=Math.round(d),x=Math.round(c),v=Math.round(t.bbox.height-p),S=Math.round(t.bbox.width-f),w=g===S&&S===v&&v===x,y=nv(t,a,0,0),C=[];let A=0,E=null,R=0,z=null,T=0,j=null,k=0,_=null;for(const Z of y){const te=-Z.relY;te>A&&(A=te,E=Z.node);const ee=-Z.relX;ee>R&&(R=ee,z=Z.node);const K=Z.relY+Z.height-t.bbox.height;K>T&&(T=K,j=Z.node);const le=Z.relX+Z.width-t.bbox.width;le>k&&(k=le,_=Z.node)}return A>0&&E&&C.push({side:"top",amount:Math.round(A),childId:E.id,childName:E.name}),R>0&&z&&C.push({side:"left",amount:Math.round(R),childId:z.id,childName:z.name}),T>0&&j&&C.push({side:"bottom",amount:Math.round(T),childId:j.id,childName:j.name}),k>0&&_&&C.push({side:"right",amount:Math.round(k),childId:_.id,childName:_.name}),{top:g,right:S,bottom:v,left:x,uniform:w,overflows:C}}function hw(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 Yg(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 S=v.bbox.x+v.bbox.width,w=v.bbox.y+v.bbox.height;if(S<=t.bbox.x+1){const y=Math.round(t.bbox.x-S);y>=0&&(!f||y<f.dist)&&(f={sib:v,dist:y})}if(v.bbox.x>=s-1){const y=Math.round(v.bbox.x-s);y>=0&&(!p||y<p.dist)&&(p={sib:v,dist:y})}if(w<=t.bbox.y+1){const y=Math.round(t.bbox.y-w);y>=0&&(!g||y<g.dist)&&(g={sib:v,dist:y})}if(v.bbox.y>=c-1){const y=Math.round(v.bbox.y-c);y>=0&&(!x||y<x.dist)&&(x={sib:v,dist:y})}}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 mw(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 pw(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 Ig(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 gw(t,a){const l=oi(t,a),o=Math.min(ot(t),ot(a));return o>0?l/o:0}function xw(t){return t.bbox.x+t.bbox.width/2}function iv(t){return t.bbox.y+t.bbox.height/2}function Zd(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 av(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(Zd),a).length===t.length}function zl(t,a){return t.length>=2&&ma(t.map(Rs),a).length===t.length}function vw(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 ov(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 lv=ov();function pt(){return lv}function bw(t){lv=ov(t)}const yw=["button","btn","close","link","tab","switch","toggle","input","checkbox","radio","select"],ww=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 Fd(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 rv(t,a,l){return t.text||t.children.length>0?!1:oi(Je(t),a)/l>=pt().bgCoverage}function sv(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 Sw(t){if(t.meta.isMask)return"decorative";const a=t.name.toLowerCase();return yw.some(l=>a.includes(l))?"interactive":t.text?"text":t.type==="image"?"decorative":t.children.length>0?"container":bs(t)&&Fd(t)?"decorative":"container"}function Nw(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 Cw(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(Fd(t))return{isDecorative:!0,reason:"ghost-layer"};if(s>0&&rv(t,o,s))return{isDecorative:!0,reason:"background-layer"};const d=sv(t,a.bbox.width,a.bbox.height);if(d)return{isDecorative:!0,reason:`${d}-separator`};if(!t.text&&t.children.length===0&&ww.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 Mw=(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,S=(a.text.content||"").length,w=Math.min(v,S)/Math.max(v,S||1),y=w>=.5?0:1-w;return l+=y*.2,o+=.2,o>0?l/o*o:1},jw=(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)},Ew=(t,a,l)=>{const o=t.children.map(_=>l.nodes[_]).filter(_=>!!_),s=a.children.map(_=>l.nodes[_]).filter(_=>!!_);if(o.length===0&&s.length===0){const _=t.bbox.width||1,I=t.bbox.height||1,Z=a.bbox.width||1,te=a.bbox.height||1,ee=Math.min(_,Z)/Math.max(_,Z),K=Math.min(I,te)/Math.max(I,te);return ee<.8||K<.8?1:1-(ee*.5+K*.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=Aw(t,o,a,s);if(v<.5)return 1;const S=o.map(_=>Od(_)),w=s.map(_=>Od(_)),y=new Map,C=new Map;for(const _ of S)y.set(_,(y.get(_)??0)+1);for(const _ of w)C.set(_,(C.get(_)??0)+1);let A=0,E=0;const R=new Set([...y.keys(),...C.keys()]);for(const _ of R){const I=y.get(_)??0,Z=C.get(_)??0;A+=Math.min(I,Z),E+=Math.max(I,Z)}const z=E>0?A/E:0,T=1-(g*.5+x*.5),j=1-v,k=1-z;return j*.5+k*.3+T*.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 Aw(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"),S=Di(l,o,"horizontal"),w=Wr(v,S);return Math.max(x,w)}}function Od(t){return t.text?"text":t.children.length>0?"container":"visual"}const Tw=(t,a)=>{var j,k;const l=((j=t.hints)==null?void 0:j.decorativeReason)||"",o=((k=a.hints)==null?void 0:k.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 S=t.style.borderRadius.some(_=>_>0),w=a.style.borderRadius.some(_=>_>0);if(S!==w)x+=.25;else if(S&&w){const _=Math.max(...t.style.borderRadius),I=Math.max(...a.style.borderRadius),Z=Math.abs(_-I)/Math.max(_,I,1);x+=Z*.25}const y=t.style.strokes.length>0,C=a.style.strokes.length>0;y!==C&&(x+=.2);const A=Gg(t),E=Gg(a);if((A&&!E||!A&&E)&&(x+=.15),A&&E){const _=zw(A,E);x+=_*.05}const R=t.style.opacity??1,z=a.style.opacity??1,T=Math.abs(R-z);return x+=T*.05,Math.min(1,x)};function Gg(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 zw(t,a){const l=Vg(t),o=Vg(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 Vg(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 Xg=()=>1;function Rw(t,a){if(t!==a)return Xg;switch(t){case"text":return Mw;case"image":return jw;case"container":return Ew;case"shape":return Tw;default:return Xg}}const Ow=.35;function cv(t,a,l){const o=mo(t),s=mo(a);return Rw(o,s)(t,a,l)}function kw(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||_w(t,d)?!1:cv(t,d,l)<Ow});if(s.length===0)return;const c=Dw(t,l);return{similarIds:s.map(d=>d.id),signature:c}}function _w(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 Dw(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 $w{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 Lw=.35;function Uw(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 $w(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(qg(p.id,g.id,t)||qg(g.id,p.id,t))continue;cv(p,g,t)<Lw&&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=Bw(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,S)=>v+S.bbox.width,0)/f.length),height:Math.round(f.reduce((v,S)=>v+S.bbox.height,0)/f.length)}})}return c.sort((d,f)=>f.instances.length-d.instances.length)}function qg(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 Bw(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 Hw(t,a){return a.filter(l=>l.instances.some(o=>o.nodeId===t))}function Yw(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?B(a,o[0],o[1]):t}function uv(t,a){return t.text?!0:t.children.some(l=>{const o=a.nodes[l];return o?uv(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 Iw(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 Gw(t,a,l){return B(l,`Layer ${t+1} of ${a}`,`第${t+1}层/共${a}层`)}function dv(t,a,l="en"){var z;const o=t.children.map(T=>a.nodes[T]).filter(T=>!!T&&T.style.visible);if(o.length<2||!o.some(T=>{var j;return((j=T.hints)==null?void 0:j.role)==="decorative"||kd(T,a)})&&o.length<3)return null;const c=[],d=[];let f=0,p=0,g=0;for(let T=0;T<o.length;T++){const j=o[T],k=Iw(j,t),_=Gw(T,o.length,l);if(j.meta.isMask)f++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"likely-decorative",reason:B(l,"Mask clipping layer (its style has been inherited by the parent)","蒙版裁切层(样式已继承至父容器)"),confidence:"high",coverageRatio:k,zPosition:_});else if(j.text)g++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"keep-text",reason:B(l,"Text node","文本节点"),confidence:"high",coverageRatio:k,zPosition:_});else if(uv(j,a)&&j.type!=="frame"&&j.type!=="group")g++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"keep-code",reason:B(l,"Subtree contains text","子树含文本"),confidence:"high",coverageRatio:k,zPosition:_});else if(j.type==="frame"||j.type==="group")kd(j,a)?(p++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"needs-review",reason:B(l,"Container has decorative descendants","容器含装饰后代"),confidence:"low",coverageRatio:k,zPosition:_})):(g++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"keep-code",reason:B(l,"Container contains only content layers","容器仅含内容层"),confidence:"high",coverageRatio:k,zPosition:_}));else if(j.meta.exportReason==="overlay-covered")f++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"likely-decorative",reason:B(l,"Background below an overlay (can be ignored)","浮层下背景层(可忽略)"),confidence:"high",coverageRatio:k,zPosition:_});else if(bs(j)&&j.type!=="vector"&&j.type!=="image")if(((z=j.hints)==null?void 0:z.role)==="decorative"){f++;const I=j.hints.decorativeReason||"decorative-layer";c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"likely-decorative",reason:I==="decorative-layer"?B(l,"Decorative layer","装饰层"):Yw(I,l),confidence:"high",coverageRatio:k,zPosition:_})}else{const I=j.style.fills.some(te=>te.type!=="solid"),Z=j.style.blendMode!=="PASS_THROUGH"&&j.style.blendMode!=="NORMAL";if(I||Z){f++;const te=[];I&&te.push(B(l,"Complex fill","复杂填充")),Z&&te.push(B(l,"Blend mode","混合模式")),j.style.opacity<1&&te.push(B(l,"Opacity variation","透明度变化")),c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"likely-decorative",reason:te.join(", "),confidence:"high",coverageRatio:k,zPosition:_})}else g++,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"keep-code",reason:B(l,"Solid-color shape (implement with CSS)","纯色形状(CSS 可实现)"),confidence:"high",coverageRatio:k,zPosition:_})}else{p++;let I;j.type==="image"?I=B(l,"Image node","图片类型"):j.type==="vector"?I=B(l,"Vector graphic","矢量图形"):j.type==="group"?I=B(l,"Group","分组"):I=j.type,c.push({nodeId:j.id,name:j.name,type:j.type,strategy:"needs-review",reason:I,confidence:"low",coverageRatio:k,zPosition:_})}}const x=f+p;if(x===0)return null;const v=c.filter(T=>T.strategy==="likely-decorative"||T.strategy==="needs-review").reduce((T,j)=>T+j.coverageRatio,0),S=o.length>0?g/o.length:0;S>.7&&v<.5&&d.push(B(l,`${Math.round(S*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(S*100)}%(按数量),合成层面积覆盖仅 ${Math.round(v*100)}%,建议优先用 CSS 还原。`));const w=p>0,y=c.filter(T=>T.strategy==="needs-review").map(T=>T.name),C=w?B(l,`Take a screenshot of ${t.id} to determine whether these nodes are decorative or content: ${y.join(", ")}`,`请截图 ${t.id} 确认以下节点是装饰层还是内容:${y.join("、")}`):"",A=c.filter(T=>T.strategy==="likely-decorative").map(T=>T.name),E=[...A,...y];let R;return f>0&&g>0?(R=B(l,`${A.join(", ")} can be combined into a background image`,`${A.join("、")} 可合成为背景图`),p>0&&(R+=B(l,`; verify ${y.join(", ")} with a screenshot`,`;${y.join("、")} 需截图确认`))):p>0&&g>0?R=B(l,`Use a screenshot to verify whether ${y.join(", ")} can be composited`,`${y.join("、")} 需截图确认是否可合成`):x>0?R=B(l,`${E.join(", ")} may be exported together as one image`,`${E.join("、")} 可能整体导出为图片`):R="",{hasComposite:!0,summary:R,children:c,warnings:d,requiresScreenshot:w,reviewInstruction:C}}function Vw(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 qw(a[0]);const l=[];for(let o=a.length-1;o>=0;o--){const s=Pw(a[o]);s&&l.push(s)}return l.length===0?"":l.length===1?`background:${l[0]}`:`background:${l.join(", ")}`}function qw(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 Pw(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 fv(t,a=2){if(Number.isInteger(t))return t;const l=Math.pow(10,a);return Math.round(t*l)/l}function yt(t){return`${fv(t)}px`}function Qw(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 ${yt(l.width)} ${l.color}`;if(l.widths){const[d,f,p,g]=l.widths;return`border-width:${yt(d)} ${yt(f)} ${yt(p)} ${yt(g)};border-style:${c};border-color:${l.color};box-sizing:border-box`}return`border:${yt(l.width)} ${c} ${l.color};box-sizing:border-box`}function Zw(t){const a=t.style.shadows;if(!a||a.length===0)return"";const l=a.filter(x=>x.type==="drop"),o=a.filter(x=>x.type==="inner"),s=[],c=l.filter(x=>!x.spread),d=l.filter(x=>x.spread),f=t.style.strokes,p=f&&f.length>0&&f[0].position==="outside"&&f[0].width>0?f[0].width:0;if(c.length>0){const x=c.map(v=>`drop-shadow(${yt(v.offsetX)} ${yt(v.offsetY)} ${yt(v.blur)} ${v.color})`);s.push(`filter:${x.join(" ")}`)}const g=[...d.map(x=>`${yt(x.offsetX)} ${yt(x.offsetY)} ${yt(x.blur)} ${yt(x.spread+p)} ${x.color}`),...o.map(x=>`inset ${yt(x.offsetX)} ${yt(x.offsetY)} ${yt(x.blur)} ${yt(x.spread)} ${x.color}`)];return g.length>0&&s.push(`box-shadow:${g.join(", ")}`),s.join(";")}const Fw={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 Ww(t,a,l,o,s){var y,C,A,E;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 R=(()=>{const z=t.parentId?s[t.parentId]:void 0;if(z){const T=z.style.strokes;if(T&&T.length>0)return T[0].position!=="outside"?T[0].width:0}return 0})();R?(x.left=c-R,x.top=d-R):(x.left=c,x.top=d)}if(g){x.width=f;const R=(y=t.text)==null?void 0:y.textAutoResize;(l||R==="truncate"||R==="none")&&(x.height=p),R==="truncate"&&(x.overflow="hidden")}else if(x.width=f,t.type==="line"&&p<1&&t.style.strokes.length>0){const R=t.style.strokes[0],z=(R==null?void 0:R.width)||1;x.height=z,(R==null?void 0:R.position)==="center"&&(x.top=x.top-z/2)}else x.height=p;t.style.opacity!==1&&(x.opacity=fv(t.style.opacity));const v=t.style.blendMode;if(v&&v!=="PASS_THROUGH"&&v!=="NORMAL"){const R=Fw[v];R&&(x.mixBlendMode=R)}if(t.type==="ellipse")x.borderRadius="50%",x.overflow="hidden";else{const R=t.style.borderRadius;R.some(z=>z>0)&&(x.borderRadius=R.map(z=>`${z}px`).join(" "))}t.style.overflow==="hidden"&&(x.overflow="hidden");const S=l&&((C=t.image)==null?void 0:C.effectsCssOnly)===!0,w=!l||S;if(!o){if(t.type!=="text"&&!l){const R=Xw(t);R&&Object.assign(x,fs(R))}if(t.type==="line"&&t.style.strokes.length>0){const R=t.style.strokes[0];R.color&&R.width>0&&(x.backgroundColor=R.color)}else if(w&&t.type!=="text"){const R=Qw(t);R&&Object.assign(x,fs(R))}if(w){const R=Zw(t);if(R){const z=fs(R);z.boxShadow&&x.boxShadow&&(z.boxShadow=`${x.boxShadow}, ${z.boxShadow}`),Object.assign(x,z)}}if(w&&((A=t.style.blurs)==null?void 0:A.length)>0){const R=t.style.blurs.find(j=>j.type==="layer"),z=t.style.blurs.find(j=>j.type==="background"),T=[];if(R&&T.push(`blur(${R.radius}px)`),z&&(x.backdropFilter=`blur(${z.radius}px)`),T.length>0){const j=x.filter?`${x.filter} `:"";x.filter=`${j}${T.join(" ")}`}}}return(E=t.computed)!=null&&E.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 Kw(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 Jw(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=`${yt(d.width)} ${d.color}`)}return s}function fs(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"?B(a,"[image fill]","[图片填充]"):t.type}function eS(t,a,l="en"){const o=t.hints;if(!o)return[];const s=[];return s.push(...tS(o,l)),t.children.length>0&&s.push(...nS(o,t,a,l)),o.constraint&&s.push(...oS(o.constraint,l)),s}function tS(t,a){const l=[];if(t.role==="decorative"){const o=t.decorativeReason?` (${t.decorativeReason})`:"";l.push(`${B(a,"- Decorative layer","- 装饰层")}${o}`)}return t.isGhost&&l.push(B(a,"- Ghost node (no visible style)","- 幽灵节点 (无可见样式)")),t.isBackground&&l.push(B(a,"- Background layer","- 背景层")),t.isSeparator&&l.push(B(a,`- Separator: ${t.isSeparator}`,`- 分隔线: ${t.isSeparator}`)),l}function nS(t,a,l,o){const s=[];if(t.childrenAxis){const{xNonOverlapping:c,yNonOverlapping:d}=t.childrenAxis;c&&d?s.push(B(o,"- Children have no significant overlap","- 子元素无明显重叠")):c?s.push(B(o,"- Children are distributed along the X axis","- 子元素沿 X 轴分布")):d&&s.push(B(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=B(o,c.axis==="x"?"Horizontal":"Vertical",c.axis==="x"?"横向":"纵向");s.push(B(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(B(o,"top-aligned","顶部对齐")),c.bottomAligned&&d.push(B(o,"bottom-aligned","底部对齐")),c.centerYAligned&&d.push(B(o,"vertically centered","垂直居中对齐")),c.leftAligned&&d.push(B(o,"left-aligned","左对齐")),c.rightAligned&&d.push(B(o,"right-aligned","右对齐")),c.centerXAligned&&d.push(B(o,"horizontally centered","水平居中对齐")),d.length>0&&s.push(B(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(B(o,"- Children have similar dimensions","- 子元素尺寸接近")):c?s.push(B(o,"- Children have similar widths","- 子元素宽度接近")):d&&s.push(B(o,"- Children have similar heights","- 子元素高度接近")))}return t.overflow&&s.push(B(o,"- Children have visible overflow","- 子节点存在可见溢出")),t.scrollCandidate&&s.push(B(o,"- Possible horizontal scroll/carousel region","- 疑似横向滚动/轮播区域")),s.push(...iS(t,a,l,o)),s}function iS(t,a,l,o){var g,x;const s=[],c=aS(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(B(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(B(o,"- Children overlap significantly; request overlap context when needed","- 子元素存在明显重叠,可按需调用 overlap-context"));break}for(const v of c)p&&v.nodeIds.every(w=>f.includes(w))?s.push(B(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(B(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 aS(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 oS(t,a){const l=[],o=[];return t.fillsParentWidth&&o.push(B(a,"fills parent width","撑满父容器宽度")),t.fillsParentHeight&&o.push(B(a,"fills parent height","撑满父容器高度")),t.centeredX&&o.push(B(a,"horizontally centered","水平居中")),t.centeredY&&o.push(B(a,"vertically centered","垂直居中")),t.symmetricPaddingX&&o.push(B(a,"symmetric horizontal margins","左右对称边距")),t.symmetricPaddingY&&o.push(B(a,"symmetric vertical margins","上下对称边距")),t.intrinsicSize&&o.push(B(a,"intrinsic content size (smaller than parent)","内容尺寸(较小于父容器)")),o.length>0&&l.push(B(a,`- Constraints: ${o.join(", ")}`,`- 约束: ${o.join(", ")}`)),l}function lS(t,a,l="en"){var c;const o=t.hints;if(!o)return"";const s=[];if(o.role==="decorative"&&s.push(B(l,"[decorative]","[装饰]")),o.similarity&&s.push(B(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(B(l,`[contained-by ${f}]`,`[被 ${f} 包含]`))}if(o.constraint){const d=[];o.constraint.fillsParentWidth&&d.push(B(l,"fills-width","撑满宽")),o.constraint.centeredX&&d.push(B(l,"centered-x","水平居中")),o.constraint.intrinsicSize&&d.push(B(l,"intrinsic-size","固有尺寸")),d.length>0&&s.push(`[${d.join(",")}]`)}return s.join(" ")}function Te(t){return Number.isInteger(t)?t:Math.round(t*10)/10}function Kr(t){return Number.isInteger(t)?t:Math.round(t*100)/100}const rS=["button","btn","close","link","tab","switch","toggle","input","checkbox","radio","select"];function hv(t,a){return t.text?!0:t.children.some(l=>{const o=a.nodes[l];return o?hv(o,a):!1})}function Pg(t,a){if(t.meta.isMask)return"decorative";const l=t.name.toLowerCase();return rS.some(o=>l.includes(o))?"interactive":t.text?"text":t.type==="image"?"decorative":t.children.length>0&&hv(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," ")}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(B(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(B(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(B(a,`${s} y-align`,`垂直对齐: ${d}`))}if(t.textDecoration){const d={underline:"下划线","line-through":"删除线"}[t.textDecoration]??t.textDecoration;l.push(B(a,t.textDecoration,d))}if(t.textAutoResize==="truncate"){const d=(c=t.textLayout)==null?void 0:c.lineClamp;d&&d>1?l.push(B(a,`ellipsis (${d} lines clamp)`,`省略号(最多 ${d} 行)`)):l.push(B(a,"ellipsis","省略号"))}return l.join(" ")}function hs(t,a="en"){return t.fontUrl?B(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 sS(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}`,S=v&&v!==p?` ${hs(x,o)}`:"";t.push(B(o,` - Segment: "${fa(x.content)}" — ${co(x,o)}${S}`,` - 段: "${fa(x.content)}" — ${co(x,o)}${S}`))}}else d&&t.push(` - fill: ${s.fillType}${s.gradient?` (${s.gradient})`:""}`)}function Qg(t,a){return t==="horizontal"?a==="before"?"←":"→":a==="before"?"↑":"↓"}function mv(t,a,l){const o={...l,depth:l.depth??1,locale:l.locale??"en"};return pv(t,a,o,0)}function pv(t,a,l,o){var D,P,ne,re,fe,pe,Ae,et,Se,Dt,Ot,$t,an,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)),S=s(t.id),w=vs(t,S,p),y=t.layout??null,C=Qd(t,a),A=(D=a.nodes[a.rootNodeId])==null?void 0:D.absoluteBbox,E=A?Te(A.width):0,R=Pg(t,a),z=t.name.length>20?t.name.slice(0,20)+"…":t.name,T=[];T.push(`${x} ${t.id} (${z}) - ${t.type} [role:${R}]`);const j=[],k=[],_=[],I=[],Z=S&&!S.renderPadding&&(Math.abs(S.width-t.absoluteBbox.width)>2||Math.abs(S.height-t.absoluteBbox.height)>2),te=Z?S.width:Te(t.absoluteBbox.width),ee=Z?S.height:Te(t.absoluteBbox.height),K=[],le=t.parentId;if(le){const be=(()=>{const ye=a.nodes[le];if(ye){const Ce=ye.style.strokes;if(Ce&&Ce.length>0)return Ce[0].position!=="outside"?Ce[0].width:0}return 0})(),$e=Te(t.bbox.x-be),Ne=Te(t.bbox.y-be);K.push(B(p,`Position: (${$e}, ${Ne})`,`位置: (${$e}, ${Ne})`))}K.push(B(p,`Size: ${te}x${ee}`,`尺寸: ${te}x${ee}`)),o===0&&!t.parentId&&E>0&&K.push(B(p,`Design width: ${E}`,`设计稿宽: ${E}`)),t.parentId&&a.nodes[t.parentId]&&K.push(B(p,`Parent: ${t.parentId}`,`父: ${t.parentId}`)),K.push(`zIndex: ${t.zIndex}`),j.push(`- ${K.join(" | ")}`);const oe=Yg(t,a);if(oe.length>0){const be=oe.map($e=>`${Qg($e.axis,$e.direction)}${$e.siblingId} ${$e.distance}px`);j.push(B(p,`- Nearest siblings: ${be.join(" | ")}`,`- 近邻: ${be.join(" | ")}`))}if(t.meta.componentName&&(j.push(B(p,`- Design-system component: ${t.meta.componentName}`,`- 设计系统组件: ${t.meta.componentName}`)),_.push(B(p,"- This node comes from a design-system component; prefer the corresponding frontend component-library component over a native implementation","- 此节点来自设计系统组件,应优先考虑使用对应的前端组件库组件而非原生实现"))),(P=t.computed)!=null&&P.transform?j.push(B(p,`- Transform: ${t.computed.transform.value} (CSS transform) | bbox is the pre-transform value: (${Te(t.bbox.x)}, ${Te(t.bbox.y)}) ${Te(t.bbox.width)}x${Te(t.bbox.height)}`,`- 变换: ${t.computed.transform.value} (CSS transform) | bbox已为变换前值: (${Te(t.bbox.x)}, ${Te(t.bbox.y)}) ${Te(t.bbox.width)}x${Te(t.bbox.height)}`)):t.meta.rotation&&Te(t.meta.rotation)!==0&&j.push(B(p,`- Rotation: ${Te(t.meta.rotation)}°`,`- 旋转: ${Te(t.meta.rotation)}°`)),t.text){t.text.listMarker&&j.push(B(p,`- List item (marker: ${t.text.listMarker})`,`- 列表项 (marker: ${t.text.listMarker})`)),j.push(B(p,`- Text: "${fa(t.text.content)}"`,`- 文本: "${fa(t.text.content)}"`));const be=Cl(t.text,d),$e=hs(be,p),Ne=t.style.opacity!==1?` opacity: ${Kr(t.style.opacity)}`:"";if(j.push(` ${co(be,p)}${Ne}${$e?` ${$e}`:""}`),t.text.segments&&t.text.segments.length>1){const ye=`${be.fontFamily}::${be.fontWeight}`;for(const Ce of t.text.segments){const he=Cl(Ce,d),de=`${he.fontFamily}::${he.fontWeight}`,ae=de&&de!==ye?` ${hs(he,p)}`:"";j.push(B(p,` - Segment: "${fa(he.content)}" — ${co(he,p)}${ae}`,` - 段: "${fa(he.content)}" — ${co(he,p)}${ae}`))}}(ne=t.text.textLayout)!=null&&ne.hasWrapper&&t.text.textAlignVertical&&j.push(B(p,`- Vertical alignment: ${t.text.textAlignVertical} (requires an outer flex-column wrapper with justify-content: ${(re=t.text.textLayout.wrapperStyle)==null?void 0:re.justifyContent})`,`- 垂直对齐: ${t.text.textAlignVertical} (需要外层 flex column wrapper, justify-content: ${(fe=t.text.textLayout.wrapperStyle)==null?void 0:fe.justifyContent})`))}t.style.overflow==="visible"&&((Ae=(pe=t.hints)==null?void 0:pe.overflow)!=null&&Ae.hasOverflow)&&_.push(B(p,"- This node has visible overflow; use overflow: hidden with care","- 当前节点存在可见溢出,谨慎设置 overflow: hidden")),t.meta.exportReason==="dashed-line"&&_.push(B(p,"- Dashed decorative line; usually merge it with the parent into one background image instead of rendering it separately","- 虚线装饰线条,通常可与父元素合并导出为整体背景图,无需单独渲染"));const ie=t.children.map(be=>a.nodes[be]).find(be=>be==null?void 0:be.meta.isMask);if(ie){const be=ie.style.fills,$e=s(ie.id),Ne=ie.style.borderRadius,ye=Ne.some(he=>he>0),Ce=Math.abs(ie.bbox.width-t.bbox.width)<2&&Math.abs(ie.bbox.height-t.bbox.height)<2&&Math.abs(ie.bbox.x)<2&&Math.abs(ie.bbox.y)<2;k.push(B(p,`- Detected mask child: ${ie.id} (${ie.name})`,`- 检测到蒙版子节点: ${ie.id} (${ie.name})`)),Ce&&ye?(I.push(B(p,`- Inherit the mask on the parent: overflow: hidden + border-radius: ${Ne.map(he=>he+"px").join(" ")}`,`- 蒙版可继承到父容器: overflow: hidden + border-radius: ${Ne.map(he=>he+"px").join(" ")}`)),be.length>0&&I.push(B(p,`- Inherit the background on the parent: ${be.map(he=>Ui(he,p)).join(", ")}`,`- 父容器背景可继承: ${be.map(he=>Ui(he,p)).join(", ")}`))):Ce&&!$e?(I.push(B(p,"- Inherit the mask on the parent: overflow: hidden","- 蒙版可继承到父容器: overflow: hidden")),be.length>0&&I.push(B(p,`- Inherit the background on the parent: ${be.map(he=>Ui(he,p)).join(", ")}`,`- 父容器背景可继承: ${be.map(he=>Ui(he,p)).join(", ")}`))):Ce&&$e?(I.push(B(p,"- Inherit the mask on the parent: overflow: hidden + mask-image","- 蒙版可继承到父容器: overflow: hidden + mask-image")),I.push(B(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 需通过接口获取,勿直接使用预览链接 */")),be.length>0&&I.push(B(p,`- Inherit the background on the parent: ${be.map(he=>Ui(he,p)).join(", ")}`,`- 父容器背景可继承: ${be.map(he=>Ui(he,p)).join(", ")}`))):_.push(B(p,"- The mask does not fully cover the parent","- 蒙版未完全覆盖父容器"))}const L=((et=t.hints)==null?void 0:et.overlaps)??[],q=L.length>0,W=[];if(y&&y.layoutSource==="design-tool"&&(W.push(`display: ${y.display};`),y.display==="flex"&&(y.flexDirection&&y.flexDirection!=="row"&&W.push(`flex-direction: ${y.flexDirection};`),y.flexWrap==="wrap"&&W.push("flex-wrap: wrap;"),y.gap&&y.gap>0&&W.push(`gap: ${y.gap}px;`),y.justifyContent&&y.justifyContent!=="flex-start"&&W.push(`justify-content: ${y.justifyContent};`),y.alignItems&&y.alignItems!=="stretch"&&W.push(`align-items: ${y.alignItems};`)),y.position==="relative"&&W.push("position: relative;")),(w||q||W.length>0)&&(j.push("CSS:"),j.push("```css"),w&&j.push(w),q&&j.push(`z-index: ${t.zIndex};`),W.length>0&&j.push(W.join(`
|
|
52
|
-
`)),j.push("```")),q){const be=L.filter(Ne=>{const ye=a.nodes[Ne.targetId];return ye&&t.zIndex>ye.zIndex}),$e=L.filter(Ne=>{const ye=a.nodes[Ne.targetId];return ye&&t.zIndex<=ye.zIndex});if(be.length>0){const Ne=be.map(ye=>`${ye.targetId}`).join("、");k.push(B(p,`- Partially overlaps ${Ne}; the current node is above`,`- 与 ${Ne} 部分重叠,当前节点在上方`))}if($e.length>0){const Ne=$e.map(ye=>`${ye.targetId}`).join("、");k.push(B(p,`- Partially overlaps ${Ne}; the current node is below`,`- 与 ${Ne} 部分重叠,当前节点在下方`))}}if(S){const be=((Se=t.image)==null?void 0:Se.hasImageFill)===!0,$e=t.meta.exportReason,Ne=t.type==="text"&&$e==="text-rasterized";if(Ne)j.push(B(p,`- Text visual asset: ${te}x${ee} ${S.format} — only restores a non-portable font; the node type and product semantics remain text`,`- 文字视觉资产: ${te}x${ee} ${S.format} — 仅用于还原不可移植字体,节点类型与业务语义仍为 text`)),_.push(B(p,"- Preserve the text-node semantics; this resource is only a visual text layer, not a business image or decorative image","- 保持文字节点语义;该资源只是文字视觉层,不要归类为业务图片或装饰图片"));else if(be)j.push(B(p,`- Image asset: ${te}x${ee} ${S.format} — designer-uploaded (decide: load dynamic data through the application API | export static decoration as a composite)`,`- 图片资源: ${te}x${ee} ${S.format} — 设计师上传(需判断: 动态数据走接口 | 静态装饰需合图导出)`));else{const ye=$e?` (${$e})`:"";j.push(B(p,`- Image asset: ${te}x${ee} ${S.format} — statically composited export${ye}`,`- 图片资源: ${te}x${ee} ${S.format} — 静态合成导出${ye}`))}if((Dt=t.image)!=null&&Dt.effectsCssOnly){t.style.opacity!==1&&"opacity"in t.style&&j.push(B(p,`- Opacity: ${Kr(t.style.opacity)} (restore with CSS; not baked into the image)`,`- 透明度: ${Kr(t.style.opacity)} (需 CSS 复原,未 bake 进图片)`));for(const de of t.style.strokes){const tt=de.strokeDashes&&de.strokeDashes.length>0?" dashed":"";j.push(B(p,`- Stroke: ${Te(de.width)}px ${de.color} (${de.position}${tt}) (restore with CSS; not baked into the image)`,`- 描边: ${Te(de.width)}px ${de.color} (${de.position}${tt}) (需 CSS 复原,未 bake 进图片)`))}for(const de of t.style.shadows){const ae=de.spread?` spread=${Te(de.spread)}`:"",tt=de.type==="inner"?"inset ":"";j.push(B(p,`- Shadow: ${tt}offset=(${Te(de.offsetX)}, ${Te(de.offsetY)}) blur=${Te(de.blur)}${ae} ${de.color} (restore with CSS; not baked into the image)`,`- 阴影: ${tt}offset=(${Te(de.offsetX)}, ${Te(de.offsetY)}) blur=${Te(de.blur)}${ae} ${de.color} (需 CSS 复原,未 bake 进图片)`))}for(const de of t.style.blurs??[]){const ae=de.type==="background"?"backdrop-filter":"filter";j.push(B(p,`- Blur (${ae}): blur(${Te(de.radius)}px) (restore with CSS; not baked into the image)`,`- 模糊(${ae}): blur(${Te(de.radius)}px) (需 CSS 复原,未 bake 进图片)`))}const Ce=t.style.strokes.length>0&&t.style.strokes[0].position==="outside"&&t.style.strokes[0].width>0?t.style.strokes[0].width:0,he=t.style.shadows.some(de=>de.type!=="inner"&&de.spread);Ce>0&&(he?_.push(B(p,`- When both an outside stroke and a drop-shadow (spread>0) use box-shadow, combine them into layers: \`box-shadow: 0 0 0 ${Ce}px <stroke-color>, <shadow...>\`; add ${Ce} (the stroke width) to the drop-shadow spread so it starts at the outer stroke edge`,`- outside 描边和 drop-shadow (spread>0) 都用 box-shadow 表达时,需合并成多层:\`box-shadow: 0 0 0 ${Ce}px <描边色>, <shadow...>\`;且带 spread 的 drop-shadow 的 spread 需补偿 +${Ce}(描边宽度)以贴合描边外沿`)):_.push(B(p,`- Express the outside stroke with box-shadow: \`box-shadow: 0 0 0 ${Ce}px <stroke-color>\`; if a drop-shadow (spread>0) is later added, combine them into multiple layers`,`- outside 描边用 box-shadow 表达:\`box-shadow: 0 0 0 ${Ce}px <描边色>\`;后续若有 drop-shadow(spread>0) 需合并成多层`)))}if(Ne){const ye=S.renderPadding,he=ye&&(ye.top>=1||ye.left>=1)?` style={{position:'absolute',left:${-ye.left},top:${-ye.top}}}`:"";j.push(B(p,` Text visual layer: <img src="{URL}" width={${S.width}} height={${S.height}}${he} alt="" aria-hidden="true" />`,` 文字视觉层: <img src="{URL}" width={${S.width}} height={${S.height}}${he} alt="" aria-hidden="true" />`))}else if(Z)j.push(` <img src="{URL}" width={${te}} height={${ee}} />`);else if($e){const ye=S.renderPadding;ye&&(ye.top>=1||ye.left>=1)?j.push(` <img src="{URL}" width={${S.width}} height={${S.height}} style={{position:'absolute',left:${-ye.left},top:${-ye.top}}} />`):j.push(` <img src="{URL}" width={${te}} height={${ee}} />`)}else j.push(` <img src="{URL}" width={${te}} height={${ee}} />`)}const ge=eS(t,a,p);if(k.push(...ge),C){const{top:be,right:$e,bottom:Ne,left:ye}=C;if(be>0&&$e>0&&Ne>0&&ye>0&&(C.uniform?j.push(`- padding: ${be}px`):j.push(`- padding: ${be}px ${$e}px ${Ne}px ${ye}px`)),C.overflows.length>0&&t.style.overflow!=="hidden"){const he=new Map;for(const de of C.overflows){if(!t.children.includes(de.childId))continue;const ae=he.get(de.childId);ae?ae.sides.push(`${de.side} ${de.amount}px`):he.set(de.childId,{name:de.childName,sides:[`${de.side} ${de.amount}px`]})}if(he.size>0){k.push(B(p,"- Direct children have overflow:","- 直接子节点存在溢出:"));for(const[de,ae]of he){const tt=ae.sides.join(", ");k.push(` - ${de} (${ae.name}): ${tt}`)}}}}const J=dv(t,a,p);if(J){_.push(B(p,"- Composite-layer analysis:","- 复合图层分析:"));for(const Ne of J.children){let ye=`- [${Ne.strategy}] ${Ne.nodeId} (${Ne.name}) [${Ne.type}] — ${Ne.reason}`;if(Ne.strategy==="needs-review"){const Ce=a.nodes[Ne.nodeId];if(Ce){const he=[];Ce.style.fills.length>0&&he.push(B(p,"has fills","有填充色")),Ce.children.length>0&&he.push(B(p,`has ${Ce.children.length} children`,`含 ${Ce.children.length} 个子节点`)),he.length>0&&(ye+=` | ${he.join("; ")}`)}}_.push(` ${ye}`)}const be=J.children.filter(Ne=>Ne.strategy==="likely-decorative").map(Ne=>Ne.nodeId),$e=J.children.filter(Ne=>Ne.strategy==="needs-review");if(be.length>0&&(I.push(B(p,`Composite export: call the MCP tool design_get_composite with ${JSON.stringify({designId:c,nodeId:t.id,include:be})}`,`合并切图: 调用 MCP 工具 design_get_composite,参数 ${JSON.stringify({designId:c,nodeId:t.id,include:be})}`)),I.push(B(p,"- You can also exclude dynamic content with the exclude parameter","- 也可通过 exclude 参数排除动态内容"))),$e.length>0){I.push(B(p,"- Nodes requiring review (decide whether to add them to include after verification):","- 待判断节点(确认后再决定是否加入 include):"));const Ne=t.bbox.width,ye=t.bbox.height;for(const Ce of $e){const he=a.nodes[Ce.nodeId],de=Ce.name.length>20?Ce.name.slice(0,20)+"…":Ce.name;let ae=` - ${Ce.nodeId} (${de})`;const tt=he==null?void 0:he.meta.exportReason;if(tt==="dashed-line"?ae+=B(p," — dashed decoration, usually safe to composite"," — 虚线装饰,通常可合并导出"):tt==="vector"?ae+=B(p," — vector graphic"," — 矢量图形"):tt==="complex-fills"?ae+=B(p," — shape with complex fills"," — 复杂填充图形"):tt==="complex-mask"?ae+=B(p," — complex mask"," — 复杂蒙版"):(Ot=he==null?void 0:he.image)!=null&&Ot.hasImageFill?ae+=B(p," — has an image fill (determine whether it represents dynamic data)"," — 含图片填充(需判断是否动态数据)"):s(Ce.nodeId)&&(ae+=B(p," — has a pre-exported asset"," — 有预导出资源")),he&&t.style.overflow!=="hidden"){const Fe=he.bbox;(Fe.x<-1||Fe.y<-1||Fe.x+Fe.width>Ne+1||Fe.y+Fe.height>ye+1)&&(ae+=B(p," [overflow]"," [溢出]"))}I.push(ae)}}}if(t.children.length>0){const be=t.children.map(de=>a.nodes[de]).filter(de=>!!de),$e=be.some(de=>{var ae;return((ae=de.hints)==null?void 0:ae.role)==="decorative"}),Ne=be.some(de=>{var ae;return((ae=de.hints)==null?void 0:ae.role)!=="decorative"});$e&&Ne&&_.push(B(p,"- mixed-container: contains both decorative and content layers","- mixed-container:同时包含装饰层和内容层"));const ye=(y==null?void 0:y.display)==="flex",Ce=[];for(const de of t.children){const ae=a.nodes[de];if(!ae)continue;const tt=s(de),Fe=(($t=ae.hints)==null?void 0:$t.role)??Pg(ae,a),Sn=((an=ae.layout)==null?void 0:an.position)==="absolute",_l=ae.name.length>20?ae.name.slice(0,20)+"…":ae.name;let kt=`- ${ae.id} (${_l}) ${ae.type} [role:${Fe}]`;if(kt+=` ${Te(ae.bbox.width)}x${Te(ae.bbox.height)}`,kt+=` @(${Te(ae.bbox.x)},${Te(ae.bbox.y)})`,kt+=` zIndex=${ae.zIndex}`,(ft=ae.computed)!=null&&ft.transform?kt+=` ${ae.computed.transform.value}${B(p,"(has-css-transform)","(有 CSS 变换)")}`:ae.meta.rotation&&Te(ae.meta.rotation)!==0&&(kt+=tt?` rot=${Te(ae.meta.rotation)}°${B(p,"(asset-pre-rotated)","(资源已预旋转)")}`:` rot=${Te(ae.meta.rotation)}°${B(p,"(needs-css-transform)","(需要 CSS 变换)")}`),ae.text){const Nn=Cl(ae.text,d),si=hs(Nn,p),Xi=ae.style.opacity!==1?` opacity: ${Kr(ae.style.opacity)}`:"";kt+=` "${fa(Nn.content)}" ${co(Nn,p)}${Xi}${si?` ${si}`:""}`}if(tt){const Nn=ae.meta.exportReason==="text-rasterized"?B(p,"has rasterized text visual asset","有文字栅格视觉资源"):B(p,"has exported asset","有导出资源");kt+=` [${Nn} ${Te(tt.width)}x${Te(tt.height)} ${tt.format}]`}Sn?kt+=" [absolute]":ye&&(kt+=" [flex-item]"),ae.meta.exportReason==="overlay-covered"&&(kt+=B(p," [background below an overlay/dialog (content under the scrim is composited into one image); usually safe to ignore]"," [浮层/弹窗下方背景层(蒙层遮挡下的内容已合成为单图),通常可忽略]"));const Vi=lS(ae,a,p);if(Vi&&(kt+=` ${Vi}`),Ce.push(kt),sS(Ce,ae,d,p),Sn&&Ce.push(` position: absolute; left: ${Te(ae.bbox.x)}px; top: ${Te(ae.bbox.y)}px; width: ${Te(ae.bbox.width)}px; height: ${Te(ae.bbox.height)}px;`),Fe==="decorative"&&!tt&&!ae.text){const Nn=vs(ae,void 0,p);if(Nn){const si=Nn.split(`
|
|
53
|
-
`).filter(Xi=>!Xi.startsWith("width:")&&!Xi.startsWith("height:")&&Xi.trim());si.length>0&&Ce.push(` css: ${si.join(" ")}`)}}}const he=[];for(const de of t.children){const ae=a.nodes[de];if(!ae)continue;const tt=Yg(ae,a);if(tt.length===0)continue;const Fe=tt.map(Sn=>`${Qg(Sn.axis,Sn.direction)}${Sn.siblingId} ${Sn.distance}px`);he.push(`- ${de}: ${Fe.join(" | ")}`)}if(An(T,B(p,`${v} Facts`,`${v} 基本信息`),j),An(T,B(p,`${v} Analysis`,`${v} 分析推断`),k),An(T,B(p,`${v} Implementation hints`,`${v} 实现线索`),_),An(T,B(p,`${v} Recommended actions`,`${v} 操作建议`),I),An(T,B(p,`${v} Children (${t.children.length})`,`${v} 子节点 (${t.children.length})`),Ce),An(T,B(p,`${v} Child spacing`,`${v} 子节点间距`),he),o<f-1){const de=t.children.map(ae=>a.nodes[ae]).filter(ae=>!!ae&&!ae.text&&ae.children.length>0);if(de.length>0){T.push("");for(const ae of de)T.push(pv(ae,a,l,o+1)),T.push("")}}}else An(T,B(p,`${v} Facts`,`${v} 基本信息`),j),An(T,B(p,`${v} Analysis`,`${v} 分析推断`),k),An(T,B(p,`${v} Implementation hints`,`${v} 实现线索`),_),An(T,B(p,`${v} Recommended actions`,`${v} 操作建议`),I);return T.join(`
|
|
54
|
-
`)}function cS(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 uS(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 dS(t){if(t.length<2)return;const a=pt(),l=t.map(w=>w.bbox.width),o=t.map(w=>w.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(w=>s>0?w.bbox.width/s:1),v=t.map(w=>d>0?w.bbox.height/d:1),S=(x.reduce((w,y)=>w+y,0)+v.reduce((w,y)=>w+y,0))/(x.length+v.length);return{widthUniform:p,heightUniform:g,sizeRatio:Math.round(S*100)/100}}function Zg(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 fS(t,a,l="en"){if(t.length<2)return;const o=pt(),s=ma(t.map(Rs),o.snapTol),c=ma(t.map(Zd),o.snapTol),d=[],f=new Set;if(s.length>=2&&s.length<t.length){const w=Rd(t,s,iv,o.snapTol);for(const y of w)if(!(y.length<2)&&xa(y,o.snapTol)){const C=[...y].sort((z,T)=>z.bbox.x-T.bbox.x),A=Zg(C,"x"),E=A.length>0&&A.every(z=>Math.abs(z-A[0])<=2),R=A.length>0?Math.round(A.reduce((z,T)=>z+T,0)/A.length):0;d.push({nodeIds:C.map(z=>z.id),axis:"horizontal",spacing:E?R:void 0,confidence:E?.9:.7,reason:E?B(l,`${C.length} elements arranged horizontally with equal ${R}px spacing`,`${C.length} 个元素横向等距排列 (${R}px)`):B(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 w=Rd(t,c,xw,o.snapTol);for(const y of w)if(!(y.length<2||y.every(A=>f.has(A.id)))&&zl(y,o.snapTol)){const A=[...y].sort((T,j)=>T.bbox.y-j.bbox.y),E=Zg(A,"y"),R=E.length>0&&E.every(T=>Math.abs(T-E[0])<=2),z=E.length>0?Math.round(E.reduce((T,j)=>T+j,0)/E.length):0;d.push({nodeIds:A.map(T=>T.id),axis:"vertical",spacing:R?z:void 0,confidence:R?.9:.7,reason:R?B(l,`${A.length} elements arranged vertically with equal ${z}px spacing`,`${A.length} 个元素纵向等距排列 (${z}px)`):B(l,`${A.length} elements arranged vertically`,`${A.length} 个元素纵向排列`)});for(const T of A)f.add(T.id)}}const p=t.filter(w=>!f.has(w.id));if(p.length>=2){const w=av(p,(y,C)=>{const A=Je(y),E=Je(C),R=oi(A,E),z=Math.min(ot(A),ot(E));return z>0&&R/z>=o.stackingOverlap});for(const y of w)if(!(y.length<2)){d.push({nodeIds:y.map(C=>C.id),axis:"stack",confidence:.8,reason:B(l,`${y.length} overlapping stacked elements`,`${y.length} 个元素重叠堆叠`)});for(const C of y)f.add(C.id)}}if(d.length===1&&d[0].nodeIds.length===t.length||d.length===0)return;const g=t.filter(w=>!f.has(w.id)).map(w=>w.id);let x,v,S;if(d.length>=2){const w=d.map(T=>{const j=T.nodeIds.map(k=>a.nodes[k]).filter(k=>!!k);return vw(j)}),y=w.every((T,j)=>w.every((k,_)=>j===_||T.y+T.h<=k.y+o.snapTol||k.y+k.h<=T.y+o.snapTol)),C=w.every((T,j)=>w.every((k,_)=>j===_||T.x+T.w<=k.x+o.snapTol||k.x+k.w<=T.x+o.snapTol));if(y){x="vertical";const T=[...w].sort((k,_)=>k.y-_.y),j=[];for(let k=1;k<T.length;k++)j.push(Math.round(T[k].y-(T[k-1].y+T[k-1].h)));j.length>0&&(v=Math.round(j.reduce((k,_)=>k+_,0)/j.length))}else if(C){x="horizontal";const T=[...w].sort((k,_)=>k.x-_.x),j=[];for(let k=1;k<T.length;k++)j.push(Math.round(T[k].x-(T[k-1].x+T[k-1].w)));j.length>0&&(v=Math.round(j.reduce((k,_)=>k+_,0)/j.length))}const A=w.map(T=>T.x),E=w.map(T=>T.x+T.w),R=w.map(T=>T.x+T.w/2),z=T=>Math.max(...T)-Math.min(...T);z(A)<=o.alignTol?S=B(l,"left-aligned","左对齐"):z(E)<=o.alignTol?S=B(l,"right-aligned","右对齐"):z(R)<=o.alignTol&&(S=B(l,"horizontally centered","水平居中"))}return{groups:d,ungrouped:g,interGroupAxis:x,interGroupSpacing:v,interGroupAlignment:S}}function hS(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 mS(t){if(t.length<2)return;const a=pt(),o=av(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 pS(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(A=>a.nodes[A]).filter(A=>!!A);if(p.length<2)continue;const g=[...p].sort((A,E)=>ot(Je(E))-ot(Je(A))),x=g[0],v=g.slice(1),S=ot(Je(x)),w=S>0&&v.every(A=>oi(Je(A),Je(x))/ot(Je(A))>.8);if(w&&(((s=x.hints)==null?void 0:s.role)==="decorative"||bs(x)))return{type:"decorative-overlay",groups:o,reason:B(l,`${x.name} is the bottom layer, with ${v.length} other elements overlaid on it`,`${x.name} 为底层,其余 ${v.length} 个元素叠加其上`)};if(!w&&(((c=x.hints)==null?void 0:c.role)==="decorative"||bs(x))&&v.every(E=>oi(Je(E),Je(x))/ot(Je(E))>.5))return{type:"decorative-overlay",groups:o,reason:B(l,`${x.name} is the bottom layer, with ${v.length} other elements overlaid on it`,`${x.name} 为底层,其余 ${v.length} 个元素叠加其上`)};if(p.length>=2){const A=ot(Je(v[0]))/S,E=gw(Je(v[0]),Je(x));if(A>=.15&&A<=.85&&E>=.7&&((d=x.hints)==null?void 0:d.role)!=="decorative")return{type:"contained-overlay",groups:o,reason:B(l,`${v[0].name} is overlaid inside ${x.name} (area ratio ${Math.round(A*100)}%, containment ${Math.round(E*100)}%)`,`${v[0].name} 叠加在 ${x.name} 内部 (面积比 ${Math.round(A*100)}%, 包含率 ${Math.round(E*100)}%)`)}}const C=p.map(A=>hS(A,a)).filter(A=>!!A);if(C.length===p.length&&C.length>=2&&new Set(C).size===1&&f.overlapRatio>.7)return{type:"overlapping-similar",groups:o,reason:B(l,`${p.length} structurally identical elements overlap completely, possibly representing multiple states or a special overlay effect`,`${p.length} 个结构相同的元素完全重叠,可能为多状态切换或特殊叠加效果`)};if(p.length===2){const[A,E]=g;if(ot(Je(E))/ot(Je(A))<.2)return{type:"floating",groups:o,reason:B(l,`${E.name} floats above ${A.name}`,`${E.name} 浮动在 ${A.name} 上方`)}}}return{type:"unknown",groups:o,reason:B(l,`${t.length} stacking groups with an undetermined type`,`${t.length} 个堆叠组,无法确定类型`)}}function gS(t,a,l){var w;const o=t.absoluteBbox;let s=!1,c=!1;for(const y of a){const C=y.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=(w=l.nodes[l.rootNodeId])==null?void 0:w.absoluteBbox,f=(d==null?void 0:d.x)??0,p=f+((d==null?void 0:d.width)??o.width),g=[];for(const y of a){const C=y.absoluteBbox.x,A=C+y.absoluteBbox.width,E=Math.max(C,f),R=Math.min(A,p),z=Math.max(0,R-E);if(z<=0)continue;const T=y.absoluteBbox.width>0?z/y.absoluteBbox.width:1;g.push({nodeId:y.id,name:y.name,visibility:T>.95?"full":"partial",visiblePx:Math.round(z)})}const x=s&&c?"both":s?"x":"y",v=Math.round(x==="y"?o.height:o.width),S=Math.round((d==null?void 0:d.width)??o.width);return{hasOverflow:!0,direction:x,containerSize:v,viewportSize:S,visibleChildren:g}}function xS(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 vS(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,S=o.height-(s.y+s.height),w=Math.max(3,o.width*.02);if(Math.abs(g-x)<=w&&f<.95&&(c.centeredX=!0,d=!0),Math.abs(v-S)<=w&&p<.95&&(c.centeredY=!0,d=!0),Math.abs(g-x)<=w&&g>0&&(c.symmetricPaddingX=!0,d=!0),Math.abs(v-S)<=w&&v>0&&(c.symmetricPaddingY=!0,d=!0),t.children.length>0){const y=t.children.map(C=>l.nodes[C]).filter(C=>!!C&&C.style.visible);if(y.length>0){const C=Math.min(...y.map(_=>_.bbox.x)),A=Math.min(...y.map(_=>_.bbox.y)),E=Math.max(...y.map(_=>_.bbox.x+_.bbox.width)),R=Math.max(...y.map(_=>_.bbox.y+_.bbox.height)),z=Math.max(0,Math.round(A)),T=Math.max(0,Math.round(C)),j=Math.max(0,Math.round(s.width-E)),k=Math.max(0,Math.round(s.height-R));(z>0||T>0||j>0||k>0)&&(c.paddingEstimate={top:z,right:j,bottom:k,left:T},d=!0)}}return f<.5&&p<.5&&(c.intrinsicSize=!0,d=!0),d?c:void 0}function gv(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 bS(t,a,l,o="en"){if(t.length<2)return;const s=Fg(t,a,l,o);if(s)return s;const c=yS(t);if(c&&c.length>=2&&c.length<t.length){const d=Fg(c,a,l,o);if(d)return d.reason+=B(o,` (${c.length} of ${t.length} content children)`,`(共 ${t.length} 个内容子元素中的 ${c.length} 个)`),d}}function yS(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 Fg(t,a,l,o){const s=wS(t,o);if(s)return s;const c=SS(t,l,o);if(c)return c;const d=NS(t,a,l,o);if(d)return d;const f=CS(t,a,o);if(f)return f}function wS(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,iv,l.snapTol).filter(C=>C.length>0);if(v.length<2)return;const S=v.map(C=>C.length),w=Math.max(...S),y=Math.min(...S);if(!(w-y>1))return{type:"grid",nodeIds:t.map(C=>C.id),columns:w,rows:v.length,confidence:.85,reason:B(a,`${v.length}-row × ${w}-column grid with similarly sized elements`,`${v.length} 行 × ${w} 列网格,元素尺寸相近`)}}function SS(t,a,l){if(t.length<3)return;const o=pt();if(!zl(t,o.snapTol))return;const s=t.map(x=>gv(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:B(l,`${t.length} structurally similar elements arranged vertically`,`${t.length} 个结构相似元素纵向排列`)}}function NS(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(S=>gv(S,l)),d=new Map;for(const S of c)S&&d.set(S,(d.get(S)??0)+1);const f=[...d.entries()].sort((S,w)=>w[1]-S[1])[0];if(!f||f[1]<t.length*.6)return;const p=t.map(S=>S.bbox.height);if(!(!(Math.min(...p)/Math.max(...p)>=.8)||p.reduce((S,w)=>S+w,0)/p.length>a.bbox.height*.3||!t.some(S=>va(S,l))))return{type:"tab-bar",nodeIds:t.map(S=>S.id),confidence:.75,reason:B(o,`${t.length} short, similar elements with text arranged horizontally`,`${t.length} 个相似元素横向排列,含文本,高度较矮`)}}function CS(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:B(l,`${t.length} similar elements overflow horizontally, suggesting a carousel or horizontal scroller`,`${t.length} 个相似元素横向溢出排列,疑似轮播/横滑`)}}const MS=new Set(["rectangle","ellipse","line","vector"]);function jS(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=ES(o,t,a,l);if(s)return s;const c=AS(o,a,l);if(c)return c;const d=TS(o,a,l);if(d)return d;const f=zS(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:B(l,"Container with a visual boundary that contains both an image and text","有视觉边界的容器,包含图片和文本")}}}function ES(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:B(o,"Circular or square image with text, likely an avatar-and-name group","圆形/方形图片 + 文本,疑似头像+名称组合")}}function AS(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"||MS.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:B(l,"Small icon with text","小图标 + 文本组合")}}function TS(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:B(l,"Two horizontally aligned text elements, likely a label-value pair","两个文本元素横向对齐,疑似标签-值对")}}function zS(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:B(o,"Large image with text below, likely a thumbnail-title group","大图 + 下方文本,疑似缩略图-标题组合")}}function RS(t){const a=pt(),l=ma(t.map(Rs),a.snapTol),o=ma(t.map(Zd),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 OS(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":RS(t)}}function xv(t,a,l){const o=a.nodes[t];if(o)for(const s of o.children)l.add(s),xv(s,a,l)}function kS(t,a,l){let o=a.nodes[t];for(;o!=null&&o.parentId;)l.add(o.parentId),o=a.nodes[o.parentId]}function _S(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)),S=x*v;if(S<=0)return 0;const w=Math.min(t.absoluteBbox.width*t.absoluteBbox.height,a.absoluteBbox.width*a.absoluteBbox.height);return w>0?S/w:0}function DS(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;kS(c.id,t,d);const f=new Set;xv(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=_S(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 $S(t,a){const l=[],o=Ig(t),s=ot(o);if(!(s<=0)){for(const c of a){if(c.id===t.id)continue;const d=Ig(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 LS(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 US(t,a,l){const o=Sw(t),s={role:o};o==="container"&&t.children.length>0&&(s.containerType=Nw(t));const c=a.nodes[t.parentId??""];if(c){const y=c.children.map(z=>a.nodes[z]).filter(z=>!!z&&z.style.visible),C=Cw(t,c,y);C.isDecorative&&(s.role="decorative",s.decorativeReason=C.reason);const A=sv(t,c.bbox.width,c.bbox.height);A&&(s.isSeparator=A),Fd(t)&&(s.isGhost=!0);const E={x:0,y:0,w:c.bbox.width,h:c.bbox.height},R=ot(E);R>0&&rv(t,E,R)&&(s.isBackground=!0),s.overlaps=$S(t,y),s.containedBy=LS(t,y),s.similarity=kw(t,y,a)}const d=t.children.map(y=>a.nodes[y]).filter(y=>!!y&&y.style.visible);if(d.length<2)return s;const f=d.filter(y=>{const C=y.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 y=cS(f);y.length>0&&(s.childrenSpacing=y),s.childrenAlignment=uS(f),s.childrenSizeUniformity=dS(f);const C=fS(f,a,l);C&&(s.grouping=C);const A=OS(f);A&&(s.contentFlow=A);const E=bS(f,t,a,l);E&&(s.layoutPattern=E)}const p=a.nodes[t.parentId??""],g=vS(t,p,a);g&&(s.constraint=g);const x=gS(t,d,a);x&&(s.overflow=x),xS(t,a)&&(s.scrollCandidate=!0);const v=d.filter(y=>{const C=y.hints;return!(C!=null&&C.isBackground)&&(C==null?void 0:C.decorativeReason)!=="mask-layer"}),S=mS(v);if(S){s.stacking=S;const y=pS(S.groups,a,l);y&&(s.stackingDetail=y)}const w=jS(t,a,l);return w&&(s.semantic=w),s}function BS(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=US(c,t,a)}}o(t.rootNodeId),DS(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;bw(l);for(const c of t.modules)BS(c,a)}function HS(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 YS(t,a,l){if(!t.text&&!t.type&&t.hasAsset===void 0&&!t.parentId&&!t.exactId)return[];const o=[],s=IS(t.moduleId,a);for(const c of s){const d=Object.values(c.nodes);for(const f of d)GS(f,t,l)&&o.push({node:f,moduleId:c.moduleId,moduleName:c.name})}return o}function IS(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 GS(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 Wg=t=>{let a;const l=new Set,o=(g,x)=>{const v=typeof g=="function"?g(a):g;if(!Object.is(v,a)){const S=a;a=x??(typeof v!="object"||v===null)?v:Object.assign({},a,v),l.forEach(w=>w(a,S))}},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},VS=(t=>t?Wg(t):Wg),XS=t=>t;function qS(t,a=XS){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 Kg=t=>{const a=VS(t),l=o=>qS(a,o);return Object.assign(l,a),l},PS=(t=>t?Kg(t):Kg);function vv(t){const a=t.match(/^\/design\/([^/?#]+)\/?$/);if(!a)return null;try{return decodeURIComponent(a[1])}catch{return null}}function Jr(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 Jg(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=ex(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]?ex(d[1]):void 0,pointX:g,pointY:x,mode:o}}return{view:"overview",mode:o}}function ex(t){try{return decodeURIComponent(t)}catch{return t}}function tx(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:S}=p.absoluteBbox;if(s>=g&&s<=g+v&&c>=x&&c<=x+S){const w=v*S;w<f&&(f=w,d=p)}}return d==null?void 0:d.id}const Ze=PS((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}=Jg(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?tx(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=Jr(l,o,s,c)},selectModule:l=>{const{displayMode:o}=a();t({currentView:"module",currentModuleId:l,selectedNodeId:null,searchQuery:""}),window.location.hash=Jr("module",l,void 0,o)},selectNode:l=>{const{currentModuleId:o,displayMode:s}=a();t({selectedNodeId:l}),o&&(window.location.hash=Jr("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=Jr(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}=Jg(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?tx(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 bv(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=bv(t[a]))&&(o&&(o+=" "),o+=l)}else for(l in t)t[l]&&(o&&(o+=" "),o+=l);return o}function yv(){for(var t,a,l=0,o="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=bv(t))&&(o&&(o+=" "),o+=a);return o}const nx=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ix=yv,wv=(t,a)=>l=>{var o;if((a==null?void 0:a.variants)==null)return ix(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 S=nx(x)||nx(v);return s[g][S]}),f=l&&Object.entries(l).reduce((g,x)=>{let[v,S]=x;return S===void 0||(g[v]=S),g},{}),p=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((g,x)=>{let{class:v,className:S,...w}=x;return Object.entries(w).every(y=>{let[C,A]=y;return Array.isArray(A)?A.includes({...c,...f}[C]):{...c,...f}[C]===A})?[...g,v,S]:g},[]);return ix(t,d,p,l==null?void 0:l.class,l==null?void 0:l.className)};function ax(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function QS(...t){return a=>{let l=!1;const o=t.map(s=>{const c=ax(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():ax(t[s],null)}}}}function Tt(...t){return N.useCallback(QS(...t),t)}function Wd(t){const a=N.forwardRef((l,o)=>{let{children:s,...c}=l,d=null,f=!1;const p=[];ox(s)&&typeof es=="function"&&(s=es(s._payload)),N.Children.forEach(s,S=>{var w;if(JS(S)){f=!0;const y=S;let C="child"in y.props?y.props.child:y.props.children;ox(C)&&typeof es=="function"&&(C=es(C._payload)),d=FS(y,C),p.push((w=d==null?void 0:d.props)==null?void 0:w.children)}else p.push(S)}),d?d=N.cloneElement(d,void 0,p):!f&&N.Children.count(s)===1&&N.isValidElement(s)&&(d=s);const g=d?KS(d):void 0,x=Tt(o,g);if(!d){if(s||s===0)throw new Error(f?i2(t):n2(t));return s}const v=WS(c,d.props??{});return d.type!==N.Fragment&&(v.ref=o?x:g),N.cloneElement(d,v)});return a.displayName=`${t}.Slot`,a}var Sv=Wd("Slot"),Nv=Symbol.for("radix.slottable");function ZS(t){const a=l=>"child"in l?l.children(l.child):l.children;return a.displayName=`${t}.Slottable`,a.__radixId=Nv,a}var FS=(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 WS(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 KS(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 JS(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Nv}var e2=Symbol.for("react.lazy");function ox(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===e2&&"_payload"in t&&t2(t._payload)}function t2(t){return typeof t=="object"&&t!==null&&"then"in t}var n2=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,i2=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,es=Pd[" use ".trim().toString()];const a2=(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},o2=(t,a)=>({classGroupId:t,validator:a}),Cv=(t=new Map,a=null,l)=>({nextPart:t,validators:a,classGroupId:l}),ys="-",lx=[],l2="arbitrary..",r2=t=>{const a=c2(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return s2(d);const f=d.split(ys),p=f[0]===""&&f.length>1?1:0;return Mv(f,p,a)},getConflictingClassGroupIds:(d,f)=>{if(f){const p=o[d],g=l[d];return p?g?a2(g,p):p:g||lx}return l[d]||lx}}},Mv=(t,a,l)=>{if(t.length-a===0)return l.classGroupId;const s=t[a],c=l.nextPart.get(s);if(c){const g=Mv(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}},s2=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?l2+o:void 0})(),c2=t=>{const{theme:a,classGroups:l}=t;return u2(l,a)},u2=(t,a)=>{const l=Cv();for(const o in t){const s=t[o];Kd(s,l,o,a)}return l},Kd=(t,a,l,o)=>{const s=t.length;for(let c=0;c<s;c++){const d=t[c];d2(d,a,l,o)}},d2=(t,a,l,o)=>{if(typeof t=="string"){f2(t,a,l);return}if(typeof t=="function"){h2(t,a,l,o);return}m2(t,a,l,o)},f2=(t,a,l)=>{const o=t===""?a:jv(a,t);o.classGroupId=l},h2=(t,a,l,o)=>{if(p2(t)){Kd(t(o),a,l,o);return}a.validators===null&&(a.validators=[]),a.validators.push(o2(l,t))},m2=(t,a,l,o)=>{const s=Object.entries(t),c=s.length;for(let d=0;d<c;d++){const[f,p]=s[d];Kd(p,jv(a,f),l,o)}},jv=(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=Cv(),l.nextPart.set(d,f)),l=f}return l},p2=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,g2=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="!",rx=":",x2=[],sx=(t,a,l,o,s)=>({modifiers:t,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:o,isExternal:s}),v2=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 A=s[C];if(d===0&&f===0){if(A===rx){c.push(s.slice(p,C)),p=C+1;continue}if(A==="/"){g=C;continue}}A==="["?d++:A==="]"?d--:A==="("?f++:A===")"&&f--}const v=c.length===0?s:s.slice(p);let S=v,w=!1;v.endsWith(Dd)?(S=v.slice(0,-1),w=!0):v.startsWith(Dd)&&(S=v.slice(1),w=!0);const y=g&&g>p?g-p:void 0;return sx(c,w,S,y)};if(a){const s=a+rx,c=o;o=d=>d.startsWith(s)?c(d.slice(s.length)):sx(x2,!1,d,void 0,!0)}if(l){const s=o;o=c=>l({className:c,parseClassName:s})}return o},b2=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}},y2=t=>({cache:g2(t.cacheSize),parseClassName:v2(t),sortModifiers:b2(t),postfixLookupClassGroupIds:w2(t),...r2(t)}),w2=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},S2=/\s+/,N2=(t,a)=>{const{parseClassName:l,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c,postfixLookupClassGroupIds:d}=a,f=[],p=t.trim().split(S2);let g="";for(let x=p.length-1;x>=0;x-=1){const v=p[x],{isExternal:S,modifiers:w,hasImportantModifier:y,baseClassName:C,maybePostfixModifierPosition:A}=l(v);if(S){g=v+(g.length>0?" "+g:g);continue}let E=!!A,R;if(E){const _=C.substring(0,A);R=o(_);const I=R&&d[R]?o(C):void 0;I&&I!==R&&(R=I,E=!1)}else R=o(C);if(!R){if(!E){g=v+(g.length>0?" "+g:g);continue}if(R=o(C),!R){g=v+(g.length>0?" "+g:g);continue}E=!1}const z=w.length===0?"":w.length===1?w[0]:c(w).join(":"),T=y?z+Dd:z,j=T+R;if(f.indexOf(j)>-1)continue;f.push(j);const k=s(R,E);for(let _=0;_<k.length;++_){const I=k[_];f.push(T+I)}g=v+(g.length>0?" "+g:g)}return g},C2=(...t)=>{let a=0,l,o,s="";for(;a<t.length;)(l=t[a++])&&(o=Ev(l))&&(s&&(s+=" "),s+=o);return s},Ev=t=>{if(typeof t=="string")return t;let a,l="";for(let o=0;o<t.length;o++)t[o]&&(a=Ev(t[o]))&&(l&&(l+=" "),l+=a);return l},M2=(t,...a)=>{let l,o,s,c;const d=p=>{const g=a.reduce((x,v)=>v(x),t());return l=y2(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=N2(p,l);return s(p,x),x};return c=d,(...p)=>c(C2(...p))},j2=[],mt=t=>{const a=l=>l[t]||j2;return a.isThemeGetter=!0,a},Av=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Tv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,E2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,A2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T2=/\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$/,z2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,R2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$i=t=>E2.test(t),ze=t=>!!t&&!Number.isNaN(Number(t)),Tn=t=>!!t&&Number.isInteger(Number(t)),pd=t=>t.endsWith("%")&&ze(t.slice(0,-1)),ni=t=>A2.test(t),zv=()=>!0,k2=t=>T2.test(t)&&!z2.test(t),Jd=()=>!1,_2=t=>R2.test(t),D2=t=>O2.test(t),$2=t=>!se(t)&&!ce(t),L2=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)),U2=t=>Yi(t,kv,Jd),se=t=>Av.test(t),ua=t=>Yi(t,_v,k2),cx=t=>Yi(t,q2,ze),B2=t=>Yi(t,$v,zv),H2=t=>Yi(t,Dv,Jd),ux=t=>Yi(t,Rv,Jd),Y2=t=>Yi(t,Ov,D2),ts=t=>Yi(t,Lv,_2),ce=t=>Tv.test(t),gl=t=>ba(t,_v),I2=t=>ba(t,Dv),dx=t=>ba(t,Rv),G2=t=>ba(t,kv),V2=t=>ba(t,Ov),ns=t=>ba(t,Lv,!0),X2=t=>ba(t,$v,!0),Yi=(t,a,l)=>{const o=Av.exec(t);return o?o[1]?a(o[1]):l(o[2]):!1},ba=(t,a,l=!1)=>{const o=Tv.exec(t);return o?o[1]?a(o[1]):l:!1},Rv=t=>t==="position"||t==="percentage",Ov=t=>t==="image"||t==="url",kv=t=>t==="length"||t==="size"||t==="bg-size",_v=t=>t==="length",q2=t=>t==="number",Dv=t=>t==="family-name",$v=t=>t==="number"||t==="weight",Lv=t=>t==="shadow",P2=()=>{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"),S=mt("text-shadow"),w=mt("drop-shadow"),y=mt("blur"),C=mt("perspective"),A=mt("aspect"),E=mt("ease"),R=mt("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...T(),ce,se],k=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],I=()=>[ce,se,p],Z=()=>[$i,"full","auto",...I()],te=()=>[Tn,"none","subgrid",ce,se],ee=()=>["auto",{span:["full",Tn,ce,se]},Tn,ce,se],K=()=>[Tn,"auto",ce,se],le=()=>["auto","min","max","fr",ce,se],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...I()],q=()=>[$i,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],W=()=>[$i,"screen","full","dvw","lvw","svw","min","max","fit",...I()],ge=()=>[$i,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],J=()=>[t,ce,se],D=()=>[...T(),dx,ux,{position:[ce,se]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",G2,U2,{size:[ce,se]}],re=()=>[pd,gl,ua],fe=()=>["","none","full",g,ce,se],pe=()=>["",ze,gl,ua],Ae=()=>["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"],Se=()=>[ze,pd,dx,ux],Dt=()=>["","none",y,ce,se],Ot=()=>["none",ze,ce,se],$t=()=>["none",ze,ce,se],an=()=>[ze,ce,se],ft=()=>[$i,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ni],breakpoint:[ni],color:[zv],container:[ni],"drop-shadow":[ni],ease:["in","out","in-out"],font:[$2],"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",ze],text:[ni],"text-shadow":[ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$i,se,ce,A]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,se]}],"container-named":[L2],columns:[{columns:[ze,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:j()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Tn,"auto",ce,se]}],basis:[{basis:[$i,"full","auto",f,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,$i,"auto","initial","none",se]}],grow:[{grow:["",ze,ce,se]}],shrink:[{shrink:["",ze,ce,se]}],order:[{order:[Tn,"first","last","none",ce,se]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],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,X2,B2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pd,se]}],"font-family":[{font:[I2,H2,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":[ze,"none",ce,cx]}],leading:[{leading:[c,...I()]}],"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:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",ce,ua]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[ze,"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:I()}],"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:D()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tn,ce,se],radial:["",ce,se],conic:[Tn,ce,se]},V2,Y2]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],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:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-bs":[{"border-bs":J()}],"border-color-be":[{"border-be":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,ce,se]}],"outline-w":[{outline:["",ze,gl,ua]}],"outline-color":[{outline:J()}],shadow:[{shadow:["","none",x,ns,ts]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",v,ns,ts]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[ze,ua]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":J()}],"text-shadow":[{"text-shadow":["none",S,ns,ts]}],"text-shadow-color":[{"text-shadow":J()}],opacity:[{opacity:[ze,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":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":J()}],"mask-image-linear-to-color":[{"mask-linear-to":J()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":J()}],"mask-image-t-to-color":[{"mask-t-to":J()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":J()}],"mask-image-r-to-color":[{"mask-r-to":J()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":J()}],"mask-image-b-to-color":[{"mask-b-to":J()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":J()}],"mask-image-l-to-color":[{"mask-l-to":J()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":J()}],"mask-image-x-to-color":[{"mask-x-to":J()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":J()}],"mask-image-y-to-color":[{"mask-y-to":J()}],"mask-image-radial":[{"mask-radial":[ce,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":J()}],"mask-image-radial-to-color":[{"mask-radial-to":J()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":J()}],"mask-image-conic-to-color":[{"mask-conic-to":J()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,se]}],filter:[{filter:["","none",ce,se]}],blur:[{blur:Dt()}],brightness:[{brightness:[ze,ce,se]}],contrast:[{contrast:[ze,ce,se]}],"drop-shadow":[{"drop-shadow":["","none",w,ns,ts]}],"drop-shadow-color":[{"drop-shadow":J()}],grayscale:[{grayscale:["",ze,ce,se]}],"hue-rotate":[{"hue-rotate":[ze,ce,se]}],invert:[{invert:["",ze,ce,se]}],saturate:[{saturate:[ze,ce,se]}],sepia:[{sepia:["",ze,ce,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,se]}],"backdrop-blur":[{"backdrop-blur":Dt()}],"backdrop-brightness":[{"backdrop-brightness":[ze,ce,se]}],"backdrop-contrast":[{"backdrop-contrast":[ze,ce,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,ce,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,ce,se]}],"backdrop-invert":[{"backdrop-invert":["",ze,ce,se]}],"backdrop-opacity":[{"backdrop-opacity":[ze,ce,se]}],"backdrop-saturate":[{"backdrop-saturate":[ze,ce,se]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,ce,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"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:[ze,"initial",ce,se]}],ease:[{ease:["linear","initial",E,ce,se]}],delay:[{delay:[ze,ce,se]}],animate:[{animate:["none",R,ce,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ce,se]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:Ot()}],"rotate-x":[{"rotate-x":Ot()}],"rotate-y":[{"rotate-y":Ot()}],"rotate-z":[{"rotate-z":Ot()}],scale:[{scale:$t()}],"scale-x":[{"scale-x":$t()}],"scale-y":[{"scale-y":$t()}],"scale-z":[{"scale-z":$t()}],"scale-3d":["scale-3d"],skew:[{skew:an()}],"skew-x":[{"skew-x":an()}],"skew-y":[{"skew-y":an()}],transform:[{transform:[ce,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"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:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",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":J()}],"scrollbar-track-color":[{"scrollbar-track":J()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",...J()]}],"stroke-w":[{stroke:[ze,gl,ua,cx]}],stroke:[{stroke:["none",...J()]}],"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"]}},Q2=M2(P2);function Rt(...t){return Q2(yv(t))}const Z2=wv("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 Ue({className:t,variant:a="default",asChild:l=!1,...o}){const s=l?Sv:"span";return m.jsx(s,{"data-slot":"badge","data-variant":a,className:Rt(Z2({variant:a}),t),...o})}function Ie(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 E;const{scope:S,children:w,...y}=v,C=((E=S==null?void 0:S[t])==null?void 0:E[p])||f,A=N.useMemo(()=>y,Object.values(y));return m.jsx(C.Provider,{value:A,children:w})};g.displayName=c+"Provider";function x(v,S,w={}){var E;const{optional:y=!1}=w,C=((E=S==null?void 0:S[t])==null?void 0:E[p])||f,A=N.useContext(C);if(A)return A;if(d!==void 0)return d;if(!y)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,F2(s,...a)]}function F2(...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:()=>{},W2=Pd[" useInsertionEffect ".trim().toString()]||kn;function ef({prop:t,defaultProp:a,onChange:l=()=>{},caller:o}){const[s,c,d]=K2({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 S=J2(x)?x(t):x;S!==t&&((v=d.current)==null||v.call(d,S))}else c(x)},[f,t,c,d]);return[p,g]}function K2({defaultProp:t,onChange:a}){const[l,o]=N.useState(t),s=N.useRef(l),c=N.useRef(a);return W2(()=>{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 J2(t){return typeof t=="function"}const eN=["top","right","bottom","left"],Bi=Math.min,ii=Math.max,ws=Math.round,is=Math.floor,ai=t=>({x:t,y:t}),tN={left:"right",right:"left",bottom:"top",top:"bottom"};function Uv(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 tf(t){return t==="x"?"y":"x"}function nf(t){return t==="y"?"height":"width"}function On(t){const a=t[0];return a==="t"||a==="b"?"y":"x"}function af(t){return tf(On(t))}function nN(t,a,l){l===void 0&&(l=!1);const o=vo(t),s=af(t),c=nf(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 iN(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 fx=["left","right"],hx=["right","left"],aN=["top","bottom"],oN=["bottom","top"];function lN(t,a,l){switch(t){case"top":case"bottom":return l?a?hx:fx:a?fx:hx;case"left":case"right":return a?aN:oN;default:return[]}}function rN(t,a,l,o){const s=vo(t);let c=lN(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 tN[a]+t.slice(a.length)}function sN(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 Bv(t){return typeof t!="number"?sN(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 mx(t,a,l){let{reference:o,floating:s}=t;const c=On(a),d=af(a),f=nf(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,S=o[f]/2-s[f]/2;let w;switch(p){case"top":w={x,y:o.y-s.height};break;case"bottom":w={x,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:v};break;case"left":w={x:o.x-s.width,y:v};break;default:w={x:o.x,y:o.y}}const y=vo(a);return y&&(w[d]+=S*(y==="end"?1:-1)*(l&&g?-1:1)),w}async function cN(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:S=!1,padding:w=0}=li(a,t),y=Bv(w),A=f[S?v==="floating"?"reference":"floating":v],E=Ns(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(A)))==null||l?A:A.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:g,rootBoundary:x,strategy:p})),R=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)),T=await(c.isElement==null?void 0:c.isElement(z))&&await(c.getScale==null?void 0:c.getScale(z))||{x:1,y:1},j=Ns(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:R,offsetParent:z,strategy:p}):R);return{top:(E.top-j.top+y.top)/T.y,bottom:(j.bottom-E.bottom+y.bottom)/T.y,left:(E.left-j.left+y.left)/T.x,right:(j.right-E.right+y.right)/T.x}}const uN=50,dN=async(t,a,l)=>{const{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:d}=l,f=d.detectOverflow?d:{...d,detectOverflow:cN},p=await(d.isRTL==null?void 0:d.isRTL(a));let g=await d.getElementRects({reference:t,floating:a,strategy:s}),{x,y:v}=mx(g,o,p),S=o,w=0;const y={};for(let C=0;C<c.length;C++){const A=c[C];if(!A)continue;const{name:E,fn:R}=A,{x:z,y:T,data:j,reset:k}=await R({x,y:v,initialPlacement:o,placement:S,strategy:s,middlewareData:y,rects:g,platform:f,elements:{reference:t,floating:a}});x=z??x,v=T??v,y[E]={...y[E],...j},k&&w<uN&&(w++,typeof k=="object"&&(k.placement&&(S=k.placement),k.rects&&(g=k.rects===!0?await d.getElementRects({reference:t,floating:a,strategy:s}):k.rects),{x,y:v}=mx(g,S,p)),C=-1)}return{x,y:v,placement:S,strategy:s,middlewareData:y}},fN=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=Bv(x),S={x:l,y:o},w=af(s),y=nf(w),C=await d.getDimensions(g),A=w==="y",E=A?"top":"left",R=A?"bottom":"right",z=A?"clientHeight":"clientWidth",T=c.reference[y]+c.reference[w]-S[w]-c.floating[y],j=S[w]-c.reference[w],k=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let _=k?k[z]:0;(!_||!await(d.isElement==null?void 0:d.isElement(k)))&&(_=f.floating[z]||c.floating[y]);const I=T/2-j/2,Z=_/2-C[y]/2-1,te=Bi(v[E],Z),ee=Bi(v[R],Z),K=_-C[y]-ee,le=_/2-C[y]/2+I,oe=Uv(te,le,K),ie=!p.arrow&&vo(s)!=null&&le!==oe&&c.reference[y]/2-(le<te?te:ee)-C[y]/2<0,L=ie?le<te?le-te:le-K:0;return{[w]:S[w]+L,data:{[w]:oe,centerOffset:le-oe-L,...ie&&{alignmentOffset:L}},reset:ie}}}),hN=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:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:C=!0,...A}=li(t,a);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const E=Hi(s),R=On(f),z=Hi(f)===f,T=await(p.isRTL==null?void 0:p.isRTL(g.floating)),j=S||(z||!C?[Ss(f)]:iN(f)),k=y!=="none";!S&&k&&j.push(...rN(f,C,y,T));const _=[f,...j],I=await p.detectOverflow(a,A),Z=[];let te=((o=c.flip)==null?void 0:o.overflows)||[];if(x&&Z.push(I[E]),v){const oe=nN(s,d,T);Z.push(I[oe[0]],I[oe[1]])}if(te=[...te,{placement:s,overflows:Z}],!Z.every(oe=>oe<=0)){var ee,K;const oe=(((ee=c.flip)==null?void 0:ee.index)||0)+1,ie=_[oe];if(ie&&(!(v==="alignment"?R!==On(ie):!1)||te.every(W=>On(W.placement)===R?W.overflows[0]>0:!0)))return{data:{index:oe,overflows:te},reset:{placement:ie}};let L=(K=te.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:K.placement;if(!L)switch(w){case"bestFit":{var le;const q=(le=te.filter(W=>{if(k){const ge=On(W.placement);return ge===R||ge==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ge=>ge>0).reduce((ge,J)=>ge+J,0)]).sort((W,ge)=>W[1]-ge[1])[0])==null?void 0:le[0];q&&(L=q);break}case"initialPlacement":L=f;break}if(s!==L)return{reset:{placement:L}}}return{}}}};function px(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function gx(t){return eN.some(a=>t[a]>=0)}const mN=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=px(d,l.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:gx(f)}}}case"escaped":{const d=await o.detectOverflow(a,{...c,altBoundary:!0}),f=px(d,l.floating);return{data:{escapedOffsets:f,escaped:gx(f)}}}default:return{}}}}},Hv=new Set(["left","top"]);async function pN(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=Hv.has(d)?-1:1,x=c&&p?-1:1,v=li(a,t);let{mainAxis:S,crossAxis:w,alignmentAxis:y}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof y=="number"&&(w=f==="end"?y*-1:y),p?{x:w*x,y:S*g}:{x:S*g,y:w*x}}const gN=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 pN(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}}}}},xN=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:R=>{let{x:z,y:T}=R;return{x:z,y:T}}},...g}=li(t,a),x={x:l,y:o},v=await c.detectOverflow(a,g),S=On(s),w=tf(S);let y=x[w],C=x[S];const A=(R,z)=>Uv(z+v[R==="y"?"top":"left"],z,z-v[R==="y"?"bottom":"right"]);d&&(y=A(w,y)),f&&(C=A(S,C));const E=p.fn({...a,[w]:y,[S]:C});return{...E,data:{x:E.x-l,y:E.y-o,enabled:{[w]:d,[S]:f}}}}}},vN=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),S={x:s,y:c},w=On(d),y=tf(w);let C=S[y],A=S[w];const E=li(g,a),R=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(l=E.mainAxis)!=null?l:0,crossAxis:(o=E.crossAxis)!=null?o:0};if(x){const j=y==="y"?"height":"width",k=f.reference[y]-f.floating[j]+R.mainAxis,_=f.reference[y]+f.reference[j]-R.mainAxis;C<k?C=k:C>_&&(C=_)}if(v){var z,T;const j=y==="y"?"width":"height",k=Hv.has(Hi(d)),_=f.reference[w]-f.floating[j]+(k&&((z=p.offset)==null?void 0:z[w])||0)+(k?0:R.crossAxis),I=f.reference[w]+f.reference[j]+(k?0:((T=p.offset)==null?void 0:T[w])||0)-(k?R.crossAxis:0);A<_?A=_:A>I&&(A=I)}return{[y]:C,[w]:A}}}},bN=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:S,height:w}=o.floating;let y,C;g==="top"||g==="bottom"?(y=g,C=x===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(C=g,y=x==="end"?"top":"bottom");const A=w-p.top-p.bottom,E=S-p.left-p.right,R=Bi(w-p[y],A),z=Bi(S-p[C],E),T=a.middlewareData.shift,j=!T;let k=R,_=z;T!=null&&T.enabled.x&&(_=E),T!=null&&T.enabled.y&&(k=A),j&&!x&&(v?_=S-2*ii(p.left,p.right):k=w-2*ii(p.top,p.bottom)),await d({...a,availableWidth:_,availableHeight:k});const I=await s.getDimensions(c.floating);return S!==I.width||w!==I.height?{reset:{rects:!0}}:{}}}};function Os(){return typeof window<"u"}function bo(t){return Yv(t)?(t.nodeName||"").toLowerCase():"#document"}function Xt(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function ri(t){var a;return(a=(Yv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function Yv(t){return Os()?t instanceof Node||t instanceof Xt(t).Node:!1}function _n(t){return Os()?t instanceof Element||t instanceof Xt(t).Element:!1}function Ii(t){return Os()?t instanceof HTMLElement||t instanceof Xt(t).HTMLElement:!1}function xx(t){return!Os()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Xt(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 yN(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 wN=/transform|translate|scale|rotate|perspective|filter/,SN=/paint|layout|strict|content/,da=t=>!!t&&t!=="none";let gd;function of(t){const a=_n(t)?Dn(t):t;return da(a.transform)||da(a.translate)||da(a.scale)||da(a.rotate)||da(a.perspective)||!lf()&&(da(a.backdropFilter)||da(a.filter))||wN.test(a.willChange||"")||SN.test(a.contain||"")}function NN(t){let a=pa(t);for(;Ii(a)&&!jl(a);){if(of(a))return a;if(_s(a))return null;a=pa(a)}return null}function lf(){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 Xt(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||xx(t)&&t.host||ri(t);return xx(a)?a.host:a}function Iv(t){const a=pa(t);return jl(a)?(t.ownerDocument||t).body:Ii(a)&&ks(a)?a:Iv(a)}function El(t,a,l){var o;a===void 0&&(a=[]),l===void 0&&(l=!0);const s=Iv(t),c=s===((o=t.ownerDocument)==null?void 0:o.body),d=Xt(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 Gv(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 rf(t){return _n(t)?t:t.contextElement}function fo(t){const a=rf(t);if(!Ii(a))return ai(1);const l=a.getBoundingClientRect(),{width:o,height:s,$:c}=Gv(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 CN=ai(0);function Vv(t){const a=Xt(t);return!lf()||!a.visualViewport?CN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function MN(t,a,l){return a===void 0&&(a=!1),!!l&&a&&l===Xt(t)}function ga(t,a,l,o){a===void 0&&(a=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=rf(t);let d=ai(1);a&&(o?_n(o)&&(d=fo(o)):d=fo(t));const f=MN(c,l,o)?Vv(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 S=Xt(c),w=_n(o)?Xt(o):o;let y=S,C=Ld(y);for(;C&&w!==y;){const A=fo(C),E=C.getBoundingClientRect(),R=Dn(C),z=E.left+(C.clientLeft+parseFloat(R.paddingLeft))*A.x,T=E.top+(C.clientTop+parseFloat(R.paddingTop))*A.y;p*=A.x,g*=A.y,x*=A.x,v*=A.y,p+=z,g+=T,y=Xt(C),C=Ld(y)}}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 Xv(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 jN(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 w=ga(o);g=fo(o),x.x=w.x+o.clientLeft,x.y=w.y+o.clientTop}const S=d&&!v&&!c?Xv(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+S.x,y:l.y*g.y-p.scrollTop*g.y+x.y+S.y}}function EN(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function AN(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 TN=25;function zN(t,a,l){l===void 0&&(l="viewport");const o=l==="layoutViewport",s=Xt(t),c=ri(t),d=s.visualViewport;let f=c.clientWidth,p=c.clientHeight,g=0,x=0;if(d){const S=!lf()||a==="fixed";o?S||(g=-d.offsetLeft,x=-d.offsetTop):(f=d.width,p=d.height,S&&(g=d.offsetLeft,x=d.offsetTop))}if($s(c)<=0){const S=c.ownerDocument,w=S.body,y=getComputedStyle(w),C=S.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,A=Math.abs(c.clientWidth-w.clientWidth-C),E=getComputedStyle(c).scrollbarGutter==="stable both-edges"?A/2:A;E<=TN&&(f-=E)}return{width:f,height:p,x:g,y:x}}function RN(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 vx(t,a,l){let o;if(a==="viewport"||a==="layoutViewport")o=zN(t,l,a);else if(a==="document")o=AN(ri(t));else if(_n(a))o=RN(a,l);else{const s=Vv(t);o={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return Ns(o)}function ON(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=of(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 kN(t){let{element:a,boundary:l,rootBoundary:o,strategy:s}=t;const d=[...l==="clippingAncestors"?_s(a)?[]:ON(a,this._c):[].concat(l),o],f=vx(a,d[0],s);let p=f.top,g=f.right,x=f.bottom,v=f.left;for(let S=1;S<d.length;S++){const w=vx(a,d[S],s);p=ii(w.top,p),g=Bi(w.right,g),x=Bi(w.bottom,x),v=ii(w.left,v)}return{width:g-v,height:x-p,x:v,y:p}}function _N(t){const{width:a,height:l}=Gv(t);return{width:a,height:l}}function DN(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 S=ga(a,!0,c,a);p.x=S.x+a.clientLeft,p.y=S.y+a.clientTop}!o&&s&&(p.x=$s(s));const g=s&&!o&&!c?Xv(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 bx(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 qv(t,a){const l=Xt(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=bx(t,a);for(;o&&yN(o)&&xd(o);)o=bx(o,a);return o&&jl(o)&&xd(o)&&!of(o)?l:o||NN(t)||l}const $N=async function(t){const a=this.getOffsetParent||qv,l=this.getDimensions,o=await l(t.floating);return{reference:DN(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function LN(t){return Dn(t).direction==="rtl"}const UN={convertOffsetParentRelativeRectToViewportRelativeRect:jN,getDocumentElement:ri,getClippingRect:kN,getOffsetParent:qv,getElementRects:$N,getClientRects:EN,getDimensions:_N,getScale:fo,isElement:_n,isRTL:LN};function Pv(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height}function BN(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 S=t.getBoundingClientRect(),{left:w,top:y,width:C,height:A}=S;if(x||a(),!C||!A)return;const E=is(y),R=is(c.clientWidth-(w+C)),z=is(c.clientHeight-(y+A)),T=is(w),k={rootMargin:-E+"px "+-R+"px "+-z+"px "+-T+"px",threshold:ii(0,Bi(1,v))||1};let _=!0;function I(Z){const te=Z[0].intersectionRatio;if(!Pv(S,t.getBoundingClientRect()))return f();if(te!==v){if(!_)return f();te?f(!1,te):s=setTimeout(()=>{f(!1,1e-7)},1e3)}_=!1}try{o=new IntersectionObserver(I,{...k,root:c.ownerDocument})}catch{o=new IntersectionObserver(I,k)}o.observe(t)}const p=Xt(t),g=()=>f(l);return p.addEventListener("resize",g),f(!0),()=>{p.removeEventListener("resize",g),d()}}function HN(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=rf(t),x=s||c?[...g?El(g):[],...a?El(a):[]]:[];x.forEach(E=>{s&&E.addEventListener("scroll",l),c&&E.addEventListener("resize",l)});const v=g&&f?BN(g,l,c):null;let S=-1,w=null;d&&(w=new ResizeObserver(E=>{let[R]=E;R&&R.target===g&&w&&a&&(w.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var z;(z=w)==null||z.observe(a)})),l()}),g&&!p&&w.observe(g),a&&w.observe(a));let y,C=p?ga(t):null;p&&A();function A(){const E=ga(t);C&&!Pv(C,E)&&l(),C=E,y=requestAnimationFrame(A)}return l(),()=>{var E;x.forEach(R=>{s&&R.removeEventListener("scroll",l),c&&R.removeEventListener("resize",l)}),v==null||v(),(E=w)==null||E.disconnect(),w=null,p&&cancelAnimationFrame(y)}}const YN=gN,IN=xN,GN=hN,VN=bN,XN=mN,yx=fN,qN=vN,PN=(t,a,l)=>{const o=new Map,s=l??{},c={...UN,...s.platform,_c:o};return dN(t,a,{...s,platform:c})};var sf=Jx(),QN=typeof document<"u",ZN=function(){},ms=QN?N.useLayoutEffect:ZN;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 Qv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(t,a){const l=Qv(t);return Math.round(a*l)/l}function vd(t){const a=N.useRef(t);return ms(()=>{a.current=t}),a}function FN(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}),[S,w]=N.useState(o);Cs(S,o)||w(o);const[y,C]=N.useState(null),[A,E]=N.useState(null),R=N.useCallback(W=>{W!==k.current&&(k.current=W,C(W))},[]),z=N.useCallback(W=>{W!==_.current&&(_.current=W,E(W))},[]),T=c||y,j=d||A,k=N.useRef(null),_=N.useRef(null),I=N.useRef(x),Z=p!=null,te=vd(p),ee=vd(s),K=vd(g),le=N.useCallback(()=>{if(!k.current||!_.current)return;const W={placement:a,strategy:l,middleware:S};ee.current&&(W.platform=ee.current),PN(k.current,_.current,W).then(ge=>{const J={...ge,isPositioned:K.current!==!1};oe.current&&!Cs(I.current,J)&&(I.current=J,sf.flushSync(()=>{v(J)}))})},[S,a,l,ee,K]);ms(()=>{g===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,v(W=>({...W,isPositioned:!1})))},[g]);const oe=N.useRef(!1);ms(()=>(oe.current=!0,()=>{oe.current=!1}),[]),ms(()=>{if(T&&(k.current=T),j&&(_.current=j),T&&j){if(te.current)return te.current(T,j,le);le()}},[T,j,le,te,Z]);const ie=N.useMemo(()=>({reference:k,floating:_,setReference:R,setFloating:z}),[R,z]),L=N.useMemo(()=>({reference:T,floating:j}),[T,j]),q=N.useMemo(()=>{const W={position:l,left:0,top:0};if(!L.floating)return W;const ge=wx(L.floating,x.x),J=wx(L.floating,x.y);return f?{...W,transform:"translate("+ge+"px, "+J+"px)",...Qv(L.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:ge,top:J}},[l,f,L.floating,x.x,x.y]);return N.useMemo(()=>({...x,update:le,refs:ie,elements:L,floatingStyles:q}),[x,le,ie,L,q])}const WN=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?yx({element:o.current,padding:s}).fn(l):{}:o?yx({element:o,padding:s}).fn(l):{}}}},KN=(t,a)=>{const l=YN(t);return{name:l.name,fn:l.fn,options:[t,a]}},JN=(t,a)=>{const l=IN(t);return{name:l.name,fn:l.fn,options:[t,a]}},eC=(t,a)=>({fn:qN(t).fn,options:[t,a]}),tC=(t,a)=>{const l=GN(t);return{name:l.name,fn:l.fn,options:[t,a]}},nC=(t,a)=>{const l=VN(t);return{name:l.name,fn:l.fn,options:[t,a]}},iC=(t,a)=>{const l=XN(t);return{name:l.name,fn:l.fn,options:[t,a]}},aC=(t,a)=>{const l=WN(t);return{name:l.name,fn:l.fn,options:[t,a]}};var oC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],St=oC.reduce((t,a)=>{const l=Wd(`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 lC(t,a){t&&sf.flushSync(()=>t.dispatchEvent(a))}var rC="Arrow",Zv=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"})})});Zv.displayName=rC;var sC=Zv;function nn(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 cC(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 cf="Popper",[Fv,yo]=Rl(cf),[uC,Wv]=Fv(cf),Kv=t=>{const{__scopePopper:a,children:l}=t,[o,s]=N.useState(null),[c,d]=N.useState(void 0);return m.jsx(uC,{scope:a,anchor:o,onAnchorChange:s,placementState:c,setPlacementState:d,children:l})};Kv.displayName=cf;var Jv="PopperAnchor",eb=N.forwardRef((t,a)=>{const{__scopePopper:l,virtualRef:o,...s}=t,c=Wv(Jv,l),d=N.useRef(null),f=c.onAnchorChange,p=N.useCallback(y=>{d.current=y,y&&f(y)},[f]),g=Tt(a,p),x=N.useRef(null);N.useEffect(()=>{if(!o)return;const y=x.current;x.current=o.current,y!==x.current&&f(x.current)});const v=c.placementState&&df(c.placementState),S=v==null?void 0:v[0],w=v==null?void 0:v[1];return o?null:m.jsx(St.div,{"data-radix-popper-side":S,"data-radix-popper-align":w,...s,ref:g})});eb.displayName=Jv;var uf="PopperContent",[dC,fC]=Fv(uf),tb=N.forwardRef((t,a)=>{var et,Se,Dt,Ot,$t,an;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:S=!1,updatePositionStrategy:w="optimized",onPlaced:y,...C}=t,A=Wv(uf,l),[E,R]=N.useState(null),z=Tt(a,R),[T,j]=N.useState(null),k=cC(T),_=(k==null?void 0:k.width)??0,I=(k==null?void 0:k.height)??0,Z=o+(c!=="center"?"-"+c:""),te=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},ee=Array.isArray(g)?g:[g],K=ee.length>0,le={padding:te,boundary:ee.filter(mC),altBoundary:K},{refs:oe,floatingStyles:ie,placement:L,isPositioned:q,middlewareData:W}=FN({strategy:"fixed",placement:Z,whileElementsMounted:(...ft)=>HN(...ft,{animationFrame:w==="always"}),elements:{reference:A.anchor},middleware:[KN({mainAxis:s+I,alignmentAxis:d}),p&&JN({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?eC():void 0,...le}),p&&tC({...le}),nC({...le,apply:({elements:ft,rects:be,availableWidth:$e,availableHeight:Ne})=>{const{width:ye,height:Ce}=be.reference,he=ft.floating.style;he.setProperty("--radix-popper-available-width",`${$e}px`),he.setProperty("--radix-popper-available-height",`${Ne}px`),he.setProperty("--radix-popper-anchor-width",`${ye}px`),he.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),T&&aC({element:T,padding:f}),pC({arrowWidth:_,arrowHeight:I}),S&&iC({strategy:"referenceHidden",...le,boundary:K?le.boundary:void 0})]}),ge=A.setPlacementState;kn(()=>(ge(L),()=>{ge(void 0)}),[L,ge]);const[J,D]=df(L),P=nn(y);kn(()=>{q&&(P==null||P())},[q,P]);const ne=(et=W.arrow)==null?void 0:et.x,re=(Se=W.arrow)==null?void 0:Se.y,fe=((Dt=W.arrow)==null?void 0:Dt.centerOffset)!==0,[pe,Ae]=N.useState();return kn(()=>{E&&Ae(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:oe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:q?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(Ot=W.transformOrigin)==null?void 0:Ot.x,($t=W.transformOrigin)==null?void 0:$t.y].join(" "),...((an=W.hide)==null?void 0:an.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m.jsx(dC,{scope:l,placedSide:J,placedAlign:D,onArrowChange:j,arrowX:ne,arrowY:re,shouldHideArrow:fe,children:m.jsx(St.div,{"data-side":J,"data-align":D,...C,ref:z,style:{...C.style,animation:q?void 0:"none"}})})})});tb.displayName=uf;var nb="PopperArrow",hC={top:"bottom",right:"left",bottom:"top",left:"right"},ib=N.forwardRef(function(a,l){const{__scopePopper:o,...s}=a,c=fC(nb,o),d=hC[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(sC,{...s,ref:l,style:{...s.style,display:"block"}})})});ib.displayName=nb;function mC(t){return t!==null}var pC=t=>({name:"transformOrigin",options:t,fn(a){var A,E,R;const{placement:l,rects:o,middlewareData:s}=a,d=((A=s.arrow)==null?void 0:A.centerOffset)!==0,f=d?0:t.arrowWidth,p=d?0:t.arrowHeight,[g,x]=df(l),v={start:"0%",center:"50%",end:"100%"}[x],S=(((E=s.arrow)==null?void 0:E.x)??0)+f/2,w=(((R=s.arrow)==null?void 0:R.y)??0)+p/2;let y="",C="";return g==="bottom"?(y=d?v:`${S}px`,C=`${-p}px`):g==="top"?(y=d?v:`${S}px`,C=`${o.floating.height+p}px`):g==="right"?(y=`${-p}px`,C=d?v:`${w}px`):g==="left"&&(y=`${o.floating.width+p}px`,C=d?v:`${w}px`),{data:{x:y,y:C}}}});function df(t){const[a,l="center"]=t.split("-");return[a,l]}var ff=Kv,Ls=eb,hf=tb,mf=ib,gC="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?sf.createPortal(m.jsx(St.div,{...o,ref:a}),d):null});Us.displayName=gC;function xC(t,a){return N.useReducer((l,o)=>a[l][o]??l,t)}var wn=t=>{const{present:a,children:l}=t,o=vC(a),s=typeof l=="function"?l({present:o.isPresent}):N.Children.only(l),c=bC(o.ref,yC(s));return typeof l=="function"||o.isPresent?N.cloneElement(s,{ref:c}):null};wn.displayName="Presence";function vC(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]=xC(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 w=c.current,y=xl(x);t?(d.current=y,g("MOUNT")):y==="none"||(x==null?void 0:x.display)==="none"?g("UNMOUNT"):g(v&&w!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),kn(()=>{if(a){let x;const v=a.ownerDocument.defaultView??window,S=y=>{const A=xl(o.current).includes(CSS.escape(y.animationName));if(y.target===a&&A&&(g("ANIMATION_END"),!s.current)){const E=a.style.animationFillMode;a.style.animationFillMode="forwards",x=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=E)})}},w=y=>{y.target===a&&(c.current=xl(o.current))};return a.addEventListener("animationstart",w),a.addEventListener("animationcancel",S),a.addEventListener("animationend",S),()=>{v.clearTimeout(x),a.removeEventListener("animationstart",w),a.removeEventListener("animationcancel",S),a.removeEventListener("animationend",S)}}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 Sx(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function bC(...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=Sx(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():Sx(o[d],null)}}},[])}function xl(t){return(t==null?void 0:t.animationName)||"none"}function yC(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 wC="DismissableLayer",Ud="dismissableLayer.update",SC="dismissableLayer.pointerDownOutside",NC="dismissableLayer.focusOutside",Nx,ab=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(ab),[v,S]=N.useState(null),w=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=N.useState({}),C=Tt(a,S),A=Array.from(x.layers),[E]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),R=E?A.indexOf(E):-1,z=v?A.indexOf(v):-1,T=x.layersWithOutsidePointerEventsDisabled.size>0,j=z>=R,k=N.useRef(!1),_=EC(ee=>{c==null||c(ee),f==null||f(ee),ee.defaultPrevented||p==null||p()},{ownerDocument:w,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:k,dismissableSurfaces:x.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(ee=>{if(!(ee instanceof Node))return!1;const K=[...x.branches].some(le=>le.contains(ee));return j&&!K},[x.branches,j])}),I=AC(ee=>{if(o&&k.current)return;const K=ee.target;[...x.branches].some(oe=>oe.contains(K))||(d==null||d(ee),f==null||f(ee),ee.defaultPrevented||p==null||p())},w),Z=v?z===A.length-1:!1,te=nn(ee=>{ee.key==="Escape"&&(s==null||s(ee),!ee.defaultPrevented&&p&&(ee.preventDefault(),p()))});return N.useEffect(()=>{if(Z)return w.addEventListener("keydown",te,{capture:!0}),()=>w.removeEventListener("keydown",te,{capture:!0})},[w,Z,te]),N.useEffect(()=>{if(v)return l&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(Nx=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(v)),x.layers.add(v),Cx(),()=>{l&&(x.layersWithOutsidePointerEventsDisabled.delete(v),x.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=Nx))}},[v,w,l,x]),N.useEffect(()=>()=>{v&&(x.layers.delete(v),x.layersWithOutsidePointerEventsDisabled.delete(v),Cx())},[v,x]),N.useEffect(()=>{const ee=()=>y({});return document.addEventListener(Ud,ee),()=>document.removeEventListener(Ud,ee)},[]),m.jsx(St.div,{...g,ref:C,style:{pointerEvents:T?j?"auto":"none":void 0,...t.style},onFocusCapture:Ie(t.onFocusCapture,I.onFocusCapture),onBlurCapture:Ie(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ie(t.onPointerDownCapture,_.onPointerDownCapture)})});Bs.displayName=wC;var CC="DismissableLayerBranch",MC=N.forwardRef((t,a)=>{const l=N.useContext(ab),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})});MC.displayName=CC;var jC=()=>!0;function EC(t,a){const{ownerDocument:l=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=jC}=a,f=nn(t),p=N.useRef(!1),g=N.useRef(!1),x=N.useRef(new Map),v=N.useRef(()=>{});return N.useEffect(()=>{function S(){g.current=!1,s.current=!1,x.current.clear()}function w(){return Array.from(x.current.values()).some(Boolean)}function y(z){if(!g.current)return;const T=z.target;T instanceof Node&&[...c].some(k=>k.contains(T))||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 A=z=>{if(z.target&&!p.current){let T=function(){l.removeEventListener("click",v.current);const k=w();S(),k||ob(SC,f,j,{discrete:!0})};if(!d(z.target)){l.removeEventListener("click",v.current),S(),p.current=!1;return}const j={originalEvent:z};g.current=!0,s.current=o&&z.button===0,x.current.clear(),!o||z.button!==0?T():(l.removeEventListener("click",v.current),v.current=T,l.addEventListener("click",v.current,{once:!0}))}else l.removeEventListener("click",v.current),S();p.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const z of E)l.addEventListener(z,y,!0),l.addEventListener(z,C);const R=window.setTimeout(()=>{l.addEventListener("pointerdown",A)},0);return()=>{window.clearTimeout(R),l.removeEventListener("pointerdown",A),l.removeEventListener("click",v.current);for(const z of E)l.removeEventListener(z,y,!0),l.removeEventListener(z,C)}},[l,f,o,s,c,d]),{onPointerDownCapture:()=>p.current=!0}}function AC(t,a=globalThis==null?void 0:globalThis.document){const l=nn(t),o=N.useRef(!1);return N.useEffect(()=>{const s=c=>{c.target&&!o.current&&ob(NC,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 Cx(){const t=new CustomEvent(Ud);document.dispatchEvent(t)}function ob(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?lC(s,c):s.dispatchEvent(c)}var bd,Hs="HoverCard",[lb]=Rl(Hs,[yo]),Ys=yo(),[TC,Is]=lb(Hs),rb=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),S=N.useRef(!1),[w,y]=ef({prop:o,defaultProp:s??!1,onChange:c,caller:Hs}),C=N.useCallback(()=>{clearTimeout(x.current),g.current=window.setTimeout(()=>y(!0),d)},[d,y]),A=N.useCallback(()=>{clearTimeout(g.current),!v.current&&!S.current&&(x.current=window.setTimeout(()=>y(!1),f))},[f,y]),E=N.useCallback(()=>y(!1),[y]);return N.useEffect(()=>()=>{clearTimeout(g.current),clearTimeout(x.current)},[]),m.jsx(TC,{scope:a,open:w,onOpenChange:y,onOpen:C,onClose:A,onDismiss:E,hasSelectionRef:v,isPointerDownOnContentRef:S,children:m.jsx(ff,{...p,children:l})})};rb.displayName=Hs;var sb="HoverCardTrigger",cb=N.forwardRef((t,a)=>{const{__scopeHoverCard:l,...o}=t,s=Is(sb,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:Ie(t.onPointerEnter,js(s.onOpen)),onPointerLeave:Ie(t.onPointerLeave,js(s.onClose)),onFocus:Ie(t.onFocus,s.onOpen),onBlur:Ie(t.onBlur,s.onClose),onTouchStart:Ie(t.onTouchStart,d=>d.preventDefault())})})});cb.displayName=sb;var pf="HoverCardPortal",[zC,RC]=lb(pf,{forceMount:void 0}),ub=t=>{const{__scopeHoverCard:a,forceMount:l,children:o,container:s}=t,c=Is(pf,a);return m.jsx(zC,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};ub.displayName=pf;var Ms="HoverCardContent",db=N.forwardRef((t,a)=>{const l=RC(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(OC,{"data-state":c.open?"open":"closed",...s,onPointerEnter:Ie(t.onPointerEnter,js(c.onOpen)),onPointerLeave:Ie(t.onPointerLeave,js(c.onClose)),ref:a})})});db.displayName=Ms;var OC=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),[S,w]=N.useState(!1);return N.useEffect(()=>{if(S){const y=document.body;return bd=y.style.userSelect||y.style.webkitUserSelect,y.style.userSelect="none",y.style.webkitUserSelect="none",()=>{y.style.userSelect=bd,y.style.webkitUserSelect=bd}}},[S]),N.useEffect(()=>{if(x.current){const y=()=>{w(!1),p.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var A;((A=document.getSelection())==null?void 0:A.toString())!==""&&(p.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",y),()=>{document.removeEventListener("pointerup",y),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!1}}},[p.isPointerDownOnContentRef,p.hasSelectionRef]),N.useEffect(()=>{x.current&&DC(x.current).forEach(C=>C.setAttribute("tabindex","-1"))}),m.jsx(Bs,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:d,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:Ie(c,y=>{y.preventDefault()}),onDismiss:p.onDismiss,children:m.jsx(hf,{...g,...f,onPointerDown:Ie(f.onPointerDown,y=>{y.currentTarget.contains(y.target)&&w(!0),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!0}),ref:v,style:{...f.style,userSelect:S?"text":void 0,WebkitUserSelect:S?"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)"}})})}),kC="HoverCardArrow",_C=N.forwardRef((t,a)=>{const{__scopeHoverCard:l,...o}=t,s=Ys(l);return m.jsx(mf,{...s,...o,ref:a})});_C.displayName=kC;function js(t){return a=>a.pointerType==="touch"?void 0:t()}function DC(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 $C=rb,LC=cb,UC=ub,BC=db;function gf({...t}){return m.jsx($C,{"data-slot":"hover-card",...t})}function xf({...t}){return m.jsx(LC,{"data-slot":"hover-card-trigger",...t})}function vf({className:t,align:a="center",sideOffset:l=4,...o}){return m.jsx(UC,{"data-slot":"hover-card-portal",children:m.jsx(BC,{"data-slot":"hover-card-content",align:a,sideOffset:l,className:Rt("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 HC=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YC=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,o)=>o?o.toUpperCase():l.toLowerCase()),Mx=t=>{const a=YC(t);return a.charAt(0).toUpperCase()+a.slice(1)},fb=(...t)=>t.filter((a,l,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===l).join(" ").trim(),IC=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 GC={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 VC=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,...GC,width:a,height:a,stroke:t,strokeWidth:o?Number(l)*24/Number(a):l,className:fb("lucide",s),...!c&&!IC(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 De=(t,a)=>{const l=N.forwardRef(({className:o,...s},c)=>N.createElement(VC,{ref:c,iconNode:a,className:fb(`lucide-${HC(Mx(t))}`,`lucide-${t}`,o),...s}));return l.displayName=Mx(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 XC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qC=De("arrow-left",XC);/**
|
|
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 PC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],QC=De("arrow-right",PC);/**
|
|
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 ZC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],FC=De("check",ZC);/**
|
|
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 WC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Gs=De("chevron-down",WC);/**
|
|
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 KC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],wo=De("chevron-right",KC);/**
|
|
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 JC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],eM=De("circle",JC);/**
|
|
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 tM=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],nM=De("code",tM);/**
|
|
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 iM=[["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"}]],aM=De("component",iM);/**
|
|
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 oM=[["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=De("copy",oM);/**
|
|
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 lM=[["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"}]],rM=De("diamond",lM);/**
|
|
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 sM=[["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"}]],cM=De("external-link",sM);/**
|
|
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 uM=[["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"}]],dM=De("eye-off",uM);/**
|
|
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 fM=[["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"}]],hb=De("eye",fM);/**
|
|
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 hM=[["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"}]],mM=De("file-text",hM);/**
|
|
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 pM=[["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"}]],gM=De("frame",pM);/**
|
|
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 xM=[["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"}]],vM=De("group",xM);/**
|
|
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 bM=[["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"}]],mb=De("image",bM);/**
|
|
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 yM=[["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"}]],pb=De("layers",yM);/**
|
|
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 wM=[["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=De("layout-grid",wM);/**
|
|
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 SM=[["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"}]],NM=De("maximize",SM);/**
|
|
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 CM=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],MM=De("menu",CM);/**
|
|
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 jM=[["path",{d:"M5 12h14",key:"1ays0h"}]],bf=De("minus",jM);/**
|
|
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 EM=[["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"}]],AM=De("moon",EM);/**
|
|
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 TM=[["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"}]],zM=De("move-horizontal",TM);/**
|
|
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 RM=[["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"}]],OM=De("package",RM);/**
|
|
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 kM=[["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"}]],gb=De("palette",kM);/**
|
|
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 _M=[["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"}]],DM=De("pen-tool",_M);/**
|
|
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 $M=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],xb=De("plus",$M);/**
|
|
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 LM=[["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"}]],UM=De("rotate-ccw",LM);/**
|
|
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 BM=[["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"}]],HM=De("ruler",BM);/**
|
|
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 YM=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],IM=De("search",YM);/**
|
|
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 GM=[["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"}]],VM=De("settings",GM);/**
|
|
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 XM=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],qM=De("square",XM);/**
|
|
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 PM=[["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"}]],QM=De("sun-medium",PM);/**
|
|
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 ZM=[["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"}]],vb=De("type",ZM);/**
|
|
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 FM=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],WM=De("x",FM);function Vs(t,a){return{en:t,"zh-CN":a}}const KM=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":"我的设计稿"}),JM=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 中查看"}),ej=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":"幽灵层"}),tj=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":"(已移除)"}),nj=["en","zh-CN"],bb="en",yf="tarot-pixel.locale",ij=[KM,JM,ej,tj],jx=Object.fromEntries(nj.map(t=>[t,Object.assign({},...ij.map(a=>a[t]))])),aj="http://tarot-pixel.local";function ps(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 oj({query:t,stored:a,systemLocale:l,languages:o=[]}){const s=sj(t);if(s)return s;const c=ps(a);if(c)return c;const d=ps(l);if(d)return d;for(const f of o){const p=ps(f);if(p)return p}return bb}function Ex(t,a,l={}){return(jx[t][a]??jx[bb][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 Ax(){try{return window.localStorage.getItem(yf)}catch{return null}}function Es(t,a){const l=new URL(t,aj);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 yb(t){return new URLSearchParams(t).has("_screenshot_token")}function lj(t,a){const l=a.indexOf("?"),o=l>=0?a.slice(l+1):"",s=new URLSearchParams(o).get("mode")==="map";return yb(t)&&!s}function rj(t){try{window.localStorage.setItem(yf,t)}catch{}}function sj(t){if(!t)return null;try{return ps(new URLSearchParams(t).get("lang"))}catch{return null}}const wb=N.createContext(null);function cj({children:t}){const[a,l]=N.useState(()=>wd(Ax())),o=N.useCallback(d=>{l(d),rj(d),window.history.replaceState(window.history.state,"",Es(window.location.href,d))},[]);N.useEffect(()=>{document.documentElement.lang=a,document.title=Ex(a,"app.documentTitle")},[a]),N.useEffect(()=>{const d=p=>{p.key===yf&&l(wd(p.newValue))},f=()=>{l(wd(Ax()))};return window.addEventListener("storage",d),window.addEventListener("languagechange",f),()=>{window.removeEventListener("storage",d),window.removeEventListener("languagechange",f)}},[]);const s=N.useCallback((d,f)=>Ex(a,d,f),[a]),c=N.useMemo(()=>({locale:a,setLocale:o,t:s}),[a,o,s]);return m.jsx(wb.Provider,{value:c,children:t})}function gt(){const t=N.useContext(wb);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 oj({query:window.location.search,stored:t,systemLocale:uj(),languages:a})}function uj(){try{return Intl.DateTimeFormat().resolvedOptions().locale||null}catch{return null}}function dj(){const{t}=gt(),{exportData:a,selectModule:l,getModuleStats:o}=Ze(qt(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(gb,{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(fj,{mod:s,stats:c,onSelect:l,exportedAt:a.exportedAt},`${s.moduleId}`)})})})]}):null}function fj({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(hj,{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(as,{icon:pb,label:s(`viewer.stats.node.${a.nodes===1?"one":"other"}`,{count:a.nodes})}),m.jsx(as,{icon:mb,label:s(`viewer.stats.asset.${a.assets===1?"one":"other"}`,{count:a.assets})}),a.texts>0&&m.jsx(as,{icon:mM,label:s(`viewer.stats.text.${a.texts===1?"one":"other"}`,{count:a.texts})}),a.frames>0&&m.jsx(as,{icon:OM,label:s(`viewer.stats.frame.${a.frames===1?"one":"other"}`,{count:a.frames})})]})]})]});return(f=t.preview)!=null&&f.url?m.jsxs(gf,{openDelay:300,closeDelay:100,children:[m.jsx(xf,{asChild:!0,children:d}),m.jsxs(vf,{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 as({icon:t,label:a}){return m.jsxs(Ue,{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 hj({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 mj=Pd[" useId ".trim().toString()]||(()=>{}),pj=0;function Sb(t){const[a,l]=N.useState(mj());return kn(()=>{l(o=>o??String(pj++))},[t]),t||(a?`radix-${a}`:"")}var gj=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"}),xj="VisuallyHidden",Nb=N.forwardRef((t,a)=>m.jsx(St.span,{...t,ref:a,style:{...gj,...t.style}}));Nb.displayName=xj;var vj=Nb,[Xs]=Rl("Tooltip",[yo]),qs=yo(),Cb="TooltipProvider",bj=700,Hd="tooltip.open",[yj,wf]=Xs(Cb),Mb=t=>{const{__scopeTooltip:a,delayDuration:l=bj,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(yj,{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})};Mb.displayName=Cb;var Al="Tooltip",[wj,Ol]=Xs(Al),jb=t=>{const{__scopeTooltip:a,children:l,open:o,defaultOpen:s,onOpenChange:c,disableHoverableContent:d,delayDuration:f}=t,p=wf(Al,t.__scopeTooltip),g=qs(a),[x,v]=N.useState(null),S=Sb(),w=N.useRef(0),y=d??p.disableHoverableContent,C=f??p.delayDuration,A=N.useRef(!1),[E,R]=ef({prop:o,defaultProp:s??!1,onChange:_=>{_?(p.onOpen(),document.dispatchEvent(new CustomEvent(Hd))):p.onClose(),c==null||c(_)},caller:Al}),z=N.useMemo(()=>E?A.current?"delayed-open":"instant-open":"closed",[E]),T=N.useCallback(()=>{window.clearTimeout(w.current),w.current=0,A.current=!1,R(!0)},[R]),j=N.useCallback(()=>{window.clearTimeout(w.current),w.current=0,R(!1)},[R]),k=N.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{A.current=!0,R(!0),w.current=0},C)},[C,R]);return N.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),m.jsx(ff,{...g,children:m.jsx(wj,{scope:a,contentId:S,open:E,stateAttribute:z,trigger:x,onTriggerChange:v,onTriggerEnter:N.useCallback(()=>{p.isOpenDelayedRef.current?k():T()},[p.isOpenDelayedRef,k,T]),onTriggerLeave:N.useCallback(()=>{y?j():(window.clearTimeout(w.current),w.current=0)},[j,y]),onOpen:T,onClose:j,disableHoverableContent:y,children:l})})};jb.displayName=Al;var Yd="TooltipTrigger",Eb=N.forwardRef((t,a)=>{const{__scopeTooltip:l,...o}=t,s=Ol(Yd,l),c=wf(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:Ie(t.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:Ie(t.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:Ie(t.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:Ie(t.onFocus,()=>{g.current||s.onOpen()}),onBlur:Ie(t.onBlur,s.onClose),onClick:Ie(t.onClick,s.onClose)})})});Eb.displayName=Yd;var Sf="TooltipPortal",[Sj,Nj]=Xs(Sf,{forceMount:void 0}),Ab=t=>{const{__scopeTooltip:a,forceMount:l,children:o,container:s}=t,c=Ol(Sf,a);return m.jsx(Sj,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};Ab.displayName=Sf;var po="TooltipContent",Tb=N.forwardRef((t,a)=>{const l=Nj(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(zb,{side:s,...c,ref:a}):m.jsx(Cj,{side:s,...c,ref:a})})}),Cj=N.forwardRef((t,a)=>{const l=Ol(po,t.__scopeTooltip),o=wf(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,S=N.useCallback(()=>{f(null),v(!1)},[v]),w=N.useCallback((y,C)=>{const A=y.currentTarget,E={x:y.clientX,y:y.clientY},R=Aj(E,A.getBoundingClientRect()),z=Tj(E,R),T=zj(C.getBoundingClientRect()),j=Oj([...z,...T]);f(j),v(!0)},[v]);return N.useEffect(()=>()=>S(),[S]),N.useEffect(()=>{if(p&&x){const y=A=>w(A,x),C=A=>w(A,p);return p.addEventListener("pointerleave",y),x.addEventListener("pointerleave",C),()=>{p.removeEventListener("pointerleave",y),x.removeEventListener("pointerleave",C)}}},[p,x,w,S]),N.useEffect(()=>{if(d){const y=C=>{const A=C.target,E={x:C.clientX,y:C.clientY},R=(p==null?void 0:p.contains(A))||(x==null?void 0:x.contains(A)),z=!Rj(E,d);R?S():z&&(S(),g())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[p,x,d,g,S]),m.jsx(zb,{...t,ref:c})}),[Mj,jj]=Xs(Al,{isInside:!1}),Ej=ZS("TooltipContent"),zb=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=S=>{S.target instanceof Node&&S.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(hf,{"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(Ej,{children:o}),m.jsx(Mj,{scope:l,isInside:!0,children:m.jsx(vj,{id:p.contentId,role:"tooltip",children:s||o})})]})})});Tb.displayName=po;var Rb="TooltipArrow",Ob=N.forwardRef((t,a)=>{const{__scopeTooltip:l,...o}=t,s=qs(l);return jj(Rb,l).isInside?null:m.jsx(mf,{...s,...o,ref:a})});Ob.displayName=Rb;function Aj(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 Tj(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 zj(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 Rj(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,S=p.y;x>o!=S>o&&l<(v-g)*(o-x)/(S-x)+g&&(s=!s)}return s}function Oj(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),kj(a)}function kj(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 _j=Mb,Dj=jb,$j=Eb,Lj=Ab,Uj=Tb,Bj=Ob;function Tx({delayDuration:t=0,...a}){return m.jsx(_j,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function vl({...t}){return m.jsx(Dj,{"data-slot":"tooltip",...t})}function bl({...t}){return m.jsx($j,{"data-slot":"tooltip-trigger",...t})}function yl({className:t,sideOffset:a=0,children:l,...o}){return m.jsx(Lj,{children:m.jsxs(Uj,{"data-slot":"tooltip-content",sideOffset:a,className:Rt("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(Bj,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}const Hj=wv("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?Sv:"button";return m.jsx(d,{ref:c,"data-slot":"button","data-variant":a,"data-size":l,className:Rt(Hj({variant:a,size:l,className:t})),...s})});gn.displayName="Button";var Yj=N.createContext(void 0);function Ij(t){const a=N.useContext(Yj);return t||a||"ltr"}function Gj(t,[a,l]){return Math.min(l,Math.max(a,t))}function Vj(t,a){return N.useReducer((l,o)=>a[l][o]??l,t)}var Nf="ScrollArea",[kb]=Rl(Nf),[Xj,xn]=kb(Nf),_b=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,S]=N.useState(null),[w,y]=N.useState(null),[C,A]=N.useState(null),[E,R]=N.useState(0),[z,T]=N.useState(0),[j,k]=N.useState(!1),[_,I]=N.useState(!1),Z=Tt(a,p),te=Ij(s);return m.jsx(Xj,{scope:l,type:o,dir:te,scrollHideDelay:c,scrollArea:f,viewport:g,onViewportChange:x,content:v,onContentChange:S,scrollbarX:w,onScrollbarXChange:y,scrollbarXEnabled:j,onScrollbarXEnabledChange:k,scrollbarY:C,onScrollbarYChange:A,scrollbarYEnabled:_,onScrollbarYEnabledChange:I,onCornerWidthChange:R,onCornerHeightChange:T,children:m.jsx(St.div,{dir:te,...d,ref:Z,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":z+"px",...t.style}})})});_b.displayName=Nf;var Db="ScrollAreaViewport",$b=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,children:o,nonce:s,...c}=t,d=xn(Db,l),f=N.useRef(null),p=Tt(a,f,d.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx(qj,{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})})]})});$b.displayName=Db;var qj=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",Lb=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(Pj,{...o,ref:a,forceMount:l}):s.type==="scroll"?m.jsx(Qj,{...o,ref:a,forceMount:l}):s.type==="auto"?m.jsx(Ub,{...o,ref:a,forceMount:l}):s.type==="always"?m.jsx(Cf,{...o,ref:a,"data-state":"visible"}):null});Lb.displayName=$n;var Pj=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(Ub,{"data-state":c?"visible":"hidden",...o,ref:a})})}),Qj=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]=Vj("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 S=()=>{const w=g[x];v!==w&&(p("SCROLL"),d()),v=w};return g.addEventListener("scroll",S),()=>g.removeEventListener("scroll",S)}},[s.viewport,c,p,d]),m.jsx(wn,{present:l||f!=="hidden",children:m.jsx(Cf,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:a,onPointerEnter:Ie(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:Ie(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),Ub=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(Cf,{"data-state":c?"visible":"hidden",...s,ref:a})})}),Cf=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=Gb(f.viewport,f.content),x={...o,sizes:f,onSizesChange:p,hasThumb:g>0&&g<1,onThumbChange:S=>c.current=S,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:S=>d.current=S};function v(S,w){return eE(S,d.current,f,w)}return l==="horizontal"?m.jsx(Zj,{...x,ref:a,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollLeft,w=zx(S,f,s.dir);c.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollLeft=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollLeft=v(S,s.dir))}}):l==="vertical"?m.jsx(Fj,{...x,ref:a,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollTop,w=zx(S,f);c.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollTop=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollTop=v(S))}}):null}),Zj=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(Hb,{"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 S=c.viewport.scrollLeft+x.deltaX;t.onWheelScroll(S),Xb(S,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)}})}})}),Fj=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(Hb,{"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 S=c.viewport.scrollTop+x.deltaY;t.onWheelScroll(S),Xb(S,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)}})}})}),[Wj,Bb]=kb($n),Hb=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,...S}=t,w=xn($n,l),[y,C]=N.useState(null),A=Tt(a,C),E=N.useRef(null),R=N.useRef(""),z=w.viewport,T=o.content-o.viewport,j=nn(x),k=nn(p),_=Qs(v,10);function I(Z){if(E.current){const te=Z.clientX-E.current.left,ee=Z.clientY-E.current.top;g({x:te,y:ee})}}return N.useEffect(()=>{const Z=te=>{const ee=te.target;(y==null?void 0:y.contains(ee))&&j(te,T)};return document.addEventListener("wheel",Z,{passive:!1}),()=>document.removeEventListener("wheel",Z,{passive:!1})},[z,y,T,j]),N.useEffect(k,[o,k]),go(y,_),go(w.content,_),m.jsx(Wj,{scope:l,scrollbar:y,hasThumb:s,onThumbChange:nn(c),onThumbPointerUp:nn(d),onThumbPositionChange:k,onThumbPointerDown:nn(f),children:m.jsx(St.div,{...S,ref:A,style:{position:"absolute",...S.style},onPointerDown:Ie(t.onPointerDown,Z=>{Z.button===0&&(Z.target.setPointerCapture(Z.pointerId),E.current=y.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),I(Z))}),onPointerMove:Ie(t.onPointerMove,I),onPointerUp:Ie(t.onPointerUp,Z=>{const te=Z.target;te.hasPointerCapture(Z.pointerId)&&te.releasePointerCapture(Z.pointerId),document.body.style.webkitUserSelect=R.current,w.viewport&&(w.viewport.style.scrollBehavior=""),E.current=null})})})}),As="ScrollAreaThumb",Yb=N.forwardRef((t,a)=>{const{forceMount:l,...o}=t,s=Bb(As,t.__scopeScrollArea);return m.jsx(wn,{present:l||s.hasThumb,children:m.jsx(Kj,{ref:a,...o})})}),Kj=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,style:o,...s}=t,c=xn(As,l),d=Bb(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 S=()=>{if(x(),!g.current){const w=tE(v,f);g.current=w,f()}};return f(),v.addEventListener("scroll",S),()=>v.removeEventListener("scroll",S)}},[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:Ie(t.onPointerDownCapture,v=>{const w=v.target.getBoundingClientRect(),y=v.clientX-w.left,C=v.clientY-w.top;d.onThumbPointerDown({x:y,y:C})}),onPointerUp:Ie(t.onPointerUp,d.onThumbPointerUp)})});Yb.displayName=As;var Mf="ScrollAreaCorner",Ib=N.forwardRef((t,a)=>{const l=xn(Mf,t.__scopeScrollArea),o=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&o?m.jsx(Jj,{...t,ref:a}):null});Ib.displayName=Mf;var Jj=N.forwardRef((t,a)=>{const{__scopeScrollArea:l,...o}=t,s=xn(Mf,l),[c,d]=N.useState(0),[f,p]=N.useState(0),g=!!(c&&f),{onCornerWidthChange:x,onCornerHeightChange:v}=s;return go(s.scrollbarX,()=>{var w;const S=((w=s.scrollbarX)==null?void 0:w.offsetHeight)||0;s.onCornerHeightChange(S),p(S)}),go(s.scrollbarY,()=>{var w;const S=((w=s.scrollbarY)==null?void 0:w.offsetWidth)||0;s.onCornerWidthChange(S),d(S)}),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 Gb(t,a){const l=t/a;return isNaN(l)?0:l}function Ps(t){const a=Gb(t.viewport,t.content),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=(t.scrollbar.size-l)*a;return Math.max(o,18)}function eE(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 Vb([p,g],v)(t)}function zx(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=Gj(t,p);return Vb([0,d],[0,f])(g)}function Vb(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 Xb(t,a){return t>0&&t<a}var tE=(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=nn(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=nn(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 nE=_b,iE=$b,aE=Ib;function Tl({className:t,children:a,...l}){return m.jsxs(nE,{"data-slot":"scroll-area",className:Rt("relative",t),...l,children:[m.jsx(iE,{"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(oE,{}),m.jsx(aE,{})]})}function oE({className:t,orientation:a="vertical",...l}){return m.jsx(Lb,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:Rt("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(Yb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function lE({className:t,type:a,...l}){return m.jsx("input",{type:a,"data-slot":"input",className:Rt("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 rE={frame:gM,group:vM,text:vb,rectangle:qM,ellipse:eM,image:mb,vector:DM,line:bf,section:Bd};function qb({type:t,className:a}){const l=rE[t]??rM;return m.jsx(l,{className:Rt("size-3.5 shrink-0",a)})}function sE(){const{selectedNodeId:t,searchQuery:a,selectNode:l,mod:o,hiddenNodeIds:s,toggleNodeVisibility:c}=Ze(qt(w=>({selectedNodeId:w.selectedNodeId,searchQuery:w.searchQuery,selectNode:w.selectNode,mod:w.getCurrentModule(),hiddenNodeIds:w.hiddenNodeIds,toggleNodeVisibility:w.toggleNodeVisibility}))),d=N.useRef(null),[f,p]=N.useState(()=>{const w=new Set,y=(C,A)=>{if(A<2){w.add(C);const E=o==null?void 0:o.nodes[C];if(E)for(const R of E.children)y(R,A+1)}};return o&&y(o.rootNodeId,0),w});N.useEffect(()=>{if(!t||!o)return;const w=new Set;let y=t;for(;y;){const C=o.nodes[y];if(!C)break;y=C.parentId,y&&w.add(y)}p(C=>{const A=new Set(C);return w.forEach(E=>A.add(E)),A}),requestAnimationFrame(()=>{var A;const C=(A=d.current)==null?void 0:A.querySelector(`[data-node-id="${t}"]`);C&&C.scrollIntoView({block:"nearest",behavior:"auto"})})},[t,o]);const g=N.useCallback((w,y)=>{y.stopPropagation(),p(C=>{const A=new Set(C);return A.has(w)?A.delete(w):A.add(w),A})},[]),x=N.useCallback(w=>l(w),[l]);if(!o)return null;const v=o.nodes[o.rootNodeId];if(!v)return null;const S=N.useMemo(()=>{if(!t||!o)return new Set;const w=o.nodes[t];if(!w||w.children.length===0)return new Set;const y=new Set,C=A=>{y.add(A);const E=o.nodes[A];if(E)for(const R of E.children)C(R)};for(const A of w.children)C(A);return y},[t,o]);return m.jsx("div",{ref:d,className:"py-0.5 min-w-0",children:m.jsx(Pb,{node:v,mod:o,depth:0,filter:a,selectedId:t,selectedDescendants:S,expandedNodes:f,hiddenNodeIds:s,onClick:x,onToggleExpand:g,onToggleVisibility:c})})}function Pb({node:t,mod:a,depth:l,filter:o,selectedId:s,selectedDescendants:c,expandedNodes:d,hiddenNodeIds:f,onClick:p,onToggleExpand:g,onToggleVisibility:x}){var T,j;const{t:v}=gt(),S=f.has(t.id),w=!o||t.name.toLowerCase().includes(o.toLowerCase())||t.type.includes(o.toLowerCase())||(((j=(T=t.text)==null?void 0:T.content)==null?void 0:j.toLowerCase().includes(o.toLowerCase()))??!1),y=t.children.map(k=>a.nodes[k]).filter(Boolean),C=y.length>0,A=d.has(t.id),E=A?y.map(k=>m.jsx(Pb,{node:k,mod:a,depth:l+1,filter:o,selectedId:s,selectedDescendants:c,expandedNodes:d,hiddenNodeIds:f,onClick:p,onToggleExpand:g,onToggleVisibility:x},k.id)):null;if(!w&&!y.length&&o)return null;const R=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:k=>{k.stopPropagation(),p(t.id)},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),p(t.id))},className:Rt("group flex items-center gap-1 w-full min-w-0 max-w-full text-left h-7 pr-1 text-xs cursor-pointer",R?"bg-sidebar-primary/15 text-sidebar-accent-foreground font-medium":z?"bg-sidebar-primary/8":"text-sidebar-foreground hover:bg-sidebar-accent/50",!w&&o&&"opacity-30",S&&"opacity-40"),style:{paddingLeft:l*12+4},children:[C?m.jsx("span",{onClick:k=>g(t.id,k),className:"w-4 h-4 flex items-center justify-center shrink-0 cursor-pointer hover:bg-muted rounded-sm",children:m.jsx(wo,{className:Rt("size-3 text-muted-foreground transition-transform duration-150",A&&"rotate-90")})}):m.jsx("span",{className:"w-4 h-4 shrink-0"}),m.jsx(qb,{type:t.type,className:Rt("size-3 shrink-0",R?"text-sidebar-primary":"text-muted-foreground")}),m.jsx("span",{className:Rt("truncate block flex-1 min-w-0 text-foreground",l===0&&"font-semibold"),style:{maxWidth:120},title:t.name,children:t.name}),m.jsx(Ue,{variant:"ghost",className:"text-[9px] h-3.5 px-1 text-muted-foreground font-normal shrink-0",children:t.type}),m.jsx("span",{onClick:k=>{k.stopPropagation(),x(t.id)},className:Rt("w-4 h-4 flex items-center justify-center shrink-0 rounded-sm transition-opacity",S?"opacity-100 text-muted-foreground":"opacity-0 group-hover:opacity-100 text-muted-foreground/60 hover:text-muted-foreground"),title:v(S?"viewer.node.show":"viewer.node.hide"),children:S?m.jsx(dM,{className:"size-3"}):m.jsx(hb,{className:"size-3"})})]}),E]})}function cE(){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=HS(l);return!g.moduleId&&d&&(g.moduleId=d.moduleId),YS(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(Ue,{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(IM,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3 text-muted-foreground/50 pointer-events-none"}),m.jsx(lE,{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(WM,{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(Ue,{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(sE,{})})]})}function uE(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 dE({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 Rx(t){return!t||!t.includes(" ")?t:t.replace(/ /g," ")}function fE({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=Jw(t),s=Kw(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:Rx(d.content)},f)):Rx(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 Qb=N.memo(function t({node:a,mod:l,isRoot:o=!1,screenshotMode:s=!1,coveredByAncestor:c}){var T,j,k;const{selectNode:d,findNodeAsset:f,displayMode:p,hiddenNodeIds:g}=Ze(qt(_=>({selectNode:_.selectNode,findNodeAsset:_.findNodeAsset,displayMode:_.displayMode,hiddenNodeIds:_.hiddenNodeIds}))),x=f(a.id),v=p==="map",S=(T=a.text)!=null&&T.content?`${a.name} - ${a.text.content}`:a.name,w=N.useMemo(()=>{var le;if(!((le=a.computed)!=null&&le.maskInfo))return{maskChildId:void 0,hideMaskChild:!1};const{childId:_,coversParent:I,shouldHide:Z,background:te}=a.computed.maskInfo;if(!I)return{maskChildId:_,hideMaskChild:!1};const ee={},K=f(_);return K&&(ee.WebkitMaskImage=`url(${K.url})`,ee.maskImage=`url(${K.url})`,ee.WebkitMaskSize="100% 100%",ee.maskSize="100% 100%",ee.WebkitMaskRepeat="no-repeat",ee.maskRepeat="no-repeat"),te&&Object.assign(ee,fs(te)),{maskChildId:_,hideMaskChild:Z,styleUpdates:ee}},[a,f]),y=N.useMemo(()=>Ww(a,o,!!x,c,l.nodes),[a,o,x,c,l]),C=w.styleUpdates?{...y,...w.styleUpdates}:y;if(!a.style.visible||g.has(a.id))return null;const A=!!x&&a.children.length===0,E=c||A,{maskChildId:R,hideMaskChild:z}=w;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&&((j=a.image)==null?void 0:j.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":((k=a.text)==null?void 0:k.content)??"","aria-label":`${S} - ${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:_=>{if(Ze.getState().isDragging){_.stopPropagation();return}_.stopPropagation();const I=uE(_.clientX,_.clientY);d(I??a.id)},children:[x&&!c&&m.jsx(dE,{asset:x,node:a}),Vw(a,!!x,c)&&m.jsx(fE,{node:a}),a.children.map(_=>l.nodes[_]).filter(Boolean).map(_=>m.jsx(t,{node:_,mod:l,coveredByAncestor:_.id===R?z:E},_.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 hE({mod:t}){const a=Ze(x=>x.selectedNodeId),l=a?t.nodes[a]:void 0,o=N.useMemo(()=>l?tv(l,t):[],[l,t]),s=N.useMemo(()=>l?Qd(l,t):null,[l,t]),c=N.useMemo(()=>l?hw(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(mE,{rect:d,padding:s}),c&&g&&m.jsx(pE,{nodeRect:d,parentRect:g,spacing:c}),f.map((x,v)=>{const S=t.nodes[x.to.id];if(!S)return null;const w=d,y=Sd(S,t);if(x.direction==="horizontal"){const k=w.x<y.x?w:y,_=w.x<y.x?y:w,I=k.x+k.w,Z=_.x,te=Math.max(w.y,y.y),ee=Math.min(w.y+w.h,y.y+y.h),K=(te+ee)/2;return m.jsxs("g",{children:[m.jsx("line",{x1:I,y1:K,x2:Z,y2:K,stroke:"#f43f5e",strokeWidth:1.5}),m.jsx("line",{x1:I,y1:K-8,x2:I,y2:K+8,stroke:"#f43f5e",strokeWidth:2}),m.jsx("line",{x1:Z,y1:K-8,x2:Z,y2:K+8,stroke:"#f43f5e",strokeWidth:2}),m.jsx(Ox,{x:(I+Z)/2,y:K-6,value:x.distance})]},`h-${v}`)}const C=w.y<y.y?w:y,A=w.y<y.y?y:w,E=C.y+C.h,R=A.y,z=Math.max(w.x,y.x),T=Math.min(w.x+w.w,y.x+y.w),j=(z+T)/2;return m.jsxs("g",{children:[m.jsx("line",{x1:j,y1:E,x2:j,y2:R,stroke:"#f43f5e",strokeWidth:1.5}),m.jsx("line",{x1:j-8,y1:E,x2:j+8,y2:E,stroke:"#f43f5e",strokeWidth:2}),m.jsx("line",{x1:j-8,y1:R,x2:j+8,y2:R,stroke:"#f43f5e",strokeWidth:2}),m.jsx(Ox,{x:j+6,y:(E+R)/2,value:x.distance})]},`v-${v}`)})]})}function Ox({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 mE({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(os,{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(os,{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(os,{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(os,{x:(s+c)/2,y:o-6,value:a.right})]},"pr"))}return m.jsx(m.Fragment,{children:l})}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:"#3b82f6",opacity:.88}),m.jsx("text",{x:t,y:a+4,textAnchor:"middle",fill:"#fff",fontSize:12,fontFamily:"monospace",fontWeight:700,children:l})]})}const Vt="#10b981";function pE({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:Vt,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:Vt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:s-4,y1:a.y,x2:s+4,y2:a.y,stroke:Vt,strokeWidth:1.5}),m.jsx("line",{x1:s-4,y1:t.y,x2:s+4,y2:t.y,stroke:Vt,strokeWidth:1.5}),m.jsx(ls,{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:Vt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:s-4,y1:c,x2:s+4,y2:c,stroke:Vt,strokeWidth:1.5}),m.jsx("line",{x1:s-4,y1:d,x2:s+4,y2:d,stroke:Vt,strokeWidth:1.5}),m.jsx(ls,{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:Vt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:a.x,y1:s-4,x2:a.x,y2:s+4,stroke:Vt,strokeWidth:1.5}),m.jsx("line",{x1:t.x,y1:s-4,x2:t.x,y2:s+4,stroke:Vt,strokeWidth:1.5}),m.jsx(ls,{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:Vt,strokeWidth:1,strokeDasharray:"4 2"}),m.jsx("line",{x1:c,y1:s-4,x2:c,y2:s+4,stroke:Vt,strokeWidth:1.5}),m.jsx("line",{x1:d,y1:s-4,x2:d,y2:s+4,stroke:Vt,strokeWidth:1.5}),m.jsx(ls,{x:(c+d)/2,y:s-6,value:l.right})]},"parent-right"))}return m.jsx(m.Fragment,{children:o})}function ls({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:Vt,opacity:.88}),m.jsx("text",{x:t,y:a+4,textAnchor:"middle",fill:"#fff",fontSize:12,fontFamily:"monospace",fontWeight:700,children:l})]})}function Zb(t,a){for(const l of t.querySelectorAll("[data-node-id]"))if(l.dataset.nodeId===a)return l;return null}function kx(t,a,l){const o=Zb(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 gE({containerRef:t,moduleData:a,zoom:l}){const{selectedNodeId:o,highlightedNodeIds:s,hiddenNodeIds:c,displayMode:d}=Ze(qt(A=>({selectedNodeId:A.selectedNodeId,highlightedNodeIds:A.highlightedNodeIds,hiddenNodeIds:A.hiddenNodeIds,displayMode:A.displayMode}))),[f,p]=N.useState(null),[g,x]=N.useState([]),v=d==="map";if(N.useLayoutEffect(()=>{const A=t.current;if(!A||v){p(null),x([]);return}const E=[...s].filter(k=>!c.has(k));let R=0;const z=()=>{R=0,p(o&&!c.has(o)?kx(A,o,l):null),x(E.flatMap(k=>{const _=kx(A,k,l);return _?[_]:[]}))},T=()=>{R||(R=window.requestAnimationFrame(z))};z(),window.addEventListener("resize",T);const j=typeof ResizeObserver>"u"?null:new ResizeObserver(T);j==null||j.observe(A);for(const k of[o,...E]){if(!k)continue;const _=Zb(A,k);_&&(j==null||j.observe(_))}return()=>{R&&window.cancelAnimationFrame(R),window.removeEventListener("resize",T),j==null||j.disconnect()}},[t,c,s,v,a,o,l]),!f&&g.length===0)return null;const S=Math.max(l,1e-4),w=2/S,y=1/S,C=(A,E,R)=>m.jsx("rect",{x:A.x-y,y:A.y-y,width:A.width+y*2,height:A.height+y*2,fill:"none",stroke:E,strokeWidth:w},R);return m.jsxs("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%",zIndex:1e4,overflow:"visible"},children:[g.map(A=>C(A,"rgba(234, 88, 12, 0.9)",`hl-${A.id}`)),f&&C(f,"#2563eb","selected")]})}const At=22,Fb=8,Wb=7.5,uo=3,xE=100,vE="#ff4800",bE="#ff4800",Nd=20,yE=8,wE=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 Kb(t,a){return t.length>a?t.slice(0,a)+"…":t}function Jb(t){return t.length*Wb+Fb}function zs(t,a,l){return Math.max(a,Math.min(t,l))}function SE(t,a,l,o,s){if(!a)return[];const c=NE(t,a,l,o,s);return jE(c,o,s)}function NE(t,a,l,o,s){const c=[];for(const d of t){const f=jf(d.absoluteBbox,a,l);if(!CE(f,o,s))continue;const p=Kb(d.name,yE),g=`${d.id} · ${p}`,x=Jb(g),v=zs(f.x+f.width/2,0,o),S=zs(f.y+f.height/2,0,s),{idealX:w,idealY:y}=ME(v,S,x,o);c.push({nodeId:d.id,labelText:g,labelW:x,dotX:v,dotY:S,idealX:w,idealY:y})}return c.sort((d,f)=>d.idealY-f.idealY||d.idealX-f.idealX),c}function jf(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 CE(t,a,l){return!(t.x+t.width<0||t.x>a||t.y+t.height<0||t.y>l)}function ME(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 jE(t,a,l){const o=[],s=[];for(const c of t){const d=EE(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 EE(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=AE(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 AE(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 TE(t,a,l,o){return t<a?"left":a<t?"right":l<o/2?"left":"right"}function zE(t,a,l,o,s){if(!a)return new Map;const c=RE(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=jf(x.absoluteBbox,a,l),S=v.x+v.width/2,w=TE(g.left,g.right,S,o),y=OE(x,a,l,s,c,w,p);f.set(x.id,y),p.push({x:y.labelX,y:y.labelY,w:y.width,h:y.height});const{leftX:C}=ey(c,y.width),A=y.labelX<C+y.width?"left":"right";g[A]++}return f}function RE(t,a){return{left:t.panX,right:t.panX+a.width*t.zoom,top:t.panY}}function OE(t,a,l,o,s,c,d){const f=jf(t.absoluteBbox,a,l),p=Kb(t.name,wE),g=`${t.id} · ${p}`,x=Jb(g),{leftX:v,rightX:S}=ey(s,x),w=zs(f.y+f.height/2-At/2,s.top,o-At-10),{labelX:y,labelY:C}=kE(c==="left"?v:S,w,x,d,c,v,S),{anchorX:A,anchorY:E}=_E(f,s,o,y);return{nodeId:t.id,labelX:y,labelY:C,anchorX:A,anchorY:E,width:x,height:At,labelText:g}}function ey(t,a){return{leftX:t.left-a-40,rightX:t.right+40}}function kE(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 _E(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 DE({camera:t,mod:a,areaRef:l}){const{selectedNodeId:o,selectNode:s}=Ze(qt(S=>({selectedNodeId:S.selectedNodeId,selectNode:S.selectNode}))),{root:c,focusNode:d,directChildren:f}=N.useMemo(()=>{const S=a.nodes[a.rootNodeId],w=o??a.rootNodeId,y=a.nodes[w]??S,C=y?y.children.map(A=>a.nodes[A]).filter(A=>!!A&&A.style.visible):[];return{root:S,focusNode:y,directChildren:C}},[a.nodes,a.rootNodeId,o]),p=$E(l),g=LE(c,t,p.width),x=N.useMemo(()=>g==="tooltip"?SE(f,c==null?void 0:c.absoluteBbox,t,p.width,p.height):[],[g,f,c,t,p]),v=N.useMemo(()=>g==="line"?zE(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",{className:"absolute inset-0 pointer-events-none z-40",width:p.width,height:p.height,children:[m.jsx(UE,{focusNode:d,childrenCount:f.length}),g==="tooltip"&&m.jsx(BE,{tooltips:x,onSelectNode:s}),g==="line"&&m.jsx(HE,{childNodes:f,labelPlacements:v,onSelectNode:s})]})}function $E(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 LE(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)>=xE?"line":"tooltip"}function UE({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*Wb+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 BE({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+Fb,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 HE({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:bE,strokeWidth:"2"}),m.jsx("circle",{cx:s.anchorX,cy:s.anchorY,r:"4",fill:vE}),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 YE(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 IE=24;function ha(t,a){return Math.max(IE,t-a*2)}function GE(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 _x({screenshotMode:t=!1}={}){const{t:a}=gt(),{mod:l,selectNode:o,displayMode:s,fitTargetNodeId:c,setFitTargetNodeId:d,canvasBgColor:f,toggleCanvasBgColor:p}=Ze(qt(K=>({mod:K.getCurrentModule(),selectNode:K.selectNode,displayMode:K.displayMode,fitTargetNodeId:K.fitTargetNodeId,setFitTargetNodeId:K.setFitTargetNodeId,canvasBgColor:K.canvasBgColor,toggleCanvasBgColor:K.toggleCanvasBgColor}))),g=N.useRef(null),x=N.useRef(null),[v,S]=N.useState({zoom:1,panX:0,panY:0}),[w,y]=N.useState(!1),[C,A]=N.useState(!1),E=N.useRef({x:0,y:0}),R=N.useRef(s),z=N.useCallback(()=>{const K=g.current;if(!K||!l)return 1;const le=K.getBoundingClientRect(),oe=l.nodes[l.rootNodeId];if(!oe)return 1;const ie=40,L=ha(le.width,ie)/oe.bbox.width,q=ha(le.height,ie)/oe.bbox.height;return Math.min(L,q,2)},[l]),T=N.useCallback(()=>{const K=g.current;if(!K||!l)return!1;const le=K.getBoundingClientRect(),oe=l.nodes[l.rootNodeId];if(!oe)return!1;const ie=z(),L=oe.bbox.width,q=oe.bbox.height;return S({zoom:ie,panX:(le.width-L*ie)/2,panY:(le.height-q*ie)/2}),!0},[l,z]),j=N.useCallback(()=>{const K=g.current;if(!K||!l)return;const le=K.getBoundingClientRect(),oe=l.nodes[l.rootNodeId];if(!oe)return;const ie=40,L=Math.min(ha(le.width,ie)/oe.bbox.width,2),q=oe.bbox.width;S({zoom:L,panX:(le.width-q*L)/2,panY:ie})},[l]);N.useEffect(()=>{if(!c||!l||!w)return;if(s==="visual"){d(null);return}const K=l.nodes[c],le=g.current,oe=l.nodes[l.rootNodeId];!K||!le||!oe||(S(GE(le.getBoundingClientRect(),YE(K,l),oe)),d(null))},[c,l,w,s,d]),N.useEffect(()=>{R.current!=="visual"&&s==="visual"&&w&&T(),R.current=s},[s,w,T]);const k=N.useCallback((K,le,oe)=>{S(ie=>{const L=Math.max(.05,Math.min(10,ie.zoom*K)),q=L/ie.zoom;return{zoom:L,panX:le-(le-ie.panX)*q,panY:oe-(oe-ie.panY)*q}})},[]),_=N.useCallback(K=>{const le=g.current;if(!le)return;const oe=le.getBoundingClientRect();k(K,oe.width/2,oe.height/2)},[k]);N.useEffect(()=>{const K=g.current;if(!K)return;T()&&y(!0);const le=oe=>{if(oe.preventDefault(),oe.ctrlKey||oe.metaKey){const ie=K.getBoundingClientRect(),L=oe.clientX-ie.left,q=oe.clientY-ie.top,W=oe.deltaY>0?.92:1.08;k(W,L,q)}else S(ie=>({...ie,panX:ie.panX-oe.deltaX,panY:ie.panY-oe.deltaY}))};return K.addEventListener("wheel",le,{passive:!1}),()=>K.removeEventListener("wheel",le)},[T,k]);const I=N.useCallback(K=>{K.button===0&&(K.target.closest("[data-node-id]")||o(null),K.preventDefault(),A(!0),E.current={x:K.clientX,y:K.clientY})},[o]),Z=N.useCallback(()=>{const K=g.current;if(!K||!l)return;const le=K.getBoundingClientRect(),oe=l.nodes[l.rootNodeId];if(!oe)return;const ie=z(),L=.01;S(q=>{let W;if(ie>=1-L?W=(q.zoom>=ie-L,ie):q.zoom<ie-L?W=ie:q.zoom<1-L?W=1:W=ie,Math.abs(W-ie)<L){const P=oe.bbox.width,ne=oe.bbox.height;return{zoom:ie,panX:(le.width-P*ie)/2,panY:(le.height-ne*ie)/2}}const ge=le.width/2,J=le.height/2,D=W/q.zoom;return{zoom:W,panX:ge-(ge-q.panX)*D,panY:J-(J-q.panY)*D}})},[l,z]);N.useEffect(()=>{if(!C)return;const K=oe=>{const ie=oe.clientX-E.current.x,L=oe.clientY-E.current.y;(Math.abs(ie)>3||Math.abs(L)>3)&&Ze.getState().setIsDragging(!0),S(q=>({...q,panX:q.panX+ie,panY:q.panY+L})),E.current={x:oe.clientX,y:oe.clientY}},le=()=>{A(!1),requestAnimationFrame(()=>{Ze.getState().setIsDragging(!1)})};return window.addEventListener("mousemove",K),window.addEventListener("mouseup",le),()=>{window.removeEventListener("mousemove",K),window.removeEventListener("mouseup",le)}},[C]);const te=f==="dark"?"bg-[#0d0d0d]":"bg-white";if(!l)return m.jsx("main",{id:"canvas",className:te});const ee=l.nodes[l.rootNodeId];return ee?m.jsxs("main",{id:"canvas",ref:g,className:Rt("relative overflow-hidden",te,C?"cursor-grabbing":"cursor-grab"),onMouseDown:I,onDoubleClick:Z,children:[m.jsxs("div",{ref:x,className:t?"will-change-transform":"will-change-transform transition-opacity duration-200",style:{width:ee.bbox.width,height:ee.bbox.height,position:"relative",transform:`translate(${v.panX}px, ${v.panY}px) scale(${v.zoom})`,transformOrigin:"0 0",opacity:t||w?1:0},children:[m.jsx(Qb,{node:ee,mod:l,isRoot:!0,screenshotMode:t,coveredByAncestor:!1}),!t&&m.jsx(gE,{containerRef:x,moduleData:l,zoom:v.zoom}),m.jsx(hE,{mod:l})]}),s==="map"&&m.jsx(DE,{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(QM,{className:"size-3"}):m.jsx(AM,{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:T,children:m.jsx(NM,{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:j,children:m.jsx(zM,{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:()=>_(1/1.25),children:m.jsx(bf,{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:()=>_(1.25),children:m.jsx(xb,{className:"size-3"})})}),m.jsx(yl,{side:"top",children:a("viewer.canvas.zoomIn")})]})]})]}):m.jsx("main",{id:"canvas",className:te})}const VE="0.0.2",Dx="/mcp",$x="2025-06-18",Lx=-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 XE{constructor(){_i(this,"requestId",0);_i(this,"sessionId",null);_i(this,"initialized",!1);_i(this,"negotiatedProtocolVersion",$x);_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=eA(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(Dx,{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,Lx,"SESSION_EXPIRED")}async initialize(){const a=await this.request("initialize",{protocolVersion:$x,capabilities:{},clientInfo:{name:"tarot-pixel-view",version:VE}});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===Lx?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(Dx,{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 XE;typeof window<"u"&&window.addEventListener("pagehide",()=>Ln.close());function Ef(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 qE(t,a){const l=await Ln.callTool("design_get_data",{designId:t},a);return Ef(l,"design_get_data")}async function PE(t,a){const l=await Ln.callTool("design_get_snapshot",{designId:t},a),o=Ef(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 QE(t,a){const l=await Ln.callTool("design_get_raw",{designId:t},a);return Ef(l,"design_get_raw")}async function ZE(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 JT(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"||!FE(o.bbox)||!WE(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 FE(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 WE(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 ez(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 tz(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 KE(t){const a=await Ln.callTool("font_registry_get",{},t);return Array.isArray(a.fonts)?a.fonts:[]}async function JE(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 eA(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 tA={".ttf":"truetype",".otf":"opentype",".woff":"woff",".woff2":"woff2",".eot":"embedded-opentype",".svg":"svg"},Ux="tarot-pixel-custom-fonts",nA=6e4;function iA(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 aA(t){const a=t.split("?")[0],l=a.slice(a.lastIndexOf(".")).toLowerCase();return tA[l]||"truetype"}const oA=()=>{};let Gd=oA,wl=null,Bx=0,Hx=!1,Af=new Map;async function lA(){return Hx&&Date.now()-Bx<nA?Gd:wl||(wl=(async()=>{const t=new Map,a=new Map,l=await KE();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=iA(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,Af=a,Bx=Date.now(),Hx=!0,o})().finally(()=>{wl=null}),wl)}function rA(t){return Af.has(t.trim().toLowerCase())}function Yx(t,a){const l=Af.get(t.trim().toLowerCase());return(l==null?void 0:l.has(`${a}`))??!1}function ty(){return Gd}function sA(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 ny(t){const a=await lA(),l=new Map;for(const d of t.modules)for(const f of Object.values(d.nodes))sA(f,l,a);const o=document.getElementById(Ux);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('${aA(p)}');
|
|
258
|
-
font-weight: ${f};
|
|
259
|
-
font-display: swap;
|
|
260
|
-
}`).join(`
|
|
261
|
-
|
|
262
|
-
`),c=document.createElement("style");c.id=Ux,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 cA="Separator",Ix="horizontal",uA=["horizontal","vertical"],iy=N.forwardRef((t,a)=>{const{decorative:l,orientation:o=Ix,...s}=t,c=dA(o)?o:Ix,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})});iy.displayName=cA;function dA(t){return uA.includes(t)}var fA=iy;function bt({className:t,orientation:a="horizontal",decorative:l=!0,...o}){return m.jsx(fA,{"data-slot":"separator",decorative:l,orientation:a,className:Rt("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",t),...o})}function hA(){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(qt(S=>({designId:S.designId,setExportData:S.setExportData}))),v=N.useCallback(async()=>{d(!0),p(!1);try{if(!g)return;await JE(g);const S=await qE(g);if(await ny(S),_d(S,l.current),Ze.getState().designId!==g)return;x(S)}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(UM,{className:"size-3 mr-1"}),a("viewer.reload.action")]})]})]})}function mA(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 S=d.parentId?l.nodes[d.parentId]:void 0,w=c.parentId?a.nodes[c.parentId]:void 0;s.push({type:"reparented",label:o("viewer.transform.parentChanged"),detail:`${(S==null?void 0:S.name)??d.parentId??o("viewer.transform.root")} → ${(w==null?void 0:w.name)??c.parentId??o("viewer.transform.root")}`})}const f=new Set(d.children),p=new Set(c.children);for(const S of c.children)if(!f.has(S)){const w=a.nodes[S];w!=null&&w.isVirtual&&s.push({type:"added",label:o("viewer.transform.virtualChild",{name:w.name}),detail:o("viewer.transform.groupedDetail",{count:w.children.length,direction:((x=w.layout)==null?void 0:x.flexDirection)??"row"})})}for(const S of d.children)if(!p.has(S)){const w=l.nodes[S],y=a.nodes[S];y&&y.parentId!==t?s.push({type:"reparented",label:o("viewer.transform.moved",{name:(w==null?void 0:w.name)??S}),detail:o("viewer.transform.nowUnder",{name:((v=a.nodes[y.parentId??""])==null?void 0:v.name)??y.parentId??o("viewer.transform.root")})}):y||s.push({type:"removed",label:o("viewer.transform.flattened",{name:(w==null?void 0:w.name)??S})})}return s.length===0&&d.children.length===c.children.length&&d.children.some((w,y)=>c.children[y]!==w)&&s.push({type:"reordered",label:o("viewer.transform.reordered")}),s}function pA({nodeId:t,mod:a}){var w;const{t:l}=gt(),[o,s]=N.useState(!1),[c,d]=N.useState(null),[f,p]=N.useState(!1),g=Ze(y=>y.selectNode),x=Ze(y=>y.designId);N.useEffect(()=>{if(!o||c||!x)return;const y=new AbortController;return p(!1),QE(x,y.signal).then(C=>{y.signal.aborted||d(C)}).catch(()=>{y.signal.aborted||p(!0)}),()=>y.abort()},[x,o,c]);const v=N.useMemo(()=>{if(c)return c.modules.find(y=>y.moduleId===a.moduleId)},[c,a.moduleId]),S=N.useMemo(()=>o?mA(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&&S.length===0&&m.jsx("p",{className:"text-[10px] text-muted-foreground",children:l("viewer.transform.noChanges")}),S.map((y,C)=>m.jsxs("div",{className:`flex items-start gap-1.5 text-[11px] font-mono rounded px-1.5 py-0.5 ${y.type==="added"?"bg-emerald-50 text-emerald-700":y.type==="removed"?"bg-red-50 text-red-700":y.type==="reparented"?"bg-amber-50 text-amber-700":"bg-blue-50 text-blue-700"}`,children:[y.type==="added"&&m.jsx(xb,{className:"size-3 shrink-0 mt-0.5"}),y.type==="removed"&&m.jsx(bf,{className:"size-3 shrink-0 mt-0.5"}),y.type==="reparented"&&m.jsx(QC,{className:"size-3 shrink-0 mt-0.5"}),m.jsxs("div",{children:[m.jsx("p",{className:"leading-tight",children:y.label}),y.detail&&m.jsx("p",{className:"text-[10px] opacity-70",children:y.detail})]})]},C)),v&&!((w=a.nodes[t])!=null&&w.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(y=>{const C=v.nodes[y],A=!!a.nodes[y],E=A&&a.nodes[y].parentId!==t;return m.jsxs("button",{className:`block w-full text-left text-[10px] font-mono px-1 py-0.5 rounded transition-colors ${E?"text-amber-600 hover:bg-amber-50":A?"text-muted-foreground hover:bg-muted/50":"text-red-400 line-through"}`,onClick:()=>A&&g(y),disabled:!A,children:[(C==null?void 0:C.name)??y,E&&l("viewer.transform.movedSuffix"),!A&&l("viewer.transform.goneSuffix")]},y)})})]})]})]})}const gA={decorative:"detail.hints.role.decorative",text:"detail.hints.role.text",container:"detail.hints.role.container",interactive:"detail.hints.role.interactive"},xA={"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"},vA={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"},bA={"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"},yA={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(gA[a])}function ay(t,a){const l=xA[a];return l?t(l):a}function Ml(t,a){return`${t}.${a===1?"one":"other"}`}function wA(){const{t}=gt(),{selectedNodeId:a,displayMode:l,getCurrentModule:o}=Ze(qt(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(jA,{node:c,mod:s}):m.jsx(SA,{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 SA({node:t,mod:a}){var T;const{locale:l,t:o}=gt(),{findNodeAsset:s,getNodePath:c,selectNode:d,designId:f}=Ze(qt(j=>({findNodeAsset:j.findNodeAsset,getNodePath:j.getNodePath,selectNode:j.selectNode,designId:j.designId}))),p=N.useCallback(j=>{j.target.closest("[data-node-id]")||d(null)},[d]),g=s(t.id),x=c(t.id),v=N.useCallback(j=>s(j),[s]),S=N.useMemo(()=>mv(t,a,{findAsset:v,designId:f,fontUrlResolver:ty(),locale:l}),[t,a,v,f,l]),w=N.useMemo(()=>vs(t,g,l),[t,g,l]),y=t.layout??null,C=N.useMemo(()=>dv(t,a,l),[t,a,l]),A=N.useMemo(()=>tv(t,a),[t,a]),E=N.useMemo(()=>Qd(t,a),[t,a]),R=N.useMemo(()=>Uw(a),[a]),z=N.useMemo(()=>Hw(t.id,R),[t.id,R]);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(qb,{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(Ue,{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(bt,{}),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((j,k)=>m.jsxs("span",{className:"flex items-center gap-0.5",children:[k>0&&m.jsx(wo,{className:"size-2.5 text-muted-foreground/40 shrink-0"}),m.jsx("button",{className:j.id===t.id?"font-medium text-foreground":"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>d(j.id),children:j.name})]},j.id))})]})]}),m.jsx(bt,{}),w&&m.jsx(Sl,{id:"detail-css",title:o("detail.section.css"),icon:nM,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(AA,{text:w})}),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(w),children:m.jsx(yd,{className:"size-3"})})]})}),C&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),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 j=NA(t,C,o);navigator.clipboard.writeText(j)},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((j,k)=>m.jsx("p",{className:"text-[10px] text-muted-foreground",children:j},k))}),m.jsx("div",{className:"space-y-1.5",children:C.children.map(j=>{const k=s(j.nodeId),_=k&&j.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(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 shrink-0",children:j.strategy==="likely-decorative"?o("detail.composite.strategy.decorative"):j.strategy==="needs-review"?o("detail.composite.strategy.review"):j.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(j.nodeId),title:`${j.nodeId} (${j.name})`,children:[j.nodeId," (",j.name,")"]}),m.jsx("span",{className:"text-muted-foreground truncate shrink text-[9px]",title:j.reason,children:j.reason}),m.jsxs("span",{className:"text-muted-foreground shrink-0 text-[9px]",children:["(",Math.round(j.coverageRatio*100),"%)"]})]}),_&&j.strategy==="needs-review"&&m.jsx("p",{className:"text-[9px] text-muted-foreground ml-6 mt-0.5",children:o("detail.composite.assetSuggestion",{file:k.fileName,width:k.width,height:k.height})})]},j.nodeId)})}),m.jsx(MA,{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(bt,{}),m.jsxs(Nl,{id:"detail-layout",title:o("detail.section.layout"),children:[m.jsx(we,{label:o("detail.field.position"),value:`${Math.round(t.absoluteBbox.x)}, ${Math.round(t.absoluteBbox.y)}`}),m.jsx(we,{label:o("detail.field.size"),value:`${Math.round(t.absoluteBbox.width)} x ${Math.round(t.absoluteBbox.height)}`}),m.jsx(we,{label:o("detail.field.parent"),value:t.parentId?((T=a.nodes[t.parentId])==null?void 0:T.name)??t.parentId:o("detail.value.rootNode")}),m.jsx(we,{label:o("detail.field.children"),value:String(t.children.length)})]}),t.hints&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),m.jsx(Sl,{id:"detail-hints",title:o("detail.section.hints"),icon:Bd,defaultOpen:!0,children:m.jsx(CA,{hints:t.hints,node:t,mod:a,selectNode:d})})]}),(y==null?void 0:y.layoutSource)==="design-tool"&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),m.jsxs(Sl,{id:"detail-layout-infer",title:o("detail.section.designToolLayout"),icon:Bd,children:[m.jsx(we,{label:o("detail.field.display"),value:y.display}),y.flexDirection&&m.jsx(we,{label:o("detail.field.mainAxis"),value:y.flexDirection}),typeof y.gap=="number"&&y.gap>0&&m.jsx(we,{label:o("detail.field.gap"),value:`${y.gap}px`}),y.justifyContent&&m.jsx(we,{label:o("detail.field.mainAxisAlignment"),value:y.justifyContent}),y.alignItems&&m.jsx(we,{label:o("detail.field.crossAxisAlignment"),value:y.alignItems})]})]}),(A.length>0||E)&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),m.jsxs(Sl,{id:"detail-spacing",title:o("detail.section.spacing"),icon:HM,defaultOpen:!0,children:[E&&m.jsxs("div",{className:"mb-2",children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:o("detail.spacing.padding")}),E.uniform?m.jsx(we,{label:o("detail.spacing.uniform"),value:`${E.top}px`}):m.jsxs(m.Fragment,{children:[m.jsx(we,{label:o("detail.direction.top"),value:`${E.top}px`}),m.jsx(we,{label:o("detail.direction.right"),value:`${E.right}px`}),m.jsx(we,{label:o("detail.direction.bottom"),value:`${E.bottom}px`}),m.jsx(we,{label:o("detail.direction.left"),value:`${E.left}px`})]})]}),A.length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-[10px] text-muted-foreground mb-1",children:o("detail.spacing.siblings")}),A.slice(0,8).map((j,k)=>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(j.to.id),children:j.to.name}),m.jsx("span",{className:"text-muted-foreground",children:j.direction==="horizontal"?o("detail.direction.horizontal"):o("detail.direction.vertical")}),m.jsxs(Ue,{variant:"outline",className:"text-[10px] h-4 px-1 font-mono",children:[j.distance,"px"]})]},k)),A.length>8&&m.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:o(Ml("detail.more",A.length-8),{count:A.length-8})})]})]})]}),z.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),m.jsx(Sl,{id:"detail-component",title:o("detail.section.componentDetection"),icon:aM,children:z.map((j,k)=>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(Ue,{variant:"secondary",className:"text-[10px] h-4 px-1.5 font-mono",children:[j.instances.length,"x"]}),m.jsx("span",{className:"text-[11px] text-muted-foreground",children:o(Ml("detail.component.summary",j.childCount),{count:j.childCount,width:Math.round(j.avgSize.width),height:Math.round(j.avgSize.height)})})]}),m.jsxs("div",{className:"space-y-0.5",children:[j.instances.slice(0,5).map(_=>m.jsxs("button",{className:"block text-[11px] text-primary hover:underline truncate w-full text-left",onClick:()=>d(_.nodeId),children:[_.name,m.jsx("span",{className:"text-muted-foreground ml-1 font-mono",children:_.nodeId})]},_.nodeId)),j.instances.length>5&&m.jsx("p",{className:"text-[10px] text-muted-foreground",children:o(Ml("detail.more",j.instances.length-5),{count:j.instances.length-5})})]})]},k))})]}),m.jsx(bt,{}),m.jsxs(Nl,{id:"detail-style",title:o("detail.section.appearance"),children:[m.jsx(we,{label:o("detail.field.opacity"),value:String(t.style.opacity)}),t.style.borderRadius.some(j=>j>0)&&m.jsx(we,{label:o("detail.field.borderRadius"),value:t.style.borderRadius.join(", ")+"px"}),m.jsx(we,{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(we,{label:o("detail.field.blendMode"),value:t.style.blendMode}),t.style.fills.map((j,k)=>m.jsx(we,{label:o("detail.field.fill"),value:Ui(j,l)},`f${k}`)),t.style.strokes.map((j,k)=>m.jsx(we,{label:o("detail.field.stroke"),value:`${j.width}px ${j.color} (${j.position})`},`s${k}`)),t.style.shadows.map((j,k)=>m.jsx(we,{label:o("detail.field.shadow"),value:`${j.offsetX} ${j.offsetY} ${j.blur} ${j.color}`},`sh${k}`))]}),t.text&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),m.jsxs(Nl,{id:"detail-text",title:o("detail.section.text"),children:[m.jsx(we,{label:o("detail.field.content"),value:t.text.content}),m.jsx(we,{label:o("detail.field.font"),value:t.text.fontFamily}),m.jsx(we,{label:o("detail.field.fontSize"),value:`${t.text.fontSize}px`}),m.jsx(we,{label:o("detail.field.fontWeight"),value:String(t.text.fontWeight)}),m.jsx(we,{label:o("detail.field.color"),value:t.text.color}),m.jsx(we,{label:o("detail.field.lineHeight"),value:t.text.lineHeight?`${t.text.lineHeight}px`:o("detail.value.automatic")}),m.jsx(we,{label:o("detail.field.horizontalAlignment"),value:t.text.textAlign}),t.text.textAlignVertical&&t.text.textAlignVertical!=="top"&&m.jsx(we,{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((j,k)=>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:j.color}}),m.jsx("span",{className:"font-mono truncate",children:j.content}),m.jsx("span",{className:"text-muted-foreground shrink-0",children:j.color}),j.fontSize!==t.text.fontSize&&m.jsxs(Ue,{variant:"outline",className:"text-[10px] h-4 px-1 font-mono shrink-0",children:[j.fontSize,"px"]})]},k))})]})]})]}),g&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),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(we,{label:o("detail.field.file"),value:g.fileName}),m.jsx(we,{label:o("detail.field.size"),value:`${g.width} x ${g.height}`}),m.jsx(we,{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(cM,{className:"size-2.5 text-muted-foreground hover:text-foreground"})})]})]})]})]}),m.jsx(bt,{}),m.jsx(Nl,{id:"detail-context",title:o("detail.section.context"),children:m.jsx(oy,{text:S,selectNode:d})})]})})})}function NA(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 CA({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(Ue,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:Vd(o,t.role)}),t.isGhost&&m.jsx(Ue,{variant:"outline",className:"text-[10px] h-4 px-1",children:o("detail.hints.badge.ghost")}),t.isBackground&&m.jsx(Ue,{variant:"outline",className:"text-[10px] h-4 px-1",children:o("detail.hints.badge.background")}),t.isSeparator&&m.jsx(Ue,{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(Ue,{variant:"outline",className:"text-[10px] h-4 px-1 text-amber-600",children:o("detail.hints.badge.scrollCandidate")})]}),t.decorativeReason&&m.jsx(we,{label:o("detail.hints.field.decorativeReason"),value:ay(o,t.decorativeReason)}),t.containerType&&m.jsx(we,{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(we,{label:o("detail.hints.field.xNonOverlapping"),value:t.childrenAxis.xNonOverlapping?o("detail.value.yesHorizontal"):o("detail.value.no")}),m.jsx(we,{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(we,{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(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.top")}),t.childrenAlignment.bottomAligned&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.bottom")}),t.childrenAlignment.centerYAligned&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.centerY")}),t.childrenAlignment.leftAligned&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.left")}),t.childrenAlignment.rightAligned&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.alignment.right")}),t.childrenAlignment.centerXAligned&&m.jsx(Ue,{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(we,{label:o("detail.hints.field.widthUniform"),value:t.childrenSizeUniformity.widthUniform?o("detail.value.yes"):o("detail.value.no")}),m.jsx(we,{label:o("detail.hints.field.heightUniform"),value:t.childrenSizeUniformity.heightUniform?o("detail.value.yes"):o("detail.value.no")}),m.jsx(we,{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(we,{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(we,{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(Ue,{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(we,{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(we,{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(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1",children:o(`detail.hints.axis.${f.axis}`)}),f.spacing!==void 0&&m.jsxs(Ue,{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(we,{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(Ue,{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(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.fillWidth")}),t.constraint.fillsParentHeight&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.fillHeight")}),t.constraint.centeredX&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.centerX")}),t.constraint.centeredY&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.centerY")}),t.constraint.symmetricPaddingX&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.symmetricX")}),t.constraint.symmetricPaddingY&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.symmetricY")}),t.constraint.intrinsicSize&&m.jsx(Ue,{variant:"outline",className:"text-[9px] h-3.5 px-1 mr-1",children:o("detail.hints.constraint.intrinsic")}),t.constraint.paddingEstimate&&m.jsx(we,{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(vA[t.layoutPattern.type])})}),m.jsx("p",{className:"text-[9px] text-muted-foreground",children:t.layoutPattern.reason}),t.layoutPattern.columns&&t.layoutPattern.rows&&m.jsx(we,{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(bA[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(yA[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 we({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 oy({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 MA({node:t,mod:a}){var E;const{t:l}=gt(),o=`composite-${t.id}`,s=240,c=t.bbox.width,d=t.bbox.height,f=(E=t.computed)==null?void 0:E.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,S=x-p,w=v-g,y=Math.min(s/S,1),C=Math.ceil(S*y)+4,A=Math.ceil(w*y)+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:A},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(${y})`,transformOrigin:"0 0",marginLeft:-p*y+2,marginTop:-g*y+2,pointerEvents:"none"},children:m.jsx(Qb,{node:t,mod:a,isRoot:!0,coveredByAncestor:!1})})]})]})}function jA({node:t,mod:a}){var S;const{locale:l,t:o}=gt(),{findNodeAsset:s,selectNode:c,designId:d}=Ze(qt(w=>({findNodeAsset:w.findNodeAsset,selectNode:w.selectNode,designId:w.designId}))),f=s(t.id),p=N.useMemo(()=>vs(t,f,l),[t,f,l]),g=N.useCallback(w=>s(w),[s]),x=N.useMemo(()=>mv(t,a,{findAsset:g,designId:d,fontUrlResolver:ty(),locale:l}),[t,a,g,d,l]),v=N.useMemo(()=>{let w="";if(w+=`${o("detail.data.id")}: ${t.id}
|
|
283
|
-
`,w+=`${o("detail.data.name")}: ${t.name}
|
|
284
|
-
`,w+=`${o("detail.data.type")}: ${t.type}
|
|
285
|
-
`,w+=`${o("detail.data.sourceId")}: ${t.sourceId}
|
|
286
|
-
`,w+=`${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
|
-
`,w+=`${o("detail.data.parent")}: ${t.parentId??o("detail.data.root")}
|
|
288
|
-
`,w+=`${o("detail.data.children")}: ${t.children.length}
|
|
289
|
-
`,f&&(w+=`
|
|
290
|
-
${o("detail.data.asset")}: ${f.fileName} (${f.width}x${f.height} ${f.format})
|
|
291
|
-
`,w+=`${o("detail.data.assetUrl")}: ${f.url}
|
|
292
|
-
`),t.text&&(w+=`
|
|
293
|
-
${o("detail.data.text")}: "${t.text.content}"
|
|
294
|
-
`,w+=`${o("detail.data.font")}: ${t.text.fontFamily} ${t.text.fontSize}px w${t.text.fontWeight}
|
|
295
|
-
`,w+=`${o("detail.data.color")}: ${t.text.color}
|
|
296
|
-
`,w+=`${o("detail.data.alignment")}: ${t.text.textAlign}
|
|
297
|
-
`,t.text.textAlignVertical&&t.text.textAlignVertical!=="top"&&(w+=`${o("detail.data.verticalAlignment")}: ${t.text.textAlignVertical}
|
|
298
|
-
`),t.text.segments&&t.text.segments.length>1)){w+=`${o("detail.data.segmented",{count:t.text.segments.length})}
|
|
299
|
-
`;for(const y of t.text.segments){const C=[];y.color!==t.text.color&&C.push(`color: ${y.color}`),y.fontSize!==t.text.fontSize&&C.push(`${y.fontSize}px`),y.fontWeight!==t.text.fontWeight&&C.push(`w${y.fontWeight}`);const A=C.length>0?` [${C.join(", ")}]`:"";w+=` "${y.content.replace(/\n/g,"\\n")}"${A}
|
|
300
|
-
`}}w+=`
|
|
301
|
-
${o("detail.data.style")}:
|
|
302
|
-
`,w+=` ${o("detail.data.opacity")}: ${t.style.opacity}
|
|
303
|
-
`,w+=` ${o("detail.data.overflow")}: ${t.style.overflow}
|
|
304
|
-
`,t.style.borderRadius.some(y=>y>0)&&(w+=` ${o("detail.data.radius")}: ${t.style.borderRadius.join(" ")}px
|
|
305
|
-
`);for(const y of t.style.fills)w+=` ${o("detail.data.fill")}: ${Ui(y,l)}
|
|
306
|
-
`;for(const y of t.style.strokes)w+=` ${o("detail.data.stroke")}: ${y.width}px ${y.color} (${y.position})
|
|
307
|
-
`;for(const y of t.style.shadows)w+=` ${o("detail.data.shadow")}: ${y.offsetX}px ${y.offsetY}px ${y.blur}px ${y.color}
|
|
308
|
-
`;if(t.children.length>0){w+=`
|
|
309
|
-
${o("detail.data.childList")}:
|
|
310
|
-
`;for(const y of t.children){const C=a.nodes[y];C&&(w+=` ${C.id} (${C.name}) ${C.type} ${Math.round(C.bbox.width)}x${Math.round(C.bbox.height)}`,C.text&&(w+=` "${C.text.content}"`),w+=`
|
|
311
|
-
`)}}return w},[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(hA,{}),m.jsx(pA,{nodeId:t.id,mod:a}),m.jsx(bt,{}),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(bt,{}),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:["(",ay(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)})]})]}),((S=t.layout)==null?void 0:S.layoutSource)==="design-tool"&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),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(([,w])=>w!==void 0).map(([w,y])=>`${w}: ${y}`).join(`
|
|
312
|
-
`)})]})]}),m.jsx(bt,{}),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(bt,{}),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(oy,{text:x,selectNode:c})]}),t.children.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(bt,{}),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(w=>{var A,E,R,z;const y=a.nodes[w];if(!y)return null;const C=(A=y.hints)==null?void 0:A.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(w),children:[m.jsx("span",{className:"text-primary",children:y.id})," ",m.jsxs("span",{className:"text-muted-foreground",children:["(",y.name,")"]})," ",m.jsxs("span",{className:"text-muted-foreground",children:[y.type,C?` · ${Vd(o,C)}`:""]}),((E=y.hints)==null?void 0:E.isSeparator)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.separator")}),((R=y.hints)==null?void 0:R.isBackground)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.background")}),((z=y.hints)==null?void 0:z.isGhost)&&m.jsx("span",{className:"text-muted-foreground ml-1",children:o("detail.data.child.ghost")})]},w)})})]})]})]})})})}const EA=/url\(['"]?([^'")\s]+)['"]?\)/g;function AA({text:t}){const a=[];let l=0;for(const o of t.matchAll(EA)){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(gf,{openDelay:200,closeDelay:100,children:[m.jsx(xf,{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(vf,{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 TA=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 zA(t){return rA(t)?"custom":TA.has(t.trim().toLowerCase())?"builtin":"unknown"}function RA(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 OA(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 kA({mod:t}){const{t:a}=gt(),[l,o]=N.useState(!1),[s,c]=N.useState(null),d=N.useRef(null),f=N.useMemo(()=>RA(t),[t]),{setHighlightedNodes:p,clearHighlightedNodes:g}=Ze(qt(S=>({setHighlightedNodes:S.setHighlightedNodes,clearHighlightedNodes:S.clearHighlightedNodes}))),x=N.useCallback(S=>{if(s===S)c(null),g();else{c(S);const w=OA(t,S);p(w)}},[s,t,p,g]);if(N.useEffect(()=>{if(!l)return;const S=w=>{d.current&&!d.current.contains(w.target)&&(o(!1),c(null),g())};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[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 S=!l;o(S),S||(c(null),g())},children:[m.jsx(vb,{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(S=>{const w=zA(S.fontFamily),y=w==="custom"?S.fontWeights.filter(E=>!Yx(S.fontFamily,E)):[],C=y.length>0,A={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===S.fontFamily?"bg-primary/10":"hover:bg-muted/50"}`,onClick:()=>x(S.fontFamily),children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsx("span",{className:`text-xs font-medium truncate ${s===S.fontFamily?"text-primary":""}`,style:{fontFamily:`'${S.fontFamily}', sans-serif`},children:S.fontFamily}),m.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[m.jsx(Ue,{variant:"outline",className:`text-[10px] h-4 px-1.5 font-normal ${A[w].className}`,children:A[w].label}),m.jsx(Ue,{variant:"secondary",className:"text-[10px] h-4 px-1.5 font-normal text-muted-foreground",children:S.count})]})]}),m.jsxs("div",{className:"flex gap-x-3 text-[10px] text-muted-foreground",children:[m.jsxs("span",{children:[S.fontSizes.join(", "),"px"]}),m.jsx("span",{className:"flex items-center gap-1",children:S.fontWeights.map(E=>{const R=w==="custom"&&!Yx(S.fontFamily,E);return m.jsxs("span",{className:`inline-flex items-center gap-0.5 ${R?"text-amber-500":""}`,title:R?a("viewer.font.weightMissing",{weight:E}):void 0,children:["w",E,R&&m.jsx("span",{className:"text-[9px]",children:"⚠"})]},E)})})]}),C&&m.jsx("p",{className:"text-[10px] text-amber-500 leading-tight",children:a("viewer.font.weightsMissing",{weights:y.join(", w")})})]},S.fontFamily)})})]})]})}var rs=0,zn=null;function _A(){N.useEffect(()=>{zn||(zn={start:Gx(),end:Gx()});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),rs++,()=>{rs===1&&(zn==null||zn.start.remove(),zn==null||zn.end.remove(),zn=null),rs=Math.max(0,rs-1)}},[])}function Gx(){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",Vx={bubbles:!1,cancelable:!0},DA="FocusScope",ly=N.forwardRef((t,a)=>{const{loop:l=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...d}=t,[f,p]=N.useState(null),g=nn(s),x=nn(c),v=N.useRef(null),S=Tt(a,p),w=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(o){let C=function(z){if(w.paused||!f)return;const T=z.target;f.contains(T)?v.current=T:Li(v.current,{select:!0})},A=function(z){if(w.paused||!f)return;const T=z.relatedTarget;T!==null&&(f.contains(T)||Li(v.current,{select:!0}))},E=function(z){if(document.activeElement===document.body)for(const j of z)j.removedNodes.length>0&&Li(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",A);const R=new MutationObserver(E);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",A),R.disconnect()}}},[o,f,w.paused]),N.useEffect(()=>{if(f){qx.add(w);const C=document.activeElement;if(!f.contains(C)){const E=new CustomEvent(Md,Vx);f.addEventListener(Md,g),f.dispatchEvent(E),E.defaultPrevented||($A(YA(ry(f)),{select:!0}),document.activeElement===C&&Li(f))}return()=>{f.removeEventListener(Md,g),setTimeout(()=>{const E=new CustomEvent(jd,Vx);f.addEventListener(jd,x),f.dispatchEvent(E),E.defaultPrevented||Li(C??document.body,{select:!0}),f.removeEventListener(jd,x),qx.remove(w)},0)}}},[f,g,x,w]);const y=N.useCallback(C=>{if(!l&&!o||w.paused)return;const A=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,E=document.activeElement;if(A&&E){const R=C.currentTarget,[z,T]=LA(R);z&&T?!C.shiftKey&&E===T?(C.preventDefault(),l&&Li(z,{select:!0})):C.shiftKey&&E===z&&(C.preventDefault(),l&&Li(T,{select:!0})):E===R&&C.preventDefault()}},[l,o,w.paused]);return m.jsx(St.div,{tabIndex:-1,...d,ref:S,onKeyDown:y})});ly.displayName=DA;function $A(t,{select:a=!1}={}){const l=document.activeElement;for(const o of t)if(Li(o,{select:a}),document.activeElement!==l)return}function LA(t){const a=ry(t),l=Xx(a,t),o=Xx(a.reverse(),t);return[l,o]}function ry(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 Xx(t,a){const l=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(l?!o.checkVisibility({checkVisibilityCSS:!0}):UA(o,{upTo:a})))return o}function UA(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 BA(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&&BA(t)&&a&&t.select()}}var qx=HA();function HA(){let t=[];return{add(a){const l=t[0];a!==l&&(l==null||l.pause()),t=Px(t,a),t.unshift(a)},remove(a){var l;t=Px(t,a),(l=t[0])==null||l.resume()}}}function Px(t,a){const l=[...t],o=l.indexOf(a);return o!==-1&&l.splice(o,1),l}function YA(t){return t.filter(a=>a.tagName!=="A")}var IA=function(t){if(typeof document>"u")return null;var a=Array.isArray(t)?t[0]:t;return a.ownerDocument.body},oo=new WeakMap,ss=new WeakMap,cs={},Ed=0,sy=function(t){return t&&(t.host||sy(t.parentNode))},GA=function(t,a){return a.map(function(l){if(t.contains(l))return l;var o=sy(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})},VA=function(t,a,l,o){var s=GA(a,Array.isArray(t)?t:[t]);cs[l]||(cs[l]=new WeakMap);var c=cs[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(S){if(f.has(S))x(S);else try{var w=S.getAttribute(o),y=w!==null&&w!=="false",C=(oo.get(S)||0)+1,A=(c.get(S)||0)+1;oo.set(S,C),c.set(S,A),d.push(S),C===1&&y&&ss.set(S,!0),A===1&&S.setAttribute(l,"true"),y||S.setAttribute(o,"true")}catch(E){console.error("aria-hidden: cannot operate on ",S,E)}})};return x(a),f.clear(),Ed++,function(){d.forEach(function(v){var S=oo.get(v)-1,w=c.get(v)-1;oo.set(v,S),c.set(v,w),S||(ss.has(v)||v.removeAttribute(o),ss.delete(v)),w||v.removeAttribute(l)}),Ed--,Ed||(oo=new WeakMap,oo=new WeakMap,ss=new WeakMap,cs={})}},XA=function(t,a,l){l===void 0&&(l="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),s=IA(t);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),VA(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 cy(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 qA(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 gs="right-scroll-bar-position",xs="width-before-scroll-bar",PA="with-scroll-bars-hidden",QA="--removed-body-scroll-bar-size";function Ad(t,a){return typeof t=="function"?t(a):t&&(t.current=a),t}function ZA(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 FA=typeof window<"u"?N.useLayoutEffect:N.useEffect,Qx=new WeakMap;function WA(t,a){var l=ZA(null,function(o){return t.forEach(function(s){return Ad(s,o)})});return FA(function(){var o=Qx.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)})}Qx.set(l,t)},[t]),l}function KA(t){return t}function JA(t,a){a===void 0&&(a=KA);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 eT(t){t===void 0&&(t={});var a=JA(null);return a.options=Rn({async:!0,ssr:!1},t),a}var uy=function(t){var a=t.sideCar,l=cy(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))};uy.isSideCarExport=!0;function tT(t,a){return t.useMedium(a),uy}var dy=eT(),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,S=t.sideCar,w=t.noRelative,y=t.noIsolation,C=t.inert,A=t.allowPinchZoom,E=t.as,R=E===void 0?"div":E,z=t.gapMode,T=cy(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=S,k=WA([l,a]),_=Rn(Rn({},T),s);return N.createElement(N.Fragment,null,x&&N.createElement(j,{sideCar:dy,removeScrollBar:g,shards:v,noRelative:w,noIsolation:y,inert:C,setCallbacks:c,allowPinchZoom:!!A,lockRef:l,gapMode:z}),d?N.cloneElement(N.Children.only(f),Rn(Rn({},_),{ref:k})):N.createElement(R,Rn({},_,{className:p,ref:k}),f))});Zs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zs.classNames={fullWidth:xs,zeroRight:gs};var nT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iT(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var a=nT();return a&&t.setAttribute("nonce",a),t}function aT(t,a){t.styleSheet?t.styleSheet.cssText=a:t.appendChild(document.createTextNode(a))}function oT(t){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(t)}var lT=function(){var t=0,a=null;return{add:function(l){t==0&&(a=iT())&&(aT(a,l),oT(a)),t++},remove:function(){t--,!t&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},rT=function(){var t=lT();return function(a,l){N.useEffect(function(){return t.add(a),function(){t.remove()}},[a&&l])}},fy=function(){var t=rT(),a=function(l){var o=l.styles,s=l.dynamic;return t(o,s),null};return a},sT={left:0,top:0,right:0,gap:0},zd=function(t){return parseInt(t||"",10)||0},cT=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)]},uT=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return sT;var a=cT(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])}},dT=fy(),ho="data-scroll-locked",fT=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(PA,` {
|
|
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(gs,` {
|
|
331
|
-
right: `).concat(f,"px ").concat(o,`;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.`).concat(xs,` {
|
|
335
|
-
margin-right: `).concat(f,"px ").concat(o,`;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.`).concat(gs," .").concat(gs,` {
|
|
339
|
-
right: 0 `).concat(o,`;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.`).concat(xs," .").concat(xs,` {
|
|
343
|
-
margin-right: 0 `).concat(o,`;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
body[`).concat(ho,`] {
|
|
347
|
-
`).concat(QA,": ").concat(f,`px;
|
|
348
|
-
}
|
|
349
|
-
`)},Zx=function(){var t=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(t)?t:0},hT=function(){N.useEffect(function(){return document.body.setAttribute(ho,(Zx()+1).toString()),function(){var t=Zx()-1;t<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,t.toString())}},[])},mT=function(t){var a=t.noRelative,l=t.noImportant,o=t.gapMode,s=o===void 0?"margin":o;hT();var c=N.useMemo(function(){return uT(s)},[s]);return N.createElement(dT,{styles:fT(c,!a,s,l?"":"!important")})},Xd=!1;if(typeof window<"u")try{var us=Object.defineProperty({},"passive",{get:function(){return Xd=!0,!0}});window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{Xd=!1}var lo=Xd?{passive:!1}:!1,pT=function(t){return t.tagName==="TEXTAREA"},hy=function(t,a){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!pT(t)&&l[a]==="visible")},gT=function(t){return hy(t,"overflowY")},xT=function(t){return hy(t,"overflowX")},Fx=function(t,a){var l=a.ownerDocument,o=a;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var s=my(t,o);if(s){var c=py(t,o),d=c[1],f=c[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==l.body);return!1},vT=function(t){var a=t.scrollTop,l=t.scrollHeight,o=t.clientHeight;return[a,l,o]},bT=function(t){var a=t.scrollLeft,l=t.scrollWidth,o=t.clientWidth;return[a,l,o]},my=function(t,a){return t==="v"?gT(a):xT(a)},py=function(t,a){return t==="v"?vT(a):bT(a)},yT=function(t,a){return t==="h"&&a==="rtl"?-1:1},wT=function(t,a,l,o,s){var c=yT(t,window.getComputedStyle(a).direction),d=c*o,f=l.target,p=a.contains(f),g=!1,x=d>0,v=0,S=0;do{if(!f)break;var w=py(t,f),y=w[0],C=w[1],A=w[2],E=C-A-c*y;(y||E)&&my(t,f)&&(v+=E,S+=y);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!p&&f!==document.body||p&&(a.contains(f)||a===f));return(x&&Math.abs(v)<1||!x&&Math.abs(S)<1)&&(g=!0),g},ds=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Wx=function(t){return[t.deltaX,t.deltaY]},Kx=function(t){return t&&"current"in t?t.current:t},ST=function(t,a){return t[0]===a[0]&&t[1]===a[1]},NT=function(t){return`
|
|
350
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
351
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
352
|
-
`)},CT=0,ro=[];function MT(t){var a=N.useRef([]),l=N.useRef([0,0]),o=N.useRef(),s=N.useState(CT++)[0],c=N.useState(fy)[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=qA([t.lockRef.current],(t.shards||[]).map(Kx),!0).filter(Boolean);return C.forEach(function(A){return A.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var f=N.useCallback(function(C,A){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var E=ds(C),R=l.current,z="deltaX"in C?C.deltaX:R[0]-E[0],T="deltaY"in C?C.deltaY:R[1]-E[1],j,k=C.target,_=Math.abs(z)>Math.abs(T)?"h":"v";if("touches"in C&&_==="h"&&k.type==="range")return!1;var I=window.getSelection(),Z=I&&I.anchorNode,te=Z?Z===k||Z.contains(k):!1;if(te)return!1;var ee=Fx(_,k);if(!ee)return!0;if(ee?j=_:(j=_==="v"?"h":"v",ee=Fx(_,k)),!ee)return!1;if(!o.current&&"changedTouches"in C&&(z||T)&&(o.current=j),!j)return!0;var K=o.current||j;return wT(K,A,C,K==="h"?z:T)},[]),p=N.useCallback(function(C){var A=C;if(!(!ro.length||ro[ro.length-1]!==c)){var E="deltaY"in A?Wx(A):ds(A),R=a.current.filter(function(j){return j.name===A.type&&(j.target===A.target||A.target===j.shadowParent)&&ST(j.delta,E)})[0];if(R&&R.should){A.cancelable&&A.preventDefault();return}if(!R){var z=(d.current.shards||[]).map(Kx).filter(Boolean).filter(function(j){return j.contains(A.target)}),T=z.length>0?f(A,z[0]):!d.current.noIsolation;T&&A.cancelable&&A.preventDefault()}}},[]),g=N.useCallback(function(C,A,E,R){var z={name:C,delta:A,target:E,should:R,shadowParent:jT(E)};a.current.push(z),setTimeout(function(){a.current=a.current.filter(function(T){return T!==z})},1)},[]),x=N.useCallback(function(C){l.current=ds(C),o.current=void 0},[]),v=N.useCallback(function(C){g(C.type,Wx(C),C.target,f(C,t.lockRef.current))},[]),S=N.useCallback(function(C){g(C.type,ds(C),C.target,f(C,t.lockRef.current))},[]);N.useEffect(function(){return ro.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:S}),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 w=t.removeScrollBar,y=t.inert;return N.createElement(N.Fragment,null,y?N.createElement(c,{styles:NT(s)}):null,w?N.createElement(mT,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function jT(t){for(var a=null;t!==null;)t instanceof ShadowRoot&&(a=t.host,t=t.host),t=t.parentNode;return a}const ET=tT(dy,MT);var gy=N.forwardRef(function(t,a){return N.createElement(Zs,Rn({},t,{ref:a,sideCar:ET}))});gy.classNames=Zs.classNames;var Fs="Popover",[xy]=Rl(Fs,[yo]),kl=yo(),[AT,Gi]=xy(Fs),vy=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,S]=ef({prop:o,defaultProp:s??!1,onChange:c,caller:Fs});return m.jsx(ff,{...f,children:m.jsx(AT,{scope:a,contentId:Sb(),triggerRef:p,open:v,onOpenChange:S,onOpenToggle:N.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:g,onCustomAnchorAdd:N.useCallback(()=>x(!0),[]),onCustomAnchorRemove:N.useCallback(()=>x(!1),[]),modal:d,children:l})})};vy.displayName=Fs;var by="PopoverAnchor",TT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(by,l),c=kl(l),{onCustomAnchorAdd:d,onCustomAnchorRemove:f}=s;return N.useEffect(()=>(d(),()=>f()),[d,f]),m.jsx(Ls,{...c,...o,ref:a})});TT.displayName=by;var yy="PopoverTrigger",wy=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(yy,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":jy(s.open),...o,ref:d,onClick:Ie(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?f:m.jsx(Ls,{asChild:!0,...c,children:f})});wy.displayName=yy;var Tf="PopoverPortal",[zT,RT]=xy(Tf,{forceMount:void 0}),Sy=t=>{const{__scopePopover:a,forceMount:l,children:o,container:s}=t,c=Gi(Tf,a);return m.jsx(zT,{scope:a,forceMount:l,children:m.jsx(wn,{present:l||c.open,children:m.jsx(Us,{asChild:!0,container:s,children:o})})})};Sy.displayName=Tf;var xo="PopoverContent",Ny=N.forwardRef((t,a)=>{const l=RT(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(kT,{...s,ref:a}):m.jsx(_T,{...s,ref:a})})});Ny.displayName=xo;var OT=Wd("PopoverContent.RemoveScroll"),kT=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 XA(d)},[]),m.jsx(gy,{as:OT,allowPinchZoom:!0,children:m.jsx(Cy,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(t.onCloseAutoFocus,d=>{var f;d.preventDefault(),c.current||(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ie(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:Ie(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),_T=N.forwardRef((t,a)=>{const l=Gi(xo,t.__scopePopover),o=N.useRef(!1),s=N.useRef(!1);return m.jsx(Cy,{...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()}})}),Cy=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,S=Gi(xo,l),w=kl(l);return _A(),m.jsx(ly,{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:()=>S.onOpenChange(!1),deferPointerDownOutside:!0,children:m.jsx(hf,{"data-state":jy(S.open),role:"dialog",id:S.contentId,...w,...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)"}})})})}),My="PopoverClose",DT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=Gi(My,l);return m.jsx(St.button,{type:"button",...o,ref:a,onClick:Ie(t.onClick,()=>s.onOpenChange(!1))})});DT.displayName=My;var $T="PopoverArrow",LT=N.forwardRef((t,a)=>{const{__scopePopover:l,...o}=t,s=kl(l);return m.jsx(mf,{...s,...o,ref:a})});LT.displayName=$T;function jy(t){return t?"open":"closed"}var UT=vy,BT=wy,HT=Sy,YT=Ny;function Ey({...t}){return m.jsx(UT,{"data-slot":"popover",...t})}function Ay({...t}){return m.jsx(BT,{"data-slot":"popover-trigger",...t})}function Ty({className:t,align:a="start",sideOffset:l=6,...o}){return m.jsx(HT,{"data-slot":"popover-portal",children:m.jsx(YT,{"data-slot":"popover-content",align:a,sideOffset:l,className:Rt("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 IT({currentModuleId:t,currentModuleName:a}){const{t:l}=gt(),[o,s]=N.useState(!1),{modules:c,selectModule:d,exportedAt:f}=Ze(qt(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(Ey,{open:o,onOpenChange:s,children:[m.jsx(Ay,{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(Ty,{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 S,w;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:(S=g.preview)!=null&&S.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(FC,{className:"size-3.5 text-primary shrink-0"})]});return m.jsx("li",{children:(w=g.preview)!=null&&w.url?m.jsxs(gf,{openDelay:150,closeDelay:0,children:[m.jsx(xf,{asChild:!0,children:v}),m.jsx(vf,{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 GT=lj(window.location.search,window.location.hash);function VT(){const{locale:t,t:a}=gt(),{designId:l,displayMode:o,setDisplayMode:s,mod:c,source:d}=Ze(qt(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?GT?m.jsx(Tx,{children:m.jsx("div",{"data-view":"module","data-mode":o,className:"h-dvh",children:m.jsx(_x,{screenshotMode:!0})})}):m.jsx(Tx,{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(gb,{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(IT,{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(kA,{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(hb,{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(pb,{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(cE,{}),m.jsx(_x,{}),m.jsx(wA,{})]})]})}):null}function XT(t,a,l){if(t==="/")return null;const o=vv(t);return o&&a==="module"?{href:Es(`/design/${encodeURIComponent(o)}`,l),labelKey:"navigation.backToDesignOverview"}:{href:Es("/",l),labelKey:"navigation.backToDesignList"}}function qT(){const{locale:t,setLocale:a,t:l}=gt(),[o,s]=N.useState(!1),c=N.useRef(null),d=Ze(p=>p.currentView),f=XT(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(Ey,{open:o,onOpenChange:s,children:[m.jsx(Ay,{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(MM,{className:"size-3.5","aria-hidden":"true"})})}),m.jsx(Ty,{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(qC,{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(VM,{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 PT=2e3,QT=N.lazy(()=>sw(()=>import("./App-D5VfGkce.js"),__vite__mapDeps([0,1])).then(t=>({default:t.Dashboard})));function ZT(){const t=vv(window.location.pathname),a=yb(window.location.search),l=window.location.pathname==="/"?m.jsx(N.Suspense,{fallback:m.jsx(FT,{}),children:m.jsx(QT,{})}):m.jsx(WT,{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(qT,{})]})}function FT(){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 WT({routeDesignId:t}){const{locale:a,t:l}=gt(),{exportData:o,currentView:s,designId:c,initDesignId:d,setExportData:f,syncFromHash:p}=Ze(qt(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,S]=N.useState(!1),w=N.useRef(null),y=N.useRef(0),C=N.useRef(a),A=N.useRef(a);C.current=a,N.useEffect(()=>{t&&d(t)},[d,t]);const E=N.useCallback(async z=>{if(!c)return!1;const T=++y.current;try{const{data:j,revision:k}=await PE(c,z);return await ny(j),z!=null&&z.aborted||T!==y.current||(_d(j,C.current),z!=null&&z.aborted||T!==y.current)?!1:(f(j),w.current=k,x(null),S(!1),document.documentElement.setAttribute("data-loaded","true"),!0)}catch(j){return z!=null&&z.aborted||T!==y.current||x(j instanceof wt&&j.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"),w.current=null,E(z.signal),()=>z.abort()},[c,E]),N.useEffect(()=>{if(A.current===a)return;A.current=a;const z=Ze.getState().exportData;if(z)try{const T=structuredClone(z);if(_d(T,a),C.current!==a||Ze.getState().exportData!==z)return;f(T),S(!1)}catch{C.current===a&&S(!0)}},[a,f]);const R=N.useRef(E);return N.useEffect(()=>{R.current=E}),N.useEffect(()=>{if(!c)return;let z=!1;const T=async()=>{if(!z){z=!0;try{const k=await ZE(c),_=w.current;(_===null||k!==_)&&await R.current()}catch(k){k instanceof wt&&k.domainCode==="DESIGN_NOT_FOUND"&&(f(null),x("design-deleted"),document.documentElement.removeAttribute("data-loaded"))}finally{z=!1}}},j=window.setInterval(()=>void T(),PT);return()=>window.clearInterval(j)},[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 E(),children:l("common.retry")})]}):o?m.jsxs(m.Fragment,{children:[s==="module"?m.jsx(VT,{}):m.jsx(dj,{}),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")})})}ow.createRoot(document.getElementById("app")).render(m.jsx(N.StrictMode,{children:m.jsx(cj,{children:m.jsx(ZT,{})})}));export{wo as C,bb as D,cM as E,OM as P,$C as R,IM as S,LC as T,WM as X,yv as a,Rt as b,De as c,tz as d,so as e,UC as f,JT as g,BC as h,Gs as i,m as j,FC as k,ez as l,gb as m,N as r,Ex as t,gt as u,Es as w};
|