starry-slides 0.1.0
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/LICENSE +10 -0
- package/README.md +131 -0
- package/dist/assets/index---ub3Dty.css +1 -0
- package/dist/assets/index-7Xs_Dyp0.js +354 -0
- package/dist/assets/index-8ul7coaw.js +451 -0
- package/dist/assets/index-B4_bJa9t.js +412 -0
- package/dist/assets/index-B9p6L9Wx.js +324 -0
- package/dist/assets/index-BF-Vi1Nh.js +413 -0
- package/dist/assets/index-BKvVbgXz.css +1 -0
- package/dist/assets/index-BNZJ_Wz-.js +417 -0
- package/dist/assets/index-BO2gtiKn.js +413 -0
- package/dist/assets/index-BYpD8kgo.js +456 -0
- package/dist/assets/index-BaZRfz_9.css +1 -0
- package/dist/assets/index-BlsWm4PI.js +412 -0
- package/dist/assets/index-BnUIBFtw.js +393 -0
- package/dist/assets/index-BvhCbfCi.js +412 -0
- package/dist/assets/index-BxEkxfy1.js +412 -0
- package/dist/assets/index-BzrA7O0L.js +422 -0
- package/dist/assets/index-C0xGkdRg.js +413 -0
- package/dist/assets/index-C1Rjncf1.js +456 -0
- package/dist/assets/index-CCgb2gqc.js +413 -0
- package/dist/assets/index-CDFJQRFx.js +413 -0
- package/dist/assets/index-CEOai0RW.js +456 -0
- package/dist/assets/index-CG2uWTey.css +1 -0
- package/dist/assets/index-CLe3_iTu.js +412 -0
- package/dist/assets/index-CS_optob.js +324 -0
- package/dist/assets/index-CXgwXOZH.css +1 -0
- package/dist/assets/index-CcBvAcE2.js +408 -0
- package/dist/assets/index-CllmR_MT.js +408 -0
- package/dist/assets/index-CnMy6wxq.js +412 -0
- package/dist/assets/index-CoWNjYgb.js +422 -0
- package/dist/assets/index-CtfA3BPy.css +1 -0
- package/dist/assets/index-D-JiuJIv.js +324 -0
- package/dist/assets/index-D2uEYXyQ.css +1 -0
- package/dist/assets/index-D70beOHW.js +456 -0
- package/dist/assets/index-D8xuxnF1.js +456 -0
- package/dist/assets/index-DKAtkRd8.css +1 -0
- package/dist/assets/index-DU3l9_k0.css +1 -0
- package/dist/assets/index-DaLY98jk.js +456 -0
- package/dist/assets/index-DkNHJHQl.js +412 -0
- package/dist/assets/index-DmFnifK8.js +456 -0
- package/dist/assets/index-DndZR7Ds.css +1 -0
- package/dist/assets/index-DuRa7Y6g.js +324 -0
- package/dist/assets/index-EnDjTeHF.js +451 -0
- package/dist/assets/index-J3nQgjqJ.js +451 -0
- package/dist/assets/index-wD_iWTBn.js +413 -0
- package/dist/chunk-AK5J4CXH.js +1671 -0
- package/dist/chunk-ARFDESSF.js +1583 -0
- package/dist/chunk-DHWTBXGS.js +985 -0
- package/dist/chunk-FCRRFL7N.js +1571 -0
- package/dist/chunk-J7W4Y7WJ.js +1620 -0
- package/dist/chunk-OCJULB7Z.js +1140 -0
- package/dist/chunk-WCJWV5SO.js +36 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +1119 -0
- package/dist/cli/index.test.d.ts +1 -0
- package/dist/core/deck-slide-operations.d.ts +5 -0
- package/dist/core/generated-deck.d.ts +8 -0
- package/dist/core/generated-deck.test.d.ts +1 -0
- package/dist/core/group-operations.d.ts +24 -0
- package/dist/core/history.d.ts +20 -0
- package/dist/core/history.test.d.ts +1 -0
- package/dist/core/html-export.d.ts +20 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/layout.d.ts +36 -0
- package/dist/core/layout.test.d.ts +1 -0
- package/dist/core/pdf-export.d.ts +20 -0
- package/dist/core/presentation.d.ts +7 -0
- package/dist/core/slide-contract.d.ts +41 -0
- package/dist/core/slide-document.d.ts +5 -0
- package/dist/core/slide-document.test.d.ts +1 -0
- package/dist/core/slide-html-document.d.ts +3 -0
- package/dist/core/slide-operation-reducer.d.ts +4 -0
- package/dist/core/slide-operation-reducer.test.d.ts +1 -0
- package/dist/core/slide-operation-types.d.ts +123 -0
- package/dist/core/slide-operations-helpers.d.ts +14 -0
- package/dist/core/slide-operations.d.ts +5 -0
- package/dist/core/slide-operations.test.d.ts +1 -0
- package/dist/core/verify-deck.d.ts +48 -0
- package/dist/core/verify-deck.test.d.ts +1 -0
- package/dist/editor/app/App.d.ts +2 -0
- package/dist/editor/app/main.d.ts +1 -0
- package/dist/editor/app/use-slides-data.d.ts +14 -0
- package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
- package/dist/editor/components/color-picker.d.ts +10 -0
- package/dist/editor/components/context-menu.d.ts +26 -0
- package/dist/editor/components/editor-header.d.ts +18 -0
- package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
- package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
- package/dist/editor/components/floating-toolbar.d.ts +27 -0
- package/dist/editor/components/presenter-view.d.ts +13 -0
- package/dist/editor/components/slide-sidebar.d.ts +18 -0
- package/dist/editor/components/stage-canvas.d.ts +77 -0
- package/dist/editor/components/ui/accordion.d.ts +7 -0
- package/dist/editor/components/ui/button.d.ts +10 -0
- package/dist/editor/components/ui/context-menu.d.ts +25 -0
- package/dist/editor/components/ui/dialog.d.ts +10 -0
- package/dist/editor/components/ui/input.d.ts +3 -0
- package/dist/editor/components/ui/popover.d.ts +10 -0
- package/dist/editor/components/ui/scroll-area.d.ts +5 -0
- package/dist/editor/components/ui/select.d.ts +15 -0
- package/dist/editor/components/ui/separator.d.ts +4 -0
- package/dist/editor/components/ui/tabs.d.ts +11 -0
- package/dist/editor/components/ui/textarea.d.ts +3 -0
- package/dist/editor/components/ui/toggle-group.d.ts +9 -0
- package/dist/editor/components/ui/toggle.d.ts +9 -0
- package/dist/editor/components/ui/tooltip.d.ts +7 -0
- package/dist/editor/editor-operations.d.ts +15 -0
- package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
- package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
- package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
- package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
- package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
- package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
- package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
- package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
- package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
- package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
- package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
- package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
- package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
- package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
- package/dist/editor/hooks/use-slide-history.d.ts +17 -0
- package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
- package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
- package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
- package/dist/editor/index.d.ts +13 -0
- package/dist/editor/index.js +8260 -0
- package/dist/editor/lib/block-snap-constants.d.ts +8 -0
- package/dist/editor/lib/block-snap-guides.d.ts +6 -0
- package/dist/editor/lib/block-snap-targets.d.ts +13 -0
- package/dist/editor/lib/block-snap-types.d.ts +30 -0
- package/dist/editor/lib/block-snapping.d.ts +17 -0
- package/dist/editor/lib/collect-css-properties.d.ts +5 -0
- package/dist/editor/lib/element-tool-commit.d.ts +18 -0
- package/dist/editor/lib/element-tool-model.d.ts +16 -0
- package/dist/editor/lib/element-tool-types.d.ts +35 -0
- package/dist/editor/lib/element-tool-values.d.ts +23 -0
- package/dist/editor/lib/motion.d.ts +8 -0
- package/dist/editor/lib/selection-overlay.d.ts +4 -0
- package/dist/editor/lib/style-controls.d.ts +17 -0
- package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
- package/dist/editor/lib/utils.d.ts +3 -0
- package/dist/index.html +13 -0
- package/dist/node/deck-runtime-middleware.d.ts +8 -0
- package/dist/node/deck-source.d.ts +1 -0
- package/dist/node/html-export.d.ts +16 -0
- package/dist/node/open-browser.d.ts +1 -0
- package/dist/node/pdf-export.d.ts +20 -0
- package/dist/node/ports.d.ts +1 -0
- package/dist/node/view-renderer.d.ts +31 -0
- package/dist/runtime/deck-source.d.ts +1 -0
- package/dist/runtime/html-export.d.ts +16 -0
- package/dist/runtime/open-browser.d.ts +1 -0
- package/dist/runtime/pdf-export.d.ts +20 -0
- package/dist/runtime/ports.d.ts +1 -0
- package/dist/runtime/view-renderer.d.ts +31 -0
- package/dist/runtime/view-renderer.test.d.ts +1 -0
- package/dist/test/deck-fixtures.d.ts +14 -0
- package/package.json +94 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
function O2(n,o){for(var r=0;r<o.length;r++){const i=o[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function gm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ed={exports:{}},Jl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Yy;function D2(){if(Yy)return Jl;Yy=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(i,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var m in s)m!=="key"&&(u[m]=s[m])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:d,ref:s!==void 0?s:null,props:u}}return Jl.Fragment=o,Jl.jsx=r,Jl.jsxs=r,Jl}var qy;function j2(){return qy||(qy=1,ed.exports=D2()),ed.exports}var p=j2(),td={exports:{}},Le={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vy;function z2(){if(Vy)return Le;Vy=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function A(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,M={};function R(_,U,H){this.props=_,this.context=U,this.refs=M,this.updater=H||C}R.prototype.isReactComponent={},R.prototype.setState=function(_,U){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,U,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function j(){}j.prototype=R.prototype;function B(_,U,H){this.props=_,this.context=U,this.refs=M,this.updater=H||C}var Y=B.prototype=new j;Y.constructor=B,E(Y,R.prototype),Y.isPureReactComponent=!0;var ee=Array.isArray;function $(){}var V={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function W(_,U,H){var P=H.ref;return{$$typeof:n,type:_,key:U,ref:P!==void 0?P:null,props:H}}function ie(_,U){return W(_.type,U,_.props)}function fe(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function Q(_){var U={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(H){return U[H]})}var oe=/\/+/g;function de(_,U){return typeof _=="object"&&_!==null&&_.key!=null?Q(""+_.key):U.toString(36)}function pe(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then($,$):(_.status="pending",_.then(function(U){_.status==="pending"&&(_.status="fulfilled",_.value=U)},function(U){_.status==="pending"&&(_.status="rejected",_.reason=U)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function T(_,U,H,P,X){var te=typeof _;(te==="undefined"||te==="boolean")&&(_=null);var ne=!1;if(_===null)ne=!0;else switch(te){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(_.$$typeof){case n:case o:ne=!0;break;case x:return ne=_._init,T(ne(_._payload),U,H,P,X)}}if(ne)return X=X(_),ne=P===""?"."+de(_,0):P,ee(X)?(H="",ne!=null&&(H=ne.replace(oe,"$&/")+"/"),T(X,U,H,"",function(ye){return ye})):X!=null&&(fe(X)&&(X=ie(X,H+(X.key==null||_&&_.key===X.key?"":(""+X.key).replace(oe,"$&/")+"/")+ne)),U.push(X)),1;ne=0;var q=P===""?".":P+":";if(ee(_))for(var le=0;le<_.length;le++)P=_[le],te=q+de(P,le),ne+=T(P,U,H,te,X);else if(le=A(_),typeof le=="function")for(_=le.call(_),le=0;!(P=_.next()).done;)P=P.value,te=q+de(P,le++),ne+=T(P,U,H,te,X);else if(te==="object"){if(typeof _.then=="function")return T(pe(_),U,H,P,X);throw U=String(_),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ne}function O(_,U,H){if(_==null)return _;var P=[],X=0;return T(_,P,"","",function(te){return U.call(H,te,X++)}),P}function N(_){if(_._status===-1){var U=_._result;U=U(),U.then(function(H){(_._status===0||_._status===-1)&&(_._status=1,_._result=H)},function(H){(_._status===0||_._status===-1)&&(_._status=2,_._result=H)}),_._status===-1&&(_._status=0,_._result=U)}if(_._status===1)return _._result.default;throw _._result}var L=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},D={map:O,forEach:function(_,U,H){O(_,function(){U.apply(this,arguments)},H)},count:function(_){var U=0;return O(_,function(){U++}),U},toArray:function(_){return O(_,function(U){return U})||[]},only:function(_){if(!fe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Le.Activity=y,Le.Children=D,Le.Component=R,Le.Fragment=r,Le.Profiler=s,Le.PureComponent=B,Le.StrictMode=i,Le.Suspense=h,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Le.__COMPILER_RUNTIME={__proto__:null,c:function(_){return V.H.useMemoCache(_)}},Le.cache=function(_){return function(){return _.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(_,U,H){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var P=E({},_.props),X=_.key;if(U!=null)for(te in U.key!==void 0&&(X=""+U.key),U)!z.call(U,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&U.ref===void 0||(P[te]=U[te]);var te=arguments.length-2;if(te===1)P.children=H;else if(1<te){for(var ne=Array(te),q=0;q<te;q++)ne[q]=arguments[q+2];P.children=ne}return W(_.type,X,P)},Le.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:u,_context:_},_},Le.createElement=function(_,U,H){var P,X={},te=null;if(U!=null)for(P in U.key!==void 0&&(te=""+U.key),U)z.call(U,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(X[P]=U[P]);var ne=arguments.length-2;if(ne===1)X.children=H;else if(1<ne){for(var q=Array(ne),le=0;le<ne;le++)q[le]=arguments[le+2];X.children=q}if(_&&_.defaultProps)for(P in ne=_.defaultProps,ne)X[P]===void 0&&(X[P]=ne[P]);return W(_,te,X)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(_){return{$$typeof:m,render:_}},Le.isValidElement=fe,Le.lazy=function(_){return{$$typeof:x,_payload:{_status:-1,_result:_},_init:N}},Le.memo=function(_,U){return{$$typeof:g,type:_,compare:U===void 0?null:U}},Le.startTransition=function(_){var U=V.T,H={};V.T=H;try{var P=_(),X=V.S;X!==null&&X(H,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then($,L)}catch(te){L(te)}finally{U!==null&&H.types!==null&&(U.types=H.types),V.T=U}},Le.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Le.use=function(_){return V.H.use(_)},Le.useActionState=function(_,U,H){return V.H.useActionState(_,U,H)},Le.useCallback=function(_,U){return V.H.useCallback(_,U)},Le.useContext=function(_){return V.H.useContext(_)},Le.useDebugValue=function(){},Le.useDeferredValue=function(_,U){return V.H.useDeferredValue(_,U)},Le.useEffect=function(_,U){return V.H.useEffect(_,U)},Le.useEffectEvent=function(_){return V.H.useEffectEvent(_)},Le.useId=function(){return V.H.useId()},Le.useImperativeHandle=function(_,U,H){return V.H.useImperativeHandle(_,U,H)},Le.useInsertionEffect=function(_,U){return V.H.useInsertionEffect(_,U)},Le.useLayoutEffect=function(_,U){return V.H.useLayoutEffect(_,U)},Le.useMemo=function(_,U){return V.H.useMemo(_,U)},Le.useOptimistic=function(_,U){return V.H.useOptimistic(_,U)},Le.useReducer=function(_,U,H){return V.H.useReducer(_,U,H)},Le.useRef=function(_){return V.H.useRef(_)},Le.useState=function(_){return V.H.useState(_)},Le.useSyncExternalStore=function(_,U,H){return V.H.useSyncExternalStore(_,U,H)},Le.useTransition=function(){return V.H.useTransition()},Le.version="19.2.5",Le}var Xy;function ym(){return Xy||(Xy=1,td.exports=z2()),td.exports}var v=ym();const he=gm(v),Cv=O2({__proto__:null,default:he},[v]);var nd={exports:{}},ei={},ad={exports:{}},od={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Fy;function k2(){return Fy||(Fy=1,(function(n){function o(T,O){var N=T.length;T.push(O);e:for(;0<N;){var L=N-1>>>1,D=T[L];if(0<s(D,O))T[L]=O,T[N]=D,N=L;else break e}}function r(T){return T.length===0?null:T[0]}function i(T){if(T.length===0)return null;var O=T[0],N=T.pop();if(N!==O){T[0]=N;e:for(var L=0,D=T.length,_=D>>>1;L<_;){var U=2*(L+1)-1,H=T[U],P=U+1,X=T[P];if(0>s(H,N))P<D&&0>s(X,H)?(T[L]=X,T[P]=N,L=P):(T[L]=H,T[U]=N,L=U);else if(P<D&&0>s(X,N))T[L]=X,T[P]=N,L=P;else break e}}return O}function s(T,O){var N=T.sortIndex-O.sortIndex;return N!==0?N:T.id-O.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],x=1,y=null,S=3,A=!1,C=!1,E=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function Y(T){for(var O=r(g);O!==null;){if(O.callback===null)i(g);else if(O.startTime<=T)i(g),O.sortIndex=O.expirationTime,o(h,O);else break;O=r(g)}}function ee(T){if(E=!1,Y(T),!C)if(r(h)!==null)C=!0,$||($=!0,Q());else{var O=r(g);O!==null&&pe(ee,O.startTime-T)}}var $=!1,V=-1,z=5,W=-1;function ie(){return M?!0:!(n.unstable_now()-W<z)}function fe(){if(M=!1,$){var T=n.unstable_now();W=T;var O=!0;try{e:{C=!1,E&&(E=!1,j(V),V=-1),A=!0;var N=S;try{t:{for(Y(T),y=r(h);y!==null&&!(y.expirationTime>T&&ie());){var L=y.callback;if(typeof L=="function"){y.callback=null,S=y.priorityLevel;var D=L(y.expirationTime<=T);if(T=n.unstable_now(),typeof D=="function"){y.callback=D,Y(T),O=!0;break t}y===r(h)&&i(h),Y(T)}else i(h);y=r(h)}if(y!==null)O=!0;else{var _=r(g);_!==null&&pe(ee,_.startTime-T),O=!1}}break e}finally{y=null,S=N,A=!1}O=void 0}}finally{O?Q():$=!1}}}var Q;if(typeof B=="function")Q=function(){B(fe)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,de=oe.port2;oe.port1.onmessage=fe,Q=function(){de.postMessage(null)}}else Q=function(){R(fe,0)};function pe(T,O){V=R(function(){T(n.unstable_now())},O)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(T){T.callback=null},n.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<T?Math.floor(1e3/T):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(T){switch(S){case 1:case 2:case 3:var O=3;break;default:O=S}var N=S;S=O;try{return T()}finally{S=N}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(T,O){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var N=S;S=T;try{return O()}finally{S=N}},n.unstable_scheduleCallback=function(T,O,N){var L=n.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?L+N:L):N=L,T){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=N+D,T={id:x++,callback:O,priorityLevel:T,startTime:N,expirationTime:D,sortIndex:-1},N>L?(T.sortIndex=N,o(g,T),r(h)===null&&T===r(g)&&(E?(j(V),V=-1):E=!0,pe(ee,N-L))):(T.sortIndex=D,o(h,T),C||A||(C=!0,$||($=!0,Q()))),T},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(T){var O=S;return function(){var N=S;S=O;try{return T.apply(this,arguments)}finally{S=N}}}})(od)),od}var Ky;function L2(){return Ky||(Ky=1,ad.exports=k2()),ad.exports}var rd={exports:{}},Jt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Qy;function H2(){if(Qy)return Jt;Qy=1;var n=ym();function o(h){var g="https://react.dev/errors/"+h;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 #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(o(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,g,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Jt.createPortal=function(h,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(o(299));return u(h,g,null,x)},Jt.flushSync=function(h){var g=d.T,x=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=x,i.d.f()}},Jt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},Jt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Jt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var x=g.as,y=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,A=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:A}):x==="script"&&i.d.X(h,{crossOrigin:y,integrity:S,fetchPriority:A,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Jt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);i.d.M(h,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(h)},Jt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,y=m(x,g.crossOrigin);i.d.L(h,x,{crossOrigin:y,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})}},Jt.preloadModule=function(h,g){if(typeof h=="string")if(g){var x=m(g.as,g.crossOrigin);i.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(h)},Jt.requestFormReset=function(h){i.d.r(h)},Jt.unstable_batchedUpdates=function(h,g){return h(g)},Jt.useFormState=function(h,g,x){return d.H.useFormState(h,g,x)},Jt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Jt.version="19.2.5",Jt}var Zy;function Tv(){if(Zy)return rd.exports;Zy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),rd.exports=H2(),rd.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Wy;function B2(){if(Wy)return ei;Wy=1;var n=L2(),o=ym(),r=Tv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" 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 u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(u(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return h(c),e;if(f===l)return h(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==l.return)a=c,l=f;else{for(var b=!1,w=c.child;w;){if(w===a){b=!0,a=c,l=f;break}if(w===l){b=!0,l=c,a=f;break}w=w.sibling}if(!b){for(w=f.child;w;){if(w===a){b=!0,a=f,l=c;break}if(w===l){b=!0,l=f,a=c;break}w=w.sibling}if(!b)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),B=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Symbol.for("react.client.reference");function de(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case R:return"Profiler";case M:return"StrictMode";case ee:return"Suspense";case $:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case B:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case z:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var pe=Array.isArray,T=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N={pending:!1,data:null,method:null,action:null},L=[],D=-1;function _(e){return{current:e}}function U(e){0>D||(e.current=L[D],L[D]=null,D--)}function H(e,t){D++,L[D]=e.current,e.current=t}var P=_(null),X=_(null),te=_(null),ne=_(null);function q(e,t){switch(H(te,t),H(X,e),H(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?my(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=my(t),e=hy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(P),H(P,e)}function le(){U(P),U(X),U(te)}function ye(e){e.memoizedState!==null&&H(ne,e);var t=P.current,a=hy(t,e.type);t!==a&&(H(X,e),H(P,a))}function Ee(e){X.current===e&&(U(P),U(X)),ne.current===e&&(U(ne),Kl._currentValue=N)}var be,Re;function ke(e){if(be===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||"",Re=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+be+e+Re}var _e=!1;function rt(e,t){if(!e||_e)return"";_e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var Z=ae}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ae){Z=ae}e.call(ue.prototype)}}else{try{throw Error()}catch(ae){Z=ae}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&Z&&typeof ae.stack=="string")return[ae.stack,Z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],w=f[1];if(b&&w){var k=b.split(`
|
|
44
|
+
`),K=w.split(`
|
|
45
|
+
`);for(c=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;c<K.length&&!K[c].includes("DetermineComponentFrameRoot");)c++;if(l===k.length||c===K.length)for(l=k.length-1,c=K.length-1;1<=l&&0<=c&&k[l]!==K[c];)c--;for(;1<=l&&0<=c;l--,c--)if(k[l]!==K[c]){if(l!==1||c!==1)do if(l--,c--,0>c||k[l]!==K[c]){var re=`
|
|
46
|
+
`+k[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{_e=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ke(a):""}function dt(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return rt(e.type,!1);case 11:return rt(e.type.render,!1);case 1:return rt(e.type,!0);case 31:return ke("Activity");default:return""}}function xt(e){try{var t="",a=null;do t+=dt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var nt=Object.prototype.hasOwnProperty,bn=n.unstable_scheduleCallback,xn=n.unstable_cancelCallback,Tt=n.unstable_shouldYield,nn=n.unstable_requestPaint,St=n.unstable_now,qa=n.unstable_getCurrentPriorityLevel,Oe=n.unstable_ImmediatePriority,Je=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,an=n.unstable_LowPriority,It=n.unstable_IdlePriority,va=n.log,ln=n.unstable_setDisableYieldValue,sn=null,Lt=null;function Ht(e){if(typeof va=="function"&&ln(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(sn,e)}catch{}}var ut=Math.clz32?Math.clz32:Gt,Va=Math.log,ra=Math.LN2;function Gt(e){return e>>>=0,e===0?32:31-(Va(e)/ra|0)|0}var Fn=256,Sn=262144,wn=4194304;function kn(e){var t=e&42;if(t!==0)return t;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 je(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var w=l&134217727;return w!==0?(l=w&~f,l!==0?c=kn(l):(b&=w,b!==0?c=kn(b):a||(a=w&~e,a!==0&&(c=kn(a))))):(w=l&~f,w!==0?c=kn(w):b!==0?c=kn(b):a||(a=l&~e,a!==0&&(c=kn(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function mt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Pt(){var e=wn;return wn<<=1,(wn&62914560)===0&&(wn=4194304),e}function la(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qt(e,t,a,l,c,f){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,k=e.expirationTimes,K=e.hiddenUpdates;for(a=b&~a;0<a;){var re=31-ut(a),ue=1<<re;w[re]=0,k[re]=-1;var Z=K[re];if(Z!==null)for(K[re]=null,re=0;re<Z.length;re++){var ae=Z[re];ae!==null&&(ae.lane&=-536870913)}a&=~ue}l!==0&&ba(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function ba(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ut(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Zt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-ut(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Wt(e,t){var a=t&-t;return a=(a&42)!==0?1:J(a),(a&(e.suspendedLanes|t))!==0?0:a}function J(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 ce(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function me(){var e=O.p;return e!==0?e:(e=window.event,e===void 0?32:Hy(e.type))}function xe(e,t){var a=O.p;try{return O.p=e,t()}finally{O.p=a}}var Ue=Math.random().toString(36).slice(2),ze="__reactFiber$"+Ue,qe="__reactProps$"+Ue,Qe="__reactContainer$"+Ue,lt="__reactEvents$"+Ue,cn="__reactListeners$"+Ue,pt="__reactHandles$"+Ue,on="__reactResources$"+Ue,Yt="__reactMarker$"+Ue;function At(e){delete e[ze],delete e[qe],delete e[lt],delete e[cn],delete e[pt]}function un(e){var t=e[ze];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Qe]||a[ze]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Sy(e);e!==null;){if(a=e[ze])return a;e=Sy(e)}return t}e=a,a=e.parentNode}return null}function bt(e){if(e=e[ze]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function En(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Cn(e){var t=e[on];return t||(t=e[on]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Yt]=!0}var fr=new Set,Bo={};function Kn(e,t){Xa(e,t),Xa(e+"Capture",t)}function Xa(e,t){for(Bo[e]=t,e=0;e<t.length;e++)fr.add(t[e])}var wS=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]*$"),ah={},oh={};function ES(e){return nt.call(oh,e)?!0:nt.call(ah,e)?!1:wS.test(e)?oh[e]=!0:(ah[e]=!0,!1)}function Ti(e,t,a){if(ES(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ai(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function xa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CS(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vc(e){if(!e._valueTracker){var t=rh(e)?"checked":"value";e._valueTracker=CS(e,t,""+e[t])}}function lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=rh(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Mi(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 TS=/[\n"\\]/g;function Hn(e){return e.replace(TS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xc(e,t,a,l,c,f,b,w){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ln(t)):e.value!==""+Ln(t)&&(e.value=""+Ln(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Fc(e,b,Ln(t)):a!=null?Fc(e,b,Ln(a)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Ln(w):e.removeAttribute("name")}function ih(e,t,a,l,c,f,b,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Vc(e);return}a=a!=null?""+Ln(a):"",t=t!=null?""+Ln(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=w?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Vc(e)}function Fc(e,t,a){t==="number"&&Mi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dr(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ln(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function sh(e,t,a){if(t!=null&&(t=""+Ln(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ln(a):""}function ch(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(pe(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ln(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Vc(e)}function mr(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var AS=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 uh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||AS.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function fh(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&uh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&uh(e,f,t[f])}function Kc(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 MS=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"]]),_S=/^[\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 _i(e){return _S.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sa(){}var Qc=null;function Zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hr=null,pr=null;function dh(e){var t=bt(e);if(t&&(e=t.stateNode)){var a=e[qe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Hn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[qe]||null;if(!c)throw Error(i(90));Xc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&lh(l)}break e;case"textarea":sh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&dr(e,!!a.multiple,t,!1)}}}var Wc=!1;function mh(e,t,a){if(Wc)return e(t,a);Wc=!0;try{var l=e(t);return l}finally{if(Wc=!1,(hr!==null||pr!==null)&&(ps(),hr&&(t=hr,e=pr,pr=hr=null,dh(t),e)))for(t=0;t<e.length;t++)dh(e[t])}}function dl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[qe]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var wa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jc=!1;if(wa)try{var ml={};Object.defineProperty(ml,"passive",{get:function(){Jc=!0}}),window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch{Jc=!1}var Fa=null,eu=null,Ni=null;function hh(){if(Ni)return Ni;var e,t=eu,a=t.length,l,c="value"in Fa?Fa.value:Fa.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var b=a-e;for(l=1;l<=b&&t[a-l]===c[f-l];l++);return Ni=c.slice(e,1<l?1-l:void 0)}function Ri(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Oi(){return!0}function ph(){return!1}function fn(e){function t(a,l,c,f,b){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Oi:ph,this.isPropagationStopped=ph,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Oi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Oi)},persist:function(){},isPersistent:Oi}),t}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=fn(Uo),hl=y({},Uo,{view:0,detail:0}),NS=fn(hl),tu,nu,pl,ji=y({},hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,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!==pl&&(pl&&e.type==="mousemove"?(tu=e.screenX-pl.screenX,nu=e.screenY-pl.screenY):nu=tu=0,pl=e),tu)},movementY:function(e){return"movementY"in e?e.movementY:nu}}),gh=fn(ji),RS=y({},ji,{dataTransfer:0}),OS=fn(RS),DS=y({},hl,{relatedTarget:0}),au=fn(DS),jS=y({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),zS=fn(jS),kS=y({},Uo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),LS=fn(kS),HS=y({},Uo,{data:0}),yh=fn(HS),BS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},US={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"},IS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function PS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=IS[e])?!!t[e]:!1}function ou(){return PS}var $S=y({},hl,{key:function(e){if(e.key){var t=BS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?US[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(e){return e.type==="keypress"?Ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),GS=fn($S),YS=y({},ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vh=fn(YS),qS=y({},hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),VS=fn(qS),XS=y({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),FS=fn(XS),KS=y({},ji,{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}),QS=fn(KS),ZS=y({},Uo,{newState:0,oldState:0}),WS=fn(ZS),JS=[9,13,27,32],ru=wa&&"CompositionEvent"in window,gl=null;wa&&"documentMode"in document&&(gl=document.documentMode);var ew=wa&&"TextEvent"in window&&!gl,bh=wa&&(!ru||gl&&8<gl&&11>=gl),xh=" ",Sh=!1;function wh(e,t){switch(e){case"keyup":return JS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function tw(e,t){switch(e){case"compositionend":return Eh(t);case"keypress":return t.which!==32?null:(Sh=!0,xh);case"textInput":return e=t.data,e===xh&&Sh?null:e;default:return null}}function nw(e,t){if(gr)return e==="compositionend"||!ru&&wh(e,t)?(e=hh(),Ni=eu=Fa=null,gr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bh&&t.locale!=="ko"?null:t.data;default:return null}}var aw={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 Ch(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!aw[e.type]:t==="textarea"}function Th(e,t,a,l){hr?pr?pr.push(l):pr=[l]:hr=l,t=ws(t,"onChange"),0<t.length&&(a=new Di("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var yl=null,vl=null;function ow(e){iy(e,0)}function zi(e){var t=En(e);if(lh(t))return e}function Ah(e,t){if(e==="change")return t}var Mh=!1;if(wa){var lu;if(wa){var iu="oninput"in document;if(!iu){var _h=document.createElement("div");_h.setAttribute("oninput","return;"),iu=typeof _h.oninput=="function"}lu=iu}else lu=!1;Mh=lu&&(!document.documentMode||9<document.documentMode)}function Nh(){yl&&(yl.detachEvent("onpropertychange",Rh),vl=yl=null)}function Rh(e){if(e.propertyName==="value"&&zi(vl)){var t=[];Th(t,vl,e,Zc(e)),mh(ow,t)}}function rw(e,t,a){e==="focusin"?(Nh(),yl=t,vl=a,yl.attachEvent("onpropertychange",Rh)):e==="focusout"&&Nh()}function lw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zi(vl)}function iw(e,t){if(e==="click")return zi(t)}function sw(e,t){if(e==="input"||e==="change")return zi(t)}function cw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:cw;function bl(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!nt.call(t,c)||!Tn(e[c],t[c]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dh(e,t){var a=Oh(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Oh(a)}}function jh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Mi(e.document)}return t}function su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var uw=wa&&"documentMode"in document&&11>=document.documentMode,yr=null,cu=null,xl=null,uu=!1;function kh(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uu||yr==null||yr!==Mi(l)||(l=yr,"selectionStart"in l&&su(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),xl&&bl(xl,l)||(xl=l,l=ws(cu,"onSelect"),0<l.length&&(t=new Di("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=yr)))}function Io(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vr={animationend:Io("Animation","AnimationEnd"),animationiteration:Io("Animation","AnimationIteration"),animationstart:Io("Animation","AnimationStart"),transitionrun:Io("Transition","TransitionRun"),transitionstart:Io("Transition","TransitionStart"),transitioncancel:Io("Transition","TransitionCancel"),transitionend:Io("Transition","TransitionEnd")},fu={},Lh={};wa&&(Lh=document.createElement("div").style,"AnimationEvent"in window||(delete vr.animationend.animation,delete vr.animationiteration.animation,delete vr.animationstart.animation),"TransitionEvent"in window||delete vr.transitionend.transition);function Po(e){if(fu[e])return fu[e];if(!vr[e])return e;var t=vr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Lh)return fu[e]=t[a];return e}var Hh=Po("animationend"),Bh=Po("animationiteration"),Uh=Po("animationstart"),fw=Po("transitionrun"),dw=Po("transitionstart"),mw=Po("transitioncancel"),Ih=Po("transitionend"),Ph=new Map,du="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(" ");du.push("scrollEnd");function Qn(e,t){Ph.set(e,t),Kn(t,[e])}var ki=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],br=0,mu=0;function Li(){for(var e=br,t=mu=br=0;t<e;){var a=Bn[t];Bn[t++]=null;var l=Bn[t];Bn[t++]=null;var c=Bn[t];Bn[t++]=null;var f=Bn[t];if(Bn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&$h(a,c,f)}}function Hi(e,t,a,l){Bn[br++]=e,Bn[br++]=t,Bn[br++]=a,Bn[br++]=l,mu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function hu(e,t,a,l){return Hi(e,t,a,l),Bi(e)}function $o(e,t){return Hi(e,null,null,t),Bi(e)}function $h(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-ut(a),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),f):null}function Bi(e){if(50<$l)throw $l=0,Cf=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xr={};function hw(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,a,l){return new hw(e,t,a,l)}function pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var a=e.alternate;return a===null?(a=An(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Gh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ui(e,t,a,l,c,f){var b=0;if(l=e,typeof e=="function")pu(e)&&(b=1);else if(typeof e=="string")b=b2(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=An(31,a,t,c),e.elementType=W,e.lanes=f,e;case E:return Go(a.children,c,f,t);case M:b=8,c|=24;break;case R:return e=An(12,a,t,c|2),e.elementType=R,e.lanes=f,e;case ee:return e=An(13,a,t,c),e.elementType=ee,e.lanes=f,e;case $:return e=An(19,a,t,c),e.elementType=$,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:b=10;break e;case j:b=9;break e;case Y:b=11;break e;case V:b=14;break e;case z:b=16,l=null;break e}b=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=An(b,a,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function Go(e,t,a,l){return e=An(7,e,l,t),e.lanes=a,e}function gu(e,t,a){return e=An(6,e,null,t),e.lanes=a,e}function Yh(e){var t=An(18,null,null,0);return t.stateNode=e,t}function yu(e,t,a){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qh=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var a=qh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:xt(t)},qh.set(e,t),t)}return{value:e,source:t,stack:xt(t)}}var Sr=[],wr=0,Ii=null,Sl=0,In=[],Pn=0,Ka=null,ia=1,sa="";function Ca(e,t){Sr[wr++]=Sl,Sr[wr++]=Ii,Ii=e,Sl=t}function Vh(e,t,a){In[Pn++]=ia,In[Pn++]=sa,In[Pn++]=Ka,Ka=e;var l=ia;e=sa;var c=32-ut(l)-1;l&=~(1<<c),a+=1;var f=32-ut(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,ia=1<<32-ut(t)+c|a<<c|l,sa=f+e}else ia=1<<f|a<<c|l,sa=e}function vu(e){e.return!==null&&(Ca(e,1),Vh(e,1,0))}function bu(e){for(;e===Ii;)Ii=Sr[--wr],Sr[wr]=null,Sl=Sr[--wr],Sr[wr]=null;for(;e===Ka;)Ka=In[--Pn],In[Pn]=null,sa=In[--Pn],In[Pn]=null,ia=In[--Pn],In[Pn]=null}function Xh(e,t){In[Pn++]=ia,In[Pn++]=sa,In[Pn++]=Ka,ia=t.id,sa=t.overflow,Ka=e}var qt=null,gt=null,Fe=!1,Qa=null,$n=!1,xu=Error(i(519));function Za(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wl(Un(t,e)),xu}function Fh(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[ze]=e,t[qe]=l,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<Yl.length;a++)Ye(Yl[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),ih(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),ch(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||fy(t.textContent,a)?(l.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),l.onScroll!=null&&Ye("scroll",t),l.onScrollEnd!=null&&Ye("scrollend",t),l.onClick!=null&&(t.onclick=Sa),t=!0):t=!1,t||Za(e,!0)}function Kh(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:$n=!1;return;case 27:case 3:$n=!0;return;default:qt=qt.return}}function Er(e){if(e!==qt)return!1;if(!Fe)return Kh(e),Fe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Uf(e.type,e.memoizedProps)),a=!a),a&>&&Za(e),Kh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));gt=xy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));gt=xy(e)}else t===27?(t=gt,fo(e.type)?(e=Yf,Yf=null,gt=e):gt=t):gt=qt?Yn(e.stateNode.nextSibling):null;return!0}function Yo(){gt=qt=null,Fe=!1}function Su(){var e=Qa;return e!==null&&(pn===null?pn=e:pn.push.apply(pn,e),Qa=null),e}function wl(e){Qa===null?Qa=[e]:Qa.push(e)}var wu=_(null),qo=null,Ta=null;function Wa(e,t,a){H(wu,t._currentValue),t._currentValue=a}function Aa(e){e._currentValue=wu.current,U(wu)}function Eu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Cu(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=c;for(var k=0;k<t.length;k++)if(w.context===t[k]){f.lanes|=a,w=f.alternate,w!==null&&(w.lanes|=a),Eu(f.return,a,e),l||(b=null);break e}f=w.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=a,f=b.alternate,f!==null&&(f.lanes|=a),Eu(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Cr(e,t,a,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var w=c.type;Tn(c.pendingProps.value,b.value)||(e!==null?e.push(w):e=[w])}}else if(c===ne.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Kl):e=[Kl])}c=c.return}e!==null&&Cu(t,e,a,l),t.flags|=262144}function Pi(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vo(e){qo=e,Ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return Qh(qo,e)}function $i(e,t){return qo===null&&Vo(e),Qh(e,t)}function Qh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ta===null){if(e===null)throw Error(i(308));Ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ta=Ta.next=t;return a}var pw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},gw=n.unstable_scheduleCallback,yw=n.unstable_NormalPriority,Dt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tu(){return{controller:new pw,data:new Map,refCount:0}}function El(e){e.refCount--,e.refCount===0&&gw(yw,function(){e.controller.abort()})}var Cl=null,Au=0,Tr=0,Ar=null;function vw(e,t){if(Cl===null){var a=Cl=[];Au=0,Tr=Rf(),Ar={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Au++,t.then(Zh,Zh),t}function Zh(){if(--Au===0&&Cl!==null){Ar!==null&&(Ar.status="fulfilled");var e=Cl;Cl=null,Tr=0,Ar=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function bw(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Wh=T.S;T.S=function(e,t){kg=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vw(e,t),Wh!==null&&Wh(e,t)};var Xo=_(null);function Mu(){var e=Xo.current;return e!==null?e:ft.pooledCache}function Gi(e,t){t===null?H(Xo,Xo.current):H(Xo,t.pool)}function Jh(){var e=Mu();return e===null?null:{parent:Dt._currentValue,pool:e}}var Mr=Error(i(460)),_u=Error(i(474)),Yi=Error(i(542)),qi={then:function(){}};function ep(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tp(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Sa,Sa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ap(e),e;default:if(typeof t.status=="string")t.then(Sa,Sa);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ap(e),e}throw Ko=t,Mr}}function Fo(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ko=a,Mr):a}}var Ko=null;function np(){if(Ko===null)throw Error(i(459));var e=Ko;return Ko=null,e}function ap(e){if(e===Mr||e===Yi)throw Error(i(483))}var _r=null,Tl=0;function Vi(e){var t=Tl;return Tl+=1,_r===null&&(_r=[]),tp(_r,e,t)}function Al(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xi(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function op(e){function t(G,I){if(e){var F=G.deletions;F===null?(G.deletions=[I],G.flags|=16):F.push(I)}}function a(G,I){if(!e)return null;for(;I!==null;)t(G,I),I=I.sibling;return null}function l(G){for(var I=new Map;G!==null;)G.key!==null?I.set(G.key,G):I.set(G.index,G),G=G.sibling;return I}function c(G,I){return G=Ea(G,I),G.index=0,G.sibling=null,G}function f(G,I,F){return G.index=F,e?(F=G.alternate,F!==null?(F=F.index,F<I?(G.flags|=67108866,I):F):(G.flags|=67108866,I)):(G.flags|=1048576,I)}function b(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function w(G,I,F,se){return I===null||I.tag!==6?(I=gu(F,G.mode,se),I.return=G,I):(I=c(I,F),I.return=G,I)}function k(G,I,F,se){var Ae=F.type;return Ae===E?re(G,I,F.props.children,se,F.key):I!==null&&(I.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&Fo(Ae)===I.type)?(I=c(I,F.props),Al(I,F),I.return=G,I):(I=Ui(F.type,F.key,F.props,null,G.mode,se),Al(I,F),I.return=G,I)}function K(G,I,F,se){return I===null||I.tag!==4||I.stateNode.containerInfo!==F.containerInfo||I.stateNode.implementation!==F.implementation?(I=yu(F,G.mode,se),I.return=G,I):(I=c(I,F.children||[]),I.return=G,I)}function re(G,I,F,se,Ae){return I===null||I.tag!==7?(I=Go(F,G.mode,se,Ae),I.return=G,I):(I=c(I,F),I.return=G,I)}function ue(G,I,F){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=gu(""+I,G.mode,F),I.return=G,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return F=Ui(I.type,I.key,I.props,null,G.mode,F),Al(F,I),F.return=G,F;case C:return I=yu(I,G.mode,F),I.return=G,I;case z:return I=Fo(I),ue(G,I,F)}if(pe(I)||Q(I))return I=Go(I,G.mode,F,null),I.return=G,I;if(typeof I.then=="function")return ue(G,Vi(I),F);if(I.$$typeof===B)return ue(G,$i(G,I),F);Xi(G,I)}return null}function Z(G,I,F,se){var Ae=I!==null?I.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ae!==null?null:w(G,I,""+F,se);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case A:return F.key===Ae?k(G,I,F,se):null;case C:return F.key===Ae?K(G,I,F,se):null;case z:return F=Fo(F),Z(G,I,F,se)}if(pe(F)||Q(F))return Ae!==null?null:re(G,I,F,se,null);if(typeof F.then=="function")return Z(G,I,Vi(F),se);if(F.$$typeof===B)return Z(G,I,$i(G,F),se);Xi(G,F)}return null}function ae(G,I,F,se,Ae){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return G=G.get(F)||null,w(I,G,""+se,Ae);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case A:return G=G.get(se.key===null?F:se.key)||null,k(I,G,se,Ae);case C:return G=G.get(se.key===null?F:se.key)||null,K(I,G,se,Ae);case z:return se=Fo(se),ae(G,I,F,se,Ae)}if(pe(se)||Q(se))return G=G.get(F)||null,re(I,G,se,Ae,null);if(typeof se.then=="function")return ae(G,I,F,Vi(se),Ae);if(se.$$typeof===B)return ae(G,I,F,$i(I,se),Ae);Xi(I,se)}return null}function Se(G,I,F,se){for(var Ae=null,Ze=null,Te=I,Ie=I=0,Xe=null;Te!==null&&Ie<F.length;Ie++){Te.index>Ie?(Xe=Te,Te=null):Xe=Te.sibling;var We=Z(G,Te,F[Ie],se);if(We===null){Te===null&&(Te=Xe);break}e&&Te&&We.alternate===null&&t(G,Te),I=f(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We,Te=Xe}if(Ie===F.length)return a(G,Te),Fe&&Ca(G,Ie),Ae;if(Te===null){for(;Ie<F.length;Ie++)Te=ue(G,F[Ie],se),Te!==null&&(I=f(Te,I,Ie),Ze===null?Ae=Te:Ze.sibling=Te,Ze=Te);return Fe&&Ca(G,Ie),Ae}for(Te=l(Te);Ie<F.length;Ie++)Xe=ae(Te,G,Ie,F[Ie],se),Xe!==null&&(e&&Xe.alternate!==null&&Te.delete(Xe.key===null?Ie:Xe.key),I=f(Xe,I,Ie),Ze===null?Ae=Xe:Ze.sibling=Xe,Ze=Xe);return e&&Te.forEach(function(yo){return t(G,yo)}),Fe&&Ca(G,Ie),Ae}function Ne(G,I,F,se){if(F==null)throw Error(i(151));for(var Ae=null,Ze=null,Te=I,Ie=I=0,Xe=null,We=F.next();Te!==null&&!We.done;Ie++,We=F.next()){Te.index>Ie?(Xe=Te,Te=null):Xe=Te.sibling;var yo=Z(G,Te,We.value,se);if(yo===null){Te===null&&(Te=Xe);break}e&&Te&&yo.alternate===null&&t(G,Te),I=f(yo,I,Ie),Ze===null?Ae=yo:Ze.sibling=yo,Ze=yo,Te=Xe}if(We.done)return a(G,Te),Fe&&Ca(G,Ie),Ae;if(Te===null){for(;!We.done;Ie++,We=F.next())We=ue(G,We.value,se),We!==null&&(I=f(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We);return Fe&&Ca(G,Ie),Ae}for(Te=l(Te);!We.done;Ie++,We=F.next())We=ae(Te,G,Ie,We.value,se),We!==null&&(e&&We.alternate!==null&&Te.delete(We.key===null?Ie:We.key),I=f(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We);return e&&Te.forEach(function(R2){return t(G,R2)}),Fe&&Ca(G,Ie),Ae}function ct(G,I,F,se){if(typeof F=="object"&&F!==null&&F.type===E&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case A:e:{for(var Ae=F.key;I!==null;){if(I.key===Ae){if(Ae=F.type,Ae===E){if(I.tag===7){a(G,I.sibling),se=c(I,F.props.children),se.return=G,G=se;break e}}else if(I.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&Fo(Ae)===I.type){a(G,I.sibling),se=c(I,F.props),Al(se,F),se.return=G,G=se;break e}a(G,I);break}else t(G,I);I=I.sibling}F.type===E?(se=Go(F.props.children,G.mode,se,F.key),se.return=G,G=se):(se=Ui(F.type,F.key,F.props,null,G.mode,se),Al(se,F),se.return=G,G=se)}return b(G);case C:e:{for(Ae=F.key;I!==null;){if(I.key===Ae)if(I.tag===4&&I.stateNode.containerInfo===F.containerInfo&&I.stateNode.implementation===F.implementation){a(G,I.sibling),se=c(I,F.children||[]),se.return=G,G=se;break e}else{a(G,I);break}else t(G,I);I=I.sibling}se=yu(F,G.mode,se),se.return=G,G=se}return b(G);case z:return F=Fo(F),ct(G,I,F,se)}if(pe(F))return Se(G,I,F,se);if(Q(F)){if(Ae=Q(F),typeof Ae!="function")throw Error(i(150));return F=Ae.call(F),Ne(G,I,F,se)}if(typeof F.then=="function")return ct(G,I,Vi(F),se);if(F.$$typeof===B)return ct(G,I,$i(G,F),se);Xi(G,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,I!==null&&I.tag===6?(a(G,I.sibling),se=c(I,F),se.return=G,G=se):(a(G,I),se=gu(F,G.mode,se),se.return=G,G=se),b(G)):a(G,I)}return function(G,I,F,se){try{Tl=0;var Ae=ct(G,I,F,se);return _r=null,Ae}catch(Te){if(Te===Mr||Te===Yi)throw Te;var Ze=An(29,Te,null,G.mode);return Ze.lanes=se,Ze.return=G,Ze}finally{}}}var Qo=op(!0),rp=op(!1),Ja=!1;function Nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function eo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function to(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(et&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Bi(e),$h(e,null,a),t}return Hi(e,l,t,a),Bi(e)}function Ml(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Zt(e,a)}}function Ou(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Du=!1;function _l(){if(Du){var e=Ar;if(e!==null)throw e}}function Nl(e,t,a,l){Du=!1;var c=e.updateQueue;Ja=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var k=w,K=k.next;k.next=null,b===null?f=K:b.next=K,b=k;var re=e.alternate;re!==null&&(re=re.updateQueue,w=re.lastBaseUpdate,w!==b&&(w===null?re.firstBaseUpdate=K:w.next=K,re.lastBaseUpdate=k))}if(f!==null){var ue=c.baseState;b=0,re=K=k=null,w=f;do{var Z=w.lane&-536870913,ae=Z!==w.lane;if(ae?(Ve&Z)===Z:(l&Z)===Z){Z!==0&&Z===Tr&&(Du=!0),re!==null&&(re=re.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Se=e,Ne=w;Z=t;var ct=a;switch(Ne.tag){case 1:if(Se=Ne.payload,typeof Se=="function"){ue=Se.call(ct,ue,Z);break e}ue=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ne.payload,Z=typeof Se=="function"?Se.call(ct,ue,Z):Se,Z==null)break e;ue=y({},ue,Z);break e;case 2:Ja=!0}}Z=w.callback,Z!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=c.callbacks,ae===null?c.callbacks=[Z]:ae.push(Z))}else ae={lane:Z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},re===null?(K=re=ae,k=ue):re=re.next=ae,b|=Z;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;ae=w,w=ae.next,ae.next=null,c.lastBaseUpdate=ae,c.shared.pending=null}}while(!0);re===null&&(k=ue),c.baseState=k,c.firstBaseUpdate=K,c.lastBaseUpdate=re,f===null&&(c.shared.lanes=0),lo|=b,e.lanes=b,e.memoizedState=ue}}function lp(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function ip(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)lp(a[e],t)}var Nr=_(null),Fi=_(0);function sp(e,t){e=ka,H(Fi,e),H(Nr,t),ka=e|t.baseLanes}function ju(){H(Fi,ka),H(Nr,Nr.current)}function zu(){ka=Fi.current,U(Nr),U(Fi)}var Mn=_(null),Gn=null;function no(e){var t=e.alternate;H(Mt,Mt.current&1),H(Mn,e),Gn===null&&(t===null||Nr.current!==null||t.memoizedState!==null)&&(Gn=e)}function ku(e){H(Mt,Mt.current),H(Mn,e),Gn===null&&(Gn=e)}function cp(e){e.tag===22?(H(Mt,Mt.current),H(Mn,e),Gn===null&&(Gn=e)):ao()}function ao(){H(Mt,Mt.current),H(Mn,Mn.current)}function _n(e){U(Mn),Gn===e&&(Gn=null),U(Mt)}var Mt=_(0);function Ki(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||$f(a)||Gf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ma=0,He=null,it=null,jt=null,Qi=!1,Rr=!1,Zo=!1,Zi=0,Rl=0,Or=null,xw=0;function wt(){throw Error(i(321))}function Lu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Tn(e[a],t[a]))return!1;return!0}function Hu(e,t,a,l,c,f){return Ma=f,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Vp:Wu,Zo=!1,f=a(l,c),Zo=!1,Rr&&(f=fp(t,a,l,c)),up(e),f}function up(e){T.H=jl;var t=it!==null&&it.next!==null;if(Ma=0,jt=it=He=null,Qi=!1,Rl=0,Or=null,t)throw Error(i(300));e===null||zt||(e=e.dependencies,e!==null&&Pi(e)&&(zt=!0))}function fp(e,t,a,l){He=e;var c=0;do{if(Rr&&(Or=null),Rl=0,Rr=!1,25<=c)throw Error(i(301));if(c+=1,jt=it=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}T.H=Xp,f=t(a,l)}while(Rr);return f}function Sw(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Ol(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(He.flags|=1024),t}function Bu(){var e=Zi!==0;return Zi=0,e}function Uu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Iu(e){if(Qi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qi=!1}Ma=0,jt=it=He=null,Rr=!1,Rl=Zi=0,Or=null}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?He.memoizedState=jt=e:jt=jt.next=e,jt}function _t(){if(it===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=jt===null?He.memoizedState:jt.next;if(t!==null)jt=t,it=e;else{if(e===null)throw He.alternate===null?Error(i(467)):Error(i(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},jt===null?He.memoizedState=jt=e:jt=jt.next=e}return jt}function Wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ol(e){var t=Rl;return Rl+=1,Or===null&&(Or=[]),e=tp(Or,e,t),t=He,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Vp:Wu),e}function Ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ol(e);if(e.$$typeof===B)return Vt(e)}throw Error(i(438,String(e)))}function Pu(e){var t=null,a=He.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=He.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Wi(),He.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ie;return t.index++,a}function _a(e,t){return typeof t=="function"?t(e):t}function es(e){var t=_t();return $u(t,it,e)}function $u(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var w=b=null,k=null,K=t,re=!1;do{var ue=K.lane&-536870913;if(ue!==K.lane?(Ve&ue)===ue:(Ma&ue)===ue){var Z=K.revertLane;if(Z===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),ue===Tr&&(re=!0);else if((Ma&Z)===Z){K=K.next,Z===Tr&&(re=!0);continue}else ue={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},k===null?(w=k=ue,b=f):k=k.next=ue,He.lanes|=Z,lo|=Z;ue=K.action,Zo&&a(f,ue),f=K.hasEagerState?K.eagerState:a(f,ue)}else Z={lane:ue,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},k===null?(w=k=Z,b=f):k=k.next=Z,He.lanes|=ue,lo|=ue;K=K.next}while(K!==null&&K!==t);if(k===null?b=f:k.next=w,!Tn(f,e.memoizedState)&&(zt=!0,re&&(a=Ar,a!==null)))throw a;e.memoizedState=f,e.baseState=b,e.baseQueue=k,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Gu(e){var t=_t(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);Tn(f,t.memoizedState)||(zt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,l]}function dp(e,t,a){var l=He,c=_t(),f=Fe;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var b=!Tn((it||c).memoizedState,a);if(b&&(c.memoizedState=a,zt=!0),c=c.queue,Vu(pp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,Dr(9,{destroy:void 0},hp.bind(null,l,c,a,t),null),ft===null)throw Error(i(349));f||(Ma&127)!==0||mp(l,t,a)}return a}function mp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=He.updateQueue,t===null?(t=Wi(),He.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function hp(e,t,a,l){t.value=a,t.getSnapshot=l,gp(t)&&yp(e)}function pp(e,t,a){return a(function(){gp(t)&&yp(e)})}function gp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Tn(e,a)}catch{return!0}}function yp(e){var t=$o(e,2);t!==null&&gn(t,e,2)}function Yu(e){var t=rn();if(typeof e=="function"){var a=e;if(e=a(),Zo){Ht(!0);try{a()}finally{Ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t}function vp(e,t,a,l){return e.baseState=a,$u(e,it,typeof l=="function"?l:_a)}function ww(e,t,a,l,c){if(as(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};T.T!==null?a(!0):f.isTransition=!1,l(f),a=t.pending,a===null?(f.next=t.pending=f,bp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function bp(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=T.T,b={};T.T=b;try{var w=a(c,l),k=T.S;k!==null&&k(b,w),xp(e,t,w)}catch(K){qu(e,t,K)}finally{f!==null&&b.types!==null&&(f.types=b.types),T.T=f}}else try{f=a(c,l),xp(e,t,f)}catch(K){qu(e,t,K)}}function xp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Sp(e,t,l)},function(l){return qu(e,t,l)}):Sp(e,t,a)}function Sp(e,t,a){t.status="fulfilled",t.value=a,wp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,bp(e,a)))}function qu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,wp(t),t=t.next;while(t!==l)}e.action=null}function wp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ep(e,t){return t}function Cp(e,t){if(Fe){var a=ft.formState;if(a!==null){e:{var l=He;if(Fe){if(gt){t:{for(var c=gt,f=$n;c.nodeType!==8;){if(!f){c=null;break t}if(c=Yn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){gt=Yn(c.nextSibling),l=c.data==="F!";break e}}Za(l)}l=!1}l&&(t=a[0])}}return a=rn(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ep,lastRenderedState:t},a.queue=l,a=Gp.bind(null,He,l),l.dispatch=a,l=Yu(!1),f=Zu.bind(null,He,!1,l.queue),l=rn(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=ww.bind(null,He,c,f,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Tp(e){var t=_t();return Ap(t,it,e)}function Ap(e,t,a){if(t=$u(e,t,Ep)[0],e=es(_a)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ol(t)}catch(b){throw b===Mr?Yi:b}else l=t;t=_t();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(He.flags|=2048,Dr(9,{destroy:void 0},Ew.bind(null,c,a),null)),[l,f,e]}function Ew(e,t){e.action=t}function Mp(e){var t=_t(),a=it;if(a!==null)return Ap(t,a,e);_t(),t=t.memoizedState,a=_t();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Dr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=He.updateQueue,t===null&&(t=Wi(),He.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function _p(){return _t().memoizedState}function ts(e,t,a,l){var c=rn();He.flags|=e,c.memoizedState=Dr(1|t,{destroy:void 0},a,l===void 0?null:l)}function ns(e,t,a,l){var c=_t();l=l===void 0?null:l;var f=c.memoizedState.inst;it!==null&&l!==null&&Lu(l,it.memoizedState.deps)?c.memoizedState=Dr(t,f,a,l):(He.flags|=e,c.memoizedState=Dr(1|t,f,a,l))}function Np(e,t){ts(8390656,8,e,t)}function Vu(e,t){ns(2048,8,e,t)}function Cw(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Wi(),He.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Rp(e){var t=_t().memoizedState;return Cw({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Op(e,t){return ns(4,2,e,t)}function Dp(e,t){return ns(4,4,e,t)}function jp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zp(e,t,a){a=a!=null?a.concat([e]):null,ns(4,4,jp.bind(null,t,e),a)}function Xu(){}function kp(e,t){var a=_t();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Lu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Lp(e,t){var a=_t();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Lu(t,l[1]))return l[0];if(l=e(),Zo){Ht(!0);try{e()}finally{Ht(!1)}}return a.memoizedState=[l,t],l}function Fu(e,t,a){return a===void 0||(Ma&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Hg(),He.lanes|=e,lo|=e,a)}function Hp(e,t,a,l){return Tn(a,t)?a:Nr.current!==null?(e=Fu(e,a,l),Tn(e,t)||(zt=!0),e):(Ma&42)===0||(Ma&1073741824)!==0&&(Ve&261930)===0?(zt=!0,e.memoizedState=a):(e=Hg(),He.lanes|=e,lo|=e,t)}function Bp(e,t,a,l,c){var f=O.p;O.p=f!==0&&8>f?f:8;var b=T.T,w={};T.T=w,Zu(e,!1,t,a);try{var k=c(),K=T.S;if(K!==null&&K(w,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var re=bw(k,l);Dl(e,t,re,On(e))}else Dl(e,t,l,On(e))}catch(ue){Dl(e,t,{then:function(){},status:"rejected",reason:ue},On())}finally{O.p=f,b!==null&&w.types!==null&&(b.types=w.types),T.T=b}}function Tw(){}function Ku(e,t,a,l){if(e.tag!==5)throw Error(i(476));var c=Up(e).queue;Bp(e,c,t,N,a===null?Tw:function(){return Ip(e),a(l)})}function Up(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:N},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ip(e){var t=Up(e);t.next===null&&(t=e.alternate.memoizedState),Dl(e,t.next.queue,{},On())}function Qu(){return Vt(Kl)}function Pp(){return _t().memoizedState}function $p(){return _t().memoizedState}function Aw(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=On();e=eo(a);var l=to(t,e,a);l!==null&&(gn(l,t,a),Ml(l,t,a)),t={cache:Tu()},e.payload=t;return}t=t.return}}function Mw(e,t,a){var l=On();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},as(e)?Yp(t,a):(a=hu(e,t,a,l),a!==null&&(gn(a,e,l),qp(a,t,l)))}function Gp(e,t,a){var l=On();Dl(e,t,a,l)}function Dl(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(as(e))Yp(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,w=f(b,a);if(c.hasEagerState=!0,c.eagerState=w,Tn(w,b))return Hi(e,t,c,0),ft===null&&Li(),!1}catch{}finally{}if(a=hu(e,t,c,l),a!==null)return gn(a,e,l),qp(a,t,l),!0}return!1}function Zu(e,t,a,l){if(l={lane:2,revertLane:Rf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},as(e)){if(t)throw Error(i(479))}else t=hu(e,a,l,2),t!==null&&gn(t,e,2)}function as(e){var t=e.alternate;return e===He||t!==null&&t===He}function Yp(e,t){Rr=Qi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function qp(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Zt(e,a)}}var jl={readContext:Vt,use:Ji,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};jl.useEffectEvent=wt;var Vp={readContext:Vt,use:Ji,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:Np,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ts(4194308,4,jp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var a=rn();t=t===void 0?null:t;var l=e();if(Zo){Ht(!0);try{e()}finally{Ht(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=rn();if(a!==void 0){var c=a(t);if(Zo){Ht(!0);try{a(t)}finally{Ht(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Mw.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:function(e){e=Yu(e);var t=e.queue,a=Gp.bind(null,He,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Xu,useDeferredValue:function(e,t){var a=rn();return Fu(a,e,t)},useTransition:function(){var e=Yu(!1);return e=Bp.bind(null,He,e.queue,!0,!1),rn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=He,c=rn();if(Fe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),ft===null)throw Error(i(349));(Ve&127)!==0||mp(l,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Np(pp.bind(null,l,f,e),[e]),l.flags|=2048,Dr(9,{destroy:void 0},hp.bind(null,l,f,a,t),null),a},useId:function(){var e=rn(),t=ft.identifierPrefix;if(Fe){var a=sa,l=ia;a=(l&~(1<<32-ut(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Zi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=xw++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qu,useFormState:Cp,useActionState:Cp,useOptimistic:function(e){var t=rn();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Zu.bind(null,He,!0,a),a.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return rn().memoizedState=Aw.bind(null,He)},useEffectEvent:function(e){var t=rn(),a={impl:e};return t.memoizedState=a,function(){if((et&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Wu={readContext:Vt,use:Ji,useCallback:kp,useContext:Vt,useEffect:Vu,useImperativeHandle:zp,useInsertionEffect:Op,useLayoutEffect:Dp,useMemo:Lp,useReducer:es,useRef:_p,useState:function(){return es(_a)},useDebugValue:Xu,useDeferredValue:function(e,t){var a=_t();return Hp(a,it.memoizedState,e,t)},useTransition:function(){var e=es(_a)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:Ol(e),t]},useSyncExternalStore:dp,useId:Pp,useHostTransitionStatus:Qu,useFormState:Tp,useActionState:Tp,useOptimistic:function(e,t){var a=_t();return vp(a,it,e,t)},useMemoCache:Pu,useCacheRefresh:$p};Wu.useEffectEvent=Rp;var Xp={readContext:Vt,use:Ji,useCallback:kp,useContext:Vt,useEffect:Vu,useImperativeHandle:zp,useInsertionEffect:Op,useLayoutEffect:Dp,useMemo:Lp,useReducer:Gu,useRef:_p,useState:function(){return Gu(_a)},useDebugValue:Xu,useDeferredValue:function(e,t){var a=_t();return it===null?Fu(a,e,t):Hp(a,it.memoizedState,e,t)},useTransition:function(){var e=Gu(_a)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:Ol(e),t]},useSyncExternalStore:dp,useId:Pp,useHostTransitionStatus:Qu,useFormState:Mp,useActionState:Mp,useOptimistic:function(e,t){var a=_t();return it!==null?vp(a,it,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:$p};Xp.useEffectEvent=Rp;function Ju(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ef={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=On(),c=eo(l);c.payload=t,a!=null&&(c.callback=a),t=to(e,c,l),t!==null&&(gn(t,e,l),Ml(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=On(),c=eo(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=to(e,c,l),t!==null&&(gn(t,e,l),Ml(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=On(),l=eo(a);l.tag=2,t!=null&&(l.callback=t),t=to(e,l,a),t!==null&&(gn(t,e,a),Ml(t,e,a))}};function Fp(e,t,a,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!bl(a,l)||!bl(c,f):!0}function Kp(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&ef.enqueueReplaceState(t,t.state,null)}function Wo(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Qp(e){ki(e)}function Zp(e){console.error(e)}function Wp(e){ki(e)}function os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Jp(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function tf(e,t,a){return a=eo(a),a.tag=3,a.payload={element:null},a.callback=function(){os(e,t)},a}function eg(e){return e=eo(e),e.tag=3,e}function tg(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Jp(t,a,l)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Jp(t,a,l),typeof c!="function"&&(io===null?io=new Set([this]):io.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function _w(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Cr(t,a,c,!0),a=Mn.current,a!==null){switch(a.tag){case 31:case 13:return Gn===null?gs():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===qi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Mf(e,l,c)),!1;case 22:return a.flags|=65536,l===qi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Mf(e,l,c)),!1}throw Error(i(435,a.tag))}return Mf(e,l,c),gs(),!1}if(Fe)return t=Mn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==xu&&(e=Error(i(422),{cause:l}),wl(Un(e,a)))):(l!==xu&&(t=Error(i(423),{cause:l}),wl(Un(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Un(l,a),c=tf(e.stateNode,l,c),Ou(e,c),Et!==4&&(Et=2)),!1;var f=Error(i(520),{cause:l});if(f=Un(f,a),Pl===null?Pl=[f]:Pl.push(f),Et!==4&&(Et=2),t===null)return!0;l=Un(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=tf(a.stateNode,l,e),Ou(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(io===null||!io.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=eg(c),tg(c,e,a,l),Ou(a,c),!1}a=a.return}while(a!==null);return!1}var nf=Error(i(461)),zt=!1;function Xt(e,t,a,l){t.child=e===null?rp(t,null,a,l):Qo(t,e.child,a,l)}function ng(e,t,a,l,c){a=a.render;var f=t.ref;if("ref"in l){var b={};for(var w in l)w!=="ref"&&(b[w]=l[w])}else b=l;return Vo(t),l=Hu(e,t,a,b,f,c),w=Bu(),e!==null&&!zt?(Uu(e,t,c),Na(e,t,c)):(Fe&&w&&vu(t),t.flags|=1,Xt(e,t,l,c),t.child)}function ag(e,t,a,l,c){if(e===null){var f=a.type;return typeof f=="function"&&!pu(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,og(e,t,f,l,c)):(e=Ui(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!ff(e,c)){var b=f.memoizedProps;if(a=a.compare,a=a!==null?a:bl,a(b,l)&&e.ref===t.ref)return Na(e,t,c)}return t.flags|=1,e=Ea(f,l),e.ref=t.ref,e.return=t,t.child=e}function og(e,t,a,l,c){if(e!==null){var f=e.memoizedProps;if(bl(f,l)&&e.ref===t.ref)if(zt=!1,t.pendingProps=l=f,ff(e,c))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,Na(e,t,c)}return af(e,t,a,l,c)}function rg(e,t,a,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return lg(e,t,f,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gi(t,f!==null?f.cachePool:null),f!==null?sp(t,f):ju(),cp(t);else return l=t.lanes=536870912,lg(e,t,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Gi(t,f.cachePool),sp(t,f),ao(),t.memoizedState=null):(e!==null&&Gi(t,null),ju(),ao());return Xt(e,t,c,a),t.child}function zl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lg(e,t,a,l,c){var f=Mu();return f=f===null?null:{parent:Dt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Gi(t,null),ju(),cp(t),e!==null&&Cr(e,t,l,!0),t.childLanes=c,null}function rs(e,t){return t=is({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ig(e,t,a){return Qo(t,e.child,null,a),e=rs(t,t.pendingProps),e.flags|=2,_n(t),t.memoizedState=null,e}function Nw(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(l.mode==="hidden")return e=rs(t,l),t.lanes=536870912,zl(null,e);if(ku(t),(e=gt)?(e=by(e,$n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ka!==null?{id:ia,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},a=Yh(e),a.return=t,t.child=a,qt=t,gt=null)):e=null,e===null)throw Za(t);return t.lanes=536870912,null}return rs(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(ku(t),c)if(t.flags&256)t.flags&=-257,t=ig(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(zt||Cr(e,t,a,!1),c=(a&e.childLanes)!==0,zt||c){if(l=ft,l!==null&&(b=Wt(l,a),b!==0&&b!==f.retryLane))throw f.retryLane=b,$o(e,b),gn(l,e,b),nf;gs(),t=ig(e,t,a)}else e=f.treeContext,gt=Yn(b.nextSibling),qt=t,Fe=!0,Qa=null,$n=!1,e!==null&&Xh(t,e),t=rs(t,l),t.flags|=4096;return t}return e=Ea(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ls(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function af(e,t,a,l,c){return Vo(t),a=Hu(e,t,a,l,void 0,c),l=Bu(),e!==null&&!zt?(Uu(e,t,c),Na(e,t,c)):(Fe&&l&&vu(t),t.flags|=1,Xt(e,t,a,c),t.child)}function sg(e,t,a,l,c,f){return Vo(t),t.updateQueue=null,a=fp(t,l,a,c),up(e),l=Bu(),e!==null&&!zt?(Uu(e,t,f),Na(e,t,f)):(Fe&&l&&vu(t),t.flags|=1,Xt(e,t,a,f),t.child)}function cg(e,t,a,l,c){if(Vo(t),t.stateNode===null){var f=xr,b=a.contextType;typeof b=="object"&&b!==null&&(f=Vt(b)),f=new a(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ef,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Nu(t),b=a.contextType,f.context=typeof b=="object"&&b!==null?Vt(b):xr,f.state=t.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Ju(t,a,b,l),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&ef.enqueueReplaceState(f,f.state,null),Nl(t,l,f,c),_l(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,k=Wo(a,w);f.props=k;var K=f.context,re=a.contextType;b=xr,typeof re=="object"&&re!==null&&(b=Vt(re));var ue=a.getDerivedStateFromProps;re=typeof ue=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,re||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||K!==b)&&Kp(t,f,l,b),Ja=!1;var Z=t.memoizedState;f.state=Z,Nl(t,l,f,c),_l(),K=t.memoizedState,w||Z!==K||Ja?(typeof ue=="function"&&(Ju(t,a,ue,l),K=t.memoizedState),(k=Ja||Fp(t,a,k,l,Z,K,b))?(re||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=K),f.props=l,f.state=K,f.context=b,l=k):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Ru(e,t),b=t.memoizedProps,re=Wo(a,b),f.props=re,ue=t.pendingProps,Z=f.context,K=a.contextType,k=xr,typeof K=="object"&&K!==null&&(k=Vt(K)),w=a.getDerivedStateFromProps,(K=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==ue||Z!==k)&&Kp(t,f,l,k),Ja=!1,Z=t.memoizedState,f.state=Z,Nl(t,l,f,c),_l();var ae=t.memoizedState;b!==ue||Z!==ae||Ja||e!==null&&e.dependencies!==null&&Pi(e.dependencies)?(typeof w=="function"&&(Ju(t,a,w,l),ae=t.memoizedState),(re=Ja||Fp(t,a,re,l,Z,ae,k)||e!==null&&e.dependencies!==null&&Pi(e.dependencies))?(K||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,ae,k),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,ae,k)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ae),f.props=l,f.state=ae,f.context=k,l=re):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,ls(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=Qo(t,e.child,null,c),t.child=Qo(t,null,a,c)):Xt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=Na(e,t,c),e}function ug(e,t,a,l){return Yo(),t.flags|=256,Xt(e,t,a,l),t.child}var of={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rf(e){return{baseLanes:e,cachePool:Jh()}}function lf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Rn),e}function fg(e,t,a){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(c?no(t):ao(),(e=gt)?(e=by(e,$n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ka!==null?{id:ia,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},a=Yh(e),a.return=t,t.child=a,qt=t,gt=null)):e=null,e===null)throw Za(t);return Gf(e)?t.lanes=32:t.lanes=536870912,null}var w=l.children;return l=l.fallback,c?(ao(),c=t.mode,w=is({mode:"hidden",children:w},c),l=Go(l,c,a,null),w.return=t,l.return=t,w.sibling=l,t.child=w,l=t.child,l.memoizedState=rf(a),l.childLanes=lf(e,b,a),t.memoizedState=of,zl(null,l)):(no(t),sf(t,w))}var k=e.memoizedState;if(k!==null&&(w=k.dehydrated,w!==null)){if(f)t.flags&256?(no(t),t.flags&=-257,t=cf(e,t,a)):t.memoizedState!==null?(ao(),t.child=e.child,t.flags|=128,t=null):(ao(),w=l.fallback,c=t.mode,l=is({mode:"visible",children:l.children},c),w=Go(w,c,a,null),w.flags|=2,l.return=t,w.return=t,l.sibling=w,t.child=l,Qo(t,e.child,null,a),l=t.child,l.memoizedState=rf(a),l.childLanes=lf(e,b,a),t.memoizedState=of,t=zl(null,l));else if(no(t),Gf(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var K=b.dgst;b=K,l=Error(i(419)),l.stack="",l.digest=b,wl({value:l,source:null,stack:null}),t=cf(e,t,a)}else if(zt||Cr(e,t,a,!1),b=(a&e.childLanes)!==0,zt||b){if(b=ft,b!==null&&(l=Wt(b,a),l!==0&&l!==k.retryLane))throw k.retryLane=l,$o(e,l),gn(b,e,l),nf;$f(w)||gs(),t=cf(e,t,a)}else $f(w)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,gt=Yn(w.nextSibling),qt=t,Fe=!0,Qa=null,$n=!1,e!==null&&Xh(t,e),t=sf(t,l.children),t.flags|=4096);return t}return c?(ao(),w=l.fallback,c=t.mode,k=e.child,K=k.sibling,l=Ea(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,K!==null?w=Ea(K,w):(w=Go(w,c,a,null),w.flags|=2),w.return=t,l.return=t,l.sibling=w,t.child=l,zl(null,l),l=t.child,w=e.child.memoizedState,w===null?w=rf(a):(c=w.cachePool,c!==null?(k=Dt._currentValue,c=c.parent!==k?{parent:k,pool:k}:c):c=Jh(),w={baseLanes:w.baseLanes|a,cachePool:c}),l.memoizedState=w,l.childLanes=lf(e,b,a),t.memoizedState=of,zl(e.child,l)):(no(t),a=e.child,e=a.sibling,a=Ea(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=a,t.memoizedState=null,a)}function sf(e,t){return t=is({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function is(e,t){return e=An(22,e,null,t),e.lanes=0,e}function cf(e,t,a){return Qo(t,e.child,null,a),e=sf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dg(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Eu(e.return,t,a)}function uf(e,t,a,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=a,b.tailMode=c,b.treeForkCount=f)}function mg(e,t,a){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=Mt.current,w=(b&2)!==0;if(w?(b=b&1|2,t.flags|=128):b&=1,H(Mt,b),Xt(e,t,l,a),l=Fe?Sl:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dg(e,a,t);else if(e.tag===19)dg(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&Ki(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),uf(t,!1,c,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ki(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}uf(t,!0,a,null,f,l);break;case"together":uf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Na(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),lo|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Cr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=Ea(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ea(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ff(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pi(e)))}function Rw(e,t,a){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),Wa(t,Dt,e.memoizedState.cache),Yo();break;case 27:case 5:ye(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:Wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ku(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(no(t),t.flags|=128,null):(a&t.child.childLanes)!==0?fg(e,t,a):(no(t),e=Na(e,t,a),e!==null?e.sibling:null);no(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Cr(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return mg(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),H(Mt,Mt.current),l)break;return null;case 22:return t.lanes=0,rg(e,t,a,t.pendingProps);case 24:Wa(t,Dt,e.memoizedState.cache)}return Na(e,t,a)}function hg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!ff(e,a)&&(t.flags&128)===0)return zt=!1,Rw(e,t,a);zt=(e.flags&131072)!==0}else zt=!1,Fe&&(t.flags&1048576)!==0&&Vh(t,Sl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fo(t.elementType),t.type=e,typeof e=="function")pu(e)?(l=Wo(e,l),t.tag=1,t=cg(null,t,e,l,a)):(t.tag=0,t=af(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=ng(null,t,e,l,a);break e}else if(c===V){t.tag=14,t=ag(null,t,e,l,a);break e}}throw t=de(e)||e,Error(i(306,t,""))}}return t;case 0:return af(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=Wo(l,t.pendingProps),cg(e,t,l,c,a);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Ru(e,t),Nl(t,l,null,a);var b=t.memoizedState;if(l=b.cache,Wa(t,Dt,l),l!==f.cache&&Cu(t,[Dt],a,!0),_l(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=ug(e,t,l,a);break e}else if(l!==c){c=Un(Error(i(424)),t),wl(c),t=ug(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Yn(e.firstChild),qt=t,Fe=!0,Qa=null,$n=!0,a=rp(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Yo(),l===c){t=Na(e,t,a);break e}Xt(e,t,l,a)}t=t.child}return t;case 26:return ls(e,t),e===null?(a=Ty(t.type,null,t.pendingProps,null))?t.memoizedState=a:Fe||(a=t.type,e=t.pendingProps,l=Es(te.current).createElement(a),l[ze]=t,l[qe]=e,Ft(l,a,e),Ot(l),t.stateNode=l):t.memoizedState=Ty(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&Fe&&(l=t.stateNode=wy(t.type,t.pendingProps,te.current),qt=t,$n=!0,c=gt,fo(t.type)?(Yf=c,gt=Yn(l.firstChild)):gt=c),Xt(e,t,t.pendingProps.children,a),ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((c=l=gt)&&(l=l2(l,t.type,t.pendingProps,$n),l!==null?(t.stateNode=l,qt=t,gt=Yn(l.firstChild),$n=!1,c=!0):c=!1),c||Za(t)),ye(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,Uf(c,f)?l=null:b!==null&&Uf(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Hu(e,t,Sw,null,null,a),Kl._currentValue=c),ls(e,t),Xt(e,t,l,a),t.child;case 6:return e===null&&Fe&&((e=a=gt)&&(a=i2(a,t.pendingProps,$n),a!==null?(t.stateNode=a,qt=t,gt=null,e=!0):e=!1),e||Za(t)),null;case 13:return fg(e,t,a);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Qo(t,null,l,a):Xt(e,t,l,a),t.child;case 11:return ng(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Wa(t,t.type,l.value),Xt(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Vo(t),c=Vt(c),l=l(c),t.flags|=1,Xt(e,t,l,a),t.child;case 14:return ag(e,t,t.type,t.pendingProps,a);case 15:return og(e,t,t.type,t.pendingProps,a);case 19:return mg(e,t,a);case 31:return Nw(e,t,a);case 22:return rg(e,t,a,t.pendingProps);case 24:return Vo(t),l=Vt(Dt),e===null?(c=Mu(),c===null&&(c=ft,f=Tu(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:l,cache:c},Nu(t),Wa(t,Dt,c)):((e.lanes&a)!==0&&(Ru(e,t),Nl(t,null,null,a),_l()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Wa(t,Dt,l)):(l=f.cache,Wa(t,Dt,l),l!==c.cache&&Cu(t,[Dt],a,!0))),Xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ra(e){e.flags|=4}function df(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Pg())e.flags|=8192;else throw Ko=qi,_u}else e.flags&=-16777217}function pg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ry(t))if(Pg())e.flags|=8192;else throw Ko=qi,_u}function ss(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Pt():536870912,e.lanes|=t,Lr|=t)}function kl(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Ow(e,t,a){var l=t.pendingProps;switch(bu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Aa(Dt),le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Er(t)?Ra(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Su())),yt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Ra(t),f!==null?(yt(t),pg(t,f)):(yt(t),df(t,c,null,l,a))):f?f!==e.memoizedState?(Ra(t),yt(t),pg(t,f)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ra(t),yt(t),df(t,c,e,l,a)),null;case 27:if(Ee(t),a=te.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ra(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return yt(t),null}e=P.current,Er(t)?Fh(t):(e=wy(c,l,a),t.stateNode=e,Ra(t))}return yt(t),null;case 5:if(Ee(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ra(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return yt(t),null}if(f=P.current,Er(t))Fh(t);else{var b=Es(te.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[ze]=t,f[qe]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Ft(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ra(t)}}return yt(t),df(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ra(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=te.current,Er(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=qt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[ze]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||fy(e.nodeValue,a)),e||Za(t,!0)}else e=Es(e).createTextNode(l),e[ze]=t,t.stateNode=e}return yt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Er(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[ze]=t}else Yo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else a=Su(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(_n(t),t):(_n(t),null);if((t.flags&128)!==0)throw Error(i(558))}return yt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Er(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[ze]=t}else Yo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),c=!1}else c=Su(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(_n(t),t):(_n(t),null)}return _n(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ss(t,t.updateQueue),yt(t),null);case 4:return le(),e===null&&zf(t.stateNode.containerInfo),yt(t),null;case 10:return Aa(t.type),yt(t),null;case 19:if(U(Mt),l=t.memoizedState,l===null)return yt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)kl(l,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ki(e),f!==null){for(t.flags|=128,kl(l,!1),e=f.updateQueue,t.updateQueue=e,ss(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Gh(a,e),a=a.sibling;return H(Mt,Mt.current&1|2),Fe&&Ca(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&St()>ms&&(t.flags|=128,c=!0,kl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Ki(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ss(t,e),kl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Fe)return yt(t),null}else 2*St()-l.renderingStartTime>ms&&a!==536870912&&(t.flags|=128,c=!0,kl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=St(),e.sibling=null,a=Mt.current,H(Mt,c?a&1|2:a&1),Fe&&Ca(t,l.treeForkCount),e):(yt(t),null);case 22:case 23:return _n(t),zu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),a=t.updateQueue,a!==null&&ss(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&U(Xo),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Aa(Dt),yt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Dw(e,t){switch(bu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(Dt),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(_n(t),t.alternate===null)throw Error(i(340));Yo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_n(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Yo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Mt),null;case 4:return le(),null;case 10:return Aa(t.type),null;case 22:case 23:return _n(t),zu(),e!==null&&U(Xo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Aa(Dt),null;case 25:return null;default:return null}}function gg(e,t){switch(bu(t),t.tag){case 3:Aa(Dt),le();break;case 26:case 27:case 5:Ee(t);break;case 4:le();break;case 31:t.memoizedState!==null&&_n(t);break;case 13:_n(t);break;case 19:U(Mt);break;case 10:Aa(t.type);break;case 22:case 23:_n(t),zu(),e!==null&&U(Xo);break;case 24:Aa(Dt)}}function Ll(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var f=a.create,b=a.inst;l=f(),b.destroy=l}a=a.next}while(a!==c)}}catch(w){ot(t,t.return,w)}}function oo(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,c=t;var k=a,K=w;try{K()}catch(re){ot(c,k,re)}}}l=l.next}while(l!==f)}}catch(re){ot(t,t.return,re)}}function yg(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ip(t,a)}catch(l){ot(e,e.return,l)}}}function vg(e,t,a){a.props=Wo(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){ot(e,t,l)}}function Hl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){ot(e,t,c)}}function ca(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){ot(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){ot(e,t,c)}else a.current=null}function bg(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){ot(e,e.return,c)}}function mf(e,t,a){try{var l=e.stateNode;e2(l,e.type,a,t),l[qe]=t}catch(c){ot(e,e.return,c)}}function xg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fo(e.type)||e.tag===4}function hf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xg(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&&fo(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 pf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Sa));else if(l!==4&&(l===27&&fo(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(pf(e,t,a),e=e.sibling;e!==null;)pf(e,t,a),e=e.sibling}function cs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&fo(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cs(e,t,a),e=e.sibling;e!==null;)cs(e,t,a),e=e.sibling}function Sg(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ft(t,l,a),t[ze]=e,t[qe]=a}catch(f){ot(e,e.return,f)}}var Oa=!1,kt=!1,gf=!1,wg=typeof WeakSet=="function"?WeakSet:Set,$t=null;function jw(e,t){if(e=e.containerInfo,Hf=Rs,e=zh(e),su(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var b=0,w=-1,k=-1,K=0,re=0,ue=e,Z=null;t:for(;;){for(var ae;ue!==a||c!==0&&ue.nodeType!==3||(w=b+c),ue!==f||l!==0&&ue.nodeType!==3||(k=b+l),ue.nodeType===3&&(b+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)Z=ue,ue=ae;for(;;){if(ue===e)break t;if(Z===a&&++K===c&&(w=b),Z===f&&++re===l&&(k=b),(ae=ue.nextSibling)!==null)break;ue=Z,Z=ue.parentNode}ue=ae}a=w===-1||k===-1?null:{start:w,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bf={focusedElem:e,selectionRange:a},Rs=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var Se=Wo(a.type,c);e=l.getSnapshotBeforeUpdate(Se,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){ot(a,a.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Pf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pf(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function Eg(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ja(e,a),l&4&&Ll(5,a);break;case 1:if(ja(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(b){ot(a,a.return,b)}else{var c=Wo(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){ot(a,a.return,b)}}l&64&&yg(a),l&512&&Hl(a,a.return);break;case 3:if(ja(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{ip(e,t)}catch(b){ot(a,a.return,b)}}break;case 27:t===null&&l&4&&Sg(a);case 26:case 5:ja(e,a),t===null&&l&4&&bg(a),l&512&&Hl(a,a.return);break;case 12:ja(e,a);break;case 31:ja(e,a),l&4&&Ag(e,a);break;case 13:ja(e,a),l&4&&Mg(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$w.bind(null,a),s2(e,a))));break;case 22:if(l=a.memoizedState!==null||Oa,!l){t=t!==null&&t.memoizedState!==null||kt,c=Oa;var f=kt;Oa=l,(kt=t)&&!f?za(e,a,(a.subtreeFlags&8772)!==0):ja(e,a),Oa=c,kt=f}break;case 30:break;default:ja(e,a)}}function Cg(e){var t=e.alternate;t!==null&&(e.alternate=null,Cg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),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 vt=null,dn=!1;function Da(e,t,a){for(a=a.child;a!==null;)Tg(e,t,a),a=a.sibling}function Tg(e,t,a){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(sn,a)}catch{}switch(a.tag){case 26:kt||ca(a,t),Da(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||ca(a,t);var l=vt,c=dn;fo(a.type)&&(vt=a.stateNode,dn=!1),Da(e,t,a),Vl(a.stateNode),vt=l,dn=c;break;case 5:kt||ca(a,t);case 6:if(l=vt,c=dn,vt=null,Da(e,t,a),vt=l,dn=c,vt!==null)if(dn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(f){ot(a,t,f)}else try{vt.removeChild(a.stateNode)}catch(f){ot(a,t,f)}break;case 18:vt!==null&&(dn?(e=vt,yy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yr(e)):yy(vt,a.stateNode));break;case 4:l=vt,c=dn,vt=a.stateNode.containerInfo,dn=!0,Da(e,t,a),vt=l,dn=c;break;case 0:case 11:case 14:case 15:oo(2,a,t),kt||oo(4,a,t),Da(e,t,a);break;case 1:kt||(ca(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&vg(a,t,l)),Da(e,t,a);break;case 21:Da(e,t,a);break;case 22:kt=(l=kt)||a.memoizedState!==null,Da(e,t,a),kt=l;break;default:Da(e,t,a)}}function Ag(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yr(e)}catch(a){ot(t,t.return,a)}}}function Mg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yr(e)}catch(a){ot(t,t.return,a)}}function zw(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wg),t;default:throw Error(i(435,e.tag))}}function us(e,t){var a=zw(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Gw.bind(null,e,l);l.then(c,c)}})}function mn(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],f=e,b=t,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(fo(w.type)){vt=w.stateNode,dn=!1;break e}break;case 5:vt=w.stateNode,dn=!1;break e;case 3:case 4:vt=w.stateNode.containerInfo,dn=!0;break e}w=w.return}if(vt===null)throw Error(i(160));Tg(f,b,c),vt=null,dn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_g(t,e),t=t.sibling}var Zn=null;function _g(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mn(t,e),hn(e),l&4&&(oo(3,e,e.return),Ll(3,e),oo(5,e,e.return));break;case 1:mn(t,e),hn(e),l&512&&(kt||a===null||ca(a,a.return)),l&64&&Oa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=Zn;if(mn(t,e),hn(e),l&512&&(kt||a===null||ca(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Yt]||f[ze]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Ft(f,l,a),f[ze]=e,Ot(f),l=f;break e;case"link":var b=_y("link","href",c).get(l+(a.href||""));if(b){for(var w=0;w<b.length;w++)if(f=b[w],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(w,1);break t}}f=c.createElement(l),Ft(f,l,a),c.head.appendChild(f);break;case"meta":if(b=_y("meta","content",c).get(l+(a.content||""))){for(w=0;w<b.length;w++)if(f=b[w],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(w,1);break t}}f=c.createElement(l),Ft(f,l,a),c.head.appendChild(f);break;default:throw Error(i(468,l))}f[ze]=e,Ot(f),l=f}e.stateNode=l}else Ny(c,e.type,e.stateNode);else e.stateNode=My(c,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?Ny(c,e.type,e.stateNode):My(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&mf(e,e.memoizedProps,a.memoizedProps)}break;case 27:mn(t,e),hn(e),l&512&&(kt||a===null||ca(a,a.return)),a!==null&&l&4&&mf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(mn(t,e),hn(e),l&512&&(kt||a===null||ca(a,a.return)),e.flags&32){c=e.stateNode;try{mr(c,"")}catch(Se){ot(e,e.return,Se)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,mf(e,c,a!==null?a.memoizedProps:c)),l&1024&&(gf=!0);break;case 6:if(mn(t,e),hn(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(Se){ot(e,e.return,Se)}}break;case 3:if(As=null,c=Zn,Zn=Cs(t.containerInfo),mn(t,e),Zn=c,hn(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yr(t.containerInfo)}catch(Se){ot(e,e.return,Se)}gf&&(gf=!1,Ng(e));break;case 4:l=Zn,Zn=Cs(e.stateNode.containerInfo),mn(t,e),hn(e),Zn=l;break;case 12:mn(t,e),hn(e);break;case 31:mn(t,e),hn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 13:mn(t,e),hn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ds=St()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 22:c=e.memoizedState!==null;var k=a!==null&&a.memoizedState!==null,K=Oa,re=kt;if(Oa=K||c,kt=re||k,mn(t,e),kt=re,Oa=K,hn(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||k||Oa||kt||Jo(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){k=a=t;try{if(f=k.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=k.stateNode;var ue=k.memoizedProps.style,Z=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Se){ot(k,k.return,Se)}}}else if(t.tag===6){if(a===null){k=t;try{k.stateNode.nodeValue=c?"":k.memoizedProps}catch(Se){ot(k,k.return,Se)}}}else if(t.tag===18){if(a===null){k=t;try{var ae=k.stateNode;c?vy(ae,!0):vy(k.stateNode,!1)}catch(Se){ot(k,k.return,Se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,us(e,a))));break;case 19:mn(t,e),hn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,us(e,l)));break;case 30:break;case 21:break;default:mn(t,e),hn(e)}}function hn(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(xg(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=hf(e);cs(e,f,c);break;case 5:var b=a.stateNode;a.flags&32&&(mr(b,""),a.flags&=-33);var w=hf(e);cs(e,w,b);break;case 3:case 4:var k=a.stateNode.containerInfo,K=hf(e);pf(e,K,k);break;default:throw Error(i(161))}}catch(re){ot(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ng(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ng(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Eg(e,t.alternate,t),t=t.sibling}function Jo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:oo(4,t,t.return),Jo(t);break;case 1:ca(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&vg(t,t.return,a),Jo(t);break;case 27:Vl(t.stateNode);case 26:case 5:ca(t,t.return),Jo(t);break;case 22:t.memoizedState===null&&Jo(t);break;case 30:Jo(t);break;default:Jo(t)}e=e.sibling}}function za(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:za(c,f,a),Ll(4,f);break;case 1:if(za(c,f,a),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(K){ot(l,l.return,K)}if(l=f,c=l.updateQueue,c!==null){var w=l.stateNode;try{var k=c.shared.hiddenCallbacks;if(k!==null)for(c.shared.hiddenCallbacks=null,c=0;c<k.length;c++)lp(k[c],w)}catch(K){ot(l,l.return,K)}}a&&b&64&&yg(f),Hl(f,f.return);break;case 27:Sg(f);case 26:case 5:za(c,f,a),a&&l===null&&b&4&&bg(f),Hl(f,f.return);break;case 12:za(c,f,a);break;case 31:za(c,f,a),a&&b&4&&Ag(c,f);break;case 13:za(c,f,a),a&&b&4&&Mg(c,f);break;case 22:f.memoizedState===null&&za(c,f,a),Hl(f,f.return);break;case 30:break;default:za(c,f,a)}t=t.sibling}}function yf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&El(a))}function vf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e))}function Wn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rg(e,t,a,l),t=t.sibling}function Rg(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,a,l),c&2048&&Ll(9,t);break;case 1:Wn(e,t,a,l);break;case 3:Wn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e)));break;case 12:if(c&2048){Wn(e,t,a,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,w=f.onPostCommit;typeof w=="function"&&w(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){ot(t,t.return,k)}}else Wn(e,t,a,l);break;case 31:Wn(e,t,a,l);break;case 13:Wn(e,t,a,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Wn(e,t,a,l):Bl(e,t):f._visibility&2?Wn(e,t,a,l):(f._visibility|=2,jr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&yf(b,t);break;case 24:Wn(e,t,a,l),c&2048&&vf(t.alternate,t);break;default:Wn(e,t,a,l)}}function jr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,w=a,k=l,K=b.flags;switch(b.tag){case 0:case 11:case 15:jr(f,b,w,k,c),Ll(8,b);break;case 23:break;case 22:var re=b.stateNode;b.memoizedState!==null?re._visibility&2?jr(f,b,w,k,c):Bl(f,b):(re._visibility|=2,jr(f,b,w,k,c)),c&&K&2048&&yf(b.alternate,b);break;case 24:jr(f,b,w,k,c),c&&K&2048&&vf(b.alternate,b);break;default:jr(f,b,w,k,c)}t=t.sibling}}function Bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:Bl(a,l),c&2048&&yf(l.alternate,l);break;case 24:Bl(a,l),c&2048&&vf(l.alternate,l);break;default:Bl(a,l)}t=t.sibling}}var Ul=8192;function zr(e,t,a){if(e.subtreeFlags&Ul)for(e=e.child;e!==null;)Og(e,t,a),e=e.sibling}function Og(e,t,a){switch(e.tag){case 26:zr(e,t,a),e.flags&Ul&&e.memoizedState!==null&&x2(a,Zn,e.memoizedState,e.memoizedProps);break;case 5:zr(e,t,a);break;case 3:case 4:var l=Zn;Zn=Cs(e.stateNode.containerInfo),zr(e,t,a),Zn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ul,Ul=16777216,zr(e,t,a),Ul=l):zr(e,t,a));break;default:zr(e,t,a)}}function Dg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];$t=l,zg(l,e)}Dg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jg(e),e=e.sibling}function jg(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&oo(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fs(e)):Il(e);break;default:Il(e)}}function fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];$t=l,zg(l,e)}Dg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:oo(8,t,t.return),fs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function zg(e,t){for(;$t!==null;){var a=$t;switch(a.tag){case 0:case 11:case 15:oo(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:El(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,$t=l;else e:for(a=e;$t!==null;){l=$t;var c=l.sibling,f=l.return;if(Cg(l),l===a){$t=null;break e}if(c!==null){c.return=f,$t=c;break e}$t=f}}}var kw={getCacheForType:function(e){var t=Vt(Dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Vt(Dt).controller.signal}},Lw=typeof WeakMap=="function"?WeakMap:Map,et=0,ft=null,Ge=null,Ve=0,at=0,Nn=null,ro=!1,kr=!1,bf=!1,ka=0,Et=0,lo=0,er=0,xf=0,Rn=0,Lr=0,Pl=null,pn=null,Sf=!1,ds=0,kg=0,ms=1/0,hs=null,io=null,Bt=0,so=null,Hr=null,La=0,wf=0,Ef=null,Lg=null,$l=0,Cf=null;function On(){return(et&2)!==0&&Ve!==0?Ve&-Ve:T.T!==null?Rf():me()}function Hg(){if(Rn===0)if((Ve&536870912)===0||Fe){var e=Sn;Sn<<=1,(Sn&3932160)===0&&(Sn=262144),Rn=e}else Rn=536870912;return e=Mn.current,e!==null&&(e.flags|=32),Rn}function gn(e,t,a){(e===ft&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Br(e,0),co(e,Ve,Rn,!1)),ht(e,a),((et&2)===0||e!==ft)&&(e===ft&&((et&2)===0&&(er|=a),Et===4&&co(e,Ve,Rn,!1)),ua(e))}function Bg(e,t,a){if((et&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||mt(e,t),c=l?Uw(e,t):Af(e,t,!0),f=l;do{if(c===0){kr&&!l&&co(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Hw(a)){c=Af(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var w=e;c=Pl;var k=w.current.memoizedState.isDehydrated;if(k&&(Br(w,b).flags|=256),b=Af(w,b,!1),b!==2){if(bf&&!k){w.errorRecoveryDisabledLanes|=f,er|=f,c=4;break e}f=pn,pn=c,f!==null&&(pn===null?pn=f:pn.push.apply(pn,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){Br(e,0),co(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:co(l,t,Rn,!ro);break e;case 2:pn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=ds+300-St(),10<c)){if(co(l,t,Rn,!ro),je(l,0,!0)!==0)break e;La=t,l.timeoutHandle=py(Ug.bind(null,l,a,pn,hs,Sf,t,Rn,er,Lr,ro,f,"Throttled",-0,0),c);break e}Ug(l,a,pn,hs,Sf,t,Rn,er,Lr,ro,f,null,-0,0)}}break}while(!0);ua(e)}function Ug(e,t,a,l,c,f,b,w,k,K,re,ue,Z,ae){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},Og(t,f,ue);var Se=(f&62914560)===f?ds-St():(f&4194048)===f?kg-St():0;if(Se=S2(ue,Se),Se!==null){La=f,e.cancelPendingCommit=Se(Xg.bind(null,e,t,f,a,l,c,b,w,k,re,ue,null,Z,ae)),co(e,f,b,!K);return}}Xg(e,t,f,a,l,c,b,w,k)}function Hw(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],f=c.getSnapshot;c=c.value;try{if(!Tn(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function co(e,t,a,l){t&=~xf,t&=~er,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-ut(c),b=1<<f;l[f]=-1,c&=~b}a!==0&&ba(e,a,t)}function ps(){return(et&6)===0?(Gl(0),!1):!0}function Tf(){if(Ge!==null){if(at===0)var e=Ge.return;else e=Ge,Ta=qo=null,Iu(e),_r=null,Tl=0,e=Ge;for(;e!==null;)gg(e.alternate,e),e=e.return;Ge=null}}function Br(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,a2(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),La=0,Tf(),ft=e,Ge=a=Ea(e.current,null),Ve=t,at=0,Nn=null,ro=!1,kr=mt(e,t),bf=!1,Lr=Rn=xf=er=lo=Et=0,pn=Pl=null,Sf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-ut(l),f=1<<c;t|=e[c],l&=~f}return ka=t,Li(),a}function Ig(e,t){He=null,T.H=jl,t===Mr||t===Yi?(t=np(),at=3):t===_u?(t=np(),at=4):at=t===nf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nn=t,Ge===null&&(Et=1,os(e,Un(t,e.current)))}function Pg(){var e=Mn.current;return e===null?!0:(Ve&4194048)===Ve?Gn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===Gn:!1}function $g(){var e=T.H;return T.H=jl,e===null?jl:e}function Gg(){var e=T.A;return T.A=kw,e}function gs(){Et=4,ro||(Ve&4194048)!==Ve&&Mn.current!==null||(kr=!0),(lo&134217727)===0&&(er&134217727)===0||ft===null||co(ft,Ve,Rn,!1)}function Af(e,t,a){var l=et;et|=2;var c=$g(),f=Gg();(ft!==e||Ve!==t)&&(hs=null,Br(e,t)),t=!1;var b=Et;e:do try{if(at!==0&&Ge!==null){var w=Ge,k=Nn;switch(at){case 8:Tf(),b=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(t=!0);var K=at;if(at=0,Nn=null,Ur(e,w,k,K),a&&kr){b=0;break e}break;default:K=at,at=0,Nn=null,Ur(e,w,k,K)}}Bw(),b=Et;break}catch(re){Ig(e,re)}while(!0);return t&&e.shellSuspendCounter++,Ta=qo=null,et=l,T.H=c,T.A=f,Ge===null&&(ft=null,Ve=0,Li()),b}function Bw(){for(;Ge!==null;)Yg(Ge)}function Uw(e,t){var a=et;et|=2;var l=$g(),c=Gg();ft!==e||Ve!==t?(hs=null,ms=St()+500,Br(e,t)):kr=mt(e,t);e:do try{if(at!==0&&Ge!==null){t=Ge;var f=Nn;t:switch(at){case 1:at=0,Nn=null,Ur(e,t,f,1);break;case 2:case 9:if(ep(f)){at=0,Nn=null,qg(t);break}t=function(){at!==2&&at!==9||ft!==e||(at=7),ua(e)},f.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:ep(f)?(at=0,Nn=null,qg(t)):(at=0,Nn=null,Ur(e,t,f,7));break;case 5:var b=null;switch(Ge.tag){case 26:b=Ge.memoizedState;case 5:case 27:var w=Ge;if(b?Ry(b):w.stateNode.complete){at=0,Nn=null;var k=w.sibling;if(k!==null)Ge=k;else{var K=w.return;K!==null?(Ge=K,ys(K)):Ge=null}break t}}at=0,Nn=null,Ur(e,t,f,5);break;case 6:at=0,Nn=null,Ur(e,t,f,6);break;case 8:Tf(),Et=6;break e;default:throw Error(i(462))}}Iw();break}catch(re){Ig(e,re)}while(!0);return Ta=qo=null,T.H=l,T.A=c,et=a,Ge!==null?0:(ft=null,Ve=0,Li(),Et)}function Iw(){for(;Ge!==null&&!Tt();)Yg(Ge)}function Yg(e){var t=hg(e.alternate,e,ka);e.memoizedProps=e.pendingProps,t===null?ys(e):Ge=t}function qg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=sg(a,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=sg(a,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:Iu(t);default:gg(a,t),t=Ge=Gh(t,ka),t=hg(a,t,ka)}e.memoizedProps=e.pendingProps,t===null?ys(e):Ge=t}function Ur(e,t,a,l){Ta=qo=null,Iu(t),_r=null,Tl=0;var c=t.return;try{if(_w(e,c,t,a,Ve)){Et=1,os(e,Un(a,e.current)),Ge=null;return}}catch(f){if(c!==null)throw Ge=c,f;Et=1,os(e,Un(a,e.current)),Ge=null;return}t.flags&32768?(Fe||l===1?e=!0:kr||(Ve&536870912)!==0?e=!1:(ro=e=!0,(l===2||l===9||l===3||l===6)&&(l=Mn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Vg(t,e)):ys(t)}function ys(e){var t=e;do{if((t.flags&32768)!==0){Vg(t,ro);return}e=t.return;var a=Ow(t.alternate,t,ka);if(a!==null){Ge=a;return}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Et===0&&(Et=5)}function Vg(e,t){do{var a=Dw(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);Et=6,Ge=null}function Xg(e,t,a,l,c,f,b,w,k){e.cancelPendingCommit=null;do vs();while(Bt!==0);if((et&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=mu,Qt(e,a,f,b,w,k),e===ft&&(Ge=ft=null,Ve=0),Hr=t,so=e,La=a,wf=f,Ef=c,Lg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yw(De,function(){return Wg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,c=O.p,O.p=2,b=et,et|=4;try{jw(e,t,a)}finally{et=b,O.p=c,T.T=l}}Bt=1,Fg(),Kg(),Qg()}}function Fg(){if(Bt===1){Bt=0;var e=so,t=Hr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var l=O.p;O.p=2;var c=et;et|=4;try{_g(t,e);var f=Bf,b=zh(e.containerInfo),w=f.focusedElem,k=f.selectionRange;if(b!==w&&w&&w.ownerDocument&&jh(w.ownerDocument.documentElement,w)){if(k!==null&&su(w)){var K=k.start,re=k.end;if(re===void 0&&(re=K),"selectionStart"in w)w.selectionStart=K,w.selectionEnd=Math.min(re,w.value.length);else{var ue=w.ownerDocument||document,Z=ue&&ue.defaultView||window;if(Z.getSelection){var ae=Z.getSelection(),Se=w.textContent.length,Ne=Math.min(k.start,Se),ct=k.end===void 0?Ne:Math.min(k.end,Se);!ae.extend&&Ne>ct&&(b=ct,ct=Ne,Ne=b);var G=Dh(w,Ne),I=Dh(w,ct);if(G&&I&&(ae.rangeCount!==1||ae.anchorNode!==G.node||ae.anchorOffset!==G.offset||ae.focusNode!==I.node||ae.focusOffset!==I.offset)){var F=ue.createRange();F.setStart(G.node,G.offset),ae.removeAllRanges(),Ne>ct?(ae.addRange(F),ae.extend(I.node,I.offset)):(F.setEnd(I.node,I.offset),ae.addRange(F))}}}}for(ue=[],ae=w;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var se=ue[w];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Rs=!!Hf,Bf=Hf=null}finally{et=c,O.p=l,T.T=a}}e.current=t,Bt=2}}function Kg(){if(Bt===2){Bt=0;var e=so,t=Hr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var l=O.p;O.p=2;var c=et;et|=4;try{Eg(e,t.alternate,t)}finally{et=c,O.p=l,T.T=a}}Bt=3}}function Qg(){if(Bt===4||Bt===3){Bt=0,nn();var e=so,t=Hr,a=La,l=Lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,Hr=so=null,Zg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(io=null),ce(a),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(sn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,c=O.p,O.p=2,T.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var w=l[b];f(w.value,{componentStack:w.stack})}}finally{T.T=t,O.p=c}}(La&3)!==0&&vs(),ua(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Cf?$l++:($l=0,Cf=e):$l=0,Gl(0)}}function Zg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,El(t)))}function vs(){return Fg(),Kg(),Qg(),Wg()}function Wg(){if(Bt!==5)return!1;var e=so,t=wf;wf=0;var a=ce(La),l=T.T,c=O.p;try{O.p=32>a?32:a,T.T=null,a=Ef,Ef=null;var f=so,b=La;if(Bt=0,Hr=so=null,La=0,(et&6)!==0)throw Error(i(331));var w=et;if(et|=4,jg(f.current),Rg(f,f.current,b,a),et=w,Gl(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(sn,f)}catch{}return!0}finally{O.p=c,T.T=l,Zg(e,t)}}function Jg(e,t,a){t=Un(a,t),t=tf(e.stateNode,t,2),e=to(e,t,2),e!==null&&(ht(e,2),ua(e))}function ot(e,t,a){if(e.tag===3)Jg(e,e,a);else for(;t!==null;){if(t.tag===3){Jg(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(io===null||!io.has(l))){e=Un(a,e),a=eg(2),l=to(t,a,2),l!==null&&(tg(a,l,t,e),ht(l,2),ua(l));break}}t=t.return}}function Mf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Lw;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(bf=!0,c.add(a),e=Pw.bind(null,e,t,a),t.then(e,e))}function Pw(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Ve&a)===a&&(Et===4||Et===3&&(Ve&62914560)===Ve&&300>St()-ds?(et&2)===0&&Br(e,0):xf|=a,Lr===Ve&&(Lr=0)),ua(e)}function ey(e,t){t===0&&(t=Pt()),e=$o(e,t),e!==null&&(ht(e,t),ua(e))}function $w(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ey(e,a)}function Gw(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),ey(e,a)}function Yw(e,t){return bn(e,t)}var bs=null,Ir=null,_f=!1,xs=!1,Nf=!1,uo=0;function ua(e){e!==Ir&&e.next===null&&(Ir===null?bs=Ir=e:Ir=Ir.next=e),xs=!0,_f||(_f=!0,Vw())}function Gl(e,t){if(!Nf&&xs){Nf=!0;do for(var a=!1,l=bs;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,w=l.pingedLanes;f=(1<<31-ut(42|e)+1)-1,f&=c&~(b&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,oy(l,f))}else f=Ve,f=je(l,l===ft?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||mt(l,f)||(a=!0,oy(l,f));l=l.next}while(a);Nf=!1}}function qw(){ty()}function ty(){xs=_f=!1;var e=0;uo!==0&&n2()&&(e=uo);for(var t=St(),a=null,l=bs;l!==null;){var c=l.next,f=ny(l,t);f===0?(l.next=null,a===null?bs=c:a.next=c,c===null&&(Ir=a)):(a=l,(e!==0||(f&3)!==0)&&(xs=!0)),l=c}Bt!==0&&Bt!==5||Gl(e),uo!==0&&(uo=0)}function ny(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-ut(f),w=1<<b,k=c[b];k===-1?((w&a)===0||(w&l)!==0)&&(c[b]=Rt(w,t)):k<=t&&(e.expiredLanes|=w),f&=~w}if(t=ft,a=Ve,a=je(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&xn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||mt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&xn(l),ce(a)){case 2:case 8:a=Je;break;case 32:a=De;break;case 268435456:a=It;break;default:a=De}return l=ay.bind(null,e),a=bn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&xn(l),e.callbackPriority=2,e.callbackNode=null,2}function ay(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(vs()&&e.callbackNode!==a)return null;var l=Ve;return l=je(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Bg(e,l,t),ny(e,St()),e.callbackNode!=null&&e.callbackNode===a?ay.bind(null,e):null)}function oy(e,t){if(vs())return null;Bg(e,t,!0)}function Vw(){o2(function(){(et&6)!==0?bn(Oe,qw):ty()})}function Rf(){if(uo===0){var e=Tr;e===0&&(e=Fn,Fn<<=1,(Fn&261888)===0&&(Fn=256)),uo=e}return uo}function ry(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_i(""+e)}function ly(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Xw(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var f=ry((c[qe]||null).action),b=l.submitter;b&&(t=(t=b[qe]||null)?ry(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var w=new Di("action","action",null,l,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(uo!==0){var k=b?ly(c,b):new FormData(c);Ku(a,{pending:!0,data:k,method:c.method,action:f},null,k)}}else typeof f=="function"&&(w.preventDefault(),k=b?ly(c,b):new FormData(c),Ku(a,{pending:!0,data:k,method:c.method,action:f},f,k))},currentTarget:c}]})}}for(var Of=0;Of<du.length;Of++){var Df=du[Of],Fw=Df.toLowerCase(),Kw=Df[0].toUpperCase()+Df.slice(1);Qn(Fw,"on"+Kw)}Qn(Hh,"onAnimationEnd"),Qn(Bh,"onAnimationIteration"),Qn(Uh,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(fw,"onTransitionRun"),Qn(dw,"onTransitionStart"),Qn(mw,"onTransitionCancel"),Qn(Ih,"onTransitionEnd"),Xa("onMouseEnter",["mouseout","mouseover"]),Xa("onMouseLeave",["mouseout","mouseover"]),Xa("onPointerEnter",["pointerout","pointerover"]),Xa("onPointerLeave",["pointerout","pointerover"]),Kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="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(" "),Qw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yl));function iy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var w=l[b],k=w.instance,K=w.currentTarget;if(w=w.listener,k!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(re){ki(re)}c.currentTarget=null,f=k}else for(b=0;b<l.length;b++){if(w=l[b],k=w.instance,K=w.currentTarget,w=w.listener,k!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(re){ki(re)}c.currentTarget=null,f=k}}}}function Ye(e,t){var a=t[lt];a===void 0&&(a=t[lt]=new Set);var l=e+"__bubble";a.has(l)||(sy(t,e,2,!1),a.add(l))}function jf(e,t,a){var l=0;t&&(l|=4),sy(a,e,l,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function zf(e){if(!e[Ss]){e[Ss]=!0,fr.forEach(function(a){a!=="selectionchange"&&(Qw.has(a)||jf(a,!1,e),jf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,jf("selectionchange",!1,t))}}function sy(e,t,a,l){switch(Hy(t)){case 2:var c=C2;break;case 8:c=T2;break;default:c=Kf}a=c.bind(null,t,a,e),c=void 0,!Jc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function kf(e,t,a,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var w=l.stateNode.containerInfo;if(w===c)break;if(b===4)for(b=l.return;b!==null;){var k=b.tag;if((k===3||k===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;w!==null;){if(b=un(w),b===null)return;if(k=b.tag,k===5||k===6||k===26||k===27){l=f=b;continue e}w=w.parentNode}}l=l.return}mh(function(){var K=f,re=Zc(a),ue=[];e:{var Z=Ph.get(e);if(Z!==void 0){var ae=Di,Se=e;switch(e){case"keypress":if(Ri(a)===0)break e;case"keydown":case"keyup":ae=GS;break;case"focusin":Se="focus",ae=au;break;case"focusout":Se="blur",ae=au;break;case"beforeblur":case"afterblur":ae=au;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=OS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=VS;break;case Hh:case Bh:case Uh:ae=zS;break;case Ih:ae=FS;break;case"scroll":case"scrollend":ae=NS;break;case"wheel":ae=QS;break;case"copy":case"cut":case"paste":ae=LS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=vh;break;case"toggle":case"beforetoggle":ae=WS}var Ne=(t&4)!==0,ct=!Ne&&(e==="scroll"||e==="scrollend"),G=Ne?Z!==null?Z+"Capture":null:Z;Ne=[];for(var I=K,F;I!==null;){var se=I;if(F=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||F===null||G===null||(se=dl(I,G),se!=null&&Ne.push(ql(I,se,F))),ct)break;I=I.return}0<Ne.length&&(Z=new ae(Z,Se,null,a,re),ue.push({event:Z,listeners:Ne}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",Z&&a!==Qc&&(Se=a.relatedTarget||a.fromElement)&&(un(Se)||Se[Qe]))break e;if((ae||Z)&&(Z=re.window===re?re:(Z=re.ownerDocument)?Z.defaultView||Z.parentWindow:window,ae?(Se=a.relatedTarget||a.toElement,ae=K,Se=Se?un(Se):null,Se!==null&&(ct=u(Se),Ne=Se.tag,Se!==ct||Ne!==5&&Ne!==27&&Ne!==6)&&(Se=null)):(ae=null,Se=K),ae!==Se)){if(Ne=gh,se="onMouseLeave",G="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=vh,se="onPointerLeave",G="onPointerEnter",I="pointer"),ct=ae==null?Z:En(ae),F=Se==null?Z:En(Se),Z=new Ne(se,I+"leave",ae,a,re),Z.target=ct,Z.relatedTarget=F,se=null,un(re)===K&&(Ne=new Ne(G,I+"enter",Se,a,re),Ne.target=F,Ne.relatedTarget=ct,se=Ne),ct=se,ae&&Se)t:{for(Ne=Zw,G=ae,I=Se,F=0,se=G;se;se=Ne(se))F++;se=0;for(var Ae=I;Ae;Ae=Ne(Ae))se++;for(;0<F-se;)G=Ne(G),F--;for(;0<se-F;)I=Ne(I),se--;for(;F--;){if(G===I||I!==null&&G===I.alternate){Ne=G;break t}G=Ne(G),I=Ne(I)}Ne=null}else Ne=null;ae!==null&&cy(ue,Z,ae,Ne,!1),Se!==null&&ct!==null&&cy(ue,ct,Se,Ne,!0)}}e:{if(Z=K?En(K):window,ae=Z.nodeName&&Z.nodeName.toLowerCase(),ae==="select"||ae==="input"&&Z.type==="file")var Ze=Ah;else if(Ch(Z))if(Mh)Ze=sw;else{Ze=lw;var Te=rw}else ae=Z.nodeName,!ae||ae.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?K&&Kc(K.elementType)&&(Ze=Ah):Ze=iw;if(Ze&&(Ze=Ze(e,K))){Th(ue,Ze,a,re);break e}Te&&Te(e,Z,K),e==="focusout"&&K&&Z.type==="number"&&K.memoizedProps.value!=null&&Fc(Z,"number",Z.value)}switch(Te=K?En(K):window,e){case"focusin":(Ch(Te)||Te.contentEditable==="true")&&(yr=Te,cu=K,xl=null);break;case"focusout":xl=cu=yr=null;break;case"mousedown":uu=!0;break;case"contextmenu":case"mouseup":case"dragend":uu=!1,kh(ue,a,re);break;case"selectionchange":if(uw)break;case"keydown":case"keyup":kh(ue,a,re)}var Ie;if(ru)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else gr?wh(e,a)&&(Xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Xe="onCompositionStart");Xe&&(bh&&a.locale!=="ko"&&(gr||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&gr&&(Ie=hh()):(Fa=re,eu="value"in Fa?Fa.value:Fa.textContent,gr=!0)),Te=ws(K,Xe),0<Te.length&&(Xe=new yh(Xe,e,null,a,re),ue.push({event:Xe,listeners:Te}),Ie?Xe.data=Ie:(Ie=Eh(a),Ie!==null&&(Xe.data=Ie)))),(Ie=ew?tw(e,a):nw(e,a))&&(Xe=ws(K,"onBeforeInput"),0<Xe.length&&(Te=new yh("onBeforeInput","beforeinput",null,a,re),ue.push({event:Te,listeners:Xe}),Te.data=Ie)),Xw(ue,e,K,a,re)}iy(ue,t)})}function ql(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ws(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=dl(e,a),c!=null&&l.unshift(ql(e,c,f)),c=dl(e,t),c!=null&&l.push(ql(e,c,f))),e.tag===3)return l;e=e.return}return[]}function Zw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cy(e,t,a,l,c){for(var f=t._reactName,b=[];a!==null&&a!==l;){var w=a,k=w.alternate,K=w.stateNode;if(w=w.tag,k!==null&&k===l)break;w!==5&&w!==26&&w!==27||K===null||(k=K,c?(K=dl(a,f),K!=null&&b.unshift(ql(a,K,k))):c||(K=dl(a,f),K!=null&&b.push(ql(a,K,k)))),a=a.return}b.length!==0&&e.push({event:t,listeners:b})}var Ww=/\r\n?/g,Jw=/\u0000|\uFFFD/g;function uy(e){return(typeof e=="string"?e:""+e).replace(Ww,`
|
|
49
|
+
`).replace(Jw,"")}function fy(e,t){return t=uy(t),uy(e)===t}function st(e,t,a,l,c,f){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||mr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&mr(e,""+l);break;case"className":Ai(e,"class",l);break;case"tabIndex":Ai(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ai(e,a,l);break;case"style":fh(e,l,f);break;case"data":if(t!=="object"){Ai(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=_i(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=_i(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Sa);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=_i(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),Ti(e,"popover",l);break;case"xlinkActuate":xa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":xa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":xa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":xa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":xa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":xa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":xa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":xa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":xa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ti(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=MS.get(a)||a,Ti(e,a,l))}}function Lf(e,t,a,l,c,f){switch(a){case"style":fh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?mr(e,l):(typeof l=="number"||typeof l=="bigint")&&mr(e,""+l);break;case"onScroll":l!=null&&Ye("scroll",e);break;case"onScrollEnd":l!=null&&Ye("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bo.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[qe]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ti(e,a,l)}}}function Ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var l=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var b=a[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,f,b,a,null)}}c&&st(e,t,"srcSet",a.srcSet,a,null),l&&st(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var w=f=b=c=null,k=null,K=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":b=re;break;case"checked":k=re;break;case"defaultChecked":K=re;break;case"value":f=re;break;case"defaultValue":w=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,t));break;default:st(e,t,l,re,a,null)}}ih(e,f,w,k,K,b,c,!1);return;case"select":Ye("invalid",e),l=b=f=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":f=w;break;case"defaultValue":b=w;break;case"multiple":l=w;default:st(e,t,c,w,a,null)}t=f,a=b,e.multiple=!!l,t!=null?dr(e,!!l,t,!1):a!=null&&dr(e,!!l,a,!0);return;case"textarea":Ye("invalid",e),f=c=l=null;for(b in a)if(a.hasOwnProperty(b)&&(w=a[b],w!=null))switch(b){case"value":l=w;break;case"defaultValue":c=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:st(e,t,b,w,a,null)}ch(e,l,c,f);return;case"option":for(k in a)if(a.hasOwnProperty(k)&&(l=a[k],l!=null))switch(k){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:st(e,t,k,l,a,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(l=0;l<Yl.length;l++)Ye(Yl[l],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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(K in a)if(a.hasOwnProperty(K)&&(l=a[K],l!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,K,l,a,null)}return;default:if(Kc(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&Lf(e,t,re,l,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(l=a[w],l!=null&&st(e,t,w,l,a,null))}function e2(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,w=null,k=null,K=null,re=null;for(ae in a){var ue=a[ae];if(a.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":k=ue;default:l.hasOwnProperty(ae)||st(e,t,ae,null,l,ue)}}for(var Z in l){var ae=l[Z];if(ue=a[Z],l.hasOwnProperty(Z)&&(ae!=null||ue!=null))switch(Z){case"type":f=ae;break;case"name":c=ae;break;case"checked":K=ae;break;case"defaultChecked":re=ae;break;case"value":b=ae;break;case"defaultValue":w=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,t));break;default:ae!==ue&&st(e,t,Z,ae,l,ue)}}Xc(e,b,w,k,K,re,f,c);return;case"select":ae=b=w=Z=null;for(f in a)if(k=a[f],a.hasOwnProperty(f)&&k!=null)switch(f){case"value":break;case"multiple":ae=k;default:l.hasOwnProperty(f)||st(e,t,f,null,l,k)}for(c in l)if(f=l[c],k=a[c],l.hasOwnProperty(c)&&(f!=null||k!=null))switch(c){case"value":Z=f;break;case"defaultValue":w=f;break;case"multiple":b=f;default:f!==k&&st(e,t,c,f,l,k)}t=w,a=b,l=ae,Z!=null?dr(e,!!a,Z,!1):!!l!=!!a&&(t!=null?dr(e,!!a,t,!0):dr(e,!!a,a?[]:"",!1));return;case"textarea":ae=Z=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:st(e,t,w,null,l,c)}for(b in l)if(c=l[b],f=a[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":Z=c;break;case"defaultValue":ae=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&st(e,t,b,c,l,f)}sh(e,Z,ae);return;case"option":for(var Se in a)if(Z=a[Se],a.hasOwnProperty(Se)&&Z!=null&&!l.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:st(e,t,Se,null,l,Z)}for(k in l)if(Z=l[k],ae=a[k],l.hasOwnProperty(k)&&Z!==ae&&(Z!=null||ae!=null))switch(k){case"selected":e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:st(e,t,k,Z,l,ae)}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 Ne in a)Z=a[Ne],a.hasOwnProperty(Ne)&&Z!=null&&!l.hasOwnProperty(Ne)&&st(e,t,Ne,null,l,Z);for(K in l)if(Z=l[K],ae=a[K],l.hasOwnProperty(K)&&Z!==ae&&(Z!=null||ae!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,t));break;default:st(e,t,K,Z,l,ae)}return;default:if(Kc(t)){for(var ct in a)Z=a[ct],a.hasOwnProperty(ct)&&Z!==void 0&&!l.hasOwnProperty(ct)&&Lf(e,t,ct,void 0,l,Z);for(re in l)Z=l[re],ae=a[re],!l.hasOwnProperty(re)||Z===ae||Z===void 0&&ae===void 0||Lf(e,t,re,Z,l,ae);return}}for(var G in a)Z=a[G],a.hasOwnProperty(G)&&Z!=null&&!l.hasOwnProperty(G)&&st(e,t,G,null,l,Z);for(ue in l)Z=l[ue],ae=a[ue],!l.hasOwnProperty(ue)||Z===ae||Z==null&&ae==null||st(e,t,ue,Z,l,ae)}function dy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],f=c.transferSize,b=c.initiatorType,w=c.duration;if(f&&w&&dy(b)){for(b=0,w=c.responseEnd,l+=1;l<a.length;l++){var k=a[l],K=k.startTime;if(K>w)break;var re=k.transferSize,ue=k.initiatorType;re&&dy(ue)&&(k=k.responseEnd,b+=re*(k<w?1:(w-K)/(k-K)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hf=null,Bf=null;function Es(e){return e.nodeType===9?e:e.ownerDocument}function my(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 hy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Uf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var If=null;function n2(){var e=window.event;return e&&e.type==="popstate"?e===If?!1:(If=e,!0):(If=null,!1)}var py=typeof setTimeout=="function"?setTimeout:void 0,a2=typeof clearTimeout=="function"?clearTimeout:void 0,gy=typeof Promise=="function"?Promise:void 0,o2=typeof queueMicrotask=="function"?queueMicrotask:typeof gy<"u"?function(e){return gy.resolve(null).then(e).catch(r2)}:py;function r2(e){setTimeout(function(){throw e})}function fo(e){return e==="head"}function yy(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Yr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Vl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Vl(a);for(var f=a.firstChild;f;){var b=f.nextSibling,w=f.nodeName;f[Yt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=b}}else a==="body"&&Vl(e.ownerDocument.body);a=c}while(a);Yr(t)}function vy(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Pf(a),At(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function l2(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Yt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Yn(e.nextSibling),e===null)break}return null}function i2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Yn(e.nextSibling),e===null))return null;return e}function by(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yn(e.nextSibling),e===null))return null;return e}function $f(e){return e.data==="$?"||e.data==="$~"}function Gf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function s2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Yf=null;function xy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Yn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Sy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function wy(e,t,a){switch(t=Es(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Vl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var qn=new Map,Ey=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ha=O.d;O.d={f:c2,r:u2,D:f2,C:d2,L:m2,m:h2,X:g2,S:p2,M:y2};function c2(){var e=Ha.f(),t=ps();return e||t}function u2(e){var t=bt(e);t!==null&&t.tag===5&&t.type==="form"?Ip(t):Ha.r(e)}var Pr=typeof document>"u"?null:document;function Cy(e,t,a){var l=Pr;if(l&&typeof t=="string"&&t){var c=Hn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Ey.has(c)||(Ey.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ft(t,"link",e),Ot(t),l.head.appendChild(t)))}}function f2(e){Ha.D(e),Cy("dns-prefetch",e,null)}function d2(e,t){Ha.C(e,t),Cy("preconnect",e,t)}function m2(e,t,a){Ha.L(e,t,a);var l=Pr;if(l&&e&&t){var c='link[rel="preload"][as="'+Hn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Hn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Hn(a.imageSizes)+'"]')):c+='[href="'+Hn(e)+'"]';var f=c;switch(t){case"style":f=$r(e);break;case"script":f=Gr(e)}qn.has(f)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),qn.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Xl(f))||t==="script"&&l.querySelector(Fl(f))||(t=l.createElement("link"),Ft(t,"link",e),Ot(t),l.head.appendChild(t)))}}function h2(e,t){Ha.m(e,t);var a=Pr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Hn(l)+'"][href="'+Hn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Gr(e)}if(!qn.has(f)&&(e=y({rel:"modulepreload",href:e},t),qn.set(f,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fl(f)))return}l=a.createElement("link"),Ft(l,"link",e),Ot(l),a.head.appendChild(l)}}}function p2(e,t,a){Ha.S(e,t,a);var l=Pr;if(l&&e){var c=Cn(l).hoistableStyles,f=$r(e);t=t||"default";var b=c.get(f);if(!b){var w={loading:0,preload:null};if(b=l.querySelector(Xl(f)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=qn.get(f))&&qf(e,a);var k=b=l.createElement("link");Ot(k),Ft(k,"link",e),k._p=new Promise(function(K,re){k.onload=K,k.onerror=re}),k.addEventListener("load",function(){w.loading|=1}),k.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Ts(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:w},c.set(f,b)}}}function g2(e,t){Ha.X(e,t);var a=Pr;if(a&&e){var l=Cn(a).hoistableScripts,c=Gr(e),f=l.get(c);f||(f=a.querySelector(Fl(c)),f||(e=y({src:e,async:!0},t),(t=qn.get(c))&&Vf(e,t),f=a.createElement("script"),Ot(f),Ft(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function y2(e,t){Ha.M(e,t);var a=Pr;if(a&&e){var l=Cn(a).hoistableScripts,c=Gr(e),f=l.get(c);f||(f=a.querySelector(Fl(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=qn.get(c))&&Vf(e,t),f=a.createElement("script"),Ot(f),Ft(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Ty(e,t,a,l){var c=(c=te.current)?Cs(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=$r(a.href),a=Cn(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$r(a.href);var f=Cn(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(Xl(e)))&&!f._p&&(b.instance=f,b.state.loading=5),qn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},qn.set(e,a),f||v2(c,e,a,b.state))),t&&l===null)throw Error(i(528,""));return b}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gr(a),a=Cn(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function $r(e){return'href="'+Hn(e)+'"'}function Xl(e){return'link[rel="stylesheet"]['+e+"]"}function Ay(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function v2(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ft(t,"link",a),Ot(t),e.head.appendChild(t))}function Gr(e){return'[src="'+Hn(e)+'"]'}function Fl(e){return"script[async]"+e}function My(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Hn(a.href)+'"]');if(l)return t.instance=l,Ot(l),l;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ot(l),Ft(l,"style",c),Ts(l,a.precedence,e),t.instance=l;case"stylesheet":c=$r(a.href);var f=e.querySelector(Xl(c));if(f)return t.state.loading|=4,t.instance=f,Ot(f),f;l=Ay(a),(c=qn.get(c))&&qf(l,c),f=(e.ownerDocument||e).createElement("link"),Ot(f);var b=f;return b._p=new Promise(function(w,k){b.onload=w,b.onerror=k}),Ft(f,"link",l),t.state.loading|=4,Ts(f,a.precedence,e),t.instance=f;case"script":return f=Gr(a.src),(c=e.querySelector(Fl(f)))?(t.instance=c,Ot(c),c):(l=a,(c=qn.get(f))&&(l=y({},a),Vf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ot(c),Ft(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ts(l,a.precedence,e));return t.instance}function Ts(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var w=l[b];if(w.dataset.precedence===t)f=w;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function qf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function _y(e,t,a){if(As===null){var l=new Map,c=As=new Map;c.set(a,l)}else c=As,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[Yt]||f[ze]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var w=l.get(b);w?w.push(f):l.set(b,[f])}}return l}function Ny(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function b2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ry(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function x2(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=$r(l.href),f=t.querySelector(Xl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ms.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Ot(f);return}f=t.ownerDocument||t,l=Ay(l),(c=qn.get(c))&&qf(l,c),f=f.createElement("link"),Ot(f);var b=f;b._p=new Promise(function(w,k){b.onload=w,b.onerror=k}),Ft(f,"link",l),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ms.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Xf=0;function S2(e,t){return e.stylesheets&&e.count===0&&Ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ns(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Xf===0&&(Xf=62500*t2());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ns(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Xf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Ms(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _s=null;function Ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_s=new Map,t.forEach(w2,e),_s=null,Ms.call(e))}function w2(e,t){if(!(t.state.loading&4)){var a=_s.get(e);if(a)var l=a.get(null);else{a=new Map,_s.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),l=b)}l&&a.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=a.get(b)||l,f===l&&a.set(null,c),a.set(b,c),this.count++,l=Ms.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Kl={$$typeof:B,Provider:null,Consumer:null,_currentValue:N,_currentValue2:N,_threadCount:0};function E2(e,t,a,l,c,f,b,w,k){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=la(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.hiddenUpdates=la(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Oy(e,t,a,l,c,f,b,w,k,K,re,ue){return e=new E2(e,t,a,b,k,K,re,ue,w),t=1,f===!0&&(t|=24),f=An(3,null,null,t),e.current=f,f.stateNode=e,t=Tu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:t},Nu(f),e}function Dy(e){return e?(e=xr,e):xr}function jy(e,t,a,l,c,f){c=Dy(c),l.context===null?l.context=c:l.pendingContext=c,l=eo(t),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=to(e,l,t),a!==null&&(gn(a,e,t),Ml(a,e,t))}function zy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ff(e,t){zy(e,t),(e=e.alternate)&&zy(e,t)}function ky(e){if(e.tag===13||e.tag===31){var t=$o(e,67108864);t!==null&&gn(t,e,67108864),Ff(e,67108864)}}function Ly(e){if(e.tag===13||e.tag===31){var t=On();t=J(t);var a=$o(e,t);a!==null&&gn(a,e,t),Ff(e,t)}}var Rs=!0;function C2(e,t,a,l){var c=T.T;T.T=null;var f=O.p;try{O.p=2,Kf(e,t,a,l)}finally{O.p=f,T.T=c}}function T2(e,t,a,l){var c=T.T;T.T=null;var f=O.p;try{O.p=8,Kf(e,t,a,l)}finally{O.p=f,T.T=c}}function Kf(e,t,a,l){if(Rs){var c=Qf(l);if(c===null)kf(e,t,l,Os,a),By(e,l);else if(M2(c,e,t,a,l))l.stopPropagation();else if(By(e,l),t&4&&-1<A2.indexOf(e)){for(;c!==null;){var f=bt(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=kn(f.pendingLanes);if(b!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var k=1<<31-ut(b);w.entanglements[1]|=k,b&=~k}ua(f),(et&6)===0&&(ms=St()+500,Gl(0))}}break;case 31:case 13:w=$o(f,2),w!==null&&gn(w,f,2),ps(),Ff(f,2)}if(f=Qf(l),f===null&&kf(e,t,l,Os,a),f===c)break;c=f}c!==null&&l.stopPropagation()}else kf(e,t,l,null,a)}}function Qf(e){return e=Zc(e),Zf(e)}var Os=null;function Zf(e){if(Os=null,e=un(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function Hy(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(qa()){case Oe:return 2;case Je:return 8;case De:case an:return 32;case It:return 268435456;default:return 32}default:return 32}}var Wf=!1,mo=null,ho=null,po=null,Ql=new Map,Zl=new Map,go=[],A2="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 By(e,t){switch(e){case"focusin":case"focusout":mo=null;break;case"dragenter":case"dragleave":ho=null;break;case"mouseover":case"mouseout":po=null;break;case"pointerover":case"pointerout":Ql.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zl.delete(t.pointerId)}}function Wl(e,t,a,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=bt(t),t!==null&&ky(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function M2(e,t,a,l,c){switch(t){case"focusin":return mo=Wl(mo,e,t,a,l,c),!0;case"dragenter":return ho=Wl(ho,e,t,a,l,c),!0;case"mouseover":return po=Wl(po,e,t,a,l,c),!0;case"pointerover":var f=c.pointerId;return Ql.set(f,Wl(Ql.get(f)||null,e,t,a,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Zl.set(f,Wl(Zl.get(f)||null,e,t,a,l,c)),!0}return!1}function Uy(e){var t=un(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,xe(e.priority,function(){Ly(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,xe(e.priority,function(){Ly(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Qf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Qc=l,a.target.dispatchEvent(l),Qc=null}else return t=bt(a),t!==null&&ky(t),e.blockedOn=a,!1;t.shift()}return!0}function Iy(e,t,a){Ds(e)&&a.delete(t)}function _2(){Wf=!1,mo!==null&&Ds(mo)&&(mo=null),ho!==null&&Ds(ho)&&(ho=null),po!==null&&Ds(po)&&(po=null),Ql.forEach(Iy),Zl.forEach(Iy)}function js(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,_2)))}var zs=null;function Py(e){zs!==e&&(zs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){zs===e&&(zs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Zf(l||a)===null)continue;break}var f=bt(a);f!==null&&(e.splice(t,3),t-=3,Ku(f,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Yr(e){function t(k){return js(k,e)}mo!==null&&js(mo,e),ho!==null&&js(ho,e),po!==null&&js(po,e),Ql.forEach(t),Zl.forEach(t);for(var a=0;a<go.length;a++){var l=go[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<go.length&&(a=go[0],a.blockedOn===null);)Uy(a),a.blockedOn===null&&go.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],f=a[l+1],b=c[qe]||null;if(typeof f=="function")b||Py(a);else if(b){var w=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[qe]||null)w=b.formAction;else if(Zf(c)!==null)continue}else w=b.action;typeof w=="function"?a[l+1]=w:(a.splice(l,3),l-=3),Py(a)}}}function $y(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Jf(e){this._internalRoot=e}ks.prototype.render=Jf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=On();jy(a,l,e,t,null,null)},ks.prototype.unmount=Jf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jy(e.current,2,null,e,null,null),ps(),t[Qe]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=me();e={blockedOn:null,target:e,priority:t};for(var a=0;a<go.length&&t!==0&&t<go[a].priority;a++);go.splice(a,0,e),a===0&&Uy(e)}};var Gy=o.version;if(Gy!=="19.2.5")throw Error(i(527,Gy,"19.2.5"));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var N2={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ls.isDisabled&&Ls.supportsFiber)try{sn=Ls.inject(N2),Lt=Ls}catch{}}return ei.createRoot=function(e,t){if(!s(e))throw Error(i(299));var a=!1,l="",c=Qp,f=Zp,b=Wp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=Oy(e,1,!1,null,null,a,l,null,c,f,b,$y),e[Qe]=t.current,zf(e),new Jf(t)},ei.hydrateRoot=function(e,t,a){if(!s(e))throw Error(i(299));var l=!1,c="",f=Qp,b=Zp,w=Wp,k=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(k=a.formState)),t=Oy(e,1,!0,t,a??null,l,c,k,f,b,w,$y),t.context=Dy(null),a=t.current,l=On(),l=J(l),c=eo(l),c.callback=null,to(a,c,l),a=l,t.current.lanes=a,ht(t,a),ua(t),e[Qe]=t.current,zf(e),new ks(t)},ei.version="19.2.5",ei}var Jy;function U2(){if(Jy)return nd.exports;Jy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),nd.exports=B2(),nd.exports}var I2=U2();const P2=gm(I2);var mi=Tv();const Av=gm(mi);function $2(n){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",o.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const G2=n=>{switch(n){case"success":return V2;case"info":return F2;case"warning":return X2;case"error":return K2;default:return null}},Y2=Array(12).fill(0),q2=({visible:n,className:o})=>he.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":n},he.createElement("div",{className:"sonner-spinner"},Y2.map((r,i)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),V2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),X2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),F2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),K2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Q2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Z2=()=>{const[n,o]=he.useState(document.hidden);return he.useEffect(()=>{const r=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Bd=1;class W2{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const r=this.subscribers.indexOf(o);this.subscribers.splice(r,1)}),this.publish=o=>{this.subscribers.forEach(r=>r(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var r;const{message:i,...s}=o,u=typeof(o==null?void 0:o.id)=="number"||((r=o.id)==null?void 0:r.length)>0?o.id:Bd++,d=this.toasts.find(h=>h.id===u),m=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),d?this.toasts=this.toasts.map(h=>h.id===u?(this.publish({...h,...o,id:u,title:i}),{...h,...o,id:u,dismissible:m,title:i}):h):this.addToast({title:i,...s,dismissible:m,id:u}),u},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:o,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),o),this.message=(o,r)=>this.create({...r,message:o}),this.error=(o,r)=>this.create({...r,message:o,type:"error"}),this.success=(o,r)=>this.create({...r,type:"success",message:o}),this.info=(o,r)=>this.create({...r,type:"info",message:o}),this.warning=(o,r)=>this.create({...r,type:"warning",message:o}),this.loading=(o,r)=>this.create({...r,type:"loading",message:o}),this.promise=(o,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:o,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(o instanceof Function?o():o);let u=i!==void 0,d;const m=s.then(async g=>{if(d=["resolve",g],he.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if(eE(g)&&!g.ok){u=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,S=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:S,...C})}else if(g instanceof Error){u=!1;const y=typeof r.error=="function"?await r.error(g):r.error,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:S,...C})}else if(r.success!==void 0){u=!1;const y=typeof r.success=="function"?await r.success(g):r.success,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"success",description:S,...C})}}).catch(async g=>{if(d=["reject",g],r.error!==void 0){u=!1;const x=typeof r.error=="function"?await r.error(g):r.error,y=typeof r.description=="function"?await r.description(g):r.description,A=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:y,...A})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),h=()=>new Promise((g,x)=>m.then(()=>d[0]==="reject"?x(d[1]):g(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(o,r)=>{const i=(r==null?void 0:r.id)||Bd++;return this.create({jsx:o(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const yn=new W2,J2=(n,o)=>{const r=(o==null?void 0:o.id)||Bd++;return yn.addToast({title:n,...o,id:r}),r},eE=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",tE=J2,nE=()=>yn.toasts,aE=()=>yn.getActiveToasts(),Eo=Object.assign(tE,{success:yn.success,info:yn.info,warning:yn.warning,error:yn.error,custom:yn.custom,message:yn.message,promise:yn.promise,dismiss:yn.dismiss,loading:yn.loading},{getHistory:nE,getToasts:aE});$2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hs(n){return n.label!==void 0}const oE=3,rE="24px",lE="16px",e0=4e3,iE=356,sE=14,cE=45,uE=200;function fa(...n){return n.filter(Boolean).join(" ")}function fE(n){const[o,r]=n.split("-"),i=[];return o&&i.push(o),r&&i.push(r),i}const dE=n=>{var o,r,i,s,u,d,m,h,g;const{invert:x,toast:y,unstyled:S,interacting:A,setHeights:C,visibleToasts:E,heights:M,index:R,toasts:j,expanded:B,removeToast:Y,defaultRichColors:ee,closeButton:$,style:V,cancelButtonStyle:z,actionButtonStyle:W,className:ie="",descriptionClassName:fe="",duration:Q,position:oe,gap:de,expandByDefault:pe,classNames:T,icons:O,closeButtonAriaLabel:N="Close toast"}=n,[L,D]=he.useState(null),[_,U]=he.useState(null),[H,P]=he.useState(!1),[X,te]=he.useState(!1),[ne,q]=he.useState(!1),[le,ye]=he.useState(!1),[Ee,be]=he.useState(!1),[Re,ke]=he.useState(0),[_e,rt]=he.useState(0),dt=he.useRef(y.duration||Q||e0),xt=he.useRef(null),nt=he.useRef(null),bn=R===0,xn=R+1<=E,Tt=y.type,nn=y.dismissible!==!1,St=y.className||"",qa=y.descriptionClassName||"",Oe=he.useMemo(()=>M.findIndex(je=>je.toastId===y.id)||0,[M,y.id]),Je=he.useMemo(()=>{var je;return(je=y.closeButton)!=null?je:$},[y.closeButton,$]),De=he.useMemo(()=>y.duration||Q||e0,[y.duration,Q]),an=he.useRef(0),It=he.useRef(0),va=he.useRef(0),ln=he.useRef(null),[sn,Lt]=oe.split("-"),Ht=he.useMemo(()=>M.reduce((je,mt,Rt)=>Rt>=Oe?je:je+mt.height,0),[M,Oe]),ut=Z2(),Va=y.invert||x,ra=Tt==="loading";It.current=he.useMemo(()=>Oe*de+Ht,[Oe,Ht]),he.useEffect(()=>{dt.current=De},[De]),he.useEffect(()=>{P(!0)},[]),he.useEffect(()=>{const je=nt.current;if(je){const mt=je.getBoundingClientRect().height;return rt(mt),C(Rt=>[{toastId:y.id,height:mt,position:y.position},...Rt]),()=>C(Rt=>Rt.filter(Pt=>Pt.toastId!==y.id))}},[C,y.id]),he.useLayoutEffect(()=>{if(!H)return;const je=nt.current,mt=je.style.height;je.style.height="auto";const Rt=je.getBoundingClientRect().height;je.style.height=mt,rt(Rt),C(Pt=>Pt.find(ht=>ht.toastId===y.id)?Pt.map(ht=>ht.toastId===y.id?{...ht,height:Rt}:ht):[{toastId:y.id,height:Rt,position:y.position},...Pt])},[H,y.title,y.description,C,y.id,y.jsx,y.action,y.cancel]);const Gt=he.useCallback(()=>{te(!0),ke(It.current),C(je=>je.filter(mt=>mt.toastId!==y.id)),setTimeout(()=>{Y(y)},uE)},[y,Y,C,It]);he.useEffect(()=>{if(y.promise&&Tt==="loading"||y.duration===1/0||y.type==="loading")return;let je;return B||A||ut?(()=>{if(va.current<an.current){const Pt=new Date().getTime()-an.current;dt.current=dt.current-Pt}va.current=new Date().getTime()})():(()=>{dt.current!==1/0&&(an.current=new Date().getTime(),je=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),Gt()},dt.current))})(),()=>clearTimeout(je)},[B,A,y,Tt,ut,Gt]),he.useEffect(()=>{y.delete&&(Gt(),y.onDismiss==null||y.onDismiss.call(y,y))},[Gt,y.delete]);function Fn(){var je;if(O!=null&&O.loading){var mt;return he.createElement("div",{className:fa(T==null?void 0:T.loader,y==null||(mt=y.classNames)==null?void 0:mt.loader,"sonner-loader"),"data-visible":Tt==="loading"},O.loading)}return he.createElement(q2,{className:fa(T==null?void 0:T.loader,y==null||(je=y.classNames)==null?void 0:je.loader),visible:Tt==="loading"})}const Sn=y.icon||(O==null?void 0:O[Tt])||G2(Tt);var wn,kn;return he.createElement("li",{tabIndex:0,ref:nt,className:fa(ie,St,T==null?void 0:T.toast,y==null||(o=y.classNames)==null?void 0:o.toast,T==null?void 0:T.default,T==null?void 0:T[Tt],y==null||(r=y.classNames)==null?void 0:r[Tt]),"data-sonner-toast":"","data-rich-colors":(wn=y.richColors)!=null?wn:ee,"data-styled":!(y.jsx||y.unstyled||S),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":Ee,"data-removed":X,"data-visible":xn,"data-y-position":sn,"data-x-position":Lt,"data-index":R,"data-front":bn,"data-swiping":ne,"data-dismissible":nn,"data-type":Tt,"data-invert":Va,"data-swipe-out":le,"data-swipe-direction":_,"data-expanded":!!(B||pe&&H),"data-testid":y.testId,style:{"--index":R,"--toasts-before":R,"--z-index":j.length-R,"--offset":`${X?Re:It.current}px`,"--initial-height":pe?"auto":`${_e}px`,...V,...y.style},onDragEnd:()=>{q(!1),D(null),ln.current=null},onPointerDown:je=>{je.button!==2&&(ra||!nn||(xt.current=new Date,ke(It.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(q(!0),ln.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,mt,Rt;if(le||!nn)return;ln.current=null;const Pt=Number(((je=nt.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),la=Number(((mt=nt.current)==null?void 0:mt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ht=new Date().getTime()-((Rt=xt.current)==null?void 0:Rt.getTime()),Qt=L==="x"?Pt:la,ba=Math.abs(Qt)/ht;if(Math.abs(Qt)>=cE||ba>.11){ke(It.current),y.onDismiss==null||y.onDismiss.call(y,y),U(L==="x"?Pt>0?"right":"left":la>0?"down":"up"),Gt(),ye(!0);return}else{var Zt,Wt;(Zt=nt.current)==null||Zt.style.setProperty("--swipe-amount-x","0px"),(Wt=nt.current)==null||Wt.style.setProperty("--swipe-amount-y","0px")}be(!1),q(!1),D(null)},onPointerMove:je=>{var mt,Rt,Pt;if(!ln.current||!nn||((mt=window.getSelection())==null?void 0:mt.toString().length)>0)return;const ht=je.clientY-ln.current.y,Qt=je.clientX-ln.current.x;var ba;const Zt=(ba=n.swipeDirections)!=null?ba:fE(oe);!L&&(Math.abs(Qt)>1||Math.abs(ht)>1)&&D(Math.abs(Qt)>Math.abs(ht)?"x":"y");let Wt={x:0,y:0};const J=ce=>1/(1.5+Math.abs(ce)/20);if(L==="y"){if(Zt.includes("top")||Zt.includes("bottom"))if(Zt.includes("top")&&ht<0||Zt.includes("bottom")&&ht>0)Wt.y=ht;else{const ce=ht*J(ht);Wt.y=Math.abs(ce)<Math.abs(ht)?ce:ht}}else if(L==="x"&&(Zt.includes("left")||Zt.includes("right")))if(Zt.includes("left")&&Qt<0||Zt.includes("right")&&Qt>0)Wt.x=Qt;else{const ce=Qt*J(Qt);Wt.x=Math.abs(ce)<Math.abs(Qt)?ce:Qt}(Math.abs(Wt.x)>0||Math.abs(Wt.y)>0)&&be(!0),(Rt=nt.current)==null||Rt.style.setProperty("--swipe-amount-x",`${Wt.x}px`),(Pt=nt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${Wt.y}px`)}},Je&&!y.jsx&&Tt!=="loading"?he.createElement("button",{"aria-label":N,"data-disabled":ra,"data-close-button":!0,onClick:ra||!nn?()=>{}:()=>{Gt(),y.onDismiss==null||y.onDismiss.call(y,y)},className:fa(T==null?void 0:T.closeButton,y==null||(i=y.classNames)==null?void 0:i.closeButton)},(kn=O==null?void 0:O.close)!=null?kn:Q2):null,(Tt||y.icon||y.promise)&&y.icon!==null&&((O==null?void 0:O[Tt])!==null||y.icon)?he.createElement("div",{"data-icon":"",className:fa(T==null?void 0:T.icon,y==null||(s=y.classNames)==null?void 0:s.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Fn():null,y.type!=="loading"?Sn:null):null,he.createElement("div",{"data-content":"",className:fa(T==null?void 0:T.content,y==null||(u=y.classNames)==null?void 0:u.content)},he.createElement("div",{"data-title":"",className:fa(T==null?void 0:T.title,y==null||(d=y.classNames)==null?void 0:d.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?he.createElement("div",{"data-description":"",className:fa(fe,qa,T==null?void 0:T.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),he.isValidElement(y.cancel)?y.cancel:y.cancel&&Hs(y.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||z,onClick:je=>{Hs(y.cancel)&&nn&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,je),Gt())},className:fa(T==null?void 0:T.cancelButton,y==null||(h=y.classNames)==null?void 0:h.cancelButton)},y.cancel.label):null,he.isValidElement(y.action)?y.action:y.action&&Hs(y.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||W,onClick:je=>{Hs(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,je),!je.defaultPrevented&&Gt())},className:fa(T==null?void 0:T.actionButton,y==null||(g=y.classNames)==null?void 0:g.actionButton)},y.action.label):null)};function t0(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function mE(n,o){const r={};return[n,o].forEach((i,s)=>{const u=s===1,d=u?"--mobile-offset":"--offset",m=u?lE:rE;function h(g){["top","right","bottom","left"].forEach(x=>{r[`${d}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?r[`${d}-${g}`]=m:r[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),r}const hE=he.forwardRef(function(o,r){const{id:i,invert:s,position:u="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:x,mobileOffset:y,theme:S="light",richColors:A,duration:C,style:E,visibleToasts:M=oE,toastOptions:R,dir:j=t0(),gap:B=sE,icons:Y,containerAriaLabel:ee="Notifications"}=o,[$,V]=he.useState([]),z=he.useMemo(()=>i?$.filter(H=>H.toasterId===i):$.filter(H=>!H.toasterId),[$,i]),W=he.useMemo(()=>Array.from(new Set([u].concat(z.filter(H=>H.position).map(H=>H.position)))),[z,u]),[ie,fe]=he.useState([]),[Q,oe]=he.useState(!1),[de,pe]=he.useState(!1),[T,O]=he.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=he.useRef(null),L=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=he.useRef(null),_=he.useRef(!1),U=he.useCallback(H=>{V(P=>{var X;return(X=P.find(te=>te.id===H.id))!=null&&X.delete||yn.dismiss(H.id),P.filter(({id:te})=>te!==H.id)})},[]);return he.useEffect(()=>yn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{V(P=>P.map(X=>X.id===H.id?{...X,delete:!0}:X))});return}setTimeout(()=>{Av.flushSync(()=>{V(P=>{const X=P.findIndex(te=>te.id===H.id);return X!==-1?[...P.slice(0,X),{...P[X],...H},...P.slice(X+1)]:[H,...P]})})})}),[$]),he.useEffect(()=>{if(S!=="system"){O(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:P})=>{O(P?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{O(X?"dark":"light")}catch(te){console.error(te)}})}},[S]),he.useEffect(()=>{$.length<=1&&oe(!1)},[$]),he.useEffect(()=>{const H=P=>{var X;if(d.every(q=>P[q]||P.code===q)){var ne;oe(!0),(ne=N.current)==null||ne.focus()}P.code==="Escape"&&(document.activeElement===N.current||(X=N.current)!=null&&X.contains(document.activeElement))&&oe(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[d]),he.useEffect(()=>{if(N.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,_.current=!1)}},[N.current]),he.createElement("section",{ref:r,"aria-label":`${ee} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((H,P)=>{var X;const[te,ne]=H.split("-");return z.length?he.createElement("ol",{key:H,dir:j==="auto"?t0():j,tabIndex:-1,ref:N,className:g,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":te,"data-x-position":ne,style:{"--front-toast-height":`${((X=ie[0])==null?void 0:X.height)||0}px`,"--width":`${iE}px`,"--gap":`${B}px`,...E,...mE(x,y)},onBlur:q=>{_.current&&!q.currentTarget.contains(q.relatedTarget)&&(_.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||_.current||(_.current=!0,D.current=q.relatedTarget)},onMouseEnter:()=>oe(!0),onMouseMove:()=>oe(!0),onMouseLeave:()=>{de||oe(!1)},onDragEnd:()=>oe(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},z.filter(q=>!q.position&&P===0||q.position===H).map((q,le)=>{var ye,Ee;return he.createElement(dE,{key:q.id,icons:Y,index:le,toast:q,defaultRichColors:A,duration:(ye=R==null?void 0:R.duration)!=null?ye:C,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:M,closeButton:(Ee=R==null?void 0:R.closeButton)!=null?Ee:h,interacting:de,position:H,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:U,toasts:z.filter(be=>be.position==q.position),heights:ie.filter(be=>be.position==q.position),setHeights:fe,expandByDefault:m,gap:B,expanded:Q,swipeDirections:o.swipeDirections})})):null}))}),ve="data-editor-id",or="data-slide-root",To=1920,Ao=1080;function vm(n){return`[${ve}="${n}"]`}function pE(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function Mv(n,o){return`${o}-${n+1}`}function n0(n,o){const r=Number.parseInt(n||"",10);return Number.isFinite(r)&&r>0?r:o}function gE(n){return pE(n)}function rc(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function _v(n){const o=n.querySelector(`[${or}]`);if(o)return o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(To)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Ao)),o;const r=n.querySelector(".slide-container");return r?(r.setAttribute(or,"true"),r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(To)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(Ao)),r):null}function yE(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function vE(n){const o=rc(n);if(!o)return n;const r=_v(o),i=Array.from(o.querySelectorAll("[data-editable]"));return r&&!r.getAttribute(ve)&&r.setAttribute(ve,"slide-root"),i.forEach((s,u)=>{if(!s.getAttribute(ve)){const d=s.getAttribute("data-editable")||"block";s.setAttribute(ve,Mv(u,d))}}),yE(o)}function da(n,o="slide-1"){var A;if(!rc(n))return{id:o,title:"Untitled Slide",htmlSource:n,rootSelector:`[${or}]`,width:To,height:Ao,elements:[]};const i=vE(n),s=rc(i);if(!s)return{id:o,title:"Untitled Slide",htmlSource:i,rootSelector:`[${or}]`,width:To,height:Ao,elements:[]};const u=_v(s),d=Array.from(s.querySelectorAll("[data-editable]")),m=u!=null&&u.getAttribute(ve)?`[${ve}="${u.getAttribute(ve)}"]`:`[${or}]`,h=n0((u==null?void 0:u.getAttribute("data-slide-width"))??null,To),g=n0((u==null?void 0:u.getAttribute("data-slide-height"))??null,Ao),x=d.map((C,E)=>{const M=C.getAttribute("data-editable")||"block",R=C.getAttribute(ve)||Mv(E,M);return{id:R,selector:vm(R),type:M==="block"&&C.getAttribute("data-group")==="true"?"group":M,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),y=s.querySelector("h1, h2, title"),S=((A=y==null?void 0:y.textContent)==null?void 0:A.trim())||`Slide ${o}`;return{id:gE(o),title:S,htmlSource:i,rootSelector:m,width:h,height:g,elements:x}}function Ke(n,o){return n.querySelector(vm(o))}function bE(n,o,r){const i=rc(n.htmlSource);if(!i)return"";const s=Ke(i,o);return(s==null?void 0:s.style.getPropertyValue(r).trim())||""}function Oo(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function bm(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function il(n,o){const r=Oo(n);return r?(o(r),bm(r)):n}const xm=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Nv(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function ci(n){const o=Nv();for(const r of xm){const i=n.style[r];o[r]=i||null}return o}function Ud(n){return{...Nv(),...n}}function ea(n){const o=n||"",r=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=o.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:r&&Number.parseFloat(r[1]||"0")||0,translateY:r&&Number.parseFloat(r[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function ld(n){return Math.round(n*100)/100}function Ia(n,o,r){const i=[];return(Math.abs(n)>.01||Math.abs(o)>.01)&&i.push(`translate(${ld(n)}px, ${ld(o)}px)`),Math.abs(r)>.01&&i.push(`rotate(${ld(r)}deg)`),i.length?i.join(" "):null}function Wr(n,o,r){return{x:r.offsetX+(n.left-o.left)*r.scale,y:r.offsetY+(n.top-o.top)*r.scale,width:n.width*r.scale,height:n.height*r.scale}}function Bs(n){const o=Number.parseFloat(n||"");return Number.isFinite(o)?o:0}function a0(n){const o=ea(n.style.transform);return{x:Bs(n.style.left)+o.translateX,y:Bs(n.style.top)+o.translateY,width:Bs(n.style.width)||To,height:Bs(n.style.height)||Ao}}function lc(n,o={}){let r=n,i=0,s=0;const u=n.getAttribute(ve)??"",d=o[u]??a0(n),m=d.width,h=d.height;for(;r;){const g=r.getAttribute(ve)??"",x=o[g]??a0(r);i+=x.x,s+=x.y;const y=r.parentElement;if(!y||!y.hasAttribute("data-editable"))break;r=y}return{x:i,y:s,width:m,height:h}}function Rv(n,o={}){const r=n.parentElement;if(!r||!r.hasAttribute("data-editable"))return{x:0,y:0};const i=lc(r,o);return{x:i.x,y:i.y}}function Id(n,o){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(o.x*100)/100}px`,n.style.top=`${Math.round(o.y*100)/100}px`,n.style.width=`${Math.round(o.width*100)/100}px`,n.style.height=`${Math.round(o.height*100)/100}px`;const r=ea(n.style.transform),i=Ia(0,0,r.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function o0(n,o){o&&(o.color&&(n.style.color=o.color),o.fontSize&&(n.style.fontSize=o.fontSize),o.fontWeight&&(n.style.fontWeight=o.fontWeight),o.fontStyle&&(n.style.fontStyle=o.fontStyle),o.lineHeight&&(n.style.lineHeight=o.lineHeight),o.textAlign&&(n.style.textAlign=o.textAlign),o.paddingTop&&(n.style.paddingTop=o.paddingTop),o.paddingRight&&(n.style.paddingRight=o.paddingRight),o.paddingBottom&&(n.style.paddingBottom=o.paddingBottom),o.paddingLeft&&(n.style.paddingLeft=o.paddingLeft),o.listStylePosition&&(n.style.listStylePosition=o.listStylePosition),o.listStyleType&&(n.style.listStyleType=o.listStyleType))}function id(n){const o=n.parentElement;return o&&(o.hasAttribute(or)||o.hasAttribute("data-editable"))?o:null}function Pd(n){return Array.from(n.children).filter(o=>o instanceof HTMLElement&&o.hasAttribute("data-editable"))}function Ov(n){const o=n.tagName.toLowerCase();return o!=="ul"&&o!=="ol"?!1:Array.from(n.children).some(r=>r.tagName.toLowerCase()==="li"&&r.hasAttribute("data-editable"))}function xE(n,o){const r=new Set(Array.from(n.querySelectorAll(`[${ve}]`)).map(d=>d.getAttribute(ve)).filter(d=>!!d));if(!r.has(o))return o;const i=o.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||o;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;r.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function SE(n,o){return Array.from(n.children).filter(r=>r instanceof HTMLElement?r.hasAttribute("data-editable")?!0:Ov(r)?(r.setAttribute("data-editable","block"),r.getAttribute(ve)||r.setAttribute(ve,xE(o,"block-1")),!0):!1:!1)}function wE({html:n,slideId:o,groupElementId:r,elementIds:i,elementRects:s={},timestamp:u=Date.now()}){const d=Oo(n);if(!d||!i.length)return null;const m=i.map($=>Ke(d,$)).filter($=>!!$);if(m.length!==i.length)return null;const g=m.flatMap($=>$.getAttribute("data-group")==="true"?Pd($):[$]).filter(($,V,z)=>z.findIndex(W=>W===$)===V);if(g.length<2)return null;const x=id(m[0]);if(!x||m.some($=>id($)!==x)||Ke(d,r))return null;const y=m.filter($=>$.getAttribute("data-group")==="true"),S=g.map($=>lc($,s)),A=Math.min(...S.map($=>$.x)),C=Math.min(...S.map($=>$.y)),E=Math.max(...S.map($=>$.x+$.width)),M=Math.max(...S.map($=>$.y+$.height)),R=Rv(m[0],s),j=d.createElement("div");j.setAttribute("data-editable","block"),j.setAttribute("data-group","true"),j.setAttribute(ve,r),Id(j,{x:A-R.x,y:C-R.y,width:E-A,height:M-C});const B=Array.from(x.children).flatMap($=>$ instanceof HTMLElement?y.includes($)?Pd($).filter(V=>g.includes(V)):g.includes($)?[$]:[]:[]),Y=m.find($=>id($)===x)??null;(Y==null?void 0:Y.parentElement)===x?x.insertBefore(j,Y):x.appendChild(j);for(const $ of B){const V=lc($,s);Id($,{x:V.x-A,y:V.y-C,width:V.width,height:V.height}),j.appendChild($)}for(const $ of y)$.children.length||$.remove();const ee=bm(d);return ee===n?null:{type:"group.create",slideId:o,groupElementId:r,elementIds:B.map($=>$.getAttribute(ve)).filter($=>!!$),previousHtmlSource:n,nextHtmlSource:ee,timestamp:u}}function EE({html:n,slideId:o,groupElementId:r,elementRects:i={},elementPresentationStyles:s={},timestamp:u=Date.now()}){const d=Oo(n);if(!d)return null;const m=Ke(d,r);if(!m||!m.parentElement)return null;const h=m.parentElement,g=Rv(m,i),x=m.getAttribute("data-group")==="true",y=x?Pd(m):SE(m,d);if(!y.length)return null;const S=m.getAttribute(ve),A=x?m:m.nextSibling,C=y.map(M=>M.getAttribute(ve)).filter(M=>!!M);for(const M of y){const R=lc(M,i);if(Id(M,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!x){const j=M.getAttribute(ve)??"";o0(M,s[j]),Ov(M)&&(M.style.margin="0px");for(const B of Array.from(M.querySelectorAll(`[data-editable][${ve}]`))){const Y=B.getAttribute(ve)??"";o0(B,s[Y])}}h.insertBefore(M,A)}x&&m.remove();const E=bm(d);return E===n?null:{type:"group.ungroup",slideId:o,groupElementId:r,childElementIds:x||!S?C:[S,...C],previousHtmlSource:n,nextHtmlSource:E,timestamp:u}}function CE(n,o,r){return il(n,i=>{const s=Ke(i,o);s&&(s.textContent=r)})}function TE(n,o,r,i){return il(n,s=>{var d;const u=Ke(s,o);u&&(i.trim().length===0?u.style.removeProperty(r):u.style.setProperty(r,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function AE(n,o,r,i){return il(n,s=>{const u=Ke(s,o);u&&(i.trim().length===0?u.removeAttribute(r):u.setAttribute(r,i))})}function ME(n,o){var r;for(const i of xm){const s=o[i];if(s===null){n.style[i]="";continue}n.style[i]=s}(r=n.getAttribute("style"))!=null&&r.trim()||n.removeAttribute("style")}function _E(n,o,r){return il(n,i=>{const s=Ke(i,o);s&&ME(s,r)})}function ic(n,o){const r=Oo(n);if(!r)return null;const i=Ke(r,o);if(!i||!(i.parentElement instanceof HTMLElement))return null;const s=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(ve):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(ve):null;return{parentElementId:i.parentElement.getAttribute(ve),previousSiblingElementId:s,nextSiblingElementId:u}}function sc(n,o){var i;const r=Oo(n);return r?((i=Ke(r,o))==null?void 0:i.outerHTML)??null:null}function Dv(n,o){var u;const r=Oo(`<template>${n}</template>`),i=(u=r==null?void 0:r.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const s=[i,...Array.from(i.querySelectorAll(`[${ve}]`))];for(const d of s){const m=d.getAttribute(ve);m&&o[m]&&d.setAttribute(ve,o[m])}return i.outerHTML}function NE(n,o){const r=new Set(Array.from(n.querySelectorAll(`[${ve}]`)).map(d=>d.getAttribute(ve)).filter(d=>!!d));if(!r.has(o))return o;const i=o.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||o;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;r.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function $d(n,o){const r=Oo(n);return r?NE(r,o):o}function jv(n,o){return il(n,r=>{var h;if(Ke(r,o.elementId))return;const i=Oo(`<template>${o.html}</template>`),s=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(s instanceof HTMLElement))return;const u=(o.parentElementId?Ke(r,o.parentElementId):null)??r.querySelector(`[${or}]`)??r.body,d=o.nextSiblingElementId?Ke(r,o.nextSiblingElementId):null,m=o.previousSiblingElementId?Ke(r,o.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(r.importNode(s,!0),d):(m==null?void 0:m.parentElement)===u?m.after(r.importNode(s,!0)):u.appendChild(r.importNode(s,!0))})}function RE(n,o){return il(n,r=>{var i;(i=Ke(r,o))==null||i.remove()})}function tr(n,o){return{...o,hidden:n.hidden,sourceFile:n.sourceFile}}function zv(n,o){if(o.type==="slide.visibility.update")return n.id!==o.slideId?n:{...n,hidden:o.nextHidden};if(o.type==="slide.title.update")return n.id!==o.slideId?n:{...n,title:o.nextTitle};if(!("slideId"in o)||o.type==="slide.reorder"||n.id!==o.slideId)return n;switch(o.type){case"operation.batch":return o.operations.reduce((r,i)=>zv(r,i),n);case"text.update":return tr(n,da(CE(n.htmlSource,o.elementId,o.nextText),n.id));case"style.update":return tr(n,da(TE(n.htmlSource,o.elementId,o.propertyName,o.nextValue),n.id));case"attribute.update":return tr(n,da(AE(n.htmlSource,o.elementId,o.attributeName,o.nextValue),n.id));case"element.layout.update":return tr(n,da(_E(n.htmlSource,o.elementId,o.nextStyle),n.id));case"element.insert":return tr(n,da(jv(n.htmlSource,o),n.id));case"element.remove":return tr(n,da(RE(n.htmlSource,o.elementId),n.id));case"group.create":case"group.ungroup":return tr(n,da(o.nextHtmlSource,n.id))}}function kv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(o=>kv(o)).reverse(),timestamp:n.timestamp};case"text.update":return{...n,previousText:n.nextText,nextText:n.previousText};case"style.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"attribute.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"element.layout.update":return{...n,previousStyle:n.nextStyle,nextStyle:n.previousStyle};case"element.insert":return{type:"element.remove",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"element.remove":return{type:"element.insert",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"group.create":return{type:"group.ungroup",slideId:n.slideId,groupElementId:n.groupElementId,childElementIds:n.elementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"group.ungroup":return{type:"group.create",slideId:n.slideId,groupElementId:n.groupElementId,elementIds:n.childElementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"slide.create":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.delete":return{type:"slide.create",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.duplicate":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.reorder":return{...n,fromIndex:n.toIndex,toIndex:n.fromIndex};case"slide.visibility.update":return{...n,previousHidden:n.nextHidden,nextHidden:n.previousHidden};case"slide.title.update":return{...n,previousTitle:n.nextTitle,nextTitle:n.previousTitle}}}const OE=`<!DOCTYPE html>
|
|
52
|
+
<html lang="en">
|
|
53
|
+
<head>
|
|
54
|
+
<meta charset="utf-8" />
|
|
55
|
+
<title>Untitled Slide</title>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<main
|
|
59
|
+
data-slide-root="true"
|
|
60
|
+
data-slide-width="1920"
|
|
61
|
+
data-slide-height="1080"
|
|
62
|
+
data-editor-id="slide-root"
|
|
63
|
+
style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #ffffff;"
|
|
64
|
+
>
|
|
65
|
+
<h1 data-editable="text" data-editor-id="text-1" style="position: absolute; left: 160px; top: 160px; width: 1200px; margin: 0; font-size: 96px; line-height: 1.05;">
|
|
66
|
+
Untitled Slide
|
|
67
|
+
</h1>
|
|
68
|
+
</main>
|
|
69
|
+
</body>
|
|
70
|
+
</html>`;function Lv(n,o){const r=new Set(n.map(s=>s.id));if(!r.has(o))return o;let i=2;for(;r.has(`${o}-${i}`);)i+=1;return`${o}-${i}`}function Hv(n,o){const r=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!r.has(o))return o;const i=o.lastIndexOf("."),s=i>=0?o.slice(0,i):o,u=i>=0?o.slice(i):"";let d=2;for(;r.has(`${s}-${d}${u}`);)d+=1;return`${s}-${d}${u}`}function DE(n,o){const r=Math.max(o+1,1),i=Lv(n,`generated-slide-${r}`),s=Hv(n,`${String(r).padStart(2,"0")}-untitled.html`);return{...da(OE,i),hidden:!1,sourceFile:s,title:"Untitled Slide"}}function jE(n,o){const r=Lv(n,`${o.id}-copy`),i=Hv(n,o.sourceFile?zE(o.sourceFile,"copy"):`${r}.html`);return{...da(o.htmlSource,r),hidden:o.hidden===!0,sourceFile:i,title:o.title}}function zE(n,o){const r=n.lastIndexOf(".");return r<0?`${n}-${o}`:`${n.slice(0,r)}-${o}${n.slice(r)}`}function r0(n,o){return Math.min(Math.max(n,0),o)}function sd(n,o){switch(o.type){case"slide.create":case"slide.duplicate":{const r=r0(o.index,n.length);return[...n.slice(0,r),o.slide,...n.slice(r)]}case"slide.delete":return n.filter(r=>r.id!==o.slide.id);case"slide.reorder":{const r=n.findIndex(u=>u.id===o.slideId);if(r<0)return n;const i=[...n],[s]=i.splice(r,1);return s?(i.splice(r0(o.toIndex,i.length),0,s),i):n}default:return n.map(r=>zv(r,o))}}function Bv(n){return{slides:n,undoStack:[],redoStack:[]}}function Us(n,o){switch(o.type){case"history.reset":return Bv(o.slides);case"history.commit":return{slides:sd(n.slides,o.operation),undoStack:[...n.undoStack,o.operation],redoStack:[]};case"history.undo":{const r=n.undoStack[n.undoStack.length-1];return r?{slides:sd(n.slides,kv(r)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,r]}:n}case"history.redo":{const r=n.redoStack[n.redoStack.length-1];return r?{slides:sd(n.slides,r),undoStack:[...n.undoStack,r],redoStack:n.redoStack.slice(0,-1)}:n}}}async function kE({manifestUrl:n,fetchImpl:o,requestInit:r,slideIdPrefix:i="generated-slide-"}){var y;const s=o??globalThis.fetch;if(!s)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...r},d=await s(n,u);if(!d.ok)return null;const m=await d.json();if(!((y=m.slides)!=null&&y.length))return null;const h=d.url||n,g=new URL(h),x=await Promise.all(m.slides.map(async(S,A)=>{const C=new URL(S.file,h);for(const[j,B]of g.searchParams)C.searchParams.has(j)||C.searchParams.set(j,B);const E=await s(C.toString(),u);if(!E.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const M=await E.text(),R=da(M,`${i}${A+1}`);return{...R,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||R.title}}));return{manifest:m,slides:x}}const LE=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function HE(n){const o=n.filter(r=>r.hidden!==!0);return o.length>0?o:n}function BE(n,o){return Math.min(Math.max(n,0),Math.max(o-1,0))}/**
|
|
71
|
+
* @license lucide-react v1.14.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Uv=(...n)=>n.filter((o,r,i)=>!!o&&o.trim()!==""&&i.indexOf(o)===r).join(" ").trim();/**
|
|
76
|
+
* @license lucide-react v1.14.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const UE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
81
|
+
* @license lucide-react v1.14.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const IE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,r,i)=>i?i.toUpperCase():r.toLowerCase());/**
|
|
86
|
+
* @license lucide-react v1.14.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const l0=n=>{const o=IE(n);return o.charAt(0).toUpperCase()+o.slice(1)};/**
|
|
91
|
+
* @license lucide-react v1.14.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/var cd={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"};/**
|
|
96
|
+
* @license lucide-react v1.14.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const PE=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},$E=v.createContext({}),GE=()=>v.useContext($E),YE=v.forwardRef(({color:n,size:o,strokeWidth:r,absoluteStrokeWidth:i,className:s="",children:u,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:y=!1,color:S="currentColor",className:A=""}=GE()??{},C=i??y?Number(r??x)*24/Number(o??g):r??x;return v.createElement("svg",{ref:h,...cd,width:o??g??cd.width,height:o??g??cd.height,stroke:n??S,strokeWidth:C,className:Uv("lucide",A,s),...!u&&!PE(m)&&{"aria-hidden":"true"},...m},[...d.map(([E,M])=>v.createElement(E,M)),...Array.isArray(u)?u:[u]])});/**
|
|
101
|
+
* @license lucide-react v1.14.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Me=(n,o)=>{const r=v.forwardRef(({className:i,...s},u)=>v.createElement(YE,{ref:u,iconNode:o,className:Uv(`lucide-${UE(l0(n))}`,`lucide-${n}`,i),...s}));return r.displayName=l0(n),r};/**
|
|
106
|
+
* @license lucide-react v1.14.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const qE=[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]],Gd=Me("align-center-horizontal",qE);/**
|
|
111
|
+
* @license lucide-react v1.14.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const VE=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]],Iv=Me("align-center-vertical",VE);/**
|
|
116
|
+
* @license lucide-react v1.14.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const XE=[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]],Pv=Me("align-end-horizontal",XE);/**
|
|
121
|
+
* @license lucide-react v1.14.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const FE=[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]],$v=Me("align-end-vertical",FE);/**
|
|
126
|
+
* @license lucide-react v1.14.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const KE=[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]],Gv=Me("align-start-horizontal",KE);/**
|
|
131
|
+
* @license lucide-react v1.14.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const QE=[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]],Yv=Me("align-start-vertical",QE);/**
|
|
136
|
+
* @license lucide-react v1.14.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const ZE=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],qv=Me("arrow-down-to-line",ZE);/**
|
|
141
|
+
* @license lucide-react v1.14.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const WE=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],Yd=Me("arrow-up-to-line",WE);/**
|
|
146
|
+
* @license lucide-react v1.14.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const JE=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],eC=Me("bold",JE);/**
|
|
151
|
+
* @license lucide-react v1.14.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const tC=[["path",{d:"M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],nC=Me("box",tC);/**
|
|
156
|
+
* @license lucide-react v1.14.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const aC=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],li=Me("case-sensitive",aC);/**
|
|
161
|
+
* @license lucide-react v1.14.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const oC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vv=Me("check",oC);/**
|
|
166
|
+
* @license lucide-react v1.14.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const rC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hi=Me("chevron-down",rC);/**
|
|
171
|
+
* @license lucide-react v1.14.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const lC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],iC=Me("chevron-right",lC);/**
|
|
176
|
+
* @license lucide-react v1.14.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const sC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Sm=Me("chevron-up",sC);/**
|
|
181
|
+
* @license lucide-react v1.14.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const cC=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],uC=Me("circle-dashed",cC);/**
|
|
186
|
+
* @license lucide-react v1.14.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const fC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],dC=Me("circle",fC);/**
|
|
191
|
+
* @license lucide-react v1.14.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const mC=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],hC=Me("cloud",mC);/**
|
|
196
|
+
* @license lucide-react v1.14.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const pC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],qd=Me("columns-3",pC);/**
|
|
201
|
+
* @license lucide-react v1.14.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const gC=[["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"}]],Xv=Me("copy",gC);/**
|
|
206
|
+
* @license lucide-react v1.14.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const yC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],vC=Me("download",yC);/**
|
|
211
|
+
* @license lucide-react v1.14.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const bC=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],xC=Me("ellipsis",bC);/**
|
|
216
|
+
* @license lucide-react v1.14.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const SC=[["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"}]],i0=Me("eye-off",SC);/**
|
|
221
|
+
* @license lucide-react v1.14.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const wC=[["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"}]],Fv=Me("eye",wC);/**
|
|
226
|
+
* @license lucide-react v1.14.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const EC=[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],CC=Me("file-check-corner",EC);/**
|
|
231
|
+
* @license lucide-react v1.14.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const TC=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],AC=Me("file-code-corner",TC);/**
|
|
236
|
+
* @license lucide-react v1.14.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const MC=[["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"}]],Kv=Me("file-text",MC);/**
|
|
241
|
+
* @license lucide-react v1.14.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const _C=[["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"}]],cc=Me("group",_C);/**
|
|
246
|
+
* @license lucide-react v1.14.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const NC=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],RC=Me("italic",NC);/**
|
|
251
|
+
* @license lucide-react v1.14.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const OC=[["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"}]],wm=Me("layers",OC);/**
|
|
256
|
+
* @license lucide-react v1.14.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const DC=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Qv=Me("link-2",DC);/**
|
|
261
|
+
* @license lucide-react v1.14.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const jC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],zC=Me("lock-open",jC);/**
|
|
266
|
+
* @license lucide-react v1.14.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const kC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Vd=Me("lock",kC);/**
|
|
271
|
+
* @license lucide-react v1.14.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const LC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],HC=Me("maximize-2",LC);/**
|
|
276
|
+
* @license lucide-react v1.14.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const BC=[["path",{d:"M5 12h14",key:"1ays0h"}]],Zv=Me("minus",BC);/**
|
|
281
|
+
* @license lucide-react v1.14.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const UC=[["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"}]],Xd=Me("palette",UC);/**
|
|
286
|
+
* @license lucide-react v1.14.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const IC=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],PC=Me("pen",IC);/**
|
|
291
|
+
* @license lucide-react v1.14.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const $C=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],GC=Me("pencil",$C);/**
|
|
296
|
+
* @license lucide-react v1.14.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const YC=[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]],qC=Me("pilcrow",YC);/**
|
|
301
|
+
* @license lucide-react v1.14.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const VC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],XC=Me("play",VC);/**
|
|
306
|
+
* @license lucide-react v1.14.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const FC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ii=Me("plus",FC);/**
|
|
311
|
+
* @license lucide-react v1.14.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const KC=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],QC=Me("presentation",KC);/**
|
|
316
|
+
* @license lucide-react v1.14.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const ZC=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],WC=Me("rotate-cw",ZC);/**
|
|
321
|
+
* @license lucide-react v1.14.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const JC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],uc=Me("rows-3",JC);/**
|
|
326
|
+
* @license lucide-react v1.14.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const eT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],fc=Me("square",eT);/**
|
|
331
|
+
* @license lucide-react v1.14.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const tT=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],nT=Me("strikethrough",tT);/**
|
|
336
|
+
* @license lucide-react v1.14.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const aT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],dc=Me("text-align-center",aT);/**
|
|
341
|
+
* @license lucide-react v1.14.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const oT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],Wv=Me("text-align-end",oT);/**
|
|
346
|
+
* @license lucide-react v1.14.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const rT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Jv=Me("text-align-start",rT);/**
|
|
351
|
+
* @license lucide-react v1.14.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const lT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],eb=Me("trash-2",lT);/**
|
|
356
|
+
* @license lucide-react v1.14.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const iT=[["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"}]],Fd=Me("type",iT);/**
|
|
361
|
+
* @license lucide-react v1.14.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const sT=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],cT=Me("underline",sT);/**
|
|
366
|
+
* @license lucide-react v1.14.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const uT=[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]],Em=Me("ungroup",uT);/**
|
|
371
|
+
* @license lucide-react v1.14.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const fT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Cm=Me("x",fT);/**
|
|
376
|
+
* @license lucide-react v1.14.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const dT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],mT=Me("zap",dT);function tb(n){var o,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(o=0;o<s;o++)n[o]&&(r=tb(n[o]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function nb(){for(var n,o,r=0,i="",s=arguments.length;r<s;r++)(n=arguments[r])&&(o=tb(n))&&(i&&(i+=" "),i+=o);return i}const hT=(n,o)=>{const r=new Array(n.length+o.length);for(let i=0;i<n.length;i++)r[i]=n[i];for(let i=0;i<o.length;i++)r[n.length+i]=o[i];return r},pT=(n,o)=>({classGroupId:n,validator:o}),ab=(n=new Map,o=null,r)=>({nextPart:n,validators:o,classGroupId:r}),mc="-",s0=[],gT="arbitrary..",yT=n=>{const o=bT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return vT(d);const m=d.split(mc),h=m[0]===""&&m.length>1?1:0;return ob(m,h,o)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=r[d];return h?g?hT(g,h):h:g||s0}return r[d]||s0}}},ob=(n,o,r)=>{if(n.length-o===0)return r.classGroupId;const s=n[o],u=r.nextPart.get(s);if(u){const g=ob(n,o+1,u);if(g)return g}const d=r.validators;if(d===null)return;const m=o===0?n.join(mc):n.slice(o).join(mc),h=d.length;for(let g=0;g<h;g++){const x=d[g];if(x.validator(m))return x.classGroupId}},vT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),r=o.indexOf(":"),i=o.slice(0,r);return i?gT+i:void 0})(),bT=n=>{const{theme:o,classGroups:r}=n;return xT(r,o)},xT=(n,o)=>{const r=ab();for(const i in n){const s=n[i];Tm(s,r,i,o)}return r},Tm=(n,o,r,i)=>{const s=n.length;for(let u=0;u<s;u++){const d=n[u];ST(d,o,r,i)}},ST=(n,o,r,i)=>{if(typeof n=="string"){wT(n,o,r);return}if(typeof n=="function"){ET(n,o,r,i);return}CT(n,o,r,i)},wT=(n,o,r)=>{const i=n===""?o:rb(o,n);i.classGroupId=r},ET=(n,o,r,i)=>{if(TT(n)){Tm(n(i),o,r,i);return}o.validators===null&&(o.validators=[]),o.validators.push(pT(r,n))},CT=(n,o,r,i)=>{const s=Object.entries(n),u=s.length;for(let d=0;d<u;d++){const[m,h]=s[d];Tm(h,rb(o,m),r,i)}},rb=(n,o)=>{let r=n;const i=o.split(mc),s=i.length;for(let u=0;u<s;u++){const d=i[u];let m=r.nextPart.get(d);m||(m=ab(),r.nextPart.set(d,m)),r=m}return r},TT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,AT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,r=Object.create(null),i=Object.create(null);const s=(u,d)=>{r[u]=d,o++,o>n&&(o=0,i=r,r=Object.create(null))};return{get(u){let d=r[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return s(u,d),d},set(u,d){u in r?r[u]=d:s(u,d)}}},Kd="!",c0=":",MT=[],u0=(n,o,r,i,s)=>({modifiers:n,hasImportantModifier:o,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),_T=n=>{const{prefix:o,experimentalParseClassName:r}=n;let i=s=>{const u=[];let d=0,m=0,h=0,g;const x=s.length;for(let E=0;E<x;E++){const M=s[E];if(d===0&&m===0){if(M===c0){u.push(s.slice(h,E)),h=E+1;continue}if(M==="/"){g=E;continue}}M==="["?d++:M==="]"?d--:M==="("?m++:M===")"&&m--}const y=u.length===0?s:s.slice(h);let S=y,A=!1;y.endsWith(Kd)?(S=y.slice(0,-1),A=!0):y.startsWith(Kd)&&(S=y.slice(1),A=!0);const C=g&&g>h?g-h:void 0;return u0(u,A,S,C)};if(o){const s=o+c0,u=i;i=d=>d.startsWith(s)?u(d.slice(s.length)):u0(MT,!1,d,void 0,!0)}if(r){const s=i;i=u=>r({className:u,parseClassName:s})}return i},NT=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((r,i)=>{o.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let u=0;u<r.length;u++){const d=r[u],m=d[0]==="[",h=o.has(d);m||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(d)):s.push(d)}return s.length>0&&(s.sort(),i.push(...s)),i}},RT=n=>({cache:AT(n.cacheSize),parseClassName:_T(n),sortModifiers:NT(n),...yT(n)}),OT=/\s+/,DT=(n,o)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=o,d=[],m=n.trim().split(OT);let h="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:y,modifiers:S,hasImportantModifier:A,baseClassName:C,maybePostfixModifierPosition:E}=r(x);if(y){h=x+(h.length>0?" "+h:h);continue}let M=!!E,R=i(M?C.substring(0,E):C);if(!R){if(!M){h=x+(h.length>0?" "+h:h);continue}if(R=i(C),!R){h=x+(h.length>0?" "+h:h);continue}M=!1}const j=S.length===0?"":S.length===1?S[0]:u(S).join(":"),B=A?j+Kd:j,Y=B+R;if(d.indexOf(Y)>-1)continue;d.push(Y);const ee=s(R,M);for(let $=0;$<ee.length;++$){const V=ee[$];d.push(B+V)}h=x+(h.length>0?" "+h:h)}return h},jT=(...n)=>{let o=0,r,i,s="";for(;o<n.length;)(r=n[o++])&&(i=lb(r))&&(s&&(s+=" "),s+=i);return s},lb=n=>{if(typeof n=="string")return n;let o,r="";for(let i=0;i<n.length;i++)n[i]&&(o=lb(n[i]))&&(r&&(r+=" "),r+=o);return r},zT=(n,...o)=>{let r,i,s,u;const d=h=>{const g=o.reduce((x,y)=>y(x),n());return r=RT(g),i=r.cache.get,s=r.cache.set,u=m,m(h)},m=h=>{const g=i(h);if(g)return g;const x=DT(h,r);return s(h,x),x};return u=d,(...h)=>u(jT(...h))},kT=[],Ut=n=>{const o=r=>r[n]||kT;return o.isThemeGetter=!0,o},ib=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,HT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BT=/\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$/,UT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,IT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vo=n=>LT.test(n),Pe=n=>!!n&&!Number.isNaN(Number(n)),bo=n=>!!n&&Number.isInteger(Number(n)),ud=n=>n.endsWith("%")&&Pe(n.slice(0,-1)),Ba=n=>HT.test(n),cb=()=>!0,$T=n=>BT.test(n)&&!UT.test(n),Am=()=>!1,GT=n=>IT.test(n),YT=n=>PT.test(n),qT=n=>!we(n)&&!Ce(n),VT=n=>Do(n,db,Am),we=n=>ib.test(n),nr=n=>Do(n,mb,$T),f0=n=>Do(n,eA,Pe),XT=n=>Do(n,pb,cb),FT=n=>Do(n,hb,Am),d0=n=>Do(n,ub,Am),KT=n=>Do(n,fb,YT),Is=n=>Do(n,gb,GT),Ce=n=>sb.test(n),ti=n=>cr(n,mb),QT=n=>cr(n,hb),m0=n=>cr(n,ub),ZT=n=>cr(n,db),WT=n=>cr(n,fb),Ps=n=>cr(n,gb,!0),JT=n=>cr(n,pb,!0),Do=(n,o,r)=>{const i=ib.exec(n);return i?i[1]?o(i[1]):r(i[2]):!1},cr=(n,o,r=!1)=>{const i=sb.exec(n);return i?i[1]?o(i[1]):r:!1},ub=n=>n==="position"||n==="percentage",fb=n=>n==="image"||n==="url",db=n=>n==="length"||n==="size"||n==="bg-size",mb=n=>n==="length",eA=n=>n==="number",hb=n=>n==="family-name",pb=n=>n==="number"||n==="weight",gb=n=>n==="shadow",tA=()=>{const n=Ut("color"),o=Ut("font"),r=Ut("text"),i=Ut("font-weight"),s=Ut("tracking"),u=Ut("leading"),d=Ut("breakpoint"),m=Ut("container"),h=Ut("spacing"),g=Ut("radius"),x=Ut("shadow"),y=Ut("inset-shadow"),S=Ut("text-shadow"),A=Ut("drop-shadow"),C=Ut("blur"),E=Ut("perspective"),M=Ut("aspect"),R=Ut("ease"),j=Ut("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ee=()=>[...Y(),Ce,we],$=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],z=()=>[Ce,we,h],W=()=>[vo,"full","auto",...z()],ie=()=>[bo,"none","subgrid",Ce,we],fe=()=>["auto",{span:["full",bo,Ce,we]},bo,Ce,we],Q=()=>[bo,"auto",Ce,we],oe=()=>["auto","min","max","fr",Ce,we],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...z()],O=()=>[vo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],N=()=>[vo,"screen","full","dvw","lvw","svw","min","max","fit",...z()],L=()=>[vo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],D=()=>[n,Ce,we],_=()=>[...Y(),m0,d0,{position:[Ce,we]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",ZT,VT,{size:[Ce,we]}],P=()=>[ud,ti,nr],X=()=>["","none","full",g,Ce,we],te=()=>["",Pe,ti,nr],ne=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[Pe,ud,m0,d0],ye=()=>["","none",C,Ce,we],Ee=()=>["none",Pe,Ce,we],be=()=>["none",Pe,Ce,we],Re=()=>[Pe,Ce,we],ke=()=>[vo,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[cb],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[qT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Pe],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vo,we,Ce,M]}],container:["container"],columns:[{columns:[Pe,we,Ce,m]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:ee()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[bo,"auto",Ce,we]}],basis:[{basis:[vo,"full","auto",m,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,vo,"auto","initial","none",we]}],grow:[{grow:["",Pe,Ce,we]}],shrink:[{shrink:["",Pe,Ce,we]}],order:[{order:[bo,"first","last","none",Ce,we]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[m,"screen",...O()]}],"min-w":[{"min-w":[m,"screen","none",...O()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",r,ti,nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,JT,XT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ud,we]}],"font-family":[{font:[QT,FT,o]}],"font-features":[{"font-features":[we]}],"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,we]}],"line-clamp":[{"line-clamp":[Pe,"none",Ce,f0]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",Ce,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",Ce,nr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Pe,"auto",Ce,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,we]}],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,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bo,Ce,we],radial:["",Ce,we],conic:[bo,Ce,we]},WT,KT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,Ce,we]}],"outline-w":[{outline:["",Pe,ti,nr]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",x,Ps,Is]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",y,Ps,Is]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Pe,nr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",S,Ps,Is]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Pe,Ce,we]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Ce,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":Y()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,we]}],filter:[{filter:["","none",Ce,we]}],blur:[{blur:ye()}],brightness:[{brightness:[Pe,Ce,we]}],contrast:[{contrast:[Pe,Ce,we]}],"drop-shadow":[{"drop-shadow":["","none",A,Ps,Is]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Pe,Ce,we]}],"hue-rotate":[{"hue-rotate":[Pe,Ce,we]}],invert:[{invert:["",Pe,Ce,we]}],saturate:[{saturate:[Pe,Ce,we]}],sepia:[{sepia:["",Pe,Ce,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,we]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,Ce,we]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,Ce,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,Ce,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,Ce,we]}],"backdrop-invert":[{"backdrop-invert":["",Pe,Ce,we]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,Ce,we]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,Ce,we]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,Ce,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",Ce,we]}],ease:[{ease:["linear","initial",R,Ce,we]}],delay:[{delay:[Pe,Ce,we]}],animate:[{animate:["none",j,Ce,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ce,we]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[Ce,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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,we]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Pe,ti,nr,f0]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nA=zT(tA);function Be(...n){return nA(nb(n))}const aA=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:AC},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:Kv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:QC,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:hC,soon:!0}];function oA({title:n,onTitleChange:o,onPresent:r,onExportPdf:i,onExportHtml:s,pdfSlides:u=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=v.useState(!1),[x,y]=v.useState(!1),[S,A]=v.useState(0),C=v.useRef(null),E=n||"Untitled presentation";v.useEffect(()=>{const j=B=>{C.current&&!C.current.contains(B.target)&&g(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const M=v.useCallback(j=>{if(!j)return;const B=j.getBoundingClientRect().width;A(Math.ceil(B))},[]),R=j=>{if(g(!1),j.soon){Eo(`${j.label} is not available yet.`,{description:"We are still building this export option."});return}if(j.id==="pdf"){y(!0);return}if(j.id==="html"){s==null||s();return}Eo(`Exporting as ${j.label}...`)};return p.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[p.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:p.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),p.jsx("div",{className:"w-px h-5 bg-foreground/10"}),p.jsxs("div",{className:"relative min-w-0 flex-1",children:[p.jsx("input",{value:n,onChange:j=>o==null?void 0:o(j.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:S?{width:`${S}px`}:void 0,placeholder:"Untitled presentation"}),p.jsx("span",{ref:M,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:E},E)]}),m?p.jsx("span",{className:"inline-flex h-5 shrink-0 items-center rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-[10px] font-medium uppercase leading-none tracking-wider text-foreground/45","aria-live":"polite",children:"saving..."}):null]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"relative",ref:C,children:[p.jsxs("button",{type:"button",onClick:()=>g(j=>!j),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[p.jsx(vC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Export"}),p.jsx(hi,{className:Be("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&p.jsxs("div",{className:"absolute right-0 mt-1.5 w-[280px] bg-white rounded-xl border border-foreground/[0.08] shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] p-1.5 animate-fade-in z-50",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),aA.map(j=>{const B=j.icon;return p.jsxs("button",{type:"button",onClick:()=>R(j),className:Be("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",j.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[p.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:p.jsx(B,{className:"w-3.5 h-3.5 text-foreground/70"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium text-foreground",children:j.label}),j.soon&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),p.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:j.desc})]}),!j.soon&&p.jsx(Vv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},j.id)})]})]}),p.jsxs("button",{type:"button",onClick:r,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[p.jsx(XC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Present"})]})]}),x?p.jsx(rA,{slides:u,thumbnails:d,onClose:()=>y(!1),onExport:j=>{y(!1),i==null||i(j)}}):null]})}function rA({slides:n,thumbnails:o,onClose:r,onExport:i}){const s=n.filter(C=>C.file),[u,d]=v.useState("all"),[m,h]=v.useState([]),g=new Set(m),x=m.length,y=u==="all"||u==="selected"&&x>0;v.useEffect(()=>{const C=E=>{E.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]);const S=(C,E)=>{h(M=>E?M.includes(C)?M:[...M,C]:M.filter(R=>R!==C))},A=()=>{if(u==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&r()},children:p.jsxs("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"pdf-export-title",className:"relative m-0 flex max-h-[86vh] w-full max-w-[680px] flex-col overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]",children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(Kv,{className:"h-4 w-4 text-foreground/70"})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),p.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),p.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:r,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:p.jsx(Cm,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[p.jsxs("fieldset",{className:"space-y-2",children:[p.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),p.jsx(h0,{checked:u==="all",icon:wm,label:"All slides",detail:`${s.length} slides`,onChange:()=>d("all")}),p.jsx(h0,{checked:u==="selected",icon:CC,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>d("selected")})]}),u==="selected"?p.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[p.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),p.jsx("div",{className:"grid max-h-[360px] grid-cols-2 gap-2 overflow-auto p-2 max-[620px]:grid-cols-1","data-testid":"pdf-slide-picker",children:s.map((C,E)=>{const M=C.file;return M?p.jsxs("label",{"data-testid":"pdf-slide-option",className:Be("grid cursor-pointer grid-cols-[104px_1fr] gap-2 rounded-md border border-foreground/[0.08] bg-white p-2 text-[12px] transition-colors hover:border-foreground/20 hover:bg-foreground/[0.025]",g.has(M)&&"border-foreground/35 bg-foreground/[0.035]"),children:[p.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:o[C.id]?p.jsx("img",{alt:`Slide ${E+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:o[C.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",E+1]})}),p.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("input",{type:"checkbox","aria-label":`Select slide ${E+1}`,checked:g.has(M),onChange:R=>S(M,R.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:E+1}),p.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:C.title})]})]})})]},C.id):null})})]}):null]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx("button",{type:"button",onClick:r,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),p.jsx("button",{type:"button",onClick:A,disabled:!y,className:"h-8 rounded-md bg-foreground px-3.5 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:opacity-40",children:"Export PDF"})]})]})})}function h0({checked:n,disabled:o,icon:r,label:i,detail:s,onChange:u}){return p.jsxs("label",{className:Be("flex cursor-pointer items-center gap-3 rounded-md border border-foreground/[0.08] px-3 py-2.5 transition-colors",n&&"border-foreground/30 bg-foreground/[0.035]",o?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[p.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:o,onChange:u,className:"h-3.5 w-3.5 accent-foreground"}),p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(r,{className:"h-4 w-4 text-foreground/65"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),p.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:s})]})]})}const p0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,g0=nb,lA=(n,o)=>r=>{var i;if((o==null?void 0:o.variants)==null)return g0(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:u}=o,d=Object.keys(s).map(g=>{const x=r==null?void 0:r[g],y=u==null?void 0:u[g];if(x===null)return null;const S=p0(x)||p0(y);return s[g][S]}),m=r&&Object.entries(r).reduce((g,x)=>{let[y,S]=x;return S===void 0||(g[y]=S),g},{}),h=o==null||(i=o.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:y,className:S,...A}=x;return Object.entries(A).every(C=>{let[E,M]=C;return Array.isArray(M)?M.includes({...u,...m}[E]):{...u,...m}[E]===M})?[...g,y,S]:g},[]);return g0(n,d,h,r==null?void 0:r.class,r==null?void 0:r.className)};function y0(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Mm(...n){return o=>{let r=!1;const i=n.map(s=>{const u=y0(s,o);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():y0(n[s],null)}}}}function tt(...n){return v.useCallback(Mm(...n),n)}function _o(n){const o=sA(n),r=v.forwardRef((i,s)=>{const{children:u,...d}=i,m=v.Children.toArray(u),h=m.find(uA);if(h){const g=h.props.children,x=m.map(y=>y===h?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:y);return p.jsx(o,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,x):null})}return p.jsx(o,{...d,ref:s,children:u})});return r.displayName=`${n}.Slot`,r}var iA=_o("Slot");function sA(n){const o=v.forwardRef((r,i)=>{const{children:s,...u}=r;if(v.isValidElement(s)){const d=dA(s),m=fA(u,s.props);return s.type!==v.Fragment&&(m.ref=i?Mm(i,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var yb=Symbol("radix.slottable");function cA(n){const o=({children:r})=>p.jsx(p.Fragment,{children:r});return o.displayName=`${n}.Slottable`,o.__radixId=yb,o}function uA(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===yb}function fA(n,o){const r={...o};for(const i in o){const s=n[i],u=o[i];/^on[A-Z]/.test(i)?s&&u?r[i]=(...m)=>{const h=u(...m);return s(...m),h}:s&&(r[i]=s):i==="style"?r[i]={...s,...u}:i==="className"&&(r[i]=[s,u].filter(Boolean).join(" "))}return{...n,...r}}function dA(n){var i,s;let o=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=o&&"isReactWarning"in o&&o.isReactWarning;return r?n.ref:(o=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,r=o&&"isReactWarning"in o&&o.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var mA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=mA.reduce((n,o)=>{const r=_o(`Primitive.${o}`),i=v.forwardRef((s,u)=>{const{asChild:d,...m}=s,h=d?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(h,{...m,ref:u})});return i.displayName=`Primitive.${o}`,{...n,[o]:i}},{});function vb(n,o){n&&mi.flushSync(()=>n.dispatchEvent(o))}var bb=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"}),hA="VisuallyHidden",xb=v.forwardRef((n,o)=>p.jsx($e.span,{...n,ref:o,style:{...bb,...n.style}}));xb.displayName=hA;var pA=xb;function gA(n,o){const r=v.createContext(o),i=u=>{const{children:d,...m}=u,h=v.useMemo(()=>m,Object.values(m));return p.jsx(r.Provider,{value:h,children:d})};i.displayName=n+"Provider";function s(u){const d=v.useContext(r);if(d)return d;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function Ga(n,o=[]){let r=[];function i(u,d){const m=v.createContext(d),h=r.length;r=[...r,d];const g=y=>{var R;const{scope:S,children:A,...C}=y,E=((R=S==null?void 0:S[n])==null?void 0:R[h])||m,M=v.useMemo(()=>C,Object.values(C));return p.jsx(E.Provider,{value:M,children:A})};g.displayName=u+"Provider";function x(y,S){var E;const A=((E=S==null?void 0:S[n])==null?void 0:E[h])||m,C=v.useContext(A);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[g,x]}const s=()=>{const u=r.map(d=>v.createContext(d));return function(m){const h=(m==null?void 0:m[n])||u;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return s.scopeName=n,[i,yA(s,...o)]}function yA(...n){const o=n[0];if(n.length===1)return o;const r=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const y=h(u)[`__scope${g}`];return{...m,...y}},{});return v.useMemo(()=>({[`__scope${o.scopeName}`]:d}),[d])}};return r.scopeName=o.scopeName,r}function _m(n){const o=n+"CollectionProvider",[r,i]=Ga(o),[s,u]=r(o,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:M,children:R}=E,j=he.useRef(null),B=he.useRef(new Map).current;return p.jsx(s,{scope:M,itemMap:B,collectionRef:j,children:R})};d.displayName=o;const m=n+"CollectionSlot",h=_o(m),g=he.forwardRef((E,M)=>{const{scope:R,children:j}=E,B=u(m,R),Y=tt(M,B.collectionRef);return p.jsx(h,{ref:Y,children:j})});g.displayName=m;const x=n+"CollectionItemSlot",y="data-radix-collection-item",S=_o(x),A=he.forwardRef((E,M)=>{const{scope:R,children:j,...B}=E,Y=he.useRef(null),ee=tt(M,Y),$=u(x,R);return he.useEffect(()=>($.itemMap.set(Y,{ref:Y,...B}),()=>void $.itemMap.delete(Y))),p.jsx(S,{[y]:"",ref:ee,children:j})});A.displayName=x;function C(E){const M=u(n+"CollectionConsumer",E);return he.useCallback(()=>{const j=M.collectionRef.current;if(!j)return[];const B=Array.from(j.querySelectorAll(`[${y}]`));return Array.from(M.itemMap.values()).sort(($,V)=>B.indexOf($.ref.current)-B.indexOf(V.ref.current))},[M.collectionRef,M.itemMap])}return[{Provider:d,Slot:g,ItemSlot:A},C,i]}function ge(n,o,{checkForDefaultPrevented:r=!0}={}){return function(s){if(n==null||n(s),r===!1||!s.defaultPrevented)return o==null?void 0:o(s)}}var en=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},vA=Cv[" useInsertionEffect ".trim().toString()]||en;function nl({prop:n,defaultProp:o,onChange:r=()=>{},caller:i}){const[s,u,d]=bA({defaultProp:o,onChange:r}),m=n!==void 0,h=m?n:s;{const x=v.useRef(n!==void 0);v.useEffect(()=>{const y=x.current;y!==m&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${m?"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=m},[m,i])}const g=v.useCallback(x=>{var y;if(m){const S=xA(x)?x(n):x;S!==n&&((y=d.current)==null||y.call(d,S))}else u(x)},[m,n,u,d]);return[h,g]}function bA({defaultProp:n,onChange:o}){const[r,i]=v.useState(n),s=v.useRef(r),u=v.useRef(o);return vA(()=>{u.current=o},[o]),v.useEffect(()=>{var d;s.current!==r&&((d=u.current)==null||d.call(u,r),s.current=r)},[r,s]),[r,i,u]}function xA(n){return typeof n=="function"}function SA(n,o){return v.useReducer((r,i)=>o[r][i]??r,n)}var aa=n=>{const{present:o,children:r}=n,i=wA(o),s=typeof r=="function"?r({present:i.isPresent}):v.Children.only(r),u=tt(i.ref,EA(s));return typeof r=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};aa.displayName="Presence";function wA(n){const[o,r]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),d=n?"mounted":"unmounted",[m,h]=SA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=$s(i.current);u.current=m==="mounted"?g:"none"},[m]),en(()=>{const g=i.current,x=s.current;if(x!==n){const S=u.current,A=$s(g);n?h("MOUNT"):A==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(x&&S!==A?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,h]),en(()=>{if(o){let g;const x=o.ownerDocument.defaultView??window,y=A=>{const E=$s(i.current).includes(CSS.escape(A.animationName));if(A.target===o&&E&&(h("ANIMATION_END"),!s.current)){const M=o.style.animationFillMode;o.style.animationFillMode="forwards",g=x.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=M)})}},S=A=>{A.target===o&&(u.current=$s(i.current))};return o.addEventListener("animationstart",S),o.addEventListener("animationcancel",y),o.addEventListener("animationend",y),()=>{x.clearTimeout(g),o.removeEventListener("animationstart",S),o.removeEventListener("animationcancel",y),o.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[o,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(g=>{i.current=g?getComputedStyle(g):null,r(g)},[])}}function $s(n){return(n==null?void 0:n.animationName)||"none"}function EA(n){var i,s;let o=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=o&&"isReactWarning"in o&&o.isReactWarning;return r?n.ref:(o=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,r=o&&"isReactWarning"in o&&o.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var CA=Cv[" useId ".trim().toString()]||(()=>{}),TA=0;function pa(n){const[o,r]=v.useState(CA());return en(()=>{r(i=>i??String(TA++))},[n]),n||(o?`radix-${o}`:"")}var AA=v.createContext(void 0);function Nm(n){const o=v.useContext(AA);return n||o||"ltr"}function Xn(n){const o=v.useRef(n);return v.useEffect(()=>{o.current=n}),v.useMemo(()=>(...r)=>{var i;return(i=o.current)==null?void 0:i.call(o,...r)},[])}function MA(n,o=globalThis==null?void 0:globalThis.document){const r=Xn(n);v.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return o.addEventListener("keydown",i,{capture:!0}),()=>o.removeEventListener("keydown",i,{capture:!0})},[r,o])}var _A="DismissableLayer",Qd="dismissableLayer.update",NA="dismissableLayer.pointerDownOutside",RA="dismissableLayer.focusOutside",v0,Sb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sl=v.forwardRef((n,o)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...h}=n,g=v.useContext(Sb),[x,y]=v.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,A]=v.useState({}),C=tt(o,V=>y(V)),E=Array.from(g.layers),[M]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(M),j=x?E.indexOf(x):-1,B=g.layersWithOutsidePointerEventsDisabled.size>0,Y=j>=R,ee=jA(V=>{const z=V.target,W=[...g.branches].some(ie=>ie.contains(z));!Y||W||(s==null||s(V),d==null||d(V),V.defaultPrevented||m==null||m())},S),$=zA(V=>{const z=V.target;[...g.branches].some(ie=>ie.contains(z))||(u==null||u(V),d==null||d(V),V.defaultPrevented||m==null||m())},S);return MA(V=>{j===g.layers.size-1&&(i==null||i(V),!V.defaultPrevented&&m&&(V.preventDefault(),m()))},S),v.useEffect(()=>{if(x)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(v0=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),b0(),()=>{r&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=v0)}},[x,S,r,g]),v.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),b0())},[x,g]),v.useEffect(()=>{const V=()=>A({});return document.addEventListener(Qd,V),()=>document.removeEventListener(Qd,V)},[]),p.jsx($e.div,{...h,ref:C,style:{pointerEvents:B?Y?"auto":"none":void 0,...n.style},onFocusCapture:ge(n.onFocusCapture,$.onFocusCapture),onBlurCapture:ge(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:ge(n.onPointerDownCapture,ee.onPointerDownCapture)})});sl.displayName=_A;var OA="DismissableLayerBranch",DA=v.forwardRef((n,o)=>{const r=v.useContext(Sb),i=v.useRef(null),s=tt(o,i);return v.useEffect(()=>{const u=i.current;if(u)return r.branches.add(u),()=>{r.branches.delete(u)}},[r.branches]),p.jsx($e.div,{...n,ref:s})});DA.displayName=OA;function jA(n,o=globalThis==null?void 0:globalThis.document){const r=Xn(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=m=>{if(m.target&&!i.current){let h=function(){wb(NA,r,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(o.removeEventListener("click",s.current),s.current=h,o.addEventListener("click",s.current,{once:!0})):h()}else o.removeEventListener("click",s.current);i.current=!1},d=window.setTimeout(()=>{o.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",u),o.removeEventListener("click",s.current)}},[o,r]),{onPointerDownCapture:()=>i.current=!0}}function zA(n,o=globalThis==null?void 0:globalThis.document){const r=Xn(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&wb(RA,r,{originalEvent:u},{discrete:!1})};return o.addEventListener("focusin",s),()=>o.removeEventListener("focusin",s)},[o,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function b0(){const n=new CustomEvent(Qd);document.dispatchEvent(n)}function wb(n,o,r,{discrete:i}){const s=r.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});o&&s.addEventListener(n,o,{once:!0}),i?vb(s,u):s.dispatchEvent(u)}var fd="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",x0={bubbles:!1,cancelable:!0},kA="FocusScope",pi=v.forwardRef((n,o)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...d}=n,[m,h]=v.useState(null),g=Xn(s),x=Xn(u),y=v.useRef(null),S=tt(o,E=>h(E)),A=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let E=function(B){if(A.paused||!m)return;const Y=B.target;m.contains(Y)?y.current=Y:wo(y.current,{select:!0})},M=function(B){if(A.paused||!m)return;const Y=B.relatedTarget;Y!==null&&(m.contains(Y)||wo(y.current,{select:!0}))},R=function(B){if(document.activeElement===document.body)for(const ee of B)ee.removedNodes.length>0&&wo(m)};document.addEventListener("focusin",E),document.addEventListener("focusout",M);const j=new MutationObserver(R);return m&&j.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",M),j.disconnect()}}},[i,m,A.paused]),v.useEffect(()=>{if(m){w0.add(A);const E=document.activeElement;if(!m.contains(E)){const R=new CustomEvent(fd,x0);m.addEventListener(fd,g),m.dispatchEvent(R),R.defaultPrevented||(LA(PA(Eb(m)),{select:!0}),document.activeElement===E&&wo(m))}return()=>{m.removeEventListener(fd,g),setTimeout(()=>{const R=new CustomEvent(dd,x0);m.addEventListener(dd,x),m.dispatchEvent(R),R.defaultPrevented||wo(E??document.body,{select:!0}),m.removeEventListener(dd,x),w0.remove(A)},0)}}},[m,g,x,A]);const C=v.useCallback(E=>{if(!r&&!i||A.paused)return;const M=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(M&&R){const j=E.currentTarget,[B,Y]=HA(j);B&&Y?!E.shiftKey&&R===Y?(E.preventDefault(),r&&wo(B,{select:!0})):E.shiftKey&&R===B&&(E.preventDefault(),r&&wo(Y,{select:!0})):R===j&&E.preventDefault()}},[r,i,A.paused]);return p.jsx($e.div,{tabIndex:-1,...d,ref:S,onKeyDown:C})});pi.displayName=kA;function LA(n,{select:o=!1}={}){const r=document.activeElement;for(const i of n)if(wo(i,{select:o}),document.activeElement!==r)return}function HA(n){const o=Eb(n),r=S0(o,n),i=S0(o.reverse(),n);return[r,i]}function Eb(n){const o=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)o.push(r.currentNode);return o}function S0(n,o){for(const r of n)if(!BA(r,{upTo:o}))return r}function BA(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function UA(n){return n instanceof HTMLInputElement&&"select"in n}function wo(n,{select:o=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&UA(n)&&o&&n.select()}}var w0=IA();function IA(){let n=[];return{add(o){const r=n[0];o!==r&&(r==null||r.pause()),n=E0(n,o),n.unshift(o)},remove(o){var r;n=E0(n,o),(r=n[0])==null||r.resume()}}}function E0(n,o){const r=[...n],i=r.indexOf(o);return i!==-1&&r.splice(i,1),r}function PA(n){return n.filter(o=>o.tagName!=="A")}var $A="Portal",gi=v.forwardRef((n,o)=>{var m;const{container:r,...i}=n,[s,u]=v.useState(!1);en(()=>u(!0),[]);const d=r||s&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?Av.createPortal(p.jsx($e.div,{...i,ref:o}),d):null});gi.displayName=$A;var md=0;function Mc(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??C0()),document.body.insertAdjacentElement("beforeend",n[1]??C0()),md++,()=>{md===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),md--}},[])}function C0(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var ma=function(){return ma=Object.assign||function(o){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(o[u]=r[u])}return o},ma.apply(this,arguments)};function Cb(n,o){var r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.indexOf(i)<0&&(r[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)o.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(r[i[s]]=n[i[s]]);return r}function GA(n,o,r){if(r||arguments.length===2)for(var i=0,s=o.length,u;i<s;i++)(u||!(i in o))&&(u||(u=Array.prototype.slice.call(o,0,i)),u[i]=o[i]);return n.concat(u||Array.prototype.slice.call(o))}var tc="right-scroll-bar-position",nc="width-before-scroll-bar",YA="with-scroll-bars-hidden",qA="--removed-body-scroll-bar-size";function hd(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function VA(n,o){var r=v.useState(function(){return{value:n,callback:o,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=o,r.facade}var XA=typeof window<"u"?v.useLayoutEffect:v.useEffect,T0=new WeakMap;function FA(n,o){var r=VA(null,function(i){return n.forEach(function(s){return hd(s,i)})});return XA(function(){var i=T0.get(r);if(i){var s=new Set(i),u=new Set(n),d=r.current;s.forEach(function(m){u.has(m)||hd(m,null)}),u.forEach(function(m){s.has(m)||hd(m,d)})}T0.set(r,n)},[n]),r}function KA(n){return n}function QA(n,o){o===void 0&&(o=KA);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(u){var d=o(u,i);return r.push(d),function(){r=r.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(i=!0;r.length;){var d=r;r=[],d.forEach(u)}r={push:function(m){return u(m)},filter:function(){return r}}},assignMedium:function(u){i=!0;var d=[];if(r.length){var m=r;r=[],m.forEach(u),d=r}var h=function(){var x=d;d=[],x.forEach(u)},g=function(){return Promise.resolve().then(h)};g(),r={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),r}}}};return s}function ZA(n){n===void 0&&(n={});var o=QA(null);return o.options=ma({async:!0,ssr:!1},n),o}var Tb=function(n){var o=n.sideCar,r=Cb(n,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=o.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,ma({},r))};Tb.isSideCarExport=!0;function WA(n,o){return n.useMedium(o),Tb}var Ab=ZA(),pd=function(){},_c=v.forwardRef(function(n,o){var r=v.useRef(null),i=v.useState({onScrollCapture:pd,onWheelCapture:pd,onTouchMoveCapture:pd}),s=i[0],u=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,x=n.enabled,y=n.shards,S=n.sideCar,A=n.noRelative,C=n.noIsolation,E=n.inert,M=n.allowPinchZoom,R=n.as,j=R===void 0?"div":R,B=n.gapMode,Y=Cb(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ee=S,$=FA([r,o]),V=ma(ma({},Y),s);return v.createElement(v.Fragment,null,x&&v.createElement(ee,{sideCar:Ab,removeScrollBar:g,shards:y,noRelative:A,noIsolation:C,inert:E,setCallbacks:u,allowPinchZoom:!!M,lockRef:r,gapMode:B}),d?v.cloneElement(v.Children.only(m),ma(ma({},V),{ref:$})):v.createElement(j,ma({},V,{className:h,ref:$}),m))});_c.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_c.classNames={fullWidth:nc,zeroRight:tc};var JA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eM(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var o=JA();return o&&n.setAttribute("nonce",o),n}function tM(n,o){n.styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o))}function nM(n){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(n)}var aM=function(){var n=0,o=null;return{add:function(r){n==0&&(o=eM())&&(tM(o,r),nM(o)),n++},remove:function(){n--,!n&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},oM=function(){var n=aM();return function(o,r){v.useEffect(function(){return n.add(o),function(){n.remove()}},[o&&r])}},Mb=function(){var n=oM(),o=function(r){var i=r.styles,s=r.dynamic;return n(i,s),null};return o},rM={left:0,top:0,right:0,gap:0},gd=function(n){return parseInt(n||"",10)||0},lM=function(n){var o=window.getComputedStyle(document.body),r=o[n==="padding"?"paddingLeft":"marginLeft"],i=o[n==="padding"?"paddingTop":"marginTop"],s=o[n==="padding"?"paddingRight":"marginRight"];return[gd(r),gd(i),gd(s)]},iM=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return rM;var o=lM(n),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,i-r+o[2]-o[0])}},sM=Mb(),Jr="data-scroll-locked",cM=function(n,o,r,i){var s=n.left,u=n.top,d=n.right,m=n.gap;return r===void 0&&(r="margin"),`
|
|
381
|
+
.`.concat(YA,` {
|
|
382
|
+
overflow: hidden `).concat(i,`;
|
|
383
|
+
padding-right: `).concat(m,"px ").concat(i,`;
|
|
384
|
+
}
|
|
385
|
+
body[`).concat(Jr,`] {
|
|
386
|
+
overflow: hidden `).concat(i,`;
|
|
387
|
+
overscroll-behavior: contain;
|
|
388
|
+
`).concat([o&&"position: relative ".concat(i,";"),r==="margin"&&`
|
|
389
|
+
padding-left: `.concat(s,`px;
|
|
390
|
+
padding-top: `).concat(u,`px;
|
|
391
|
+
padding-right: `).concat(d,`px;
|
|
392
|
+
margin-left:0;
|
|
393
|
+
margin-top:0;
|
|
394
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
395
|
+
`),r==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.`).concat(tc,` {
|
|
399
|
+
right: `).concat(m,"px ").concat(i,`;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.`).concat(nc,` {
|
|
403
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.`).concat(tc," .").concat(tc,` {
|
|
407
|
+
right: 0 `).concat(i,`;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.`).concat(nc," .").concat(nc,` {
|
|
411
|
+
margin-right: 0 `).concat(i,`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
body[`).concat(Jr,`] {
|
|
415
|
+
`).concat(qA,": ").concat(m,`px;
|
|
416
|
+
}
|
|
417
|
+
`)},A0=function(){var n=parseInt(document.body.getAttribute(Jr)||"0",10);return isFinite(n)?n:0},uM=function(){v.useEffect(function(){return document.body.setAttribute(Jr,(A0()+1).toString()),function(){var n=A0()-1;n<=0?document.body.removeAttribute(Jr):document.body.setAttribute(Jr,n.toString())}},[])},fM=function(n){var o=n.noRelative,r=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;uM();var u=v.useMemo(function(){return iM(s)},[s]);return v.createElement(sM,{styles:cM(u,!o,s,r?"":"!important")})},Zd=!1;if(typeof window<"u")try{var Gs=Object.defineProperty({},"passive",{get:function(){return Zd=!0,!0}});window.addEventListener("test",Gs,Gs),window.removeEventListener("test",Gs,Gs)}catch{Zd=!1}var qr=Zd?{passive:!1}:!1,dM=function(n){return n.tagName==="TEXTAREA"},_b=function(n,o){if(!(n instanceof Element))return!1;var r=window.getComputedStyle(n);return r[o]!=="hidden"&&!(r.overflowY===r.overflowX&&!dM(n)&&r[o]==="visible")},mM=function(n){return _b(n,"overflowY")},hM=function(n){return _b(n,"overflowX")},M0=function(n,o){var r=o.ownerDocument,i=o;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Nb(n,i);if(s){var u=Rb(n,i),d=u[1],m=u[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},pM=function(n){var o=n.scrollTop,r=n.scrollHeight,i=n.clientHeight;return[o,r,i]},gM=function(n){var o=n.scrollLeft,r=n.scrollWidth,i=n.clientWidth;return[o,r,i]},Nb=function(n,o){return n==="v"?mM(o):hM(o)},Rb=function(n,o){return n==="v"?pM(o):gM(o)},yM=function(n,o){return n==="h"&&o==="rtl"?-1:1},vM=function(n,o,r,i,s){var u=yM(n,window.getComputedStyle(o).direction),d=u*i,m=r.target,h=o.contains(m),g=!1,x=d>0,y=0,S=0;do{if(!m)break;var A=Rb(n,m),C=A[0],E=A[1],M=A[2],R=E-M-u*C;(C||R)&&Nb(n,m)&&(y+=R,S+=C);var j=m.parentNode;m=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&m!==document.body||h&&(o.contains(m)||o===m));return(x&&Math.abs(y)<1||!x&&Math.abs(S)<1)&&(g=!0),g},Ys=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},_0=function(n){return[n.deltaX,n.deltaY]},N0=function(n){return n&&"current"in n?n.current:n},bM=function(n,o){return n[0]===o[0]&&n[1]===o[1]},xM=function(n){return`
|
|
418
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
419
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
420
|
+
`)},SM=0,Vr=[];function wM(n){var o=v.useRef([]),r=v.useRef([0,0]),i=v.useRef(),s=v.useState(SM++)[0],u=v.useState(Mb)[0],d=v.useRef(n);v.useEffect(function(){d.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var E=GA([n.lockRef.current],(n.shards||[]).map(N0),!0).filter(Boolean);return E.forEach(function(M){return M.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(E,M){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var R=Ys(E),j=r.current,B="deltaX"in E?E.deltaX:j[0]-R[0],Y="deltaY"in E?E.deltaY:j[1]-R[1],ee,$=E.target,V=Math.abs(B)>Math.abs(Y)?"h":"v";if("touches"in E&&V==="h"&&$.type==="range")return!1;var z=window.getSelection(),W=z&&z.anchorNode,ie=W?W===$||W.contains($):!1;if(ie)return!1;var fe=M0(V,$);if(!fe)return!0;if(fe?ee=V:(ee=V==="v"?"h":"v",fe=M0(V,$)),!fe)return!1;if(!i.current&&"changedTouches"in E&&(B||Y)&&(i.current=ee),!ee)return!0;var Q=i.current||ee;return vM(Q,M,E,Q==="h"?B:Y)},[]),h=v.useCallback(function(E){var M=E;if(!(!Vr.length||Vr[Vr.length-1]!==u)){var R="deltaY"in M?_0(M):Ys(M),j=o.current.filter(function(ee){return ee.name===M.type&&(ee.target===M.target||M.target===ee.shadowParent)&&bM(ee.delta,R)})[0];if(j&&j.should){M.cancelable&&M.preventDefault();return}if(!j){var B=(d.current.shards||[]).map(N0).filter(Boolean).filter(function(ee){return ee.contains(M.target)}),Y=B.length>0?m(M,B[0]):!d.current.noIsolation;Y&&M.cancelable&&M.preventDefault()}}},[]),g=v.useCallback(function(E,M,R,j){var B={name:E,delta:M,target:R,should:j,shadowParent:EM(R)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(Y){return Y!==B})},1)},[]),x=v.useCallback(function(E){r.current=Ys(E),i.current=void 0},[]),y=v.useCallback(function(E){g(E.type,_0(E),E.target,m(E,n.lockRef.current))},[]),S=v.useCallback(function(E){g(E.type,Ys(E),E.target,m(E,n.lockRef.current))},[]);v.useEffect(function(){return Vr.push(u),n.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:S}),document.addEventListener("wheel",h,qr),document.addEventListener("touchmove",h,qr),document.addEventListener("touchstart",x,qr),function(){Vr=Vr.filter(function(E){return E!==u}),document.removeEventListener("wheel",h,qr),document.removeEventListener("touchmove",h,qr),document.removeEventListener("touchstart",x,qr)}},[]);var A=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:xM(s)}):null,A?v.createElement(fM,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function EM(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const CM=WA(Ab,wM);var yi=v.forwardRef(function(n,o){return v.createElement(_c,ma({},n,{ref:o,sideCar:CM}))});yi.classNames=_c.classNames;var TM=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},Xr=new WeakMap,qs=new WeakMap,Vs={},yd=0,Ob=function(n){return n&&(n.host||Ob(n.parentNode))},AM=function(n,o){return o.map(function(r){if(n.contains(r))return r;var i=Ob(r);return i&&n.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",n,". Doing nothing"),null)}).filter(function(r){return!!r})},MM=function(n,o,r,i){var s=AM(o,Array.isArray(n)?n:[n]);Vs[r]||(Vs[r]=new WeakMap);var u=Vs[r],d=[],m=new Set,h=new Set(s),g=function(y){!y||m.has(y)||(m.add(y),g(y.parentNode))};s.forEach(g);var x=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(S){if(m.has(S))x(S);else try{var A=S.getAttribute(i),C=A!==null&&A!=="false",E=(Xr.get(S)||0)+1,M=(u.get(S)||0)+1;Xr.set(S,E),u.set(S,M),d.push(S),E===1&&C&&qs.set(S,!0),M===1&&S.setAttribute(r,"true"),C||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return x(o),m.clear(),yd++,function(){d.forEach(function(y){var S=Xr.get(y)-1,A=u.get(y)-1;Xr.set(y,S),u.set(y,A),S||(qs.has(y)||y.removeAttribute(i),qs.delete(y)),A||y.removeAttribute(r)}),yd--,yd||(Xr=new WeakMap,Xr=new WeakMap,qs=new WeakMap,Vs={})}},Nc=function(n,o,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=TM(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),MM(i,s,r,"aria-hidden")):function(){return null}},Rc="Dialog",[Db]=Ga(Rc),[_M,oa]=Db(Rc),jb=n=>{const{__scopeDialog:o,children:r,open:i,defaultOpen:s,onOpenChange:u,modal:d=!0}=n,m=v.useRef(null),h=v.useRef(null),[g,x]=nl({prop:i,defaultProp:s??!1,onChange:u,caller:Rc});return p.jsx(_M,{scope:o,triggerRef:m,contentRef:h,contentId:pa(),titleId:pa(),descriptionId:pa(),open:g,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(y=>!y),[x]),modal:d,children:r})};jb.displayName=Rc;var zb="DialogTrigger",NM=v.forwardRef((n,o)=>{const{__scopeDialog:r,...i}=n,s=oa(zb,r),u=tt(o,s.triggerRef);return p.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Dm(s.open),...i,ref:u,onClick:ge(n.onClick,s.onOpenToggle)})});NM.displayName=zb;var Rm="DialogPortal",[RM,kb]=Db(Rm,{forceMount:void 0}),Lb=n=>{const{__scopeDialog:o,forceMount:r,children:i,container:s}=n,u=oa(Rm,o);return p.jsx(RM,{scope:o,forceMount:r,children:v.Children.map(i,d=>p.jsx(aa,{present:r||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:d})}))})};Lb.displayName=Rm;var hc="DialogOverlay",Hb=v.forwardRef((n,o)=>{const r=kb(hc,n.__scopeDialog),{forceMount:i=r.forceMount,...s}=n,u=oa(hc,n.__scopeDialog);return u.modal?p.jsx(aa,{present:i||u.open,children:p.jsx(DM,{...s,ref:o})}):null});Hb.displayName=hc;var OM=_o("DialogOverlay.RemoveScroll"),DM=v.forwardRef((n,o)=>{const{__scopeDialog:r,...i}=n,s=oa(hc,r);return p.jsx(yi,{as:OM,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx($e.div,{"data-state":Dm(s.open),...i,ref:o,style:{pointerEvents:"auto",...i.style}})})}),rr="DialogContent",Bb=v.forwardRef((n,o)=>{const r=kb(rr,n.__scopeDialog),{forceMount:i=r.forceMount,...s}=n,u=oa(rr,n.__scopeDialog);return p.jsx(aa,{present:i||u.open,children:u.modal?p.jsx(jM,{...s,ref:o}):p.jsx(zM,{...s,ref:o})})});Bb.displayName=rr;var jM=v.forwardRef((n,o)=>{const r=oa(rr,n.__scopeDialog),i=v.useRef(null),s=tt(o,r.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return Nc(u)},[]),p.jsx(Ub,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(n.onCloseAutoFocus,u=>{var d;u.preventDefault(),(d=r.triggerRef.current)==null||d.focus()}),onPointerDownOutside:ge(n.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:ge(n.onFocusOutside,u=>u.preventDefault())})}),zM=v.forwardRef((n,o)=>{const r=oa(rr,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(Ub,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var d,m;(d=n.onCloseAutoFocus)==null||d.call(n,u),u.defaultPrevented||(i.current||(m=r.triggerRef.current)==null||m.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var h,g;(h=n.onInteractOutside)==null||h.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=u.target;((g=r.triggerRef.current)==null?void 0:g.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),Ub=v.forwardRef((n,o)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...d}=n,m=oa(rr,r),h=v.useRef(null),g=tt(o,h);return Mc(),p.jsxs(p.Fragment,{children:[p.jsx(pi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(sl,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Dm(m.open),...d,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(kM,{titleId:m.titleId}),p.jsx(HM,{contentRef:h,descriptionId:m.descriptionId})]})]})}),Om="DialogTitle",Ib=v.forwardRef((n,o)=>{const{__scopeDialog:r,...i}=n,s=oa(Om,r);return p.jsx($e.h2,{id:s.titleId,...i,ref:o})});Ib.displayName=Om;var Pb="DialogDescription",$b=v.forwardRef((n,o)=>{const{__scopeDialog:r,...i}=n,s=oa(Pb,r);return p.jsx($e.p,{id:s.descriptionId,...i,ref:o})});$b.displayName=Pb;var Gb="DialogClose",Yb=v.forwardRef((n,o)=>{const{__scopeDialog:r,...i}=n,s=oa(Gb,r);return p.jsx($e.button,{type:"button",...i,ref:o,onClick:ge(n.onClick,()=>s.onOpenChange(!1))})});Yb.displayName=Gb;function Dm(n){return n?"open":"closed"}var qb="DialogTitleWarning",[yj,Vb]=gA(qb,{contentName:rr,titleName:Om,docsSlug:"dialog"}),kM=({titleId:n})=>{const o=Vb(qb),r=`\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
421
|
+
|
|
422
|
+
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
423
|
+
|
|
424
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(r))},[r,n]),null},LM="DialogDescriptionWarning",HM=({contentRef:n,descriptionId:o})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vb(LM).contentName}}.`;return v.useEffect(()=>{var u;const s=(u=n.current)==null?void 0:u.getAttribute("aria-describedby");o&&s&&(document.getElementById(o)||console.warn(i))},[i,n,o]),null},BM=jb,UM=Lb,IM=Hb,PM=Bb,$M=Ib,GM=$b,YM=Yb;function qM(n){const o=v.useRef({value:n,previous:n});return v.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}function VM(n){const[o,r]=v.useState(void 0);return en(()=>{if(n){r({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let d,m;if("borderBoxSize"in u){const h=u.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;r({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else r(void 0)},[n]),o}const XM=["top","right","bottom","left"],No=Math.min,jn=Math.max,pc=Math.round,Xs=Math.floor,ga=n=>({x:n,y:n}),FM={left:"right",right:"left",bottom:"top",top:"bottom"};function Wd(n,o,r){return jn(n,No(o,r))}function Pa(n,o){return typeof n=="function"?n(o):n}function $a(n){return n.split("-")[0]}function cl(n){return n.split("-")[1]}function jm(n){return n==="x"?"y":"x"}function zm(n){return n==="y"?"height":"width"}function ha(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function km(n){return jm(ha(n))}function KM(n,o,r){r===void 0&&(r=!1);const i=cl(n),s=km(n),u=zm(s);let d=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return o.reference[u]>o.floating[u]&&(d=gc(d)),[d,gc(d)]}function QM(n){const o=gc(n);return[Jd(n),o,Jd(o)]}function Jd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const R0=["left","right"],O0=["right","left"],ZM=["top","bottom"],WM=["bottom","top"];function JM(n,o,r){switch(n){case"top":case"bottom":return r?o?O0:R0:o?R0:O0;case"left":case"right":return o?ZM:WM;default:return[]}}function e_(n,o,r,i){const s=cl(n);let u=JM($a(n),r==="start",i);return s&&(u=u.map(d=>d+"-"+s),o&&(u=u.concat(u.map(Jd)))),u}function gc(n){const o=$a(n);return FM[o]+n.slice(o.length)}function t_(n){return{top:0,right:0,bottom:0,left:0,...n}}function Xb(n){return typeof n!="number"?t_(n):{top:n,right:n,bottom:n,left:n}}function yc(n){const{x:o,y:r,width:i,height:s}=n;return{width:i,height:s,top:r,left:o,right:o+i,bottom:r+s,x:o,y:r}}function D0(n,o,r){let{reference:i,floating:s}=n;const u=ha(o),d=km(o),m=zm(d),h=$a(o),g=u==="y",x=i.x+i.width/2-s.width/2,y=i.y+i.height/2-s.height/2,S=i[m]/2-s[m]/2;let A;switch(h){case"top":A={x,y:i.y-s.height};break;case"bottom":A={x,y:i.y+i.height};break;case"right":A={x:i.x+i.width,y};break;case"left":A={x:i.x-s.width,y};break;default:A={x:i.x,y:i.y}}switch(cl(o)){case"start":A[d]-=S*(r&&g?-1:1);break;case"end":A[d]+=S*(r&&g?-1:1);break}return A}async function n_(n,o){var r;o===void 0&&(o={});const{x:i,y:s,platform:u,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:S=!1,padding:A=0}=Pa(o,n),C=Xb(A),M=m[S?y==="floating"?"reference":"floating":y],R=yc(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(M)))==null||r?M:M.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(m.floating)),boundary:g,rootBoundary:x,strategy:h})),j=y==="floating"?{x:i,y:s,width:d.floating.width,height:d.floating.height}:d.reference,B=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),Y=await(u.isElement==null?void 0:u.isElement(B))?await(u.getScale==null?void 0:u.getScale(B))||{x:1,y:1}:{x:1,y:1},ee=yc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:j,offsetParent:B,strategy:h}):j);return{top:(R.top-ee.top+C.top)/Y.y,bottom:(ee.bottom-R.bottom+C.bottom)/Y.y,left:(R.left-ee.left+C.left)/Y.x,right:(ee.right-R.right+C.right)/Y.x}}const a_=50,o_=async(n,o,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:d}=r,m=d.detectOverflow?d:{...d,detectOverflow:n_},h=await(d.isRTL==null?void 0:d.isRTL(o));let g=await d.getElementRects({reference:n,floating:o,strategy:s}),{x,y}=D0(g,i,h),S=i,A=0;const C={};for(let E=0;E<u.length;E++){const M=u[E];if(!M)continue;const{name:R,fn:j}=M,{x:B,y:Y,data:ee,reset:$}=await j({x,y,initialPlacement:i,placement:S,strategy:s,middlewareData:C,rects:g,platform:m,elements:{reference:n,floating:o}});x=B??x,y=Y??y,C[R]={...C[R],...ee},$&&A<a_&&(A++,typeof $=="object"&&($.placement&&(S=$.placement),$.rects&&(g=$.rects===!0?await d.getElementRects({reference:n,floating:o,strategy:s}):$.rects),{x,y}=D0(g,S,h)),E=-1)}return{x,y,placement:S,strategy:s,middlewareData:C}},r_=n=>({name:"arrow",options:n,async fn(o){const{x:r,y:i,placement:s,rects:u,platform:d,elements:m,middlewareData:h}=o,{element:g,padding:x=0}=Pa(n,o)||{};if(g==null)return{};const y=Xb(x),S={x:r,y:i},A=km(s),C=zm(A),E=await d.getDimensions(g),M=A==="y",R=M?"top":"left",j=M?"bottom":"right",B=M?"clientHeight":"clientWidth",Y=u.reference[C]+u.reference[A]-S[A]-u.floating[C],ee=S[A]-u.reference[A],$=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let V=$?$[B]:0;(!V||!await(d.isElement==null?void 0:d.isElement($)))&&(V=m.floating[B]||u.floating[C]);const z=Y/2-ee/2,W=V/2-E[C]/2-1,ie=No(y[R],W),fe=No(y[j],W),Q=ie,oe=V-E[C]-fe,de=V/2-E[C]/2+z,pe=Wd(Q,de,oe),T=!h.arrow&&cl(s)!=null&&de!==pe&&u.reference[C]/2-(de<Q?ie:fe)-E[C]/2<0,O=T?de<Q?de-Q:de-oe:0;return{[A]:S[A]+O,data:{[A]:pe,centerOffset:de-pe-O,...T&&{alignmentOffset:O}},reset:T}}}),l_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var r,i;const{placement:s,middlewareData:u,rects:d,initialPlacement:m,platform:h,elements:g}=o,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...M}=Pa(n,o);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const R=$a(s),j=ha(m),B=$a(m)===m,Y=await(h.isRTL==null?void 0:h.isRTL(g.floating)),ee=S||(B||!E?[gc(m)]:QM(m)),$=C!=="none";!S&&$&&ee.push(...e_(m,E,C,Y));const V=[m,...ee],z=await h.detectOverflow(o,M),W=[];let ie=((i=u.flip)==null?void 0:i.overflows)||[];if(x&&W.push(z[R]),y){const de=KM(s,d,Y);W.push(z[de[0]],z[de[1]])}if(ie=[...ie,{placement:s,overflows:W}],!W.every(de=>de<=0)){var fe,Q;const de=(((fe=u.flip)==null?void 0:fe.index)||0)+1,pe=V[de];if(pe&&(!(y==="alignment"?j!==ha(pe):!1)||ie.every(N=>ha(N.placement)===j?N.overflows[0]>0:!0)))return{data:{index:de,overflows:ie},reset:{placement:pe}};let T=(Q=ie.filter(O=>O.overflows[0]<=0).sort((O,N)=>O.overflows[1]-N.overflows[1])[0])==null?void 0:Q.placement;if(!T)switch(A){case"bestFit":{var oe;const O=(oe=ie.filter(N=>{if($){const L=ha(N.placement);return L===j||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:oe[0];O&&(T=O);break}case"initialPlacement":T=m;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function j0(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function z0(n){return XM.some(o=>n[o]>=0)}const i_=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:r,platform:i}=o,{strategy:s="referenceHidden",...u}=Pa(n,o);switch(s){case"referenceHidden":{const d=await i.detectOverflow(o,{...u,elementContext:"reference"}),m=j0(d,r.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:z0(m)}}}case"escaped":{const d=await i.detectOverflow(o,{...u,altBoundary:!0}),m=j0(d,r.floating);return{data:{escapedOffsets:m,escaped:z0(m)}}}default:return{}}}}},Fb=new Set(["left","top"]);async function s_(n,o){const{placement:r,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),d=$a(r),m=cl(r),h=ha(r)==="y",g=Fb.has(d)?-1:1,x=u&&h?-1:1,y=Pa(o,n);let{mainAxis:S,crossAxis:A,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof C=="number"&&(A=m==="end"?C*-1:C),h?{x:A*x,y:S*g}:{x:S*g,y:A*x}}const c_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var r,i;const{x:s,y:u,placement:d,middlewareData:m}=o,h=await s_(o,n);return d===((r=m.offset)==null?void 0:r.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:d}}}}},u_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:r,y:i,placement:s,platform:u}=o,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:R=>{let{x:j,y:B}=R;return{x:j,y:B}}},...g}=Pa(n,o),x={x:r,y:i},y=await u.detectOverflow(o,g),S=ha($a(s)),A=jm(S);let C=x[A],E=x[S];if(d){const R=A==="y"?"top":"left",j=A==="y"?"bottom":"right",B=C+y[R],Y=C-y[j];C=Wd(B,C,Y)}if(m){const R=S==="y"?"top":"left",j=S==="y"?"bottom":"right",B=E+y[R],Y=E-y[j];E=Wd(B,E,Y)}const M=h.fn({...o,[A]:C,[S]:E});return{...M,data:{x:M.x-r,y:M.y-i,enabled:{[A]:d,[S]:m}}}}}},f_=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:r,y:i,placement:s,rects:u,middlewareData:d}=o,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Pa(n,o),x={x:r,y:i},y=ha(s),S=jm(y);let A=x[S],C=x[y];const E=Pa(m,o),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(h){const B=S==="y"?"height":"width",Y=u.reference[S]-u.floating[B]+M.mainAxis,ee=u.reference[S]+u.reference[B]-M.mainAxis;A<Y?A=Y:A>ee&&(A=ee)}if(g){var R,j;const B=S==="y"?"width":"height",Y=Fb.has($a(s)),ee=u.reference[y]-u.floating[B]+(Y&&((R=d.offset)==null?void 0:R[y])||0)+(Y?0:M.crossAxis),$=u.reference[y]+u.reference[B]+(Y?0:((j=d.offset)==null?void 0:j[y])||0)-(Y?M.crossAxis:0);C<ee?C=ee:C>$&&(C=$)}return{[S]:A,[y]:C}}}},d_=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var r,i;const{placement:s,rects:u,platform:d,elements:m}=o,{apply:h=()=>{},...g}=Pa(n,o),x=await d.detectOverflow(o,g),y=$a(s),S=cl(s),A=ha(s)==="y",{width:C,height:E}=u.floating;let M,R;y==="top"||y==="bottom"?(M=y,R=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(R=y,M=S==="end"?"top":"bottom");const j=E-x.top-x.bottom,B=C-x.left-x.right,Y=No(E-x[M],j),ee=No(C-x[R],B),$=!o.middlewareData.shift;let V=Y,z=ee;if((r=o.middlewareData.shift)!=null&&r.enabled.x&&(z=B),(i=o.middlewareData.shift)!=null&&i.enabled.y&&(V=j),$&&!S){const ie=jn(x.left,0),fe=jn(x.right,0),Q=jn(x.top,0),oe=jn(x.bottom,0);A?z=C-2*(ie!==0||fe!==0?ie+fe:jn(x.left,x.right)):V=E-2*(Q!==0||oe!==0?Q+oe:jn(x.top,x.bottom))}await h({...o,availableWidth:z,availableHeight:V});const W=await d.getDimensions(m.floating);return C!==W.width||E!==W.height?{reset:{rects:!0}}:{}}}};function Oc(){return typeof window<"u"}function ul(n){return Kb(n)?(n.nodeName||"").toLowerCase():"#document"}function zn(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function ya(n){var o;return(o=(Kb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Kb(n){return Oc()?n instanceof Node||n instanceof zn(n).Node:!1}function ta(n){return Oc()?n instanceof Element||n instanceof zn(n).Element:!1}function Ya(n){return Oc()?n instanceof HTMLElement||n instanceof zn(n).HTMLElement:!1}function k0(n){return!Oc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof zn(n).ShadowRoot}function vi(n){const{overflow:o,overflowX:r,overflowY:i,display:s}=na(n);return/auto|scroll|overlay|hidden|clip/.test(o+i+r)&&s!=="inline"&&s!=="contents"}function m_(n){return/^(table|td|th)$/.test(ul(n))}function Dc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const h_=/transform|translate|scale|rotate|perspective|filter/,p_=/paint|layout|strict|content/,ar=n=>!!n&&n!=="none";let vd;function Lm(n){const o=ta(n)?na(n):n;return ar(o.transform)||ar(o.translate)||ar(o.scale)||ar(o.rotate)||ar(o.perspective)||!Hm()&&(ar(o.backdropFilter)||ar(o.filter))||h_.test(o.willChange||"")||p_.test(o.contain||"")}function g_(n){let o=Ro(n);for(;Ya(o)&&!al(o);){if(Lm(o))return o;if(Dc(o))return null;o=Ro(o)}return null}function Hm(){return vd==null&&(vd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vd}function al(n){return/^(html|body|#document)$/.test(ul(n))}function na(n){return zn(n).getComputedStyle(n)}function jc(n){return ta(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ro(n){if(ul(n)==="html")return n;const o=n.assignedSlot||n.parentNode||k0(n)&&n.host||ya(n);return k0(o)?o.host:o}function Qb(n){const o=Ro(n);return al(o)?n.ownerDocument?n.ownerDocument.body:n.body:Ya(o)&&vi(o)?o:Qb(o)}function ui(n,o,r){var i;o===void 0&&(o=[]),r===void 0&&(r=!0);const s=Qb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),d=zn(s);if(u){const m=em(d);return o.concat(d,d.visualViewport||[],vi(s)?s:[],m&&r?ui(m):[])}else return o.concat(s,ui(s,[],r))}function em(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Zb(n){const o=na(n);let r=parseFloat(o.width)||0,i=parseFloat(o.height)||0;const s=Ya(n),u=s?n.offsetWidth:r,d=s?n.offsetHeight:i,m=pc(r)!==u||pc(i)!==d;return m&&(r=u,i=d),{width:r,height:i,$:m}}function Bm(n){return ta(n)?n:n.contextElement}function el(n){const o=Bm(n);if(!Ya(o))return ga(1);const r=o.getBoundingClientRect(),{width:i,height:s,$:u}=Zb(o);let d=(u?pc(r.width):r.width)/i,m=(u?pc(r.height):r.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const y_=ga(0);function Wb(n){const o=zn(n);return!Hm()||!o.visualViewport?y_:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function v_(n,o,r){return o===void 0&&(o=!1),!r||o&&r!==zn(n)?!1:o}function lr(n,o,r,i){o===void 0&&(o=!1),r===void 0&&(r=!1);const s=n.getBoundingClientRect(),u=Bm(n);let d=ga(1);o&&(i?ta(i)&&(d=el(i)):d=el(n));const m=v_(u,r,i)?Wb(u):ga(0);let h=(s.left+m.x)/d.x,g=(s.top+m.y)/d.y,x=s.width/d.x,y=s.height/d.y;if(u){const S=zn(u),A=i&&ta(i)?zn(i):i;let C=S,E=em(C);for(;E&&i&&A!==C;){const M=el(E),R=E.getBoundingClientRect(),j=na(E),B=R.left+(E.clientLeft+parseFloat(j.paddingLeft))*M.x,Y=R.top+(E.clientTop+parseFloat(j.paddingTop))*M.y;h*=M.x,g*=M.y,x*=M.x,y*=M.y,h+=B,g+=Y,C=zn(E),E=em(C)}}return yc({width:x,height:y,x:h,y:g})}function zc(n,o){const r=jc(n).scrollLeft;return o?o.left+r:lr(ya(n)).left+r}function Jb(n,o){const r=n.getBoundingClientRect(),i=r.left+o.scrollLeft-zc(n,r),s=r.top+o.scrollTop;return{x:i,y:s}}function b_(n){let{elements:o,rect:r,offsetParent:i,strategy:s}=n;const u=s==="fixed",d=ya(i),m=o?Dc(o.floating):!1;if(i===d||m&&u)return r;let h={scrollLeft:0,scrollTop:0},g=ga(1);const x=ga(0),y=Ya(i);if((y||!y&&!u)&&((ul(i)!=="body"||vi(d))&&(h=jc(i)),y)){const A=lr(i);g=el(i),x.x=A.x+i.clientLeft,x.y=A.y+i.clientTop}const S=d&&!y&&!u?Jb(d,h):ga(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-h.scrollLeft*g.x+x.x+S.x,y:r.y*g.y-h.scrollTop*g.y+x.y+S.y}}function x_(n){return Array.from(n.getClientRects())}function S_(n){const o=ya(n),r=jc(n),i=n.ownerDocument.body,s=jn(o.scrollWidth,o.clientWidth,i.scrollWidth,i.clientWidth),u=jn(o.scrollHeight,o.clientHeight,i.scrollHeight,i.clientHeight);let d=-r.scrollLeft+zc(n);const m=-r.scrollTop;return na(i).direction==="rtl"&&(d+=jn(o.clientWidth,i.clientWidth)-s),{width:s,height:u,x:d,y:m}}const L0=25;function w_(n,o){const r=zn(n),i=ya(n),s=r.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,h=0;if(s){u=s.width,d=s.height;const x=Hm();(!x||x&&o==="fixed")&&(m=s.offsetLeft,h=s.offsetTop)}const g=zc(i);if(g<=0){const x=i.ownerDocument,y=x.body,S=getComputedStyle(y),A=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-y.clientWidth-A);C<=L0&&(u-=C)}else g<=L0&&(u+=g);return{width:u,height:d,x:m,y:h}}function E_(n,o){const r=lr(n,!0,o==="fixed"),i=r.top+n.clientTop,s=r.left+n.clientLeft,u=Ya(n)?el(n):ga(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,h=s*u.x,g=i*u.y;return{width:d,height:m,x:h,y:g}}function H0(n,o,r){let i;if(o==="viewport")i=w_(n,r);else if(o==="document")i=S_(ya(n));else if(ta(o))i=E_(o,r);else{const s=Wb(n);i={x:o.x-s.x,y:o.y-s.y,width:o.width,height:o.height}}return yc(i)}function ex(n,o){const r=Ro(n);return r===o||!ta(r)||al(r)?!1:na(r).position==="fixed"||ex(r,o)}function C_(n,o){const r=o.get(n);if(r)return r;let i=ui(n,[],!1).filter(m=>ta(m)&&ul(m)!=="body"),s=null;const u=na(n).position==="fixed";let d=u?Ro(n):n;for(;ta(d)&&!al(d);){const m=na(d),h=Lm(d);!h&&m.position==="fixed"&&(s=null),(u?!h&&!s:!h&&m.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||vi(d)&&!h&&ex(n,d))?i=i.filter(x=>x!==d):s=m,d=Ro(d)}return o.set(n,i),i}function T_(n){let{element:o,boundary:r,rootBoundary:i,strategy:s}=n;const d=[...r==="clippingAncestors"?Dc(o)?[]:C_(o,this._c):[].concat(r),i],m=H0(o,d[0],s);let h=m.top,g=m.right,x=m.bottom,y=m.left;for(let S=1;S<d.length;S++){const A=H0(o,d[S],s);h=jn(A.top,h),g=No(A.right,g),x=No(A.bottom,x),y=jn(A.left,y)}return{width:g-y,height:x-h,x:y,y:h}}function A_(n){const{width:o,height:r}=Zb(n);return{width:o,height:r}}function M_(n,o,r){const i=Ya(o),s=ya(o),u=r==="fixed",d=lr(n,!0,u,o);let m={scrollLeft:0,scrollTop:0};const h=ga(0);function g(){h.x=zc(s)}if(i||!i&&!u)if((ul(o)!=="body"||vi(s))&&(m=jc(o)),i){const A=lr(o,!0,u,o);h.x=A.x+o.clientLeft,h.y=A.y+o.clientTop}else s&&g();u&&!i&&s&&g();const x=s&&!i&&!u?Jb(s,m):ga(0),y=d.left+m.scrollLeft-h.x-x.x,S=d.top+m.scrollTop-h.y-x.y;return{x:y,y:S,width:d.width,height:d.height}}function bd(n){return na(n).position==="static"}function B0(n,o){if(!Ya(n)||na(n).position==="fixed")return null;if(o)return o(n);let r=n.offsetParent;return ya(n)===r&&(r=r.ownerDocument.body),r}function tx(n,o){const r=zn(n);if(Dc(n))return r;if(!Ya(n)){let s=Ro(n);for(;s&&!al(s);){if(ta(s)&&!bd(s))return s;s=Ro(s)}return r}let i=B0(n,o);for(;i&&m_(i)&&bd(i);)i=B0(i,o);return i&&al(i)&&bd(i)&&!Lm(i)?r:i||g_(n)||r}const __=async function(n){const o=this.getOffsetParent||tx,r=this.getDimensions,i=await r(n.floating);return{reference:M_(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function N_(n){return na(n).direction==="rtl"}const R_={convertOffsetParentRelativeRectToViewportRelativeRect:b_,getDocumentElement:ya,getClippingRect:T_,getOffsetParent:tx,getElementRects:__,getClientRects:x_,getDimensions:A_,getScale:el,isElement:ta,isRTL:N_};function nx(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function O_(n,o){let r=null,i;const s=ya(n);function u(){var m;clearTimeout(i),(m=r)==null||m.disconnect(),r=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const g=n.getBoundingClientRect(),{left:x,top:y,width:S,height:A}=g;if(m||o(),!S||!A)return;const C=Xs(y),E=Xs(s.clientWidth-(x+S)),M=Xs(s.clientHeight-(y+A)),R=Xs(x),B={rootMargin:-C+"px "+-E+"px "+-M+"px "+-R+"px",threshold:jn(0,No(1,h))||1};let Y=!0;function ee($){const V=$[0].intersectionRatio;if(V!==h){if(!Y)return d();V?d(!1,V):i=setTimeout(()=>{d(!1,1e-7)},1e3)}V===1&&!nx(g,n.getBoundingClientRect())&&d(),Y=!1}try{r=new IntersectionObserver(ee,{...B,root:s.ownerDocument})}catch{r=new IntersectionObserver(ee,B)}r.observe(n)}return d(!0),u}function D_(n,o,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=Bm(n),x=s||u?[...g?ui(g):[],...o?ui(o):[]]:[];x.forEach(R=>{s&&R.addEventListener("scroll",r,{passive:!0}),u&&R.addEventListener("resize",r)});const y=g&&m?O_(g,r):null;let S=-1,A=null;d&&(A=new ResizeObserver(R=>{let[j]=R;j&&j.target===g&&A&&o&&(A.unobserve(o),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var B;(B=A)==null||B.observe(o)})),r()}),g&&!h&&A.observe(g),o&&A.observe(o));let C,E=h?lr(n):null;h&&M();function M(){const R=lr(n);E&&!nx(E,R)&&r(),E=R,C=requestAnimationFrame(M)}return r(),()=>{var R;x.forEach(j=>{s&&j.removeEventListener("scroll",r),u&&j.removeEventListener("resize",r)}),y==null||y(),(R=A)==null||R.disconnect(),A=null,h&&cancelAnimationFrame(C)}}const j_=c_,z_=u_,k_=l_,L_=d_,H_=i_,U0=r_,B_=f_,U_=(n,o,r)=>{const i=new Map,s={platform:R_,...r},u={...s.platform,_c:i};return o_(n,o,{...s,platform:u})};var I_=typeof document<"u",P_=function(){},ac=I_?v.useLayoutEffect:P_;function vc(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let r,i,s;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==o.length)return!1;for(i=r;i--!==0;)if(!vc(n[i],o[i]))return!1;return!0}if(s=Object.keys(n),r=s.length,r!==Object.keys(o).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(o,s[i]))return!1;for(i=r;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!vc(n[u],o[u]))return!1}return!0}return n!==n&&o!==o}function ax(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function I0(n,o){const r=ax(n);return Math.round(o*r)/r}function xd(n){const o=v.useRef(n);return ac(()=>{o.current=n}),o}function $_(n){n===void 0&&(n={});const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[x,y]=v.useState({x:0,y:0,strategy:r,placement:o,middlewareData:{},isPositioned:!1}),[S,A]=v.useState(i);vc(S,i)||A(i);const[C,E]=v.useState(null),[M,R]=v.useState(null),j=v.useCallback(N=>{N!==$.current&&($.current=N,E(N))},[]),B=v.useCallback(N=>{N!==V.current&&(V.current=N,R(N))},[]),Y=u||C,ee=d||M,$=v.useRef(null),V=v.useRef(null),z=v.useRef(x),W=h!=null,ie=xd(h),fe=xd(s),Q=xd(g),oe=v.useCallback(()=>{if(!$.current||!V.current)return;const N={placement:o,strategy:r,middleware:S};fe.current&&(N.platform=fe.current),U_($.current,V.current,N).then(L=>{const D={...L,isPositioned:Q.current!==!1};de.current&&!vc(z.current,D)&&(z.current=D,mi.flushSync(()=>{y(D)}))})},[S,o,r,fe,Q]);ac(()=>{g===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,y(N=>({...N,isPositioned:!1})))},[g]);const de=v.useRef(!1);ac(()=>(de.current=!0,()=>{de.current=!1}),[]),ac(()=>{if(Y&&($.current=Y),ee&&(V.current=ee),Y&&ee){if(ie.current)return ie.current(Y,ee,oe);oe()}},[Y,ee,oe,ie,W]);const pe=v.useMemo(()=>({reference:$,floating:V,setReference:j,setFloating:B}),[j,B]),T=v.useMemo(()=>({reference:Y,floating:ee}),[Y,ee]),O=v.useMemo(()=>{const N={position:r,left:0,top:0};if(!T.floating)return N;const L=I0(T.floating,x.x),D=I0(T.floating,x.y);return m?{...N,transform:"translate("+L+"px, "+D+"px)",...ax(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:D}},[r,m,T.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:oe,refs:pe,elements:T,floatingStyles:O}),[x,oe,pe,T,O])}const G_=n=>{function o(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:n,fn(r){const{element:i,padding:s}=typeof n=="function"?n(r):n;return i&&o(i)?i.current!=null?U0({element:i.current,padding:s}).fn(r):{}:i?U0({element:i,padding:s}).fn(r):{}}}},Y_=(n,o)=>{const r=j_(n);return{name:r.name,fn:r.fn,options:[n,o]}},q_=(n,o)=>{const r=z_(n);return{name:r.name,fn:r.fn,options:[n,o]}},V_=(n,o)=>({fn:B_(n).fn,options:[n,o]}),X_=(n,o)=>{const r=k_(n);return{name:r.name,fn:r.fn,options:[n,o]}},F_=(n,o)=>{const r=L_(n);return{name:r.name,fn:r.fn,options:[n,o]}},K_=(n,o)=>{const r=H_(n);return{name:r.name,fn:r.fn,options:[n,o]}},Q_=(n,o)=>{const r=G_(n);return{name:r.name,fn:r.fn,options:[n,o]}};var Z_="Arrow",ox=v.forwardRef((n,o)=>{const{children:r,width:i=10,height:s=5,...u}=n;return p.jsx($e.svg,{...u,ref:o,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});ox.displayName=Z_;var W_=ox,Um="Popper",[rx,jo]=Ga(Um),[J_,lx]=rx(Um),ix=n=>{const{__scopePopper:o,children:r}=n,[i,s]=v.useState(null);return p.jsx(J_,{scope:o,anchor:i,onAnchorChange:s,children:r})};ix.displayName=Um;var sx="PopperAnchor",cx=v.forwardRef((n,o)=>{const{__scopePopper:r,virtualRef:i,...s}=n,u=lx(sx,r),d=v.useRef(null),m=tt(o,d),h=v.useRef(null);return v.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&u.onAnchorChange(h.current)}),i?null:p.jsx($e.div,{...s,ref:m})});cx.displayName=sx;var Im="PopperContent",[eN,tN]=rx(Im),ux=v.forwardRef((n,o)=>{var ne,q,le,ye,Ee,be;const{__scopePopper:r,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:S=!1,updatePositionStrategy:A="optimized",onPlaced:C,...E}=n,M=lx(Im,r),[R,j]=v.useState(null),B=tt(o,Re=>j(Re)),[Y,ee]=v.useState(null),$=VM(Y),V=($==null?void 0:$.width)??0,z=($==null?void 0:$.height)??0,W=i+(u!=="center"?"-"+u:""),ie=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},fe=Array.isArray(g)?g:[g],Q=fe.length>0,oe={padding:ie,boundary:fe.filter(aN),altBoundary:Q},{refs:de,floatingStyles:pe,placement:T,isPositioned:O,middlewareData:N}=$_({strategy:"fixed",placement:W,whileElementsMounted:(...Re)=>D_(...Re,{animationFrame:A==="always"}),elements:{reference:M.anchor},middleware:[Y_({mainAxis:s+z,alignmentAxis:d}),h&&q_({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?V_():void 0,...oe}),h&&X_({...oe}),F_({...oe,apply:({elements:Re,rects:ke,availableWidth:_e,availableHeight:rt})=>{const{width:dt,height:xt}=ke.reference,nt=Re.floating.style;nt.setProperty("--radix-popper-available-width",`${_e}px`),nt.setProperty("--radix-popper-available-height",`${rt}px`),nt.setProperty("--radix-popper-anchor-width",`${dt}px`),nt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),Y&&Q_({element:Y,padding:m}),oN({arrowWidth:V,arrowHeight:z}),S&&K_({strategy:"referenceHidden",...oe})]}),[L,D]=mx(T),_=Xn(C);en(()=>{O&&(_==null||_())},[O,_]);const U=(ne=N.arrow)==null?void 0:ne.x,H=(q=N.arrow)==null?void 0:q.y,P=((le=N.arrow)==null?void 0:le.centerOffset)!==0,[X,te]=v.useState();return en(()=>{R&&te(window.getComputedStyle(R).zIndex)},[R]),p.jsx("div",{ref:de.setFloating,"data-radix-popper-content-wrapper":"",style:{...pe,transform:O?pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(ye=N.transformOrigin)==null?void 0:ye.x,(Ee=N.transformOrigin)==null?void 0:Ee.y].join(" "),...((be=N.hide)==null?void 0:be.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:p.jsx(eN,{scope:r,placedSide:L,onArrowChange:ee,arrowX:U,arrowY:H,shouldHideArrow:P,children:p.jsx($e.div,{"data-side":L,"data-align":D,...E,ref:B,style:{...E.style,animation:O?void 0:"none"}})})})});ux.displayName=Im;var fx="PopperArrow",nN={top:"bottom",right:"left",bottom:"top",left:"right"},dx=v.forwardRef(function(o,r){const{__scopePopper:i,...s}=o,u=tN(fx,i),d=nN[u.placedSide];return p.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:p.jsx(W_,{...s,ref:r,style:{...s.style,display:"block"}})})});dx.displayName=fx;function aN(n){return n!==null}var oN=n=>({name:"transformOrigin",options:n,fn(o){var M,R,j;const{placement:r,rects:i,middlewareData:s}=o,d=((M=s.arrow)==null?void 0:M.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,x]=mx(r),y={start:"0%",center:"50%",end:"100%"}[x],S=(((R=s.arrow)==null?void 0:R.x)??0)+m/2,A=(((j=s.arrow)==null?void 0:j.y)??0)+h/2;let C="",E="";return g==="bottom"?(C=d?y:`${S}px`,E=`${-h}px`):g==="top"?(C=d?y:`${S}px`,E=`${i.floating.height+h}px`):g==="right"?(C=`${-h}px`,E=d?y:`${A}px`):g==="left"&&(C=`${i.floating.width+h}px`,E=d?y:`${A}px`),{data:{x:C,y:E}}}});function mx(n){const[o,r="center"]=n.split("-");return[o,r]}var kc=ix,bi=cx,Lc=ux,Hc=dx,Sd="rovingFocusGroup.onEntryFocus",rN={bubbles:!1,cancelable:!0},xi="RovingFocusGroup",[tm,hx,lN]=_m(xi),[iN,px]=Ga(xi,[lN]),[sN,cN]=iN(xi),gx=v.forwardRef((n,o)=>p.jsx(tm.Provider,{scope:n.__scopeRovingFocusGroup,children:p.jsx(tm.Slot,{scope:n.__scopeRovingFocusGroup,children:p.jsx(uN,{...n,ref:o})})}));gx.displayName=xi;var uN=v.forwardRef((n,o)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...y}=n,S=v.useRef(null),A=tt(o,S),C=Nm(u),[E,M]=nl({prop:d,defaultProp:m??null,onChange:h,caller:xi}),[R,j]=v.useState(!1),B=Xn(g),Y=hx(r),ee=v.useRef(!1),[$,V]=v.useState(0);return v.useEffect(()=>{const z=S.current;if(z)return z.addEventListener(Sd,B),()=>z.removeEventListener(Sd,B)},[B]),p.jsx(sN,{scope:r,orientation:i,dir:C,loop:s,currentTabStopId:E,onItemFocus:v.useCallback(z=>M(z),[M]),onItemShiftTab:v.useCallback(()=>j(!0),[]),onFocusableItemAdd:v.useCallback(()=>V(z=>z+1),[]),onFocusableItemRemove:v.useCallback(()=>V(z=>z-1),[]),children:p.jsx($e.div,{tabIndex:R||$===0?-1:0,"data-orientation":i,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:ge(n.onMouseDown,()=>{ee.current=!0}),onFocus:ge(n.onFocus,z=>{const W=!ee.current;if(z.target===z.currentTarget&&W&&!R){const ie=new CustomEvent(Sd,rN);if(z.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const fe=Y().filter(T=>T.focusable),Q=fe.find(T=>T.active),oe=fe.find(T=>T.id===E),pe=[Q,oe,...fe].filter(Boolean).map(T=>T.ref.current);bx(pe,x)}}ee.current=!1}),onBlur:ge(n.onBlur,()=>j(!1))})})}),yx="RovingFocusGroupItem",vx=v.forwardRef((n,o)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:u,children:d,...m}=n,h=pa(),g=u||h,x=cN(yx,r),y=x.currentTabStopId===g,S=hx(r),{onFocusableItemAdd:A,onFocusableItemRemove:C,currentTabStopId:E}=x;return v.useEffect(()=>{if(i)return A(),()=>C()},[i,A,C]),p.jsx(tm.ItemSlot,{scope:r,id:g,focusable:i,active:s,children:p.jsx($e.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...m,ref:o,onMouseDown:ge(n.onMouseDown,M=>{i?x.onItemFocus(g):M.preventDefault()}),onFocus:ge(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:ge(n.onKeyDown,M=>{if(M.key==="Tab"&&M.shiftKey){x.onItemShiftTab();return}if(M.target!==M.currentTarget)return;const R=mN(M,x.orientation,x.dir);if(R!==void 0){if(M.metaKey||M.ctrlKey||M.altKey||M.shiftKey)return;M.preventDefault();let B=S().filter(Y=>Y.focusable).map(Y=>Y.ref.current);if(R==="last")B.reverse();else if(R==="prev"||R==="next"){R==="prev"&&B.reverse();const Y=B.indexOf(M.currentTarget);B=x.loop?hN(B,Y+1):B.slice(Y+1)}setTimeout(()=>bx(B))}}),children:typeof d=="function"?d({isCurrentTabStop:y,hasTabStop:E!=null}):d})})});vx.displayName=yx;var fN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dN(n,o){return o!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function mN(n,o,r){const i=dN(n.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return fN[i]}function bx(n,o=!1){const r=document.activeElement;for(const i of n)if(i===r||(i.focus({preventScroll:o}),document.activeElement!==r))return}function hN(n,o){return n.map((r,i)=>n[(o+i)%n.length])}var pN=gx,gN=vx,nm=["Enter"," "],yN=["ArrowDown","PageUp","Home"],xx=["ArrowUp","PageDown","End"],vN=[...yN,...xx],bN={ltr:[...nm,"ArrowRight"],rtl:[...nm,"ArrowLeft"]},xN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Si="Menu",[fi,SN,wN]=_m(Si),[ur,Sx]=Ga(Si,[wN,jo,px]),wi=jo(),wx=px(),[Ex,zo]=ur(Si),[EN,Ei]=ur(Si),Cx=n=>{const{__scopeMenu:o,open:r=!1,children:i,dir:s,onOpenChange:u,modal:d=!0}=n,m=wi(o),[h,g]=v.useState(null),x=v.useRef(!1),y=Xn(u),S=Nm(s);return v.useEffect(()=>{const A=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",A,{capture:!0}),()=>{document.removeEventListener("keydown",A,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx(kc,{...m,children:p.jsx(Ex,{scope:o,open:r,onOpenChange:y,content:h,onContentChange:g,children:p.jsx(EN,{scope:o,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:S,modal:d,children:i})})})};Cx.displayName=Si;var CN="MenuAnchor",Pm=v.forwardRef((n,o)=>{const{__scopeMenu:r,...i}=n,s=wi(r);return p.jsx(bi,{...s,...i,ref:o})});Pm.displayName=CN;var $m="MenuPortal",[TN,Tx]=ur($m,{forceMount:void 0}),Ax=n=>{const{__scopeMenu:o,forceMount:r,children:i,container:s}=n,u=zo($m,o);return p.jsx(TN,{scope:o,forceMount:r,children:p.jsx(aa,{present:r||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:i})})})};Ax.displayName=$m;var Vn="MenuContent",[AN,Gm]=ur(Vn),Mx=v.forwardRef((n,o)=>{const r=Tx(Vn,n.__scopeMenu),{forceMount:i=r.forceMount,...s}=n,u=zo(Vn,n.__scopeMenu),d=Ei(Vn,n.__scopeMenu);return p.jsx(fi.Provider,{scope:n.__scopeMenu,children:p.jsx(aa,{present:i||u.open,children:p.jsx(fi.Slot,{scope:n.__scopeMenu,children:d.modal?p.jsx(MN,{...s,ref:o}):p.jsx(_N,{...s,ref:o})})})})}),MN=v.forwardRef((n,o)=>{const r=zo(Vn,n.__scopeMenu),i=v.useRef(null),s=tt(o,i);return v.useEffect(()=>{const u=i.current;if(u)return Nc(u)},[]),p.jsx(Ym,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ge(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),_N=v.forwardRef((n,o)=>{const r=zo(Vn,n.__scopeMenu);return p.jsx(Ym,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),NN=_o("MenuContent.ScrollLock"),Ym=v.forwardRef((n,o)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:A,disableOutsideScroll:C,...E}=n,M=zo(Vn,r),R=Ei(Vn,r),j=wi(r),B=wx(r),Y=SN(r),[ee,$]=v.useState(null),V=v.useRef(null),z=tt(o,V,M.onContentChange),W=v.useRef(0),ie=v.useRef(""),fe=v.useRef(0),Q=v.useRef(null),oe=v.useRef("right"),de=v.useRef(0),pe=C?yi:v.Fragment,T=C?{as:NN,allowPinchZoom:!0}:void 0,O=L=>{var ne,q;const D=ie.current+L,_=Y().filter(le=>!le.disabled),U=document.activeElement,H=(ne=_.find(le=>le.ref.current===U))==null?void 0:ne.textValue,P=_.map(le=>le.textValue),X=PN(P,D,H),te=(q=_.find(le=>le.textValue===X))==null?void 0:q.ref.current;(function le(ye){ie.current=ye,window.clearTimeout(W.current),ye!==""&&(W.current=window.setTimeout(()=>le(""),1e3))})(D),te&&setTimeout(()=>te.focus())};v.useEffect(()=>()=>window.clearTimeout(W.current),[]),Mc();const N=v.useCallback(L=>{var _,U;return oe.current===((_=Q.current)==null?void 0:_.side)&&GN(L,(U=Q.current)==null?void 0:U.area)},[]);return p.jsx(AN,{scope:r,searchRef:ie,onItemEnter:v.useCallback(L=>{N(L)&&L.preventDefault()},[N]),onItemLeave:v.useCallback(L=>{var D;N(L)||((D=V.current)==null||D.focus(),$(null))},[N]),onTriggerLeave:v.useCallback(L=>{N(L)&&L.preventDefault()},[N]),pointerGraceTimerRef:fe,onPointerGraceIntentChange:v.useCallback(L=>{Q.current=L},[]),children:p.jsx(pe,{...T,children:p.jsx(pi,{asChild:!0,trapped:s,onMountAutoFocus:ge(u,L=>{var D;L.preventDefault(),(D=V.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:p.jsx(sl,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:A,children:p.jsx(pN,{asChild:!0,...B,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:ee,onCurrentTabStopIdChange:$,onEntryFocus:ge(h,L=>{R.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Lc,{role:"menu","aria-orientation":"vertical","data-state":Yx(M.open),"data-radix-menu-content":"",dir:R.dir,...j,...E,ref:z,style:{outline:"none",...E.style},onKeyDown:ge(E.onKeyDown,L=>{const _=L.target.closest("[data-radix-menu-content]")===L.currentTarget,U=L.ctrlKey||L.altKey||L.metaKey,H=L.key.length===1;_&&(L.key==="Tab"&&L.preventDefault(),!U&&H&&O(L.key));const P=V.current;if(L.target!==P||!vN.includes(L.key))return;L.preventDefault();const te=Y().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);xx.includes(L.key)&&te.reverse(),UN(te)}),onBlur:ge(n.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(W.current),ie.current="")}),onPointerMove:ge(n.onPointerMove,di(L=>{const D=L.target,_=de.current!==L.clientX;if(L.currentTarget.contains(D)&&_){const U=L.clientX>de.current?"right":"left";oe.current=U,de.current=L.clientX}}))})})})})})})});Mx.displayName=Vn;var RN="MenuGroup",qm=v.forwardRef((n,o)=>{const{__scopeMenu:r,...i}=n;return p.jsx($e.div,{role:"group",...i,ref:o})});qm.displayName=RN;var ON="MenuLabel",_x=v.forwardRef((n,o)=>{const{__scopeMenu:r,...i}=n;return p.jsx($e.div,{...i,ref:o})});_x.displayName=ON;var bc="MenuItem",P0="menu.itemSelect",Bc=v.forwardRef((n,o)=>{const{disabled:r=!1,onSelect:i,...s}=n,u=v.useRef(null),d=Ei(bc,n.__scopeMenu),m=Gm(bc,n.__scopeMenu),h=tt(o,u),g=v.useRef(!1),x=()=>{const y=u.current;if(!r&&y){const S=new CustomEvent(P0,{bubbles:!0,cancelable:!0});y.addEventListener(P0,A=>i==null?void 0:i(A),{once:!0}),vb(y,S),S.defaultPrevented?g.current=!1:d.onClose()}};return p.jsx(Nx,{...s,ref:h,disabled:r,onClick:ge(n.onClick,x),onPointerDown:y=>{var S;(S=n.onPointerDown)==null||S.call(n,y),g.current=!0},onPointerUp:ge(n.onPointerUp,y=>{var S;g.current||(S=y.currentTarget)==null||S.click()}),onKeyDown:ge(n.onKeyDown,y=>{const S=m.searchRef.current!=="";r||S&&y.key===" "||nm.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Bc.displayName=bc;var Nx=v.forwardRef((n,o)=>{const{__scopeMenu:r,disabled:i=!1,textValue:s,...u}=n,d=Gm(bc,r),m=wx(r),h=v.useRef(null),g=tt(o,h),[x,y]=v.useState(!1),[S,A]=v.useState("");return v.useEffect(()=>{const C=h.current;C&&A((C.textContent??"").trim())},[u.children]),p.jsx(fi.ItemSlot,{scope:r,disabled:i,textValue:s??S,children:p.jsx(gN,{asChild:!0,...m,focusable:!i,children:p.jsx($e.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:ge(n.onPointerMove,di(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ge(n.onPointerLeave,di(C=>d.onItemLeave(C))),onFocus:ge(n.onFocus,()=>y(!0)),onBlur:ge(n.onBlur,()=>y(!1))})})})}),DN="MenuCheckboxItem",Rx=v.forwardRef((n,o)=>{const{checked:r=!1,onCheckedChange:i,...s}=n;return p.jsx(kx,{scope:n.__scopeMenu,checked:r,children:p.jsx(Bc,{role:"menuitemcheckbox","aria-checked":xc(r)?"mixed":r,...s,ref:o,"data-state":Fm(r),onSelect:ge(s.onSelect,()=>i==null?void 0:i(xc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Rx.displayName=DN;var Ox="MenuRadioGroup",[jN,zN]=ur(Ox,{value:void 0,onValueChange:()=>{}}),Dx=v.forwardRef((n,o)=>{const{value:r,onValueChange:i,...s}=n,u=Xn(i);return p.jsx(jN,{scope:n.__scopeMenu,value:r,onValueChange:u,children:p.jsx(qm,{...s,ref:o})})});Dx.displayName=Ox;var jx="MenuRadioItem",zx=v.forwardRef((n,o)=>{const{value:r,...i}=n,s=zN(jx,n.__scopeMenu),u=r===s.value;return p.jsx(kx,{scope:n.__scopeMenu,checked:u,children:p.jsx(Bc,{role:"menuitemradio","aria-checked":u,...i,ref:o,"data-state":Fm(u),onSelect:ge(i.onSelect,()=>{var d;return(d=s.onValueChange)==null?void 0:d.call(s,r)},{checkForDefaultPrevented:!1})})})});zx.displayName=jx;var Vm="MenuItemIndicator",[kx,kN]=ur(Vm,{checked:!1}),Lx=v.forwardRef((n,o)=>{const{__scopeMenu:r,forceMount:i,...s}=n,u=kN(Vm,r);return p.jsx(aa,{present:i||xc(u.checked)||u.checked===!0,children:p.jsx($e.span,{...s,ref:o,"data-state":Fm(u.checked)})})});Lx.displayName=Vm;var LN="MenuSeparator",Hx=v.forwardRef((n,o)=>{const{__scopeMenu:r,...i}=n;return p.jsx($e.div,{role:"separator","aria-orientation":"horizontal",...i,ref:o})});Hx.displayName=LN;var HN="MenuArrow",Bx=v.forwardRef((n,o)=>{const{__scopeMenu:r,...i}=n,s=wi(r);return p.jsx(Hc,{...s,...i,ref:o})});Bx.displayName=HN;var Xm="MenuSub",[BN,Ux]=ur(Xm),Ix=n=>{const{__scopeMenu:o,children:r,open:i=!1,onOpenChange:s}=n,u=zo(Xm,o),d=wi(o),[m,h]=v.useState(null),[g,x]=v.useState(null),y=Xn(s);return v.useEffect(()=>(u.open===!1&&y(!1),()=>y(!1)),[u.open,y]),p.jsx(kc,{...d,children:p.jsx(Ex,{scope:o,open:i,onOpenChange:y,content:g,onContentChange:x,children:p.jsx(BN,{scope:o,contentId:pa(),triggerId:pa(),trigger:m,onTriggerChange:h,children:r})})})};Ix.displayName=Xm;var ai="MenuSubTrigger",Px=v.forwardRef((n,o)=>{const r=zo(ai,n.__scopeMenu),i=Ei(ai,n.__scopeMenu),s=Ux(ai,n.__scopeMenu),u=Gm(ai,n.__scopeMenu),d=v.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=u,g={__scopeMenu:n.__scopeMenu},x=v.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return v.useEffect(()=>x,[x]),v.useEffect(()=>{const y=m.current;return()=>{window.clearTimeout(y),h(null)}},[m,h]),p.jsx(Pm,{asChild:!0,...g,children:p.jsx(Nx,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Yx(r.open),...n,ref:Mm(o,s.onTriggerChange),onClick:y=>{var S;(S=n.onClick)==null||S.call(n,y),!(n.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ge(n.onPointerMove,di(y=>{u.onItemEnter(y),!y.defaultPrevented&&!n.disabled&&!r.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),x()},100))})),onPointerLeave:ge(n.onPointerLeave,di(y=>{var A,C;x();const S=(A=r.content)==null?void 0:A.getBoundingClientRect();if(S){const E=(C=r.content)==null?void 0:C.dataset.side,M=E==="right",R=M?-5:5,j=S[M?"left":"right"],B=S[M?"right":"left"];u.onPointerGraceIntentChange({area:[{x:y.clientX+R,y:y.clientY},{x:j,y:S.top},{x:B,y:S.top},{x:B,y:S.bottom},{x:j,y:S.bottom}],side:E}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(y),y.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:ge(n.onKeyDown,y=>{var A;const S=u.searchRef.current!=="";n.disabled||S&&y.key===" "||bN[i.dir].includes(y.key)&&(r.onOpenChange(!0),(A=r.content)==null||A.focus(),y.preventDefault())})})})});Px.displayName=ai;var $x="MenuSubContent",Gx=v.forwardRef((n,o)=>{const r=Tx(Vn,n.__scopeMenu),{forceMount:i=r.forceMount,...s}=n,u=zo(Vn,n.__scopeMenu),d=Ei(Vn,n.__scopeMenu),m=Ux($x,n.__scopeMenu),h=v.useRef(null),g=tt(o,h);return p.jsx(fi.Provider,{scope:n.__scopeMenu,children:p.jsx(aa,{present:i||u.open,children:p.jsx(fi.Slot,{scope:n.__scopeMenu,children:p.jsx(Ym,{id:m.contentId,"aria-labelledby":m.triggerId,...s,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var y;d.isUsingKeyboardRef.current&&((y=h.current)==null||y.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:ge(n.onFocusOutside,x=>{x.target!==m.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:ge(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:ge(n.onKeyDown,x=>{var A;const y=x.currentTarget.contains(x.target),S=xN[d.dir].includes(x.key);y&&S&&(u.onOpenChange(!1),(A=m.trigger)==null||A.focus(),x.preventDefault())})})})})})});Gx.displayName=$x;function Yx(n){return n?"open":"closed"}function xc(n){return n==="indeterminate"}function Fm(n){return xc(n)?"indeterminate":n?"checked":"unchecked"}function UN(n){const o=document.activeElement;for(const r of n)if(r===o||(r.focus(),document.activeElement!==o))return}function IN(n,o){return n.map((r,i)=>n[(o+i)%n.length])}function PN(n,o,r){const s=o.length>1&&Array.from(o).every(g=>g===o[0])?o[0]:o,u=r?n.indexOf(r):-1;let d=IN(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==r));const h=d.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return h!==r?h:void 0}function $N(n,o){const{x:r,y:i}=n;let s=!1;for(let u=0,d=o.length-1;u<o.length;d=u++){const m=o[u],h=o[d],g=m.x,x=m.y,y=h.x,S=h.y;x>i!=S>i&&r<(y-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function GN(n,o){if(!o)return!1;const r={x:n.clientX,y:n.clientY};return $N(r,o)}function di(n){return o=>o.pointerType==="mouse"?n(o):void 0}var YN=Cx,qN=Pm,VN=Ax,XN=Mx,FN=qm,KN=_x,QN=Bc,ZN=Rx,WN=Dx,JN=zx,eR=Lx,tR=Hx,nR=Bx,aR=Ix,oR=Px,rR=Gx,Km="ContextMenu",[lR]=Ga(Km,[Sx]),tn=Sx(),[iR,qx]=lR(Km),Vx=n=>{const{__scopeContextMenu:o,children:r,onOpenChange:i,dir:s,modal:u=!0}=n,[d,m]=v.useState(!1),h=tn(o),g=Xn(i),x=v.useCallback(y=>{m(y),g(y)},[g]);return p.jsx(iR,{scope:o,open:d,onOpenChange:x,modal:u,children:p.jsx(YN,{...h,dir:s,open:d,onOpenChange:x,modal:u,children:r})})};Vx.displayName=Km;var Xx="ContextMenuTrigger",Fx=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,disabled:i=!1,...s}=n,u=qx(Xx,r),d=tn(r),m=v.useRef({x:0,y:0}),h=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=v.useRef(0),x=v.useCallback(()=>window.clearTimeout(g.current),[]),y=S=>{m.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return v.useEffect(()=>x,[x]),v.useEffect(()=>void(i&&x()),[i,x]),p.jsxs(p.Fragment,{children:[p.jsx(qN,{...d,virtualRef:h}),p.jsx($e.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...s,ref:o,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:ge(n.onContextMenu,S=>{x(),y(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:ge(n.onPointerDown,Fs(S=>{x(),g.current=window.setTimeout(()=>y(S),700)})),onPointerMove:i?n.onPointerMove:ge(n.onPointerMove,Fs(x)),onPointerCancel:i?n.onPointerCancel:ge(n.onPointerCancel,Fs(x)),onPointerUp:i?n.onPointerUp:ge(n.onPointerUp,Fs(x))})]})});Fx.displayName=Xx;var sR="ContextMenuPortal",Kx=n=>{const{__scopeContextMenu:o,...r}=n,i=tn(o);return p.jsx(VN,{...i,...r})};Kx.displayName=sR;var Qx="ContextMenuContent",Zx=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=qx(Qx,r),u=tn(r),d=v.useRef(!1);return p.jsx(XN,{...u,...i,ref:o,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!s.modal&&(d.current=!0)},style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zx.displayName=Qx;var cR="ContextMenuGroup",uR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(FN,{...s,...i,ref:o})});uR.displayName=cR;var fR="ContextMenuLabel",dR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(KN,{...s,...i,ref:o})});dR.displayName=fR;var mR="ContextMenuItem",Wx=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(QN,{...s,...i,ref:o})});Wx.displayName=mR;var hR="ContextMenuCheckboxItem",pR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(ZN,{...s,...i,ref:o})});pR.displayName=hR;var gR="ContextMenuRadioGroup",yR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(WN,{...s,...i,ref:o})});yR.displayName=gR;var vR="ContextMenuRadioItem",bR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(JN,{...s,...i,ref:o})});bR.displayName=vR;var xR="ContextMenuItemIndicator",SR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(eR,{...s,...i,ref:o})});SR.displayName=xR;var wR="ContextMenuSeparator",Jx=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(tR,{...s,...i,ref:o})});Jx.displayName=wR;var ER="ContextMenuArrow",CR=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(nR,{...s,...i,ref:o})});CR.displayName=ER;var e1="ContextMenuSub",t1=n=>{const{__scopeContextMenu:o,children:r,onOpenChange:i,open:s,defaultOpen:u}=n,d=tn(o),[m,h]=nl({prop:s,defaultProp:u??!1,onChange:i,caller:e1});return p.jsx(aR,{...d,open:m,onOpenChange:h,children:r})};t1.displayName=e1;var TR="ContextMenuSubTrigger",n1=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(oR,{...s,...i,ref:o})});n1.displayName=TR;var AR="ContextMenuSubContent",a1=v.forwardRef((n,o)=>{const{__scopeContextMenu:r,...i}=n,s=tn(r);return p.jsx(rR,{...s,...i,ref:o,style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});a1.displayName=AR;function Fs(n){return o=>o.pointerType!=="mouse"?n(o):void 0}var MR=Vx,_R=Fx,NR=Kx,RR=Zx,OR=Wx,DR=Jx,jR=t1,zR=n1,kR=a1;function $0(n,[o,r]){return Math.min(r,Math.max(o,n))}var Uc="Popover",[o1]=Ga(Uc,[jo]),Ci=jo(),[LR,ko]=o1(Uc),r1=n=>{const{__scopePopover:o,children:r,open:i,defaultOpen:s,onOpenChange:u,modal:d=!1}=n,m=Ci(o),h=v.useRef(null),[g,x]=v.useState(!1),[y,S]=nl({prop:i,defaultProp:s??!1,onChange:u,caller:Uc});return p.jsx(kc,{...m,children:p.jsx(LR,{scope:o,contentId:pa(),triggerRef:h,open:y,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(A=>!A),[S]),hasCustomAnchor:g,onCustomAnchorAdd:v.useCallback(()=>x(!0),[]),onCustomAnchorRemove:v.useCallback(()=>x(!1),[]),modal:d,children:r})})};r1.displayName=Uc;var l1="PopoverAnchor",HR=v.forwardRef((n,o)=>{const{__scopePopover:r,...i}=n,s=ko(l1,r),u=Ci(r),{onCustomAnchorAdd:d,onCustomAnchorRemove:m}=s;return v.useEffect(()=>(d(),()=>m()),[d,m]),p.jsx(bi,{...u,...i,ref:o})});HR.displayName=l1;var i1="PopoverTrigger",s1=v.forwardRef((n,o)=>{const{__scopePopover:r,...i}=n,s=ko(i1,r),u=Ci(r),d=tt(o,s.triggerRef),m=p.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":m1(s.open),...i,ref:d,onClick:ge(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?m:p.jsx(bi,{asChild:!0,...u,children:m})});s1.displayName=i1;var Qm="PopoverPortal",[BR,UR]=o1(Qm,{forceMount:void 0}),c1=n=>{const{__scopePopover:o,forceMount:r,children:i,container:s}=n,u=ko(Qm,o);return p.jsx(BR,{scope:o,forceMount:r,children:p.jsx(aa,{present:r||u.open,children:p.jsx(gi,{asChild:!0,container:s,children:i})})})};c1.displayName=Qm;var ol="PopoverContent",u1=v.forwardRef((n,o)=>{const r=UR(ol,n.__scopePopover),{forceMount:i=r.forceMount,...s}=n,u=ko(ol,n.__scopePopover);return p.jsx(aa,{present:i||u.open,children:u.modal?p.jsx(PR,{...s,ref:o}):p.jsx($R,{...s,ref:o})})});u1.displayName=ol;var IR=_o("PopoverContent.RemoveScroll"),PR=v.forwardRef((n,o)=>{const r=ko(ol,n.__scopePopover),i=v.useRef(null),s=tt(o,i),u=v.useRef(!1);return v.useEffect(()=>{const d=i.current;if(d)return Nc(d)},[]),p.jsx(yi,{as:IR,allowPinchZoom:!0,children:p.jsx(f1,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(n.onCloseAutoFocus,d=>{var m;d.preventDefault(),u.current||(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:ge(n.onPointerDownOutside,d=>{const m=d.detail.originalEvent,h=m.button===0&&m.ctrlKey===!0,g=m.button===2||h;u.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:ge(n.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),$R=v.forwardRef((n,o)=>{const r=ko(ol,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(f1,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var d,m;(d=n.onCloseAutoFocus)==null||d.call(n,u),u.defaultPrevented||(i.current||(m=r.triggerRef.current)==null||m.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var h,g;(h=n.onInteractOutside)==null||h.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=u.target;((g=r.triggerRef.current)==null?void 0:g.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),f1=v.forwardRef((n,o)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:h,onFocusOutside:g,onInteractOutside:x,...y}=n,S=ko(ol,r),A=Ci(r);return Mc(),p.jsx(pi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(sl,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:x,onEscapeKeyDown:m,onPointerDownOutside:h,onFocusOutside:g,onDismiss:()=>S.onOpenChange(!1),children:p.jsx(Lc,{"data-state":m1(S.open),role:"dialog",id:S.contentId,...A,...y,ref:o,style:{...y.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)"}})})})}),d1="PopoverClose",GR=v.forwardRef((n,o)=>{const{__scopePopover:r,...i}=n,s=ko(d1,r);return p.jsx($e.button,{type:"button",...i,ref:o,onClick:ge(n.onClick,()=>s.onOpenChange(!1))})});GR.displayName=d1;var YR="PopoverArrow",qR=v.forwardRef((n,o)=>{const{__scopePopover:r,...i}=n,s=Ci(r);return p.jsx(Hc,{...s,...i,ref:o})});qR.displayName=YR;function m1(n){return n?"open":"closed"}var VR=r1,XR=s1,FR=c1,KR=u1,QR=[" ","Enter","ArrowUp","ArrowDown"],ZR=[" ","Enter"],ir="Select",[Ic,Pc,WR]=_m(ir),[fl]=Ga(ir,[WR,jo]),$c=jo(),[JR,Lo]=fl(ir),[e5,t5]=fl(ir),h1=n=>{const{__scopeSelect:o,children:r,open:i,defaultOpen:s,onOpenChange:u,value:d,defaultValue:m,onValueChange:h,dir:g,name:x,autoComplete:y,disabled:S,required:A,form:C}=n,E=$c(o),[M,R]=v.useState(null),[j,B]=v.useState(null),[Y,ee]=v.useState(!1),$=Nm(g),[V,z]=nl({prop:i,defaultProp:s??!1,onChange:u,caller:ir}),[W,ie]=nl({prop:d,defaultProp:m,onChange:h,caller:ir}),fe=v.useRef(null),Q=M?C||!!M.closest("form"):!0,[oe,de]=v.useState(new Set),pe=Array.from(oe).map(T=>T.props.value).join(";");return p.jsx(kc,{...E,children:p.jsxs(JR,{required:A,scope:o,trigger:M,onTriggerChange:R,valueNode:j,onValueNodeChange:B,valueNodeHasChildren:Y,onValueNodeHasChildrenChange:ee,contentId:pa(),value:W,onValueChange:ie,open:V,onOpenChange:z,dir:$,triggerPointerDownPosRef:fe,disabled:S,children:[p.jsx(Ic.Provider,{scope:o,children:p.jsx(e5,{scope:n.__scopeSelect,onNativeOptionAdd:v.useCallback(T=>{de(O=>new Set(O).add(T))},[]),onNativeOptionRemove:v.useCallback(T=>{de(O=>{const N=new Set(O);return N.delete(T),N})},[]),children:r})}),Q?p.jsxs(H1,{"aria-hidden":!0,required:A,tabIndex:-1,name:x,autoComplete:y,value:W,onChange:T=>ie(T.target.value),disabled:S,form:C,children:[W===void 0?p.jsx("option",{value:""}):null,Array.from(oe)]},pe):null]})})};h1.displayName=ir;var p1="SelectTrigger",g1=v.forwardRef((n,o)=>{const{__scopeSelect:r,disabled:i=!1,...s}=n,u=$c(r),d=Lo(p1,r),m=d.disabled||i,h=tt(o,d.onTriggerChange),g=Pc(r),x=v.useRef("touch"),[y,S,A]=U1(E=>{const M=g().filter(B=>!B.disabled),R=M.find(B=>B.value===d.value),j=I1(M,E,R);j!==void 0&&d.onValueChange(j.value)}),C=E=>{m||(d.onOpenChange(!0),A()),E&&(d.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return p.jsx(bi,{asChild:!0,...u,children:p.jsx($e.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":B1(d.value)?"":void 0,...s,ref:h,onClick:ge(s.onClick,E=>{E.currentTarget.focus(),x.current!=="mouse"&&C(E)}),onPointerDown:ge(s.onPointerDown,E=>{x.current=E.pointerType;const M=E.target;M.hasPointerCapture(E.pointerId)&&M.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:ge(s.onKeyDown,E=>{const M=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(M&&E.key===" ")&&QR.includes(E.key)&&(C(),E.preventDefault())})})})});g1.displayName=p1;var y1="SelectValue",v1=v.forwardRef((n,o)=>{const{__scopeSelect:r,className:i,style:s,children:u,placeholder:d="",...m}=n,h=Lo(y1,r),{onValueNodeHasChildrenChange:g}=h,x=u!==void 0,y=tt(o,h.onValueNodeChange);return en(()=>{g(x)},[g,x]),p.jsx($e.span,{...m,ref:y,style:{pointerEvents:"none"},children:B1(h.value)?p.jsx(p.Fragment,{children:d}):u})});v1.displayName=y1;var n5="SelectIcon",b1=v.forwardRef((n,o)=>{const{__scopeSelect:r,children:i,...s}=n;return p.jsx($e.span,{"aria-hidden":!0,...s,ref:o,children:i||"▼"})});b1.displayName=n5;var a5="SelectPortal",x1=n=>p.jsx(gi,{asChild:!0,...n});x1.displayName=a5;var sr="SelectContent",S1=v.forwardRef((n,o)=>{const r=Lo(sr,n.__scopeSelect),[i,s]=v.useState();if(en(()=>{s(new DocumentFragment)},[]),!r.open){const u=i;return u?mi.createPortal(p.jsx(w1,{scope:n.__scopeSelect,children:p.jsx(Ic.Slot,{scope:n.__scopeSelect,children:p.jsx("div",{children:n.children})})}),u):null}return p.jsx(E1,{...n,ref:o})});S1.displayName=sr;var Jn=10,[w1,Ho]=fl(sr),o5="SelectContentImpl",r5=_o("SelectContent.RemoveScroll"),E1=v.forwardRef((n,o)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:A,sticky:C,hideWhenDetached:E,avoidCollisions:M,...R}=n,j=Lo(sr,r),[B,Y]=v.useState(null),[ee,$]=v.useState(null),V=tt(o,ne=>Y(ne)),[z,W]=v.useState(null),[ie,fe]=v.useState(null),Q=Pc(r),[oe,de]=v.useState(!1),pe=v.useRef(!1);v.useEffect(()=>{if(B)return Nc(B)},[B]),Mc();const T=v.useCallback(ne=>{const[q,...le]=Q().map(be=>be.ref.current),[ye]=le.slice(-1),Ee=document.activeElement;for(const be of ne)if(be===Ee||(be==null||be.scrollIntoView({block:"nearest"}),be===q&&ee&&(ee.scrollTop=0),be===ye&&ee&&(ee.scrollTop=ee.scrollHeight),be==null||be.focus(),document.activeElement!==Ee))return},[Q,ee]),O=v.useCallback(()=>T([z,B]),[T,z,B]);v.useEffect(()=>{oe&&O()},[oe,O]);const{onOpenChange:N,triggerPointerDownPosRef:L}=j;v.useEffect(()=>{if(B){let ne={x:0,y:0};const q=ye=>{var Ee,be;ne={x:Math.abs(Math.round(ye.pageX)-(((Ee=L.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((be=L.current)==null?void 0:be.y)??0))}},le=ye=>{ne.x<=10&&ne.y<=10?ye.preventDefault():B.contains(ye.target)||N(!1),document.removeEventListener("pointermove",q),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",le,{capture:!0})}}},[B,N,L]),v.useEffect(()=>{const ne=()=>N(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[N]);const[D,_]=U1(ne=>{const q=Q().filter(Ee=>!Ee.disabled),le=q.find(Ee=>Ee.ref.current===document.activeElement),ye=I1(q,ne,le);ye&&setTimeout(()=>ye.ref.current.focus())}),U=v.useCallback((ne,q,le)=>{const ye=!pe.current&&!le;(j.value!==void 0&&j.value===q||ye)&&(W(ne),ye&&(pe.current=!0))},[j.value]),H=v.useCallback(()=>B==null?void 0:B.focus(),[B]),P=v.useCallback((ne,q,le)=>{const ye=!pe.current&&!le;(j.value!==void 0&&j.value===q||ye)&&fe(ne)},[j.value]),X=i==="popper"?am:C1,te=X===am?{side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:A,sticky:C,hideWhenDetached:E,avoidCollisions:M}:{};return p.jsx(w1,{scope:r,content:B,viewport:ee,onViewportChange:$,itemRefCallback:U,selectedItem:z,onItemLeave:H,itemTextRefCallback:P,focusSelectedItem:O,selectedItemText:ie,position:i,isPositioned:oe,searchRef:D,children:p.jsx(yi,{as:r5,allowPinchZoom:!0,children:p.jsx(pi,{asChild:!0,trapped:j.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:ge(s,ne=>{var q;(q=j.trigger)==null||q.focus({preventScroll:!0}),ne.preventDefault()}),children:p.jsx(sl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:p.jsx(X,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ne=>ne.preventDefault(),...R,...te,onPlaced:()=>de(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:ge(R.onKeyDown,ne=>{const q=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!q&&ne.key.length===1&&_(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ye=Q().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Ee=ne.target,be=ye.indexOf(Ee);ye=ye.slice(be+1)}setTimeout(()=>T(ye)),ne.preventDefault()}})})})})})})});E1.displayName=o5;var l5="SelectItemAlignedPosition",C1=v.forwardRef((n,o)=>{const{__scopeSelect:r,onPlaced:i,...s}=n,u=Lo(sr,r),d=Ho(sr,r),[m,h]=v.useState(null),[g,x]=v.useState(null),y=tt(o,V=>x(V)),S=Pc(r),A=v.useRef(!1),C=v.useRef(!0),{viewport:E,selectedItem:M,selectedItemText:R,focusSelectedItem:j}=d,B=v.useCallback(()=>{if(u.trigger&&u.valueNode&&m&&g&&E&&M&&R){const V=u.trigger.getBoundingClientRect(),z=g.getBoundingClientRect(),W=u.valueNode.getBoundingClientRect(),ie=R.getBoundingClientRect();if(u.dir!=="rtl"){const Ee=ie.left-z.left,be=W.left-Ee,Re=V.left-be,ke=V.width+Re,_e=Math.max(ke,z.width),rt=window.innerWidth-Jn,dt=$0(be,[Jn,Math.max(Jn,rt-_e)]);m.style.minWidth=ke+"px",m.style.left=dt+"px"}else{const Ee=z.right-ie.right,be=window.innerWidth-W.right-Ee,Re=window.innerWidth-V.right-be,ke=V.width+Re,_e=Math.max(ke,z.width),rt=window.innerWidth-Jn,dt=$0(be,[Jn,Math.max(Jn,rt-_e)]);m.style.minWidth=ke+"px",m.style.right=dt+"px"}const fe=S(),Q=window.innerHeight-Jn*2,oe=E.scrollHeight,de=window.getComputedStyle(g),pe=parseInt(de.borderTopWidth,10),T=parseInt(de.paddingTop,10),O=parseInt(de.borderBottomWidth,10),N=parseInt(de.paddingBottom,10),L=pe+T+oe+N+O,D=Math.min(M.offsetHeight*5,L),_=window.getComputedStyle(E),U=parseInt(_.paddingTop,10),H=parseInt(_.paddingBottom,10),P=V.top+V.height/2-Jn,X=Q-P,te=M.offsetHeight/2,ne=M.offsetTop+te,q=pe+T+ne,le=L-q;if(q<=P){const Ee=fe.length>0&&M===fe[fe.length-1].ref.current;m.style.bottom="0px";const be=g.clientHeight-E.offsetTop-E.offsetHeight,Re=Math.max(X,te+(Ee?H:0)+be+O),ke=q+Re;m.style.height=ke+"px"}else{const Ee=fe.length>0&&M===fe[0].ref.current;m.style.top="0px";const Re=Math.max(P,pe+E.offsetTop+(Ee?U:0)+te)+le;m.style.height=Re+"px",E.scrollTop=q-P+E.offsetTop}m.style.margin=`${Jn}px 0`,m.style.minHeight=D+"px",m.style.maxHeight=Q+"px",i==null||i(),requestAnimationFrame(()=>A.current=!0)}},[S,u.trigger,u.valueNode,m,g,E,M,R,u.dir,i]);en(()=>B(),[B]);const[Y,ee]=v.useState();en(()=>{g&&ee(window.getComputedStyle(g).zIndex)},[g]);const $=v.useCallback(V=>{V&&C.current===!0&&(B(),j==null||j(),C.current=!1)},[B,j]);return p.jsx(s5,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:A,onScrollButtonChange:$,children:p.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:Y},children:p.jsx($e.div,{...s,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});C1.displayName=l5;var i5="SelectPopperPosition",am=v.forwardRef((n,o)=>{const{__scopeSelect:r,align:i="start",collisionPadding:s=Jn,...u}=n,d=$c(r);return p.jsx(Lc,{...d,...u,ref:o,align:i,collisionPadding:s,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});am.displayName=i5;var[s5,Zm]=fl(sr,{}),om="SelectViewport",T1=v.forwardRef((n,o)=>{const{__scopeSelect:r,nonce:i,...s}=n,u=Ho(om,r),d=Zm(om,r),m=tt(o,u.onViewportChange),h=v.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(Ic.Slot,{scope:r,children:p.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ge(s.onScroll,g=>{const x=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&y){const A=Math.abs(h.current-x.scrollTop);if(A>0){const C=window.innerHeight-Jn*2,E=parseFloat(y.style.minHeight),M=parseFloat(y.style.height),R=Math.max(E,M);if(R<C){const j=R+A,B=Math.min(C,j),Y=j-B;y.style.height=B+"px",y.style.bottom==="0px"&&(x.scrollTop=Y>0?Y:0,y.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});T1.displayName=om;var A1="SelectGroup",[c5,u5]=fl(A1),M1=v.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,s=pa();return p.jsx(c5,{scope:r,id:s,children:p.jsx($e.div,{role:"group","aria-labelledby":s,...i,ref:o})})});M1.displayName=A1;var _1="SelectLabel",f5=v.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,s=u5(_1,r);return p.jsx($e.div,{id:s.id,...i,ref:o})});f5.displayName=_1;var Sc="SelectItem",[d5,N1]=fl(Sc),R1=v.forwardRef((n,o)=>{const{__scopeSelect:r,value:i,disabled:s=!1,textValue:u,...d}=n,m=Lo(Sc,r),h=Ho(Sc,r),g=m.value===i,[x,y]=v.useState(u??""),[S,A]=v.useState(!1),C=tt(o,j=>{var B;return(B=h.itemRefCallback)==null?void 0:B.call(h,j,i,s)}),E=pa(),M=v.useRef("touch"),R=()=>{s||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(d5,{scope:r,value:i,disabled:s,textId:E,isSelected:g,onItemTextChange:v.useCallback(j=>{y(B=>B||((j==null?void 0:j.textContent)??"").trim())},[]),children:p.jsx(Ic.ItemSlot,{scope:r,value:i,disabled:s,textValue:x,children:p.jsx($e.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:C,onFocus:ge(d.onFocus,()=>A(!0)),onBlur:ge(d.onBlur,()=>A(!1)),onClick:ge(d.onClick,()=>{M.current!=="mouse"&&R()}),onPointerUp:ge(d.onPointerUp,()=>{M.current==="mouse"&&R()}),onPointerDown:ge(d.onPointerDown,j=>{M.current=j.pointerType}),onPointerMove:ge(d.onPointerMove,j=>{var B;M.current=j.pointerType,s?(B=h.onItemLeave)==null||B.call(h):M.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(d.onPointerLeave,j=>{var B;j.currentTarget===document.activeElement&&((B=h.onItemLeave)==null||B.call(h))}),onKeyDown:ge(d.onKeyDown,j=>{var Y;((Y=h.searchRef)==null?void 0:Y.current)!==""&&j.key===" "||(ZR.includes(j.key)&&R(),j.key===" "&&j.preventDefault())})})})})});R1.displayName=Sc;var oi="SelectItemText",O1=v.forwardRef((n,o)=>{const{__scopeSelect:r,className:i,style:s,...u}=n,d=Lo(oi,r),m=Ho(oi,r),h=N1(oi,r),g=t5(oi,r),[x,y]=v.useState(null),S=tt(o,R=>y(R),h.onItemTextChange,R=>{var j;return(j=m.itemTextRefCallback)==null?void 0:j.call(m,R,h.value,h.disabled)}),A=x==null?void 0:x.textContent,C=v.useMemo(()=>p.jsx("option",{value:h.value,disabled:h.disabled,children:A},h.value),[h.disabled,h.value,A]),{onNativeOptionAdd:E,onNativeOptionRemove:M}=g;return en(()=>(E(C),()=>M(C)),[E,M,C]),p.jsxs(p.Fragment,{children:[p.jsx($e.span,{id:h.textId,...u,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?mi.createPortal(u.children,d.valueNode):null]})});O1.displayName=oi;var D1="SelectItemIndicator",j1=v.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n;return N1(D1,r).isSelected?p.jsx($e.span,{"aria-hidden":!0,...i,ref:o}):null});j1.displayName=D1;var rm="SelectScrollUpButton",z1=v.forwardRef((n,o)=>{const r=Ho(rm,n.__scopeSelect),i=Zm(rm,n.__scopeSelect),[s,u]=v.useState(!1),d=tt(o,i.onScrollButtonChange);return en(()=>{if(r.viewport&&r.isPositioned){let m=function(){const g=h.scrollTop>0;u(g)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),s?p.jsx(L1,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});z1.displayName=rm;var lm="SelectScrollDownButton",k1=v.forwardRef((n,o)=>{const r=Ho(lm,n.__scopeSelect),i=Zm(lm,n.__scopeSelect),[s,u]=v.useState(!1),d=tt(o,i.onScrollButtonChange);return en(()=>{if(r.viewport&&r.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<g;u(x)};const h=r.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),s?p.jsx(L1,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=r;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});k1.displayName=lm;var L1=v.forwardRef((n,o)=>{const{__scopeSelect:r,onAutoScroll:i,...s}=n,u=Ho("SelectScrollButton",r),d=v.useRef(null),m=Pc(r),h=v.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),en(()=>{var x;const g=m().find(y=>y.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),p.jsx($e.div,{"aria-hidden":!0,...s,ref:o,style:{flexShrink:0,...s.style},onPointerDown:ge(s.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:ge(s.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:ge(s.onPointerLeave,()=>{h()})})}),m5="SelectSeparator",h5=v.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n;return p.jsx($e.div,{"aria-hidden":!0,...i,ref:o})});h5.displayName=m5;var im="SelectArrow",p5=v.forwardRef((n,o)=>{const{__scopeSelect:r,...i}=n,s=$c(r),u=Lo(im,r),d=Ho(im,r);return u.open&&d.position==="popper"?p.jsx(Hc,{...s,...i,ref:o}):null});p5.displayName=im;var g5="SelectBubbleInput",H1=v.forwardRef(({__scopeSelect:n,value:o,...r},i)=>{const s=v.useRef(null),u=tt(i,s),d=qM(o);return v.useEffect(()=>{const m=s.current;if(!m)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==o&&x){const y=new Event("change",{bubbles:!0});x.call(m,o),m.dispatchEvent(y)}},[d,o]),p.jsx($e.select,{...r,style:{...bb,...r.style},ref:u,defaultValue:o})});H1.displayName=g5;function B1(n){return n===""||n===void 0}function U1(n){const o=Xn(n),r=v.useRef(""),i=v.useRef(0),s=v.useCallback(d=>{const m=r.current+d;o(m),(function h(g){r.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[o]),u=v.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,s,u]}function I1(n,o,r){const s=o.length>1&&Array.from(o).every(g=>g===o[0])?o[0]:o,u=r?n.indexOf(r):-1;let d=y5(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==r));const h=d.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==r?h:void 0}function y5(n,o){return n.map((r,i)=>n[(o+i)%n.length])}var v5=h1,b5=g1,x5=v1,S5=b1,w5=x1,E5=S1,C5=T1,T5=M1,A5=R1,M5=O1,_5=j1,N5=z1,R5=k1,O5="Separator",G0="horizontal",D5=["horizontal","vertical"],P1=v.forwardRef((n,o)=>{const{decorative:r,orientation:i=G0,...s}=n,u=j5(i)?i:G0,m=r?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return p.jsx($e.div,{"data-orientation":u,...m,...s,ref:o})});P1.displayName=O5;function j5(n){return D5.includes(n)}var z5=P1,[Gc]=Ga("Tooltip",[jo]),Wm=jo(),$1="TooltipProvider",k5=700,Y0="tooltip.open",[L5,G1]=Gc($1),Y1=n=>{const{__scopeTooltip:o,delayDuration:r=k5,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:u}=n,d=v.useRef(!0),m=v.useRef(!1),h=v.useRef(0);return v.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),p.jsx(L5,{scope:o,isOpenDelayedRef:d,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:v.useCallback(g=>{m.current=g},[]),disableHoverableContent:s,children:u})};Y1.displayName=$1;var q1="Tooltip",[vj,Yc]=Gc(q1),sm="TooltipTrigger",H5=v.forwardRef((n,o)=>{const{__scopeTooltip:r,...i}=n,s=Yc(sm,r),u=G1(sm,r),d=Wm(r),m=v.useRef(null),h=tt(o,m,s.onTriggerChange),g=v.useRef(!1),x=v.useRef(!1),y=v.useCallback(()=>g.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),p.jsx(bi,{asChild:!0,...d,children:p.jsx($e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:h,onPointerMove:ge(n.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!u.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:ge(n.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:ge(n.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:ge(n.onFocus,()=>{g.current||s.onOpen()}),onBlur:ge(n.onBlur,s.onClose),onClick:ge(n.onClick,s.onClose)})})});H5.displayName=sm;var B5="TooltipPortal",[bj,U5]=Gc(B5,{forceMount:void 0}),rl="TooltipContent",I5=v.forwardRef((n,o)=>{const r=U5(rl,n.__scopeTooltip),{forceMount:i=r.forceMount,side:s="top",...u}=n,d=Yc(rl,n.__scopeTooltip);return p.jsx(aa,{present:i||d.open,children:d.disableHoverableContent?p.jsx(V1,{side:s,...u,ref:o}):p.jsx(P5,{side:s,...u,ref:o})})}),P5=v.forwardRef((n,o)=>{const r=Yc(rl,n.__scopeTooltip),i=G1(rl,n.__scopeTooltip),s=v.useRef(null),u=tt(o,s),[d,m]=v.useState(null),{trigger:h,onClose:g}=r,x=s.current,{onPointerInTransitChange:y}=i,S=v.useCallback(()=>{m(null),y(!1)},[y]),A=v.useCallback((C,E)=>{const M=C.currentTarget,R={x:C.clientX,y:C.clientY},j=V5(R,M.getBoundingClientRect()),B=X5(R,j),Y=F5(E.getBoundingClientRect()),ee=Q5([...B,...Y]);m(ee),y(!0)},[y]);return v.useEffect(()=>()=>S(),[S]),v.useEffect(()=>{if(h&&x){const C=M=>A(M,x),E=M=>A(M,h);return h.addEventListener("pointerleave",C),x.addEventListener("pointerleave",E),()=>{h.removeEventListener("pointerleave",C),x.removeEventListener("pointerleave",E)}}},[h,x,A,S]),v.useEffect(()=>{if(d){const C=E=>{const M=E.target,R={x:E.clientX,y:E.clientY},j=(h==null?void 0:h.contains(M))||(x==null?void 0:x.contains(M)),B=!K5(R,d);j?S():B&&(S(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[h,x,d,g,S]),p.jsx(V1,{...n,ref:u})}),[$5,G5]=Gc(q1,{isInside:!1}),Y5=cA("TooltipContent"),V1=v.forwardRef((n,o)=>{const{__scopeTooltip:r,children:i,"aria-label":s,onEscapeKeyDown:u,onPointerDownOutside:d,...m}=n,h=Yc(rl,r),g=Wm(r),{onClose:x}=h;return v.useEffect(()=>(document.addEventListener(Y0,x),()=>document.removeEventListener(Y0,x)),[x]),v.useEffect(()=>{if(h.trigger){const y=S=>{const A=S.target;A!=null&&A.contains(h.trigger)&&x()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,x]),p.jsx(sl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:y=>y.preventDefault(),onDismiss:x,children:p.jsxs(Lc,{"data-state":h.stateAttribute,...g,...m,ref:o,style:{...m.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:[p.jsx(Y5,{children:i}),p.jsx($5,{scope:r,isInside:!0,children:p.jsx(pA,{id:h.contentId,role:"tooltip",children:s||i})})]})})});I5.displayName=rl;var X1="TooltipArrow",q5=v.forwardRef((n,o)=>{const{__scopeTooltip:r,...i}=n,s=Wm(r);return G5(X1,r).isInside?null:p.jsx(Hc,{...s,...i,ref:o})});q5.displayName=X1;function V5(n,o){const r=Math.abs(o.top-n.y),i=Math.abs(o.bottom-n.y),s=Math.abs(o.right-n.x),u=Math.abs(o.left-n.x);switch(Math.min(r,i,s,u)){case u:return"left";case s:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function X5(n,o,r=5){const i=[];switch(o){case"top":i.push({x:n.x-r,y:n.y+r},{x:n.x+r,y:n.y+r});break;case"bottom":i.push({x:n.x-r,y:n.y-r},{x:n.x+r,y:n.y-r});break;case"left":i.push({x:n.x+r,y:n.y-r},{x:n.x+r,y:n.y+r});break;case"right":i.push({x:n.x-r,y:n.y-r},{x:n.x-r,y:n.y+r});break}return i}function F5(n){const{top:o,right:r,bottom:i,left:s}=n;return[{x:s,y:o},{x:r,y:o},{x:r,y:i},{x:s,y:i}]}function K5(n,o){const{x:r,y:i}=n;let s=!1;for(let u=0,d=o.length-1;u<o.length;d=u++){const m=o[u],h=o[d],g=m.x,x=m.y,y=h.x,S=h.y;x>i!=S>i&&r<(y-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function Q5(n){const o=n.slice();return o.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),Z5(o)}function Z5(n){if(n.length<=1)return n.slice();const o=[];for(let i=0;i<n.length;i++){const s=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))o.pop();else break}o.push(s)}o.pop();const r=[];for(let i=n.length-1;i>=0;i--){const s=n[i];for(;r.length>=2;){const u=r[r.length-1],d=r[r.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))r.pop();else break}r.push(s)}return r.pop(),o.length===1&&r.length===1&&o[0].x===r[0].x&&o[0].y===r[0].y?o:o.concat(r)}var W5=Y1;const J5=lA("inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md text-[13px] font-medium whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/85",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",outline:"border border-foreground/[0.08] bg-white text-foreground/70 shadow-none hover:bg-foreground/[0.04] hover:text-foreground",secondary:"bg-foreground/[0.06] text-foreground hover:bg-foreground/[0.08]",ghost:"text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground",link:"text-foreground underline-offset-4 hover:underline"},size:{default:"h-8 px-3 py-1.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-md px-2 has-[>svg]:px-2",lg:"h-10 rounded-md px-4 has-[>svg]:px-3",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Kt({className:n,variant:o="default",size:r="default",asChild:i=!1,...s}){const u=i?iA:"button";return p.jsx(u,{"data-slot":"button","data-variant":o,"data-size":r,className:Be(J5({variant:o,size:r,className:n})),...s})}function eO({slides:n,startSlideId:o,onExit:r}){const i=v.useMemo(()=>{const q=n.findIndex(le=>le.id===o);return q>=0?q:0},[n,o]),[s,u]=v.useState(i),[d,m]=v.useState("none"),[h,g]=v.useState("#F59E0B"),[x,y]=v.useState(!1),[S,A]=v.useState([]),[C,E]=v.useState({x:-100,y:-100}),[M,R]=v.useState(!!document.fullscreenElement),[j,B]=v.useState(()=>({height:window.innerHeight,width:window.innerWidth})),Y=v.useRef(null),ee=v.useRef(null),$=v.useRef(null),V=v.useRef(0),z=v.useRef(s),W=v.useMemo(()=>HE(n),[n]),ie=W[Math.min(s,W.length-1)]??null;v.useEffect(()=>{const q=W.findIndex(le=>le.id===o);u(q>=0?q:0)},[W,o]),v.useEffect(()=>{const q=W.findIndex(le=>le.id===(ie==null?void 0:ie.id));q>=0&&q!==s&&u(q)},[s,ie==null?void 0:ie.id,W]),v.useEffect(()=>()=>{$.current&&window.clearTimeout($.current)},[]),v.useEffect(()=>{const q=()=>{R(!!document.fullscreenElement),B({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",q),document.addEventListener("fullscreenchange",q),()=>{window.removeEventListener("resize",q),document.removeEventListener("fullscreenchange",q)}},[]);const fe=v.useCallback(()=>{y(!0),$.current&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{y(!1)},1500)},[]);function Q(q){m(le=>le===q?"none":q)}const oe=v.useCallback(()=>{A([]),ee.current=null},[]);function de(q){m("none"),u(BE(q,W.length)),oe()}function pe(){de(s+1)}function T(){var le;const q=document.documentElement;if(document.fullscreenElement){(le=document.exitFullscreen)==null||le.call(document);return}q.requestFullscreen&&q.requestFullscreen()}function O(q){return q.clientY>=window.innerHeight-96}function N(q){if(O(q)&&fe(),d==="laser"&&E({x:q.clientX,y:q.clientY}),d==="pen"&&ee.current){const le=Y.current,ye=le==null?void 0:le.getBoundingClientRect();if(le&&ye){const Ee=Math.min(Math.max(q.clientX-ye.left,0),ye.width)/H,be=Math.min(Math.max(q.clientY-ye.top,0),ye.height)/H,Re={...ee.current,points:`${ee.current.points} L ${Ee.toFixed(1)} ${be.toFixed(1)}`};ee.current=Re,A(ke=>[...ke.slice(0,-1),Re])}}}function L(q){U(),!(d!=="none"||!Y.current||!(q.target instanceof Node))&&Y.current.contains(q.target)&&pe()}function D(q){if(d!=="none"||Math.abs(q.deltaY)<Math.abs(q.deltaX)||q.deltaY<=8)return;const le=Date.now();le-V.current<360||(V.current=le,q.preventDefault(),pe())}function _(q){if(d!=="pen"||!Y.current||!(q.target instanceof Node)||!Y.current.contains(q.target))return;const le=Y.current.getBoundingClientRect();if(!(q.clientX>=le.left&&q.clientX<=le.right&&q.clientY>=le.top&&q.clientY<=le.bottom))return;const Ee=Math.min(Math.max(q.clientX-le.left,0),le.width)/H,be=Math.min(Math.max(q.clientY-le.top,0),le.height)/H,Re={color:h,points:`M ${Ee.toFixed(1)} ${be.toFixed(1)}`};ee.current=Re,A(ke=>[...ke,Re])}function U(){ee.current=null}if(v.useEffect(()=>{z.current!==s&&(z.current=s,oe())},[s,oe]),v.useEffect(()=>{const q=le=>{if(le.key==="Escape"){if(d==="pen"){m("none"),oe(),fe();return}r();return}(le.key==="ArrowRight"||le.key==="ArrowDown"||le.key==="PageDown")&&(m("none"),u(ye=>Math.min(ye+1,W.length-1))),(le.key==="ArrowLeft"||le.key==="ArrowUp"||le.key==="PageUp")&&(m("none"),u(ye=>Math.max(ye-1,0)))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[oe,r,W.length,fe,d]),v.useEffect(()=>{var le;if(!ie)return;const q=(le=Y.current)==null?void 0:le.querySelector("[data-testid='presenter-slide-iframe']");q&&(q.srcdoc=ie.htmlSource)},[ie]),!ie)return null;const H=Math.min(j.width/ie.width,j.height/ie.height),P=Math.max(320,Math.floor(ie.width*H)),X=Math.max(240,Math.floor(ie.height*H)),te=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ne=d==="laser"?"none":d==="pen"?te:"default";return p.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ne},onPointerMove:N,onPointerDown:_,onPointerUp:L,onPointerLeave:U,onWheel:D,children:[p.jsxs("div",{ref:Y,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${P}px`,height:`${X}px`,transform:"translate(-50%, -50%)"},children:[p.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ie.width}px`,height:`${ie.height}px`,transform:`scale(${H})`,transformOrigin:"top left"}}),p.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${ie.width} ${ie.height}`,children:S.map((q,le)=>p.jsx("path",{d:q.points,fill:"none",stroke:q.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${q.color}-${le}`))})]}),p.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:d==="laser"?1:0,transform:`translate(${C.x}px, ${C.y}px) translate(-50%, -50%)`}}),d==="pen"?p.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:LE.map(q=>p.jsx("button",{type:"button","aria-label":`Use pen color ${q}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:q,outline:h===q?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(q)},q))}):null,p.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":x?"true":"false",onPointerEnter:fe,onPointerMove:fe,children:[p.jsx(Kt,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>de(s-1),disabled:s===0,children:"Prev"}),p.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[s+1," / ",W.length]}),p.jsx(Kt,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>de(s+1),disabled:s>=W.length-1,children:"Next"}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Kt,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>Q("laser"),"aria-pressed":d==="laser",children:[p.jsx(mT,{className:"size-3.5"}),"Laser"]}),p.jsxs(Kt,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>Q("pen"),"aria-pressed":d==="pen",children:[p.jsx(PC,{className:"size-3.5"}),"Pen"]}),p.jsxs(Kt,{variant:"ghost",size:"sm","aria-label":M?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:T,children:[p.jsx(HC,{className:"size-3.5"}),M?"Window":"Fullscreen"]}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Kt,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:r,children:[p.jsx(Cm,{className:"size-3.5"}),"Exit"]})]})]})}function F1({...n}){return p.jsx(MR,{"data-slot":"context-menu",...n})}function K1({...n}){return p.jsx(_R,{"data-slot":"context-menu-trigger",...n})}function wd({...n}){return p.jsx(jR,{"data-slot":"context-menu-sub",...n})}function Ed({className:n,inset:o,children:r,...i}){return p.jsxs(zR,{"data-slot":"context-menu-sub-trigger","data-inset":o,className:Be("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] outline-hidden focus:bg-foreground/[0.04] data-[state=open]:bg-foreground/[0.04] data-[inset=true]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i,children:[r,p.jsx(iC,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Cd({className:n,...o}){return p.jsx(kR,{"data-slot":"context-menu-sub-content",className:Be("z-50 min-w-44 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...o})}function Q1({className:n,...o}){return p.jsx(NR,{children:p.jsx(RR,{"data-slot":"context-menu-content",className:Be("z-50 min-w-48 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...o})})}function Ct({className:n,inset:o,variant:r="default",...i}){return p.jsx(OR,{"data-slot":"context-menu-item","data-inset":o,"data-variant":r,className:Be("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] text-foreground/75 outline-hidden transition-colors focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-45 data-[inset=true]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i})}function wc({className:n,...o}){return p.jsx(DR,{"data-slot":"context-menu-separator",className:Be("-mx-1 my-1 h-px bg-foreground/10",n),...o})}function q0({className:n,...o}){return p.jsx("span",{"data-slot":"context-menu-shortcut",className:Be("ml-auto text-[11px] tracking-normal text-foreground/40",n),...o})}function tl({className:n,type:o,...r}){return p.jsx("input",{type:o,"data-slot":"input",className:Be("h-8 w-full min-w-0 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-1 text-sm shadow-none transition-colors outline-none selection:bg-foreground selection:text-background file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/35 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...r})}function tO({slides:n,activeSlideId:o,slideCount:r,thumbnails:i,onSelectSlide:s,onAdd:u,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:x,onRename:y,onReorder:S}){const[A,C]=v.useState(null),[E,M]=v.useState(null),[R,j]=v.useState(null),[B,Y]=v.useState(""),ee=A?n.findIndex(Q=>Q.id===A):-1,$=R?n.find(Q=>Q.id===R):null,V=v.useCallback(Q=>{Q==null||Q.scrollIntoView({block:"nearest",inline:"nearest"})},[]),z=v.useCallback((Q,oe)=>{if(!Q||oe===null){C(null),M(null);return}const de=n.findIndex(pe=>pe.id===Q);de>=0&&de!==oe&&(S==null||S(Q,oe)),C(null),M(null)},[S,n]),W=v.useCallback(Q=>{j(Q.id),Y(Q.title||"Untitled Slide"),s(Q.id)},[s]),ie=v.useCallback(()=>{j(null),Y("")},[]),fe=v.useCallback(()=>{R&&(y==null||y(R,B),ie())},[ie,y,R,B]);return p.jsxs(p.Fragment,{children:[p.jsx("aside",{className:"flex h-[calc(100vh-3.5rem)] w-[212px] shrink-0 flex-col border-r border-foreground/[0.06] bg-white","data-testid":"slide-sidebar",children:p.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[p.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[p.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[p.jsx("span",{className:"tabular-nums",children:r})," slides"]}),p.jsx("button",{onClick:u,className:"flex size-7 items-center justify-center rounded-md text-foreground/50 transition-colors hover:bg-foreground/[0.06] hover:text-foreground",type:"button",title:"Add slide","aria-label":"Add slide",children:p.jsx(ii,{className:"size-3.5"})})]}),p.jsx("div",{className:"min-h-0 flex-1 space-y-2.5 overflow-y-auto px-2 py-2.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-testid":"slide-list",children:n.map((Q,oe)=>{const de=Q.id===o,pe=Q.hidden===!0,T=Q.id===A,O=ee>=0&&E===oe&&oe<ee&&A!==Q.id,N=ee>=0&&E===oe&&oe>ee&&A!==Q.id;return p.jsxs(F1,{children:[p.jsx(K1,{asChild:!0,children:p.jsxs("div",{draggable:!0,onDragStart:L=>{C(Q.id),M(oe),L.dataTransfer.effectAllowed="move",L.dataTransfer.setData("text/plain",Q.id)},onDragOver:L=>{L.preventDefault(),L.dataTransfer.dropEffect="move",M(oe)},onDrop:L=>{L.preventDefault(),L.stopPropagation();const D=L.dataTransfer.getData("text/plain")||A;z(D,oe)},onDragEnd:()=>{C(null),M(null)},className:Be("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",T&&"opacity-60"),"data-testid":"slide-card",children:[O?p.jsx(V0,{}):null,p.jsx("div",{className:Be("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",de?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:oe+1}),p.jsxs("div",{className:Be("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",de?"shadow-[0_0_0_2px_var(--background),0_0_0_3px_var(--foreground)] ring-foreground":"ring-foreground/30 shadow-[0_0_0_1px_rgba(0,0,0,0.05),0_1px_3px_rgba(0,0,0,0.04)] hover:ring-foreground/45",pe&&"opacity-40"),children:[p.jsx("button",{ref:de?V:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>s(Q.id),type:"button","aria-label":`Slide ${oe+1}`,"aria-current":de?"true":void 0,children:p.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[Q.id]?p.jsx("img",{alt:`Slide ${oe+1}`,className:"absolute inset-0 block size-full object-cover",src:i[Q.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",oe+1]}),pe?p.jsx("div",{className:"absolute left-1 top-1 flex size-4 items-center justify-center rounded bg-foreground/80 text-background","data-testid":"slide-hidden-indicator",children:p.jsx(i0,{className:"size-2.5"})}):null]})}),p.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:p.jsx("button",{className:"h-full w-full truncate rounded-b-lg px-2 text-left text-[11px] text-foreground/60 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring",type:"button",onClick:()=>s(Q.id),onDoubleClick:()=>W(Q),"aria-label":`Slide title: ${Q.title||"Untitled Slide"}`,children:Q.title||"Untitled Slide"})})]}),N?p.jsx(V0,{position:"after"}):null]})}),p.jsxs(Q1,{"aria-label":"Slide actions",className:"min-w-36",children:[p.jsxs(Ct,{onSelect:()=>d==null?void 0:d(Q.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Above"]}),p.jsxs(Ct,{onSelect:()=>m==null?void 0:m(Q.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Below"]}),p.jsx(wc,{}),p.jsxs(Ct,{onSelect:()=>h==null?void 0:h(Q.id),children:[p.jsx(Xv,{className:"size-3.5"}),"Duplicate"]}),p.jsxs(Ct,{onSelect:()=>W(Q),children:[p.jsx(GC,{className:"size-3.5"}),"Rename"]}),p.jsxs(Ct,{onSelect:()=>x==null?void 0:x(Q.id),children:[pe?p.jsx(Fv,{className:"size-3.5"}):p.jsx(i0,{className:"size-3.5"}),pe?"Show":"Hide"]}),p.jsx(wc,{}),p.jsxs(Ct,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(Q.id),children:[p.jsx(eb,{className:"size-3.5"}),"Delete"]})]})]},Q.id)})})]})}),$?p.jsx(nO,{draft:B,slideTitle:$.title||"Untitled Slide",onCancel:ie,onChange:Y,onSave:fe}):null]})}function nO({draft:n,slideTitle:o,onCancel:r,onChange:i,onSave:s}){const u=v.useRef(null);return v.useEffect(()=>{const d=window.requestAnimationFrame(()=>{var h,g;(h=u.current)==null||h.focus(),(g=u.current)==null||g.select()}),m=h=>{h.key==="Escape"&&r()};return document.addEventListener("keydown",m),()=>{window.cancelAnimationFrame(d),document.removeEventListener("keydown",m)}},[r]),p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:d=>{d.target===d.currentTarget&&r()},children:p.jsx("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"rename-slide-title",className:"relative m-0 w-full max-w-[420px] overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]","data-testid":"rename-slide-dialog",children:p.jsxs("form",{onSubmit:d=>{d.preventDefault(),s()},children:[p.jsxs("div",{className:"border-b border-foreground/[0.08] px-4 py-3",children:[p.jsx("h2",{id:"rename-slide-title",className:"text-[14px] font-semibold text-foreground",children:"Rename slide"}),p.jsx("p",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:o})]}),p.jsxs("div",{className:"space-y-2 px-4 py-4",children:[p.jsx("label",{htmlFor:"rename-slide-input",className:"text-[12px] font-medium text-foreground",children:"Slide name"}),p.jsx(tl,{ref:u,id:"rename-slide-input",value:n,onChange:d=>i(d.target.value)})]}),p.jsxs("div",{className:"flex justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx(Kt,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),p.jsx(Kt,{type:"submit",children:"Save"})]})]})})})}function V0({position:n="before"}){return p.jsxs("div",{className:Be("pointer-events-none absolute left-6 right-1 z-10 flex h-3 items-center",n==="before"?"-top-[11px]":"-bottom-[11px]"),"data-testid":"slide-insertion-marker",children:[p.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),p.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const aO=18,oO=6,Ks=24,Qs="#ef4444",Ec=40,X0=12,F0=360;function Zr(n,o,r,i,s){return Math.max(n,r)-Math.min(o,i)<=s}function rO({selectionBounds:n,snapGuides:o,resizeHandles:r,rotationHandle:i,onResizeHandleMouseDown:s,onRotateHandleMouseDown:u}){const d="absolute z-[5] size-[13px] -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full border border-white bg-foreground shadow-[0_2px_8px_rgba(0,0,0,0.16)] transition-colors before:absolute before:inset-[3px] before:rounded-full before:bg-white/90 hover:bg-foreground/80";return p.jsxs(p.Fragment,{children:[o.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",x=14,y=m.variant==="spacing"?2:1,S=m.orientation==="vertical",A=S?{left:`${m.start.x}px`,top:`${Math.min(m.start.y,m.end.y)}px`,width:"0",height:`${Math.max(Math.abs(m.end.y-m.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:Qs,opacity:m.variant==="spacing"?.9:.82}:{left:`${Math.min(m.start.x,m.end.x)}px`,top:`${m.start.y}px`,width:`${Math.max(Math.abs(m.end.x-m.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:Qs,opacity:m.variant==="spacing"?.9:.82},C=S?{width:`${x}px`,height:`${y}px`,left:`${-x/2}px`,backgroundColor:Qs}:{width:`${y}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:Qs};return p.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:A,children:m.variant==="spacing"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,top:"0"}:{...C,left:"0"}}),p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),p.jsx("button",{type:"button",className:`${d} cursor-alias`,"data-testid":"block-rotate-handle","aria-label":"Rotate selected element",style:{left:`${i.x}px`,top:`${i.y}px`},onMouseDown:u}),r.map(m=>p.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${m.corner}`,"aria-label":`Resize selected element from ${m.corner}`,style:{left:`${m.x}px`,top:`${m.y}px`},onMouseDown:h=>{s(m.corner,h)}},m.corner))]})}function lO({selectionCommandAvailability:n,onAlignToSlide:o,onDelete:r,onDistribute:i,onDuplicate:s,onGroup:u,onLayerOrder:d,onUngroup:m}){return p.jsxs(Q1,{"aria-label":"Selection actions",children:[p.jsxs(Ct,{disabled:!n.group,onSelect:u,children:[p.jsx(cc,{className:"size-3.5"}),"Group"]}),p.jsxs(Ct,{disabled:!n.ungroup,onSelect:m,children:[p.jsx(Em,{className:"size-3.5"}),"Ungroup"]}),p.jsx(wc,{}),p.jsxs(wd,{children:[p.jsxs(Ed,{children:[p.jsx(Yd,{className:"size-3.5"}),"Layer"]}),p.jsxs(Cd,{children:[p.jsxs(Ct,{onSelect:()=>d("front"),children:[p.jsx(Yd,{className:"size-3.5"}),"Bring to front"]}),p.jsxs(Ct,{onSelect:()=>d("forward"),children:[p.jsx(Sm,{className:"size-3.5"}),"Bring forward"]}),p.jsxs(Ct,{onSelect:()=>d("backward"),children:[p.jsx(hi,{className:"size-3.5"}),"Send backward"]}),p.jsxs(Ct,{onSelect:()=>d("back"),children:[p.jsx(qv,{className:"size-3.5"}),"Send to back"]})]})]}),p.jsxs(wd,{children:[p.jsxs(Ed,{children:[p.jsx(Gd,{className:"size-3.5"}),"Align"]}),p.jsxs(Cd,{children:[p.jsxs(Ct,{onSelect:()=>o("left"),children:[p.jsx(Gv,{className:"size-3.5"}),"Align left"]}),p.jsxs(Ct,{onSelect:()=>o("hcenter"),children:[p.jsx(Gd,{className:"size-3.5"}),"Align horizontal center"]}),p.jsxs(Ct,{onSelect:()=>o("right"),children:[p.jsx(Pv,{className:"size-3.5"}),"Align right"]}),p.jsxs(Ct,{onSelect:()=>o("top"),children:[p.jsx(Yv,{className:"size-3.5"}),"Align top"]}),p.jsxs(Ct,{onSelect:()=>o("vcenter"),children:[p.jsx(Iv,{className:"size-3.5"}),"Align vertical center"]}),p.jsxs(Ct,{onSelect:()=>o("bottom"),children:[p.jsx($v,{className:"size-3.5"}),"Align bottom"]})]})]}),p.jsxs(wd,{children:[p.jsxs(Ed,{children:[p.jsx(qd,{className:"size-3.5"}),"Distribute"]}),p.jsxs(Cd,{children:[p.jsxs(Ct,{onSelect:()=>i("horizontal"),children:[p.jsx(qd,{className:"size-3.5"}),"Horizontally"]}),p.jsxs(Ct,{onSelect:()=>i("vertical"),children:[p.jsx(uc,{className:"size-3.5"}),"Vertically"]})]})]}),p.jsx(wc,{}),p.jsxs(Ct,{onSelect:s,children:[p.jsx(Xv,{className:"size-3.5"}),"Duplicate",p.jsx(q0,{children:"⌘D"})]}),p.jsxs(Ct,{variant:"destructive",onSelect:r,children:[p.jsx(eb,{className:"size-3.5"}),"Delete",p.jsx(q0,{children:"Del"})]})]})}const Jm=[{label:"Inter",value:'"Inter", "IBM Plex Sans", "Segoe UI", sans-serif'},{label:"Aptos",value:'"Aptos", "Segoe UI", Arial, sans-serif'},{label:"Avenir Next",value:'"Avenir Next", "Montserrat", "Segoe UI", sans-serif'},{label:"Optima",value:'"Optima", "Candara", "Segoe UI", sans-serif'},{label:"Arial Narrow",value:'"Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif'},{label:"Georgia",value:'Georgia, "Times New Roman", serif'},{label:"Times New Roman",value:'"Times New Roman", Times, serif'},{label:"Didot",value:'"Didot", "Bodoni 72", Georgia, serif'},{label:"SF Mono",value:'"SFMono-Regular", Menlo, Consolas, monospace'},{label:"IBM Plex Mono",value:'"IBM Plex Mono", "SFMono-Regular", Consolas, monospace'},{label:"System UI",value:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},{label:"Nunito",value:'"Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif'}];function iO(n){return`${Math.round(n*100)/100}px`}function sO(n){const o=dO(n);return o?o.label:um(n)||"Font"}function Z1(n,o){const r=K0(n),i=K0(o);return!r||!i?!1:r===i||Q0(um(n))===Q0(um(o))}function cO(n){const o=n.trim().toLowerCase();if(o==="bold"||o==="bolder")return!0;const r=Number.parseInt(o,10);return Number.isFinite(r)&&r>=600}function cm(n){const o=new Set,r=n.toLowerCase();if(!r||r==="none")return o;for(const i of r.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&o.add(i);return o}function uO(n){return fO(n)?n.trim():mO(n)??"#000000"}function fO(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function dO(n){return Jm.find(o=>Z1(n,o.value))}function um(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function K0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function Q0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Td(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function mO(n){const o=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return o?`#${Td(o[1]||"0")}${Td(o[2]||"0")}${Td(o[3]||"0")}`:null}function W1({feature:n,inspectedStyles:o,attributeValues:r}){var s,u;if(n.target==="attribute")return n.id==="other-link"?r.linkUrl:n.id==="other-alt-text"?r.altText:n.id==="other-aria-label"?r.ariaLabel:n.attributeName==="data-editor-locked"?r.locked:n.attributeName==="alt"?r.altText:n.attributeName==="aria-label"?r.ariaLabel:n.attributeName==="data-link-url"?r.linkUrl:"";if(!n.propertyName)return"";const i=pO(o,n.propertyName);return n.id==="font-family"?((u=(s=n.options)==null?void 0:s.find(d=>Z1(i,d.value)))==null?void 0:u.value)??i:n.id==="font-size"&&i.endsWith("px")?i.slice(0,-2):n.id==="line-height"||n.id==="opacity"?i||(n.id==="opacity"?"1":""):n.id==="rotation"?String(ea(i).rotate):n.controlType==="color"?uO(i):n.id==="text-align"&&i==="start"?"left":i}function Z0(n,o){if(n.id==="font-size"&&o.trim()){const r=Number.parseFloat(o);return`${Math.min(200,Math.max(8,Number.isFinite(r)?r:8))}px`}return(n.id==="width"||n.id==="height")&&o?gO(n.id,o):n.id==="font-bold"?o?"700":"400":n.id==="font-italic"?o?"italic":"normal":n.id==="font-underline"?o?"underline":"none":n.id==="font-strikethrough"?o?"line-through":"none":n.id==="locked"?o?"true":"":o.trim()}function W0(n,o,r){const i=cm(n);return r?i.delete(o):i.add(o),i.size?Array.from(i).join(" "):"none"}function hO(n,o){return n.id==="font-bold"?cO(o):n.id==="font-italic"?o.trim().toLowerCase()==="italic":n.id==="font-underline"?cm(o).has("underline"):n.id==="font-strikethrough"?cm(o).has("line-through"):n.id==="locked"?o==="true":!!o}function pO(n,o){var r;return((r=n.find(i=>i.name===o))==null?void 0:r.value)??""}function gO(n,o){if(o==="auto")return"";const r=n==="width"?To:Ao,i=yO(o);return iO(r*i)}function yO(n){return n==="compact"?.18:n==="wide"?.42:n==="full"?.82:.42}function vO({attributeValues:n,feature:o,inspectedStyles:r,nextValue:i,onAlignToSlide:s,onAttributeChange:u,onLayerOrder:d,onStyleChange:m}){if(o.target==="style"&&o.propertyName){const h=W1({feature:o,inspectedStyles:r,attributeValues:n});if(o.id==="rotation"){const g=bO(r),x=ea(g),y=Number.parseFloat(i);m(o.propertyName,Ia(x.translateX,x.translateY,Number.isFinite(y)?y:0)??"");return}if(o.id==="font-underline"){m(o.propertyName,W0(h,"underline",i===""));return}if(o.id==="font-strikethrough"){m(o.propertyName,W0(h,"line-through",i===""));return}m(o.propertyName,Z0(o,i));return}if(o.target==="attribute"&&o.attributeName){u(o.attributeName,Z0(o,i));return}if(o.id==="other-link"){u("data-link-url",i.trim());return}if(o.id==="other-alt-text"){u("alt",i.trim());return}if(o.id==="other-aria-label"){u("aria-label",i.trim());return}o.id==="align-to-slide"&&s(i),o.id==="layer-order"&&d(i)}function bO(n){var o;return((o=n.find(r=>r.name==="transform"))==null?void 0:o.value)??""}const J1=[{value:"left",label:"Left",icon:Jv},{value:"center",label:"Center",icon:dc},{value:"right",label:"Right",icon:Wv}],eS=[{value:"left",icon:Gv,label:"Align left"},{value:"hcenter",icon:Gd,label:"Align horizontal center"},{value:"right",icon:Pv,label:"Align right"},{value:"top",icon:Yv,label:"Align top"},{value:"vcenter",icon:Iv,label:"Align vertical center"},{value:"bottom",icon:$v,label:"Align bottom"}],tS=[{value:"front",icon:Yd,label:"Bring to front"},{value:"forward",icon:Sm,label:"Bring forward"},{value:"backward",icon:hi,label:"Send backward"},{value:"back",icon:qv,label:"Send to back"}],nS=[{value:"horizontal",icon:qd,label:"Distribute horizontally"},{value:"vertical",icon:uc,label:"Distribute vertically"}],xO=[{value:"decrease",icon:Zv,label:"Decrease font size"},{value:"increase",icon:ii,label:"Increase font size"}],aS=[{value:"1",label:"Tight",description:"Compact text blocks"},{value:"1.2",label:"Normal",description:"Balanced paragraph spacing"},{value:"1.45",label:"Relaxed",description:"Readable body copy"},{value:"1.7",label:"Airy",description:"Open editorial spacing"}],J0=[{value:"compact",label:"Compact",description:"Small supporting element"},{value:"wide",label:"Wide",description:"Primary text or media area"},{value:"full",label:"Full width",description:"Span most of the slide"},{value:"auto",label:"Auto fit",description:"Let content define the size"}],SO=[{value:"1",label:"100%"},{value:"0.75",label:"75%"},{value:"0.5",label:"50%"},{value:"0.25",label:"25%"}],wO=[{value:"-15",label:"-15"},{value:"0",label:"0"},{value:"15",label:"15"},{value:"45",label:"45"}],oS=[{value:"none",label:"None"},{value:"1px solid rgba(15, 23, 42, 0.16)",label:"Hairline"},{value:"2px solid rgba(15, 23, 42, 0.22)",label:"Strong"},{value:"1px dashed rgba(15, 23, 42, 0.3)",label:"Dashed"}],rS=[{value:"0px",label:"Sharp"},{value:"8px",label:"Soft"},{value:"18px",label:"Round"},{value:"999px",label:"Pill"}],lS=[{value:"none",label:"None"},{value:"0 8px 22px rgba(15, 23, 42, 0.12)",label:"Soft"},{value:"0 18px 42px rgba(15, 23, 42, 0.18)",label:"Lifted"},{value:"0 28px 70px rgba(15, 23, 42, 0.24)",label:"Dramatic"}],EO=[{id:"typography",label:"Typography",icon:Fd,subgroups:[{id:"font",label:"Font",icon:Fd,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:Jm.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"action-group",target:"style",propertyName:"font-size",options:xO,min:8,max:200,step:2,unit:"px"},{id:"font-bold",label:"Bold",controlType:"toggle",target:"style",propertyName:"font-weight"},{id:"font-italic",label:"Italic",controlType:"toggle",target:"style",propertyName:"font-style"},{id:"font-underline",label:"Underline",controlType:"toggle",target:"style",propertyName:"text-decoration-line"},{id:"font-strikethrough",label:"Strikethrough",controlType:"toggle",target:"style",propertyName:"text-decoration-line"}]},{id:"paragraph",label:"Paragraph",icon:qC,features:[{id:"line-height",label:"Line height",controlType:"action-group",target:"style",propertyName:"line-height",options:aS},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:J1}]}]},{id:"appearance",label:"Appearance",icon:Xd,subgroups:[{id:"fill",label:"Fill",icon:Xd,features:[{id:"text-color",label:"Text color",controlType:"color",target:"style",propertyName:"color"},{id:"background-color",label:"Background color",controlType:"color",target:"style",propertyName:"background-color"}]},{id:"border",label:"Border",icon:nC,features:[{id:"border",label:"Border",controlType:"action-group",target:"style",propertyName:"border",options:oS},{id:"border-radius",label:"Border radius",controlType:"action-group",target:"style",propertyName:"border-radius",options:rS},{id:"box-shadow",label:"Shadow",controlType:"action-group",target:"style",propertyName:"box-shadow",options:lS}]}]},{id:"layout",label:"Layout",icon:fc,subgroups:[{id:"size",label:"Size",icon:fc,features:[{id:"width",label:"Width",controlType:"action-group",target:"style",propertyName:"width",options:J0},{id:"height",label:"Height",controlType:"action-group",target:"style",propertyName:"height",options:J0}]},{id:"visibility",label:"Visibility",icon:Fv,features:[{id:"opacity",label:"Opacity",controlType:"action-group",target:"style",propertyName:"opacity",options:SO}]},{id:"rotation",label:"Rotation",icon:WC,features:[{id:"rotation",label:"Rotation",controlType:"action-group",target:"style",propertyName:"transform",options:wO,min:-360,max:360,step:15,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:wm,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:eS},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:tS},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:nS}]},{id:"grouping",label:"Group",icon:cc,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:cc,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:Em,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Vd,subgroups:[{id:"state",label:"State",icon:Vd,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:Qv,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:li,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:li,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:li,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]}]}],CO=200,TO="motion-safe:duration-200 motion-safe:ease-out",AO="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",MO="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none",_O=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],NO=["linear-gradient(135deg,#a855f7,#ec4899)","linear-gradient(135deg,#06b6d4,#8b5cf6)","linear-gradient(135deg,#f59e0b,#ec4899)","linear-gradient(135deg,#10b981,#06b6d4)","linear-gradient(135deg,#f97316,#ef4444)","linear-gradient(135deg,#8b5cf6,#3b82f6)"];function RO({ariaLabelPrefix:n,value:o,includeGradients:r=!0,includeOpacity:i=!0,onChange:s,onCommit:u}){const d=v.useRef(null),m=v.useRef(null),h=v.useMemo(()=>OO(o),[o]),g=v.useMemo(()=>jO(h.hex),[h.hex]),x=Md(g),[y,S]=v.useState(x.replace("#","")),[A,C]=v.useState("#06B6D4"),[E,M]=v.useState("#8B5CF6"),[R,j]=v.useState(135),B=`hsl(${g.h}, 100%, 50%)`;v.useEffect(()=>{S(x.replace("#",""))},[x]);function Y(z,W=h.alpha){s(Ad(z,W))}function ee(z){const W=Number.parseInt(z.target.value,10)/100;Y(x,W)}function $(z){var Q;const W=(Q=d.current)==null?void 0:Q.getBoundingClientRect();if(!W)return;z.currentTarget.setPointerCapture(z.pointerId);const ie=si((z.clientX-W.left)/W.width,0,1),fe=si(1-(z.clientY-W.top)/W.height,0,1);Y(Md({...g,s:ie,v:fe}))}function V(z){var fe;const W=(fe=m.current)==null?void 0:fe.getBoundingClientRect();if(!W)return;z.currentTarget.setPointerCapture(z.pointerId);const ie=Math.round(si((z.clientX-W.left)/W.width,0,1)*360);Y(Md({...g,h:ie===360?0:ie}))}return p.jsxs("div",{className:"grid gap-3",children:[p.jsx("div",{className:"relative h-36 w-full touch-none select-none overflow-hidden rounded-xl border-0 before:pointer-events-none before:absolute before:inset-0 before:bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:d,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g.v*100),"aria-valuetext":Ad(x,h.alpha),tabIndex:0,style:{backgroundColor:B},onPointerDown:$,onPointerMove:z=>{z.buttons===1&&$(z)},children:p.jsx("span",{className:"pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.22)]","aria-hidden":"true",style:{color:x,left:`calc(${g.s*100}% + ${(.5-g.s)*22}px)`,top:`calc(${(1-g.v)*100}% + ${(g.v-.5)*22}px)`}})}),p.jsx("div",{className:"relative h-3 touch-none select-none rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:m,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":g.h,tabIndex:0,onPointerDown:V,onPointerMove:z=>{z.buttons===1&&V(z)},children:p.jsx("span",{className:"pointer-events-none absolute -top-0.5 size-4 -translate-x-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.2)]","aria-hidden":"true",style:{color:B,left:`${g.h/360*100}%`}})}),p.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[p.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:Ad(x,h.alpha)},"aria-hidden":"true"}),p.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),p.jsx(tl,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:y,spellCheck:!1,onChange:z=>{const W=z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);S(W),W.length===6&&Y(`#${W}`)},onBlur:()=>{S(x.replace("#",""))}})]}),i?p.jsxs("section",{className:"grid gap-1.5","aria-label":"Opacity",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Opacity"}),p.jsxs("span",{children:[Math.round(h.alpha*100),"%"]})]}),p.jsx("input",{type:"range",min:0,max:100,value:Math.round(h.alpha*100),"aria-label":"Opacity",onChange:ee,className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}):null,p.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),p.jsx("div",{className:"grid grid-cols-12 gap-1",children:_O.map(z=>p.jsx("button",{className:Be("aspect-square min-w-0 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",z.toLowerCase()===o.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:z},"aria-label":n?`Use ${n} ${z}`:`Use ${z}`,onClick:()=>{Y(z),u==null||u()}},z))})]}),r?p.jsxs("section",{className:"grid gap-2","aria-label":"Preset gradients",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),p.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:NO.map((z,W)=>p.jsx("button",{className:Be("h-8 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",z===o&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:z},"aria-label":n?`Use ${n} gradient ${W+1}`:`Use gradient ${W+1}`,onClick:()=>{s(z),u==null||u()}},z))}),p.jsxs("div",{className:"grid gap-2 rounded-md bg-foreground/[0.03] p-2",children:[p.jsx("div",{className:"h-8 rounded-md border border-foreground/10",style:{background:ev(R,A,E)},"aria-hidden":"true"}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsx(tl,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient start",value:A.replace("#",""),onChange:z=>C(`#${z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>C(ll(A))}),p.jsx(tl,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient end",value:E.replace("#",""),onChange:z=>M(`#${z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>M(ll(E))})]}),p.jsxs("div",{className:"grid gap-1",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Angle"}),p.jsxs("span",{children:[R,"deg"]})]}),p.jsx("input",{type:"range",min:0,max:360,value:R,"aria-label":"Gradient angle",onChange:z=>j(Number.parseInt(z.target.value,10)),className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",onClick:()=>{s(ev(R,A,E)),u==null||u()},children:"Apply gradient"})]})]}):null]})}function si(n,o,r){return Math.min(Math.max(n,o),r)}function OO(n){const o=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+([\d.]+))?\s*\)$/i);return o?{alpha:si(Number.parseFloat(o[4]??"1"),0,1),hex:`#${Nd(o[1]||"0")}${Nd(o[2]||"0")}${Nd(o[3]||"0")}`}:{alpha:1,hex:DO(n)?n.trim():"#0F172A"}}function Ad(n,o){if(o>=.995)return n.toUpperCase();const r=ll(n).replace("#",""),i=Number.parseInt(r.slice(0,2),16),s=Number.parseInt(r.slice(2,4),16),u=Number.parseInt(r.slice(4,6),16);return`rgba(${i}, ${s}, ${u}, ${Math.round(o*100)/100})`}function ev(n,o,r){return`linear-gradient(${n}deg, ${ll(o)}, ${ll(r)})`}function DO(n){return/^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function ll(n){const o=n.trim().replace("#","");return o.length===3?`#${o.split("").map(r=>r+r).join("")}`.toUpperCase():o.length===6?`#${o}`.toUpperCase():"#0F172A"}function jO(n){const o={h:220,s:.54,v:.5},r=/^#?([0-9a-f]{6})$/i.exec(ll(n));if(!r)return o;const i=r[1],s=Number.parseInt(i.slice(0,2),16)/255,u=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,m=Math.max(s,u,d),h=Math.min(s,u,d),g=m-h;let x=0;g!==0&&(m===s?x=(u-d)/g%6:m===u?x=(d-s)/g+2:x=(s-u)/g+4);const y=Math.round(x*60);return{h:y<0?y+360:y,s:m===0?0:g/m,v:m}}function Md({h:n,s:o,v:r}){const i=r*o,s=i*(1-Math.abs(n/60%2-1)),u=r-i;let d=0,m=0,h=0;return n<60?(d=i,m=s):n<120?(d=s,m=i):n<180?(m=i,h=s):n<240?(m=s,h=i):n<300?(d=s,h=i):(d=i,h=s),`#${_d(d+u)}${_d(m+u)}${_d(h+u)}`.toUpperCase()}function _d(n){return Math.round(si(n,0,1)*255).toString(16).padStart(2,"0")}function Nd(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function zO({className:n,orientation:o="horizontal",decorative:r=!0,...i}){return p.jsx(z5,{"data-slot":"separator",decorative:r,orientation:o,className:Be("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),...i})}function ni({children:n,active:o=!1,className:r,label:i,onClick:s}){return p.jsx(Kt,{variant:o?"secondary":"ghost",size:"icon-sm",className:Be("size-9 rounded-xl text-foreground/60 transition-all duration-200 hover:-translate-y-px hover:bg-foreground/[0.05] hover:text-foreground hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] active:translate-y-0 active:scale-[0.98]",o&&"bg-foreground/[0.07] text-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.08)] hover:bg-foreground/[0.08]",r),type:"button","aria-label":i,title:i,onClick:s,children:n})}function kO(n,o){return Math.abs(n-o)>=.5}function xo(){return p.jsx(zO,{orientation:"vertical",className:"mx-1 h-6 bg-foreground/10"})}function LO({icon:n}){return p.jsx(n,{className:"size-3.5"})}function HO({...n}){return p.jsx(BM,{"data-slot":"dialog",...n})}function BO({...n}){return p.jsx(UM,{"data-slot":"dialog-portal",...n})}function UO({className:n,...o}){return p.jsx(IM,{"data-slot":"dialog-overlay",className:Be("fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px]",n),...o})}function IO({children:n,className:o,...r}){return p.jsxs(BO,{children:[p.jsx(UO,{}),p.jsxs(PM,{"data-slot":"dialog-content",className:Be("fixed left-1/2 top-1/2 z-50 grid w-[min(420px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-md border border-foreground/[0.08] bg-white p-4 shadow-[0_20px_70px_rgba(15,23,42,0.18)] outline-none",o),...r,children:[n,p.jsxs(YM,{className:"absolute right-3 top-3 inline-flex size-7 items-center justify-center rounded-md text-foreground/45 hover:bg-foreground/[0.05] hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[p.jsx(Cm,{className:"size-3.5"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function PO({className:n,...o}){return p.jsx("div",{className:Be("grid gap-1 pr-8",n),...o})}function $O({className:n,...o}){return p.jsx($M,{"data-slot":"dialog-title",className:Be("text-sm font-semibold text-foreground",n),...o})}function GO({className:n,...o}){return p.jsx(GM,{"data-slot":"dialog-description",className:Be("text-xs leading-normal text-foreground/55",n),...o})}function YO({className:n,...o}){return p.jsx("div",{className:Be("flex justify-end gap-2",n),...o})}function Rd({...n}){return p.jsx(VR,{"data-slot":"popover",...n})}function Od({...n}){return p.jsx(XR,{"data-slot":"popover-trigger",...n})}function Dd({className:n,align:o="center",sideOffset:r=4,...i}){return p.jsx(FR,{children:p.jsx(KR,{"data-slot":"popover-content",align:o,sideOffset:r,className:Be("z-50 w-72 rounded-2xl border border-foreground/[0.08] bg-white/95 p-2 text-popover-foreground shadow-[0_8px_26px_rgba(0,0,0,0.08),0_18px_58px_rgba(0,0,0,0.12)] outline-hidden backdrop-blur-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...i})})}function qO({...n}){return p.jsx(v5,{"data-slot":"select",...n})}function VO({...n}){return p.jsx(T5,{"data-slot":"select-group",...n})}function XO({...n}){return p.jsx(x5,{"data-slot":"select-value",...n})}function FO({className:n,size:o="default",children:r,...i}){return p.jsxs(b5,{"data-slot":"select-trigger","data-size":o,className:Be("flex w-fit items-center justify-between gap-2 rounded-xl border border-transparent bg-transparent px-2.5 text-sm whitespace-nowrap shadow-none transition-all duration-200 outline-none hover:-translate-y-px hover:bg-foreground/[0.05] hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/35 data-[size=default]:h-9 data-[size=sm]:h-9 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/45",n),...i,children:[r,p.jsx(S5,{asChild:!0,children:p.jsx(hi,{className:"size-4 opacity-50"})})]})}function KO({className:n,children:o,position:r="item-aligned",align:i="center",...s}){return p.jsx(w5,{children:p.jsxs(E5,{"data-slot":"select-content",className:Be("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-2xl border border-foreground/[0.08] bg-white/95 text-popover-foreground shadow-[0_8px_26px_rgba(0,0,0,0.08),0_18px_58px_rgba(0,0,0,0.12)] backdrop-blur-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:r,align:i,...s,children:[p.jsx(ZO,{}),p.jsx(C5,{className:Be("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:o}),p.jsx(WO,{})]})})}function QO({className:n,children:o,...r}){return p.jsxs(A5,{"data-slot":"select-item",className:Be("relative flex w-full cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2.5 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.05] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...r,children:[p.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(_5,{children:p.jsx(Vv,{className:"size-4"})})}),p.jsx(M5,{children:o})]})}function ZO({className:n,...o}){return p.jsx(N5,{"data-slot":"select-scroll-up-button",className:Be("flex cursor-default items-center justify-center py-1",n),...o,children:p.jsx(Sm,{className:"size-4"})})}function WO({className:n,...o}){return p.jsx(R5,{"data-slot":"select-scroll-down-button",className:Be("flex cursor-default items-center justify-center py-1",n),...o,children:p.jsx(hi,{className:"size-4"})})}function iS({className:n,...o}){return p.jsx("textarea",{"data-slot":"textarea",className:Be("flex field-sizing-content min-h-16 w-full rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-2 text-sm shadow-none transition-colors outline-none placeholder:text-foreground/35 hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...o})}const JO=new Map(EO.flatMap(n=>n.subgroups.flatMap(o=>o.features.map(r=>[r.id,r])))),e3={"other-aria-label":{id:"other-aria-label",label:"ARIA label",controlType:"text",target:"operation"},"other-alt-text":{id:"other-alt-text",label:"Alt text",controlType:"text",target:"operation"},"other-link":{id:"other-link",label:"Link",controlType:"text",target:"operation"}};function t3({inspectedStyles:n,selectedElementType:o,selectionCommandAvailability:r,attributeValues:i,onStyleChange:s,onAttributeChange:u,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:x}){const y=v.useRef(null),[S,A]=v.useState(0),C=v.useRef(0),[E,M]=v.useState(null),[R,j]=v.useState(null),B=o==="multi",Y=B||r.ungroup;v.useEffect(()=>{if(y.current)return()=>{const L=y.current,D=L==null?void 0:L.closest('[data-testid="stage-panel"]');if(!(L instanceof HTMLElement)||!(D instanceof HTMLElement))return;const _=L.getBoundingClientRect(),U=D.getBoundingClientRect(),H=L.cloneNode(!0);H instanceof HTMLElement&&(H.className=Be(H.className,"absolute z-40 m-0 pointer-events-none"),H.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),H.className=Be(H.className,MO),H.setAttribute("aria-hidden","true"),H.style.left=`${_.left-U.left}px`,H.style.top=`${_.top-U.top}px`,H.style.width=`${_.width}px`,H.style.height=`${_.height}px`,D.appendChild(H),H.addEventListener("animationend",()=>H.remove()),window.setTimeout(()=>H.remove(),CO+50))}},[]),v.useLayoutEffect(()=>{const N=y.current;if(!N)return;const L=N.getBoundingClientRect(),D=L.left-C.current,_=L.right-C.current,U=16;let H=0;D<U&&(H=U-D),_+H>window.innerWidth-U&&(H+=window.innerWidth-U-(_+H)),kO(C.current,H)&&(C.current=H,A(H))},[]),v.useEffect(()=>{function N(L){var _;const D=L.target;(_=y.current)!=null&&_.contains(L.target)||D instanceof Element&&D.closest('[data-slot="select-content"]')||j(null)}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),v.useEffect(()=>{function N(L){L.key==="Escape"&&j(null)}return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[]);function ee(N,L){if(N.id==="distribute"){m(L);return}if(N.id==="group"){h();return}if(N.id==="ungroup"){x();return}if(N.id==="other-link"){u("data-link-url",L.trim());return}if(N.id==="other-alt-text"){u("alt",L.trim());return}if(N.id==="other-aria-label"){u("aria-label",L.trim());return}if(N.id==="background-color"&&L.startsWith("linear-gradient")){s("background-image",L);return}vO({attributeValues:i,feature:N,inspectedStyles:n,nextValue:L,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:g,onStyleChange:s})}return p.jsxs("div",{className:Be("relative grid w-max min-w-max max-w-[min(1120px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",TO,AO),ref:y,style:{marginLeft:S},children:[p.jsxs("div",{className:"flex w-max items-center gap-1 overflow-x-auto overflow-y-hidden rounded-2xl border border-foreground/[0.08] bg-white/92 px-2 py-2 shadow-[0_8px_24px_rgba(0,0,0,0.08),0_18px_54px_rgba(0,0,0,0.12)] backdrop-blur-xl max-[1200px]:min-w-[1120px]","aria-label":"Full editing toolbar",children:[$(),p.jsx(xo,{}),V(),p.jsx(xo,{}),z(),p.jsx(xo,{}),W(),p.jsx(xo,{}),ie(),p.jsx(xo,{}),fe(),B?p.jsxs(p.Fragment,{children:[p.jsx(xo,{}),Q()]}):null,Y?p.jsxs(p.Fragment,{children:[p.jsx(xo,{}),oe()]}):null,p.jsx(xo,{}),de()]}),p.jsx(n3,{attributeValues:i,dialogId:E,onCommitFeature:ee,onOpenChange:N=>{N||M(null)}})]});function $(){const N=!!i.locked;return p.jsx(Ua,{children:p.jsx(ni,{label:N?"Unlock":"Lock",active:N,onClick:()=>ee(Nt("locked"),N?"":"true"),children:N?p.jsx(zC,{className:"size-3.5"}):p.jsx(Vd,{className:"size-3.5"})})})}function V(){const N=Nt("font-family"),L=Nt("font-size"),D=O(N),_=Number.parseFloat(O(L))||32;return p.jsxs(Ua,{children:[p.jsxs(qO,{value:D||"__empty__",onValueChange:U=>ee(N,U==="__empty__"?"":U),children:[p.jsxs(FO,{"aria-label":"Font",size:"sm",className:"w-[156px] text-xs","data-value":D,children:[p.jsx(Fd,{className:"size-3.5 text-foreground/55"}),p.jsx(XO,{placeholder:sO(D)})]}),p.jsx(KO,{children:p.jsx(VO,{children:Jm.map(U=>p.jsx(QO,{value:U.value,"data-value":U.value,style:{fontFamily:U.value},children:U.label},U.value))})})]}),p.jsxs("div",{className:"flex items-center rounded-xl p-0.5",children:[p.jsx(ni,{className:"size-8 rounded-lg border-0 shadow-none hover:shadow-none",label:"Decrease font size",onClick:()=>ee(L,String(nv(_-2,8,200))),children:p.jsx(Zv,{className:"size-3.5"})}),p.jsx("span",{className:"grid h-8 min-w-9 place-items-center px-2 text-center text-[12px] font-semibold leading-none tabular-nums text-foreground/75",children:_}),p.jsx(ni,{className:"size-8 rounded-lg border-0 shadow-none hover:shadow-none",label:"Increase font size",onClick:()=>ee(L,String(nv(_+2,8,200))),children:p.jsx(ii,{className:"size-3.5"})})]})]})}function z(){return p.jsx(Ua,{children:[{feature:Nt("font-bold"),icon:eC},{feature:Nt("font-italic"),icon:RC},{feature:Nt("font-underline"),icon:cT},{feature:Nt("font-strikethrough"),icon:nT}].map(({feature:N,icon:L})=>{const D=hO(N,O(N));return p.jsx(ni,{label:N.label,active:D,onClick:()=>ee(N,D?"":"true"),children:p.jsx(L,{className:"size-3.5"})},N.id)})})}function W(){return p.jsxs(Ua,{children:[pe({feature:Nt("text-color"),icon:p.jsx(Xd,{className:"size-3.5"}),includeGradients:!0,label:"Text color",popoverId:"text-color"}),pe({feature:Nt("background-color"),icon:p.jsx(fc,{className:"size-3.5"}),includeGradients:!0,label:"Background color",popoverId:"background-color"})]})}function ie(){return p.jsxs(Ua,{children:[T({custom:p.jsx(tv,{feature:Nt("line-height"),label:"Custom line height",onCommitFeature:ee}),feature:Nt("line-height"),icon:p.jsx(uc,{className:"size-3.5"}),label:"Line height",options:aS,popoverId:"line-height"}),T({feature:Nt("text-align"),icon:p.jsx(dc,{className:"size-3.5"}),label:"Text align",options:J1,popoverId:"text-align"})]})}function fe(){return p.jsxs(Ua,{children:[T({feature:Nt("border"),icon:p.jsx(uC,{className:"size-3.5"}),label:"Border style",options:oS,popoverId:"border"}),T({custom:p.jsx(tv,{feature:Nt("border-radius"),label:"Custom radius",onCommitFeature:ee,unit:"px"}),feature:Nt("border-radius"),icon:p.jsx(dC,{className:"size-3.5"}),label:"Border radius",options:rS,popoverId:"border-radius"}),T({custom:p.jsx(a3,{feature:Nt("box-shadow"),label:"Custom shadow",onCommitFeature:ee}),feature:Nt("box-shadow"),icon:p.jsx(fc,{className:"size-3.5 drop-shadow"}),label:"Shadow",options:lS,popoverId:"box-shadow"})]})}function Q(){return p.jsxs(Ua,{children:[T({feature:Nt("align-to-slide"),icon:p.jsx(dc,{className:"size-3.5"}),label:"Align",options:eS,popoverId:"align"}),T({feature:Nt("layer-order"),icon:p.jsx(wm,{className:"size-3.5"}),label:"Layer",options:tS,popoverId:"layer"}),T({feature:Nt("distribute"),icon:p.jsx(uc,{className:"size-3.5"}),label:"Distribute",options:nS,popoverId:"distribute"})]})}function oe(){const N=r.ungroup,L=Nt(N?"ungroup":"group");return p.jsx(Ua,{children:p.jsx(ni,{label:N?"Ungroup":"Group",onClick:()=>ee(L,N?"ungroup":"group"),children:N?p.jsx(Em,{className:"size-3.5"}):p.jsx(cc,{className:"size-3.5"})})})}function de(){return p.jsx(Ua,{children:p.jsxs(Rd,{open:R==="other",onOpenChange:N=>j(N?"other":null),children:[p.jsx(Od,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Other",title:"Other",className:Be(jd,R==="other"&&zd),children:p.jsx(xC,{className:"size-4"})})}),p.jsxs(Dd,{align:"end",className:"w-56 p-1.5",children:[p.jsxs("button",{type:"button",className:Zs,onClick:()=>{j(null),M("other-link")},children:[p.jsx(Qv,{className:"size-3.5"}),"Link"]}),p.jsxs("button",{type:"button",className:Zs,onClick:()=>{j(null),M("other-alt-text")},children:[p.jsx(li,{className:"size-3.5"}),"Alt text"]}),p.jsxs("button",{type:"button",className:Zs,onClick:()=>{j(null),M("other-aria-label")},children:[p.jsx(li,{className:"size-3.5"}),"ARIA label"]})]})]})})}function pe({feature:N,icon:L,includeGradients:D,label:_,popoverId:U}){return p.jsxs(Rd,{open:R===U,onOpenChange:H=>j(H?U:null),children:[p.jsx(Od,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":_,title:_,className:Be(jd,R===U&&zd),children:L})}),p.jsx(Dd,{className:"w-80 max-h-[calc(100vh-40px)] overflow-y-auto p-2",children:p.jsx(RO,{value:O(N),ariaLabelPrefix:_,includeGradients:D,onChange:H=>ee(N,H),onCommit:()=>j(null)})})]})}function T({custom:N,feature:L,icon:D,label:_,options:U,popoverId:H}){const P=O(L),X=L.id==="text-align"?r3(P):D;return p.jsxs(Rd,{open:R===H,onOpenChange:te=>j(te?H:null),children:[p.jsx(Od,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":_,title:_,className:Be(jd,R===H&&zd),children:X})}),p.jsxs(Dd,{className:"w-64 p-1.5",children:[p.jsx("div",{className:"grid gap-1",children:U.map(te=>{const ne=te.icon,q=L.target==="operation"&&L.id==="distribute"&&!r.group;return p.jsxs("button",{type:"button",className:Be(Zs,P===te.value&&"bg-foreground/[0.06]"),disabled:q,onClick:()=>{ee(L,te.value),j(null)},children:[ne?p.jsx(LO,{icon:ne}):p.jsx(o3,{feature:L,option:te}),p.jsx("span",{className:"truncate",children:te.label})]},te.value)})}),N?p.jsx("div",{className:"mt-2 border-t border-foreground/[0.08] pt-2",children:N}):null]})]})}function O(N){return W1({attributeValues:i,feature:N,inspectedStyles:n})}}function n3({attributeValues:n,dialogId:o,onCommitFeature:r,onOpenChange:i}){const s=o?i3[o]:null,[u,d]=v.useState("");return v.useEffect(()=>{o&&d(l3(o,n))},[n,o]),p.jsx(HO,{open:!!o,onOpenChange:i,children:p.jsxs(IO,{children:[p.jsxs(PO,{children:[p.jsx($O,{children:s==null?void 0:s.title}),p.jsx(GO,{children:s==null?void 0:s.description})]}),s!=null&&s.multiline?p.jsx(iS,{value:u,onChange:m=>d(m.target.value)}):p.jsx(tl,{value:u,onChange:m=>d(m.target.value)}),p.jsxs(YO,{children:[p.jsx(Kt,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),p.jsx(Kt,{type:"button",onClick:()=>{o&&(r(e3[o],u),i(!1))},children:"Save"})]})]})})}function tv({feature:n,label:o,onCommitFeature:r,unit:i=""}){const[s,u]=v.useState(""),d=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:d,children:o}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx(tl,{className:"h-8 min-w-0",id:d,inputMode:"decimal",value:s,onChange:m=>u(m.target.value)}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",disabled:!s.trim(),onClick:()=>{r(n,`${s.trim()}${i}`),u("")},children:"Apply"})]})]})}function a3({feature:n,label:o,onCommitFeature:r}){const[i,s]=v.useState(""),u=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:u,children:o}),p.jsx(iS,{id:u,value:i,onChange:d=>s(d.target.value)}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",disabled:!i.trim(),onClick:()=>{r(n,i.trim()),s("")},children:"Apply"})]})}function Ua({children:n}){return p.jsx("div",{className:"flex items-center gap-0.5 rounded-xl p-0.5",children:n})}function o3({feature:n,option:o}){return n.id==="border"?p.jsx("span",{className:"size-4 rounded bg-white",style:{border:o.value==="none"?"1px solid rgba(15,23,42,.12)":o.value}}):n.id==="border-radius"?p.jsx("span",{className:"size-4 border border-foreground/15 bg-foreground/[0.04]",style:{borderRadius:o.value}}):n.id==="box-shadow"?p.jsx("span",{className:"size-4 rounded border border-foreground/10 bg-white",style:{boxShadow:o.value==="none"?void 0:o.value}}):p.jsx("span",{className:"size-1.5 rounded-full bg-foreground/35"})}function Nt(n){const o=JO.get(n);if(!o)throw new Error(`Missing floating toolbar feature: ${n}`);return o}function r3(n){return n==="left"?p.jsx(Jv,{className:"size-3.5"}):n==="right"?p.jsx(Wv,{className:"size-3.5"}):p.jsx(dc,{className:"size-3.5"})}function nv(n,o,r){return Math.min(r,Math.max(o,n))}function l3(n,o){return n==="other-link"?o.linkUrl:n==="other-alt-text"?o.altText:o.ariaLabel}const i3={"other-aria-label":{description:"Set the ARIA label used by assistive technologies.",title:"ARIA label"},"other-alt-text":{description:"Describe the selected visual element.",multiline:!0,title:"Alt text"},"other-link":{description:"Attach a URL to the selected element.",title:"Link"}},Zs="flex min-h-9 w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left text-[13px] text-foreground/70 outline-none transition-colors hover:bg-foreground/[0.05] hover:text-foreground focus-visible:bg-foreground/[0.06] focus-visible:text-foreground focus-visible:ring-[2px] focus-visible:ring-ring/25 disabled:pointer-events-none disabled:opacity-40",jd="size-9 rounded-xl text-foreground/60 transition-all duration-200 hover:-translate-y-px hover:bg-foreground/[0.05] hover:text-foreground hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] active:translate-y-0 active:scale-[0.98]",zd="bg-foreground/[0.07] text-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.08)] hover:bg-foreground/[0.08]",av={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function s3({slideWidth:n,slideHeight:o,offsetX:r,offsetY:i,scale:s,preselectionOverlay:u,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:y,isEditingText:S,manipulationOverlay:A,attributeValues:C,iframeRef:E,stageViewportRef:M,selectionOverlayRef:R,selectionContextMenuTriggerRef:j,isManipulating:B,isToolbarSuppressed:Y,onSelectionOverlayMouseDown:ee,onSelectionOverlayMouseUp:$,onSelectionOverlayMouseMove:V,onSelectionOverlayContextMenu:z,onStageMouseLeave:W,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:fe,onSelectionOverlayDoubleClick:Q,onBackgroundClick:oe,onStageWheel:de,onStyleChange:pe,onAttributeChange:T,onAlignToSlide:O,onDistribute:N,onGroup:L,onLayerOrder:D,onUngroup:_,onDuplicate:U,onDelete:H}){const P=(te,ne)=>{te===ne&&oe()},X=d?c3({selectionOverlay:d,offsetX:r,scale:s,slideWidth:n}):void 0;return p.jsxs("section",{className:"relative z-[5] min-h-0 min-w-0 flex-auto overflow-visible p-10 pb-6 max-[1200px]:px-5 max-[1200px]:py-4","data-testid":"stage-panel",ref:M,onClick:te=>{P(te.target,te.currentTarget)},onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&P(te.target,te.currentTarget)},onMouseLeave:W,onWheel:te=>{de(te.nativeEvent)},children:[d&&!B&&!Y&&!S?p.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:X,"data-testid":"floating-toolbar-anchor",children:p.jsx(t3,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,attributeValues:C,onStyleChange:pe,onAttributeChange:T,onAlignToSlide:O,onDistribute:N,onGroup:L,onLayerOrder:D,onUngroup:_},m)}):null,p.jsx("div",{className:"absolute origin-top-left overflow-hidden rounded-xl bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:max-w-full","data-testid":"stage-frame",style:{width:`${n}px`,height:`${o}px`,left:`${r}px`,top:`${i}px`,transform:`scale(${s})`},children:p.jsx("iframe",{ref:E,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!S&&!B?p.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...av,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,S?null:p.jsxs(F1,{children:[p.jsx(K1,{asChild:!0,children:p.jsx("span",{ref:j,"data-testid":"selection-context-menu-trigger",className:"pointer-events-none absolute size-0","aria-hidden":"true"})}),p.jsx(lO,{selectionCommandAvailability:x,onAlignToSlide:O,onDelete:H,onDistribute:N,onDuplicate:U,onGroup:L,onLayerOrder:D,onUngroup:_})]}),d&&!S?p.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Be("absolute z-[3] border border-dashed",y?"pointer-events-none":"pointer-events-auto"),style:{...av,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:ee,onMouseMove:V,onMouseUp:$,onContextMenu:z,onDoubleClick:te=>{Q(te)}}):null,A?p.jsx(rO,{selectionBounds:A.selectionBounds,snapGuides:A.snapGuides,resizeHandles:A.resizeHandles,rotationHandle:A.rotationHandle,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:fe}):null]})}function c3({selectionOverlay:n,offsetX:o,scale:r,slideWidth:i}){const u=o,d=o+i*r,m=Math.max((d-u)/2,0),h=Math.min(288,m),g=u+h,x=d-h,y=n.x+n.width/2;return{left:`${Math.min(Math.max(y,g),Math.max(g,x))}px`,top:n.y<84?`${n.y+n.height+18}px`:`${n.y-18}px`,transform:n.y<84?"translate(-50%, 0)":"translate(-50%, -100%)"}}function u3({delayDuration:n=0,...o}){return p.jsx(W5,{"data-slot":"tooltip-provider",delayDuration:n,...o})}function fm(n,o,r){return bE(n,o,r)}function ri(n,o,r){var u;if(typeof DOMParser>"u")return"";const s=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${ve}="${o}"]`);return((u=s==null?void 0:s.getAttribute(r))==null?void 0:u.trim())??""}function f3({elementId:n,nextValue:o,propertyName:r,slide:i}){const s=fm(i,n,r),u=o.trim();return s===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:r,previousValue:s,nextValue:u,timestamp:Date.now()}}function d3({attributeName:n,elementId:o,nextValue:r,slide:i}){const s=ri(i,o,n),u=r.trim();return s===u?null:{type:"attribute.update",slideId:i.id,elementId:o,attributeName:n,previousValue:s,nextValue:u,timestamp:Date.now()}}function Co(n){return Math.round(n*100)/100}function sS(n,o){var m;if(typeof DOMParser>"u")return n;const s=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(s instanceof HTMLElement))return n;const u=ea(s.style.transform),d=Ia(0,0,u.rotate);return s.style.position="absolute",s.style.left=`${Co(o.x)}px`,s.style.top=`${Co(o.y)}px`,s.style.width=`${Co(o.width)}px`,s.style.height=`${Co(o.height)}px`,s.style.margin="0px",s.style.boxSizing="border-box",d?s.style.transform=d:s.style.removeProperty("transform"),s.style.transformOrigin||(s.style.transformOrigin="center center"),s.outerHTML}function cS(n,o){return{x:n.left-o.left,y:n.top-o.top,width:n.width,height:n.height}}function m3(n,o,r){var d;const i=(d=n.current)==null?void 0:d.contentDocument,s=i==null?void 0:i.querySelector(o.rootSelector),u=s==null?void 0:s.getBoundingClientRect();return{width:(u==null?void 0:u.width)||r.width,height:(u==null?void 0:u.height)||r.height}}function dm(n,o,r){return{x:Co(n.x+o),y:Co(n.y+r),width:n.width,height:n.height}}function h3(n){return n.length?n.reduce((o,r)=>{const i=Math.min(o.x,r.x),s=Math.min(o.y,r.y),u=Math.max(o.x+o.width,r.x+r.width),d=Math.max(o.y+o.height,r.y+r.height);return{x:i,y:s,width:u-i,height:d-s}}):null}function p3(n,o,r){const i=Math.max(0,r.width-n.width),s=Math.max(0,r.height-n.height),u=Math.min(i,Math.max(0,n.x+o)),d=Math.min(s,Math.max(0,n.y+o));return{x:Co(u-n.x),y:Co(d-n.y)}}function uS(n,o){const r=[];return o.vertical&&r.push(...ov(n,o.vertical,"vertical")),o.horizontal&&r.push(...ov(n,o.horizontal,"horizontal")),r}function ov(n,o,r){return o.target.kind==="spacing"?y3(n,o,r):[g3(n,o,r)]}function g3(n,o,r){const i=o.target;if(n.x+n.width/2,n.y+n.height/2,i.rect.x+i.rect.width/2,i.rect.y+i.rect.height/2,r==="vertical"){const m=rv(n,o.anchor,"vertical");if(i.kind==="slide")return{orientation:r,start:{x:i.position,y:n.y},end:{x:i.position,y:n.y+n.height},...i.role==="center"?{start:{x:i.position,y:i.rect.y},end:{x:i.position,y:i.rect.y+i.rect.height}}:{},variant:"alignment"};const h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:r,start:{x:m,y:h-Ks},end:{x:m,y:g+Ks},variant:"alignment"}}const s=rv(n,o.anchor,"horizontal");if(i.kind==="slide")return{orientation:r,start:{x:n.x,y:i.position},end:{x:n.x+n.width,y:i.position},...i.role==="center"?{start:{x:i.rect.x,y:i.position},end:{x:i.rect.x+i.rect.width,y:i.position}}:{},variant:"alignment"};const u=Math.min(n.x,i.rect.x),d=Math.max(n.x+n.width,i.rect.x+i.rect.width);return{orientation:r,start:{x:u-Ks,y:s},end:{x:d+Ks,y:s},variant:"alignment"}}function y3(n,o,r){const i=o.target.relatedRects;if(i.length<2)return[];const[s,u]=i;if(!s||!u)return[];if(r==="vertical"){const A=s.x<=u.x?s:u,C=A===s?u:s,E=A.x+A.width,M=C.x,R=o.anchor==="start"?n.x:n.x+n.width,j={orientation:"horizontal",start:{x:E,y:A.y+A.height/2},end:{x:M,y:C.y+C.height/2},variant:"spacing"},B={orientation:"horizontal",start:o.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:A.x,y:A.y+A.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[j,B]}const d=s.y<=u.y?s:u,m=d===s?u:s,h=d.y+d.height,g=m.y,x=o.anchor==="start"?n.y:n.y+n.height,y={orientation:"vertical",start:{x:d.x+d.width/2,y:h},end:{x:m.x+m.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:o.anchor==="start"?{x:m.x+m.width/2,y:m.y+m.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[y,S]}function rv(n,o,r){return r==="vertical"?o==="start"?n.x:o==="end"?n.x+n.width:n.x+n.width/2:o==="start"?n.y:o==="end"?n.y+n.height:n.y+n.height/2}function v3({activeSlide:n,doc:o,rootRect:r,selectedElementId:i,slideStageRect:s,stageGeometry:u}){var S;const d=(A,C)=>({position:A,rect:s,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(s.x,"start"),d(s.x+s.width/2,"center"),d(s.x+s.width,"end")],h=[d(s.y,"start"),d(s.y+s.height/2,"center"),d(s.y+s.height,"end")],g=o.querySelector(`[data-editor-id="${i}"]`),x=[];for(const A of n.elements){if(A.id===i)continue;const C=o.querySelector(`[data-editor-id="${A.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const E=(S=o.defaultView)==null?void 0:S.getComputedStyle(C);if((E==null?void 0:E.display)==="none"||(E==null?void 0:E.visibility)==="hidden")continue;const M=C.getBoundingClientRect();if(M.width<=0||M.height<=0)continue;const R=Wr(M,r,u);(A.type==="block"||A.type==="image")&&x.push({elementId:A.id,rect:R});const j=R.x,B=R.x+R.width/2,Y=R.x+R.width,ee=R.y,$=R.y+R.height/2,V=R.y+R.height,z=(W,ie)=>({position:W,rect:R,kind:"element",role:ie,anchor:null,priority:ie==="center"?3:4,elementId:A.id,relatedRects:[]});m.push(z(j,"start"),z(B,"center"),z(Y,"end")),h.push(z(ee,"start"),z($,"center"),z(V,"end"))}const y=b3(x);return m.push(...y.vertical),h.push(...y.horizontal),{vertical:m,horizontal:h}}function b3(n){const o=[],r=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),s=n.slice().sort((u,d)=>u.rect.y-d.rect.y).filter(u=>u.rect.width>0&&u.rect.height>0);for(let u=0;u<i.length-1;u+=1){const d=i[u],m=i[u+1];if(!d||!m)continue;if(!Zr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,0)){const g=m.rect.x-(d.rect.x+d.rect.width);g>=X0&&g<=F0&&Zr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,Ec)&&o.push(Ws({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ws({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let u=0;u<s.length-1;u+=1){const d=s[u],m=s[u+1];if(!d||!m)continue;if(!Zr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,0)){const g=m.rect.y-(d.rect.y+d.rect.height);g>=X0&&g<=F0&&Zr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,Ec)&&r.push(Ws({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ws({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:o,horizontal:r}}function Ws({position:n,rect:o,anchor:r,relatedRects:i}){return{position:n,rect:o,kind:"spacing",role:"end",anchor:r,priority:1,elementId:null,relatedRects:i}}function x3(n,o){const r=Cc([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],o.vertical,n,"vertical"),i=Cc([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],o.horizontal,n,"horizontal"),s={...n,x:n.x+((r==null?void 0:r.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:s,guides:uS(s,{vertical:r,horizontal:i})}}function S3(n,o,r){const i={...n},s=o==="top-left"||o==="bottom-left"?"start":"end",u=o==="top-left"||o==="top-right"?"start":"end",d=Cc([{anchor:s,position:s==="start"?n.x:n.x+n.width}],r.vertical,n,"vertical"),m=Cc([{anchor:u,position:u==="start"?n.y:n.y+n.height}],r.horizontal,n,"horizontal");if(d)if(s==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(u==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:uS(i,{vertical:m,horizontal:d})}}function Cc(n,o,r,i){const s=M3(o);let u=null;for(const d of n)for(const m of s){if(!T3(r,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>aO)continue;const x=lv({anchor:d.anchor,delta:h,target:m},r,i),y=u?lv(u,r,i):Number.POSITIVE_INFINITY;x>=y||(u={anchor:d.anchor,delta:h,target:m})}return u}function lv(n,o,r){const i=Math.abs(n.delta),s=n.target.kind==="spacing"?Math.max(0,i-oO):i,u=w3(n.target);return s*1e3+u+n.target.priority+E3(n.anchor,n.target)+C3(o,n.target,r)/100}function w3(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function E3(n,o){return o.kind==="slide"&&o.role==="center"&&n!=="center"?25:0}function C3(n,o,r){return o.kind==="slide"?0:r==="vertical"?iv(n.y,n.y+n.height,o.rect.y,o.rect.y+o.rect.height):iv(n.x,n.x+n.width,o.rect.x,o.rect.x+o.rect.width)}function iv(n,o,r,i){return o<r?r-o:i<n?n-i:0}function T3(n,o,r){return o.kind==="slide"?!0:o.kind==="spacing"?A3(n,o,r):!0}function A3(n,o,r){if(o.relatedRects.length<2)return!1;if(r==="vertical"){const u=Math.min(...o.relatedRects.map(m=>m.y)),d=Math.max(...o.relatedRects.map(m=>m.y+m.height));return Zr(n.y,n.y+n.height,u,d,Ec)}const i=Math.min(...o.relatedRects.map(u=>u.x)),s=Math.max(...o.relatedRects.map(u=>u.x+u.width));return Zr(n.x,n.x+n.width,i,s,Ec)}function M3(n){const o=new Set;return n.filter(r=>{const i=`${r.kind}:${r.elementId??"slide"}:${r.position.toFixed(2)}`;return o.has(i)?!1:(o.add(i),!0)})}function Js(n){return`${Math.round(n*100)/100}px`}function So(n,o){return Math.max(n,48*o)}function mm(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function _3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function N3(n){const[o,...r]=n;return o?r.reduce((i,s)=>{const u=Math.min(i.x,s.x),d=Math.min(i.y,s.y),m=Math.max(i.x+i.width,s.x+s.width),h=Math.max(i.y+i.height,s.y+s.height);return{x:u,y:d,width:m-u,height:h-d}},o):{x:0,y:0,width:0,height:0}}function sv(n,o,r,i){return Math.atan2(o-i,n-r)*180/Math.PI}function R3({resizeCorner:n,scale:o,stageDeltaX:r,stageDeltaY:i,startStageRect:s}){let u=s.x,d=s.y,m=s.width,h=s.height;switch(n){case"top-left":{m=So(s.width-r,o),h=So(s.height-i,o),u=s.x+(s.width-m),d=s.y+(s.height-h);break}case"top-right":{m=So(s.width+r,o),h=So(s.height-i,o),d=s.y+(s.height-h);break}case"bottom-left":{m=So(s.width-r,o),h=So(s.height+i,o),u=s.x+(s.width-m);break}default:{m=So(s.width+r,o),h=So(s.height+i,o);break}}return{x:u,y:d,width:m,height:h}}function oc(n,o){for(const r of xm)n.style[r]=o[r]??""}function O3(n){return n.elementIds.map(o=>{const r=n.targetNodes[o],i=n.previousStyles[o];if(!r||!i)return null;const s=ci(r);return JSON.stringify(s)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:o,previousStyle:i,nextStyle:s,timestamp:Date.now()}}).filter(o=>!!o)}function D3(n,o){return o.length===1?o[0]:{type:"operation.batch",slideId:n.slideId,operations:o,timestamp:Date.now()}}function j3({isEditingText:n,isManipulating:o,selectedElement:r,selectedElementId:i,snapGuides:s,stageRect:u}){return!u||!i||!_3(r)||n?null:{selectionBounds:u,snapGuides:o?s:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function z3({activeSlide:n,selectedElement:o,selectedElementId:r,selectedElementIds:i,selectedStageRect:s,iframeRef:u,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:x,scale:y,slideHeight:S,slideWidth:A}=d,C=v.useRef(null),E=v.useRef(!1),M=v.useRef(null),[R,j]=v.useState(!1),[B,Y]=v.useState(!1),[ee,$]=v.useState(null),[V,z]=v.useState([]),ie=j3({isEditingText:m,isManipulating:R,selectedElement:o,selectedElementId:r,snapGuides:V,stageRect:ee??s});v.useEffect(()=>()=>{C.current=null,M.current&&window.clearTimeout(M.current)},[]),v.useEffect(()=>{(!n||!r||!mm(o)||m)&&(C.current=null,j(!1),$(null))},[n,m,o,r]),v.useEffect(()=>{R||($(null),z([]))},[R]);const fe=v.useCallback(()=>{Y(!0),M.current&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{Y(!1),M.current=null},0)},[]),Q=v.useCallback((oe,de,pe=null,T=r)=>{var qa;const O=T?n==null?void 0:n.elements.find(Oe=>Oe.id===T):void 0;if(!n||!T||!mm(O)||m)return;const N=(qa=u.current)==null?void 0:qa.contentDocument;if(!N)return;const L=N.querySelector(n.rootSelector),D=Ke(N,T);if(!L||!D)return;const _=k3({activeSlide:n,doc:N,mode:oe,selectedElementId:T,selectedElementIds:i}),U=Object.fromEntries(_.map(Oe=>[Oe,Ke(N,Oe)]).filter(Oe=>!!Oe[1]));if(!Object.keys(U).length)return;const H=Object.fromEntries(Object.entries(U).map(([Oe,Je])=>[Oe,ci(Je)])),P=Object.fromEntries(Object.entries(U).map(([Oe,Je])=>[Oe,L3(Je,U)])),X=u.current,te=(X==null?void 0:X.style.pointerEvents)||"",ne=de.sourceWindow??window,q=de.toStagePoint??((Oe,Je)=>({x:Oe,y:Je})),le=q(de.clientX,de.clientY);de.preventDefault(),de.stopPropagation();const ye=D.getBoundingClientRect(),Ee=L.getBoundingClientRect(),be={x:g,y:x,width:A*y,height:S*y},Re={scale:y,offsetX:g,offsetY:x},ke=v3({activeSlide:n,doc:N,rootRect:Ee,selectedElementId:T,slideStageRect:be,stageGeometry:Re}),_e=Object.values(U).map(Oe=>Wr(Oe.getBoundingClientRect(),Ee,Re)),rt=Object.fromEntries(Object.entries(U).map(([Oe,Je])=>[Oe,Wr(Je.getBoundingClientRect(),Ee,Re)])),dt=Object.fromEntries(Object.values(U).map(Oe=>Oe.parentElement).filter(Oe=>!!Oe).map(Oe=>[fS(Oe),Wr(Oe.getBoundingClientRect(),Ee,Re)]));if(!_e.length)return;const xt=N3(_e);C.current={slideId:n.id,elementId:T,elementIds:Object.keys(U),mode:oe,resizeCorner:pe,startPointer:le,startStageRect:xt,centerPoint:{x:ye.left+ye.width/2,y:ye.top+ye.height/2},previousStyle:H[T],previousStyles:H,startElementStageRects:rt,resizeParentElementIds:P,startParentStageRects:dt,targetNodes:U,snapTargets:ke},E.current=!0,j(!0),z([]),X&&(X.style.pointerEvents="none");const nt=(Oe,Je)=>{const De=C.current;if(!De)return;Oe.preventDefault();const an=Je(Oe.clientX,Oe.clientY),It=an.x-De.startPointer.x,va=an.y-De.startPointer.y;if(De.mode==="move"){const Ht={x:De.startStageRect.x+It,y:De.startStageRect.y+va,width:De.startStageRect.width,height:De.startStageRect.height},ut=Oe.altKey?{rect:Ht,guides:[]}:x3(Ht,De.snapTargets);$(ut.rect),z(ut.guides);const Va=(ut.rect.x-De.startStageRect.x)/y,ra=(ut.rect.y-De.startStageRect.y)/y;for(const Gt of De.elementIds){const Fn=De.targetNodes[Gt],Sn=De.previousStyles[Gt];if(!Fn||!Sn)continue;const wn=ea(Sn.transform);oc(Fn,{...Sn,transform:Ia(wn.translateX+Va,wn.translateY+ra,wn.rotate),transformOrigin:Sn.transformOrigin||"center center"})}return}if(De.mode==="resize"){const Ht=R3({resizeCorner:De.resizeCorner,scale:y,stageDeltaX:It,stageDeltaY:va,startStageRect:De.startStageRect}),ut=Oe.altKey||!De.resizeCorner?{rect:Ht,guides:[]}:S3(Ht,De.resizeCorner,De.snapTargets);$(ut.rect),z(ut.guides),H3(De,ut.rect,{offsetX:g,offsetY:x,scale:y});return}const ln=ea(De.previousStyle.transform),sn=sv(De.startPointer.x,De.startPointer.y,De.centerPoint.x,De.centerPoint.y),Lt=sv(an.x,an.y,De.centerPoint.x,De.centerPoint.y);oc(D,{...De.previousStyle,transform:Ia(ln.translateX,ln.translateY,ln.rotate+(Lt-sn)),transformOrigin:"center center"}),z([])},bn=Oe=>{nt(Oe,q)},xn=Oe=>{nt(Oe,(Je,De)=>({x:Je,y:De}))},Tt=()=>{ne.removeEventListener("mousemove",bn),ne.removeEventListener("mouseup",nn),ne.removeEventListener("keydown",St),ne!==window&&(window.removeEventListener("mousemove",xn),window.removeEventListener("mouseup",nn)),X&&(X.style.pointerEvents=te)},nn=()=>{const Oe=C.current;if(Tt(),E.current=!1,j(!1),fe(),C.current=null,z([]),!Oe)return;const Je=O3(Oe);if(!Je.length){$(null);return}h(D3(Oe,Je))},St=Oe=>{if(Oe.key!=="Escape")return;const Je=C.current;if(Tt(),j(!1),fe(),C.current=null,z([]),!!Je){for(const De of Je.elementIds){const an=Je.targetNodes[De],It=Je.previousStyles[De];an&&It&&oc(an,It)}$(null)}};ne.addEventListener("mousemove",bn),ne.addEventListener("mouseup",nn),ne.addEventListener("keydown",St),ne!==window&&(window.addEventListener("mousemove",xn),window.addEventListener("mouseup",nn))},[n,u,m,h,r,i,y,g,x,A,S,fe]);return{manipulationOverlay:ie,isManipulating:R||E.current,suppressBackgroundClear:B,beginMove:(oe,de)=>{Q("move",oe,null,de)},beginResize:(oe,de)=>{Q("resize",de,oe)},beginRotate:oe=>{Q("rotate",oe)}}}function k3({activeSlide:n,doc:o,mode:r,selectedElementId:i,selectedElementIds:s}){const u=s.filter(m=>{const h=n.elements.find(g=>g.id===m);return mm(h)});if(r==="move")return u.length?u:[i];if(r==="rotate")return[i];const d=new Set;for(const m of u.length?u:[i]){const h=Ke(o,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${ve}]`)){const x=g.getAttribute(ve);x&&d.add(x)}}return[...d]}function L3(n,o){const r=Object.entries(o);let i=n.parentElement;for(;i;){const s=r.find(([,u])=>u===i);if(s)return s[0];i=i.parentElement}return null}function H3(n,o,r){const i=n.startStageRect.width>0?o.width/n.startStageRect.width:1,s=n.startStageRect.height>0?o.height/n.startStageRect.height:1,u={x:r.offsetX,y:r.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:o.x+(h.x-n.startStageRect.x)*i,y:o.y+(h.y-n.startStageRect.y)*s,width:h.width*i,height:h.height*s}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],x=d[m];if(!h||!g||!x)continue;const y=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[fS(h.parentElement)]??u;if(!y)continue;const S=ea(g.transform);oc(h,{...g,position:g.position||"absolute",left:Js((x.x-y.x)/r.scale),top:Js((x.y-y.y)/r.scale),width:Js(x.width/r.scale),height:Js(x.height/r.scale),transform:Ia(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function fS(n){return n!=null&&n.getAttribute(ve)?`editable:${n.getAttribute(ve)}`:"slide"}const cv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function B3(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function U3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function I3(n){return n.altKey?1:n.shiftKey?10:5}function P3(n,o,r){var d;const i={[o]:r};if(typeof DOMParser>"u")return i;const u=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(u instanceof HTMLElement))return i;for(const m of u.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${r}-${h}`)}return i}function hm(n,o,r){return o.length?(r(o.length===1?o[0]:{type:"operation.batch",slideId:n,operations:o,timestamp:Date.now()}),!0):!1}function $3({slide:n,selectedElementIds:o,iframeRef:r}){var h;if(!n||!o.length)return null;const i=(h=r.current)==null?void 0:h.contentDocument,s=i==null?void 0:i.querySelector(n.rootSelector),u=s==null?void 0:s.getBoundingClientRect();if(!u)return null;const d=o.map(g=>{const x=sc(n.htmlSource,g),y=ic(n.htmlSource,g),S=i?Ke(i,g):null;return!x||!y||!S?null:{sourceElementId:g,html:x,rect:cS(S.getBoundingClientRect(),u),...y}}).filter(g=>!!g),m=h3(d.map(g=>g.rect));return m?{elements:d,unionRect:m}:null}function G3({slide:n,selectedElementIds:o}){return!n||!o.length?[]:o.map(r=>{const i=sc(n.htmlSource,r),s=ic(n.htmlSource,r);return!i||!s?null:{type:"element.remove",slideId:n.id,elementId:r,...s,html:i,timestamp:Date.now()}}).filter(r=>!!r)}function Y3({slide:n,payload:o,iframeRef:r,slideSize:i}){if(!n||!o)return null;let s=n.htmlSource;const u=[],d=m3(r,n,i),m=p3(o.unionRect,24,d),h=[];return{operations:o.elements.map(x=>{const y=$d(s,`${x.sourceElementId}-copy`),S=Dv(x.html,P3(x.html,x.sourceElementId,y)),A=dm(x.rect,m.x,m.y),C=sS(S,A),E={type:"element.insert",slideId:n.id,elementId:y,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:C,timestamp:Date.now()};return s=jv(s,E),u.push(y),h.push({...x,rect:A}),E}),selectedElementIds:u,nextHtmlSource:s,nextClipboard:{elements:h,unionRect:dm(o.unionRect,m.x,m.y)}}}function uv(n,o,r){return hm(n,o,r)}function q3({activeSlide:n,selectedElementIds:o,iframeRef:r,slideWidth:i,slideHeight:s,isEditingText:u,canUndo:d,canRedo:m,onEscapeSelection:h,onNavigateSlide:g,onCommitOperation:x,onSelectElementIds:y,onUndo:S,onRedo:A}){const C=v.useRef(null),E=v.useRef(n),M=v.useRef(o),R=v.useRef(d),j=v.useRef(m),B=v.useRef(u),Y=v.useRef(h),ee=(n==null?void 0:n.htmlSource)??"",$=v.useRef(g);E.current=n,M.current=o,R.current=d,j.current=m,B.current=u,Y.current=h,$.current=g,v.useEffect(()=>{var pe;const V=()=>{const T=$3({slide:E.current,selectedElementIds:M.current,iframeRef:r});return T&&(C.current=T),!!T},z=()=>{const T=E.current;if(!T)return!1;const O=G3({slide:T,selectedElementIds:M.current});return O.length?(uv(T.id,O,x),y([]),!0):!1},W=(T=C.current)=>{const O=E.current,N=Y3({slide:O,payload:T,iframeRef:r,slideSize:{width:i,height:s}});return!O||!N?!1:(uv(O.id,N.operations,x),E.current={...O,htmlSource:N.nextHtmlSource},y(N.selectedElementIds),C.current=N.nextClipboard,!0)},ie=T=>{var H;const O=cv[T.key],N=E.current,L=M.current;if(!N||!L.length||!O)return!1;const D=(H=r.current)==null?void 0:H.contentDocument,_=I3(T),U=L.map(P=>{const X=N.elements.find(ye=>ye.id===P);if(!U3(X))return null;const te=D?Ke(D,P):null;if(!te)return null;const ne=ci(te),q=ea(ne.transform),le=Ud({...ne,transform:Ia(q.translateX+O.x*_,q.translateY+O.y*_,q.rotate),transformOrigin:ne.transformOrigin||"center center"});return{type:"element.layout.update",slideId:N.id,elementId:P,previousStyle:ne,nextStyle:le,timestamp:Date.now()}}).filter(P=>!!P);return hm(N.id,U,x),!0},fe=T=>{var _;const O=E.current,N=M.current;if(!O||!N.length)return!1;const L=(_=r.current)==null?void 0:_.contentDocument,D=N.map(U=>{const H=L?Ke(L,U):null;if(!H)return null;const P=ci(H),X=Number.parseInt(P.zIndex||"",10),te=Number.isFinite(X)?X:0,ne=T==="front"?999:T==="back"?0:Math.max(0,te+(T==="forward"?1:-1)),q=Ud({...P,zIndex:String(ne)});return q.zIndex===P.zIndex?null:{type:"element.layout.update",slideId:O.id,elementId:U,previousStyle:P,nextStyle:q,timestamp:Date.now()}}).filter(U=>!!U);return hm(O.id,D,x)},Q=T=>{if(T.defaultPrevented||B.current)return;const O=T.key.toLowerCase(),N=T.metaKey||T.ctrlKey,L=N&&!T.shiftKey&&O==="z",D=N&&(T.shiftKey&&O==="z"||O==="y"),_=B3(T.target);let U=!1;if(L&&R.current)S(),U=!0;else if(D&&j.current)A(),U=!0;else{if(_)return;N&&!T.shiftKey&&O==="c"?U=V():N&&!T.shiftKey&&O==="x"?U=V()&&z():N&&!T.shiftKey&&O==="v"?U=W():N&&!T.shiftKey&&O==="d"?U=V()&&W():T.key==="Backspace"||T.key==="Delete"?U=z():T.key==="Escape"?U=Y.current():T.key in cv?M.current.length>0?U=ie(T):!T.altKey&&!T.shiftKey&&!N&&(U=$.current(T.key==="ArrowUp"||T.key==="ArrowLeft"?"previous":"next")):N&&T.key==="]"?U=fe(T.shiftKey?"front":"forward"):N&&T.key==="["&&(U=fe(T.shiftKey?"back":"backward"))}U&&(T.preventDefault(),T.stopPropagation())},oe=V3(ee,r),de=(pe=r.current)==null?void 0:pe.contentWindow;return window.addEventListener("keydown",Q),de==null||de.addEventListener("keydown",Q),oe==null||oe.addEventListener("keydown",Q),()=>{window.removeEventListener("keydown",Q),de==null||de.removeEventListener("keydown",Q),oe==null||oe.removeEventListener("keydown",Q)}},[ee,r,x,A,y,S,s,i])}function V3(n,o){var r;return(r=o.current)==null?void 0:r.contentDocument}function X3(n){return n?[n]:[]}function ec(n,o){return n.includes(o)?n:[...n,o]}function F3({selectedElementIds:n,activeGroupScopeId:o}){return o?{handled:!0,nextSelection:[o],exitGroupScope:!0}:n.length?{handled:!0,nextSelection:[],exitGroupScope:!1}:{handled:!1,nextSelection:n,exitGroupScope:!1}}const fv="hse-editing-text-style",K3=`
|
|
425
|
+
[data-hse-editing="true"] {
|
|
426
|
+
outline: none !important;
|
|
427
|
+
box-shadow: none !important;
|
|
428
|
+
overflow: visible;
|
|
429
|
+
caret-color: currentColor;
|
|
430
|
+
white-space: pre-wrap;
|
|
431
|
+
user-select: text;
|
|
432
|
+
-webkit-user-select: text;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
[data-hse-editing="true"]:focus,
|
|
436
|
+
[data-hse-editing="true"]:focus-visible {
|
|
437
|
+
outline: none !important;
|
|
438
|
+
box-shadow: none !important;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
body[data-hse-group-scope] [data-editable] {
|
|
442
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
446
|
+
opacity: 0.28;
|
|
447
|
+
filter: blur(1.5px);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
451
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
452
|
+
outline-offset: 4px;
|
|
453
|
+
}
|
|
454
|
+
`;function Q3(n){return n.closest(`[data-editable][${ve}]`)}function dv(n,o,r,i){const s=n.elementFromPoint(o,r);return s?Qr(s,i):null}function mv(n,o){const r=Array.from(n.querySelectorAll("[data-editable]"));for(const s of r)s.removeAttribute("data-hse-active-group-scope"),s.removeAttribute("data-hse-outside-group-scope");if(!o){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",o);const i=n.querySelector(`[data-editable="block"][data-group="true"][${ve}="${o}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const s of r)s!==i&&!i.contains(s)&&s.setAttribute("data-hse-outside-group-scope","true")}function Qr(n,o){const r=Q3(n);return r?o?r.closest(`[data-editable="block"][data-group="true"][${ve}="${o}"]`)?r:null:r.closest(`[data-editable="block"][data-group="true"][${ve}]`)??r:null}function Z3(n){if(n.getElementById(fv))return;const o=n.createElement("style");o.id=fv,o.textContent=K3,n.head.appendChild(o)}function W3(n){const o=n.ownerDocument.getSelection(),r=n.ownerDocument.createRange();r.selectNodeContents(n),r.collapse(!1),o==null||o.removeAllRanges(),o==null||o.addRange(r)}function J3({activeSlide:n,iframeRef:o,onCommitOperation:r,onOpenSelectionContextMenu:i,onStageWheel:s,onBeginPointerMove:u}){const[d,m]=v.useState([]),[h,g]=v.useState(null),[x,y]=v.useState(null),[S,A]=v.useState(null),C=v.useRef(null),E=v.useRef(null),M=v.useRef(()=>{}),R=v.useRef(()=>{}),j=v.useRef(s),B=d[d.length-1]??null;j.current=s;const Y=v.useCallback(()=>{g(O=>O===null?O:null)},[]);function ee(O){m(N=>{const L=typeof O=="function"?O(N[N.length-1]??null):O;return X3(L)})}const $=v.useCallback((O,N)=>{const L=o.current,D=L==null?void 0:L.contentDocument;if(!L||!D||C.current)return null;const _=L.getBoundingClientRect(),U=_.width>0?L.clientWidth/_.width:1,H=_.height>0?L.clientHeight/_.height:1,P=dv(D,(O-_.left)*U,(N-_.top)*H,E.current);return(P==null?void 0:P.getAttribute(ve))??null},[o]),V=v.useCallback((O,N)=>{const L=$(O,N);return g(D=>D===L?D:L),L},[$]),z=v.useCallback((O,N,L)=>{const D=$(O,N);return D?(m(L?_=>ec(_,D):[D]),D):null},[$]),W=v.useCallback((O,N)=>{const L=$(O,N);return L?(m(D=>ec(D,L)),g(L),i==null||i(O,N),!0):!1},[$,i]),ie=v.useCallback(O=>{var _;if(!n)return;const N=(_=o.current)==null?void 0:_.contentDocument,L=N?Ke(N,O):null;if(!L||L.getAttribute("data-editable")!=="text")return;const D={slideId:n.id,elementId:O,initialText:L.textContent||""};m([O]),C.current=D,A(D)},[n,o]),fe=v.useCallback(O=>{y(O),E.current=O,m([O])},[]),Q=v.useCallback(()=>{const O=E.current;E.current=null,y(null),m(O?[O]:[])},[]),oe=v.useCallback(()=>{if(C.current)return m(N=>N.length?[]:N),!0;const O=F3({selectedElementIds:d,activeGroupScopeId:E.current});return O.handled&&(O.exitGroupScope&&(E.current=null,y(null)),m(O.nextSelection)),O.handled},[d]);function de(O,N){const L=S;if(!n||!L||L.slideId!==n.id||L.elementId!==O){C.current=null,A(null);return}const D=L.initialText;C.current=null,A(null),N!==D&&r({type:"text.update",slideId:n.id,elementId:O,previousText:D,nextText:N,timestamp:Date.now()})}function pe(){var L;const O=(L=o.current)==null?void 0:L.contentDocument,N=C.current;if(N&&O){const D=Ke(O,N.elementId);D&&(D.textContent=N.initialText)}C.current=null,A(null)}v.useEffect(()=>{C.current=S},[S]),v.useEffect(()=>{E.current=x},[x]),v.useEffect(()=>{!n||!S||S.slideId===n.id||A(null)},[n,S]),M.current=de,R.current=pe,v.useEffect(()=>{if(!n)return;const O=o.current;if(!O)return;const N=O.contentDocument;if(!N)return;N.open(),N.write(n.htmlSource),N.close(),Z3(N),mv(N,E.current);const L=H=>{const P=H.getAttribute(ve);P&&M.current(P,H.textContent||"")};N.onclick=H=>{const P=H.target;if(!(P instanceof Element)){if(C.current){const q=Ke(N,C.current.elementId);if(q){L(q),m([]);return}}m([]);return}const X=C.current;if(X){Y();const q=Ke(N,X.elementId);if(q&&!q.contains(P)){L(q),m([]);return}return}const te=Qr(P,E.current);if(!te){E.current||m([]);return}const ne=te.getAttribute(ve);ne&&(H.shiftKey||H.metaKey||H.ctrlKey?m(q=>ec(q,ne)):m([ne]))},N.onmousemove=H=>{if(C.current){Y();return}const P=dv(N,H.clientX,H.clientY,E.current),X=(P==null?void 0:P.getAttribute(ve))??null;g(te=>te===X?te:X)},N.oncontextmenu=H=>{if(C.current)return;const P=O.getBoundingClientRect(),X=P.width>0?O.clientWidth/P.width:1,te=P.height>0?O.clientHeight/P.height:1,ne=P.left+H.clientX/X,q=P.top+H.clientY/te;W(ne,q)&&(H.preventDefault(),H.stopPropagation())},N.onmouseleave=()=>{Y()};const D=H=>{var P;(P=j.current)==null||P.call(j,H)};N.addEventListener("wheel",D,{passive:!1});const _=H=>{var te;const P=T(H,E.current),X=P==null?void 0:P.getAttribute(ve);if(X){if(((te=C.current)==null?void 0:te.elementId)===X){H.stopPropagation();return}H.preventDefault(),H.stopPropagation(),ie(X)}};N.addEventListener("dblclick",_,!0);const U=Array.from(N.querySelectorAll(`[data-editable][${ve}]`));for(const H of U)H.style.cursor="default",H.ondblclick=null,H.onblur=null,H.onkeydown=null,H.onmousedown=null,H.onclick=P=>{var ne;P.stopPropagation();const X=Qr(P.target,E.current);if(E.current&&!X)return;const te=(X==null?void 0:X.getAttribute(ve))??H.getAttribute(ve);((ne=C.current)==null?void 0:ne.elementId)!==te&&te&&(P.shiftKey||P.metaKey||P.ctrlKey?m(q=>ec(q,te)):m([te]))},H.onmousedown=P=>{if(P.button!==0||C.current)return;const X=Qr(P.target,E.current);if(E.current&&!X)return;const te=(X==null?void 0:X.getAttribute(ve))??H.getAttribute(ve);if(!te)return;const ne=O.getBoundingClientRect(),q=ne.width>0?O.clientWidth/ne.width:1,le=ne.height>0?O.clientHeight/ne.height:1,ye=(xt,nt)=>({x:ne.left+xt/q,y:ne.top+nt/le}),Ee=O.contentWindow;if(!Ee)return;const be=P.clientX,Re=P.clientY;let ke=!1;const _e=()=>{Ee.removeEventListener("mousemove",rt),Ee.removeEventListener("mouseup",dt)},rt=xt=>{ke||Math.hypot(xt.clientX-be,xt.clientY-Re)<=4||(ke=!0,_e(),m([te]),g(te),u==null||u(te,be,Re,{sourceWindow:Ee,toStagePoint:ye}),xt.preventDefault(),xt.stopPropagation())},dt=()=>{_e()};Ee.addEventListener("mousemove",rt),Ee.addEventListener("mouseup",dt)},H.ondblclick=P=>{const X=T(P,E.current)??Qr(P.target,E.current);if((X==null?void 0:X.getAttribute("data-editable"))==="text"){const q=X.getAttribute(ve);if(q){P.preventDefault(),P.stopPropagation(),ie(q);return}}const te=H.getAttribute(ve),ne=C.current;if(te&&H.getAttribute("data-group")==="true"){P.preventDefault(),P.stopPropagation(),fe(te);return}if(H.getAttribute("data-editable")==="text"){if(te&&ne&&ne.slideId===n.id&&ne.elementId===te){P.stopPropagation();return}P.preventDefault(),P.stopPropagation(),te&&ie(te)}};return()=>{N.removeEventListener("wheel",D),N.removeEventListener("dblclick",_,!0)}},[n,fe,ie,Y,o,u,W]);function T(O,N){var H;const L=(H=o.current)==null?void 0:H.contentDocument;if(!L)return null;const D=Array.from(L.querySelectorAll(`[data-editable="text"][${ve}]`)).filter(P=>Qr(P,N)===P),_=D.find(P=>{const X=P.getBoundingClientRect();return O.clientX>=X.left&&O.clientX<=X.right&&O.clientY>=X.top&&O.clientY<=X.bottom});if(_)return _;const U=D.map(P=>{const X=P.getBoundingClientRect(),te=Math.min(Math.max(O.clientX,X.left),X.right),ne=Math.min(Math.max(O.clientY,X.top),X.bottom);return{candidate:P,distance:Math.hypot(O.clientX-te,O.clientY-ne)}}).sort((P,X)=>P.distance-X.distance)[0];return U&&U.distance<=24?U.candidate:null}return v.useEffect(()=>{var N;const O=(N=o.current)==null?void 0:N.contentDocument;O&&mv(O,x)},[x,o]),v.useEffect(()=>{var ke;const O=S;if(!O||!n||O.slideId!==n.id)return;const N=o.current,L=N==null?void 0:N.contentDocument;if(!N||!L)return;const D=L.querySelector(vm(O.elementId));if(!D)return;const _=()=>{M.current(O.elementId,D.textContent||"")};let U=!1;const H=D.style.display,P=D.style.alignItems,X=D.style.overflow,te=D.style.cursor,ne=D.onblur,q=D.onclick,le=D.onkeydown,ye=D.onmousedown,Ee=D.onmouseup,be=(ke=D.ownerDocument.defaultView)==null?void 0:ke.getComputedStyle(D),Re=(be==null?void 0:be.display)??"";return D.setAttribute("contenteditable","plaintext-only"),D.setAttribute("spellcheck","false"),D.setAttribute("data-hse-editing","true"),D.style.cursor="text",D.style.overflow="visible",Re==="inline-flex"?(D.style.display="inline-block",D.style.alignItems="normal"):(Re==="flex"||Re==="grid"||Re==="inline-grid")&&(D.style.display="block",D.style.alignItems="normal"),D.focus(),W3(D),D.onkeydown=_e=>{if(_e.key==="Enter"&&!_e.shiftKey){_e.preventDefault(),_();return}_e.key==="Escape"&&(_e.preventDefault(),R.current())},D.onmousedown=()=>{U=!1},D.onmouseup=()=>{const _e=D.ownerDocument.getSelection(),rt=_e==null?void 0:_e.anchorNode,dt=_e==null?void 0:_e.focusNode,xt=rt?D.contains(rt):!1,nt=dt?D.contains(dt):!1;U=!!(_e&&!_e.isCollapsed&&xt&&nt)},D.onclick=_e=>{_e.stopPropagation(),U&&(_e.preventDefault(),U=!1)},D.onblur=()=>{window.setTimeout(()=>{var bn;if(((bn=C.current)==null?void 0:bn.elementId)!==O.elementId)return;const _e=D.ownerDocument.getSelection(),rt=_e==null?void 0:_e.anchorNode,dt=_e==null?void 0:_e.focusNode,xt=D.ownerDocument.activeElement,nt=!!(_e&&!_e.isCollapsed)&&!!(rt&&D.contains(rt))&&!!(dt&&D.contains(dt));xt===D||nt||_()},0)},()=>{var _e;(_e=D.ownerDocument.getSelection())==null||_e.removeAllRanges(),D.ownerDocument.activeElement===D&&D.blur(),D.removeAttribute("contenteditable"),D.removeAttribute("spellcheck"),D.removeAttribute("data-hse-editing"),D.style.cursor=te,D.style.display=H,D.style.alignItems=P,D.style.overflow=X,D.onblur=ne,D.onclick=q,D.onkeydown=le,D.onmousedown=ye,D.onmouseup=Ee}},[n,o,S]),{selectedElementId:B,selectedElementIds:d,preselectedElementId:h,activeGroupScopeId:x,isEditingText:!!(n&&(S==null?void 0:S.slideId)===n.id),setSelectedElementId:ee,setSelectedElementIds:m,beginTextEditing:ie,beginGroupEditingScope:fe,exitGroupEditingScope:Q,clearSelection:oe,clearPreselection:Y,updatePointerPreselection:V,retargetPointerSelection:z,openPointerSelectionContextMenu:W}}function eD(n,o={}){var x;const{onSlidesChange:r}=o,[i,s]=v.useReducer(Us,n,Bv),[u,d]=v.useState(((x=n[0])==null?void 0:x.id)??"");v.useEffect(()=>{var y;s({type:"history.reset",slides:n}),d(((y=n[0])==null?void 0:y.id)??"")},[n]);const m=v.useMemo(()=>i.slides.find(y=>y.id===u)??i.slides[0],[u,i.slides]),h=(m==null?void 0:m.id)??"";function g(y){var S;return y.some(A=>A.id===u)||d(((S=y[0])==null?void 0:S.id)??""),r==null||r(y),y}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:y=>{const S=Us(i,{type:"history.commit",operation:y});return s({type:"history.commit",operation:y}),g(S.slides)},runUndo:()=>{const y=Us(i,{type:"history.undo"});s({type:"history.undo"}),g(y.slides)},runRedo:()=>{const y=Us(i,{type:"history.redo"});s({type:"history.redo"}),g(y.slides)}}}const tD=["-webkit-","-moz-","-ms-"],nD=new Set(["appearance","caret-color","color-interpolation","color-rendering","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","math-depth","math-shift","print-color-adjust","ruby-align","ruby-position","speak","text-size-adjust"]);function aD(n){return tD.some(o=>n.startsWith(o))?!1:!nD.has(n)}function oD(n){const o=window.getComputedStyle(n),r=[];for(const i of Array.from(o)){if(!aD(i))continue;const s=i==="transform"&&n.style.transform?n.style.transform.trim():o.getPropertyValue(i).trim();s.length!==0&&r.push({name:i,value:s})}return r.sort((i,s)=>i.name.localeCompare(s.name))}function rD({iframeRef:n,activeSlide:o,selectedElement:r,selectedElementIds:i,preselectedElementId:s,scale:u,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const x=i.join("\0"),y=s??"",[S,A]=v.useState({key:"",rect:null}),[C,E]=v.useState({key:"",rect:null}),[M,R]=v.useState({key:"",rect:null}),[j,B]=v.useState([]),Y=S.key===x?S.rect:null,ee=C.key===y?C.rect:null,$=M.key===x?M.rect:null;return v.useEffect(()=>{const V=n.current,z=V==null?void 0:V.contentDocument;if(!V||!z||!o){A({key:x,rect:null}),E({key:y,rect:null}),R({key:x,rect:null}),B([]);return}const W=z.querySelector(o.rootSelector),ie=i[0]?Ke(z,i[0]):W;if(!ie){A({key:x,rect:null}),E({key:y,rect:null}),R({key:x,rect:null}),B([]);return}const fe=oD(ie);B(T=>iD(T,fe)?T:fe);const Q=W==null?void 0:W.getBoundingClientRect();let oe=null;if(!i.length||!W||!Q)oe=null;else{const T=i.map(O=>Ke(z,O)).filter(O=>!!O).map(O=>Wr(O.getBoundingClientRect(),Q,{scale:u,offsetX:d,offsetY:m}));T.length&&(oe=T.reduce((O,N)=>{const L=Math.min(O.x,N.x),D=Math.min(O.y,N.y),_=Math.max(O.x+O.width,N.x+N.width),U=Math.max(O.y+O.height,N.y+N.height);return{x:L,y:D,width:_-L,height:U-D}}))}A(T=>kd(T,x,oe)?T:{key:x,rect:oe}),R(T=>kd(T,x,oe)?T:{key:x,rect:oe});const de=s?Ke(z,s):null,pe=de&&Q?Wr(de.getBoundingClientRect(),Q,{scale:u,offsetX:d,offsetY:m}):null;E(T=>kd(T,y,pe)?T:{key:y,rect:pe})},[o,n,d,m,s,y,u,i,x,g,h]),{selectedStageRect:Y,preselectionOverlay:ee,selectionOverlay:$,selectionLabel:(r==null?void 0:r.type)||"element",inspectedStyles:j}}function kd(n,o,r){return n.key===o&&lD(n.rect,r)}function lD(n,o){return n===o?!0:!n||!o?!1:n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function iD(n,o){return n.length!==o.length?!1:n.every((r,i)=>{const s=o[i];return(s==null?void 0:s.name)===r.name&&s.value===r.value})}function sD(n,o){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const r=document.implementation.createHTMLDocument(),i=r.createElement("base"),s=r.createElement("a");return r.head.appendChild(i),r.body.appendChild(s),o&&(i.href=o),s.href=n,s.href}const cD=(()=>{let n=0;const o=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${o()}${n}`)})();function Mo(n){const o=[];for(let r=0,i=n.length;r<i;r++)o.push(n[r]);return o}let Fr=null;function dS(n={}){return Fr||(n.includeStyleProperties?(Fr=n.includeStyleProperties,Fr):(Fr=Mo(window.getComputedStyle(document.documentElement)),Fr))}function Tc(n,o){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(o);return i?parseFloat(i.replace("px","")):0}function uD(n){const o=Tc(n,"border-left-width"),r=Tc(n,"border-right-width");return n.clientWidth+o+r}function fD(n){const o=Tc(n,"border-top-width"),r=Tc(n,"border-bottom-width");return n.clientHeight+o+r}function mS(n,o={}){const r=o.width||uD(n),i=o.height||fD(n);return{width:r,height:i}}function dD(){let n,o;try{o=process}catch{}const r=o&&o.env?o.env.devicePixelRatio:null;return r&&(n=parseInt(r,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const Dn=16384;function mD(n){(n.width>Dn||n.height>Dn)&&(n.width>Dn&&n.height>Dn?n.width>n.height?(n.height*=Dn/n.width,n.width=Dn):(n.width*=Dn/n.height,n.height=Dn):n.width>Dn?(n.height*=Dn/n.width,n.width=Dn):(n.width*=Dn/n.height,n.height=Dn))}function Ac(n){return new Promise((o,r)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>o(i))})},i.onerror=r,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function hD(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(o=>`data:image/svg+xml;charset=utf-8,${o}`)}async function pD(n,o,r){const i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return s.setAttribute("width",`${o}`),s.setAttribute("height",`${r}`),s.setAttribute("viewBox",`0 0 ${o} ${r}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),s.appendChild(u),u.appendChild(n),hD(s)}const vn=(n,o)=>{if(n instanceof o)return!0;const r=Object.getPrototypeOf(n);return r===null?!1:r.constructor.name===o.name||vn(r,o)};function gD(n){const o=n.getPropertyValue("content");return`${n.cssText} content: '${o.replace(/'|"/g,"")}';`}function yD(n,o){return dS(o).map(r=>{const i=n.getPropertyValue(r),s=n.getPropertyPriority(r);return`${r}: ${i}${s?" !important":""};`}).join(" ")}function vD(n,o,r,i){const s=`.${n}:${o}`,u=r.cssText?gD(r):yD(r,i);return document.createTextNode(`${s}{${u}}`)}function hv(n,o,r,i){const s=window.getComputedStyle(n,r),u=s.getPropertyValue("content");if(u===""||u==="none")return;const d=cD();try{o.className=`${o.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(vD(d,r,s,i)),o.appendChild(m)}function bD(n,o,r){hv(n,o,":before",r),hv(n,o,":after",r)}const pv="application/font-woff",gv="image/jpeg",xD={woff:pv,woff2:pv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:gv,jpeg:gv,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function SD(n){const o=/\.([^./]*?)$/g.exec(n);return o?o[1]:""}function eh(n){const o=SD(n).toLowerCase();return xD[o]||""}function wD(n){return n.split(/,/)[1]}function pm(n){return n.search(/^(data:)/)!==-1}function ED(n,o){return`data:${o};base64,${n}`}async function hS(n,o,r){const i=await fetch(n,o);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const s=await i.blob();return new Promise((u,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{u(r({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(s)})}const Ld={};function CD(n,o,r){let i=n.replace(/\?.*/,"");return r&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),o?`[${o}]${i}`:i}async function th(n,o,r){const i=CD(n,o,r.includeQueryParams);if(Ld[i]!=null)return Ld[i];r.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let s;try{const u=await hS(n,r.fetchRequestInit,({res:d,result:m})=>(o||(o=d.headers.get("Content-Type")||""),wD(m)));s=ED(u,o)}catch(u){s=r.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return Ld[i]=s,s}async function TD(n){const o=n.toDataURL();return o==="data:,"?n.cloneNode(!1):Ac(o)}async function AD(n,o){if(n.currentSrc){const u=document.createElement("canvas"),d=u.getContext("2d");u.width=n.clientWidth,u.height=n.clientHeight,d==null||d.drawImage(n,0,0,u.width,u.height);const m=u.toDataURL();return Ac(m)}const r=n.poster,i=eh(r),s=await th(r,i,o);return Ac(s)}async function MD(n,o){var r;try{if(!((r=n==null?void 0:n.contentDocument)===null||r===void 0)&&r.body)return await qc(n.contentDocument.body,o,!0)}catch{}return n.cloneNode(!1)}async function _D(n,o){return vn(n,HTMLCanvasElement)?TD(n):vn(n,HTMLVideoElement)?AD(n,o):vn(n,HTMLIFrameElement)?MD(n,o):n.cloneNode(pS(n))}const ND=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",pS=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function RD(n,o,r){var i,s;if(pS(o))return o;let u=[];return ND(n)&&n.assignedNodes?u=Mo(n.assignedNodes()):vn(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=Mo(n.contentDocument.body.childNodes):u=Mo(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes),u.length===0||vn(n,HTMLVideoElement)||await u.reduce((d,m)=>d.then(()=>qc(m,r)).then(h=>{h&&o.appendChild(h)}),Promise.resolve()),o}function OD(n,o,r){const i=o.style;if(!i)return;const s=window.getComputedStyle(n);s.cssText?(i.cssText=s.cssText,i.transformOrigin=s.transformOrigin):dS(r).forEach(u=>{let d=s.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),vn(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&o.getAttribute("d")&&(d=`path(${o.getAttribute("d")})`),i.setProperty(u,d,s.getPropertyPriority(u))})}function DD(n,o){vn(n,HTMLTextAreaElement)&&(o.innerHTML=n.value),vn(n,HTMLInputElement)&&o.setAttribute("value",n.value)}function jD(n,o){if(vn(n,HTMLSelectElement)){const i=Array.from(o.children).find(s=>n.value===s.getAttribute("value"));i&&i.setAttribute("selected","")}}function zD(n,o,r){return vn(o,Element)&&(OD(n,o,r),bD(n,o,r),DD(n,o),jD(n,o)),o}async function kD(n,o){const r=n.querySelectorAll?n.querySelectorAll("use"):[];if(r.length===0)return n;const i={};for(let u=0;u<r.length;u++){const m=r[u].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await qc(g,o,!0))}}const s=Object.values(i);if(s.length){const u="http://www.w3.org/1999/xhtml",d=document.createElementNS(u,"svg");d.setAttribute("xmlns",u),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(u,"defs");d.appendChild(m);for(let h=0;h<s.length;h++)m.appendChild(s[h]);n.appendChild(d)}return n}async function qc(n,o,r){return!r&&o.filter&&!o.filter(n)?null:Promise.resolve(n).then(i=>_D(i,o)).then(i=>RD(n,i,o)).then(i=>zD(n,i,o)).then(i=>kD(i,o))}const gS=/url\((['"]?)([^'"]+?)\1\)/g,LD=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,HD=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function BD(n){const o=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${o})(['"]?\\))`,"g")}function UD(n){const o=[];return n.replace(gS,(r,i,s)=>(o.push(s),r)),o.filter(r=>!pm(r))}async function ID(n,o,r,i,s){try{const u=r?sD(o,r):o,d=eh(o);let m;return s||(m=await th(u,d,i)),n.replace(BD(o),`$1${m}$3`)}catch{}return n}function PD(n,{preferredFontFormat:o}){return o?n.replace(HD,r=>{for(;;){const[i,,s]=LD.exec(r)||[];if(!s)return"";if(s===o)return`src: ${i};`}}):n}function yS(n){return n.search(gS)!==-1}async function vS(n,o,r){if(!yS(n))return n;const i=PD(n,r);return UD(i).reduce((u,d)=>u.then(m=>ID(m,d,o,r)),Promise.resolve(i))}async function Kr(n,o,r){var i;const s=(i=o.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(s){const u=await vS(s,null,r);return o.style.setProperty(n,u,o.style.getPropertyPriority(n)),!0}return!1}async function $D(n,o){await Kr("background",n,o)||await Kr("background-image",n,o),await Kr("mask",n,o)||await Kr("-webkit-mask",n,o)||await Kr("mask-image",n,o)||await Kr("-webkit-mask-image",n,o)}async function GD(n,o){const r=vn(n,HTMLImageElement);if(!(r&&!pm(n.src))&&!(vn(n,SVGImageElement)&&!pm(n.href.baseVal)))return;const i=r?n.src:n.href.baseVal,s=await th(i,eh(i),o);await new Promise((u,d)=>{n.onload=u,n.onerror=o.onImageErrorHandler?(...h)=>{try{u(o.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=u),m.loading==="lazy"&&(m.loading="eager"),r?(n.srcset="",n.src=s):n.href.baseVal=s})}async function YD(n,o){const i=Mo(n.childNodes).map(s=>bS(s,o));await Promise.all(i).then(()=>n)}async function bS(n,o){vn(n,Element)&&(await $D(n,o),await GD(n,o),await YD(n,o))}function qD(n,o){const{style:r}=n;o.backgroundColor&&(r.backgroundColor=o.backgroundColor),o.width&&(r.width=`${o.width}px`),o.height&&(r.height=`${o.height}px`);const i=o.style;return i!=null&&Object.keys(i).forEach(s=>{r[s]=i[s]}),n}const yv={};async function vv(n){let o=yv[n];if(o!=null)return o;const i=await(await fetch(n)).text();return o={url:n,cssText:i},yv[n]=o,o}async function bv(n,o){let r=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(r.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),hS(m,o.fetchRequestInit,({result:h})=>(r=r.replace(d,`url(${h})`),[d,h]))});return Promise.all(u).then(()=>r)}function xv(n){if(n==null)return[];const o=[],r=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(r,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=s.exec(i);if(h===null)break;o.push(h[0])}i=i.replace(s,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=u.exec(i);if(h===null){if(h=m.exec(i),h===null)break;u.lastIndex=m.lastIndex}else m.lastIndex=u.lastIndex;o.push(h[0])}return o}async function VD(n,o){const r=[],i=[];return n.forEach(s=>{if("cssRules"in s)try{Mo(s.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let m=d+1;const h=u.href,g=vv(h).then(x=>bv(x,o)).then(x=>xv(x).forEach(y=>{try{s.insertRule(y,y.startsWith("@import")?m+=1:s.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:y,error:S})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(u){const d=n.find(m=>m.href==null)||document.styleSheets[0];s.href!=null&&i.push(vv(s.href).then(m=>bv(m,o)).then(m=>xv(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(s=>{if("cssRules"in s)try{Mo(s.cssRules||[]).forEach(u=>{r.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${s.href}`,u)}}),r))}function XD(n){return n.filter(o=>o.type===CSSRule.FONT_FACE_RULE).filter(o=>yS(o.style.getPropertyValue("src")))}async function FD(n,o){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Mo(n.ownerDocument.styleSheets),i=await VD(r,o);return XD(i)}function xS(n){return n.trim().replace(/["']/g,"")}function KD(n){const o=new Set;function r(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{o.add(xS(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&r(u)})}return r(n),o}async function QD(n,o){const r=await FD(n,o),i=KD(n);return(await Promise.all(r.filter(u=>i.has(xS(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return vS(u.cssText,d,o)}))).join(`
|
|
455
|
+
`)}async function ZD(n,o){const r=o.fontEmbedCSS!=null?o.fontEmbedCSS:o.skipFonts?null:await QD(n,o);if(r){const i=document.createElement("style"),s=document.createTextNode(r);i.appendChild(s),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function WD(n,o={}){const{width:r,height:i}=mS(n,o),s=await qc(n,o,!0);return await ZD(s,o),await bS(s,o),qD(s,o),await pD(s,r,i)}async function JD(n,o={}){const{width:r,height:i}=mS(n,o),s=await WD(n,o),u=await Ac(s),d=document.createElement("canvas"),m=d.getContext("2d"),h=o.pixelRatio||dD(),g=o.canvasWidth||r,x=o.canvasHeight||i;return d.width=g*h,d.height=x*h,o.skipAutoScale||mD(d),d.style.width=`${g}`,d.style.height=`${x}`,o.backgroundColor&&(m.fillStyle=o.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(u,0,0,d.width,d.height),d}async function ej(n,o={}){return(await JD(n,o)).toDataURL()}const Sv=224,tj=2;function nj(n){return new Promise(o=>{window.setTimeout(o,n)})}async function aj(n){var o;if((o=n.fonts)!=null&&o.ready)try{await n.fonts.ready}catch{}}async function oj(n){const o=document.createElement("iframe");o.setAttribute("aria-hidden","true"),o.tabIndex=-1,o.style.position="fixed",o.style.left="-10000px",o.style.top="0",o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.opacity="0",o.style.pointerEvents="none",o.style.border="0",document.body.appendChild(o);try{const r=o.contentDocument;if(!r)throw new Error("Unable to access thumbnail iframe document.");r.open(),r.write(n.htmlSource),r.close(),await aj(r),await nj(50);const i=r.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const s=r.body??i;return await ej(s,{cacheBust:!0,pixelRatio:tj,canvasWidth:Sv,canvasHeight:Math.round(n.height/n.width*Sv),backgroundColor:"white",skipFonts:!1})}finally{o.remove()}}const rj=300;function lj(n){const[o,r]=v.useState({}),i=v.useRef(new Map),s=v.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return v.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const m={};for(const h of n){const g=`${h.id}:${h.htmlSource}`,x=i.current.get(g);if(x){m[h.id]=x;continue}try{const y=await oj(h);i.current.set(g,y),m[h.id]=y}catch{}if(u)return}u||r(h=>({...h,...m}))},rj);return()=>{u=!0,window.clearTimeout(d)}},[n]),v.useEffect(()=>{const u=new Set(s.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[s]),o}function ij({stageViewportRef:n,slideWidth:o,slideHeight:r}){const[i,s]=v.useState({width:0,height:0});v.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const S=g.getBoundingClientRect();s(A=>A.width===S.width&&A.height===S.height?A:{width:S.width,height:S.height})};x();const y=new ResizeObserver(()=>{x()});return y.observe(g),()=>{y.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/o:1,i.height>0?i.height/r:1),d=Number.isFinite(u)&&u>0?u:1,m=o*d,h=r*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function sj({slides:n,deckTitle:o,isSaving:r=!1,onSlidesChange:i,onDeckTitleChange:s,onExportPdf:u,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:x,redoDepth:y,setActiveSlideId:S,commitOperation:A,runUndo:C,runRedo:E}=eD(n,{onSlidesChange:i}),M=v.useRef(null),R=v.useRef(null),j=v.useRef(null),B=v.useRef(null),Y=v.useRef(()=>{}),ee=v.useRef(null),[$,V]=v.useState(!1),[z,W]=v.useState(!1),ie=lj(m),fe=v.useCallback((J,ce)=>{const me=B.current;me&&me.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:J,clientY:ce,button:2,buttons:2}))},[]),{selectedElementId:Q,selectedElementIds:oe,preselectedElementId:de,isEditingText:pe,activeGroupScopeId:T,setSelectedElementId:O,setSelectedElementIds:N,beginTextEditing:L,beginGroupEditingScope:D,clearSelection:_,clearPreselection:U,updatePointerPreselection:H,retargetPointerSelection:P}=J3({activeSlide:h,iframeRef:M,onCommitOperation:A,onOpenSelectionContextMenu:fe,onStageWheel:ra,onBeginPointerMove:v.useCallback((J,ce,me,xe)=>{Y.current(J,ce,me,xe)},[])}),X=h==null?void 0:h.elements.find(J=>J.id===Q),te=h==null?void 0:h.elements.find(J=>J.id===T),ne=oe.length>1?"multi":(X==null?void 0:X.type)??(te==null?void 0:te.type)??"block",q=h?oe.map(J=>h.elements.find(ce=>ce.id===J)).filter(J=>!!J):[],le={group:oe.length>=2&&q.length===oe.length,ungroup:oe.length===1&&!!((X==null?void 0:X.type)==="group"||h&&Q&&cj(h.htmlSource,Q))},ye=!!T&&oe.length===1&&Q===T,Ee=o??"",be=(h==null?void 0:h.width)||To,Re=(h==null?void 0:h.height)||Ao,{scale:ke,offsetX:_e,offsetY:rt}=ij({stageViewportRef:R,slideWidth:be,slideHeight:Re}),{selectedStageRect:dt,preselectionOverlay:xt,selectionOverlay:nt,inspectedStyles:bn}=rD({iframeRef:M,activeSlide:h,selectedElement:X,selectedElementIds:oe,preselectedElementId:de,scale:ke,offsetX:_e,offsetY:rt,slideWidth:be,slideHeight:Re}),{manipulationOverlay:xn,isManipulating:Tt,suppressBackgroundClear:nn,beginMove:St,beginResize:qa,beginRotate:Oe}=z3({activeSlide:h,selectedElement:X,selectedElementId:Q,selectedElementIds:oe,selectedStageRect:dt,iframeRef:M,stageGeometry:{scale:ke,offsetX:_e,offsetY:rt,slideWidth:be,slideHeight:Re},isEditingText:pe,onCommitOperation:A});Y.current=(J,ce,me,xe)=>{St({clientX:ce,clientY:me,...xe,preventDefault:()=>{},stopPropagation:()=>{}},J)};const Je=(xn==null?void 0:xn.selectionBounds)??nt,De=Q??"slide-root",an={locked:h?ri(h,De,"data-editor-locked"):"",altText:h?ri(h,De,"alt"):"",ariaLabel:h?ri(h,De,"aria-label"):"",linkUrl:h?ri(h,De,"data-link-url"):""};function It(J,ce){if(!h)return;const me=f3({elementId:De,nextValue:ce,propertyName:J,slide:h});me&&A(me)}function va(J,ce){if(!h)return;const me=d3({attributeName:J,elementId:De,nextValue:ce,slide:h});me&&A(me)}function ln(J){if(!h||oe.length===0)return;const ce=oe.map(me=>{const xe=fm(h,me,"z-index"),Ue=Number.parseInt(xe,10),ze=Number.isFinite(Ue)?Ue:0,qe=J==="front"?"999":J==="back"?"0":String(Math.max(0,ze+(J==="forward"?1:-1)));return xe===qe?null:{type:"style.update",slideId:h.id,elementId:me,propertyName:"z-index",previousValue:xe,nextValue:qe,timestamp:Date.now()}}).filter(me=>!!me);sn(ce)}function sn(J){!h||J.length===0||A(J.length===1?J[0]:{type:"operation.batch",slideId:h.id,operations:J,timestamp:Date.now()})}function Lt(J,ce,me){var qe;const xe={[ce]:me},ze=(qe=new DOMParser().parseFromString(`<template>${J}</template>`,"text/html").querySelector("template"))==null?void 0:qe.content.firstElementChild;if(!(ze instanceof HTMLElement))return xe;for(const Qe of ze.querySelectorAll(`[${ve}]`)){const lt=Qe.getAttribute(ve);lt&&(xe[lt]=`${me}-${lt}`)}return xe}function Ht(){var qe;if(!h||oe.length===0)return;const J=(qe=M.current)==null?void 0:qe.contentDocument,ce=J==null?void 0:J.querySelector(h.rootSelector),me=ce==null?void 0:ce.getBoundingClientRect();let xe=h.htmlSource;const Ue=[],ze=oe.map(Qe=>{const lt=sc(h.htmlSource,Qe),cn=ic(h.htmlSource,Qe),pt=J?Ke(J,Qe):null;if(!lt||!cn||!pt||!me)return null;const on=$d(xe,`${Qe}-copy`),Yt=Dv(lt,Lt(lt,Qe,on)),At=dm(cS(pt.getBoundingClientRect(),me),24,24),un=sS(Yt,At);return xe=`${xe}
|
|
456
|
+
<!-- ${on} reserved -->`,Ue.push(on),{type:"element.insert",slideId:h.id,elementId:on,...cn,html:un,timestamp:Date.now()}}).filter(Qe=>!!Qe);sn(ze),Ue.length&&N(Ue)}function ut(){if(!h||oe.length===0)return;const J=oe.map(ce=>{const me=sc(h.htmlSource,ce),xe=ic(h.htmlSource,ce);return!me||!xe?null:{type:"element.remove",slideId:h.id,elementId:ce,...xe,html:me,timestamp:Date.now()}}).filter(ce=>!!ce);sn(J),J.length&&N([])}function Va(J){if(!h||m.length<=1)return!1;const ce=m.findIndex(Ue=>Ue.id===h.id);if(ce<0)return!1;const me=J==="previous"?Math.max(0,ce-1):Math.min(m.length-1,ce+1),xe=m[me];return!xe||xe.id===h.id?!1:(S(xe.id),O(null),!0)}function ra(J){if(oe.length||pe||Tt)return;const ce=Math.abs(J.deltaY)>=Math.abs(J.deltaX)?J.deltaY:J.deltaX;Math.abs(ce)<24||Va(ce>0?"next":"previous")&&(J.preventDefault(),J.stopPropagation())}function Gt(J){if(!h||m.length===0)return;const ce=DE(m,J);A({type:"slide.create",slide:ce,index:J,timestamp:Date.now()}),S(ce.id),_()}function Fn(){if(!h)return;const J=m.findIndex(me=>me.id===h.id),ce=J>=0?J+1:m.length;Gt(ce)}function Sn(J){const ce=m.findIndex(me=>me.id===J);ce<0||Gt(ce)}function wn(J){const ce=m.findIndex(me=>me.id===J);ce<0||Gt(ce+1)}function kn(J){const ce=m.find(ze=>ze.id===J);if(!ce)return;const me=m.findIndex(ze=>ze.id===J),xe=me>=0?me+1:m.length,Ue=jE(m,ce);A({type:"slide.duplicate",sourceSlideId:J,slide:Ue,index:xe,timestamp:Date.now()}),S(Ue.id),_()}function je(J){if(m.length<=1)return;const ce=m.findIndex(Ue=>Ue.id===J),me=m[ce];if(!me)return;const xe=m[ce+1]??m[ce-1]??m[0];A({type:"slide.delete",slide:me,index:ce,timestamp:Date.now()}),g===J&&S((xe==null?void 0:xe.id)??""),_()}function mt(J){const ce=m.find(me=>me.id===J);ce&&A({type:"slide.visibility.update",slideId:J,previousHidden:ce.hidden===!0,nextHidden:ce.hidden!==!0,timestamp:Date.now()})}function Rt(J,ce){const me=m.find(Ue=>Ue.id===J),xe=ce.trim()||"Untitled Slide";!me||me.title===xe||A({type:"slide.title.update",slideId:J,previousTitle:me.title,nextTitle:xe,timestamp:Date.now()})}function Pt(J,ce){const me=m.findIndex(xe=>xe.id===J);me<0||me===ce||(A({type:"slide.reorder",slideId:J,fromIndex:me,toIndex:ce,timestamp:Date.now()}),S(J))}function la(){if(!h||oe.length<2)return;const J=ht(),ce=$d(h.htmlSource,"group-1"),me=wE({html:h.htmlSource,slideId:h.id,groupElementId:ce,elementRects:J,elementIds:oe});me&&(A(me),N([ce]))}function ht(J){var cn;const ce=(cn=M.current)==null?void 0:cn.contentDocument,me=ce==null?void 0:ce.querySelector((h==null?void 0:h.rootSelector)??"");if(!ce||!me)return{};const xe=me.getBoundingClientRect(),Ue=h?h.width/xe.width:1,ze=h?h.height/xe.height:1,qe={},Qe=wv(ce,J),lt=[...Array.from(ce.querySelectorAll(`[data-editable][${ve}]`)),...Array.from(Qe.keys())];for(const pt of lt){const on=pt.getAttribute(ve)||Qe.get(pt);if(!on)continue;const Yt=pt.getBoundingClientRect(),At=pt.parentElement,un=At!=null&&At.hasAttribute("data-editable")&&At.getAttribute(ve)?At.getAttribute(ve):null,bt=un?qe[un]??{x:0,y:0,width:xe.width,height:xe.height}:{x:0,y:0,width:xe.width,height:xe.height};qe[on]={x:(Yt.left-xe.left)*Ue-bt.x,y:(Yt.top-xe.top)*ze-bt.y,width:Yt.width*Ue,height:Yt.height*ze}}return qe}function Qt(){if(!h||oe.length!==1||!Q)return;const J=EE({html:h.htmlSource,slideId:h.id,groupElementId:Q,elementRects:ht(Q),elementPresentationStyles:ba(Q)});J&&(A(J),N(J.childElementIds))}function ba(J){var ze,qe,Qe;const ce=(ze=M.current)==null?void 0:ze.contentDocument;if(!ce)return{};const me=Ke(ce,J);if(!me||me.getAttribute("data-group")==="true")return{};const xe={},Ue=wv(ce,J);for(const lt of Array.from(me.children)){if(!lt.hasAttribute("data-editable")&&!nh(lt))continue;const cn=lt.getAttribute(ve)||Ue.get(lt),pt=(qe=lt.ownerDocument.defaultView)==null?void 0:qe.getComputedStyle(lt);if(!(!cn||!pt)){xe[cn]={color:pt.color,fontSize:pt.fontSize,fontWeight:pt.fontWeight,fontStyle:pt.fontStyle,lineHeight:pt.lineHeight,textAlign:pt.textAlign,paddingTop:pt.paddingTop,paddingRight:pt.paddingRight,paddingBottom:pt.paddingBottom,paddingLeft:pt.paddingLeft,listStylePosition:pt.listStylePosition,listStyleType:pt.listStyleType};for(const on of Array.from(lt.querySelectorAll(`[data-editable][${ve}]`))){const Yt=on.getAttribute(ve),At=(Qe=on.ownerDocument.defaultView)==null?void 0:Qe.getComputedStyle(on);!Yt||!At||(xe[Yt]={color:At.color,fontSize:At.fontSize,fontWeight:At.fontWeight,fontStyle:At.fontStyle,lineHeight:At.lineHeight,textAlign:At.textAlign})}}}return xe}function Zt(J){if(!h||!Q||!Je)return;const ce=fm(h,Q,"transform"),me={x:(Je.x-_e)/ke,y:(Je.y-rt)/ke,width:Je.width/ke,height:Je.height/ke};let xe=0,Ue=0;if(J==="left"?xe=-me.x:J==="hcenter"?xe=be/2-(me.x+me.width/2):J==="right"?xe=be-(me.x+me.width):J==="top"?Ue=-me.y:J==="vcenter"?Ue=Re/2-(me.y+me.height/2):J==="bottom"&&(Ue=Re-(me.y+me.height)),Math.abs(xe)<.01&&Math.abs(Ue)<.01)return;const ze=ea(ce);It("transform",Ia(ze.translateX+xe,ze.translateY+Ue,ze.rotate)??"")}function Wt(J){var un;if(!h||oe.length<3)return;const ce=(un=M.current)==null?void 0:un.contentDocument,me=ce==null?void 0:ce.querySelector(h.rootSelector),xe=me==null?void 0:me.getBoundingClientRect();if(!ce||!xe)return;const Ue=oe.map(bt=>{const En=Ke(ce,bt);if(!En)return null;const Cn=En.getBoundingClientRect();return{elementId:bt,node:En,rect:{x:Cn.left-xe.left,y:Cn.top-xe.top,width:Cn.width,height:Cn.height}}}).filter(bt=>!!bt);if(Ue.length<3)return;const ze=J==="vertical"?"y":"x",qe=J==="vertical"?"height":"width",Qe=[...Ue].sort((bt,En)=>bt.rect[ze]-En.rect[ze]),lt=Qe[0],cn=Qe[Qe.length-1];if(!lt||!cn)return;const pt=lt.rect[ze]+lt.rect[qe]/2,Yt=(cn.rect[ze]+cn.rect[qe]/2-pt)/(Qe.length-1),At=Qe.map((bt,En)=>{const Cn=pt+Yt*En,Ot=bt.rect[ze]+bt.rect[qe]/2,fr=Cn-Ot;if(Math.abs(fr)<.01)return null;const Bo=ci(bt.node),Kn=ea(Bo.transform),Xa=Ud({...Bo,transform:Ia(Kn.translateX+(ze==="x"?fr:0),Kn.translateY+(ze==="y"?fr:0),Kn.rotate),transformOrigin:Bo.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:bt.elementId,previousStyle:Bo,nextStyle:Xa,timestamp:Date.now()}}).filter(bt=>!!bt);sn(At)}return q3({activeSlide:h,selectedElementIds:oe,iframeRef:M,slideWidth:be,slideHeight:Re,isEditingText:pe,canUndo:x>0,canRedo:y>0,onCommitOperation:A,onSelectElementIds:N,onEscapeSelection:_,onNavigateSlide:Va,onUndo:C,onRedo:E}),h?p.jsx(u3,{children:p.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[p.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${$?"invisible pointer-events-none absolute inset-0":""}`,children:[p.jsx(oA,{title:Ee,onTitleChange:s,isSaving:r,onPresent:()=>{_(),V(!0)},onExportHtml:d,pdfSlides:m.map(J=>({id:J.id,title:J.title,file:J.sourceFile})),pdfThumbnails:ie,onExportPdf:u}),p.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[p.jsx(tO,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:ie,onSelectSlide:J=>{S(J),O(null)},onAdd:Fn,onAddSlideAbove:Sn,onAddSlideBelow:wn,onDuplicate:kn,onDelete:je,onToggleHidden:mt,onRename:Rt,onReorder:Pt}),p.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:p.jsx(s3,{slideWidth:be,slideHeight:Re,offsetX:_e,offsetY:rt,scale:ke,preselectionOverlay:xt,selectionOverlay:Je,toolbarKey:oe.length?`${h.id}:${oe.join(",")}`:null,inspectedStyles:bn,selectedElementType:ne,selectionCommandAvailability:le,groupScopeOverlayPassive:ye,isEditingText:pe,manipulationOverlay:xn,iframeRef:M,stageViewportRef:R,selectionOverlayRef:j,selectionContextMenuTriggerRef:B,isManipulating:Tt,isToolbarSuppressed:z,onSelectionOverlayMouseDown:J=>{if(J.button!==0||!oe.length)return;W(!0);const ce=J.shiftKey||J.metaKey||J.ctrlKey,me=H(J.clientX,J.clientY);if(ee.current={clientX:J.clientX,clientY:J.clientY,additive:ce,targetElementId:me},me&&me!==Q){J.stopPropagation();return}me&&me===Q&&J.stopPropagation(),St({clientX:J.clientX,clientY:J.clientY,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation()})},onSelectionOverlayMouseMove:J=>{const ce=ee.current;if(H(J.clientX,J.clientY),!ce||ce.targetElementId===Q)return;const me=J.clientX-ce.clientX,xe=J.clientY-ce.clientY;Math.hypot(me,xe)<=4||(ee.current=null,St({clientX:ce.clientX,clientY:ce.clientY,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation()}))},onSelectionOverlayContextMenu:J=>{J.preventDefault(),J.stopPropagation(),fe(J.clientX,J.clientY)},onSelectionOverlayMouseUp:J=>{const ce=ee.current;if(ee.current=null,W(!1),!ce)return;const me=J.clientX-ce.clientX,xe=J.clientY-ce.clientY;Math.hypot(me,xe)>4||P(J.clientX,J.clientY,ce.additive)},onStageMouseLeave:U,onResizeHandleMouseDown:(J,ce)=>{oe.length&&qa(J,{clientX:ce.clientX,clientY:ce.clientY,preventDefault:()=>ce.preventDefault(),stopPropagation:()=>ce.stopPropagation()})},onRotateHandleMouseDown:J=>{oe.length===1&&Oe({clientX:J.clientX,clientY:J.clientY,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation()})},onSelectionOverlayDoubleClick:J=>{var ce;if(T&&((ce=M.current)!=null&&ce.contentDocument)){const me=M.current.getBoundingClientRect(),xe=M.current.contentDocument,Ue=me.width/M.current.clientWidth||1,ze=me.height/M.current.clientHeight||1,qe={x:(J.clientX-me.left)/Ue,y:(J.clientY-me.top)/ze},Qe=uj(xe,T,qe),lt=Qe==null?void 0:Qe.getAttribute(ve);if(lt){L(lt);return}}if(oe.length===1&&(X==null?void 0:X.type)==="text"&&Q){L(Q);return}oe.length===1&&(X==null?void 0:X.type)==="group"&&Q&&D(Q)},onBackgroundClick:()=>{nn||_()},onStageWheel:ra,onStyleChange:It,onAttributeChange:va,onAlignToSlide:Zt,onDistribute:Wt,onGroup:la,onLayerOrder:ln,onUngroup:Qt,onDuplicate:Ht,onDelete:ut,attributeValues:an})})]})]}),$?p.jsx(eO,{slides:m,startSlideId:h.id,onExit:()=>V(!1)}):null]})}):p.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function cj(n,o){if(typeof DOMParser>"u")return!1;const r=new DOMParser().parseFromString(n,"text/html"),i=Ke(r,o);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(s=>s instanceof HTMLElement&&(s.hasAttribute("data-editable")||nh(s)))}function wv(n,o){const r=new Map;if(!o)return r;const i=Ke(n,o);if(!i||i.getAttribute("data-group")==="true")return r;const s=new Set(Array.from(n.querySelectorAll(`[${ve}]`)).map(d=>d.getAttribute(ve)).filter(d=>!!d)),u=d=>{if(!s.has(d))return s.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;s.has(`${h}-${g}`);)g+=1;const x=`${h}-${g}`;return s.add(x),x};for(const d of Array.from(i.children))nh(d)&&r.set(d,d.getAttribute(ve)||u("block-1"));return r}function nh(n){const o=n.tagName.toLowerCase();return o!=="ul"&&o!=="ol"?!1:Array.from(n.children).some(r=>r.tagName.toLowerCase()==="li"&&r.hasAttribute("data-editable"))}function uj(n,o,r){const i=Ke(n,o);if(!i)return null;const s=n.elementFromPoint(r.x,r.y),u=s==null?void 0:s.closest(`[data-editable="text"][${ve}]`);if(u&&i.contains(u))return u;const d=Array.from(i.querySelectorAll(`[data-editable="text"][${ve}]`)),m=d.find(g=>{const x=g.getBoundingClientRect();return r.x>=x.left&&r.x<=x.right&&r.y>=x.top&&r.y<=x.bottom});if(m)return m;const h=d.map(g=>{const x=g.getBoundingClientRect(),y=Math.min(Math.max(r.x,x.left),x.right),S=Math.min(Math.max(r.y,x.top),x.bottom);return{candidate:g,distance:Math.hypot(r.x-y,r.y-S)}}).sort((g,x)=>g.distance-x.distance)[0];return h&&h.distance<=24?h.candidate:null}const fj="/deck/manifest.json",dj="/__editor/save-generated-deck",mj="/__editor/export-pdf",hj="/__editor/export-html",Hd=800;function pj(){const[n,o]=v.useState("Generated deck"),[r,i]=v.useState([]),[s,u]=v.useState(null),[d,m]=v.useState(!0),[h,g]=v.useState(!1),x=v.useRef(null),y=v.useRef([]),S=v.useRef(null),A=v.useRef(null),C=v.useRef(null),E=v.useRef(0),M=v.useRef(!1),R=v.useRef(null),j=v.useRef(Date.now());v.useEffect(()=>{let z=!1;return kE({manifestUrl:`${fj}?v=${Date.now()}`}).then(W=>{if(z)return;if(!W){o("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),m(!1);return}x.current=W.manifest;const ie=W.manifest.topic||"Generated deck";A.current=ie,o(ie),i(W.slides),y.current=W.slides,u(null),m(!1)}).catch(()=>{z||(o("Generated deck"),i([]),u("The app could not load the generated deck."),m(!1))}),()=>{z=!0,C.current&&window.clearTimeout(C.current)}},[]);const B=async()=>{var pe;const z=x.current,W=S.current??y.current,ie=A.current??n,fe=E.current;if(!((pe=z==null?void 0:z.slides)!=null&&pe.length)||!(W!=null&&W.length))return;if(M.current){await R.current,E.current!==fe&&await B();return}M.current=!0;const Q=new Map(y.current.map((T,O)=>{var N,L;return[T.id,T.sourceFile??((L=(N=z.slides)==null?void 0:N[O])==null?void 0:L.file)]})),oe=W.flatMap(T=>{const O=T.sourceFile??Q.get(T.id);return O?[{file:O,title:T.title,hidden:T.hidden===!0?!0:void 0}]:[]}),de=fetch(dj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:j.current,manifest:{...z,topic:ie,slides:oe},slides:W.map(T=>({file:T.sourceFile??Q.get(T.id),htmlSource:T.htmlSource,title:T.title,hidden:T.hidden===!0}))})}).then(T=>{if(!T.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(T=>{throw u("The app could not write generated slides back to disk."),T}).finally(()=>{if(M.current=!1,R.current=null,E.current!==fe){C.current||(C.current=window.setTimeout(()=>{C.current=null,B()},Hd));return}g(!1)});R.current=de,await de};return{deckTitle:n,slides:r,errorMessage:s,isLoading:d,isSaving:h,saveSlides:z=>{var ie;if(y.current===z)return;const W=x.current;(ie=W==null?void 0:W.slides)!=null&&ie.length&&(y.current=z,S.current=z,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,B()},Hd))},saveDeckTitle:z=>{const W=z.trim()||"Untitled deck";o(z),A.current=W,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,B()},Hd)},exportPdf:async z=>{C.current&&(window.clearTimeout(C.current),C.current=null),await B();const W=await fetch(mj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:z})});if(!W.ok)throw new Error(await W.text());const ie=await W.blob(),fe=URL.createObjectURL(ie),Q=document.createElement("a"),oe=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";Q.href=fe,Q.download=`${oe}.pdf`,document.body.appendChild(Q),Q.click(),Q.remove(),URL.revokeObjectURL(fe)},exportHtml:async()=>{C.current&&(window.clearTimeout(C.current),C.current=null),await B();const z=await fetch(hj,{method:"POST"});if(!z.ok)throw new Error(await z.text());const W=await z.blob(),ie=URL.createObjectURL(W),fe=document.createElement("a"),Q=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";fe.href=ie,fe.download=`${Q}.html`,document.body.appendChild(fe),fe.click(),fe.remove(),URL.revokeObjectURL(ie)}}}function Ev({title:n,body:o}){return p.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:p.jsxs("section",{style:{maxWidth:"720px",padding:"32px",borderRadius:"24px",background:"rgba(255, 255, 255, 0.82)",boxShadow:"0 24px 80px rgba(74, 53, 31, 0.12)"},children:[p.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),p.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:o})]})})}function gj(){const{deckTitle:n,slides:o,errorMessage:r,isLoading:i,isSaving:s,saveSlides:u,saveDeckTitle:d,exportPdf:m,exportHtml:h}=pj();return i?p.jsx(Ev,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):r?p.jsx(Ev,{title:"Generated deck required",body:r}):p.jsxs(p.Fragment,{children:[p.jsx(hE,{position:"top-center",richColors:!0,closeButton:!0}),p.jsx(sj,{slides:o,deckTitle:n,isSaving:s,onSlidesChange:u,onDeckTitleChange:d,onExportPdf:g=>{const x=Eo.loading("Exporting PDF...");m(g).then(()=>{Eo.success("PDF export is ready.",{id:x})}).catch(y=>{Eo.error("PDF export failed.",{id:x,description:y instanceof Error?y.message:String(y)})})},onExportHtml:()=>{const g=Eo.loading("Exporting HTML...");h().then(()=>{Eo.success("HTML export is ready.",{id:g})}).catch(x=>{Eo.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const SS=document.getElementById("root");if(!SS)throw new Error("Root element #root was not found.");P2.createRoot(SS).render(p.jsx(he.StrictMode,{children:p.jsx(gj,{})}));
|