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,324 @@
|
|
|
1
|
+
function hw(n,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in n)){const u=Object.getOwnPropertyDescriptor(i,c);u&&Object.defineProperty(n,c,u.get?u:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const u of c)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 o(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(c){if(c.ep)return;c.ep=!0;const u=o(c);fetch(c.href,u)}})();function Cd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yf={exports:{}},Ao={};/**
|
|
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 oy;function mw(){if(oy)return Ao;oy=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(i,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var h in c)h!=="key"&&(u[h]=c[h])}else u=c;return c=u.ref,{$$typeof:n,type:i,key:d,ref:c!==void 0?c:null,props:u}}return Ao.Fragment=r,Ao.jsx=o,Ao.jsxs=o,Ao}var iy;function pw(){return iy||(iy=1,yf.exports=mw()),yf.exports}var x=pw(),vf={exports:{}},Ae={};/**
|
|
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 cy;function gw(){if(cy)return Ae;cy=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function E(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function N(M,B,ne){this.props=M,this.context=B,this.refs=A,this.updater=ne||T}N.prototype.isReactComponent={},N.prototype.setState=function(M,B){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,B,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function z(){}z.prototype=N.prototype;function k(M,B,ne){this.props=M,this.context=B,this.refs=A,this.updater=ne||T}var q=k.prototype=new z;q.constructor=k,C(q,N.prototype),q.isPureReactComponent=!0;var Z=Array.isArray;function D(){}var _={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function H(M,B,ne){var oe=ne.ref;return{$$typeof:n,type:M,key:B,ref:oe!==void 0?oe:null,props:ne}}function I(M,B){return H(M.type,B,M.props)}function J(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function le(M){var B={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ne){return B[ne]})}var re=/\/+/g;function te(M,B){return typeof M=="object"&&M!==null&&M.key!=null?le(""+M.key):B.toString(36)}function ae(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(D,D):(M.status="pending",M.then(function(B){M.status==="pending"&&(M.status="fulfilled",M.value=B)},function(B){M.status==="pending"&&(M.status="rejected",M.reason=B)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function O(M,B,ne,oe,ce){var ue=typeof M;(ue==="undefined"||ue==="boolean")&&(M=null);var ie=!1;if(M===null)ie=!0;else switch(ue){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(M.$$typeof){case n:case r:ie=!0;break;case v:return ie=M._init,O(ie(M._payload),B,ne,oe,ce)}}if(ie)return ce=ce(M),ie=oe===""?"."+te(M,0):oe,Z(ce)?(ne="",ie!=null&&(ne=ie.replace(re,"$&/")+"/"),O(ce,B,ne,"",function(Me){return Me})):ce!=null&&(J(ce)&&(ce=I(ce,ne+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(re,"$&/")+"/")+ie)),B.push(ce)),1;ie=0;var xe=oe===""?".":oe+":";if(Z(M))for(var fe=0;fe<M.length;fe++)oe=M[fe],ue=xe+te(oe,fe),ie+=O(oe,B,ne,ue,ce);else if(fe=E(M),typeof fe=="function")for(M=fe.call(M),fe=0;!(oe=M.next()).done;)oe=oe.value,ue=xe+te(oe,fe++),ie+=O(oe,B,ne,ue,ce);else if(ue==="object"){if(typeof M.then=="function")return O(ae(M),B,ne,oe,ce);throw B=String(M),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ie}function X(M,B,ne){if(M==null)return M;var oe=[],ce=0;return O(M,oe,"","",function(ue){return B.call(ne,ue,ce++)}),oe}function G(M){if(M._status===-1){var B=M._result;B=B(),B.then(function(ne){(M._status===0||M._status===-1)&&(M._status=1,M._result=ne)},function(ne){(M._status===0||M._status===-1)&&(M._status=2,M._result=ne)}),M._status===-1&&(M._status=0,M._result=B)}if(M._status===1)return M._result.default;throw M._result}var $=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},K={map:X,forEach:function(M,B,ne){X(M,function(){B.apply(this,arguments)},ne)},count:function(M){var B=0;return X(M,function(){B++}),B},toArray:function(M){return X(M,function(B){return B})||[]},only:function(M){if(!J(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ae.Activity=b,Ae.Children=K,Ae.Component=N,Ae.Fragment=o,Ae.Profiler=c,Ae.PureComponent=k,Ae.StrictMode=i,Ae.Suspense=m,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(M){return _.H.useMemoCache(M)}},Ae.cache=function(M){return function(){return M.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(M,B,ne){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var oe=C({},M.props),ce=M.key;if(B!=null)for(ue in B.key!==void 0&&(ce=""+B.key),B)!j.call(B,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&B.ref===void 0||(oe[ue]=B[ue]);var ue=arguments.length-2;if(ue===1)oe.children=ne;else if(1<ue){for(var ie=Array(ue),xe=0;xe<ue;xe++)ie[xe]=arguments[xe+2];oe.children=ie}return H(M.type,ce,oe)},Ae.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:u,_context:M},M},Ae.createElement=function(M,B,ne){var oe,ce={},ue=null;if(B!=null)for(oe in B.key!==void 0&&(ue=""+B.key),B)j.call(B,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ce[oe]=B[oe]);var ie=arguments.length-2;if(ie===1)ce.children=ne;else if(1<ie){for(var xe=Array(ie),fe=0;fe<ie;fe++)xe[fe]=arguments[fe+2];ce.children=xe}if(M&&M.defaultProps)for(oe in ie=M.defaultProps,ie)ce[oe]===void 0&&(ce[oe]=ie[oe]);return H(M,ue,ce)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(M){return{$$typeof:h,render:M}},Ae.isValidElement=J,Ae.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:G}},Ae.memo=function(M,B){return{$$typeof:p,type:M,compare:B===void 0?null:B}},Ae.startTransition=function(M){var B=_.T,ne={};_.T=ne;try{var oe=M(),ce=_.S;ce!==null&&ce(ne,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(D,$)}catch(ue){$(ue)}finally{B!==null&&ne.types!==null&&(B.types=ne.types),_.T=B}},Ae.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Ae.use=function(M){return _.H.use(M)},Ae.useActionState=function(M,B,ne){return _.H.useActionState(M,B,ne)},Ae.useCallback=function(M,B){return _.H.useCallback(M,B)},Ae.useContext=function(M){return _.H.useContext(M)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(M,B){return _.H.useDeferredValue(M,B)},Ae.useEffect=function(M,B){return _.H.useEffect(M,B)},Ae.useEffectEvent=function(M){return _.H.useEffectEvent(M)},Ae.useId=function(){return _.H.useId()},Ae.useImperativeHandle=function(M,B,ne){return _.H.useImperativeHandle(M,B,ne)},Ae.useInsertionEffect=function(M,B){return _.H.useInsertionEffect(M,B)},Ae.useLayoutEffect=function(M,B){return _.H.useLayoutEffect(M,B)},Ae.useMemo=function(M,B){return _.H.useMemo(M,B)},Ae.useOptimistic=function(M,B){return _.H.useOptimistic(M,B)},Ae.useReducer=function(M,B,ne){return _.H.useReducer(M,B,ne)},Ae.useRef=function(M){return _.H.useRef(M)},Ae.useState=function(M){return _.H.useState(M)},Ae.useSyncExternalStore=function(M,B,ne){return _.H.useSyncExternalStore(M,B,ne)},Ae.useTransition=function(){return _.H.useTransition()},Ae.version="19.2.5",Ae}var sy;function Td(){return sy||(sy=1,vf.exports=gw()),vf.exports}var y=Td();const ol=Cd(y),jv=hw({__proto__:null,default:ol},[y]);var bf={exports:{}},Mo={},xf={exports:{}},Sf={};/**
|
|
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 uy;function yw(){return uy||(uy=1,(function(n){function r(O,X){var G=O.length;O.push(X);e:for(;0<G;){var $=G-1>>>1,K=O[$];if(0<c(K,X))O[$]=X,O[G]=K,G=$;else break e}}function o(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var X=O[0],G=O.pop();if(G!==X){O[0]=G;e:for(var $=0,K=O.length,M=K>>>1;$<M;){var B=2*($+1)-1,ne=O[B],oe=B+1,ce=O[oe];if(0>c(ne,G))oe<K&&0>c(ce,ne)?(O[$]=ce,O[oe]=G,$=oe):(O[$]=ne,O[B]=G,$=B);else if(oe<K&&0>c(ce,G))O[$]=ce,O[oe]=G,$=oe;else break e}}return X}function c(O,X){var G=O.sortIndex-X.sortIndex;return G!==0?G:O.id-X.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,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],p=[],v=1,b=null,S=3,E=!1,T=!1,C=!1,A=!1,N=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function q(O){for(var X=o(p);X!==null;){if(X.callback===null)i(p);else if(X.startTime<=O)i(p),X.sortIndex=X.expirationTime,r(m,X);else break;X=o(p)}}function Z(O){if(C=!1,q(O),!T)if(o(m)!==null)T=!0,D||(D=!0,le());else{var X=o(p);X!==null&&ae(Z,X.startTime-O)}}var D=!1,_=-1,j=5,H=-1;function I(){return A?!0:!(n.unstable_now()-H<j)}function J(){if(A=!1,D){var O=n.unstable_now();H=O;var X=!0;try{e:{T=!1,C&&(C=!1,z(_),_=-1),E=!0;var G=S;try{t:{for(q(O),b=o(m);b!==null&&!(b.expirationTime>O&&I());){var $=b.callback;if(typeof $=="function"){b.callback=null,S=b.priorityLevel;var K=$(b.expirationTime<=O);if(O=n.unstable_now(),typeof K=="function"){b.callback=K,q(O),X=!0;break t}b===o(m)&&i(m),q(O)}else i(m);b=o(m)}if(b!==null)X=!0;else{var M=o(p);M!==null&&ae(Z,M.startTime-O),X=!1}}break e}finally{b=null,S=G,E=!1}X=void 0}}finally{X?le():D=!1}}}var le;if(typeof k=="function")le=function(){k(J)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,te=re.port2;re.port1.onmessage=J,le=function(){te.postMessage(null)}}else le=function(){N(J,0)};function ae(O,X){_=N(function(){O(n.unstable_now())},X)}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(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(O){switch(S){case 1:case 2:case 3:var X=3;break;default:X=S}var G=S;S=X;try{return O()}finally{S=G}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(O,X){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var G=S;S=O;try{return X()}finally{S=G}},n.unstable_scheduleCallback=function(O,X,G){var $=n.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?$+G:$):G=$,O){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=G+K,O={id:v++,callback:X,priorityLevel:O,startTime:G,expirationTime:K,sortIndex:-1},G>$?(O.sortIndex=G,r(p,O),o(m)===null&&O===o(p)&&(C?(z(_),_=-1):C=!0,ae(Z,G-$))):(O.sortIndex=K,r(m,O),T||E||(T=!0,D||(D=!0,le()))),O},n.unstable_shouldYield=I,n.unstable_wrapCallback=function(O){var X=S;return function(){var G=S;S=X;try{return O.apply(this,arguments)}finally{S=G}}}})(Sf)),Sf}var fy;function vw(){return fy||(fy=1,xf.exports=yw()),xf.exports}var wf={exports:{}},Ot={};/**
|
|
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 dy;function bw(){if(dy)return Ot;dy=1;var n=Td();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(m,p,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:m,containerInfo:p,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ot.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return u(m,p,null,v)},Ot.flushSync=function(m){var p=d.T,v=i.p;try{if(d.T=null,i.p=2,m)return m()}finally{d.T=p,i.p=v,i.d.f()}},Ot.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(m,p))},Ot.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},Ot.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,b=h(v,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?i.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:E}):v==="script"&&i.d.X(m,{crossOrigin:b,integrity:S,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ot.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);i.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(m)},Ot.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,b=h(v,p.crossOrigin);i.d.L(m,v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ot.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);i.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(m)},Ot.requestFormReset=function(m){i.d.r(m)},Ot.unstable_batchedUpdates=function(m,p){return m(p)},Ot.useFormState=function(m,p,v){return d.H.useFormState(m,p,v)},Ot.useFormStatus=function(){return d.H.useHostTransitionStatus()},Ot.version="19.2.5",Ot}var hy;function Lv(){if(hy)return wf.exports;hy=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(r){console.error(r)}}return n(),wf.exports=bw(),wf.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 my;function xw(){if(my)return Mo;my=1;var n=vw(),r=Td(),o=Lv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l: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 h(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 m(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var f=s.alternate;if(f===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===f.child){for(f=s.child;f;){if(f===l)return m(s),e;if(f===a)return m(s),t;f=f.sibling}throw Error(i(188))}if(l.return!==a.return)l=s,a=f;else{for(var g=!1,w=s.child;w;){if(w===l){g=!0,l=s,a=f;break}if(w===a){g=!0,a=s,l=f;break}w=w.sibling}if(!g){for(w=f.child;w;){if(w===l){g=!0,l=f,a=s;break}if(w===a){g=!0,a=f,l=s;break}w=w.sibling}if(!g)throw Error(i(189))}}if(l.alternate!==a)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),k=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case N:return"Profiler";case A:return"StrictMode";case Z:return"Suspense";case D:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case k:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var ae=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},$=[],K=-1;function M(e){return{current:e}}function B(e){0>K||(e.current=$[K],$[K]=null,K--)}function ne(e,t){K++,$[K]=e.current,e.current=t}var oe=M(null),ce=M(null),ue=M(null),ie=M(null);function xe(e,t){switch(ne(ue,t),ne(ce,e),ne(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=Ng(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(oe),ne(oe,e)}function fe(){B(oe),B(ce),B(ue)}function Me(e){e.memoizedState!==null&&ne(ie,e);var t=oe.current,l=Ng(t,e.type);t!==l&&(ne(ce,e),ne(oe,l))}function we(e){ce.current===e&&(B(oe),B(ce)),ie.current===e&&(B(ie),wo._currentValue=G)}var Ee,nt;function Pe(e){if(Ee===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||"",nt=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ee+e+nt}var kt=!1;function Ht(e,t){if(!e||kt)return"";kt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(Q){var P=Q}Reflect.construct(e,[],ee)}else{try{ee.call()}catch(Q){P=Q}e.call(ee.prototype)}}else{try{throw Error()}catch(Q){P=Q}(ee=e())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(Q){if(Q&&P&&typeof Q.stack=="string")return[Q.stack,P.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=a.DetermineComponentFrameRoot(),g=f[0],w=f[1];if(g&&w){var R=g.split(`
|
|
44
|
+
`),V=w.split(`
|
|
45
|
+
`);for(s=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;s<V.length&&!V[s].includes("DetermineComponentFrameRoot");)s++;if(a===R.length||s===V.length)for(a=R.length-1,s=V.length-1;1<=a&&0<=s&&R[a]!==V[s];)s--;for(;1<=a&&0<=s;a--,s--)if(R[a]!==V[s]){if(a!==1||s!==1)do if(a--,s--,0>s||R[a]!==V[s]){var F=`
|
|
46
|
+
`+R[a].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=a&&0<=s);break}}}finally{kt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Pe(l):""}function jt(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe("Lazy");case 13:return e.child!==t&&t!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Ht(e.type,!1);case 11:return Ht(e.type.render,!1);case 1:return Ht(e.type,!0);case 31:return Pe("Activity");default:return""}}function Ne(e){try{var t="",l=null;do t+=jt(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var be=Object.prototype.hasOwnProperty,yn=n.unstable_scheduleCallback,vn=n.unstable_cancelCallback,bn=n.unstable_shouldYield,za=n.unstable_requestPaint,Ct=n.unstable_now,Un=n.unstable_getCurrentPriorityLevel,se=n.unstable_ImmediatePriority,Ce=n.unstable_UserBlockingPriority,ye=n.unstable_NormalPriority,Be=n.unstable_LowPriority,$e=n.unstable_IdlePriority,Ue=n.log,it=n.unstable_setDisableYieldValue,lt=null,Fe=null;function ht(e){if(typeof Ue=="function"&&it(e),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(lt,e)}catch{}}var rt=Math.clz32?Math.clz32:Da,Mn=Math.log,fl=Math.LN2;function Da(e){return e>>>=0,e===0?32:31-(Mn(e)/fl|0)|0}var Bn=256,St=262144,ln=4194304;function Ut(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 Mr(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var w=a&134217727;return w!==0?(a=w&~f,a!==0?s=Ut(a):(g&=w,g!==0?s=Ut(g):l||(l=w&~e,l!==0&&(s=Ut(l))))):(w=a&~f,w!==0?s=Ut(w):g!==0?s=Ut(g):l||(l=a&~e,l!==0&&(s=Ut(l)))),s===0?0:t!==0&&t!==s&&(t&f)===0&&(f=s&-s,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:s}function Gn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _r(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 Rr(){var e=ln;return ln<<=1,(ln&62914560)===0&&(ln=4194304),e}function ja(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function La(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tS(e,t,l,a,s,f){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var w=e.entanglements,R=e.expirationTimes,V=e.hiddenUpdates;for(l=g&~l;0<l;){var F=31-rt(l),ee=1<<F;w[F]=0,R[F]=-1;var P=V[F];if(P!==null)for(V[F]=null,F=0;F<P.length;F++){var Q=P[F];Q!==null&&(Q.lane&=-536870913)}l&=~ee}a!==0&&fh(e,a,0),f!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function fh(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function dh(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-rt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function hh(e,t){var l=t&-t;return l=(l&42)!==0?1:as(l),(l&(e.suspendedLanes|t))!==0?0:l}function as(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 os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mh(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Wg(e.type))}function ph(e,t){var l=X.p;try{return X.p=e,t()}finally{X.p=l}}var dl=Math.random().toString(36).slice(2),Tt="__reactFiber$"+dl,Bt="__reactProps$"+dl,Nr="__reactContainer$"+dl,is="__reactEvents$"+dl,nS="__reactListeners$"+dl,lS="__reactHandles$"+dl,gh="__reactResources$"+dl,ka="__reactMarker$"+dl;function cs(e){delete e[Tt],delete e[Bt],delete e[is],delete e[nS],delete e[lS]}function Or(e){var t=e[Tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Nr]||l[Tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Hg(e);e!==null;){if(l=e[Tt])return l;e=Hg(e)}return t}e=l,l=e.parentNode}return null}function zr(e){if(e=e[Tt]||e[Nr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ha(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Dr(e){var t=e[gh];return t||(t=e[gh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function wt(e){e[ka]=!0}var yh=new Set,vh={};function Jl(e,t){jr(e,t),jr(e+"Capture",t)}function jr(e,t){for(vh[e]=t,e=0;e<t.length;e++)yh.add(t[e])}var rS=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]*$"),bh={},xh={};function aS(e){return be.call(xh,e)?!0:be.call(bh,e)?!1:rS.test(e)?xh[e]=!0:(bh[e]=!0,!1)}function Xo(e,t,l){if(aS(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Io(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Yn(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function rn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oS(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(g){l=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ss(e){if(!e._valueTracker){var t=Sh(e)?"checked":"value";e._valueTracker=oS(e,t,""+e[t])}}function wh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Sh(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Po(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 iS=/[\n"\\]/g;function an(e){return e.replace(iS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function us(e,t,l,a,s,f,g,w){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+rn(t)):e.value!==""+rn(t)&&(e.value=""+rn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?fs(e,g,rn(t)):l!=null?fs(e,g,rn(l)):a!=null&&e.removeAttribute("value"),s==null&&f!=null&&(e.defaultChecked=!!f),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+rn(w):e.removeAttribute("name")}function Eh(e,t,l,a,s,f,g,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){ss(e);return}l=l!=null?""+rn(l):"",t=t!=null?""+rn(t):l,w||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=w?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ss(e)}function fs(e,t,l){t==="number"&&Po(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Lr(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+rn(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ch(e,t,l){if(t!=null&&(t=""+rn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+rn(l):""}function Th(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(i(92));if(ae(a)){if(1<a.length)throw Error(i(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=rn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ss(e)}function kr(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var cS=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 Ah(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||cS.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Mh(e,t,l){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&Ah(e,s,a)}else for(var f in t)t.hasOwnProperty(f)&&Ah(e,f,t[f])}function ds(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 sS=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"]]),uS=/^[\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 $o(e){return uS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var hs=null;function ms(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hr=null,Ur=null;function _h(e){var t=zr(e);if(t&&(e=t.stateNode)){var l=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(us(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+an(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[Bt]||null;if(!s)throw Error(i(90));us(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&wh(a)}break e;case"textarea":Ch(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Lr(e,!!l.multiple,t,!1)}}}var ps=!1;function Rh(e,t,l){if(ps)return e(t,l);ps=!0;try{var a=e(t);return a}finally{if(ps=!1,(Hr!==null||Ur!==null)&&(ji(),Hr&&(t=Hr,e=Ur,Ur=Hr=null,_h(t),e)))for(t=0;t<e.length;t++)_h(e[t])}}function Ua(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Bt]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(i(231,t,typeof l));return l}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gs=!1;if(qn)try{var Ba={};Object.defineProperty(Ba,"passive",{get:function(){gs=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch{gs=!1}var hl=null,ys=null,Ko=null;function Nh(){if(Ko)return Ko;var e,t=ys,l=t.length,a,s="value"in hl?hl.value:hl.textContent,f=s.length;for(e=0;e<l&&t[e]===s[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===s[f-a];a++);return Ko=s.slice(e,1<a?1-a:void 0)}function Qo(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 Zo(){return!0}function Oh(){return!1}function Gt(e){function t(l,a,s,f,g){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(l=e[w],this[w]=l?l(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Zo:Oh,this.isPropagationStopped=Oh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Zo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Zo)},persist:function(){},isPersistent:Zo}),t}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fo=Gt(Wl),Ga=b({},Wl,{view:0,detail:0}),fS=Gt(Ga),vs,bs,Ya,Jo=b({},Ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ss,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!==Ya&&(Ya&&e.type==="mousemove"?(vs=e.screenX-Ya.screenX,bs=e.screenY-Ya.screenY):bs=vs=0,Ya=e),vs)},movementY:function(e){return"movementY"in e?e.movementY:bs}}),zh=Gt(Jo),dS=b({},Jo,{dataTransfer:0}),hS=Gt(dS),mS=b({},Ga,{relatedTarget:0}),xs=Gt(mS),pS=b({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),gS=Gt(pS),yS=b({},Wl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vS=Gt(yS),bS=b({},Wl,{data:0}),Dh=Gt(bS),xS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SS={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"},wS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ES(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wS[e])?!!t[e]:!1}function Ss(){return ES}var CS=b({},Ga,{key:function(e){if(e.key){var t=xS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ss,charCode:function(e){return e.type==="keypress"?Qo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TS=Gt(CS),AS=b({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jh=Gt(AS),MS=b({},Ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ss}),_S=Gt(MS),RS=b({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),NS=Gt(RS),OS=b({},Jo,{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}),zS=Gt(OS),DS=b({},Wl,{newState:0,oldState:0}),jS=Gt(DS),LS=[9,13,27,32],ws=qn&&"CompositionEvent"in window,Va=null;qn&&"documentMode"in document&&(Va=document.documentMode);var kS=qn&&"TextEvent"in window&&!Va,Lh=qn&&(!ws||Va&&8<Va&&11>=Va),kh=" ",Hh=!1;function Uh(e,t){switch(e){case"keyup":return LS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Br=!1;function HS(e,t){switch(e){case"compositionend":return Bh(t);case"keypress":return t.which!==32?null:(Hh=!0,kh);case"textInput":return e=t.data,e===kh&&Hh?null:e;default:return null}}function US(e,t){if(Br)return e==="compositionend"||!ws&&Uh(e,t)?(e=Nh(),Ko=ys=hl=null,Br=!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 Lh&&t.locale!=="ko"?null:t.data;default:return null}}var BS={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BS[e.type]:t==="textarea"}function Yh(e,t,l,a){Hr?Ur?Ur.push(a):Ur=[a]:Hr=a,t=Yi(t,"onChange"),0<t.length&&(l=new Fo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var qa=null,Xa=null;function GS(e){Eg(e,0)}function Wo(e){var t=Ha(e);if(wh(t))return e}function Vh(e,t){if(e==="change")return t}var qh=!1;if(qn){var Es;if(qn){var Cs="oninput"in document;if(!Cs){var Xh=document.createElement("div");Xh.setAttribute("oninput","return;"),Cs=typeof Xh.oninput=="function"}Es=Cs}else Es=!1;qh=Es&&(!document.documentMode||9<document.documentMode)}function Ih(){qa&&(qa.detachEvent("onpropertychange",Ph),Xa=qa=null)}function Ph(e){if(e.propertyName==="value"&&Wo(Xa)){var t=[];Yh(t,Xa,e,ms(e)),Rh(GS,t)}}function YS(e,t,l){e==="focusin"?(Ih(),qa=t,Xa=l,qa.attachEvent("onpropertychange",Ph)):e==="focusout"&&Ih()}function VS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wo(Xa)}function qS(e,t){if(e==="click")return Wo(t)}function XS(e,t){if(e==="input"||e==="change")return Wo(t)}function IS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:IS;function Ia(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!be.call(t,s)||!$t(e[s],t[s]))return!1}return!0}function $h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var l=$h(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=$h(l)}}function Qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qh(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=Po(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Po(e.document)}return t}function Ts(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 PS=qn&&"documentMode"in document&&11>=document.documentMode,Gr=null,As=null,Pa=null,Ms=!1;function Fh(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ms||Gr==null||Gr!==Po(a)||(a=Gr,"selectionStart"in a&&Ts(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pa&&Ia(Pa,a)||(Pa=a,a=Yi(As,"onSelect"),0<a.length&&(t=new Fo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Gr)))}function er(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Yr={animationend:er("Animation","AnimationEnd"),animationiteration:er("Animation","AnimationIteration"),animationstart:er("Animation","AnimationStart"),transitionrun:er("Transition","TransitionRun"),transitionstart:er("Transition","TransitionStart"),transitioncancel:er("Transition","TransitionCancel"),transitionend:er("Transition","TransitionEnd")},_s={},Jh={};qn&&(Jh=document.createElement("div").style,"AnimationEvent"in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),"TransitionEvent"in window||delete Yr.transitionend.transition);function tr(e){if(_s[e])return _s[e];if(!Yr[e])return e;var t=Yr[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Jh)return _s[e]=t[l];return e}var Wh=tr("animationend"),em=tr("animationiteration"),tm=tr("animationstart"),$S=tr("transitionrun"),KS=tr("transitionstart"),QS=tr("transitioncancel"),nm=tr("transitionend"),lm=new Map,Rs="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(" ");Rs.push("scrollEnd");function xn(e,t){lm.set(e,t),Jl(t,[e])}var ei=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)},on=[],Vr=0,Ns=0;function ti(){for(var e=Vr,t=Ns=Vr=0;t<e;){var l=on[t];on[t++]=null;var a=on[t];on[t++]=null;var s=on[t];on[t++]=null;var f=on[t];if(on[t++]=null,a!==null&&s!==null){var g=a.pending;g===null?s.next=s:(s.next=g.next,g.next=s),a.pending=s}f!==0&&rm(l,s,f)}}function ni(e,t,l,a){on[Vr++]=e,on[Vr++]=t,on[Vr++]=l,on[Vr++]=a,Ns|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Os(e,t,l,a){return ni(e,t,l,a),li(e)}function nr(e,t){return ni(e,null,null,t),li(e)}function rm(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,f=e.return;f!==null;)f.childLanes|=l,a=f.alternate,a!==null&&(a.childLanes|=l),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(s=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,s&&t!==null&&(s=31-rt(l),e=f.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),f):null}function li(e){if(50<po)throw po=0,Gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qr={};function ZS(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,t,l,a){return new ZS(e,t,l,a)}function zs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var l=e.alternate;return l===null?(l=Kt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function am(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ri(e,t,l,a,s,f){var g=0;if(a=e,typeof e=="function")zs(e)&&(g=1);else if(typeof e=="string")g=tw(e,l,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case H:return e=Kt(31,l,t,s),e.elementType=H,e.lanes=f,e;case C:return lr(l.children,s,f,t);case A:g=8,s|=24;break;case N:return e=Kt(12,l,t,s|2),e.elementType=N,e.lanes=f,e;case Z:return e=Kt(13,l,t,s),e.elementType=Z,e.lanes=f,e;case D:return e=Kt(19,l,t,s),e.elementType=D,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:g=10;break e;case z:g=9;break e;case q:g=11;break e;case _:g=14;break e;case j:g=16,a=null;break e}g=29,l=Error(i(130,e===null?"null":typeof e,"")),a=null}return t=Kt(g,l,t,s),t.elementType=e,t.type=a,t.lanes=f,t}function lr(e,t,l,a){return e=Kt(7,e,a,t),e.lanes=l,e}function Ds(e,t,l){return e=Kt(6,e,null,t),e.lanes=l,e}function om(e){var t=Kt(18,null,null,0);return t.stateNode=e,t}function js(e,t,l){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var im=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var l=im.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ne(t)},im.set(e,t),t)}return{value:e,source:t,stack:Ne(t)}}var Xr=[],Ir=0,ai=null,$a=0,sn=[],un=0,ml=null,_n=1,Rn="";function In(e,t){Xr[Ir++]=$a,Xr[Ir++]=ai,ai=e,$a=t}function cm(e,t,l){sn[un++]=_n,sn[un++]=Rn,sn[un++]=ml,ml=e;var a=_n;e=Rn;var s=32-rt(a)-1;a&=~(1<<s),l+=1;var f=32-rt(t)+s;if(30<f){var g=s-s%5;f=(a&(1<<g)-1).toString(32),a>>=g,s-=g,_n=1<<32-rt(t)+s|l<<s|a,Rn=f+e}else _n=1<<f|l<<s|a,Rn=e}function Ls(e){e.return!==null&&(In(e,1),cm(e,1,0))}function ks(e){for(;e===ai;)ai=Xr[--Ir],Xr[Ir]=null,$a=Xr[--Ir],Xr[Ir]=null;for(;e===ml;)ml=sn[--un],sn[un]=null,Rn=sn[--un],sn[un]=null,_n=sn[--un],sn[un]=null}function sm(e,t){sn[un++]=_n,sn[un++]=Rn,sn[un++]=ml,_n=t.id,Rn=t.overflow,ml=e}var At=null,at=null,He=!1,pl=null,fn=!1,Hs=Error(i(519));function gl(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ka(cn(t,e)),Hs}function um(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Tt]=e,t[Bt]=a,l){case"dialog":De("cancel",t),De("close",t);break;case"iframe":case"object":case"embed":De("load",t);break;case"video":case"audio":for(l=0;l<yo.length;l++)De(yo[l],t);break;case"source":De("error",t);break;case"img":case"image":case"link":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"input":De("invalid",t),Eh(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":De("invalid",t);break;case"textarea":De("invalid",t),Th(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Mg(t.textContent,l)?(a.popover!=null&&(De("beforetoggle",t),De("toggle",t)),a.onScroll!=null&&De("scroll",t),a.onScrollEnd!=null&&De("scrollend",t),a.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||gl(e,!0)}function fm(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:At=At.return}}function Pr(e){if(e!==At)return!1;if(!He)return fm(e),He=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||tf(e.type,e.memoizedProps)),l=!l),l&&at&&gl(e),fm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));at=kg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));at=kg(e)}else t===27?(t=at,Nl(e.type)?(e=of,of=null,at=e):at=t):at=At?hn(e.stateNode.nextSibling):null;return!0}function rr(){at=At=null,He=!1}function Us(){var e=pl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),pl=null),e}function Ka(e){pl===null?pl=[e]:pl.push(e)}var Bs=M(null),ar=null,Pn=null;function yl(e,t,l){ne(Bs,t._currentValue),t._currentValue=l}function $n(e){e._currentValue=Bs.current,B(Bs)}function Gs(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Ys(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var f=s.dependencies;if(f!==null){var g=s.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=s;for(var R=0;R<t.length;R++)if(w.context===t[R]){f.lanes|=l,w=f.alternate,w!==null&&(w.lanes|=l),Gs(f.return,l,e),a||(g=null);break e}f=w.next}}else if(s.tag===18){if(g=s.return,g===null)throw Error(i(341));g.lanes|=l,f=g.alternate,f!==null&&(f.lanes|=l),Gs(g,l,e),g=null}else g=s.child;if(g!==null)g.return=s;else for(g=s;g!==null;){if(g===e){g=null;break}if(s=g.sibling,s!==null){s.return=g.return,g=s;break}g=g.return}s=g}}function $r(e,t,l,a){e=null;for(var s=t,f=!1;s!==null;){if(!f){if((s.flags&524288)!==0)f=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var g=s.alternate;if(g===null)throw Error(i(387));if(g=g.memoizedProps,g!==null){var w=s.type;$t(s.pendingProps.value,g.value)||(e!==null?e.push(w):e=[w])}}else if(s===ie.current){if(g=s.alternate,g===null)throw Error(i(387));g.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(wo):e=[wo])}s=s.return}e!==null&&Ys(t,e,l,a),t.flags|=262144}function oi(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function or(e){ar=e,Pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return dm(ar,e)}function ii(e,t){return ar===null&&or(e),dm(e,t)}function dm(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Pn===null){if(e===null)throw Error(i(308));Pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pn=Pn.next=t;return l}var FS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},JS=n.unstable_scheduleCallback,WS=n.unstable_NormalPriority,mt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vs(){return{controller:new FS,data:new Map,refCount:0}}function Qa(e){e.refCount--,e.refCount===0&&JS(WS,function(){e.controller.abort()})}var Za=null,qs=0,Kr=0,Qr=null;function e1(e,t){if(Za===null){var l=Za=[];qs=0,Kr=Pu(),Qr={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qs++,t.then(hm,hm),t}function hm(){if(--qs===0&&Za!==null){Qr!==null&&(Qr.status="fulfilled");var e=Za;Za=null,Kr=0,Qr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function t1(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var mm=O.S;O.S=function(e,t){Fp=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&e1(e,t),mm!==null&&mm(e,t)};var ir=M(null);function Xs(){var e=ir.current;return e!==null?e:tt.pooledCache}function ci(e,t){t===null?ne(ir,ir.current):ne(ir,t.pool)}function pm(){var e=Xs();return e===null?null:{parent:mt._currentValue,pool:e}}var Zr=Error(i(460)),Is=Error(i(474)),si=Error(i(542)),ui={then:function(){}};function gm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ym(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Vn,Vn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bm(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bm(e),e}throw sr=t,Zr}}function cr(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(sr=l,Zr):l}}var sr=null;function vm(){if(sr===null)throw Error(i(459));var e=sr;return sr=null,e}function bm(e){if(e===Zr||e===si)throw Error(i(483))}var Fr=null,Fa=0;function fi(e){var t=Fa;return Fa+=1,Fr===null&&(Fr=[]),ym(Fr,e,t)}function Ja(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function di(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 xm(e){function t(U,L){if(e){var Y=U.deletions;Y===null?(U.deletions=[L],U.flags|=16):Y.push(L)}}function l(U,L){if(!e)return null;for(;L!==null;)t(U,L),L=L.sibling;return null}function a(U){for(var L=new Map;U!==null;)U.key!==null?L.set(U.key,U):L.set(U.index,U),U=U.sibling;return L}function s(U,L){return U=Xn(U,L),U.index=0,U.sibling=null,U}function f(U,L,Y){return U.index=Y,e?(Y=U.alternate,Y!==null?(Y=Y.index,Y<L?(U.flags|=67108866,L):Y):(U.flags|=67108866,L)):(U.flags|=1048576,L)}function g(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function w(U,L,Y,W){return L===null||L.tag!==6?(L=Ds(Y,U.mode,W),L.return=U,L):(L=s(L,Y),L.return=U,L)}function R(U,L,Y,W){var ve=Y.type;return ve===C?F(U,L,Y.props.children,W,Y.key):L!==null&&(L.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&cr(ve)===L.type)?(L=s(L,Y.props),Ja(L,Y),L.return=U,L):(L=ri(Y.type,Y.key,Y.props,null,U.mode,W),Ja(L,Y),L.return=U,L)}function V(U,L,Y,W){return L===null||L.tag!==4||L.stateNode.containerInfo!==Y.containerInfo||L.stateNode.implementation!==Y.implementation?(L=js(Y,U.mode,W),L.return=U,L):(L=s(L,Y.children||[]),L.return=U,L)}function F(U,L,Y,W,ve){return L===null||L.tag!==7?(L=lr(Y,U.mode,W,ve),L.return=U,L):(L=s(L,Y),L.return=U,L)}function ee(U,L,Y){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Ds(""+L,U.mode,Y),L.return=U,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return Y=ri(L.type,L.key,L.props,null,U.mode,Y),Ja(Y,L),Y.return=U,Y;case T:return L=js(L,U.mode,Y),L.return=U,L;case j:return L=cr(L),ee(U,L,Y)}if(ae(L)||le(L))return L=lr(L,U.mode,Y,null),L.return=U,L;if(typeof L.then=="function")return ee(U,fi(L),Y);if(L.$$typeof===k)return ee(U,ii(U,L),Y);di(U,L)}return null}function P(U,L,Y,W){var ve=L!==null?L.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ve!==null?null:w(U,L,""+Y,W);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return Y.key===ve?R(U,L,Y,W):null;case T:return Y.key===ve?V(U,L,Y,W):null;case j:return Y=cr(Y),P(U,L,Y,W)}if(ae(Y)||le(Y))return ve!==null?null:F(U,L,Y,W,null);if(typeof Y.then=="function")return P(U,L,fi(Y),W);if(Y.$$typeof===k)return P(U,L,ii(U,Y),W);di(U,Y)}return null}function Q(U,L,Y,W,ve){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(Y)||null,w(L,U,""+W,ve);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return U=U.get(W.key===null?Y:W.key)||null,R(L,U,W,ve);case T:return U=U.get(W.key===null?Y:W.key)||null,V(L,U,W,ve);case j:return W=cr(W),Q(U,L,Y,W,ve)}if(ae(W)||le(W))return U=U.get(Y)||null,F(L,U,W,ve,null);if(typeof W.then=="function")return Q(U,L,Y,fi(W),ve);if(W.$$typeof===k)return Q(U,L,Y,ii(L,W),ve);di(L,W)}return null}function de(U,L,Y,W){for(var ve=null,Ye=null,ge=L,Re=L=0,Le=null;ge!==null&&Re<Y.length;Re++){ge.index>Re?(Le=ge,ge=null):Le=ge.sibling;var Ve=P(U,ge,Y[Re],W);if(Ve===null){ge===null&&(ge=Le);break}e&&ge&&Ve.alternate===null&&t(U,ge),L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve,ge=Le}if(Re===Y.length)return l(U,ge),He&&In(U,Re),ve;if(ge===null){for(;Re<Y.length;Re++)ge=ee(U,Y[Re],W),ge!==null&&(L=f(ge,L,Re),Ye===null?ve=ge:Ye.sibling=ge,Ye=ge);return He&&In(U,Re),ve}for(ge=a(ge);Re<Y.length;Re++)Le=Q(ge,U,Re,Y[Re],W),Le!==null&&(e&&Le.alternate!==null&&ge.delete(Le.key===null?Re:Le.key),L=f(Le,L,Re),Ye===null?ve=Le:Ye.sibling=Le,Ye=Le);return e&&ge.forEach(function(Ll){return t(U,Ll)}),He&&In(U,Re),ve}function Se(U,L,Y,W){if(Y==null)throw Error(i(151));for(var ve=null,Ye=null,ge=L,Re=L=0,Le=null,Ve=Y.next();ge!==null&&!Ve.done;Re++,Ve=Y.next()){ge.index>Re?(Le=ge,ge=null):Le=ge.sibling;var Ll=P(U,ge,Ve.value,W);if(Ll===null){ge===null&&(ge=Le);break}e&&ge&&Ll.alternate===null&&t(U,ge),L=f(Ll,L,Re),Ye===null?ve=Ll:Ye.sibling=Ll,Ye=Ll,ge=Le}if(Ve.done)return l(U,ge),He&&In(U,Re),ve;if(ge===null){for(;!Ve.done;Re++,Ve=Y.next())Ve=ee(U,Ve.value,W),Ve!==null&&(L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve);return He&&In(U,Re),ve}for(ge=a(ge);!Ve.done;Re++,Ve=Y.next())Ve=Q(ge,U,Re,Ve.value,W),Ve!==null&&(e&&Ve.alternate!==null&&ge.delete(Ve.key===null?Re:Ve.key),L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve);return e&&ge.forEach(function(dw){return t(U,dw)}),He&&In(U,Re),ve}function et(U,L,Y,W){if(typeof Y=="object"&&Y!==null&&Y.type===C&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:e:{for(var ve=Y.key;L!==null;){if(L.key===ve){if(ve=Y.type,ve===C){if(L.tag===7){l(U,L.sibling),W=s(L,Y.props.children),W.return=U,U=W;break e}}else if(L.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&cr(ve)===L.type){l(U,L.sibling),W=s(L,Y.props),Ja(W,Y),W.return=U,U=W;break e}l(U,L);break}else t(U,L);L=L.sibling}Y.type===C?(W=lr(Y.props.children,U.mode,W,Y.key),W.return=U,U=W):(W=ri(Y.type,Y.key,Y.props,null,U.mode,W),Ja(W,Y),W.return=U,U=W)}return g(U);case T:e:{for(ve=Y.key;L!==null;){if(L.key===ve)if(L.tag===4&&L.stateNode.containerInfo===Y.containerInfo&&L.stateNode.implementation===Y.implementation){l(U,L.sibling),W=s(L,Y.children||[]),W.return=U,U=W;break e}else{l(U,L);break}else t(U,L);L=L.sibling}W=js(Y,U.mode,W),W.return=U,U=W}return g(U);case j:return Y=cr(Y),et(U,L,Y,W)}if(ae(Y))return de(U,L,Y,W);if(le(Y)){if(ve=le(Y),typeof ve!="function")throw Error(i(150));return Y=ve.call(Y),Se(U,L,Y,W)}if(typeof Y.then=="function")return et(U,L,fi(Y),W);if(Y.$$typeof===k)return et(U,L,ii(U,Y),W);di(U,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,L!==null&&L.tag===6?(l(U,L.sibling),W=s(L,Y),W.return=U,U=W):(l(U,L),W=Ds(Y,U.mode,W),W.return=U,U=W),g(U)):l(U,L)}return function(U,L,Y,W){try{Fa=0;var ve=et(U,L,Y,W);return Fr=null,ve}catch(ge){if(ge===Zr||ge===si)throw ge;var Ye=Kt(29,ge,null,U.mode);return Ye.lanes=W,Ye.return=U,Ye}finally{}}}var ur=xm(!0),Sm=xm(!1),vl=!1;function Ps(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $s(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 bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Xe&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=li(e),rm(e,null,l),t}return ni(e,a,t,l),li(e)}function Wa(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,dh(e,l)}}function Ks(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?s=f=g:f=f.next=g,l=l.next}while(l!==null);f===null?s=f=t:f=f.next=t}else s=f=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Qs=!1;function eo(){if(Qs){var e=Qr;if(e!==null)throw e}}function to(e,t,l,a){Qs=!1;var s=e.updateQueue;vl=!1;var f=s.firstBaseUpdate,g=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var R=w,V=R.next;R.next=null,g===null?f=V:g.next=V,g=R;var F=e.alternate;F!==null&&(F=F.updateQueue,w=F.lastBaseUpdate,w!==g&&(w===null?F.firstBaseUpdate=V:w.next=V,F.lastBaseUpdate=R))}if(f!==null){var ee=s.baseState;g=0,F=V=R=null,w=f;do{var P=w.lane&-536870913,Q=P!==w.lane;if(Q?(je&P)===P:(a&P)===P){P!==0&&P===Kr&&(Qs=!0),F!==null&&(F=F.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var de=e,Se=w;P=t;var et=l;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){ee=de.call(et,ee,P);break e}ee=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,P=typeof de=="function"?de.call(et,ee,P):de,P==null)break e;ee=b({},ee,P);break e;case 2:vl=!0}}P=w.callback,P!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=s.callbacks,Q===null?s.callbacks=[P]:Q.push(P))}else Q={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},F===null?(V=F=Q,R=ee):F=F.next=Q,g|=P;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;Q=w,w=Q.next,Q.next=null,s.lastBaseUpdate=Q,s.shared.pending=null}}while(!0);F===null&&(R=ee),s.baseState=R,s.firstBaseUpdate=V,s.lastBaseUpdate=F,f===null&&(s.shared.lanes=0),Tl|=g,e.lanes=g,e.memoizedState=ee}}function wm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Em(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)wm(l[e],t)}var Jr=M(null),hi=M(0);function Cm(e,t){e=nl,ne(hi,e),ne(Jr,t),nl=e|t.baseLanes}function Zs(){ne(hi,nl),ne(Jr,Jr.current)}function Fs(){nl=hi.current,B(Jr),B(hi)}var Qt=M(null),dn=null;function Sl(e){var t=e.alternate;ne(ft,ft.current&1),ne(Qt,e),dn===null&&(t===null||Jr.current!==null||t.memoizedState!==null)&&(dn=e)}function Js(e){ne(ft,ft.current),ne(Qt,e),dn===null&&(dn=e)}function Tm(e){e.tag===22?(ne(ft,ft.current),ne(Qt,e),dn===null&&(dn=e)):wl()}function wl(){ne(ft,ft.current),ne(Qt,Qt.current)}function Zt(e){B(Qt),dn===e&&(dn=null),B(ft)}var ft=M(0);function mi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||rf(l)||af(l)))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 Kn=0,_e=null,Je=null,pt=null,pi=!1,Wr=!1,fr=!1,gi=0,no=0,ea=null,n1=0;function st(){throw Error(i(321))}function Ws(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!$t(e[l],t[l]))return!1;return!0}function eu(e,t,l,a,s,f){return Kn=f,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?cp:pu,fr=!1,f=l(a,s),fr=!1,Wr&&(f=Mm(t,l,a,s)),Am(e),f}function Am(e){O.H=ao;var t=Je!==null&&Je.next!==null;if(Kn=0,pt=Je=_e=null,pi=!1,no=0,ea=null,t)throw Error(i(300));e===null||gt||(e=e.dependencies,e!==null&&oi(e)&&(gt=!0))}function Mm(e,t,l,a){_e=e;var s=0;do{if(Wr&&(ea=null),no=0,Wr=!1,25<=s)throw Error(i(301));if(s+=1,pt=Je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}O.H=sp,f=t(l,a)}while(Wr);return f}function l1(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?lo(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(_e.flags|=1024),t}function tu(){var e=gi!==0;return gi=0,e}function nu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function lu(e){if(pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}pi=!1}Kn=0,pt=Je=_e=null,Wr=!1,no=gi=0,ea=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?_e.memoizedState=pt=e:pt=pt.next=e,pt}function dt(){if(Je===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=pt===null?_e.memoizedState:pt.next;if(t!==null)pt=t,Je=e;else{if(e===null)throw _e.alternate===null?Error(i(467)):Error(i(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},pt===null?_e.memoizedState=pt=e:pt=pt.next=e}return pt}function yi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lo(e){var t=no;return no+=1,ea===null&&(ea=[]),e=ym(ea,e,t),t=_e,(pt===null?t.memoizedState:pt.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?cp:pu),e}function vi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return lo(e);if(e.$$typeof===k)return Mt(e)}throw Error(i(438,String(e)))}function ru(e){var t=null,l=_e.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=_e.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=yi(),_e.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=I;return t.index++,l}function Qn(e,t){return typeof t=="function"?t(e):t}function bi(e){var t=dt();return au(t,Je,e)}function au(e,t,l){var a=e.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=l;var s=e.baseQueue,f=a.pending;if(f!==null){if(s!==null){var g=s.next;s.next=f.next,f.next=g}t.baseQueue=s=f,a.pending=null}if(f=e.baseState,s===null)e.memoizedState=f;else{t=s.next;var w=g=null,R=null,V=t,F=!1;do{var ee=V.lane&-536870913;if(ee!==V.lane?(je&ee)===ee:(Kn&ee)===ee){var P=V.revertLane;if(P===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ee===Kr&&(F=!0);else if((Kn&P)===P){V=V.next,P===Kr&&(F=!0);continue}else ee={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(w=R=ee,g=f):R=R.next=ee,_e.lanes|=P,Tl|=P;ee=V.action,fr&&l(f,ee),f=V.hasEagerState?V.eagerState:l(f,ee)}else P={lane:ee,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(w=R=P,g=f):R=R.next=P,_e.lanes|=ee,Tl|=ee;V=V.next}while(V!==null&&V!==t);if(R===null?g=f:R.next=w,!$t(f,e.memoizedState)&&(gt=!0,F&&(l=Qr,l!==null)))throw l;e.memoizedState=f,e.baseState=g,e.baseQueue=R,a.lastRenderedState=f}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ou(e){var t=dt(),l=t.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,f=t.memoizedState;if(s!==null){l.pending=null;var g=s=s.next;do f=e(f,g.action),g=g.next;while(g!==s);$t(f,t.memoizedState)||(gt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),l.lastRenderedState=f}return[f,a]}function _m(e,t,l){var a=_e,s=dt(),f=He;if(f){if(l===void 0)throw Error(i(407));l=l()}else l=t();var g=!$t((Je||s).memoizedState,l);if(g&&(s.memoizedState=l,gt=!0),s=s.queue,su(Om.bind(null,a,s,e),[e]),s.getSnapshot!==t||g||pt!==null&&pt.memoizedState.tag&1){if(a.flags|=2048,ta(9,{destroy:void 0},Nm.bind(null,a,s,l,t),null),tt===null)throw Error(i(349));f||(Kn&127)!==0||Rm(a,t,l)}return l}function Rm(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=_e.updateQueue,t===null?(t=yi(),_e.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Nm(e,t,l,a){t.value=l,t.getSnapshot=a,zm(t)&&Dm(e)}function Om(e,t,l){return l(function(){zm(t)&&Dm(e)})}function zm(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!$t(e,l)}catch{return!0}}function Dm(e){var t=nr(e,2);t!==null&&It(t,e,2)}function iu(e){var t=Lt();if(typeof e=="function"){var l=e;if(e=l(),fr){ht(!0);try{l()}finally{ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},t}function jm(e,t,l,a){return e.baseState=l,au(e,Je,typeof a=="function"?a:Qn)}function r1(e,t,l,a,s){if(wi(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};O.T!==null?l(!0):f.isTransition=!1,a(f),l=t.pending,l===null?(f.next=t.pending=f,Lm(t,f)):(f.next=l.next,t.pending=l.next=f)}}function Lm(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var f=O.T,g={};O.T=g;try{var w=l(s,a),R=O.S;R!==null&&R(g,w),km(e,t,w)}catch(V){cu(e,t,V)}finally{f!==null&&g.types!==null&&(f.types=g.types),O.T=f}}else try{f=l(s,a),km(e,t,f)}catch(V){cu(e,t,V)}}function km(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Hm(e,t,a)},function(a){return cu(e,t,a)}):Hm(e,t,l)}function Hm(e,t,l){t.status="fulfilled",t.value=l,Um(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Lm(e,l)))}function cu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Um(t),t=t.next;while(t!==a)}e.action=null}function Um(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bm(e,t){return t}function Gm(e,t){if(He){var l=tt.formState;if(l!==null){e:{var a=_e;if(He){if(at){t:{for(var s=at,f=fn;s.nodeType!==8;){if(!f){s=null;break t}if(s=hn(s.nextSibling),s===null){s=null;break t}}f=s.data,s=f==="F!"||f==="F"?s:null}if(s){at=hn(s.nextSibling),a=s.data==="F!";break e}}gl(a)}a=!1}a&&(t=l[0])}}return l=Lt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bm,lastRenderedState:t},l.queue=a,l=ap.bind(null,_e,a),a.dispatch=l,a=iu(!1),f=mu.bind(null,_e,!1,a.queue),a=Lt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=r1.bind(null,_e,s,f,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function Ym(e){var t=dt();return Vm(t,Je,e)}function Vm(e,t,l){if(t=au(e,t,Bm)[0],e=bi(Qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=lo(t)}catch(g){throw g===Zr?si:g}else a=t;t=dt();var s=t.queue,f=s.dispatch;return l!==t.memoizedState&&(_e.flags|=2048,ta(9,{destroy:void 0},a1.bind(null,s,l),null)),[a,f,e]}function a1(e,t){e.action=t}function qm(e){var t=dt(),l=Je;if(l!==null)return Vm(t,l,e);dt(),t=t.memoizedState,l=dt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ta(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=_e.updateQueue,t===null&&(t=yi(),_e.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Xm(){return dt().memoizedState}function xi(e,t,l,a){var s=Lt();_e.flags|=e,s.memoizedState=ta(1|t,{destroy:void 0},l,a===void 0?null:a)}function Si(e,t,l,a){var s=dt();a=a===void 0?null:a;var f=s.memoizedState.inst;Je!==null&&a!==null&&Ws(a,Je.memoizedState.deps)?s.memoizedState=ta(t,f,l,a):(_e.flags|=e,s.memoizedState=ta(1|t,f,l,a))}function Im(e,t){xi(8390656,8,e,t)}function su(e,t){Si(2048,8,e,t)}function o1(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=yi(),_e.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Pm(e){var t=dt().memoizedState;return o1({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function $m(e,t){return Si(4,2,e,t)}function Km(e,t){return Si(4,4,e,t)}function Qm(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zm(e,t,l){l=l!=null?l.concat([e]):null,Si(4,4,Qm.bind(null,t,e),l)}function uu(){}function Fm(e,t){var l=dt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ws(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Jm(e,t){var l=dt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ws(t,a[1]))return a[0];if(a=e(),fr){ht(!0);try{e()}finally{ht(!1)}}return l.memoizedState=[a,t],a}function fu(e,t,l){return l===void 0||(Kn&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Wp(),_e.lanes|=e,Tl|=e,l)}function Wm(e,t,l,a){return $t(l,t)?l:Jr.current!==null?(e=fu(e,l,a),$t(e,t)||(gt=!0),e):(Kn&42)===0||(Kn&1073741824)!==0&&(je&261930)===0?(gt=!0,e.memoizedState=l):(e=Wp(),_e.lanes|=e,Tl|=e,t)}function ep(e,t,l,a,s){var f=X.p;X.p=f!==0&&8>f?f:8;var g=O.T,w={};O.T=w,mu(e,!1,t,l);try{var R=s(),V=O.S;if(V!==null&&V(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=t1(R,a);ro(e,t,F,Wt(e))}else ro(e,t,a,Wt(e))}catch(ee){ro(e,t,{then:function(){},status:"rejected",reason:ee},Wt())}finally{X.p=f,g!==null&&w.types!==null&&(g.types=w.types),O.T=g}}function i1(){}function du(e,t,l,a){if(e.tag!==5)throw Error(i(476));var s=tp(e).queue;ep(e,s,t,G,l===null?i1:function(){return np(e),l(a)})}function tp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:G},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function np(e){var t=tp(e);t.next===null&&(t=e.alternate.memoizedState),ro(e,t.next.queue,{},Wt())}function hu(){return Mt(wo)}function lp(){return dt().memoizedState}function rp(){return dt().memoizedState}function c1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=bl(l);var a=xl(t,e,l);a!==null&&(It(a,t,l),Wa(a,t,l)),t={cache:Vs()},e.payload=t;return}t=t.return}}function s1(e,t,l){var a=Wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wi(e)?op(t,l):(l=Os(e,t,l,a),l!==null&&(It(l,e,a),ip(l,t,a)))}function ap(e,t,l){var a=Wt();ro(e,t,l,a)}function ro(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(wi(e))op(t,s);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,w=f(g,l);if(s.hasEagerState=!0,s.eagerState=w,$t(w,g))return ni(e,t,s,0),tt===null&&ti(),!1}catch{}finally{}if(l=Os(e,t,s,a),l!==null)return It(l,e,a),ip(l,t,a),!0}return!1}function mu(e,t,l,a){if(a={lane:2,revertLane:Pu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wi(e)){if(t)throw Error(i(479))}else t=Os(e,l,a,2),t!==null&&It(t,e,2)}function wi(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function op(e,t){Wr=pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function ip(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,dh(e,l)}}var ao={readContext:Mt,use:vi,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};ao.useEffectEvent=st;var cp={readContext:Mt,use:vi,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Im,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,xi(4194308,4,Qm.bind(null,t,e),l)},useLayoutEffect:function(e,t){return xi(4194308,4,e,t)},useInsertionEffect:function(e,t){xi(4,2,e,t)},useMemo:function(e,t){var l=Lt();t=t===void 0?null:t;var a=e();if(fr){ht(!0);try{e()}finally{ht(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Lt();if(l!==void 0){var s=l(t);if(fr){ht(!0);try{l(t)}finally{ht(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=s1.bind(null,_e,e),[a.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=iu(e);var t=e.queue,l=ap.bind(null,_e,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:uu,useDeferredValue:function(e,t){var l=Lt();return fu(l,e,t)},useTransition:function(){var e=iu(!1);return e=ep.bind(null,_e,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=_e,s=Lt();if(He){if(l===void 0)throw Error(i(407));l=l()}else{if(l=t(),tt===null)throw Error(i(349));(je&127)!==0||Rm(a,t,l)}s.memoizedState=l;var f={value:l,getSnapshot:t};return s.queue=f,Im(Om.bind(null,a,f,e),[e]),a.flags|=2048,ta(9,{destroy:void 0},Nm.bind(null,a,f,l,t),null),l},useId:function(){var e=Lt(),t=tt.identifierPrefix;if(He){var l=Rn,a=_n;l=(a&~(1<<32-rt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=gi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=n1++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hu,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=mu.bind(null,_e,!0,l),l.dispatch=t,[e,t]},useMemoCache:ru,useCacheRefresh:function(){return Lt().memoizedState=c1.bind(null,_e)},useEffectEvent:function(e){var t=Lt(),l={impl:e};return t.memoizedState=l,function(){if((Xe&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},pu={readContext:Mt,use:vi,useCallback:Fm,useContext:Mt,useEffect:su,useImperativeHandle:Zm,useInsertionEffect:$m,useLayoutEffect:Km,useMemo:Jm,useReducer:bi,useRef:Xm,useState:function(){return bi(Qn)},useDebugValue:uu,useDeferredValue:function(e,t){var l=dt();return Wm(l,Je.memoizedState,e,t)},useTransition:function(){var e=bi(Qn)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:lo(e),t]},useSyncExternalStore:_m,useId:lp,useHostTransitionStatus:hu,useFormState:Ym,useActionState:Ym,useOptimistic:function(e,t){var l=dt();return jm(l,Je,e,t)},useMemoCache:ru,useCacheRefresh:rp};pu.useEffectEvent=Pm;var sp={readContext:Mt,use:vi,useCallback:Fm,useContext:Mt,useEffect:su,useImperativeHandle:Zm,useInsertionEffect:$m,useLayoutEffect:Km,useMemo:Jm,useReducer:ou,useRef:Xm,useState:function(){return ou(Qn)},useDebugValue:uu,useDeferredValue:function(e,t){var l=dt();return Je===null?fu(l,e,t):Wm(l,Je.memoizedState,e,t)},useTransition:function(){var e=ou(Qn)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:lo(e),t]},useSyncExternalStore:_m,useId:lp,useHostTransitionStatus:hu,useFormState:qm,useActionState:qm,useOptimistic:function(e,t){var l=dt();return Je!==null?jm(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ru,useCacheRefresh:rp};sp.useEffectEvent=Pm;function gu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var yu={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=bl(a);s.payload=t,l!=null&&(s.callback=l),t=xl(e,s,a),t!==null&&(It(t,e,a),Wa(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=bl(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=xl(e,s,a),t!==null&&(It(t,e,a),Wa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),a=bl(l);a.tag=2,t!=null&&(a.callback=t),t=xl(e,a,l),t!==null&&(It(t,e,l),Wa(t,e,l))}};function up(e,t,l,a,s,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,g):t.prototype&&t.prototype.isPureReactComponent?!Ia(l,a)||!Ia(s,f):!0}function fp(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&yu.enqueueReplaceState(t,t.state,null)}function dr(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=b({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function dp(e){ei(e)}function hp(e){console.error(e)}function mp(e){ei(e)}function Ei(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function pp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function vu(e,t,l){return l=bl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ei(e,t)},l}function gp(e){return e=bl(e),e.tag=3,e}function yp(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var f=a.value;e.payload=function(){return s(f)},e.callback=function(){pp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){pp(t,l,a),typeof s!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var w=a.stack;this.componentDidCatch(a.value,{componentStack:w!==null?w:""})})}function u1(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&$r(t,l,s,!0),l=Qt.current,l!==null){switch(l.tag){case 31:case 13:return dn===null?Li():l.alternate===null&&ut===0&&(ut=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===ui?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),qu(e,a,s)),!1;case 22:return l.flags|=65536,a===ui?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),qu(e,a,s)),!1}throw Error(i(435,l.tag))}return qu(e,a,s),Li(),!1}if(He)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Hs&&(e=Error(i(422),{cause:a}),Ka(cn(e,l)))):(a!==Hs&&(t=Error(i(423),{cause:a}),Ka(cn(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=cn(a,l),s=vu(e.stateNode,a,s),Ks(e,s),ut!==4&&(ut=2)),!1;var f=Error(i(520),{cause:a});if(f=cn(f,l),mo===null?mo=[f]:mo.push(f),ut!==4&&(ut=2),t===null)return!0;a=cn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=vu(l.stateNode,a,e),Ks(l,e),!1;case 1:if(t=l.type,f=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Al===null||!Al.has(f))))return l.flags|=65536,s&=-s,l.lanes|=s,s=gp(s),yp(s,e,l,a),Ks(l,s),!1}l=l.return}while(l!==null);return!1}var bu=Error(i(461)),gt=!1;function _t(e,t,l,a){t.child=e===null?Sm(t,null,l,a):ur(t,e.child,l,a)}function vp(e,t,l,a,s){l=l.render;var f=t.ref;if("ref"in a){var g={};for(var w in a)w!=="ref"&&(g[w]=a[w])}else g=a;return or(t),a=eu(e,t,l,g,f,s),w=tu(),e!==null&&!gt?(nu(e,t,s),Zn(e,t,s)):(He&&w&&Ls(t),t.flags|=1,_t(e,t,a,s),t.child)}function bp(e,t,l,a,s){if(e===null){var f=l.type;return typeof f=="function"&&!zs(f)&&f.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=f,xp(e,t,f,a,s)):(e=ri(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Mu(e,s)){var g=f.memoizedProps;if(l=l.compare,l=l!==null?l:Ia,l(g,a)&&e.ref===t.ref)return Zn(e,t,s)}return t.flags|=1,e=Xn(f,a),e.ref=t.ref,e.return=t,t.child=e}function xp(e,t,l,a,s){if(e!==null){var f=e.memoizedProps;if(Ia(f,a)&&e.ref===t.ref)if(gt=!1,t.pendingProps=a=f,Mu(e,s))(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,Zn(e,t,s)}return xu(e,t,l,a,s)}function Sp(e,t,l,a){var s=a.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~f}else a=0,t.child=null;return wp(e,t,f,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ci(t,f!==null?f.cachePool:null),f!==null?Cm(t,f):Zs(),Tm(t);else return a=t.lanes=536870912,wp(e,t,f!==null?f.baseLanes|l:l,l,a)}else f!==null?(ci(t,f.cachePool),Cm(t,f),wl(),t.memoizedState=null):(e!==null&&ci(t,null),Zs(),wl());return _t(e,t,s,l),t.child}function oo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wp(e,t,l,a,s){var f=Xs();return f=f===null?null:{parent:mt._currentValue,pool:f},t.memoizedState={baseLanes:l,cachePool:f},e!==null&&ci(t,null),Zs(),Tm(t),e!==null&&$r(e,t,a,!0),t.childLanes=s,null}function Ci(e,t){return t=Ai({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ep(e,t,l){return ur(t,e.child,null,l),e=Ci(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function f1(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(a.mode==="hidden")return e=Ci(t,a),t.lanes=536870912,oo(null,e);if(Js(t),(e=at)?(e=Lg(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:_n,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=om(e),l.return=t,t.child=l,At=t,at=null)):e=null,e===null)throw gl(t);return t.lanes=536870912,null}return Ci(t,a)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Js(t),s)if(t.flags&256)t.flags&=-257,t=Ep(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(gt||$r(e,t,l,!1),s=(l&e.childLanes)!==0,gt||s){if(a=tt,a!==null&&(g=hh(a,l),g!==0&&g!==f.retryLane))throw f.retryLane=g,nr(e,g),It(a,e,g),bu;Li(),t=Ep(e,t,l)}else e=f.treeContext,at=hn(g.nextSibling),At=t,He=!0,pl=null,fn=!1,e!==null&&sm(t,e),t=Ci(t,a),t.flags|=4096;return t}return e=Xn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ti(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function xu(e,t,l,a,s){return or(t),l=eu(e,t,l,a,void 0,s),a=tu(),e!==null&&!gt?(nu(e,t,s),Zn(e,t,s)):(He&&a&&Ls(t),t.flags|=1,_t(e,t,l,s),t.child)}function Cp(e,t,l,a,s,f){return or(t),t.updateQueue=null,l=Mm(t,a,l,s),Am(e),a=tu(),e!==null&&!gt?(nu(e,t,f),Zn(e,t,f)):(He&&a&&Ls(t),t.flags|=1,_t(e,t,l,f),t.child)}function Tp(e,t,l,a,s){if(or(t),t.stateNode===null){var f=qr,g=l.contextType;typeof g=="object"&&g!==null&&(f=Mt(g)),f=new l(a,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=yu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=a,f.state=t.memoizedState,f.refs={},Ps(t),g=l.contextType,f.context=typeof g=="object"&&g!==null?Mt(g):qr,f.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(gu(t,l,g,a),f.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&yu.enqueueReplaceState(f,f.state,null),to(t,a,f,s),eo(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,R=dr(l,w);f.props=R;var V=f.context,F=l.contextType;g=qr,typeof F=="object"&&F!==null&&(g=Mt(F));var ee=l.getDerivedStateFromProps;F=typeof ee=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,F||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||V!==g)&&fp(t,f,a,g),vl=!1;var P=t.memoizedState;f.state=P,to(t,a,f,s),eo(),V=t.memoizedState,w||P!==V||vl?(typeof ee=="function"&&(gu(t,l,ee,a),V=t.memoizedState),(R=vl||up(t,l,R,a,P,V,g))?(F||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=a,t.memoizedState=V),f.props=a,f.state=V,f.context=g,a=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,$s(e,t),g=t.memoizedProps,F=dr(l,g),f.props=F,ee=t.pendingProps,P=f.context,V=l.contextType,R=qr,typeof V=="object"&&V!==null&&(R=Mt(V)),w=l.getDerivedStateFromProps,(V=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==ee||P!==R)&&fp(t,f,a,R),vl=!1,P=t.memoizedState,f.state=P,to(t,a,f,s),eo();var Q=t.memoizedState;g!==ee||P!==Q||vl||e!==null&&e.dependencies!==null&&oi(e.dependencies)?(typeof w=="function"&&(gu(t,l,w,a),Q=t.memoizedState),(F=vl||up(t,l,F,a,P,Q,R)||e!==null&&e.dependencies!==null&&oi(e.dependencies))?(V||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,Q,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,Q,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Q),f.props=a,f.state=Q,f.context=R,a=F):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),a=!1)}return f=a,Ti(e,t),a=(t.flags&128)!==0,f||a?(f=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&a?(t.child=ur(t,e.child,null,s),t.child=ur(t,null,l,s)):_t(e,t,l,s),t.memoizedState=f.state,e=t.child):e=Zn(e,t,s),e}function Ap(e,t,l,a){return rr(),t.flags|=256,_t(e,t,l,a),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wu(e){return{baseLanes:e,cachePool:pm()}}function Eu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Jt),e}function Mp(e,t,l){var a=t.pendingProps,s=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),g&&(s=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(s?Sl(t):wl(),(e=at)?(e=Lg(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:_n,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=om(e),l.return=t,t.child=l,At=t,at=null)):e=null,e===null)throw gl(t);return af(e)?t.lanes=32:t.lanes=536870912,null}var w=a.children;return a=a.fallback,s?(wl(),s=t.mode,w=Ai({mode:"hidden",children:w},s),a=lr(a,s,l,null),w.return=t,a.return=t,w.sibling=a,t.child=w,a=t.child,a.memoizedState=wu(l),a.childLanes=Eu(e,g,l),t.memoizedState=Su,oo(null,a)):(Sl(t),Cu(t,w))}var R=e.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(f)t.flags&256?(Sl(t),t.flags&=-257,t=Tu(e,t,l)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,t=null):(wl(),w=a.fallback,s=t.mode,a=Ai({mode:"visible",children:a.children},s),w=lr(w,s,l,null),w.flags|=2,a.return=t,w.return=t,a.sibling=w,t.child=a,ur(t,e.child,null,l),a=t.child,a.memoizedState=wu(l),a.childLanes=Eu(e,g,l),t.memoizedState=Su,t=oo(null,a));else if(Sl(t),af(w)){if(g=w.nextSibling&&w.nextSibling.dataset,g)var V=g.dgst;g=V,a=Error(i(419)),a.stack="",a.digest=g,Ka({value:a,source:null,stack:null}),t=Tu(e,t,l)}else if(gt||$r(e,t,l,!1),g=(l&e.childLanes)!==0,gt||g){if(g=tt,g!==null&&(a=hh(g,l),a!==0&&a!==R.retryLane))throw R.retryLane=a,nr(e,a),It(g,e,a),bu;rf(w)||Li(),t=Tu(e,t,l)}else rf(w)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,at=hn(w.nextSibling),At=t,He=!0,pl=null,fn=!1,e!==null&&sm(t,e),t=Cu(t,a.children),t.flags|=4096);return t}return s?(wl(),w=a.fallback,s=t.mode,R=e.child,V=R.sibling,a=Xn(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,V!==null?w=Xn(V,w):(w=lr(w,s,l,null),w.flags|=2),w.return=t,a.return=t,a.sibling=w,t.child=a,oo(null,a),a=t.child,w=e.child.memoizedState,w===null?w=wu(l):(s=w.cachePool,s!==null?(R=mt._currentValue,s=s.parent!==R?{parent:R,pool:R}:s):s=pm(),w={baseLanes:w.baseLanes|l,cachePool:s}),a.memoizedState=w,a.childLanes=Eu(e,g,l),t.memoizedState=Su,oo(e.child,a)):(Sl(t),l=e.child,e=l.sibling,l=Xn(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function Cu(e,t){return t=Ai({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ai(e,t){return e=Kt(22,e,null,t),e.lanes=0,e}function Tu(e,t,l){return ur(t,e.child,null,l),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _p(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Gs(e.return,t,l)}function Au(e,t,l,a,s,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=s,g.treeForkCount=f)}function Rp(e,t,l){var a=t.pendingProps,s=a.revealOrder,f=a.tail;a=a.children;var g=ft.current,w=(g&2)!==0;if(w?(g=g&1|2,t.flags|=128):g&=1,ne(ft,g),_t(e,t,a,l),a=He?$a:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_p(e,l,t);else if(e.tag===19)_p(e,l,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(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&mi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),Au(t,!1,s,l,f,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&mi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}Au(t,!0,l,null,f,a);break;case"together":Au(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Zn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Tl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if($r(e,t,l,!1),(l&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,l=Xn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Xn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&oi(e)))}function d1(e,t,l){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),yl(t,mt,e.memoizedState.cache),rr();break;case 27:case 5:Me(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:yl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Js(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Sl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Mp(e,t,l):(Sl(t),e=Zn(e,t,l),e!==null?e.sibling:null);Sl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||($r(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return Rp(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ne(ft,ft.current),a)break;return null;case 22:return t.lanes=0,Sp(e,t,l,t.pendingProps);case 24:yl(t,mt,e.memoizedState.cache)}return Zn(e,t,l)}function Np(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)gt=!0;else{if(!Mu(e,l)&&(t.flags&128)===0)return gt=!1,d1(e,t,l);gt=(e.flags&131072)!==0}else gt=!1,He&&(t.flags&1048576)!==0&&cm(t,$a,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=cr(t.elementType),t.type=e,typeof e=="function")zs(e)?(a=dr(e,a),t.tag=1,t=Tp(null,t,e,a,l)):(t.tag=0,t=xu(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===q){t.tag=11,t=vp(null,t,e,a,l);break e}else if(s===_){t.tag=14,t=bp(null,t,e,a,l);break e}}throw t=te(e)||e,Error(i(306,t,""))}}return t;case 0:return xu(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=dr(a,t.pendingProps),Tp(e,t,a,s,l);case 3:e:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));a=t.pendingProps;var f=t.memoizedState;s=f.element,$s(e,t),to(t,a,null,l);var g=t.memoizedState;if(a=g.cache,yl(t,mt,a),a!==f.cache&&Ys(t,[mt],l,!0),eo(),a=g.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Ap(e,t,a,l);break e}else if(a!==s){s=cn(Error(i(424)),t),Ka(s),t=Ap(e,t,a,l);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(at=hn(e.firstChild),At=t,He=!0,pl=null,fn=!0,l=Sm(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(rr(),a===s){t=Zn(e,t,l);break e}_t(e,t,a,l)}t=t.child}return t;case 26:return Ti(e,t),e===null?(l=Yg(t.type,null,t.pendingProps,null))?t.memoizedState=l:He||(l=t.type,e=t.pendingProps,a=Vi(ue.current).createElement(l),a[Tt]=t,a[Bt]=e,Rt(a,l,e),wt(a),t.stateNode=a):t.memoizedState=Yg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&He&&(a=t.stateNode=Ug(t.type,t.pendingProps,ue.current),At=t,fn=!0,s=at,Nl(t.type)?(of=s,at=hn(a.firstChild)):at=s),_t(e,t,t.pendingProps.children,l),Ti(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((s=a=at)&&(a=V1(a,t.type,t.pendingProps,fn),a!==null?(t.stateNode=a,At=t,at=hn(a.firstChild),fn=!1,s=!0):s=!1),s||gl(t)),Me(t),s=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,a=f.children,tf(s,f)?a=null:g!==null&&tf(s,g)&&(t.flags|=32),t.memoizedState!==null&&(s=eu(e,t,l1,null,null,l),wo._currentValue=s),Ti(e,t),_t(e,t,a,l),t.child;case 6:return e===null&&He&&((e=l=at)&&(l=q1(l,t.pendingProps,fn),l!==null?(t.stateNode=l,At=t,at=null,e=!0):e=!1),e||gl(t)),null;case 13:return Mp(e,t,l);case 4:return xe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ur(t,null,a,l):_t(e,t,a,l),t.child;case 11:return vp(e,t,t.type,t.pendingProps,l);case 7:return _t(e,t,t.pendingProps,l),t.child;case 8:return _t(e,t,t.pendingProps.children,l),t.child;case 12:return _t(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,yl(t,t.type,a.value),_t(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,or(t),s=Mt(s),a=a(s),t.flags|=1,_t(e,t,a,l),t.child;case 14:return bp(e,t,t.type,t.pendingProps,l);case 15:return xp(e,t,t.type,t.pendingProps,l);case 19:return Rp(e,t,l);case 31:return f1(e,t,l);case 22:return Sp(e,t,l,t.pendingProps);case 24:return or(t),a=Mt(mt),e===null?(s=Xs(),s===null&&(s=tt,f=Vs(),s.pooledCache=f,f.refCount++,f!==null&&(s.pooledCacheLanes|=l),s=f),t.memoizedState={parent:a,cache:s},Ps(t),yl(t,mt,s)):((e.lanes&l)!==0&&($s(e,t),to(t,null,null,l),eo()),s=e.memoizedState,f=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),yl(t,mt,a)):(a=f.cache,yl(t,mt,a),a!==s.cache&&Ys(t,[mt],l,!0))),_t(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fn(e){e.flags|=4}function _u(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(lg())e.flags|=8192;else throw sr=ui,Is}else e.flags&=-16777217}function Op(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(lg())e.flags|=8192;else throw sr=ui,Is}function Mi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rr():536870912,e.lanes|=t,aa|=t)}function io(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function h1(e,t,l){var a=t.pendingProps;switch(ks(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return ot(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),$n(mt),fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Pr(t)?Fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Us())),ot(t),null;case 26:var s=t.type,f=t.memoizedState;return e===null?(Fn(t),f!==null?(ot(t),Op(t,f)):(ot(t),_u(t,s,null,a,l))):f?f!==e.memoizedState?(Fn(t),ot(t),Op(t,f)):(ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Fn(t),ot(t),_u(t,s,e,a,l)),null;case 27:if(we(t),l=ue.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(!a){if(t.stateNode===null)throw Error(i(166));return ot(t),null}e=oe.current,Pr(t)?um(t):(e=Ug(s,a,l),t.stateNode=e,Fn(t))}return ot(t),null;case 5:if(we(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(!a){if(t.stateNode===null)throw Error(i(166));return ot(t),null}if(f=oe.current,Pr(t))um(t);else{var g=Vi(ue.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is=="string"?g.createElement(s,{is:a.is}):g.createElement(s)}}f[Tt]=t,f[Bt]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(Rt(f,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Fn(t)}}return ot(t),_u(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Fn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Pr(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=At,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Mg(e.nodeValue,l)),e||gl(t,!0)}else e=Vi(e).createTextNode(a),e[Tt]=t,t.stateNode=e}return ot(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Pr(t),l!==null){if(e===null){if(!a)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Tt]=t}else rr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),e=!1}else l=Us(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return ot(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Pr(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(i(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));s[Tt]=t}else rr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),s=!1}else s=Us(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Mi(t,t.updateQueue),ot(t),null);case 4:return fe(),e===null&&Zu(t.stateNode.containerInfo),ot(t),null;case 10:return $n(t.type),ot(t),null;case 19:if(B(ft),a=t.memoizedState,a===null)return ot(t),null;if(s=(t.flags&128)!==0,f=a.rendering,f===null)if(s)io(a,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=mi(e),f!==null){for(t.flags|=128,io(a,!1),e=f.updateQueue,t.updateQueue=e,Mi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)am(l,e),l=l.sibling;return ne(ft,ft.current&1|2),He&&In(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ct()>zi&&(t.flags|=128,s=!0,io(a,!1),t.lanes=4194304)}else{if(!s)if(e=mi(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Mi(t,e),io(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!He)return ot(t),null}else 2*Ct()-a.renderingStartTime>zi&&l!==536870912&&(t.flags|=128,s=!0,io(a,!1),t.lanes=4194304);a.isBackwards?(f.sibling=t.child,t.child=f):(e=a.last,e!==null?e.sibling=f:t.child=f,a.last=f)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ct(),e.sibling=null,l=ft.current,ne(ft,s?l&1|2:l&1),He&&In(t,a.treeForkCount),e):(ot(t),null);case 22:case 23:return Zt(t),Fs(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),l=t.updateQueue,l!==null&&Mi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B(ir),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),$n(mt),ot(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function m1(e,t){switch(ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(mt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(i(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(ft),null;case 4:return fe(),null;case 10:return $n(t.type),null;case 22:case 23:return Zt(t),Fs(),e!==null&&B(ir),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $n(mt),null;case 25:return null;default:return null}}function zp(e,t){switch(ks(t),t.tag){case 3:$n(mt),fe();break;case 26:case 27:case 5:we(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:B(ft);break;case 10:$n(t.type);break;case 22:case 23:Zt(t),Fs(),e!==null&&B(ir);break;case 24:$n(mt)}}function co(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var f=l.create,g=l.inst;a=f(),g.destroy=a}l=l.next}while(l!==s)}}catch(w){Qe(t,t.return,w)}}function El(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var f=s.next;a=f;do{if((a.tag&e)===e){var g=a.inst,w=g.destroy;if(w!==void 0){g.destroy=void 0,s=t;var R=l,V=w;try{V()}catch(F){Qe(s,R,F)}}}a=a.next}while(a!==f)}}catch(F){Qe(t,t.return,F)}}function Dp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Em(t,l)}catch(a){Qe(e,e.return,a)}}}function jp(e,t,l){l.props=dr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Qe(e,t,a)}}function so(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Qe(e,t,s)}}function Nn(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Qe(e,t,s)}else l.current=null}function Lp(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Qe(e,e.return,s)}}function Ru(e,t,l){try{var a=e.stateNode;k1(a,e.type,l,t),a[Bt]=t}catch(s){Qe(e,e.return,s)}}function kp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nl(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kp(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&&Nl(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 Ou(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Vn));else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ou(e,t,l),e=e.sibling;e!==null;)Ou(e,t,l),e=e.sibling}function _i(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(_i(e,t,l),e=e.sibling;e!==null;)_i(e,t,l),e=e.sibling}function Hp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Rt(t,a,l),t[Tt]=e,t[Bt]=l}catch(f){Qe(e,e.return,f)}}var Jn=!1,yt=!1,zu=!1,Up=typeof WeakSet=="function"?WeakSet:Set,Et=null;function p1(e,t){if(e=e.containerInfo,Wu=Qi,e=Zh(e),Ts(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var g=0,w=-1,R=-1,V=0,F=0,ee=e,P=null;t:for(;;){for(var Q;ee!==l||s!==0&&ee.nodeType!==3||(w=g+s),ee!==f||a!==0&&ee.nodeType!==3||(R=g+a),ee.nodeType===3&&(g+=ee.nodeValue.length),(Q=ee.firstChild)!==null;)P=ee,ee=Q;for(;;){if(ee===e)break t;if(P===l&&++V===s&&(w=g),P===f&&++F===a&&(R=g),(Q=ee.nextSibling)!==null)break;ee=P,P=ee.parentNode}ee=Q}l=w===-1||R===-1?null:{start:w,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(ef={focusedElem:e,selectionRange:l},Qi=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,l=t,s=f.memoizedProps,f=f.memoizedState,a=l.stateNode;try{var de=dr(l.type,s);e=a.getSnapshotBeforeUpdate(de,f),a.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Qe(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)lf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lf(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,Et=e;break}Et=t.return}}function Bp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:el(e,l),a&4&&co(5,l);break;case 1:if(el(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(l,l.return,g)}else{var s=dr(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(l,l.return,g)}}a&64&&Dp(l),a&512&&so(l,l.return);break;case 3:if(el(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Em(e,t)}catch(g){Qe(l,l.return,g)}}break;case 27:t===null&&a&4&&Hp(l);case 26:case 5:el(e,l),t===null&&a&4&&Lp(l),a&512&&so(l,l.return);break;case 12:el(e,l);break;case 31:el(e,l),a&4&&Vp(e,l);break;case 13:el(e,l),a&4&&qp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=C1.bind(null,l),X1(e,l))));break;case 22:if(a=l.memoizedState!==null||Jn,!a){t=t!==null&&t.memoizedState!==null||yt,s=Jn;var f=yt;Jn=a,(yt=t)&&!f?tl(e,l,(l.subtreeFlags&8772)!==0):el(e,l),Jn=s,yt=f}break;case 30:break;default:el(e,l)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&cs(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 ct=null,Yt=!1;function Wn(e,t,l){for(l=l.child;l!==null;)Yp(e,t,l),l=l.sibling}function Yp(e,t,l){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(lt,l)}catch{}switch(l.tag){case 26:yt||Nn(l,t),Wn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:yt||Nn(l,t);var a=ct,s=Yt;Nl(l.type)&&(ct=l.stateNode,Yt=!1),Wn(e,t,l),bo(l.stateNode),ct=a,Yt=s;break;case 5:yt||Nn(l,t);case 6:if(a=ct,s=Yt,ct=null,Wn(e,t,l),ct=a,Yt=s,ct!==null)if(Yt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode)}catch(f){Qe(l,t,f)}else try{ct.removeChild(l.stateNode)}catch(f){Qe(l,t,f)}break;case 18:ct!==null&&(Yt?(e=ct,Dg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ha(e)):Dg(ct,l.stateNode));break;case 4:a=ct,s=Yt,ct=l.stateNode.containerInfo,Yt=!0,Wn(e,t,l),ct=a,Yt=s;break;case 0:case 11:case 14:case 15:El(2,l,t),yt||El(4,l,t),Wn(e,t,l);break;case 1:yt||(Nn(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&jp(l,t,a)),Wn(e,t,l);break;case 21:Wn(e,t,l);break;case 22:yt=(a=yt)||l.memoizedState!==null,Wn(e,t,l),yt=a;break;default:Wn(e,t,l)}}function Vp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ha(e)}catch(l){Qe(t,t.return,l)}}}function qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ha(e)}catch(l){Qe(t,t.return,l)}}function g1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(i(435,e.tag))}}function Ri(e,t){var l=g1(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=T1.bind(null,e,a);a.then(s,s)}})}function Vt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],f=e,g=t,w=g;e:for(;w!==null;){switch(w.tag){case 27:if(Nl(w.type)){ct=w.stateNode,Yt=!1;break e}break;case 5:ct=w.stateNode,Yt=!1;break e;case 3:case 4:ct=w.stateNode.containerInfo,Yt=!0;break e}w=w.return}if(ct===null)throw Error(i(160));Yp(f,g,s),ct=null,Yt=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xp(t,e),t=t.sibling}var Sn=null;function Xp(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),qt(e),a&4&&(El(3,e,e.return),co(3,e),El(5,e,e.return));break;case 1:Vt(t,e),qt(e),a&512&&(yt||l===null||Nn(l,l.return)),a&64&&Jn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Sn;if(Vt(t,e),qt(e),a&512&&(yt||l===null||Nn(l,l.return)),a&4){var f=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":f=s.getElementsByTagName("title")[0],(!f||f[ka]||f[Tt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=s.createElement(a),s.head.insertBefore(f,s.querySelector("head > title"))),Rt(f,a,l),f[Tt]=e,wt(f),a=f;break e;case"link":var g=Xg("link","href",s).get(a+(l.href||""));if(g){for(var w=0;w<g.length;w++)if(f=g[w],f.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&f.getAttribute("rel")===(l.rel==null?null:l.rel)&&f.getAttribute("title")===(l.title==null?null:l.title)&&f.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){g.splice(w,1);break t}}f=s.createElement(a),Rt(f,a,l),s.head.appendChild(f);break;case"meta":if(g=Xg("meta","content",s).get(a+(l.content||""))){for(w=0;w<g.length;w++)if(f=g[w],f.getAttribute("content")===(l.content==null?null:""+l.content)&&f.getAttribute("name")===(l.name==null?null:l.name)&&f.getAttribute("property")===(l.property==null?null:l.property)&&f.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&f.getAttribute("charset")===(l.charSet==null?null:l.charSet)){g.splice(w,1);break t}}f=s.createElement(a),Rt(f,a,l),s.head.appendChild(f);break;default:throw Error(i(468,a))}f[Tt]=e,wt(f),a=f}e.stateNode=a}else Ig(s,e.type,e.stateNode);else e.stateNode=qg(s,a,e.memoizedProps);else f!==a?(f===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):f.count--,a===null?Ig(s,e.type,e.stateNode):qg(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ru(e,e.memoizedProps,l.memoizedProps)}break;case 27:Vt(t,e),qt(e),a&512&&(yt||l===null||Nn(l,l.return)),l!==null&&a&4&&Ru(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Vt(t,e),qt(e),a&512&&(yt||l===null||Nn(l,l.return)),e.flags&32){s=e.stateNode;try{kr(s,"")}catch(de){Qe(e,e.return,de)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Ru(e,s,l!==null?l.memoizedProps:s)),a&1024&&(zu=!0);break;case 6:if(Vt(t,e),qt(e),a&4){if(e.stateNode===null)throw Error(i(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(de){Qe(e,e.return,de)}}break;case 3:if(Ii=null,s=Sn,Sn=qi(t.containerInfo),Vt(t,e),Sn=s,qt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{ha(t.containerInfo)}catch(de){Qe(e,e.return,de)}zu&&(zu=!1,Ip(e));break;case 4:a=Sn,Sn=qi(e.stateNode.containerInfo),Vt(t,e),qt(e),Sn=a;break;case 12:Vt(t,e),qt(e);break;case 31:Vt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ri(e,a)));break;case 13:Vt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Oi=Ct()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ri(e,a)));break;case 22:s=e.memoizedState!==null;var R=l!==null&&l.memoizedState!==null,V=Jn,F=yt;if(Jn=V||s,yt=F||R,Vt(t,e),yt=F,Jn=V,qt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||R||Jn||yt||hr(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){R=l=t;try{if(f=R.stateNode,s)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{w=R.stateNode;var ee=R.memoizedProps.style,P=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;w.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(de){Qe(R,R.return,de)}}}else if(t.tag===6){if(l===null){R=t;try{R.stateNode.nodeValue=s?"":R.memoizedProps}catch(de){Qe(R,R.return,de)}}}else if(t.tag===18){if(l===null){R=t;try{var Q=R.stateNode;s?jg(Q,!0):jg(R.stateNode,!1)}catch(de){Qe(R,R.return,de)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Ri(e,l))));break;case 19:Vt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ri(e,a)));break;case 30:break;case 21:break;default:Vt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(kp(a)){l=a;break}a=a.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var s=l.stateNode,f=Nu(e);_i(e,f,s);break;case 5:var g=l.stateNode;l.flags&32&&(kr(g,""),l.flags&=-33);var w=Nu(e);_i(e,w,g);break;case 3:case 4:var R=l.stateNode.containerInfo,V=Nu(e);Ou(e,V,R);break;default:throw Error(i(161))}}catch(F){Qe(e,e.return,F)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ip(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ip(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function el(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bp(e,t.alternate,t),t=t.sibling}function hr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:El(4,t,t.return),hr(t);break;case 1:Nn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&jp(t,t.return,l),hr(t);break;case 27:bo(t.stateNode);case 26:case 5:Nn(t,t.return),hr(t);break;case 22:t.memoizedState===null&&hr(t);break;case 30:hr(t);break;default:hr(t)}e=e.sibling}}function tl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:tl(s,f,l),co(4,f);break;case 1:if(tl(s,f,l),a=f,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(V){Qe(a,a.return,V)}if(a=f,s=a.updateQueue,s!==null){var w=a.stateNode;try{var R=s.shared.hiddenCallbacks;if(R!==null)for(s.shared.hiddenCallbacks=null,s=0;s<R.length;s++)wm(R[s],w)}catch(V){Qe(a,a.return,V)}}l&&g&64&&Dp(f),so(f,f.return);break;case 27:Hp(f);case 26:case 5:tl(s,f,l),l&&a===null&&g&4&&Lp(f),so(f,f.return);break;case 12:tl(s,f,l);break;case 31:tl(s,f,l),l&&g&4&&Vp(s,f);break;case 13:tl(s,f,l),l&&g&4&&qp(s,f);break;case 22:f.memoizedState===null&&tl(s,f,l),so(f,f.return);break;case 30:break;default:tl(s,f,l)}t=t.sibling}}function Du(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Qa(l))}function ju(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qa(e))}function wn(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pp(e,t,l,a),t=t.sibling}function Pp(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:wn(e,t,l,a),s&2048&&co(9,t);break;case 1:wn(e,t,l,a);break;case 3:wn(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qa(e)));break;case 12:if(s&2048){wn(e,t,l,a),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,w=f.onPostCommit;typeof w=="function"&&w(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Qe(t,t.return,R)}}else wn(e,t,l,a);break;case 31:wn(e,t,l,a);break;case 13:wn(e,t,l,a);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?wn(e,t,l,a):uo(e,t):f._visibility&2?wn(e,t,l,a):(f._visibility|=2,na(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Du(g,t);break;case 24:wn(e,t,l,a),s&2048&&ju(t.alternate,t);break;default:wn(e,t,l,a)}}function na(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,w=l,R=a,V=g.flags;switch(g.tag){case 0:case 11:case 15:na(f,g,w,R,s),co(8,g);break;case 23:break;case 22:var F=g.stateNode;g.memoizedState!==null?F._visibility&2?na(f,g,w,R,s):uo(f,g):(F._visibility|=2,na(f,g,w,R,s)),s&&V&2048&&Du(g.alternate,g);break;case 24:na(f,g,w,R,s),s&&V&2048&&ju(g.alternate,g);break;default:na(f,g,w,R,s)}t=t.sibling}}function uo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:uo(l,a),s&2048&&Du(a.alternate,a);break;case 24:uo(l,a),s&2048&&ju(a.alternate,a);break;default:uo(l,a)}t=t.sibling}}var fo=8192;function la(e,t,l){if(e.subtreeFlags&fo)for(e=e.child;e!==null;)$p(e,t,l),e=e.sibling}function $p(e,t,l){switch(e.tag){case 26:la(e,t,l),e.flags&fo&&e.memoizedState!==null&&nw(l,Sn,e.memoizedState,e.memoizedProps);break;case 5:la(e,t,l);break;case 3:case 4:var a=Sn;Sn=qi(e.stateNode.containerInfo),la(e,t,l),Sn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=fo,fo=16777216,la(e,t,l),fo=a):la(e,t,l));break;default:la(e,t,l)}}function Kp(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 ho(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Et=a,Zp(a,e)}Kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 0:case 11:case 15:ho(e),e.flags&2048&&El(9,e,e.return);break;case 3:ho(e);break;case 12:ho(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ni(e)):ho(e);break;default:ho(e)}}function Ni(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Et=a,Zp(a,e)}Kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),Ni(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ni(t));break;default:Ni(t)}e=e.sibling}}function Zp(e,t){for(;Et!==null;){var l=Et;switch(l.tag){case 0:case 11:case 15:El(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Qa(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Et=a;else e:for(l=e;Et!==null;){a=Et;var s=a.sibling,f=a.return;if(Gp(a),a===l){Et=null;break e}if(s!==null){s.return=f,Et=s;break e}Et=f}}}var y1={getCacheForType:function(e){var t=Mt(mt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Mt(mt).controller.signal}},v1=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,ze=null,je=0,Ke=0,Ft=null,Cl=!1,ra=!1,Lu=!1,nl=0,ut=0,Tl=0,mr=0,ku=0,Jt=0,aa=0,mo=null,Xt=null,Hu=!1,Oi=0,Fp=0,zi=1/0,Di=null,Al=null,vt=0,Ml=null,oa=null,ll=0,Uu=0,Bu=null,Jp=null,po=0,Gu=null;function Wt(){return(Xe&2)!==0&&je!==0?je&-je:O.T!==null?Pu():mh()}function Wp(){if(Jt===0)if((je&536870912)===0||He){var e=St;St<<=1,(St&3932160)===0&&(St=262144),Jt=e}else Jt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Jt}function It(e,t,l){(e===tt&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(ia(e,0),_l(e,je,Jt,!1)),La(e,l),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(mr|=l),ut===4&&_l(e,je,Jt,!1)),On(e))}function eg(e,t,l){if((Xe&6)!==0)throw Error(i(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Gn(e,t),s=a?S1(e,t):Vu(e,t,!0),f=a;do{if(s===0){ra&&!a&&_l(e,t,0,!1);break}else{if(l=e.current.alternate,f&&!b1(l)){s=Vu(e,t,!1),f=!1;continue}if(s===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var w=e;s=mo;var R=w.current.memoizedState.isDehydrated;if(R&&(ia(w,g).flags|=256),g=Vu(w,g,!1),g!==2){if(Lu&&!R){w.errorRecoveryDisabledLanes|=f,mr|=f,s=4;break e}f=Xt,Xt=s,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}s=g}if(f=!1,s!==2)continue}}if(s===1){ia(e,0),_l(e,t,0,!0);break}e:{switch(a=e,f=s,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_l(a,t,Jt,!Cl);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=Oi+300-Ct(),10<s)){if(_l(a,t,Jt,!Cl),Mr(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=Og(tg.bind(null,a,l,Xt,Di,Hu,t,Jt,mr,aa,Cl,f,"Throttled",-0,0),s);break e}tg(a,l,Xt,Di,Hu,t,Jt,mr,aa,Cl,f,null,-0,0)}}break}while(!0);On(e)}function tg(e,t,l,a,s,f,g,w,R,V,F,ee,P,Q){if(e.timeoutHandle=-1,ee=t.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},$p(t,f,ee);var de=(f&62914560)===f?Oi-Ct():(f&4194048)===f?Fp-Ct():0;if(de=lw(ee,de),de!==null){ll=f,e.cancelPendingCommit=de(sg.bind(null,e,t,f,l,a,s,g,w,R,F,ee,null,P,Q)),_l(e,f,g,!V);return}}sg(e,t,f,l,a,s,g,w,R)}function b1(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],f=s.getSnapshot;s=s.value;try{if(!$t(f(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 _l(e,t,l,a){t&=~ku,t&=~mr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var f=31-rt(s),g=1<<f;a[f]=-1,s&=~g}l!==0&&fh(e,l,t)}function ji(){return(Xe&6)===0?(go(0),!1):!0}function Yu(){if(ze!==null){if(Ke===0)var e=ze.return;else e=ze,Pn=ar=null,lu(e),Fr=null,Fa=0,e=ze;for(;e!==null;)zp(e.alternate,e),e=e.return;ze=null}}function ia(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,B1(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Yu(),tt=e,ze=l=Xn(e.current,null),je=t,Ke=0,Ft=null,Cl=!1,ra=Gn(e,t),Lu=!1,aa=Jt=ku=mr=Tl=ut=0,Xt=mo=null,Hu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-rt(a),f=1<<s;t|=e[s],a&=~f}return nl=t,ti(),l}function ng(e,t){_e=null,O.H=ao,t===Zr||t===si?(t=vm(),Ke=3):t===Is?(t=vm(),Ke=4):Ke=t===bu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ft=t,ze===null&&(ut=1,Ei(e,cn(t,e.current)))}function lg(){var e=Qt.current;return e===null?!0:(je&4194048)===je?dn===null:(je&62914560)===je||(je&536870912)!==0?e===dn:!1}function rg(){var e=O.H;return O.H=ao,e===null?ao:e}function ag(){var e=O.A;return O.A=y1,e}function Li(){ut=4,Cl||(je&4194048)!==je&&Qt.current!==null||(ra=!0),(Tl&134217727)===0&&(mr&134217727)===0||tt===null||_l(tt,je,Jt,!1)}function Vu(e,t,l){var a=Xe;Xe|=2;var s=rg(),f=ag();(tt!==e||je!==t)&&(Di=null,ia(e,t)),t=!1;var g=ut;e:do try{if(Ke!==0&&ze!==null){var w=ze,R=Ft;switch(Ke){case 8:Yu(),g=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var V=Ke;if(Ke=0,Ft=null,ca(e,w,R,V),l&&ra){g=0;break e}break;default:V=Ke,Ke=0,Ft=null,ca(e,w,R,V)}}x1(),g=ut;break}catch(F){ng(e,F)}while(!0);return t&&e.shellSuspendCounter++,Pn=ar=null,Xe=a,O.H=s,O.A=f,ze===null&&(tt=null,je=0,ti()),g}function x1(){for(;ze!==null;)og(ze)}function S1(e,t){var l=Xe;Xe|=2;var a=rg(),s=ag();tt!==e||je!==t?(Di=null,zi=Ct()+500,ia(e,t)):ra=Gn(e,t);e:do try{if(Ke!==0&&ze!==null){t=ze;var f=Ft;t:switch(Ke){case 1:Ke=0,Ft=null,ca(e,t,f,1);break;case 2:case 9:if(gm(f)){Ke=0,Ft=null,ig(t);break}t=function(){Ke!==2&&Ke!==9||tt!==e||(Ke=7),On(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:gm(f)?(Ke=0,Ft=null,ig(t)):(Ke=0,Ft=null,ca(e,t,f,7));break;case 5:var g=null;switch(ze.tag){case 26:g=ze.memoizedState;case 5:case 27:var w=ze;if(g?Pg(g):w.stateNode.complete){Ke=0,Ft=null;var R=w.sibling;if(R!==null)ze=R;else{var V=w.return;V!==null?(ze=V,ki(V)):ze=null}break t}}Ke=0,Ft=null,ca(e,t,f,5);break;case 6:Ke=0,Ft=null,ca(e,t,f,6);break;case 8:Yu(),ut=6;break e;default:throw Error(i(462))}}w1();break}catch(F){ng(e,F)}while(!0);return Pn=ar=null,O.H=a,O.A=s,Xe=l,ze!==null?0:(tt=null,je=0,ti(),ut)}function w1(){for(;ze!==null&&!bn();)og(ze)}function og(e){var t=Np(e.alternate,e,nl);e.memoizedProps=e.pendingProps,t===null?ki(e):ze=t}function ig(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Cp(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=Cp(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:lu(t);default:zp(l,t),t=ze=am(t,nl),t=Np(l,t,nl)}e.memoizedProps=e.pendingProps,t===null?ki(e):ze=t}function ca(e,t,l,a){Pn=ar=null,lu(t),Fr=null,Fa=0;var s=t.return;try{if(u1(e,s,t,l,je)){ut=1,Ei(e,cn(l,e.current)),ze=null;return}}catch(f){if(s!==null)throw ze=s,f;ut=1,Ei(e,cn(l,e.current)),ze=null;return}t.flags&32768?(He||a===1?e=!0:ra||(je&536870912)!==0?e=!1:(Cl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Qt.current,a!==null&&a.tag===13&&(a.flags|=16384))),cg(t,e)):ki(t)}function ki(e){var t=e;do{if((t.flags&32768)!==0){cg(t,Cl);return}e=t.return;var l=h1(t.alternate,t,nl);if(l!==null){ze=l;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);ut===0&&(ut=5)}function cg(e,t){do{var l=m1(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);ut=6,ze=null}function sg(e,t,l,a,s,f,g,w,R){e.cancelPendingCommit=null;do Hi();while(vt!==0);if((Xe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=Ns,tS(e,l,f,g,w,R),e===tt&&(ze=tt=null,je=0),oa=t,Ml=e,ll=l,Uu=f,Bu=s,Jp=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,A1(ye,function(){return mg(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null,s=X.p,X.p=2,g=Xe,Xe|=4;try{p1(e,t,l)}finally{Xe=g,X.p=s,O.T=a}}vt=1,ug(),fg(),dg()}}function ug(){if(vt===1){vt=0;var e=Ml,t=oa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null;var a=X.p;X.p=2;var s=Xe;Xe|=4;try{Xp(t,e);var f=ef,g=Zh(e.containerInfo),w=f.focusedElem,R=f.selectionRange;if(g!==w&&w&&w.ownerDocument&&Qh(w.ownerDocument.documentElement,w)){if(R!==null&&Ts(w)){var V=R.start,F=R.end;if(F===void 0&&(F=V),"selectionStart"in w)w.selectionStart=V,w.selectionEnd=Math.min(F,w.value.length);else{var ee=w.ownerDocument||document,P=ee&&ee.defaultView||window;if(P.getSelection){var Q=P.getSelection(),de=w.textContent.length,Se=Math.min(R.start,de),et=R.end===void 0?Se:Math.min(R.end,de);!Q.extend&&Se>et&&(g=et,et=Se,Se=g);var U=Kh(w,Se),L=Kh(w,et);if(U&&L&&(Q.rangeCount!==1||Q.anchorNode!==U.node||Q.anchorOffset!==U.offset||Q.focusNode!==L.node||Q.focusOffset!==L.offset)){var Y=ee.createRange();Y.setStart(U.node,U.offset),Q.removeAllRanges(),Se>et?(Q.addRange(Y),Q.extend(L.node,L.offset)):(Y.setEnd(L.node,L.offset),Q.addRange(Y))}}}}for(ee=[],Q=w;Q=Q.parentNode;)Q.nodeType===1&&ee.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ee.length;w++){var W=ee[w];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Qi=!!Wu,ef=Wu=null}finally{Xe=s,X.p=a,O.T=l}}e.current=t,vt=2}}function fg(){if(vt===2){vt=0;var e=Ml,t=oa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=O.T,O.T=null;var a=X.p;X.p=2;var s=Xe;Xe|=4;try{Bp(e,t.alternate,t)}finally{Xe=s,X.p=a,O.T=l}}vt=3}}function dg(){if(vt===4||vt===3){vt=0,za();var e=Ml,t=oa,l=ll,a=Jp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,oa=Ml=null,hg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Al=null),os(l),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(lt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=O.T,s=X.p,X.p=2,O.T=null;try{for(var f=e.onRecoverableError,g=0;g<a.length;g++){var w=a[g];f(w.value,{componentStack:w.stack})}}finally{O.T=t,X.p=s}}(ll&3)!==0&&Hi(),On(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Gu?po++:(po=0,Gu=e):po=0,go(0)}}function hg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qa(t)))}function Hi(){return ug(),fg(),dg(),mg()}function mg(){if(vt!==5)return!1;var e=Ml,t=Uu;Uu=0;var l=os(ll),a=O.T,s=X.p;try{X.p=32>l?32:l,O.T=null,l=Bu,Bu=null;var f=Ml,g=ll;if(vt=0,oa=Ml=null,ll=0,(Xe&6)!==0)throw Error(i(331));var w=Xe;if(Xe|=4,Qp(f.current),Pp(f,f.current,g,l),Xe=w,go(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot=="function")try{Fe.onPostCommitFiberRoot(lt,f)}catch{}return!0}finally{X.p=s,O.T=a,hg(e,t)}}function pg(e,t,l){t=cn(l,t),t=vu(e.stateNode,t,2),e=xl(e,t,2),e!==null&&(La(e,2),On(e))}function Qe(e,t,l){if(e.tag===3)pg(e,e,l);else for(;t!==null;){if(t.tag===3){pg(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Al===null||!Al.has(a))){e=cn(l,e),l=gp(2),a=xl(t,l,2),a!==null&&(yp(l,a,t,e),La(a,2),On(a));break}}t=t.return}}function qu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new v1;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(Lu=!0,s.add(l),e=E1.bind(null,e,t,l),t.then(e,e))}function E1(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(je&l)===l&&(ut===4||ut===3&&(je&62914560)===je&&300>Ct()-Oi?(Xe&2)===0&&ia(e,0):ku|=l,aa===je&&(aa=0)),On(e)}function gg(e,t){t===0&&(t=Rr()),e=nr(e,t),e!==null&&(La(e,t),On(e))}function C1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),gg(e,l)}function T1(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(i(314))}a!==null&&a.delete(t),gg(e,l)}function A1(e,t){return yn(e,t)}var Ui=null,sa=null,Xu=!1,Bi=!1,Iu=!1,Rl=0;function On(e){e!==sa&&e.next===null&&(sa===null?Ui=sa=e:sa=sa.next=e),Bi=!0,Xu||(Xu=!0,_1())}function go(e,t){if(!Iu&&Bi){Iu=!0;do for(var l=!1,a=Ui;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var f=0;else{var g=a.suspendedLanes,w=a.pingedLanes;f=(1<<31-rt(42|e)+1)-1,f&=s&~(g&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,xg(a,f))}else f=je,f=Mr(a,a===tt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(f&3)===0||Gn(a,f)||(l=!0,xg(a,f));a=a.next}while(l);Iu=!1}}function M1(){yg()}function yg(){Bi=Xu=!1;var e=0;Rl!==0&&U1()&&(e=Rl);for(var t=Ct(),l=null,a=Ui;a!==null;){var s=a.next,f=vg(a,t);f===0?(a.next=null,l===null?Ui=s:l.next=s,s===null&&(sa=l)):(l=a,(e!==0||(f&3)!==0)&&(Bi=!0)),a=s}vt!==0&&vt!==5||go(e),Rl!==0&&(Rl=0)}function vg(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-rt(f),w=1<<g,R=s[g];R===-1?((w&l)===0||(w&a)!==0)&&(s[g]=_r(w,t)):R<=t&&(e.expiredLanes|=w),f&=~w}if(t=tt,l=je,l=Mr(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&vn(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Gn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&vn(a),os(l)){case 2:case 8:l=Ce;break;case 32:l=ye;break;case 268435456:l=$e;break;default:l=ye}return a=bg.bind(null,e),l=yn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&vn(a),e.callbackPriority=2,e.callbackNode=null,2}function bg(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Hi()&&e.callbackNode!==l)return null;var a=je;return a=Mr(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(eg(e,a,t),vg(e,Ct()),e.callbackNode!=null&&e.callbackNode===l?bg.bind(null,e):null)}function xg(e,t){if(Hi())return null;eg(e,t,!0)}function _1(){G1(function(){(Xe&6)!==0?yn(se,M1):yg()})}function Pu(){if(Rl===0){var e=Kr;e===0&&(e=Bn,Bn<<=1,(Bn&261888)===0&&(Bn=256)),Rl=e}return Rl}function Sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$o(""+e)}function wg(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function R1(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var f=Sg((s[Bt]||null).action),g=a.submitter;g&&(t=(t=g[Bt]||null)?Sg(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var w=new Fo("action","action",null,a,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Rl!==0){var R=g?wg(s,g):new FormData(s);du(l,{pending:!0,data:R,method:s.method,action:f},null,R)}}else typeof f=="function"&&(w.preventDefault(),R=g?wg(s,g):new FormData(s),du(l,{pending:!0,data:R,method:s.method,action:f},f,R))},currentTarget:s}]})}}for(var $u=0;$u<Rs.length;$u++){var Ku=Rs[$u],N1=Ku.toLowerCase(),O1=Ku[0].toUpperCase()+Ku.slice(1);xn(N1,"on"+O1)}xn(Wh,"onAnimationEnd"),xn(em,"onAnimationIteration"),xn(tm,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn($S,"onTransitionRun"),xn(KS,"onTransitionStart"),xn(QS,"onTransitionCancel"),xn(nm,"onTransitionEnd"),jr("onMouseEnter",["mouseout","mouseover"]),jr("onMouseLeave",["mouseout","mouseover"]),jr("onPointerEnter",["pointerout","pointerover"]),jr("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),z1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yo));function Eg(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var f=void 0;if(t)for(var g=a.length-1;0<=g;g--){var w=a[g],R=w.instance,V=w.currentTarget;if(w=w.listener,R!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=V;try{f(s)}catch(F){ei(F)}s.currentTarget=null,f=R}else for(g=0;g<a.length;g++){if(w=a[g],R=w.instance,V=w.currentTarget,w=w.listener,R!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=V;try{f(s)}catch(F){ei(F)}s.currentTarget=null,f=R}}}}function De(e,t){var l=t[is];l===void 0&&(l=t[is]=new Set);var a=e+"__bubble";l.has(a)||(Cg(t,e,2,!1),l.add(a))}function Qu(e,t,l){var a=0;t&&(a|=4),Cg(l,e,a,t)}var Gi="_reactListening"+Math.random().toString(36).slice(2);function Zu(e){if(!e[Gi]){e[Gi]=!0,yh.forEach(function(l){l!=="selectionchange"&&(z1.has(l)||Qu(l,!1,e),Qu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gi]||(t[Gi]=!0,Qu("selectionchange",!1,t))}}function Cg(e,t,l,a){switch(Wg(t)){case 2:var s=ow;break;case 8:s=iw;break;default:s=df}l=s.bind(null,t,l,e),s=void 0,!gs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Fu(e,t,l,a,s){var f=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var w=a.stateNode.containerInfo;if(w===s)break;if(g===4)for(g=a.return;g!==null;){var R=g.tag;if((R===3||R===4)&&g.stateNode.containerInfo===s)return;g=g.return}for(;w!==null;){if(g=Or(w),g===null)return;if(R=g.tag,R===5||R===6||R===26||R===27){a=f=g;continue e}w=w.parentNode}}a=a.return}Rh(function(){var V=f,F=ms(l),ee=[];e:{var P=lm.get(e);if(P!==void 0){var Q=Fo,de=e;switch(e){case"keypress":if(Qo(l)===0)break e;case"keydown":case"keyup":Q=TS;break;case"focusin":de="focus",Q=xs;break;case"focusout":de="blur",Q=xs;break;case"beforeblur":case"afterblur":Q=xs;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=hS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=_S;break;case Wh:case em:case tm:Q=gS;break;case nm:Q=NS;break;case"scroll":case"scrollend":Q=fS;break;case"wheel":Q=zS;break;case"copy":case"cut":case"paste":Q=vS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=jh;break;case"toggle":case"beforetoggle":Q=jS}var Se=(t&4)!==0,et=!Se&&(e==="scroll"||e==="scrollend"),U=Se?P!==null?P+"Capture":null:P;Se=[];for(var L=V,Y;L!==null;){var W=L;if(Y=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||Y===null||U===null||(W=Ua(L,U),W!=null&&Se.push(vo(L,W,Y))),et)break;L=L.return}0<Se.length&&(P=new Q(P,de,null,l,F),ee.push({event:P,listeners:Se}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",P&&l!==hs&&(de=l.relatedTarget||l.fromElement)&&(Or(de)||de[Nr]))break e;if((Q||P)&&(P=F.window===F?F:(P=F.ownerDocument)?P.defaultView||P.parentWindow:window,Q?(de=l.relatedTarget||l.toElement,Q=V,de=de?Or(de):null,de!==null&&(et=u(de),Se=de.tag,de!==et||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(Q=null,de=V),Q!==de)){if(Se=zh,W="onMouseLeave",U="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Se=jh,W="onPointerLeave",U="onPointerEnter",L="pointer"),et=Q==null?P:Ha(Q),Y=de==null?P:Ha(de),P=new Se(W,L+"leave",Q,l,F),P.target=et,P.relatedTarget=Y,W=null,Or(F)===V&&(Se=new Se(U,L+"enter",de,l,F),Se.target=Y,Se.relatedTarget=et,W=Se),et=W,Q&&de)t:{for(Se=D1,U=Q,L=de,Y=0,W=U;W;W=Se(W))Y++;W=0;for(var ve=L;ve;ve=Se(ve))W++;for(;0<Y-W;)U=Se(U),Y--;for(;0<W-Y;)L=Se(L),W--;for(;Y--;){if(U===L||L!==null&&U===L.alternate){Se=U;break t}U=Se(U),L=Se(L)}Se=null}else Se=null;Q!==null&&Tg(ee,P,Q,Se,!1),de!==null&&et!==null&&Tg(ee,et,de,Se,!0)}}e:{if(P=V?Ha(V):window,Q=P.nodeName&&P.nodeName.toLowerCase(),Q==="select"||Q==="input"&&P.type==="file")var Ye=Vh;else if(Gh(P))if(qh)Ye=XS;else{Ye=VS;var ge=YS}else Q=P.nodeName,!Q||Q.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?V&&ds(V.elementType)&&(Ye=Vh):Ye=qS;if(Ye&&(Ye=Ye(e,V))){Yh(ee,Ye,l,F);break e}ge&&ge(e,P,V),e==="focusout"&&V&&P.type==="number"&&V.memoizedProps.value!=null&&fs(P,"number",P.value)}switch(ge=V?Ha(V):window,e){case"focusin":(Gh(ge)||ge.contentEditable==="true")&&(Gr=ge,As=V,Pa=null);break;case"focusout":Pa=As=Gr=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,Fh(ee,l,F);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":Fh(ee,l,F)}var Re;if(ws)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Br?Uh(e,l)&&(Le="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Le="onCompositionStart");Le&&(Lh&&l.locale!=="ko"&&(Br||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Br&&(Re=Nh()):(hl=F,ys="value"in hl?hl.value:hl.textContent,Br=!0)),ge=Yi(V,Le),0<ge.length&&(Le=new Dh(Le,e,null,l,F),ee.push({event:Le,listeners:ge}),Re?Le.data=Re:(Re=Bh(l),Re!==null&&(Le.data=Re)))),(Re=kS?HS(e,l):US(e,l))&&(Le=Yi(V,"onBeforeInput"),0<Le.length&&(ge=new Dh("onBeforeInput","beforeinput",null,l,F),ee.push({event:ge,listeners:Le}),ge.data=Re)),R1(ee,e,V,l,F)}Eg(ee,t)})}function vo(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Yi(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,f=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||f===null||(s=Ua(e,l),s!=null&&a.unshift(vo(e,s,f)),s=Ua(e,t),s!=null&&a.push(vo(e,s,f))),e.tag===3)return a;e=e.return}return[]}function D1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Tg(e,t,l,a,s){for(var f=t._reactName,g=[];l!==null&&l!==a;){var w=l,R=w.alternate,V=w.stateNode;if(w=w.tag,R!==null&&R===a)break;w!==5&&w!==26&&w!==27||V===null||(R=V,s?(V=Ua(l,f),V!=null&&g.unshift(vo(l,V,R))):s||(V=Ua(l,f),V!=null&&g.push(vo(l,V,R)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var j1=/\r\n?/g,L1=/\u0000|\uFFFD/g;function Ag(e){return(typeof e=="string"?e:""+e).replace(j1,`
|
|
49
|
+
`).replace(L1,"")}function Mg(e,t){return t=Ag(t),Ag(e)===t}function We(e,t,l,a,s,f){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||kr(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&kr(e,""+a);break;case"className":Io(e,"class",a);break;case"tabIndex":Io(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Io(e,l,a);break;case"style":Mh(e,a,f);break;case"data":if(t!=="object"){Io(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=$o(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(t!=="input"&&We(e,t,"name",s.name,s,null),We(e,t,"formEncType",s.formEncType,s,null),We(e,t,"formMethod",s.formMethod,s,null),We(e,t,"formTarget",s.formTarget,s,null)):(We(e,t,"encType",s.encType,s,null),We(e,t,"method",s.method,s,null),We(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=$o(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(i(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=$o(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":De("beforetoggle",e),De("toggle",e),Xo(e,"popover",a);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Xo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=sS.get(l)||l,Xo(e,l,a))}}function Ju(e,t,l,a,s,f){switch(l){case"style":Mh(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(i(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=l}}break;case"children":typeof a=="string"?kr(e,a):(typeof a=="number"||typeof a=="bigint")&&kr(e,""+a);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),f=e[Bt]||null,f=f!=null?f[l]:null,typeof f=="function"&&e.removeEventListener(t,f,s),typeof a=="function")){typeof f!="function"&&f!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Xo(e,l,a)}}}function Rt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var a=!1,s=!1,f;for(f in l)if(l.hasOwnProperty(f)){var g=l[f];if(g!=null)switch(f){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:We(e,t,f,g,l,null)}}s&&We(e,t,"srcSet",l.srcSet,l,null),a&&We(e,t,"src",l.src,l,null);return;case"input":De("invalid",e);var w=f=g=s=null,R=null,V=null;for(a in l)if(l.hasOwnProperty(a)){var F=l[a];if(F!=null)switch(a){case"name":s=F;break;case"type":g=F;break;case"checked":R=F;break;case"defaultChecked":V=F;break;case"value":f=F;break;case"defaultValue":w=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,t));break;default:We(e,t,a,F,l,null)}}Eh(e,f,w,R,V,g,s,!1);return;case"select":De("invalid",e),a=g=f=null;for(s in l)if(l.hasOwnProperty(s)&&(w=l[s],w!=null))switch(s){case"value":f=w;break;case"defaultValue":g=w;break;case"multiple":a=w;default:We(e,t,s,w,l,null)}t=f,l=g,e.multiple=!!a,t!=null?Lr(e,!!a,t,!1):l!=null&&Lr(e,!!a,l,!0);return;case"textarea":De("invalid",e),f=s=a=null;for(g in l)if(l.hasOwnProperty(g)&&(w=l[g],w!=null))switch(g){case"value":a=w;break;case"defaultValue":s=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:We(e,t,g,w,l,null)}Th(e,a,s,f);return;case"option":for(R in l)if(l.hasOwnProperty(R)&&(a=l[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:We(e,t,R,a,l,null)}return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(a=0;a<yo.length;a++)De(yo[a],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(V in l)if(l.hasOwnProperty(V)&&(a=l[V],a!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:We(e,t,V,a,l,null)}return;default:if(ds(t)){for(F in l)l.hasOwnProperty(F)&&(a=l[F],a!==void 0&&Ju(e,t,F,a,l,void 0));return}}for(w in l)l.hasOwnProperty(w)&&(a=l[w],a!=null&&We(e,t,w,a,l,null))}function k1(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,f=null,g=null,w=null,R=null,V=null,F=null;for(Q in l){var ee=l[Q];if(l.hasOwnProperty(Q)&&ee!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":R=ee;default:a.hasOwnProperty(Q)||We(e,t,Q,null,a,ee)}}for(var P in a){var Q=a[P];if(ee=l[P],a.hasOwnProperty(P)&&(Q!=null||ee!=null))switch(P){case"type":f=Q;break;case"name":s=Q;break;case"checked":V=Q;break;case"defaultChecked":F=Q;break;case"value":g=Q;break;case"defaultValue":w=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:Q!==ee&&We(e,t,P,Q,a,ee)}}us(e,g,w,R,V,F,f,s);return;case"select":Q=g=w=P=null;for(f in l)if(R=l[f],l.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":Q=R;default:a.hasOwnProperty(f)||We(e,t,f,null,a,R)}for(s in a)if(f=a[s],R=l[s],a.hasOwnProperty(s)&&(f!=null||R!=null))switch(s){case"value":P=f;break;case"defaultValue":w=f;break;case"multiple":g=f;default:f!==R&&We(e,t,s,f,a,R)}t=w,l=g,a=Q,P!=null?Lr(e,!!l,P,!1):!!a!=!!l&&(t!=null?Lr(e,!!l,t,!0):Lr(e,!!l,l?[]:"",!1));return;case"textarea":Q=P=null;for(w in l)if(s=l[w],l.hasOwnProperty(w)&&s!=null&&!a.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:We(e,t,w,null,a,s)}for(g in a)if(s=a[g],f=l[g],a.hasOwnProperty(g)&&(s!=null||f!=null))switch(g){case"value":P=s;break;case"defaultValue":Q=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==f&&We(e,t,g,s,a,f)}Ch(e,P,Q);return;case"option":for(var de in l)if(P=l[de],l.hasOwnProperty(de)&&P!=null&&!a.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:We(e,t,de,null,a,P)}for(R in a)if(P=a[R],Q=l[R],a.hasOwnProperty(R)&&P!==Q&&(P!=null||Q!=null))switch(R){case"selected":e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:We(e,t,R,P,a,Q)}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 Se in l)P=l[Se],l.hasOwnProperty(Se)&&P!=null&&!a.hasOwnProperty(Se)&&We(e,t,Se,null,a,P);for(V in a)if(P=a[V],Q=l[V],a.hasOwnProperty(V)&&P!==Q&&(P!=null||Q!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,t));break;default:We(e,t,V,P,a,Q)}return;default:if(ds(t)){for(var et in l)P=l[et],l.hasOwnProperty(et)&&P!==void 0&&!a.hasOwnProperty(et)&&Ju(e,t,et,void 0,a,P);for(F in a)P=a[F],Q=l[F],!a.hasOwnProperty(F)||P===Q||P===void 0&&Q===void 0||Ju(e,t,F,P,a,Q);return}}for(var U in l)P=l[U],l.hasOwnProperty(U)&&P!=null&&!a.hasOwnProperty(U)&&We(e,t,U,null,a,P);for(ee in a)P=a[ee],Q=l[ee],!a.hasOwnProperty(ee)||P===Q||P==null&&Q==null||We(e,t,ee,P,a,Q)}function _g(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],f=s.transferSize,g=s.initiatorType,w=s.duration;if(f&&w&&_g(g)){for(g=0,w=s.responseEnd,a+=1;a<l.length;a++){var R=l[a],V=R.startTime;if(V>w)break;var F=R.transferSize,ee=R.initiatorType;F&&_g(ee)&&(R=R.responseEnd,g+=F*(R<w?1:(w-V)/(R-V)))}if(--a,t+=8*(f+g)/(s.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 Wu=null,ef=null;function Vi(e){return e.nodeType===9?e:e.ownerDocument}function Rg(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 Ng(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 tf(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 nf=null;function U1(){var e=window.event;return e&&e.type==="popstate"?e===nf?!1:(nf=e,!0):(nf=null,!1)}var Og=typeof setTimeout=="function"?setTimeout:void 0,B1=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,G1=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(Y1)}:Og;function Y1(e){setTimeout(function(){throw e})}function Nl(e){return e==="head"}function Dg(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),ha(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")bo(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,bo(l);for(var f=l.firstChild;f;){var g=f.nextSibling,w=f.nodeName;f[ka]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||l.removeChild(f),f=g}}else l==="body"&&bo(e.ownerDocument.body);l=s}while(l);ha(t)}function jg(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function lf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":lf(l),cs(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function V1(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ka])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!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=hn(e.nextSibling),e===null)break}return null}function q1(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=hn(e.nextSibling),e===null))return null;return e}function Lg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=hn(e.nextSibling),e===null))return null;return e}function rf(e){return e.data==="$?"||e.data==="$~"}function af(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function X1(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function hn(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 of=null;function kg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return hn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Hg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Ug(e,t,l){switch(t=Vi(l),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 bo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);cs(e)}var mn=new Map,Bg=new Set;function qi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rl=X.d;X.d={f:I1,r:P1,D:$1,C:K1,L:Q1,m:Z1,X:J1,S:F1,M:W1};function I1(){var e=rl.f(),t=ji();return e||t}function P1(e){var t=zr(e);t!==null&&t.tag===5&&t.type==="form"?np(t):rl.r(e)}var ua=typeof document>"u"?null:document;function Gg(e,t,l){var a=ua;if(a&&typeof t=="string"&&t){var s=an(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Bg.has(s)||(Bg.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Rt(t,"link",e),wt(t),a.head.appendChild(t)))}}function $1(e){rl.D(e),Gg("dns-prefetch",e,null)}function K1(e,t){rl.C(e,t),Gg("preconnect",e,t)}function Q1(e,t,l){rl.L(e,t,l);var a=ua;if(a&&e&&t){var s='link[rel="preload"][as="'+an(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+an(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+an(l.imageSizes)+'"]')):s+='[href="'+an(e)+'"]';var f=s;switch(t){case"style":f=fa(e);break;case"script":f=da(e)}mn.has(f)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),mn.set(f,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(xo(f))||t==="script"&&a.querySelector(So(f))||(t=a.createElement("link"),Rt(t,"link",e),wt(t),a.head.appendChild(t)))}}function Z1(e,t){rl.m(e,t);var l=ua;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+an(a)+'"][href="'+an(e)+'"]',f=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=da(e)}if(!mn.has(f)&&(e=b({rel:"modulepreload",href:e},t),mn.set(f,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(So(f)))return}a=l.createElement("link"),Rt(a,"link",e),wt(a),l.head.appendChild(a)}}}function F1(e,t,l){rl.S(e,t,l);var a=ua;if(a&&e){var s=Dr(a).hoistableStyles,f=fa(e);t=t||"default";var g=s.get(f);if(!g){var w={loading:0,preload:null};if(g=a.querySelector(xo(f)))w.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=mn.get(f))&&cf(e,l);var R=g=a.createElement("link");wt(R),Rt(R,"link",e),R._p=new Promise(function(V,F){R.onload=V,R.onerror=F}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Xi(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:w},s.set(f,g)}}}function J1(e,t){rl.X(e,t);var l=ua;if(l&&e){var a=Dr(l).hoistableScripts,s=da(e),f=a.get(s);f||(f=l.querySelector(So(s)),f||(e=b({src:e,async:!0},t),(t=mn.get(s))&&sf(e,t),f=l.createElement("script"),wt(f),Rt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function W1(e,t){rl.M(e,t);var l=ua;if(l&&e){var a=Dr(l).hoistableScripts,s=da(e),f=a.get(s);f||(f=l.querySelector(So(s)),f||(e=b({src:e,async:!0,type:"module"},t),(t=mn.get(s))&&sf(e,t),f=l.createElement("script"),wt(f),Rt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function Yg(e,t,l,a){var s=(s=ue.current)?qi(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=fa(l.href),l=Dr(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=fa(l.href);var f=Dr(s).hoistableStyles,g=f.get(e);if(g||(s=s.ownerDocument||s,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=s.querySelector(xo(e)))&&!f._p&&(g.instance=f,g.state.loading=5),mn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},mn.set(e,l),f||ew(s,e,l,g.state))),t&&a===null)throw Error(i(528,""));return g}if(t&&a!==null)throw Error(i(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=da(l),l=Dr(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function fa(e){return'href="'+an(e)+'"'}function xo(e){return'link[rel="stylesheet"]['+e+"]"}function Vg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function ew(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Rt(t,"link",l),wt(t),e.head.appendChild(t))}function da(e){return'[src="'+an(e)+'"]'}function So(e){return"script[async]"+e}function qg(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+an(l.href)+'"]');if(a)return t.instance=a,wt(a),a;var s=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),wt(a),Rt(a,"style",s),Xi(a,l.precedence,e),t.instance=a;case"stylesheet":s=fa(l.href);var f=e.querySelector(xo(s));if(f)return t.state.loading|=4,t.instance=f,wt(f),f;a=Vg(l),(s=mn.get(s))&&cf(a,s),f=(e.ownerDocument||e).createElement("link"),wt(f);var g=f;return g._p=new Promise(function(w,R){g.onload=w,g.onerror=R}),Rt(f,"link",a),t.state.loading|=4,Xi(f,l.precedence,e),t.instance=f;case"script":return f=da(l.src),(s=e.querySelector(So(f)))?(t.instance=s,wt(s),s):(a=l,(s=mn.get(f))&&(a=b({},l),sf(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),wt(s),Rt(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Xi(a,l.precedence,e));return t.instance}function Xi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,f=s,g=0;g<a.length;g++){var w=a[g];if(w.dataset.precedence===t)f=w;else if(f!==s)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function cf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ii=null;function Xg(e,t,l){if(Ii===null){var a=new Map,s=Ii=new Map;s.set(l,a)}else s=Ii,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var f=l[s];if(!(f[ka]||f[Tt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var w=a.get(g);w?w.push(f):a.set(g,[f])}}return a}function Ig(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function tw(e,t,l){if(l===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 Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function nw(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=fa(a.href),f=t.querySelector(xo(s));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Pi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,wt(f);return}f=t.ownerDocument||t,a=Vg(a),(s=mn.get(s))&&cf(a,s),f=f.createElement("link"),wt(f);var g=f;g._p=new Promise(function(w,R){g.onload=w,g.onerror=R}),Rt(f,"link",a),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Pi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var uf=0;function lw(e,t){return e.stylesheets&&e.count===0&&Ki(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ki(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&uf===0&&(uf=62500*H1());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ki(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>uf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Pi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ki(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $i=null;function Ki(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$i=new Map,t.forEach(rw,e),$i=null,Pi.call(e))}function rw(e,t){if(!(t.state.loading&4)){var l=$i.get(e);if(l)var a=l.get(null);else{l=new Map,$i.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<s.length;f++){var g=s[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}s=t.instance,g=s.getAttribute("data-precedence"),f=l.get(g)||a,f===a&&l.set(null,s),l.set(g,s),this.count++,a=Pi.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),f?f.parentNode.insertBefore(s,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var wo={$$typeof:k,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function aw(e,t,l,a,s,f,g,w,R){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=ja(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ja(0),this.hiddenUpdates=ja(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function $g(e,t,l,a,s,f,g,w,R,V,F,ee){return e=new aw(e,t,l,g,R,V,F,ee,w),t=1,f===!0&&(t|=24),f=Kt(3,null,null,t),e.current=f,f.stateNode=e,t=Vs(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:a,isDehydrated:l,cache:t},Ps(f),e}function Kg(e){return e?(e=qr,e):qr}function Qg(e,t,l,a,s,f){s=Kg(s),a.context===null?a.context=s:a.pendingContext=s,a=bl(t),a.payload={element:l},f=f===void 0?null:f,f!==null&&(a.callback=f),l=xl(e,a,t),l!==null&&(It(l,e,t),Wa(l,e,t))}function Zg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ff(e,t){Zg(e,t),(e=e.alternate)&&Zg(e,t)}function Fg(e){if(e.tag===13||e.tag===31){var t=nr(e,67108864);t!==null&&It(t,e,67108864),ff(e,67108864)}}function Jg(e){if(e.tag===13||e.tag===31){var t=Wt();t=as(t);var l=nr(e,t);l!==null&&It(l,e,t),ff(e,t)}}var Qi=!0;function ow(e,t,l,a){var s=O.T;O.T=null;var f=X.p;try{X.p=2,df(e,t,l,a)}finally{X.p=f,O.T=s}}function iw(e,t,l,a){var s=O.T;O.T=null;var f=X.p;try{X.p=8,df(e,t,l,a)}finally{X.p=f,O.T=s}}function df(e,t,l,a){if(Qi){var s=hf(a);if(s===null)Fu(e,t,a,Zi,l),ey(e,a);else if(sw(s,e,t,l,a))a.stopPropagation();else if(ey(e,a),t&4&&-1<cw.indexOf(e)){for(;s!==null;){var f=zr(s);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=Ut(f.pendingLanes);if(g!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;g;){var R=1<<31-rt(g);w.entanglements[1]|=R,g&=~R}On(f),(Xe&6)===0&&(zi=Ct()+500,go(0))}}break;case 31:case 13:w=nr(f,2),w!==null&&It(w,f,2),ji(),ff(f,2)}if(f=hf(a),f===null&&Fu(e,t,a,Zi,l),f===s)break;s=f}s!==null&&a.stopPropagation()}else Fu(e,t,a,null,l)}}function hf(e){return e=ms(e),mf(e)}var Zi=null;function mf(e){if(Zi=null,e=Or(e),e!==null){var t=u(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Zi=e,null}function Wg(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(Un()){case se:return 2;case Ce:return 8;case ye:case Be:return 32;case $e:return 268435456;default:return 32}default:return 32}}var pf=!1,Ol=null,zl=null,Dl=null,Eo=new Map,Co=new Map,jl=[],cw="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 ey(e,t){switch(e){case"focusin":case"focusout":Ol=null;break;case"dragenter":case"dragleave":zl=null;break;case"mouseover":case"mouseout":Dl=null;break;case"pointerover":case"pointerout":Eo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Co.delete(t.pointerId)}}function To(e,t,l,a,s,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:f,targetContainers:[s]},t!==null&&(t=zr(t),t!==null&&Fg(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function sw(e,t,l,a,s){switch(t){case"focusin":return Ol=To(Ol,e,t,l,a,s),!0;case"dragenter":return zl=To(zl,e,t,l,a,s),!0;case"mouseover":return Dl=To(Dl,e,t,l,a,s),!0;case"pointerover":var f=s.pointerId;return Eo.set(f,To(Eo.get(f)||null,e,t,l,a,s)),!0;case"gotpointercapture":return f=s.pointerId,Co.set(f,To(Co.get(f)||null,e,t,l,a,s)),!0}return!1}function ty(e){var t=Or(e.target);if(t!==null){var l=u(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,ph(e.priority,function(){Jg(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,ph(e.priority,function(){Jg(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=hf(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);hs=a,l.target.dispatchEvent(a),hs=null}else return t=zr(l),t!==null&&Fg(t),e.blockedOn=l,!1;t.shift()}return!0}function ny(e,t,l){Fi(e)&&l.delete(t)}function uw(){pf=!1,Ol!==null&&Fi(Ol)&&(Ol=null),zl!==null&&Fi(zl)&&(zl=null),Dl!==null&&Fi(Dl)&&(Dl=null),Eo.forEach(ny),Co.forEach(ny)}function Ji(e,t){e.blockedOn===t&&(e.blockedOn=null,pf||(pf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,uw)))}var Wi=null;function ly(e){Wi!==e&&(Wi=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Wi===e&&(Wi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(mf(a||l)===null)continue;break}var f=zr(l);f!==null&&(e.splice(t,3),t-=3,du(f,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function ha(e){function t(R){return Ji(R,e)}Ol!==null&&Ji(Ol,e),zl!==null&&Ji(zl,e),Dl!==null&&Ji(Dl,e),Eo.forEach(t),Co.forEach(t);for(var l=0;l<jl.length;l++){var a=jl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<jl.length&&(l=jl[0],l.blockedOn===null);)ty(l),l.blockedOn===null&&jl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],f=l[a+1],g=s[Bt]||null;if(typeof f=="function")g||ly(l);else if(g){var w=null;if(f&&f.hasAttribute("formAction")){if(s=f,g=f[Bt]||null)w=g.formAction;else if(mf(s)!==null)continue}else w=g.action;typeof w=="function"?l[a+1]=w:(l.splice(a,3),a-=3),ly(l)}}}function ry(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return s=g})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!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 a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function gf(e){this._internalRoot=e}ec.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var l=t.current,a=Wt();Qg(l,a,e,t,null,null)},ec.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qg(e.current,2,null,e,null,null),ji(),t[Nr]=null}};function ec(e){this._internalRoot=e}ec.prototype.unstable_scheduleHydration=function(e){if(e){var t=mh();e={blockedOn:null,target:e,priority:t};for(var l=0;l<jl.length&&t!==0&&t<jl[l].priority;l++);jl.splice(l,0,e),l===0&&ty(e)}};var ay=r.version;if(ay!=="19.2.5")throw Error(i(527,ay,"19.2.5"));X.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=p(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var fw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{lt=tc.inject(fw),Fe=tc}catch{}}return Mo.createRoot=function(e,t){if(!c(e))throw Error(i(299));var l=!1,a="",s=dp,f=hp,g=mp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=$g(e,1,!1,null,null,l,a,null,s,f,g,ry),e[Nr]=t.current,Zu(e),new gf(t)},Mo.hydrateRoot=function(e,t,l){if(!c(e))throw Error(i(299));var a=!1,s="",f=dp,g=hp,w=mp,R=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(f=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError),l.formState!==void 0&&(R=l.formState)),t=$g(e,1,!0,t,l??null,a,s,R,f,g,w,ry),t.context=Kg(null),l=t.current,a=Wt(),a=as(a),s=bl(a),s.callback=null,xl(l,s,a),l=a,t.current.lanes=l,La(t,l),On(t),e[Nr]=t.current,Zu(e),new ec(t)},Mo.version="19.2.5",Mo}var py;function Sw(){if(py)return bf.exports;py=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(r){console.error(r)}}return n(),bf.exports=xw(),bf.exports}var ww=Sw();const Ew=Cd(ww),Te="data-editor-id",br="data-slide-root",xr=1920,Sr=1080;function Ad(n){return`[${Te}="${n}"]`}function Cw(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function kv(n,r){return`${r}-${n+1}`}function gy(n,r){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:r}function Tw(n){return Cw(n)}function Ec(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Hv(n){const r=n.querySelector(`[${br}]`);if(r)return r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(xr)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(Sr)),r;const o=n.querySelector(".slide-container");return o?(o.setAttribute(br,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(xr)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Sr)),o):null}function Aw(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function Mw(n){const r=Ec(n);if(!r)return n;const o=Hv(r),i=Array.from(r.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Te)&&o.setAttribute(Te,"slide-root"),i.forEach((c,u)=>{if(!c.getAttribute(Te)){const d=c.getAttribute("data-editable")||"block";c.setAttribute(Te,kv(u,d))}}),Aw(r)}function Bl(n,r="slide-1"){var E;if(!Ec(n))return{id:r,title:"Untitled Slide",htmlSource:n,rootSelector:`[${br}]`,width:xr,height:Sr,elements:[]};const i=Mw(n),c=Ec(i);if(!c)return{id:r,title:"Untitled Slide",htmlSource:i,rootSelector:`[${br}]`,width:xr,height:Sr,elements:[]};const u=Hv(c),d=Array.from(c.querySelectorAll("[data-editable]")),h=u!=null&&u.getAttribute(Te)?`[${Te}="${u.getAttribute(Te)}"]`:`[${br}]`,m=gy((u==null?void 0:u.getAttribute("data-slide-width"))??null,xr),p=gy((u==null?void 0:u.getAttribute("data-slide-height"))??null,Sr),v=d.map((T,C)=>{const A=T.getAttribute("data-editable")||"block",N=T.getAttribute(Te)||kv(C,A);return{id:N,selector:Ad(N),type:A==="block"&&T.getAttribute("data-group")==="true"?"group":A,content:T instanceof HTMLImageElement?T.src:T.textContent||"",tagName:T.tagName.toLowerCase()}}),b=c.querySelector("h1, h2, title"),S=((E=b==null?void 0:b.textContent)==null?void 0:E.trim())||`Slide ${r}`;return{id:Tw(r),title:S,htmlSource:i,rootSelector:h,width:m,height:p,elements:v}}function Ze(n,r){return n.querySelector(Ad(r))}function _w(n,r,o){const i=Ec(n.htmlSource);if(!i)return"";const c=Ze(i,r);return(c==null?void 0:c.style.getPropertyValue(o).trim())||""}function Pl(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Md(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function Aa(n,r){const o=Pl(n);return o?(r(o),Md(o)):n}const _d=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Uv(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Do(n){const r=Uv();for(const o of _d){const i=n.style[o];r[o]=i||null}return r}function $f(n){return{...Uv(),...n}}function Cn(n){const r=n||"",o=r.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=r.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:o&&Number.parseFloat(o[1]||"0")||0,translateY:o&&Number.parseFloat(o[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function Ef(n){return Math.round(n*100)/100}function il(n,r,o){const i=[];return(Math.abs(n)>.01||Math.abs(r)>.01)&&i.push(`translate(${Ef(n)}px, ${Ef(r)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Ef(o)}deg)`),i.length?i.join(" "):null}function zo(n,r,o){return{x:o.offsetX+(n.left-r.left)*o.scale,y:o.offsetY+(n.top-r.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function pr(n,r){return{...r,sourceFile:n.sourceFile}}function Bv(n,r){if(n.id!==r.slideId)return n;switch(r.type){case"operation.batch":return r.operations.reduce((o,i)=>Bv(o,i),n);case"text.update":return pr(n,Bl(Rw(n.htmlSource,r.elementId,r.nextText),n.id));case"style.update":return pr(n,Bl(Nw(n.htmlSource,r.elementId,r.propertyName,r.nextValue),n.id));case"attribute.update":return pr(n,Bl(Ow(n.htmlSource,r.elementId,r.attributeName,r.nextValue),n.id));case"element.layout.update":return pr(n,Bl(Dw(n.htmlSource,r.elementId,r.nextStyle),n.id));case"element.insert":return pr(n,Bl(jw(n.htmlSource,r),n.id));case"element.remove":return pr(n,Bl(Lw(n.htmlSource,r.elementId),n.id));case"group.create":case"group.ungroup":return pr(n,Bl(r.nextHtmlSource,n.id))}}function Gv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(r=>Gv(r)).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}}}function nc(n){const r=Number.parseFloat(n||"");return Number.isFinite(r)?r:0}function yy(n){const r=Cn(n.style.transform);return{x:nc(n.style.left)+r.translateX,y:nc(n.style.top)+r.translateY,width:nc(n.style.width)||xr,height:nc(n.style.height)||Sr}}function Cc(n,r={}){let o=n,i=0,c=0;const u=n.getAttribute(Te)??"",d=r[u]??yy(n),h=d.width,m=d.height;for(;o;){const p=o.getAttribute(Te)??"",v=r[p]??yy(o);i+=v.x,c+=v.y;const b=o.parentElement;if(!b||!b.hasAttribute("data-editable"))break;o=b}return{x:i,y:c,width:h,height:m}}function Yv(n,r={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Cc(o,r);return{x:i.x,y:i.y}}function Kf(n,r){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(r.x*100)/100}px`,n.style.top=`${Math.round(r.y*100)/100}px`,n.style.width=`${Math.round(r.width*100)/100}px`,n.style.height=`${Math.round(r.height*100)/100}px`;const o=Cn(n.style.transform),i=il(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Cf(n){const r=n.parentElement;return r&&(r.hasAttribute(br)||r.hasAttribute("data-editable"))?r:null}function Qf(n){return Array.from(n.children).filter(r=>r instanceof HTMLElement&&r.hasAttribute("data-editable"))}function Rw(n,r,o){return Aa(n,i=>{const c=Ze(i,r);c&&(c.textContent=o)})}function Nw(n,r,o,i){return Aa(n,c=>{var d;const u=Ze(c,r);u&&(i.trim().length===0?u.style.removeProperty(o):u.style.setProperty(o,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function Ow(n,r,o,i){return Aa(n,c=>{const u=Ze(c,r);u&&(i.trim().length===0?u.removeAttribute(o):u.setAttribute(o,i))})}function zw(n,r){var o;for(const i of _d){const c=r[i];if(c===null){n.style[i]="";continue}n.style[i]=c}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function Dw(n,r,o){return Aa(n,i=>{const c=Ze(i,r);c&&zw(c,o)})}function Tc(n,r){const o=Pl(n);if(!o)return null;const i=Ze(o,r);if(!i||!(i.parentElement instanceof HTMLElement))return null;const c=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Te):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Te):null;return{parentElementId:i.parentElement.getAttribute(Te),previousSiblingElementId:c,nextSiblingElementId:u}}function Ac(n,r){var i;const o=Pl(n);return o?((i=Ze(o,r))==null?void 0:i.outerHTML)??null:null}function Vv(n,r){var u;const o=Pl(`<template>${n}</template>`),i=(u=o==null?void 0:o.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const c=[i,...Array.from(i.querySelectorAll(`[${Te}]`))];for(const d of c){const h=d.getAttribute(Te);h&&r[h]&&d.setAttribute(Te,r[h])}return i.outerHTML}function Zf(n,r){const o=Pl(n);if(!o)return r;const i=new Set(Array.from(o.querySelectorAll(`[${Te}]`)).map(h=>h.getAttribute(Te)).filter(h=>!!h));if(!i.has(r))return r;const c=r.match(/^(.*?)(?:-(\d+))?$/),u=(c==null?void 0:c[1])||r;let d=Number.parseInt((c==null?void 0:c[2])||"1",10)+1;for(;i.has(`${u}-${d}`);)d+=1;return`${u}-${d}`}function jw(n,r){return Aa(n,o=>{var m;if(Ze(o,r.elementId))return;const i=Pl(`<template>${r.html}</template>`),c=(m=i==null?void 0:i.querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(c instanceof HTMLElement))return;const u=(r.parentElementId?Ze(o,r.parentElementId):null)??o.querySelector(`[${br}]`)??o.body,d=r.nextSiblingElementId?Ze(o,r.nextSiblingElementId):null,h=r.previousSiblingElementId?Ze(o,r.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(o.importNode(c,!0),d):(h==null?void 0:h.parentElement)===u?h.after(o.importNode(c,!0)):u.appendChild(o.importNode(c,!0))})}function Lw(n,r){return Aa(n,o=>{var i;(i=Ze(o,r))==null||i.remove()})}function kw({html:n,slideId:r,groupElementId:o,elementIds:i,elementRects:c={},timestamp:u=Date.now()}){const d=Pl(n);if(!d||!i.length)return null;const h=i.map(D=>Ze(d,D)).filter(D=>!!D);if(h.length!==i.length)return null;const p=h.flatMap(D=>D.getAttribute("data-group")==="true"?Qf(D):[D]).filter((D,_,j)=>j.findIndex(H=>H===D)===_);if(p.length<2)return null;const v=Cf(h[0]);if(!v||h.some(D=>Cf(D)!==v)||Ze(d,o))return null;const b=h.filter(D=>D.getAttribute("data-group")==="true"),S=p.map(D=>Cc(D,c)),E=Math.min(...S.map(D=>D.x)),T=Math.min(...S.map(D=>D.y)),C=Math.max(...S.map(D=>D.x+D.width)),A=Math.max(...S.map(D=>D.y+D.height)),N=Yv(h[0],c),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(Te,o),Kf(z,{x:E-N.x,y:T-N.y,width:C-E,height:A-T});const k=Array.from(v.children).flatMap(D=>D instanceof HTMLElement?b.includes(D)?Qf(D).filter(_=>p.includes(_)):p.includes(D)?[D]:[]:[]),q=h.find(D=>Cf(D)===v)??null;(q==null?void 0:q.parentElement)===v?v.insertBefore(z,q):v.appendChild(z);for(const D of k){const _=Cc(D,c);Kf(D,{x:_.x-E,y:_.y-T,width:_.width,height:_.height}),z.appendChild(D)}for(const D of b)D.children.length||D.remove();const Z=Md(d);return Z===n?null:{type:"group.create",slideId:r,groupElementId:o,elementIds:k.map(D=>D.getAttribute(Te)).filter(D=>!!D),previousHtmlSource:n,nextHtmlSource:Z,timestamp:u}}function Hw({html:n,slideId:r,groupElementId:o,elementRects:i={},timestamp:c=Date.now()}){const u=Pl(n);if(!u)return null;const d=Ze(u,o);if(!d||d.getAttribute("data-group")!=="true"||!d.parentElement)return null;const h=d.parentElement,m=Yv(d,i),p=Qf(d);if(!p.length)return null;const v=p.map(S=>S.getAttribute(Te)).filter(S=>!!S);for(const S of p){const E=Cc(S,i);Kf(S,{x:E.x-m.x,y:E.y-m.y,width:E.width,height:E.height}),h.insertBefore(S,d)}d.remove();const b=Md(u);return b===n?null:{type:"group.ungroup",slideId:r,groupElementId:o,childElementIds:v,previousHtmlSource:n,nextHtmlSource:b,timestamp:c}}function Tf(n,r){return n.map(o=>Bv(o,r))}function qv(n){return{slides:n,undoStack:[],redoStack:[]}}function lc(n,r){switch(r.type){case"history.reset":return qv(r.slides);case"history.commit":return{slides:Tf(n.slides,r.operation),undoStack:[...n.undoStack,r.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:Tf(n.slides,Gv(o)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,o]}:n}case"history.redo":{const o=n.redoStack[n.redoStack.length-1];return o?{slides:Tf(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function Uw({manifestUrl:n,fetchImpl:r,requestInit:o,slideIdPrefix:i="generated-slide-"}){var b;const c=r??globalThis.fetch;if(!c)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...o},d=await c(n,u);if(!d.ok)return null;const h=await d.json();if(!((b=h.slides)!=null&&b.length))return null;const m=d.url||n,p=new URL(m),v=await Promise.all(h.slides.map(async(S,E)=>{const T=new URL(S.file,m);for(const[z,k]of p.searchParams)T.searchParams.has(z)||T.searchParams.set(z,k);const C=await c(T.toString(),u);if(!C.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await C.text(),N=Bl(A,`${i}${E+1}`);return{...N,sourceFile:S.file,title:S.title||N.title}}));return{manifest:h,slides:v}}function Xv(n){var r,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(r=0;r<c;r++)n[r]&&(o=Xv(n[r]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Iv(){for(var n,r,o=0,i="",c=arguments.length;o<c;o++)(n=arguments[o])&&(r=Xv(n))&&(i&&(i+=" "),i+=r);return i}const vy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,by=Iv,Bw=(n,r)=>o=>{var i;if((r==null?void 0:r.variants)==null)return by(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:c,defaultVariants:u}=r,d=Object.keys(c).map(p=>{const v=o==null?void 0:o[p],b=u==null?void 0:u[p];if(v===null)return null;const S=vy(v)||vy(b);return c[p][S]}),h=o&&Object.entries(o).reduce((p,v)=>{let[b,S]=v;return S===void 0||(p[b]=S),p},{}),m=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((p,v)=>{let{class:b,className:S,...E}=v;return Object.entries(E).every(T=>{let[C,A]=T;return Array.isArray(A)?A.includes({...u,...h}[C]):{...u,...h}[C]===A})?[...p,b,S]:p},[]);return by(n,d,m,o==null?void 0:o.class,o==null?void 0:o.className)};var Uo=Lv();const Gw=Cd(Uo);function xy(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function Rd(...n){return r=>{let o=!1;const i=n.map(c=>{const u=xy(c,r);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let c=0;c<i.length;c++){const u=i[c];typeof u=="function"?u():xy(n[c],null)}}}}function qe(...n){return y.useCallback(Rd(...n),n)}function Sa(n){const r=Vw(n),o=y.forwardRef((i,c)=>{const{children:u,...d}=i,h=y.Children.toArray(u),m=h.find(Xw);if(m){const p=m.props.children,v=h.map(b=>b===m?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:b);return x.jsx(r,{...d,ref:c,children:y.isValidElement(p)?y.cloneElement(p,void 0,v):null})}return x.jsx(r,{...d,ref:c,children:u})});return o.displayName=`${n}.Slot`,o}var Yw=Sa("Slot");function Vw(n){const r=y.forwardRef((o,i)=>{const{children:c,...u}=o;if(y.isValidElement(c)){const d=Pw(c),h=Iw(u,c.props);return c.type!==y.Fragment&&(h.ref=i?Rd(i,d):d),y.cloneElement(c,h)}return y.Children.count(c)>1?y.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var Pv=Symbol("radix.slottable");function qw(n){const r=({children:o})=>x.jsx(x.Fragment,{children:o});return r.displayName=`${n}.Slottable`,r.__radixId=Pv,r}function Xw(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Pv}function Iw(n,r){const o={...r};for(const i in r){const c=n[i],u=r[i];/^on[A-Z]/.test(i)?c&&u?o[i]=(...h)=>{const m=u(...h);return c(...h),m}:c&&(o[i]=c):i==="style"?o[i]={...c,...u}:i==="className"&&(o[i]=[c,u].filter(Boolean).join(" "))}return{...n,...o}}function Pw(n){var i,c;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var $w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=$w.reduce((n,r)=>{const o=Sa(`Primitive.${r}`),i=y.forwardRef((c,u)=>{const{asChild:d,...h}=c,m=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(m,{...h,ref:u})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{});function $v(n,r){n&&Uo.flushSync(()=>n.dispatchEvent(r))}var Kv=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"}),Kw="VisuallyHidden",Qv=y.forwardRef((n,r)=>x.jsx(ke.span,{...n,ref:r,style:{...Kv,...n.style}}));Qv.displayName=Kw;var Qw=Qv;function $l(n,r=[]){let o=[];function i(u,d){const h=y.createContext(d),m=o.length;o=[...o,d];const p=b=>{var N;const{scope:S,children:E,...T}=b,C=((N=S==null?void 0:S[n])==null?void 0:N[m])||h,A=y.useMemo(()=>T,Object.values(T));return x.jsx(C.Provider,{value:A,children:E})};p.displayName=u+"Provider";function v(b,S){var C;const E=((C=S==null?void 0:S[n])==null?void 0:C[m])||h,T=y.useContext(E);if(T)return T;if(d!==void 0)return d;throw new Error(`\`${b}\` must be used within \`${u}\``)}return[p,v]}const c=()=>{const u=o.map(d=>y.createContext(d));return function(h){const m=(h==null?void 0:h[n])||u;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:m}}),[h,m])}};return c.scopeName=n,[i,Zw(c,...r)]}function Zw(...n){const r=n[0];if(n.length===1)return r;const o=()=>{const i=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(u){const d=i.reduce((h,{useScope:m,scopeName:p})=>{const b=m(u)[`__scope${p}`];return{...h,...b}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}function Nd(n){const r=n+"CollectionProvider",[o,i]=$l(r),[c,u]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=C=>{const{scope:A,children:N}=C,z=ol.useRef(null),k=ol.useRef(new Map).current;return x.jsx(c,{scope:A,itemMap:k,collectionRef:z,children:N})};d.displayName=r;const h=n+"CollectionSlot",m=Sa(h),p=ol.forwardRef((C,A)=>{const{scope:N,children:z}=C,k=u(h,N),q=qe(A,k.collectionRef);return x.jsx(m,{ref:q,children:z})});p.displayName=h;const v=n+"CollectionItemSlot",b="data-radix-collection-item",S=Sa(v),E=ol.forwardRef((C,A)=>{const{scope:N,children:z,...k}=C,q=ol.useRef(null),Z=qe(A,q),D=u(v,N);return ol.useEffect(()=>(D.itemMap.set(q,{ref:q,...k}),()=>void D.itemMap.delete(q))),x.jsx(S,{[b]:"",ref:Z,children:z})});E.displayName=v;function T(C){const A=u(n+"CollectionConsumer",C);return ol.useCallback(()=>{const z=A.collectionRef.current;if(!z)return[];const k=Array.from(z.querySelectorAll(`[${b}]`));return Array.from(A.itemMap.values()).sort((D,_)=>k.indexOf(D.ref.current)-k.indexOf(_.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:p,ItemSlot:E},T,i]}function he(n,r,{checkForDefaultPrevented:o=!0}={}){return function(c){if(n==null||n(c),o===!1||!c.defaultPrevented)return r==null?void 0:r(c)}}var Nt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Fw=jv[" useInsertionEffect ".trim().toString()]||Nt;function Mc({prop:n,defaultProp:r,onChange:o=()=>{},caller:i}){const[c,u,d]=Jw({defaultProp:r,onChange:o}),h=n!==void 0,m=h?n:c;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==h&&console.warn(`${i} is changing from ${b?"controlled":"uncontrolled"} to ${h?"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.`),v.current=h},[h,i])}const p=y.useCallback(v=>{var b;if(h){const S=Ww(v)?v(n):v;S!==n&&((b=d.current)==null||b.call(d,S))}else u(v)},[h,n,u,d]);return[m,p]}function Jw({defaultProp:n,onChange:r}){const[o,i]=y.useState(n),c=y.useRef(o),u=y.useRef(r);return Fw(()=>{u.current=r},[r]),y.useEffect(()=>{var d;c.current!==o&&((d=u.current)==null||d.call(u,o),c.current=o)},[o,c]),[o,i,u]}function Ww(n){return typeof n=="function"}function eE(n,r){return y.useReducer((o,i)=>r[o][i]??o,n)}var Ln=n=>{const{present:r,children:o}=n,i=tE(r),c=typeof o=="function"?o({present:i.isPresent}):y.Children.only(o),u=qe(i.ref,nE(c));return typeof o=="function"||i.isPresent?y.cloneElement(c,{ref:u}):null};Ln.displayName="Presence";function tE(n){const[r,o]=y.useState(),i=y.useRef(null),c=y.useRef(n),u=y.useRef("none"),d=n?"mounted":"unmounted",[h,m]=eE(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=rc(i.current);u.current=h==="mounted"?p:"none"},[h]),Nt(()=>{const p=i.current,v=c.current;if(v!==n){const S=u.current,E=rc(p);n?m("MOUNT"):E==="none"||(p==null?void 0:p.display)==="none"?m("UNMOUNT"):m(v&&S!==E?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,m]),Nt(()=>{if(r){let p;const v=r.ownerDocument.defaultView??window,b=E=>{const C=rc(i.current).includes(CSS.escape(E.animationName));if(E.target===r&&C&&(m("ANIMATION_END"),!c.current)){const A=r.style.animationFillMode;r.style.animationFillMode="forwards",p=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=A)})}},S=E=>{E.target===r&&(u.current=rc(i.current))};return r.addEventListener("animationstart",S),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{v.clearTimeout(p),r.removeEventListener("animationstart",S),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(p=>{i.current=p?getComputedStyle(p):null,o(p)},[])}}function rc(n){return(n==null?void 0:n.animationName)||"none"}function nE(n){var i,c;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var lE=jv[" useId ".trim().toString()]||(()=>{}),rE=0;function wa(n){const[r,o]=y.useState(lE());return Nt(()=>{o(i=>i??String(rE++))},[n]),n||(r?`radix-${r}`:"")}var aE=y.createContext(void 0);function Vc(n){const r=y.useContext(aE);return n||r||"ltr"}function xt(n){const r=y.useRef(n);return y.useEffect(()=>{r.current=n}),y.useMemo(()=>(...o)=>{var i;return(i=r.current)==null?void 0:i.call(r,...o)},[])}function oE(n,r=globalThis==null?void 0:globalThis.document){const o=xt(n);y.useEffect(()=>{const i=c=>{c.key==="Escape"&&o(c)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var iE="DismissableLayer",Ff="dismissableLayer.update",cE="dismissableLayer.pointerDownOutside",sE="dismissableLayer.focusOutside",Sy,Zv=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qc=y.forwardRef((n,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...m}=n,p=y.useContext(Zv),[v,b]=y.useState(null),S=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=y.useState({}),T=qe(r,_=>b(_)),C=Array.from(p.layers),[A]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),N=C.indexOf(A),z=v?C.indexOf(v):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,q=z>=N,Z=dE(_=>{const j=_.target,H=[...p.branches].some(I=>I.contains(j));!q||H||(c==null||c(_),d==null||d(_),_.defaultPrevented||h==null||h())},S),D=hE(_=>{const j=_.target;[...p.branches].some(I=>I.contains(j))||(u==null||u(_),d==null||d(_),_.defaultPrevented||h==null||h())},S);return oE(_=>{z===p.layers.size-1&&(i==null||i(_),!_.defaultPrevented&&h&&(_.preventDefault(),h()))},S),y.useEffect(()=>{if(v)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Sy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),wy(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Sy)}},[v,S,o,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),wy())},[v,p]),y.useEffect(()=>{const _=()=>E({});return document.addEventListener(Ff,_),()=>document.removeEventListener(Ff,_)},[]),x.jsx(ke.div,{...m,ref:T,style:{pointerEvents:k?q?"auto":"none":void 0,...n.style},onFocusCapture:he(n.onFocusCapture,D.onFocusCapture),onBlurCapture:he(n.onBlurCapture,D.onBlurCapture),onPointerDownCapture:he(n.onPointerDownCapture,Z.onPointerDownCapture)})});qc.displayName=iE;var uE="DismissableLayerBranch",fE=y.forwardRef((n,r)=>{const o=y.useContext(Zv),i=y.useRef(null),c=qe(r,i);return y.useEffect(()=>{const u=i.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),x.jsx(ke.div,{...n,ref:c})});fE.displayName=uE;function dE(n,r=globalThis==null?void 0:globalThis.document){const o=xt(n),i=y.useRef(!1),c=y.useRef(()=>{});return y.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let m=function(){Fv(cE,o,p,{discrete:!0})};const p={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",c.current),c.current=m,r.addEventListener("click",c.current,{once:!0})):m()}else r.removeEventListener("click",c.current);i.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",u),r.removeEventListener("click",c.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function hE(n,r=globalThis==null?void 0:globalThis.document){const o=xt(n),i=y.useRef(!1);return y.useEffect(()=>{const c=u=>{u.target&&!i.current&&Fv(sE,o,{originalEvent:u},{discrete:!1})};return r.addEventListener("focusin",c),()=>r.removeEventListener("focusin",c)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function wy(){const n=new CustomEvent(Ff);document.dispatchEvent(n)}function Fv(n,r,o,{discrete:i}){const c=o.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});r&&c.addEventListener(n,r,{once:!0}),i?$v(c,u):c.dispatchEvent(u)}var Af="focusScope.autoFocusOnMount",Mf="focusScope.autoFocusOnUnmount",Ey={bubbles:!1,cancelable:!0},mE="FocusScope",Od=y.forwardRef((n,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:u,...d}=n,[h,m]=y.useState(null),p=xt(c),v=xt(u),b=y.useRef(null),S=qe(r,C=>m(C)),E=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let C=function(k){if(E.paused||!h)return;const q=k.target;h.contains(q)?b.current=q:Gl(b.current,{select:!0})},A=function(k){if(E.paused||!h)return;const q=k.relatedTarget;q!==null&&(h.contains(q)||Gl(b.current,{select:!0}))},N=function(k){if(document.activeElement===document.body)for(const Z of k)Z.removedNodes.length>0&&Gl(h)};document.addEventListener("focusin",C),document.addEventListener("focusout",A);const z=new MutationObserver(N);return h&&z.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",A),z.disconnect()}}},[i,h,E.paused]),y.useEffect(()=>{if(h){Ty.add(E);const C=document.activeElement;if(!h.contains(C)){const N=new CustomEvent(Af,Ey);h.addEventListener(Af,p),h.dispatchEvent(N),N.defaultPrevented||(pE(xE(Jv(h)),{select:!0}),document.activeElement===C&&Gl(h))}return()=>{h.removeEventListener(Af,p),setTimeout(()=>{const N=new CustomEvent(Mf,Ey);h.addEventListener(Mf,v),h.dispatchEvent(N),N.defaultPrevented||Gl(C??document.body,{select:!0}),h.removeEventListener(Mf,v),Ty.remove(E)},0)}}},[h,p,v,E]);const T=y.useCallback(C=>{if(!o&&!i||E.paused)return;const A=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,N=document.activeElement;if(A&&N){const z=C.currentTarget,[k,q]=gE(z);k&&q?!C.shiftKey&&N===q?(C.preventDefault(),o&&Gl(k,{select:!0})):C.shiftKey&&N===k&&(C.preventDefault(),o&&Gl(q,{select:!0})):N===z&&C.preventDefault()}},[o,i,E.paused]);return x.jsx(ke.div,{tabIndex:-1,...d,ref:S,onKeyDown:T})});Od.displayName=mE;function pE(n,{select:r=!1}={}){const o=document.activeElement;for(const i of n)if(Gl(i,{select:r}),document.activeElement!==o)return}function gE(n){const r=Jv(n),o=Cy(r,n),i=Cy(r.reverse(),n);return[o,i]}function Jv(n){const r=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Cy(n,r){for(const o of n)if(!yE(o,{upTo:r}))return o}function yE(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function vE(n){return n instanceof HTMLInputElement&&"select"in n}function Gl(n,{select:r=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&vE(n)&&r&&n.select()}}var Ty=bE();function bE(){let n=[];return{add(r){const o=n[0];r!==o&&(o==null||o.pause()),n=Ay(n,r),n.unshift(r)},remove(r){var o;n=Ay(n,r),(o=n[0])==null||o.resume()}}}function Ay(n,r){const o=[...n],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function xE(n){return n.filter(r=>r.tagName!=="A")}var SE="Portal",zd=y.forwardRef((n,r)=>{var h;const{container:o,...i}=n,[c,u]=y.useState(!1);Nt(()=>u(!0),[]);const d=o||c&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?Gw.createPortal(x.jsx(ke.div,{...i,ref:r}),d):null});zd.displayName=SE;var _f=0;function Wv(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??My()),document.body.insertAdjacentElement("beforeend",n[1]??My()),_f++,()=>{_f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),_f--}},[])}function My(){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 zn=function(){return zn=Object.assign||function(r){for(var o,i=1,c=arguments.length;i<c;i++){o=arguments[i];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])}return r},zn.apply(this,arguments)};function eb(n,r){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)r.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(o[i[c]]=n[i[c]]);return o}function wE(n,r,o){if(o||arguments.length===2)for(var i=0,c=r.length,u;i<c;i++)(u||!(i in r))&&(u||(u=Array.prototype.slice.call(r,0,i)),u[i]=r[i]);return n.concat(u||Array.prototype.slice.call(r))}var vc="right-scroll-bar-position",bc="width-before-scroll-bar",EE="with-scroll-bars-hidden",CE="--removed-body-scroll-bar-size";function Rf(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function TE(n,r){var o=y.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(i){var c=o.value;c!==i&&(o.value=i,o.callback(i,c))}}}})[0];return o.callback=r,o.facade}var AE=typeof window<"u"?y.useLayoutEffect:y.useEffect,_y=new WeakMap;function ME(n,r){var o=TE(null,function(i){return n.forEach(function(c){return Rf(c,i)})});return AE(function(){var i=_y.get(o);if(i){var c=new Set(i),u=new Set(n),d=o.current;c.forEach(function(h){u.has(h)||Rf(h,null)}),u.forEach(function(h){c.has(h)||Rf(h,d)})}_y.set(o,n)},[n]),o}function _E(n){return n}function RE(n,r){r===void 0&&(r=_E);var o=[],i=!1,c={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(u){var d=r(u,i);return o.push(d),function(){o=o.filter(function(h){return h!==d})}},assignSyncMedium:function(u){for(i=!0;o.length;){var d=o;o=[],d.forEach(u)}o={push:function(h){return u(h)},filter:function(){return o}}},assignMedium:function(u){i=!0;var d=[];if(o.length){var h=o;o=[],h.forEach(u),d=o}var m=function(){var v=d;d=[],v.forEach(u)},p=function(){return Promise.resolve().then(m)};p(),o={push:function(v){d.push(v),p()},filter:function(v){return d=d.filter(v),o}}}};return c}function NE(n){n===void 0&&(n={});var r=RE(null);return r.options=zn({async:!0,ssr:!1},n),r}var tb=function(n){var r=n.sideCar,o=eb(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,zn({},o))};tb.isSideCarExport=!0;function OE(n,r){return n.useMedium(r),tb}var nb=NE(),Nf=function(){},Xc=y.forwardRef(function(n,r){var o=y.useRef(null),i=y.useState({onScrollCapture:Nf,onWheelCapture:Nf,onTouchMoveCapture:Nf}),c=i[0],u=i[1],d=n.forwardProps,h=n.children,m=n.className,p=n.removeScrollBar,v=n.enabled,b=n.shards,S=n.sideCar,E=n.noRelative,T=n.noIsolation,C=n.inert,A=n.allowPinchZoom,N=n.as,z=N===void 0?"div":N,k=n.gapMode,q=eb(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Z=S,D=ME([o,r]),_=zn(zn({},q),c);return y.createElement(y.Fragment,null,v&&y.createElement(Z,{sideCar:nb,removeScrollBar:p,shards:b,noRelative:E,noIsolation:T,inert:C,setCallbacks:u,allowPinchZoom:!!A,lockRef:o,gapMode:k}),d?y.cloneElement(y.Children.only(h),zn(zn({},_),{ref:D})):y.createElement(z,zn({},_,{className:m,ref:D}),h))});Xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xc.classNames={fullWidth:bc,zeroRight:vc};var zE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DE(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=zE();return r&&n.setAttribute("nonce",r),n}function jE(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function LE(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var kE=function(){var n=0,r=null;return{add:function(o){n==0&&(r=DE())&&(jE(r,o),LE(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},HE=function(){var n=kE();return function(r,o){y.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&o])}},lb=function(){var n=HE(),r=function(o){var i=o.styles,c=o.dynamic;return n(i,c),null};return r},UE={left:0,top:0,right:0,gap:0},Of=function(n){return parseInt(n||"",10)||0},BE=function(n){var r=window.getComputedStyle(document.body),o=r[n==="padding"?"paddingLeft":"marginLeft"],i=r[n==="padding"?"paddingTop":"marginTop"],c=r[n==="padding"?"paddingRight":"marginRight"];return[Of(o),Of(i),Of(c)]},GE=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return UE;var r=BE(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},YE=lb(),ba="data-scroll-locked",VE=function(n,r,o,i){var c=n.left,u=n.top,d=n.right,h=n.gap;return o===void 0&&(o="margin"),`
|
|
52
|
+
.`.concat(EE,` {
|
|
53
|
+
overflow: hidden `).concat(i,`;
|
|
54
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
55
|
+
}
|
|
56
|
+
body[`).concat(ba,`] {
|
|
57
|
+
overflow: hidden `).concat(i,`;
|
|
58
|
+
overscroll-behavior: contain;
|
|
59
|
+
`).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
60
|
+
padding-left: `.concat(c,`px;
|
|
61
|
+
padding-top: `).concat(u,`px;
|
|
62
|
+
padding-right: `).concat(d,`px;
|
|
63
|
+
margin-left:0;
|
|
64
|
+
margin-top:0;
|
|
65
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
66
|
+
`),o==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.`).concat(vc,` {
|
|
70
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.`).concat(bc,` {
|
|
74
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.`).concat(vc," .").concat(vc,` {
|
|
78
|
+
right: 0 `).concat(i,`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.`).concat(bc," .").concat(bc,` {
|
|
82
|
+
margin-right: 0 `).concat(i,`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
body[`).concat(ba,`] {
|
|
86
|
+
`).concat(CE,": ").concat(h,`px;
|
|
87
|
+
}
|
|
88
|
+
`)},Ry=function(){var n=parseInt(document.body.getAttribute(ba)||"0",10);return isFinite(n)?n:0},qE=function(){y.useEffect(function(){return document.body.setAttribute(ba,(Ry()+1).toString()),function(){var n=Ry()-1;n<=0?document.body.removeAttribute(ba):document.body.setAttribute(ba,n.toString())}},[])},XE=function(n){var r=n.noRelative,o=n.noImportant,i=n.gapMode,c=i===void 0?"margin":i;qE();var u=y.useMemo(function(){return GE(c)},[c]);return y.createElement(YE,{styles:VE(u,!r,c,o?"":"!important")})},Jf=!1;if(typeof window<"u")try{var ac=Object.defineProperty({},"passive",{get:function(){return Jf=!0,!0}});window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{Jf=!1}var ma=Jf?{passive:!1}:!1,IE=function(n){return n.tagName==="TEXTAREA"},rb=function(n,r){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!IE(n)&&o[r]==="visible")},PE=function(n){return rb(n,"overflowY")},$E=function(n){return rb(n,"overflowX")},Ny=function(n,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=ab(n,i);if(c){var u=ob(n,i),d=u[1],h=u[2];if(d>h)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},KE=function(n){var r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[r,o,i]},QE=function(n){var r=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[r,o,i]},ab=function(n,r){return n==="v"?PE(r):$E(r)},ob=function(n,r){return n==="v"?KE(r):QE(r)},ZE=function(n,r){return n==="h"&&r==="rtl"?-1:1},FE=function(n,r,o,i,c){var u=ZE(n,window.getComputedStyle(r).direction),d=u*i,h=o.target,m=r.contains(h),p=!1,v=d>0,b=0,S=0;do{if(!h)break;var E=ob(n,h),T=E[0],C=E[1],A=E[2],N=C-A-u*T;(T||N)&&ab(n,h)&&(b+=N,S+=T);var z=h.parentNode;h=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!m&&h!==document.body||m&&(r.contains(h)||r===h));return(v&&Math.abs(b)<1||!v&&Math.abs(S)<1)&&(p=!0),p},oc=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Oy=function(n){return[n.deltaX,n.deltaY]},zy=function(n){return n&&"current"in n?n.current:n},JE=function(n,r){return n[0]===r[0]&&n[1]===r[1]},WE=function(n){return`
|
|
89
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
90
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
91
|
+
`)},e2=0,pa=[];function t2(n){var r=y.useRef([]),o=y.useRef([0,0]),i=y.useRef(),c=y.useState(e2++)[0],u=y.useState(lb)[0],d=y.useRef(n);y.useEffect(function(){d.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var C=wE([n.lockRef.current],(n.shards||[]).map(zy),!0).filter(Boolean);return C.forEach(function(A){return A.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),C.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var h=y.useCallback(function(C,A){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var N=oc(C),z=o.current,k="deltaX"in C?C.deltaX:z[0]-N[0],q="deltaY"in C?C.deltaY:z[1]-N[1],Z,D=C.target,_=Math.abs(k)>Math.abs(q)?"h":"v";if("touches"in C&&_==="h"&&D.type==="range")return!1;var j=window.getSelection(),H=j&&j.anchorNode,I=H?H===D||H.contains(D):!1;if(I)return!1;var J=Ny(_,D);if(!J)return!0;if(J?Z=_:(Z=_==="v"?"h":"v",J=Ny(_,D)),!J)return!1;if(!i.current&&"changedTouches"in C&&(k||q)&&(i.current=Z),!Z)return!0;var le=i.current||Z;return FE(le,A,C,le==="h"?k:q)},[]),m=y.useCallback(function(C){var A=C;if(!(!pa.length||pa[pa.length-1]!==u)){var N="deltaY"in A?Oy(A):oc(A),z=r.current.filter(function(Z){return Z.name===A.type&&(Z.target===A.target||A.target===Z.shadowParent)&&JE(Z.delta,N)})[0];if(z&&z.should){A.cancelable&&A.preventDefault();return}if(!z){var k=(d.current.shards||[]).map(zy).filter(Boolean).filter(function(Z){return Z.contains(A.target)}),q=k.length>0?h(A,k[0]):!d.current.noIsolation;q&&A.cancelable&&A.preventDefault()}}},[]),p=y.useCallback(function(C,A,N,z){var k={name:C,delta:A,target:N,should:z,shadowParent:n2(N)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(q){return q!==k})},1)},[]),v=y.useCallback(function(C){o.current=oc(C),i.current=void 0},[]),b=y.useCallback(function(C){p(C.type,Oy(C),C.target,h(C,n.lockRef.current))},[]),S=y.useCallback(function(C){p(C.type,oc(C),C.target,h(C,n.lockRef.current))},[]);y.useEffect(function(){return pa.push(u),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:S}),document.addEventListener("wheel",m,ma),document.addEventListener("touchmove",m,ma),document.addEventListener("touchstart",v,ma),function(){pa=pa.filter(function(C){return C!==u}),document.removeEventListener("wheel",m,ma),document.removeEventListener("touchmove",m,ma),document.removeEventListener("touchstart",v,ma)}},[]);var E=n.removeScrollBar,T=n.inert;return y.createElement(y.Fragment,null,T?y.createElement(u,{styles:WE(c)}):null,E?y.createElement(XE,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function n2(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const l2=OE(nb,t2);var Dd=y.forwardRef(function(n,r){return y.createElement(Xc,zn({},n,{ref:r,sideCar:l2}))});Dd.classNames=Xc.classNames;var r2=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},ga=new WeakMap,ic=new WeakMap,cc={},zf=0,ib=function(n){return n&&(n.host||ib(n.parentNode))},a2=function(n,r){return r.map(function(o){if(n.contains(o))return o;var i=ib(o);return i&&n.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},o2=function(n,r,o,i){var c=a2(r,Array.isArray(n)?n:[n]);cc[o]||(cc[o]=new WeakMap);var u=cc[o],d=[],h=new Set,m=new Set(c),p=function(b){!b||h.has(b)||(h.add(b),p(b.parentNode))};c.forEach(p);var v=function(b){!b||m.has(b)||Array.prototype.forEach.call(b.children,function(S){if(h.has(S))v(S);else try{var E=S.getAttribute(i),T=E!==null&&E!=="false",C=(ga.get(S)||0)+1,A=(u.get(S)||0)+1;ga.set(S,C),u.set(S,A),d.push(S),C===1&&T&&ic.set(S,!0),A===1&&S.setAttribute(o,"true"),T||S.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",S,N)}})};return v(r),h.clear(),zf++,function(){d.forEach(function(b){var S=ga.get(b)-1,E=u.get(b)-1;ga.set(b,S),u.set(b,E),S||(ic.has(b)||b.removeAttribute(i),ic.delete(b)),E||b.removeAttribute(o)}),zf--,zf||(ga=new WeakMap,ga=new WeakMap,ic=new WeakMap,cc={})}},cb=function(n,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),c=r2(n);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),o2(i,c,o,"aria-hidden")):function(){return null}};function i2(n){const r=y.useRef({value:n,previous:n});return y.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}function c2(n){const[r,o]=y.useState(void 0);return Nt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,h;if("borderBoxSize"in u){const m=u.borderBoxSize,p=Array.isArray(m)?m[0]:m;d=p.inlineSize,h=p.blockSize}else d=n.offsetWidth,h=n.offsetHeight;o({width:d,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),r}const s2=["top","right","bottom","left"],Xl=Math.min,tn=Math.max,_c=Math.round,sc=Math.floor,jn=n=>({x:n,y:n}),u2={left:"right",right:"left",bottom:"top",top:"bottom"};function Wf(n,r,o){return tn(n,Xl(r,o))}function cl(n,r){return typeof n=="function"?n(r):n}function sl(n){return n.split("-")[0]}function Ma(n){return n.split("-")[1]}function jd(n){return n==="x"?"y":"x"}function Ld(n){return n==="y"?"height":"width"}function Dn(n){const r=n[0];return r==="t"||r==="b"?"y":"x"}function kd(n){return jd(Dn(n))}function f2(n,r,o){o===void 0&&(o=!1);const i=Ma(n),c=kd(n),u=Ld(c);let d=c==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(d=Rc(d)),[d,Rc(d)]}function d2(n){const r=Rc(n);return[ed(n),r,ed(r)]}function ed(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Dy=["left","right"],jy=["right","left"],h2=["top","bottom"],m2=["bottom","top"];function p2(n,r,o){switch(n){case"top":case"bottom":return o?r?jy:Dy:r?Dy:jy;case"left":case"right":return r?h2:m2;default:return[]}}function g2(n,r,o,i){const c=Ma(n);let u=p2(sl(n),o==="start",i);return c&&(u=u.map(d=>d+"-"+c),r&&(u=u.concat(u.map(ed)))),u}function Rc(n){const r=sl(n);return u2[r]+n.slice(r.length)}function y2(n){return{top:0,right:0,bottom:0,left:0,...n}}function sb(n){return typeof n!="number"?y2(n):{top:n,right:n,bottom:n,left:n}}function Nc(n){const{x:r,y:o,width:i,height:c}=n;return{width:i,height:c,top:o,left:r,right:r+i,bottom:o+c,x:r,y:o}}function Ly(n,r,o){let{reference:i,floating:c}=n;const u=Dn(r),d=kd(r),h=Ld(d),m=sl(r),p=u==="y",v=i.x+i.width/2-c.width/2,b=i.y+i.height/2-c.height/2,S=i[h]/2-c[h]/2;let E;switch(m){case"top":E={x:v,y:i.y-c.height};break;case"bottom":E={x:v,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:b};break;case"left":E={x:i.x-c.width,y:b};break;default:E={x:i.x,y:i.y}}switch(Ma(r)){case"start":E[d]-=S*(o&&p?-1:1);break;case"end":E[d]+=S*(o&&p?-1:1);break}return E}async function v2(n,r){var o;r===void 0&&(r={});const{x:i,y:c,platform:u,rects:d,elements:h,strategy:m}=n,{boundary:p="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:E=0}=cl(r,n),T=sb(E),A=h[S?b==="floating"?"reference":"floating":b],N=Nc(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(A)))==null||o?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:p,rootBoundary:v,strategy:m})),z=b==="floating"?{x:i,y:c,width:d.floating.width,height:d.floating.height}:d.reference,k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),q=await(u.isElement==null?void 0:u.isElement(k))?await(u.getScale==null?void 0:u.getScale(k))||{x:1,y:1}:{x:1,y:1},Z=Nc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:z,offsetParent:k,strategy:m}):z);return{top:(N.top-Z.top+T.top)/q.y,bottom:(Z.bottom-N.bottom+T.bottom)/q.y,left:(N.left-Z.left+T.left)/q.x,right:(Z.right-N.right+T.right)/q.x}}const b2=50,x2=async(n,r,o)=>{const{placement:i="bottom",strategy:c="absolute",middleware:u=[],platform:d}=o,h=d.detectOverflow?d:{...d,detectOverflow:v2},m=await(d.isRTL==null?void 0:d.isRTL(r));let p=await d.getElementRects({reference:n,floating:r,strategy:c}),{x:v,y:b}=Ly(p,i,m),S=i,E=0;const T={};for(let C=0;C<u.length;C++){const A=u[C];if(!A)continue;const{name:N,fn:z}=A,{x:k,y:q,data:Z,reset:D}=await z({x:v,y:b,initialPlacement:i,placement:S,strategy:c,middlewareData:T,rects:p,platform:h,elements:{reference:n,floating:r}});v=k??v,b=q??b,T[N]={...T[N],...Z},D&&E<b2&&(E++,typeof D=="object"&&(D.placement&&(S=D.placement),D.rects&&(p=D.rects===!0?await d.getElementRects({reference:n,floating:r,strategy:c}):D.rects),{x:v,y:b}=Ly(p,S,m)),C=-1)}return{x:v,y:b,placement:S,strategy:c,middlewareData:T}},S2=n=>({name:"arrow",options:n,async fn(r){const{x:o,y:i,placement:c,rects:u,platform:d,elements:h,middlewareData:m}=r,{element:p,padding:v=0}=cl(n,r)||{};if(p==null)return{};const b=sb(v),S={x:o,y:i},E=kd(c),T=Ld(E),C=await d.getDimensions(p),A=E==="y",N=A?"top":"left",z=A?"bottom":"right",k=A?"clientHeight":"clientWidth",q=u.reference[T]+u.reference[E]-S[E]-u.floating[T],Z=S[E]-u.reference[E],D=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let _=D?D[k]:0;(!_||!await(d.isElement==null?void 0:d.isElement(D)))&&(_=h.floating[k]||u.floating[T]);const j=q/2-Z/2,H=_/2-C[T]/2-1,I=Xl(b[N],H),J=Xl(b[z],H),le=I,re=_-C[T]-J,te=_/2-C[T]/2+j,ae=Wf(le,te,re),O=!m.arrow&&Ma(c)!=null&&te!==ae&&u.reference[T]/2-(te<le?I:J)-C[T]/2<0,X=O?te<le?te-le:te-re:0;return{[E]:S[E]+X,data:{[E]:ae,centerOffset:te-ae-X,...O&&{alignmentOffset:X}},reset:O}}}),w2=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var o,i;const{placement:c,middlewareData:u,rects:d,initialPlacement:h,platform:m,elements:p}=r,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...A}=cl(n,r);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const N=sl(c),z=Dn(h),k=sl(h)===h,q=await(m.isRTL==null?void 0:m.isRTL(p.floating)),Z=S||(k||!C?[Rc(h)]:d2(h)),D=T!=="none";!S&&D&&Z.push(...g2(h,C,T,q));const _=[h,...Z],j=await m.detectOverflow(r,A),H=[];let I=((i=u.flip)==null?void 0:i.overflows)||[];if(v&&H.push(j[N]),b){const te=f2(c,d,q);H.push(j[te[0]],j[te[1]])}if(I=[...I,{placement:c,overflows:H}],!H.every(te=>te<=0)){var J,le;const te=(((J=u.flip)==null?void 0:J.index)||0)+1,ae=_[te];if(ae&&(!(b==="alignment"?z!==Dn(ae):!1)||I.every(G=>Dn(G.placement)===z?G.overflows[0]>0:!0)))return{data:{index:te,overflows:I},reset:{placement:ae}};let O=(le=I.filter(X=>X.overflows[0]<=0).sort((X,G)=>X.overflows[1]-G.overflows[1])[0])==null?void 0:le.placement;if(!O)switch(E){case"bestFit":{var re;const X=(re=I.filter(G=>{if(D){const $=Dn(G.placement);return $===z||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,K)=>$+K,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:re[0];X&&(O=X);break}case"initialPlacement":O=h;break}if(c!==O)return{reset:{placement:O}}}return{}}}};function ky(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function Hy(n){return s2.some(r=>n[r]>=0)}const E2=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:o,platform:i}=r,{strategy:c="referenceHidden",...u}=cl(n,r);switch(c){case"referenceHidden":{const d=await i.detectOverflow(r,{...u,elementContext:"reference"}),h=ky(d,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Hy(h)}}}case"escaped":{const d=await i.detectOverflow(r,{...u,altBoundary:!0}),h=ky(d,o.floating);return{data:{escapedOffsets:h,escaped:Hy(h)}}}default:return{}}}}},ub=new Set(["left","top"]);async function C2(n,r){const{placement:o,platform:i,elements:c}=n,u=await(i.isRTL==null?void 0:i.isRTL(c.floating)),d=sl(o),h=Ma(o),m=Dn(o)==="y",p=ub.has(d)?-1:1,v=u&&m?-1:1,b=cl(r,n);let{mainAxis:S,crossAxis:E,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof T=="number"&&(E=h==="end"?T*-1:T),m?{x:E*v,y:S*p}:{x:S*p,y:E*v}}const T2=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var o,i;const{x:c,y:u,placement:d,middlewareData:h}=r,m=await C2(r,n);return d===((o=h.offset)==null?void 0:o.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:c+m.x,y:u+m.y,data:{...m,placement:d}}}}},A2=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:o,y:i,placement:c,platform:u}=r,{mainAxis:d=!0,crossAxis:h=!1,limiter:m={fn:N=>{let{x:z,y:k}=N;return{x:z,y:k}}},...p}=cl(n,r),v={x:o,y:i},b=await u.detectOverflow(r,p),S=Dn(sl(c)),E=jd(S);let T=v[E],C=v[S];if(d){const N=E==="y"?"top":"left",z=E==="y"?"bottom":"right",k=T+b[N],q=T-b[z];T=Wf(k,T,q)}if(h){const N=S==="y"?"top":"left",z=S==="y"?"bottom":"right",k=C+b[N],q=C-b[z];C=Wf(k,C,q)}const A=m.fn({...r,[E]:T,[S]:C});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[E]:d,[S]:h}}}}}},M2=function(n){return n===void 0&&(n={}),{options:n,fn(r){const{x:o,y:i,placement:c,rects:u,middlewareData:d}=r,{offset:h=0,mainAxis:m=!0,crossAxis:p=!0}=cl(n,r),v={x:o,y:i},b=Dn(c),S=jd(b);let E=v[S],T=v[b];const C=cl(h,r),A=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(m){const k=S==="y"?"height":"width",q=u.reference[S]-u.floating[k]+A.mainAxis,Z=u.reference[S]+u.reference[k]-A.mainAxis;E<q?E=q:E>Z&&(E=Z)}if(p){var N,z;const k=S==="y"?"width":"height",q=ub.has(sl(c)),Z=u.reference[b]-u.floating[k]+(q&&((N=d.offset)==null?void 0:N[b])||0)+(q?0:A.crossAxis),D=u.reference[b]+u.reference[k]+(q?0:((z=d.offset)==null?void 0:z[b])||0)-(q?A.crossAxis:0);T<Z?T=Z:T>D&&(T=D)}return{[S]:E,[b]:T}}}},_2=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var o,i;const{placement:c,rects:u,platform:d,elements:h}=r,{apply:m=()=>{},...p}=cl(n,r),v=await d.detectOverflow(r,p),b=sl(c),S=Ma(c),E=Dn(c)==="y",{width:T,height:C}=u.floating;let A,N;b==="top"||b==="bottom"?(A=b,N=S===(await(d.isRTL==null?void 0:d.isRTL(h.floating))?"start":"end")?"left":"right"):(N=b,A=S==="end"?"top":"bottom");const z=C-v.top-v.bottom,k=T-v.left-v.right,q=Xl(C-v[A],z),Z=Xl(T-v[N],k),D=!r.middlewareData.shift;let _=q,j=Z;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(j=k),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(_=z),D&&!S){const I=tn(v.left,0),J=tn(v.right,0),le=tn(v.top,0),re=tn(v.bottom,0);E?j=T-2*(I!==0||J!==0?I+J:tn(v.left,v.right)):_=C-2*(le!==0||re!==0?le+re:tn(v.top,v.bottom))}await m({...r,availableWidth:j,availableHeight:_});const H=await d.getDimensions(h.floating);return T!==H.width||C!==H.height?{reset:{rects:!0}}:{}}}};function Ic(){return typeof window<"u"}function _a(n){return fb(n)?(n.nodeName||"").toLowerCase():"#document"}function nn(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function kn(n){var r;return(r=(fb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function fb(n){return Ic()?n instanceof Node||n instanceof nn(n).Node:!1}function Tn(n){return Ic()?n instanceof Element||n instanceof nn(n).Element:!1}function ul(n){return Ic()?n instanceof HTMLElement||n instanceof nn(n).HTMLElement:!1}function Uy(n){return!Ic()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof nn(n).ShadowRoot}function Bo(n){const{overflow:r,overflowX:o,overflowY:i,display:c}=An(n);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&c!=="inline"&&c!=="contents"}function R2(n){return/^(table|td|th)$/.test(_a(n))}function Pc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const N2=/transform|translate|scale|rotate|perspective|filter/,O2=/paint|layout|strict|content/,gr=n=>!!n&&n!=="none";let Df;function Hd(n){const r=Tn(n)?An(n):n;return gr(r.transform)||gr(r.translate)||gr(r.scale)||gr(r.rotate)||gr(r.perspective)||!Ud()&&(gr(r.backdropFilter)||gr(r.filter))||N2.test(r.willChange||"")||O2.test(r.contain||"")}function z2(n){let r=Il(n);for(;ul(r)&&!Ea(r);){if(Hd(r))return r;if(Pc(r))return null;r=Il(r)}return null}function Ud(){return Df==null&&(Df=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Df}function Ea(n){return/^(html|body|#document)$/.test(_a(n))}function An(n){return nn(n).getComputedStyle(n)}function $c(n){return Tn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Il(n){if(_a(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Uy(n)&&n.host||kn(n);return Uy(r)?r.host:r}function db(n){const r=Il(n);return Ea(r)?n.ownerDocument?n.ownerDocument.body:n.body:ul(r)&&Bo(r)?r:db(r)}function jo(n,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const c=db(n),u=c===((i=n.ownerDocument)==null?void 0:i.body),d=nn(c);if(u){const h=td(d);return r.concat(d,d.visualViewport||[],Bo(c)?c:[],h&&o?jo(h):[])}else return r.concat(c,jo(c,[],o))}function td(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hb(n){const r=An(n);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const c=ul(n),u=c?n.offsetWidth:o,d=c?n.offsetHeight:i,h=_c(o)!==u||_c(i)!==d;return h&&(o=u,i=d),{width:o,height:i,$:h}}function Bd(n){return Tn(n)?n:n.contextElement}function xa(n){const r=Bd(n);if(!ul(r))return jn(1);const o=r.getBoundingClientRect(),{width:i,height:c,$:u}=hb(r);let d=(u?_c(o.width):o.width)/i,h=(u?_c(o.height):o.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const D2=jn(0);function mb(n){const r=nn(n);return!Ud()||!r.visualViewport?D2:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function j2(n,r,o){return r===void 0&&(r=!1),!o||r&&o!==nn(n)?!1:r}function wr(n,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const c=n.getBoundingClientRect(),u=Bd(n);let d=jn(1);r&&(i?Tn(i)&&(d=xa(i)):d=xa(n));const h=j2(u,o,i)?mb(u):jn(0);let m=(c.left+h.x)/d.x,p=(c.top+h.y)/d.y,v=c.width/d.x,b=c.height/d.y;if(u){const S=nn(u),E=i&&Tn(i)?nn(i):i;let T=S,C=td(T);for(;C&&i&&E!==T;){const A=xa(C),N=C.getBoundingClientRect(),z=An(C),k=N.left+(C.clientLeft+parseFloat(z.paddingLeft))*A.x,q=N.top+(C.clientTop+parseFloat(z.paddingTop))*A.y;m*=A.x,p*=A.y,v*=A.x,b*=A.y,m+=k,p+=q,T=nn(C),C=td(T)}}return Nc({width:v,height:b,x:m,y:p})}function Kc(n,r){const o=$c(n).scrollLeft;return r?r.left+o:wr(kn(n)).left+o}function pb(n,r){const o=n.getBoundingClientRect(),i=o.left+r.scrollLeft-Kc(n,o),c=o.top+r.scrollTop;return{x:i,y:c}}function L2(n){let{elements:r,rect:o,offsetParent:i,strategy:c}=n;const u=c==="fixed",d=kn(i),h=r?Pc(r.floating):!1;if(i===d||h&&u)return o;let m={scrollLeft:0,scrollTop:0},p=jn(1);const v=jn(0),b=ul(i);if((b||!b&&!u)&&((_a(i)!=="body"||Bo(d))&&(m=$c(i)),b)){const E=wr(i);p=xa(i),v.x=E.x+i.clientLeft,v.y=E.y+i.clientTop}const S=d&&!b&&!u?pb(d,m):jn(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-m.scrollLeft*p.x+v.x+S.x,y:o.y*p.y-m.scrollTop*p.y+v.y+S.y}}function k2(n){return Array.from(n.getClientRects())}function H2(n){const r=kn(n),o=$c(n),i=n.ownerDocument.body,c=tn(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=tn(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+Kc(n);const h=-o.scrollTop;return An(i).direction==="rtl"&&(d+=tn(r.clientWidth,i.clientWidth)-c),{width:c,height:u,x:d,y:h}}const By=25;function U2(n,r){const o=nn(n),i=kn(n),c=o.visualViewport;let u=i.clientWidth,d=i.clientHeight,h=0,m=0;if(c){u=c.width,d=c.height;const v=Ud();(!v||v&&r==="fixed")&&(h=c.offsetLeft,m=c.offsetTop)}const p=Kc(i);if(p<=0){const v=i.ownerDocument,b=v.body,S=getComputedStyle(b),E=v.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(i.clientWidth-b.clientWidth-E);T<=By&&(u-=T)}else p<=By&&(u+=p);return{width:u,height:d,x:h,y:m}}function B2(n,r){const o=wr(n,!0,r==="fixed"),i=o.top+n.clientTop,c=o.left+n.clientLeft,u=ul(n)?xa(n):jn(1),d=n.clientWidth*u.x,h=n.clientHeight*u.y,m=c*u.x,p=i*u.y;return{width:d,height:h,x:m,y:p}}function Gy(n,r,o){let i;if(r==="viewport")i=U2(n,o);else if(r==="document")i=H2(kn(n));else if(Tn(r))i=B2(r,o);else{const c=mb(n);i={x:r.x-c.x,y:r.y-c.y,width:r.width,height:r.height}}return Nc(i)}function gb(n,r){const o=Il(n);return o===r||!Tn(o)||Ea(o)?!1:An(o).position==="fixed"||gb(o,r)}function G2(n,r){const o=r.get(n);if(o)return o;let i=jo(n,[],!1).filter(h=>Tn(h)&&_a(h)!=="body"),c=null;const u=An(n).position==="fixed";let d=u?Il(n):n;for(;Tn(d)&&!Ea(d);){const h=An(d),m=Hd(d);!m&&h.position==="fixed"&&(c=null),(u?!m&&!c:!m&&h.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Bo(d)&&!m&&gb(n,d))?i=i.filter(v=>v!==d):c=h,d=Il(d)}return r.set(n,i),i}function Y2(n){let{element:r,boundary:o,rootBoundary:i,strategy:c}=n;const d=[...o==="clippingAncestors"?Pc(r)?[]:G2(r,this._c):[].concat(o),i],h=Gy(r,d[0],c);let m=h.top,p=h.right,v=h.bottom,b=h.left;for(let S=1;S<d.length;S++){const E=Gy(r,d[S],c);m=tn(E.top,m),p=Xl(E.right,p),v=Xl(E.bottom,v),b=tn(E.left,b)}return{width:p-b,height:v-m,x:b,y:m}}function V2(n){const{width:r,height:o}=hb(n);return{width:r,height:o}}function q2(n,r,o){const i=ul(r),c=kn(r),u=o==="fixed",d=wr(n,!0,u,r);let h={scrollLeft:0,scrollTop:0};const m=jn(0);function p(){m.x=Kc(c)}if(i||!i&&!u)if((_a(r)!=="body"||Bo(c))&&(h=$c(r)),i){const E=wr(r,!0,u,r);m.x=E.x+r.clientLeft,m.y=E.y+r.clientTop}else c&&p();u&&!i&&c&&p();const v=c&&!i&&!u?pb(c,h):jn(0),b=d.left+h.scrollLeft-m.x-v.x,S=d.top+h.scrollTop-m.y-v.y;return{x:b,y:S,width:d.width,height:d.height}}function jf(n){return An(n).position==="static"}function Yy(n,r){if(!ul(n)||An(n).position==="fixed")return null;if(r)return r(n);let o=n.offsetParent;return kn(n)===o&&(o=o.ownerDocument.body),o}function yb(n,r){const o=nn(n);if(Pc(n))return o;if(!ul(n)){let c=Il(n);for(;c&&!Ea(c);){if(Tn(c)&&!jf(c))return c;c=Il(c)}return o}let i=Yy(n,r);for(;i&&R2(i)&&jf(i);)i=Yy(i,r);return i&&Ea(i)&&jf(i)&&!Hd(i)?o:i||z2(n)||o}const X2=async function(n){const r=this.getOffsetParent||yb,o=this.getDimensions,i=await o(n.floating);return{reference:q2(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function I2(n){return An(n).direction==="rtl"}const P2={convertOffsetParentRelativeRectToViewportRelativeRect:L2,getDocumentElement:kn,getClippingRect:Y2,getOffsetParent:yb,getElementRects:X2,getClientRects:k2,getDimensions:V2,getScale:xa,isElement:Tn,isRTL:I2};function vb(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function $2(n,r){let o=null,i;const c=kn(n);function u(){var h;clearTimeout(i),(h=o)==null||h.disconnect(),o=null}function d(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),u();const p=n.getBoundingClientRect(),{left:v,top:b,width:S,height:E}=p;if(h||r(),!S||!E)return;const T=sc(b),C=sc(c.clientWidth-(v+S)),A=sc(c.clientHeight-(b+E)),N=sc(v),k={rootMargin:-T+"px "+-C+"px "+-A+"px "+-N+"px",threshold:tn(0,Xl(1,m))||1};let q=!0;function Z(D){const _=D[0].intersectionRatio;if(_!==m){if(!q)return d();_?d(!1,_):i=setTimeout(()=>{d(!1,1e-7)},1e3)}_===1&&!vb(p,n.getBoundingClientRect())&&d(),q=!1}try{o=new IntersectionObserver(Z,{...k,root:c.ownerDocument})}catch{o=new IntersectionObserver(Z,k)}o.observe(n)}return d(!0),u}function K2(n,r,o,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,p=Bd(n),v=c||u?[...p?jo(p):[],...r?jo(r):[]]:[];v.forEach(N=>{c&&N.addEventListener("scroll",o,{passive:!0}),u&&N.addEventListener("resize",o)});const b=p&&h?$2(p,o):null;let S=-1,E=null;d&&(E=new ResizeObserver(N=>{let[z]=N;z&&z.target===p&&E&&r&&(E.unobserve(r),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var k;(k=E)==null||k.observe(r)})),o()}),p&&!m&&E.observe(p),r&&E.observe(r));let T,C=m?wr(n):null;m&&A();function A(){const N=wr(n);C&&!vb(C,N)&&o(),C=N,T=requestAnimationFrame(A)}return o(),()=>{var N;v.forEach(z=>{c&&z.removeEventListener("scroll",o),u&&z.removeEventListener("resize",o)}),b==null||b(),(N=E)==null||N.disconnect(),E=null,m&&cancelAnimationFrame(T)}}const Q2=T2,Z2=A2,F2=w2,J2=_2,W2=E2,Vy=S2,eC=M2,tC=(n,r,o)=>{const i=new Map,c={platform:P2,...o},u={...c.platform,_c:i};return x2(n,r,{...c,platform:u})};var nC=typeof document<"u",lC=function(){},xc=nC?y.useLayoutEffect:lC;function Oc(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let o,i,c;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!Oc(n[i],r[i]))return!1;return!0}if(c=Object.keys(n),o=c.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,c[i]))return!1;for(i=o;i--!==0;){const u=c[i];if(!(u==="_owner"&&n.$$typeof)&&!Oc(n[u],r[u]))return!1}return!0}return n!==n&&r!==r}function bb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function qy(n,r){const o=bb(n);return Math.round(r*o)/o}function Lf(n){const r=y.useRef(n);return xc(()=>{r.current=n}),r}function rC(n){n===void 0&&(n={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c,elements:{reference:u,floating:d}={},transform:h=!0,whileElementsMounted:m,open:p}=n,[v,b]=y.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[S,E]=y.useState(i);Oc(S,i)||E(i);const[T,C]=y.useState(null),[A,N]=y.useState(null),z=y.useCallback(G=>{G!==D.current&&(D.current=G,C(G))},[]),k=y.useCallback(G=>{G!==_.current&&(_.current=G,N(G))},[]),q=u||T,Z=d||A,D=y.useRef(null),_=y.useRef(null),j=y.useRef(v),H=m!=null,I=Lf(m),J=Lf(c),le=Lf(p),re=y.useCallback(()=>{if(!D.current||!_.current)return;const G={placement:r,strategy:o,middleware:S};J.current&&(G.platform=J.current),tC(D.current,_.current,G).then($=>{const K={...$,isPositioned:le.current!==!1};te.current&&!Oc(j.current,K)&&(j.current=K,Uo.flushSync(()=>{b(K)}))})},[S,r,o,J,le]);xc(()=>{p===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,b(G=>({...G,isPositioned:!1})))},[p]);const te=y.useRef(!1);xc(()=>(te.current=!0,()=>{te.current=!1}),[]),xc(()=>{if(q&&(D.current=q),Z&&(_.current=Z),q&&Z){if(I.current)return I.current(q,Z,re);re()}},[q,Z,re,I,H]);const ae=y.useMemo(()=>({reference:D,floating:_,setReference:z,setFloating:k}),[z,k]),O=y.useMemo(()=>({reference:q,floating:Z}),[q,Z]),X=y.useMemo(()=>{const G={position:o,left:0,top:0};if(!O.floating)return G;const $=qy(O.floating,v.x),K=qy(O.floating,v.y);return h?{...G,transform:"translate("+$+"px, "+K+"px)",...bb(O.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:$,top:K}},[o,h,O.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:re,refs:ae,elements:O,floatingStyles:X}),[v,re,ae,O,X])}const aC=n=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:i,padding:c}=typeof n=="function"?n(o):n;return i&&r(i)?i.current!=null?Vy({element:i.current,padding:c}).fn(o):{}:i?Vy({element:i,padding:c}).fn(o):{}}}},oC=(n,r)=>{const o=Q2(n);return{name:o.name,fn:o.fn,options:[n,r]}},iC=(n,r)=>{const o=Z2(n);return{name:o.name,fn:o.fn,options:[n,r]}},cC=(n,r)=>({fn:eC(n).fn,options:[n,r]}),sC=(n,r)=>{const o=F2(n);return{name:o.name,fn:o.fn,options:[n,r]}},uC=(n,r)=>{const o=J2(n);return{name:o.name,fn:o.fn,options:[n,r]}},fC=(n,r)=>{const o=W2(n);return{name:o.name,fn:o.fn,options:[n,r]}},dC=(n,r)=>{const o=aC(n);return{name:o.name,fn:o.fn,options:[n,r]}};var hC="Arrow",xb=y.forwardRef((n,r)=>{const{children:o,width:i=10,height:c=5,...u}=n;return x.jsx(ke.svg,{...u,ref:r,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});xb.displayName=hC;var mC=xb,Gd="Popper",[Sb,Ra]=$l(Gd),[pC,wb]=Sb(Gd),Eb=n=>{const{__scopePopper:r,children:o}=n,[i,c]=y.useState(null);return x.jsx(pC,{scope:r,anchor:i,onAnchorChange:c,children:o})};Eb.displayName=Gd;var Cb="PopperAnchor",Tb=y.forwardRef((n,r)=>{const{__scopePopper:o,virtualRef:i,...c}=n,u=wb(Cb,o),d=y.useRef(null),h=qe(r,d),m=y.useRef(null);return y.useEffect(()=>{const p=m.current;m.current=(i==null?void 0:i.current)||d.current,p!==m.current&&u.onAnchorChange(m.current)}),i?null:x.jsx(ke.div,{...c,ref:h})});Tb.displayName=Cb;var Yd="PopperContent",[gC,yC]=Sb(Yd),Ab=y.forwardRef((n,r)=>{var ie,xe,fe,Me,we,Ee;const{__scopePopper:o,side:i="bottom",sideOffset:c=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:T,...C}=n,A=wb(Yd,o),[N,z]=y.useState(null),k=qe(r,nt=>z(nt)),[q,Z]=y.useState(null),D=c2(q),_=(D==null?void 0:D.width)??0,j=(D==null?void 0:D.height)??0,H=i+(u!=="center"?"-"+u:""),I=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},J=Array.isArray(p)?p:[p],le=J.length>0,re={padding:I,boundary:J.filter(bC),altBoundary:le},{refs:te,floatingStyles:ae,placement:O,isPositioned:X,middlewareData:G}=rC({strategy:"fixed",placement:H,whileElementsMounted:(...nt)=>K2(...nt,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[oC({mainAxis:c+j,alignmentAxis:d}),m&&iC({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?cC():void 0,...re}),m&&sC({...re}),uC({...re,apply:({elements:nt,rects:Pe,availableWidth:kt,availableHeight:Ht})=>{const{width:jt,height:Ne}=Pe.reference,be=nt.floating.style;be.setProperty("--radix-popper-available-width",`${kt}px`),be.setProperty("--radix-popper-available-height",`${Ht}px`),be.setProperty("--radix-popper-anchor-width",`${jt}px`),be.setProperty("--radix-popper-anchor-height",`${Ne}px`)}}),q&&dC({element:q,padding:h}),xC({arrowWidth:_,arrowHeight:j}),S&&fC({strategy:"referenceHidden",...re})]}),[$,K]=Rb(O),M=xt(T);Nt(()=>{X&&(M==null||M())},[X,M]);const B=(ie=G.arrow)==null?void 0:ie.x,ne=(xe=G.arrow)==null?void 0:xe.y,oe=((fe=G.arrow)==null?void 0:fe.centerOffset)!==0,[ce,ue]=y.useState();return Nt(()=>{N&&ue(window.getComputedStyle(N).zIndex)},[N]),x.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:X?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(Me=G.transformOrigin)==null?void 0:Me.x,(we=G.transformOrigin)==null?void 0:we.y].join(" "),...((Ee=G.hide)==null?void 0:Ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:x.jsx(gC,{scope:o,placedSide:$,onArrowChange:Z,arrowX:B,arrowY:ne,shouldHideArrow:oe,children:x.jsx(ke.div,{"data-side":$,"data-align":K,...C,ref:k,style:{...C.style,animation:X?void 0:"none"}})})})});Ab.displayName=Yd;var Mb="PopperArrow",vC={top:"bottom",right:"left",bottom:"top",left:"right"},_b=y.forwardRef(function(r,o){const{__scopePopper:i,...c}=r,u=yC(Mb,i),d=vC[u.placedSide];return x.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:x.jsx(mC,{...c,ref:o,style:{...c.style,display:"block"}})})});_b.displayName=Mb;function bC(n){return n!==null}var xC=n=>({name:"transformOrigin",options:n,fn(r){var A,N,z;const{placement:o,rects:i,middlewareData:c}=r,d=((A=c.arrow)==null?void 0:A.centerOffset)!==0,h=d?0:n.arrowWidth,m=d?0:n.arrowHeight,[p,v]=Rb(o),b={start:"0%",center:"50%",end:"100%"}[v],S=(((N=c.arrow)==null?void 0:N.x)??0)+h/2,E=(((z=c.arrow)==null?void 0:z.y)??0)+m/2;let T="",C="";return p==="bottom"?(T=d?b:`${S}px`,C=`${-m}px`):p==="top"?(T=d?b:`${S}px`,C=`${i.floating.height+m}px`):p==="right"?(T=`${-m}px`,C=d?b:`${E}px`):p==="left"&&(T=`${i.floating.width+m}px`,C=d?b:`${E}px`),{data:{x:T,y:C}}}});function Rb(n){const[r,o="center"]=n.split("-");return[r,o]}var Vd=Eb,qd=Tb,Xd=Ab,Id=_b,kf="rovingFocusGroup.onEntryFocus",SC={bubbles:!1,cancelable:!0},Go="RovingFocusGroup",[nd,Nb,wC]=Nd(Go),[EC,Ob]=$l(Go,[wC]),[CC,TC]=EC(Go),zb=y.forwardRef((n,r)=>x.jsx(nd.Provider,{scope:n.__scopeRovingFocusGroup,children:x.jsx(nd.Slot,{scope:n.__scopeRovingFocusGroup,children:x.jsx(AC,{...n,ref:r})})}));zb.displayName=Go;var AC=y.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:c=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:v=!1,...b}=n,S=y.useRef(null),E=qe(r,S),T=Vc(u),[C,A]=Mc({prop:d,defaultProp:h??null,onChange:m,caller:Go}),[N,z]=y.useState(!1),k=xt(p),q=Nb(o),Z=y.useRef(!1),[D,_]=y.useState(0);return y.useEffect(()=>{const j=S.current;if(j)return j.addEventListener(kf,k),()=>j.removeEventListener(kf,k)},[k]),x.jsx(CC,{scope:o,orientation:i,dir:T,loop:c,currentTabStopId:C,onItemFocus:y.useCallback(j=>A(j),[A]),onItemShiftTab:y.useCallback(()=>z(!0),[]),onFocusableItemAdd:y.useCallback(()=>_(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>_(j=>j-1),[]),children:x.jsx(ke.div,{tabIndex:N||D===0?-1:0,"data-orientation":i,...b,ref:E,style:{outline:"none",...n.style},onMouseDown:he(n.onMouseDown,()=>{Z.current=!0}),onFocus:he(n.onFocus,j=>{const H=!Z.current;if(j.target===j.currentTarget&&H&&!N){const I=new CustomEvent(kf,SC);if(j.currentTarget.dispatchEvent(I),!I.defaultPrevented){const J=q().filter(O=>O.focusable),le=J.find(O=>O.active),re=J.find(O=>O.id===C),ae=[le,re,...J].filter(Boolean).map(O=>O.ref.current);Lb(ae,v)}}Z.current=!1}),onBlur:he(n.onBlur,()=>z(!1))})})}),Db="RovingFocusGroupItem",jb=y.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:c=!1,tabStopId:u,children:d,...h}=n,m=wa(),p=u||m,v=TC(Db,o),b=v.currentTabStopId===p,S=Nb(o),{onFocusableItemAdd:E,onFocusableItemRemove:T,currentTabStopId:C}=v;return y.useEffect(()=>{if(i)return E(),()=>T()},[i,E,T]),x.jsx(nd.ItemSlot,{scope:o,id:p,focusable:i,active:c,children:x.jsx(ke.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...h,ref:r,onMouseDown:he(n.onMouseDown,A=>{i?v.onItemFocus(p):A.preventDefault()}),onFocus:he(n.onFocus,()=>v.onItemFocus(p)),onKeyDown:he(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){v.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const N=RC(A,v.orientation,v.dir);if(N!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let k=S().filter(q=>q.focusable).map(q=>q.ref.current);if(N==="last")k.reverse();else if(N==="prev"||N==="next"){N==="prev"&&k.reverse();const q=k.indexOf(A.currentTarget);k=v.loop?NC(k,q+1):k.slice(q+1)}setTimeout(()=>Lb(k))}}),children:typeof d=="function"?d({isCurrentTabStop:b,hasTabStop:C!=null}):d})})});jb.displayName=Db;var MC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _C(n,r){return r!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function RC(n,r,o){const i=_C(n.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return MC[i]}function Lb(n,r=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function NC(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var OC=zb,zC=jb,ld=["Enter"," "],DC=["ArrowDown","PageUp","Home"],kb=["ArrowUp","PageDown","End"],jC=[...DC,...kb],LC={ltr:[...ld,"ArrowRight"],rtl:[...ld,"ArrowLeft"]},kC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Yo="Menu",[Lo,HC,UC]=Nd(Yo),[Tr,Hb]=$l(Yo,[UC,Ra,Ob]),Vo=Ra(),Ub=Ob(),[Bb,Kl]=Tr(Yo),[BC,qo]=Tr(Yo),Gb=n=>{const{__scopeMenu:r,open:o=!1,children:i,dir:c,onOpenChange:u,modal:d=!0}=n,h=Vo(r),[m,p]=y.useState(null),v=y.useRef(!1),b=xt(u),S=Vc(c);return y.useEffect(()=>{const E=()=>{v.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},T=()=>v.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),x.jsx(Vd,{...h,children:x.jsx(Bb,{scope:r,open:o,onOpenChange:b,content:m,onContentChange:p,children:x.jsx(BC,{scope:r,onClose:y.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:v,dir:S,modal:d,children:i})})})};Gb.displayName=Yo;var GC="MenuAnchor",Pd=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,c=Vo(o);return x.jsx(qd,{...c,...i,ref:r})});Pd.displayName=GC;var $d="MenuPortal",[YC,Yb]=Tr($d,{forceMount:void 0}),Vb=n=>{const{__scopeMenu:r,forceMount:o,children:i,container:c}=n,u=Kl($d,r);return x.jsx(YC,{scope:r,forceMount:o,children:x.jsx(Ln,{present:o||u.open,children:x.jsx(zd,{asChild:!0,container:c,children:i})})})};Vb.displayName=$d;var pn="MenuContent",[VC,Kd]=Tr(pn),qb=y.forwardRef((n,r)=>{const o=Yb(pn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,u=Kl(pn,n.__scopeMenu),d=qo(pn,n.__scopeMenu);return x.jsx(Lo.Provider,{scope:n.__scopeMenu,children:x.jsx(Ln,{present:i||u.open,children:x.jsx(Lo.Slot,{scope:n.__scopeMenu,children:d.modal?x.jsx(qC,{...c,ref:r}):x.jsx(XC,{...c,ref:r})})})})}),qC=y.forwardRef((n,r)=>{const o=Kl(pn,n.__scopeMenu),i=y.useRef(null),c=qe(r,i);return y.useEffect(()=>{const u=i.current;if(u)return cb(u)},[]),x.jsx(Qd,{...n,ref:c,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:he(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),XC=y.forwardRef((n,r)=>{const o=Kl(pn,n.__scopeMenu);return x.jsx(Qd,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),IC=Sa("MenuContent.ScrollLock"),Qd=y.forwardRef((n,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:S,onDismiss:E,disableOutsideScroll:T,...C}=n,A=Kl(pn,o),N=qo(pn,o),z=Vo(o),k=Ub(o),q=HC(o),[Z,D]=y.useState(null),_=y.useRef(null),j=qe(r,_,A.onContentChange),H=y.useRef(0),I=y.useRef(""),J=y.useRef(0),le=y.useRef(null),re=y.useRef("right"),te=y.useRef(0),ae=T?Dd:y.Fragment,O=T?{as:IC,allowPinchZoom:!0}:void 0,X=$=>{var ie,xe;const K=I.current+$,M=q().filter(fe=>!fe.disabled),B=document.activeElement,ne=(ie=M.find(fe=>fe.ref.current===B))==null?void 0:ie.textValue,oe=M.map(fe=>fe.textValue),ce=lT(oe,K,ne),ue=(xe=M.find(fe=>fe.textValue===ce))==null?void 0:xe.ref.current;(function fe(Me){I.current=Me,window.clearTimeout(H.current),Me!==""&&(H.current=window.setTimeout(()=>fe(""),1e3))})(K),ue&&setTimeout(()=>ue.focus())};y.useEffect(()=>()=>window.clearTimeout(H.current),[]),Wv();const G=y.useCallback($=>{var M,B;return re.current===((M=le.current)==null?void 0:M.side)&&aT($,(B=le.current)==null?void 0:B.area)},[]);return x.jsx(VC,{scope:o,searchRef:I,onItemEnter:y.useCallback($=>{G($)&&$.preventDefault()},[G]),onItemLeave:y.useCallback($=>{var K;G($)||((K=_.current)==null||K.focus(),D(null))},[G]),onTriggerLeave:y.useCallback($=>{G($)&&$.preventDefault()},[G]),pointerGraceTimerRef:J,onPointerGraceIntentChange:y.useCallback($=>{le.current=$},[]),children:x.jsx(ae,{...O,children:x.jsx(Od,{asChild:!0,trapped:c,onMountAutoFocus:he(u,$=>{var K;$.preventDefault(),(K=_.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:x.jsx(qc,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:S,onDismiss:E,children:x.jsx(OC,{asChild:!0,...k,dir:N.dir,orientation:"vertical",loop:i,currentTabStopId:Z,onCurrentTabStopIdChange:D,onEntryFocus:he(m,$=>{N.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(Xd,{role:"menu","aria-orientation":"vertical","data-state":o0(A.open),"data-radix-menu-content":"",dir:N.dir,...z,...C,ref:j,style:{outline:"none",...C.style},onKeyDown:he(C.onKeyDown,$=>{const M=$.target.closest("[data-radix-menu-content]")===$.currentTarget,B=$.ctrlKey||$.altKey||$.metaKey,ne=$.key.length===1;M&&($.key==="Tab"&&$.preventDefault(),!B&&ne&&X($.key));const oe=_.current;if($.target!==oe||!jC.includes($.key))return;$.preventDefault();const ue=q().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);kb.includes($.key)&&ue.reverse(),tT(ue)}),onBlur:he(n.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(H.current),I.current="")}),onPointerMove:he(n.onPointerMove,ko($=>{const K=$.target,M=te.current!==$.clientX;if($.currentTarget.contains(K)&&M){const B=$.clientX>te.current?"right":"left";re.current=B,te.current=$.clientX}}))})})})})})})});qb.displayName=pn;var PC="MenuGroup",Zd=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(ke.div,{role:"group",...i,ref:r})});Zd.displayName=PC;var $C="MenuLabel",Xb=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(ke.div,{...i,ref:r})});Xb.displayName=$C;var zc="MenuItem",Xy="menu.itemSelect",Qc=y.forwardRef((n,r)=>{const{disabled:o=!1,onSelect:i,...c}=n,u=y.useRef(null),d=qo(zc,n.__scopeMenu),h=Kd(zc,n.__scopeMenu),m=qe(r,u),p=y.useRef(!1),v=()=>{const b=u.current;if(!o&&b){const S=new CustomEvent(Xy,{bubbles:!0,cancelable:!0});b.addEventListener(Xy,E=>i==null?void 0:i(E),{once:!0}),$v(b,S),S.defaultPrevented?p.current=!1:d.onClose()}};return x.jsx(Ib,{...c,ref:m,disabled:o,onClick:he(n.onClick,v),onPointerDown:b=>{var S;(S=n.onPointerDown)==null||S.call(n,b),p.current=!0},onPointerUp:he(n.onPointerUp,b=>{var S;p.current||(S=b.currentTarget)==null||S.click()}),onKeyDown:he(n.onKeyDown,b=>{const S=h.searchRef.current!=="";o||S&&b.key===" "||ld.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});Qc.displayName=zc;var Ib=y.forwardRef((n,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:c,...u}=n,d=Kd(zc,o),h=Ub(o),m=y.useRef(null),p=qe(r,m),[v,b]=y.useState(!1),[S,E]=y.useState("");return y.useEffect(()=>{const T=m.current;T&&E((T.textContent??"").trim())},[u.children]),x.jsx(Lo.ItemSlot,{scope:o,disabled:i,textValue:c??S,children:x.jsx(zC,{asChild:!0,...h,focusable:!i,children:x.jsx(ke.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:p,onPointerMove:he(n.onPointerMove,ko(T=>{i?d.onItemLeave(T):(d.onItemEnter(T),T.defaultPrevented||T.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(n.onPointerLeave,ko(T=>d.onItemLeave(T))),onFocus:he(n.onFocus,()=>b(!0)),onBlur:he(n.onBlur,()=>b(!1))})})})}),KC="MenuCheckboxItem",Pb=y.forwardRef((n,r)=>{const{checked:o=!1,onCheckedChange:i,...c}=n;return x.jsx(Fb,{scope:n.__scopeMenu,checked:o,children:x.jsx(Qc,{role:"menuitemcheckbox","aria-checked":Dc(o)?"mixed":o,...c,ref:r,"data-state":Wd(o),onSelect:he(c.onSelect,()=>i==null?void 0:i(Dc(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Pb.displayName=KC;var $b="MenuRadioGroup",[QC,ZC]=Tr($b,{value:void 0,onValueChange:()=>{}}),Kb=y.forwardRef((n,r)=>{const{value:o,onValueChange:i,...c}=n,u=xt(i);return x.jsx(QC,{scope:n.__scopeMenu,value:o,onValueChange:u,children:x.jsx(Zd,{...c,ref:r})})});Kb.displayName=$b;var Qb="MenuRadioItem",Zb=y.forwardRef((n,r)=>{const{value:o,...i}=n,c=ZC(Qb,n.__scopeMenu),u=o===c.value;return x.jsx(Fb,{scope:n.__scopeMenu,checked:u,children:x.jsx(Qc,{role:"menuitemradio","aria-checked":u,...i,ref:r,"data-state":Wd(u),onSelect:he(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,o)},{checkForDefaultPrevented:!1})})})});Zb.displayName=Qb;var Fd="MenuItemIndicator",[Fb,FC]=Tr(Fd,{checked:!1}),Jb=y.forwardRef((n,r)=>{const{__scopeMenu:o,forceMount:i,...c}=n,u=FC(Fd,o);return x.jsx(Ln,{present:i||Dc(u.checked)||u.checked===!0,children:x.jsx(ke.span,{...c,ref:r,"data-state":Wd(u.checked)})})});Jb.displayName=Fd;var JC="MenuSeparator",Wb=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});Wb.displayName=JC;var WC="MenuArrow",e0=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,c=Vo(o);return x.jsx(Id,{...c,...i,ref:r})});e0.displayName=WC;var Jd="MenuSub",[eT,t0]=Tr(Jd),n0=n=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:c}=n,u=Kl(Jd,r),d=Vo(r),[h,m]=y.useState(null),[p,v]=y.useState(null),b=xt(c);return y.useEffect(()=>(u.open===!1&&b(!1),()=>b(!1)),[u.open,b]),x.jsx(Vd,{...d,children:x.jsx(Bb,{scope:r,open:i,onOpenChange:b,content:p,onContentChange:v,children:x.jsx(eT,{scope:r,contentId:wa(),triggerId:wa(),trigger:h,onTriggerChange:m,children:o})})})};n0.displayName=Jd;var Ro="MenuSubTrigger",l0=y.forwardRef((n,r)=>{const o=Kl(Ro,n.__scopeMenu),i=qo(Ro,n.__scopeMenu),c=t0(Ro,n.__scopeMenu),u=Kd(Ro,n.__scopeMenu),d=y.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,p={__scopeMenu:n.__scopeMenu},v=y.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return y.useEffect(()=>v,[v]),y.useEffect(()=>{const b=h.current;return()=>{window.clearTimeout(b),m(null)}},[h,m]),x.jsx(Pd,{asChild:!0,...p,children:x.jsx(Ib,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":c.contentId,"data-state":o0(o.open),...n,ref:Rd(r,c.onTriggerChange),onClick:b=>{var S;(S=n.onClick)==null||S.call(n,b),!(n.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:he(n.onPointerMove,ko(b=>{u.onItemEnter(b),!b.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),v()},100))})),onPointerLeave:he(n.onPointerLeave,ko(b=>{var E,T;v();const S=(E=o.content)==null?void 0:E.getBoundingClientRect();if(S){const C=(T=o.content)==null?void 0:T.dataset.side,A=C==="right",N=A?-5:5,z=S[A?"left":"right"],k=S[A?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+N,y:b.clientY},{x:z,y:S.top},{x:k,y:S.top},{x:k,y:S.bottom},{x:z,y:S.bottom}],side:C}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:he(n.onKeyDown,b=>{var E;const S=u.searchRef.current!=="";n.disabled||S&&b.key===" "||LC[i.dir].includes(b.key)&&(o.onOpenChange(!0),(E=o.content)==null||E.focus(),b.preventDefault())})})})});l0.displayName=Ro;var r0="MenuSubContent",a0=y.forwardRef((n,r)=>{const o=Yb(pn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,u=Kl(pn,n.__scopeMenu),d=qo(pn,n.__scopeMenu),h=t0(r0,n.__scopeMenu),m=y.useRef(null),p=qe(r,m);return x.jsx(Lo.Provider,{scope:n.__scopeMenu,children:x.jsx(Ln,{present:i||u.open,children:x.jsx(Lo.Slot,{scope:n.__scopeMenu,children:x.jsx(Qd,{id:h.contentId,"aria-labelledby":h.triggerId,...c,ref:p,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{var b;d.isUsingKeyboardRef.current&&((b=m.current)==null||b.focus()),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:he(n.onFocusOutside,v=>{v.target!==h.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:he(n.onEscapeKeyDown,v=>{d.onClose(),v.preventDefault()}),onKeyDown:he(n.onKeyDown,v=>{var E;const b=v.currentTarget.contains(v.target),S=kC[d.dir].includes(v.key);b&&S&&(u.onOpenChange(!1),(E=h.trigger)==null||E.focus(),v.preventDefault())})})})})})});a0.displayName=r0;function o0(n){return n?"open":"closed"}function Dc(n){return n==="indeterminate"}function Wd(n){return Dc(n)?"indeterminate":n?"checked":"unchecked"}function tT(n){const r=document.activeElement;for(const o of n)if(o===r||(o.focus(),document.activeElement!==r))return}function nT(n,r){return n.map((o,i)=>n[(r+i)%n.length])}function lT(n,r,o){const c=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=nT(n,Math.max(u,0));c.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.toLowerCase().startsWith(c.toLowerCase()));return m!==o?m:void 0}function rT(n,r){const{x:o,y:i}=n;let c=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const h=r[u],m=r[d],p=h.x,v=h.y,b=m.x,S=m.y;v>i!=S>i&&o<(b-p)*(i-v)/(S-v)+p&&(c=!c)}return c}function aT(n,r){if(!r)return!1;const o={x:n.clientX,y:n.clientY};return rT(o,r)}function ko(n){return r=>r.pointerType==="mouse"?n(r):void 0}var oT=Gb,iT=Pd,cT=Vb,sT=qb,uT=Zd,fT=Xb,dT=Qc,hT=Pb,mT=Kb,pT=Zb,gT=Jb,yT=Wb,vT=e0,bT=n0,xT=l0,ST=a0,eh="ContextMenu",[wT]=$l(eh,[Hb]),Dt=Hb(),[ET,i0]=wT(eh),c0=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,dir:c,modal:u=!0}=n,[d,h]=y.useState(!1),m=Dt(r),p=xt(i),v=y.useCallback(b=>{h(b),p(b)},[p]);return x.jsx(ET,{scope:r,open:d,onOpenChange:v,modal:u,children:x.jsx(oT,{...m,dir:c,open:d,onOpenChange:v,modal:u,children:o})})};c0.displayName=eh;var s0="ContextMenuTrigger",u0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,disabled:i=!1,...c}=n,u=i0(s0,o),d=Dt(o),h=y.useRef({x:0,y:0}),m=y.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),p=y.useRef(0),v=y.useCallback(()=>window.clearTimeout(p.current),[]),b=S=>{h.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return y.useEffect(()=>v,[v]),y.useEffect(()=>void(i&&v()),[i,v]),x.jsxs(x.Fragment,{children:[x.jsx(iT,{...d,virtualRef:m}),x.jsx(ke.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:r,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:he(n.onContextMenu,S=>{v(),b(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:he(n.onPointerDown,uc(S=>{v(),p.current=window.setTimeout(()=>b(S),700)})),onPointerMove:i?n.onPointerMove:he(n.onPointerMove,uc(v)),onPointerCancel:i?n.onPointerCancel:he(n.onPointerCancel,uc(v)),onPointerUp:i?n.onPointerUp:he(n.onPointerUp,uc(v))})]})});u0.displayName=s0;var CT="ContextMenuPortal",f0=n=>{const{__scopeContextMenu:r,...o}=n,i=Dt(r);return x.jsx(cT,{...i,...o})};f0.displayName=CT;var d0="ContextMenuContent",h0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=i0(d0,o),u=Dt(o),d=y.useRef(!1);return x.jsx(sT,{...u,...i,ref:r,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var m;(m=n.onCloseAutoFocus)==null||m.call(n,h),!h.defaultPrevented&&d.current&&h.preventDefault(),d.current=!1},onInteractOutside:h=>{var m;(m=n.onInteractOutside)==null||m.call(n,h),!h.defaultPrevented&&!c.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)"}})});h0.displayName=d0;var TT="ContextMenuGroup",AT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(uT,{...c,...i,ref:r})});AT.displayName=TT;var MT="ContextMenuLabel",_T=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(fT,{...c,...i,ref:r})});_T.displayName=MT;var RT="ContextMenuItem",m0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(dT,{...c,...i,ref:r})});m0.displayName=RT;var NT="ContextMenuCheckboxItem",OT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(hT,{...c,...i,ref:r})});OT.displayName=NT;var zT="ContextMenuRadioGroup",DT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(mT,{...c,...i,ref:r})});DT.displayName=zT;var jT="ContextMenuRadioItem",LT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(pT,{...c,...i,ref:r})});LT.displayName=jT;var kT="ContextMenuItemIndicator",HT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(gT,{...c,...i,ref:r})});HT.displayName=kT;var UT="ContextMenuSeparator",p0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(yT,{...c,...i,ref:r})});p0.displayName=UT;var BT="ContextMenuArrow",GT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(vT,{...c,...i,ref:r})});GT.displayName=BT;var g0="ContextMenuSub",y0=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,open:c,defaultOpen:u}=n,d=Dt(r),[h,m]=Mc({prop:c,defaultProp:u??!1,onChange:i,caller:g0});return x.jsx(bT,{...d,open:h,onOpenChange:m,children:o})};y0.displayName=g0;var YT="ContextMenuSubTrigger",v0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(xT,{...c,...i,ref:r})});v0.displayName=YT;var VT="ContextMenuSubContent",b0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(ST,{...c,...i,ref:r,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)"}})});b0.displayName=VT;function uc(n){return r=>r.pointerType!=="mouse"?n(r):void 0}var qT=c0,XT=u0,IT=f0,PT=h0,$T=m0,KT=p0,QT=y0,ZT=v0,FT=b0;function rd(n,[r,o]){return Math.min(o,Math.max(r,n))}function JT(n,r){return y.useReducer((o,i)=>r[o][i]??o,n)}var th="ScrollArea",[x0]=$l(th),[WT,gn]=x0(th),S0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,type:i="hover",dir:c,scrollHideDelay:u=600,...d}=n,[h,m]=y.useState(null),[p,v]=y.useState(null),[b,S]=y.useState(null),[E,T]=y.useState(null),[C,A]=y.useState(null),[N,z]=y.useState(0),[k,q]=y.useState(0),[Z,D]=y.useState(!1),[_,j]=y.useState(!1),H=qe(r,J=>m(J)),I=Vc(c);return x.jsx(WT,{scope:o,type:i,dir:I,scrollHideDelay:u,scrollArea:h,viewport:p,onViewportChange:v,content:b,onContentChange:S,scrollbarX:E,onScrollbarXChange:T,scrollbarXEnabled:Z,onScrollbarXEnabledChange:D,scrollbarY:C,onScrollbarYChange:A,scrollbarYEnabled:_,onScrollbarYEnabledChange:j,onCornerWidthChange:z,onCornerHeightChange:q,children:x.jsx(ke.div,{dir:I,...d,ref:H,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":k+"px",...n.style}})})});S0.displayName=th;var w0="ScrollAreaViewport",E0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,children:i,nonce:c,...u}=n,d=gn(w0,o),h=y.useRef(null),m=qe(r,h,d.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),x.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...u,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...n.style},children:x.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});E0.displayName=w0;var Hn="ScrollAreaScrollbar",C0=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(Hn,n.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:d}=c,h=n.orientation==="horizontal";return y.useEffect(()=>(h?u(!0):d(!0),()=>{h?u(!1):d(!1)}),[h,u,d]),c.type==="hover"?x.jsx(eA,{...i,ref:r,forceMount:o}):c.type==="scroll"?x.jsx(tA,{...i,ref:r,forceMount:o}):c.type==="auto"?x.jsx(T0,{...i,ref:r,forceMount:o}):c.type==="always"?x.jsx(nh,{...i,ref:r}):null});C0.displayName=Hn;var eA=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(Hn,n.__scopeScrollArea),[u,d]=y.useState(!1);return y.useEffect(()=>{const h=c.scrollArea;let m=0;if(h){const p=()=>{window.clearTimeout(m),d(!0)},v=()=>{m=window.setTimeout(()=>d(!1),c.scrollHideDelay)};return h.addEventListener("pointerenter",p),h.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),h.removeEventListener("pointerenter",p),h.removeEventListener("pointerleave",v)}}},[c.scrollArea,c.scrollHideDelay]),x.jsx(Ln,{present:o||u,children:x.jsx(T0,{"data-state":u?"visible":"hidden",...i,ref:r})})}),tA=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(Hn,n.__scopeScrollArea),u=n.orientation==="horizontal",d=Fc(()=>m("SCROLL_END"),100),[h,m]=JT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(h==="idle"){const p=window.setTimeout(()=>m("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(p)}},[h,c.scrollHideDelay,m]),y.useEffect(()=>{const p=c.viewport,v=u?"scrollLeft":"scrollTop";if(p){let b=p[v];const S=()=>{const E=p[v];b!==E&&(m("SCROLL"),d()),b=E};return p.addEventListener("scroll",S),()=>p.removeEventListener("scroll",S)}},[c.viewport,u,m,d]),x.jsx(Ln,{present:o||h!=="hidden",children:x.jsx(nh,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:r,onPointerEnter:he(n.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:he(n.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),T0=y.forwardRef((n,r)=>{const o=gn(Hn,n.__scopeScrollArea),{forceMount:i,...c}=n,[u,d]=y.useState(!1),h=n.orientation==="horizontal",m=Fc(()=>{if(o.viewport){const p=o.viewport.offsetWidth<o.viewport.scrollWidth,v=o.viewport.offsetHeight<o.viewport.scrollHeight;d(h?p:v)}},10);return Ca(o.viewport,m),Ca(o.content,m),x.jsx(Ln,{present:i||u,children:x.jsx(nh,{"data-state":u?"visible":"hidden",...c,ref:r})})}),nh=y.forwardRef((n,r)=>{const{orientation:o="vertical",...i}=n,c=gn(Hn,n.__scopeScrollArea),u=y.useRef(null),d=y.useRef(0),[h,m]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=N0(h.viewport,h.content),v={...i,sizes:h,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:S=>u.current=S,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:S=>d.current=S};function b(S,E){return iA(S,d.current,h,E)}return o==="horizontal"?x.jsx(nA,{...v,ref:r,onThumbPositionChange:()=>{if(c.viewport&&u.current){const S=c.viewport.scrollLeft,E=Iy(S,h,c.dir);u.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollLeft=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollLeft=b(S,c.dir))}}):o==="vertical"?x.jsx(lA,{...v,ref:r,onThumbPositionChange:()=>{if(c.viewport&&u.current){const S=c.viewport.scrollTop,E=Iy(S,h);u.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollTop=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollTop=b(S))}}):null}),nA=y.forwardRef((n,r)=>{const{sizes:o,onSizesChange:i,...c}=n,u=gn(Hn,n.__scopeScrollArea),[d,h]=y.useState(),m=y.useRef(null),p=qe(r,m,u.onScrollbarXChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),x.jsx(M0,{"data-orientation":"horizontal",...c,ref:p,sizes:o,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zc(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.x),onDragScroll:v=>n.onDragScroll(v.x),onWheelScroll:(v,b)=>{if(u.viewport){const S=u.viewport.scrollLeft+v.deltaX;n.onWheelScroll(S),z0(S,b)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&d&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Lc(d.paddingLeft),paddingEnd:Lc(d.paddingRight)}})}})}),lA=y.forwardRef((n,r)=>{const{sizes:o,onSizesChange:i,...c}=n,u=gn(Hn,n.__scopeScrollArea),[d,h]=y.useState(),m=y.useRef(null),p=qe(r,m,u.onScrollbarYChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),x.jsx(M0,{"data-orientation":"vertical",...c,ref:p,sizes:o,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zc(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.y),onDragScroll:v=>n.onDragScroll(v.y),onWheelScroll:(v,b)=>{if(u.viewport){const S=u.viewport.scrollTop+v.deltaY;n.onWheelScroll(S),z0(S,b)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&d&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Lc(d.paddingTop),paddingEnd:Lc(d.paddingBottom)}})}})}),[rA,A0]=x0(Hn),M0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:c,onThumbChange:u,onThumbPointerUp:d,onThumbPointerDown:h,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:v,onResize:b,...S}=n,E=gn(Hn,o),[T,C]=y.useState(null),A=qe(r,H=>C(H)),N=y.useRef(null),z=y.useRef(""),k=E.viewport,q=i.content-i.viewport,Z=xt(v),D=xt(m),_=Fc(b,10);function j(H){if(N.current){const I=H.clientX-N.current.left,J=H.clientY-N.current.top;p({x:I,y:J})}}return y.useEffect(()=>{const H=I=>{const J=I.target;(T==null?void 0:T.contains(J))&&Z(I,q)};return document.addEventListener("wheel",H,{passive:!1}),()=>document.removeEventListener("wheel",H,{passive:!1})},[k,T,q,Z]),y.useEffect(D,[i,D]),Ca(T,_),Ca(E.content,_),x.jsx(rA,{scope:o,scrollbar:T,hasThumb:c,onThumbChange:xt(u),onThumbPointerUp:xt(d),onThumbPositionChange:D,onThumbPointerDown:xt(h),children:x.jsx(ke.div,{...S,ref:A,style:{position:"absolute",...S.style},onPointerDown:he(n.onPointerDown,H=>{H.button===0&&(H.target.setPointerCapture(H.pointerId),N.current=T.getBoundingClientRect(),z.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),j(H))}),onPointerMove:he(n.onPointerMove,j),onPointerUp:he(n.onPointerUp,H=>{const I=H.target;I.hasPointerCapture(H.pointerId)&&I.releasePointerCapture(H.pointerId),document.body.style.webkitUserSelect=z.current,E.viewport&&(E.viewport.style.scrollBehavior=""),N.current=null})})})}),jc="ScrollAreaThumb",_0=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=A0(jc,n.__scopeScrollArea);return x.jsx(Ln,{present:o||c.hasThumb,children:x.jsx(aA,{ref:r,...i})})}),aA=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,style:i,...c}=n,u=gn(jc,o),d=A0(jc,o),{onThumbPositionChange:h}=d,m=qe(r,b=>d.onThumbChange(b)),p=y.useRef(void 0),v=Fc(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const b=u.viewport;if(b){const S=()=>{if(v(),!p.current){const E=cA(b,h);p.current=E,h()}};return h(),b.addEventListener("scroll",S),()=>b.removeEventListener("scroll",S)}},[u.viewport,v,h]),x.jsx(ke.div,{"data-state":d.hasThumb?"visible":"hidden",...c,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:he(n.onPointerDownCapture,b=>{const E=b.target.getBoundingClientRect(),T=b.clientX-E.left,C=b.clientY-E.top;d.onThumbPointerDown({x:T,y:C})}),onPointerUp:he(n.onPointerUp,d.onThumbPointerUp)})});_0.displayName=jc;var lh="ScrollAreaCorner",R0=y.forwardRef((n,r)=>{const o=gn(lh,n.__scopeScrollArea),i=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&i?x.jsx(oA,{...n,ref:r}):null});R0.displayName=lh;var oA=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,...i}=n,c=gn(lh,o),[u,d]=y.useState(0),[h,m]=y.useState(0),p=!!(u&&h);return Ca(c.scrollbarX,()=>{var b;const v=((b=c.scrollbarX)==null?void 0:b.offsetHeight)||0;c.onCornerHeightChange(v),m(v)}),Ca(c.scrollbarY,()=>{var b;const v=((b=c.scrollbarY)==null?void 0:b.offsetWidth)||0;c.onCornerWidthChange(v),d(v)}),p?x.jsx(ke.div,{...i,ref:r,style:{width:u,height:h,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Lc(n){return n?parseInt(n,10):0}function N0(n,r){const o=n/r;return isNaN(o)?0:o}function Zc(n){const r=N0(n.viewport,n.content),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,i=(n.scrollbar.size-o)*r;return Math.max(i,18)}function iA(n,r,o,i="ltr"){const c=Zc(o),u=c/2,d=r||u,h=c-d,m=o.scrollbar.paddingStart+d,p=o.scrollbar.size-o.scrollbar.paddingEnd-h,v=o.content-o.viewport,b=i==="ltr"?[0,v]:[v*-1,0];return O0([m,p],b)(n)}function Iy(n,r,o="ltr"){const i=Zc(r),c=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,u=r.scrollbar.size-c,d=r.content-r.viewport,h=u-i,m=o==="ltr"?[0,d]:[d*-1,0],p=rd(n,m);return O0([0,d],[0,h])(p)}function O0(n,r){return o=>{if(n[0]===n[1]||r[0]===r[1])return r[0];const i=(r[1]-r[0])/(n[1]-n[0]);return r[0]+i*(o-n[0])}}function z0(n,r){return n>0&&n<r}var cA=(n,r=()=>{})=>{let o={left:n.scrollLeft,top:n.scrollTop},i=0;return(function c(){const u={left:n.scrollLeft,top:n.scrollTop},d=o.left!==u.left,h=o.top!==u.top;(d||h)&&r(),o=u,i=window.requestAnimationFrame(c)})(),()=>window.cancelAnimationFrame(i)};function Fc(n,r){const o=xt(n),i=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),y.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(o,r)},[o,r])}function Ca(n,r){const o=xt(r);Nt(()=>{let i=0;if(n){const c=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(o)});return c.observe(n),()=>{window.cancelAnimationFrame(i),c.unobserve(n)}}},[n,o])}var sA=S0,uA=E0,fA=R0,dA=[" ","Enter","ArrowUp","ArrowDown"],hA=[" ","Enter"],Er="Select",[Jc,Wc,mA]=Nd(Er),[Na]=$l(Er,[mA,Ra]),es=Ra(),[pA,Ql]=Na(Er),[gA,yA]=Na(Er),D0=n=>{const{__scopeSelect:r,children:o,open:i,defaultOpen:c,onOpenChange:u,value:d,defaultValue:h,onValueChange:m,dir:p,name:v,autoComplete:b,disabled:S,required:E,form:T}=n,C=es(r),[A,N]=y.useState(null),[z,k]=y.useState(null),[q,Z]=y.useState(!1),D=Vc(p),[_,j]=Mc({prop:i,defaultProp:c??!1,onChange:u,caller:Er}),[H,I]=Mc({prop:d,defaultProp:h,onChange:m,caller:Er}),J=y.useRef(null),le=A?T||!!A.closest("form"):!0,[re,te]=y.useState(new Set),ae=Array.from(re).map(O=>O.props.value).join(";");return x.jsx(Vd,{...C,children:x.jsxs(pA,{required:E,scope:r,trigger:A,onTriggerChange:N,valueNode:z,onValueNodeChange:k,valueNodeHasChildren:q,onValueNodeHasChildrenChange:Z,contentId:wa(),value:H,onValueChange:I,open:_,onOpenChange:j,dir:D,triggerPointerDownPosRef:J,disabled:S,children:[x.jsx(Jc.Provider,{scope:r,children:x.jsx(gA,{scope:n.__scopeSelect,onNativeOptionAdd:y.useCallback(O=>{te(X=>new Set(X).add(O))},[]),onNativeOptionRemove:y.useCallback(O=>{te(X=>{const G=new Set(X);return G.delete(O),G})},[]),children:o})}),le?x.jsxs(nx,{"aria-hidden":!0,required:E,tabIndex:-1,name:v,autoComplete:b,value:H,onChange:O=>I(O.target.value),disabled:S,form:T,children:[H===void 0?x.jsx("option",{value:""}):null,Array.from(re)]},ae):null]})})};D0.displayName=Er;var j0="SelectTrigger",L0=y.forwardRef((n,r)=>{const{__scopeSelect:o,disabled:i=!1,...c}=n,u=es(o),d=Ql(j0,o),h=d.disabled||i,m=qe(r,d.onTriggerChange),p=Wc(o),v=y.useRef("touch"),[b,S,E]=rx(C=>{const A=p().filter(k=>!k.disabled),N=A.find(k=>k.value===d.value),z=ax(A,C,N);z!==void 0&&d.onValueChange(z.value)}),T=C=>{h||(d.onOpenChange(!0),E()),C&&(d.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return x.jsx(qd,{asChild:!0,...u,children:x.jsx(ke.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:h,"data-disabled":h?"":void 0,"data-placeholder":lx(d.value)?"":void 0,...c,ref:m,onClick:he(c.onClick,C=>{C.currentTarget.focus(),v.current!=="mouse"&&T(C)}),onPointerDown:he(c.onPointerDown,C=>{v.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(T(C),C.preventDefault())}),onKeyDown:he(c.onKeyDown,C=>{const A=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&S(C.key),!(A&&C.key===" ")&&dA.includes(C.key)&&(T(),C.preventDefault())})})})});L0.displayName=j0;var k0="SelectValue",H0=y.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:c,children:u,placeholder:d="",...h}=n,m=Ql(k0,o),{onValueNodeHasChildrenChange:p}=m,v=u!==void 0,b=qe(r,m.onValueNodeChange);return Nt(()=>{p(v)},[p,v]),x.jsx(ke.span,{...h,ref:b,style:{pointerEvents:"none"},children:lx(m.value)?x.jsx(x.Fragment,{children:d}):u})});H0.displayName=k0;var vA="SelectIcon",U0=y.forwardRef((n,r)=>{const{__scopeSelect:o,children:i,...c}=n;return x.jsx(ke.span,{"aria-hidden":!0,...c,ref:r,children:i||"▼"})});U0.displayName=vA;var bA="SelectPortal",B0=n=>x.jsx(zd,{asChild:!0,...n});B0.displayName=bA;var Cr="SelectContent",G0=y.forwardRef((n,r)=>{const o=Ql(Cr,n.__scopeSelect),[i,c]=y.useState();if(Nt(()=>{c(new DocumentFragment)},[]),!o.open){const u=i;return u?Uo.createPortal(x.jsx(Y0,{scope:n.__scopeSelect,children:x.jsx(Jc.Slot,{scope:n.__scopeSelect,children:x.jsx("div",{children:n.children})})}),u):null}return x.jsx(V0,{...n,ref:r})});G0.displayName=Cr;var En=10,[Y0,Zl]=Na(Cr),xA="SelectContentImpl",SA=Sa("SelectContent.RemoveScroll"),V0=y.forwardRef((n,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A,...N}=n,z=Ql(Cr,o),[k,q]=y.useState(null),[Z,D]=y.useState(null),_=qe(r,ie=>q(ie)),[j,H]=y.useState(null),[I,J]=y.useState(null),le=Wc(o),[re,te]=y.useState(!1),ae=y.useRef(!1);y.useEffect(()=>{if(k)return cb(k)},[k]),Wv();const O=y.useCallback(ie=>{const[xe,...fe]=le().map(Ee=>Ee.ref.current),[Me]=fe.slice(-1),we=document.activeElement;for(const Ee of ie)if(Ee===we||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===xe&&Z&&(Z.scrollTop=0),Ee===Me&&Z&&(Z.scrollTop=Z.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==we))return},[le,Z]),X=y.useCallback(()=>O([j,k]),[O,j,k]);y.useEffect(()=>{re&&X()},[re,X]);const{onOpenChange:G,triggerPointerDownPosRef:$}=z;y.useEffect(()=>{if(k){let ie={x:0,y:0};const xe=Me=>{var we,Ee;ie={x:Math.abs(Math.round(Me.pageX)-(((we=$.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((Ee=$.current)==null?void 0:Ee.y)??0))}},fe=Me=>{ie.x<=10&&ie.y<=10?Me.preventDefault():k.contains(Me.target)||G(!1),document.removeEventListener("pointermove",xe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",fe,{capture:!0})}}},[k,G,$]),y.useEffect(()=>{const ie=()=>G(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[G]);const[K,M]=rx(ie=>{const xe=le().filter(we=>!we.disabled),fe=xe.find(we=>we.ref.current===document.activeElement),Me=ax(xe,ie,fe);Me&&setTimeout(()=>Me.ref.current.focus())}),B=y.useCallback((ie,xe,fe)=>{const Me=!ae.current&&!fe;(z.value!==void 0&&z.value===xe||Me)&&(H(ie),Me&&(ae.current=!0))},[z.value]),ne=y.useCallback(()=>k==null?void 0:k.focus(),[k]),oe=y.useCallback((ie,xe,fe)=>{const Me=!ae.current&&!fe;(z.value!==void 0&&z.value===xe||Me)&&J(ie)},[z.value]),ce=i==="popper"?ad:q0,ue=ce===ad?{side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A}:{};return x.jsx(Y0,{scope:o,content:k,viewport:Z,onViewportChange:D,itemRefCallback:B,selectedItem:j,onItemLeave:ne,itemTextRefCallback:oe,focusSelectedItem:X,selectedItemText:I,position:i,isPositioned:re,searchRef:K,children:x.jsx(Dd,{as:SA,allowPinchZoom:!0,children:x.jsx(Od,{asChild:!0,trapped:z.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:he(c,ie=>{var xe;(xe=z.trigger)==null||xe.focus({preventScroll:!0}),ie.preventDefault()}),children:x.jsx(qc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:x.jsx(ce,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:ie=>ie.preventDefault(),...N,...ue,onPlaced:()=>te(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:he(N.onKeyDown,ie=>{const xe=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!xe&&ie.key.length===1&&M(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let Me=le().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const we=ie.target,Ee=Me.indexOf(we);Me=Me.slice(Ee+1)}setTimeout(()=>O(Me)),ie.preventDefault()}})})})})})})});V0.displayName=xA;var wA="SelectItemAlignedPosition",q0=y.forwardRef((n,r)=>{const{__scopeSelect:o,onPlaced:i,...c}=n,u=Ql(Cr,o),d=Zl(Cr,o),[h,m]=y.useState(null),[p,v]=y.useState(null),b=qe(r,_=>v(_)),S=Wc(o),E=y.useRef(!1),T=y.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:N,focusSelectedItem:z}=d,k=y.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&p&&C&&A&&N){const _=u.trigger.getBoundingClientRect(),j=p.getBoundingClientRect(),H=u.valueNode.getBoundingClientRect(),I=N.getBoundingClientRect();if(u.dir!=="rtl"){const we=I.left-j.left,Ee=H.left-we,nt=_.left-Ee,Pe=_.width+nt,kt=Math.max(Pe,j.width),Ht=window.innerWidth-En,jt=rd(Ee,[En,Math.max(En,Ht-kt)]);h.style.minWidth=Pe+"px",h.style.left=jt+"px"}else{const we=j.right-I.right,Ee=window.innerWidth-H.right-we,nt=window.innerWidth-_.right-Ee,Pe=_.width+nt,kt=Math.max(Pe,j.width),Ht=window.innerWidth-En,jt=rd(Ee,[En,Math.max(En,Ht-kt)]);h.style.minWidth=Pe+"px",h.style.right=jt+"px"}const J=S(),le=window.innerHeight-En*2,re=C.scrollHeight,te=window.getComputedStyle(p),ae=parseInt(te.borderTopWidth,10),O=parseInt(te.paddingTop,10),X=parseInt(te.borderBottomWidth,10),G=parseInt(te.paddingBottom,10),$=ae+O+re+G+X,K=Math.min(A.offsetHeight*5,$),M=window.getComputedStyle(C),B=parseInt(M.paddingTop,10),ne=parseInt(M.paddingBottom,10),oe=_.top+_.height/2-En,ce=le-oe,ue=A.offsetHeight/2,ie=A.offsetTop+ue,xe=ae+O+ie,fe=$-xe;if(xe<=oe){const we=J.length>0&&A===J[J.length-1].ref.current;h.style.bottom="0px";const Ee=p.clientHeight-C.offsetTop-C.offsetHeight,nt=Math.max(ce,ue+(we?ne:0)+Ee+X),Pe=xe+nt;h.style.height=Pe+"px"}else{const we=J.length>0&&A===J[0].ref.current;h.style.top="0px";const nt=Math.max(oe,ae+C.offsetTop+(we?B:0)+ue)+fe;h.style.height=nt+"px",C.scrollTop=xe-oe+C.offsetTop}h.style.margin=`${En}px 0`,h.style.minHeight=K+"px",h.style.maxHeight=le+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[S,u.trigger,u.valueNode,h,p,C,A,N,u.dir,i]);Nt(()=>k(),[k]);const[q,Z]=y.useState();Nt(()=>{p&&Z(window.getComputedStyle(p).zIndex)},[p]);const D=y.useCallback(_=>{_&&T.current===!0&&(k(),z==null||z(),T.current=!1)},[k,z]);return x.jsx(CA,{scope:o,contentWrapper:h,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:x.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:q},children:x.jsx(ke.div,{...c,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});q0.displayName=wA;var EA="SelectPopperPosition",ad=y.forwardRef((n,r)=>{const{__scopeSelect:o,align:i="start",collisionPadding:c=En,...u}=n,d=es(o);return x.jsx(Xd,{...d,...u,ref:r,align:i,collisionPadding:c,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)"}})});ad.displayName=EA;var[CA,rh]=Na(Cr,{}),od="SelectViewport",X0=y.forwardRef((n,r)=>{const{__scopeSelect:o,nonce:i,...c}=n,u=Zl(od,o),d=rh(od,o),h=qe(r,u.onViewportChange),m=y.useRef(0);return x.jsxs(x.Fragment,{children:[x.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}),x.jsx(Jc.Slot,{scope:o,children:x.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:he(c.onScroll,p=>{const v=p.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&b){const E=Math.abs(m.current-v.scrollTop);if(E>0){const T=window.innerHeight-En*2,C=parseFloat(b.style.minHeight),A=parseFloat(b.style.height),N=Math.max(C,A);if(N<T){const z=N+E,k=Math.min(T,z),q=z-k;b.style.height=k+"px",b.style.bottom==="0px"&&(v.scrollTop=q>0?q:0,b.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})});X0.displayName=od;var I0="SelectGroup",[TA,AA]=Na(I0),P0=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=wa();return x.jsx(TA,{scope:o,id:c,children:x.jsx(ke.div,{role:"group","aria-labelledby":c,...i,ref:r})})});P0.displayName=I0;var $0="SelectLabel",MA=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=AA($0,o);return x.jsx(ke.div,{id:c.id,...i,ref:r})});MA.displayName=$0;var kc="SelectItem",[_A,K0]=Na(kc),Q0=y.forwardRef((n,r)=>{const{__scopeSelect:o,value:i,disabled:c=!1,textValue:u,...d}=n,h=Ql(kc,o),m=Zl(kc,o),p=h.value===i,[v,b]=y.useState(u??""),[S,E]=y.useState(!1),T=qe(r,z=>{var k;return(k=m.itemRefCallback)==null?void 0:k.call(m,z,i,c)}),C=wa(),A=y.useRef("touch"),N=()=>{c||(h.onValueChange(i),h.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 x.jsx(_A,{scope:o,value:i,disabled:c,textId:C,isSelected:p,onItemTextChange:y.useCallback(z=>{b(k=>k||((z==null?void 0:z.textContent)??"").trim())},[]),children:x.jsx(Jc.ItemSlot,{scope:o,value:i,disabled:c,textValue:v,children:x.jsx(ke.div,{role:"option","aria-labelledby":C,"data-highlighted":S?"":void 0,"aria-selected":p&&S,"data-state":p?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:T,onFocus:he(d.onFocus,()=>E(!0)),onBlur:he(d.onBlur,()=>E(!1)),onClick:he(d.onClick,()=>{A.current!=="mouse"&&N()}),onPointerUp:he(d.onPointerUp,()=>{A.current==="mouse"&&N()}),onPointerDown:he(d.onPointerDown,z=>{A.current=z.pointerType}),onPointerMove:he(d.onPointerMove,z=>{var k;A.current=z.pointerType,c?(k=m.onItemLeave)==null||k.call(m):A.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(d.onPointerLeave,z=>{var k;z.currentTarget===document.activeElement&&((k=m.onItemLeave)==null||k.call(m))}),onKeyDown:he(d.onKeyDown,z=>{var q;((q=m.searchRef)==null?void 0:q.current)!==""&&z.key===" "||(hA.includes(z.key)&&N(),z.key===" "&&z.preventDefault())})})})})});Q0.displayName=kc;var No="SelectItemText",Z0=y.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:c,...u}=n,d=Ql(No,o),h=Zl(No,o),m=K0(No,o),p=yA(No,o),[v,b]=y.useState(null),S=qe(r,N=>b(N),m.onItemTextChange,N=>{var z;return(z=h.itemTextRefCallback)==null?void 0:z.call(h,N,m.value,m.disabled)}),E=v==null?void 0:v.textContent,T=y.useMemo(()=>x.jsx("option",{value:m.value,disabled:m.disabled,children:E},m.value),[m.disabled,m.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=p;return Nt(()=>(C(T),()=>A(T)),[C,A,T]),x.jsxs(x.Fragment,{children:[x.jsx(ke.span,{id:m.textId,...u,ref:S}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Uo.createPortal(u.children,d.valueNode):null]})});Z0.displayName=No;var F0="SelectItemIndicator",J0=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return K0(F0,o).isSelected?x.jsx(ke.span,{"aria-hidden":!0,...i,ref:r}):null});J0.displayName=F0;var id="SelectScrollUpButton",W0=y.forwardRef((n,r)=>{const o=Zl(id,n.__scopeSelect),i=rh(id,n.__scopeSelect),[c,u]=y.useState(!1),d=qe(r,i.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let h=function(){const p=m.scrollTop>0;u(p)};const m=o.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),c?x.jsx(tx,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=o;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null});W0.displayName=id;var cd="SelectScrollDownButton",ex=y.forwardRef((n,r)=>{const o=Zl(cd,n.__scopeSelect),i=rh(cd,n.__scopeSelect),[c,u]=y.useState(!1),d=qe(r,i.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let h=function(){const p=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<p;u(v)};const m=o.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),c?x.jsx(tx,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=o;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null});ex.displayName=cd;var tx=y.forwardRef((n,r)=>{const{__scopeSelect:o,onAutoScroll:i,...c}=n,u=Zl("SelectScrollButton",o),d=y.useRef(null),h=Wc(o),m=y.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return y.useEffect(()=>()=>m(),[m]),Nt(()=>{var v;const p=h().find(b=>b.ref.current===document.activeElement);(v=p==null?void 0:p.ref.current)==null||v.scrollIntoView({block:"nearest"})},[h]),x.jsx(ke.div,{"aria-hidden":!0,...c,ref:r,style:{flexShrink:0,...c.style},onPointerDown:he(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:he(c.onPointerMove,()=>{var p;(p=u.onItemLeave)==null||p.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:he(c.onPointerLeave,()=>{m()})})}),RA="SelectSeparator",NA=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return x.jsx(ke.div,{"aria-hidden":!0,...i,ref:r})});NA.displayName=RA;var sd="SelectArrow",OA=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=es(o),u=Ql(sd,o),d=Zl(sd,o);return u.open&&d.position==="popper"?x.jsx(Id,{...c,...i,ref:r}):null});OA.displayName=sd;var zA="SelectBubbleInput",nx=y.forwardRef(({__scopeSelect:n,value:r,...o},i)=>{const c=y.useRef(null),u=qe(i,c),d=i2(r);return y.useEffect(()=>{const h=c.current;if(!h)return;const m=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(m,"value").set;if(d!==r&&v){const b=new Event("change",{bubbles:!0});v.call(h,r),h.dispatchEvent(b)}},[d,r]),x.jsx(ke.select,{...o,style:{...Kv,...o.style},ref:u,defaultValue:r})});nx.displayName=zA;function lx(n){return n===""||n===void 0}function rx(n){const r=xt(n),o=y.useRef(""),i=y.useRef(0),c=y.useCallback(d=>{const h=o.current+d;r(h),(function m(p){o.current=p,window.clearTimeout(i.current),p!==""&&(i.current=window.setTimeout(()=>m(""),1e3))})(h)},[r]),u=y.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,c,u]}function ax(n,r,o){const c=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=DA(n,Math.max(u,0));c.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.textValue.toLowerCase().startsWith(c.toLowerCase()));return m!==o?m:void 0}function DA(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var jA=D0,LA=L0,kA=H0,HA=U0,UA=B0,BA=G0,GA=X0,YA=P0,VA=Q0,qA=Z0,XA=J0,IA=W0,PA=ex,$A="Separator",Py="horizontal",KA=["horizontal","vertical"],ox=y.forwardRef((n,r)=>{const{decorative:o,orientation:i=Py,...c}=n,u=QA(i)?i:Py,h=o?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return x.jsx(ke.div,{"data-orientation":u,...h,...c,ref:r})});ox.displayName=$A;function QA(n){return KA.includes(n)}var ZA=ox,[ts]=$l("Tooltip",[Ra]),ah=Ra(),ix="TooltipProvider",FA=700,$y="tooltip.open",[JA,cx]=ts(ix),sx=n=>{const{__scopeTooltip:r,delayDuration:o=FA,skipDelayDuration:i=300,disableHoverableContent:c=!1,children:u}=n,d=y.useRef(!0),h=y.useRef(!1),m=y.useRef(0);return y.useEffect(()=>{const p=m.current;return()=>window.clearTimeout(p)},[]),x.jsx(JA,{scope:r,isOpenDelayedRef:d,delayDuration:o,onOpen:y.useCallback(()=>{window.clearTimeout(m.current),d.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:y.useCallback(p=>{h.current=p},[]),disableHoverableContent:c,children:u})};sx.displayName=ix;var ux="Tooltip",[ZO,ns]=ts(ux),ud="TooltipTrigger",WA=y.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,c=ns(ud,o),u=cx(ud,o),d=ah(o),h=y.useRef(null),m=qe(r,h,c.onTriggerChange),p=y.useRef(!1),v=y.useRef(!1),b=y.useCallback(()=>p.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),x.jsx(qd,{asChild:!0,...d,children:x.jsx(ke.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:m,onPointerMove:he(n.onPointerMove,S=>{S.pointerType!=="touch"&&!v.current&&!u.isPointerInTransitRef.current&&(c.onTriggerEnter(),v.current=!0)}),onPointerLeave:he(n.onPointerLeave,()=>{c.onTriggerLeave(),v.current=!1}),onPointerDown:he(n.onPointerDown,()=>{c.open&&c.onClose(),p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:he(n.onFocus,()=>{p.current||c.onOpen()}),onBlur:he(n.onBlur,c.onClose),onClick:he(n.onClick,c.onClose)})})});WA.displayName=ud;var eM="TooltipPortal",[FO,tM]=ts(eM,{forceMount:void 0}),Ta="TooltipContent",nM=y.forwardRef((n,r)=>{const o=tM(Ta,n.__scopeTooltip),{forceMount:i=o.forceMount,side:c="top",...u}=n,d=ns(Ta,n.__scopeTooltip);return x.jsx(Ln,{present:i||d.open,children:d.disableHoverableContent?x.jsx(fx,{side:c,...u,ref:r}):x.jsx(lM,{side:c,...u,ref:r})})}),lM=y.forwardRef((n,r)=>{const o=ns(Ta,n.__scopeTooltip),i=cx(Ta,n.__scopeTooltip),c=y.useRef(null),u=qe(r,c),[d,h]=y.useState(null),{trigger:m,onClose:p}=o,v=c.current,{onPointerInTransitChange:b}=i,S=y.useCallback(()=>{h(null),b(!1)},[b]),E=y.useCallback((T,C)=>{const A=T.currentTarget,N={x:T.clientX,y:T.clientY},z=cM(N,A.getBoundingClientRect()),k=sM(N,z),q=uM(C.getBoundingClientRect()),Z=dM([...k,...q]);h(Z),b(!0)},[b]);return y.useEffect(()=>()=>S(),[S]),y.useEffect(()=>{if(m&&v){const T=A=>E(A,v),C=A=>E(A,m);return m.addEventListener("pointerleave",T),v.addEventListener("pointerleave",C),()=>{m.removeEventListener("pointerleave",T),v.removeEventListener("pointerleave",C)}}},[m,v,E,S]),y.useEffect(()=>{if(d){const T=C=>{const A=C.target,N={x:C.clientX,y:C.clientY},z=(m==null?void 0:m.contains(A))||(v==null?void 0:v.contains(A)),k=!fM(N,d);z?S():k&&(S(),p())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[m,v,d,p,S]),x.jsx(fx,{...n,ref:u})}),[rM,aM]=ts(ux,{isInside:!1}),oM=qw("TooltipContent"),fx=y.forwardRef((n,r)=>{const{__scopeTooltip:o,children:i,"aria-label":c,onEscapeKeyDown:u,onPointerDownOutside:d,...h}=n,m=ns(Ta,o),p=ah(o),{onClose:v}=m;return y.useEffect(()=>(document.addEventListener($y,v),()=>document.removeEventListener($y,v)),[v]),y.useEffect(()=>{if(m.trigger){const b=S=>{const E=S.target;E!=null&&E.contains(m.trigger)&&v()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[m.trigger,v]),x.jsx(qc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:b=>b.preventDefault(),onDismiss:v,children:x.jsxs(Xd,{"data-state":m.stateAttribute,...p,...h,ref:r,style:{...h.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:[x.jsx(oM,{children:i}),x.jsx(rM,{scope:o,isInside:!0,children:x.jsx(Qw,{id:m.contentId,role:"tooltip",children:c||i})})]})})});nM.displayName=Ta;var dx="TooltipArrow",iM=y.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,c=ah(o);return aM(dx,o).isInside?null:x.jsx(Id,{...c,...i,ref:r})});iM.displayName=dx;function cM(n,r){const o=Math.abs(r.top-n.y),i=Math.abs(r.bottom-n.y),c=Math.abs(r.right-n.x),u=Math.abs(r.left-n.x);switch(Math.min(o,i,c,u)){case u:return"left";case c:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function sM(n,r,o=5){const i=[];switch(r){case"top":i.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":i.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":i.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":i.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return i}function uM(n){const{top:r,right:o,bottom:i,left:c}=n;return[{x:c,y:r},{x:o,y:r},{x:o,y:i},{x:c,y:i}]}function fM(n,r){const{x:o,y:i}=n;let c=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const h=r[u],m=r[d],p=h.x,v=h.y,b=m.x,S=m.y;v>i!=S>i&&o<(b-p)*(i-v)/(S-v)+p&&(c=!c)}return c}function dM(n){const r=n.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),hM(r)}function hM(n){if(n.length<=1)return n.slice();const r=[];for(let i=0;i<n.length;i++){const c=n[i];for(;r.length>=2;){const u=r[r.length-1],d=r[r.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))r.pop();else break}r.push(c)}r.pop();const o=[];for(let i=n.length-1;i>=0;i--){const c=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))o.pop();else break}o.push(c)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var mM=sx;const pM=(n,r)=>{const o=new Array(n.length+r.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<r.length;i++)o[n.length+i]=r[i];return o},gM=(n,r)=>({classGroupId:n,validator:r}),hx=(n=new Map,r=null,o)=>({nextPart:n,validators:r,classGroupId:o}),Hc="-",Ky=[],yM="arbitrary..",vM=n=>{const r=xM(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return bM(d);const h=d.split(Hc),m=h[0]===""&&h.length>1?1:0;return mx(h,m,r)},getConflictingClassGroupIds:(d,h)=>{if(h){const m=i[d],p=o[d];return m?p?pM(p,m):m:p||Ky}return o[d]||Ky}}},mx=(n,r,o)=>{if(n.length-r===0)return o.classGroupId;const c=n[r],u=o.nextPart.get(c);if(u){const p=mx(n,r+1,u);if(p)return p}const d=o.validators;if(d===null)return;const h=r===0?n.join(Hc):n.slice(r).join(Hc),m=d.length;for(let p=0;p<m;p++){const v=d[p];if(v.validator(h))return v.classGroupId}},bM=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),o=r.indexOf(":"),i=r.slice(0,o);return i?yM+i:void 0})(),xM=n=>{const{theme:r,classGroups:o}=n;return SM(o,r)},SM=(n,r)=>{const o=hx();for(const i in n){const c=n[i];oh(c,o,i,r)}return o},oh=(n,r,o,i)=>{const c=n.length;for(let u=0;u<c;u++){const d=n[u];wM(d,r,o,i)}},wM=(n,r,o,i)=>{if(typeof n=="string"){EM(n,r,o);return}if(typeof n=="function"){CM(n,r,o,i);return}TM(n,r,o,i)},EM=(n,r,o)=>{const i=n===""?r:px(r,n);i.classGroupId=o},CM=(n,r,o,i)=>{if(AM(n)){oh(n(i),r,o,i);return}r.validators===null&&(r.validators=[]),r.validators.push(gM(o,n))},TM=(n,r,o,i)=>{const c=Object.entries(n),u=c.length;for(let d=0;d<u;d++){const[h,m]=c[d];oh(m,px(r,h),o,i)}},px=(n,r)=>{let o=n;const i=r.split(Hc),c=i.length;for(let u=0;u<c;u++){const d=i[u];let h=o.nextPart.get(d);h||(h=hx(),o.nextPart.set(d,h)),o=h}return o},AM=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,MM=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),i=Object.create(null);const c=(u,d)=>{o[u]=d,r++,r>n&&(r=0,i=o,o=Object.create(null))};return{get(u){let d=o[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return c(u,d),d},set(u,d){u in o?o[u]=d:c(u,d)}}},fd="!",Qy=":",_M=[],Zy=(n,r,o,i,c)=>({modifiers:n,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:i,isExternal:c}),RM=n=>{const{prefix:r,experimentalParseClassName:o}=n;let i=c=>{const u=[];let d=0,h=0,m=0,p;const v=c.length;for(let C=0;C<v;C++){const A=c[C];if(d===0&&h===0){if(A===Qy){u.push(c.slice(m,C)),m=C+1;continue}if(A==="/"){p=C;continue}}A==="["?d++:A==="]"?d--:A==="("?h++:A===")"&&h--}const b=u.length===0?c:c.slice(m);let S=b,E=!1;b.endsWith(fd)?(S=b.slice(0,-1),E=!0):b.startsWith(fd)&&(S=b.slice(1),E=!0);const T=p&&p>m?p-m:void 0;return Zy(u,E,S,T)};if(r){const c=r+Qy,u=i;i=d=>d.startsWith(c)?u(d.slice(c.length)):Zy(_M,!1,d,void 0,!0)}if(o){const c=i;i=u=>o({className:u,parseClassName:c})}return i},NM=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{r.set(o,1e6+i)}),o=>{const i=[];let c=[];for(let u=0;u<o.length;u++){const d=o[u],h=d[0]==="[",m=r.has(d);h||m?(c.length>0&&(c.sort(),i.push(...c),c=[]),i.push(d)):c.push(d)}return c.length>0&&(c.sort(),i.push(...c)),i}},OM=n=>({cache:MM(n.cacheSize),parseClassName:RM(n),sortModifiers:NM(n),...vM(n)}),zM=/\s+/,DM=(n,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:u}=r,d=[],h=n.trim().split(zM);let m="";for(let p=h.length-1;p>=0;p-=1){const v=h[p],{isExternal:b,modifiers:S,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:C}=o(v);if(b){m=v+(m.length>0?" "+m:m);continue}let A=!!C,N=i(A?T.substring(0,C):T);if(!N){if(!A){m=v+(m.length>0?" "+m:m);continue}if(N=i(T),!N){m=v+(m.length>0?" "+m:m);continue}A=!1}const z=S.length===0?"":S.length===1?S[0]:u(S).join(":"),k=E?z+fd:z,q=k+N;if(d.indexOf(q)>-1)continue;d.push(q);const Z=c(N,A);for(let D=0;D<Z.length;++D){const _=Z[D];d.push(k+_)}m=v+(m.length>0?" "+m:m)}return m},jM=(...n)=>{let r=0,o,i,c="";for(;r<n.length;)(o=n[r++])&&(i=gx(o))&&(c&&(c+=" "),c+=i);return c},gx=n=>{if(typeof n=="string")return n;let r,o="";for(let i=0;i<n.length;i++)n[i]&&(r=gx(n[i]))&&(o&&(o+=" "),o+=r);return o},LM=(n,...r)=>{let o,i,c,u;const d=m=>{const p=r.reduce((v,b)=>b(v),n());return o=OM(p),i=o.cache.get,c=o.cache.set,u=h,h(m)},h=m=>{const p=i(m);if(p)return p;const v=DM(m,o);return c(m,v),v};return u=d,(...m)=>u(jM(...m))},kM=[],bt=n=>{const r=o=>o[n]||kM;return r.isThemeGetter=!0,r},yx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BM=/\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$/,GM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kl=n=>HM.test(n),Oe=n=>!!n&&!Number.isNaN(Number(n)),Hl=n=>!!n&&Number.isInteger(Number(n)),Hf=n=>n.endsWith("%")&&Oe(n.slice(0,-1)),al=n=>UM.test(n),bx=()=>!0,qM=n=>BM.test(n)&&!GM.test(n),ih=()=>!1,XM=n=>YM.test(n),IM=n=>VM.test(n),PM=n=>!me(n)&&!pe(n),$M=n=>Fl(n,wx,ih),me=n=>yx.test(n),yr=n=>Fl(n,Ex,qM),Fy=n=>Fl(n,t_,Oe),KM=n=>Fl(n,Tx,bx),QM=n=>Fl(n,Cx,ih),Jy=n=>Fl(n,xx,ih),ZM=n=>Fl(n,Sx,IM),fc=n=>Fl(n,Ax,XM),pe=n=>vx.test(n),_o=n=>Ar(n,Ex),FM=n=>Ar(n,Cx),Wy=n=>Ar(n,xx),JM=n=>Ar(n,wx),WM=n=>Ar(n,Sx),dc=n=>Ar(n,Ax,!0),e_=n=>Ar(n,Tx,!0),Fl=(n,r,o)=>{const i=yx.exec(n);return i?i[1]?r(i[1]):o(i[2]):!1},Ar=(n,r,o=!1)=>{const i=vx.exec(n);return i?i[1]?r(i[1]):o:!1},xx=n=>n==="position"||n==="percentage",Sx=n=>n==="image"||n==="url",wx=n=>n==="length"||n==="size"||n==="bg-size",Ex=n=>n==="length",t_=n=>n==="number",Cx=n=>n==="family-name",Tx=n=>n==="number"||n==="weight",Ax=n=>n==="shadow",n_=()=>{const n=bt("color"),r=bt("font"),o=bt("text"),i=bt("font-weight"),c=bt("tracking"),u=bt("leading"),d=bt("breakpoint"),h=bt("container"),m=bt("spacing"),p=bt("radius"),v=bt("shadow"),b=bt("inset-shadow"),S=bt("text-shadow"),E=bt("drop-shadow"),T=bt("blur"),C=bt("perspective"),A=bt("aspect"),N=bt("ease"),z=bt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...q(),pe,me],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],j=()=>[pe,me,m],H=()=>[kl,"full","auto",...j()],I=()=>[Hl,"none","subgrid",pe,me],J=()=>["auto",{span:["full",Hl,pe,me]},Hl,pe,me],le=()=>[Hl,"auto",pe,me],re=()=>["auto","min","max","fr",pe,me],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...j()],X=()=>[kl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],G=()=>[kl,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[kl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],K=()=>[n,pe,me],M=()=>[...q(),Wy,Jy,{position:[pe,me]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",JM,$M,{size:[pe,me]}],oe=()=>[Hf,_o,yr],ce=()=>["","none","full",p,pe,me],ue=()=>["",Oe,_o,yr],ie=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Oe,Hf,Wy,Jy],Me=()=>["","none",T,pe,me],we=()=>["none",Oe,pe,me],Ee=()=>["none",Oe,pe,me],nt=()=>[Oe,pe,me],Pe=()=>[kl,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[al],breakpoint:[al],color:[bx],container:[al],"drop-shadow":[al],ease:["in","out","in-out"],font:[PM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[al],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[al],shadow:[al],spacing:["px",Oe],text:[al],"text-shadow":[al],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kl,me,pe,A]}],container:["container"],columns:[{columns:[Oe,me,pe,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:Z()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Hl,"auto",pe,me]}],basis:[{basis:[kl,"full","auto",h,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,kl,"auto","initial","none",me]}],grow:[{grow:["",Oe,pe,me]}],shrink:[{shrink:["",Oe,pe,me]}],order:[{order:[Hl,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[h,"screen",...X()]}],"min-w":[{"min-w":[h,"screen","none",...X()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",o,_o,yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,e_,KM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,me]}],"font-family":[{font:[FM,QM,r]}],"font-features":[{"font-features":[me]}],"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:[c,pe,me]}],"line-clamp":[{"line-clamp":[Oe,"none",pe,Fy]}],leading:[{leading:[u,...j()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",pe,yr]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Oe,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],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",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hl,pe,me],radial:["",pe,me],conic:[Hl,pe,me]},WM,ZM]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,pe,me]}],"outline-w":[{outline:["",Oe,_o,yr]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",v,dc,fc]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",b,dc,fc]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Oe,yr]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,dc,fc]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Oe,pe,me]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":q()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:Me()}],brightness:[{brightness:[Oe,pe,me]}],contrast:[{contrast:[Oe,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",E,dc,fc]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Oe,pe,me]}],"hue-rotate":[{"hue-rotate":[Oe,pe,me]}],invert:[{invert:["",Oe,pe,me]}],saturate:[{saturate:[Oe,pe,me]}],sepia:[{sepia:["",Oe,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",Oe,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",pe,me]}],ease:[{ease:["linear","initial",N,pe,me]}],delay:[{delay:[Oe,pe,me]}],animate:[{animate:["none",z,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,pe,me]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:nt()}],"skew-x":[{"skew-x":nt()}],"skew-y":[{"skew-y":nt()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",pe,me]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",pe,me]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Oe,_o,yr,Fy]}],stroke:[{stroke:["none",...K()]}],"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"]}},l_=LM(n_);function Ie(...n){return l_(Iv(n))}const r_=Bw("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 Oa({className:n,variant:r="default",size:o="default",asChild:i=!1,...c}){const u=i?Yw:"button";return x.jsx(u,{"data-slot":"button","data-variant":r,"data-size":o,className:Ie(r_({variant:r,size:o,className:n})),...c})}function a_({deckTitle:n,sourceLabel:r,isSaving:o}){return x.jsxs("header",{className:"flex min-h-14 items-center justify-between gap-4 border-b border-foreground/[0.08] bg-white px-5 py-2.5 max-[1200px]:flex-col max-[1200px]:items-start",children:[x.jsxs("div",{className:"grid min-w-0 gap-1",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[x.jsx("h1",{className:"min-w-0 flex-1 truncate text-[16px] font-semibold leading-tight text-foreground",children:n}),o?x.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]}),x.jsx("div",{className:"flex min-w-0 items-center gap-3",children:x.jsx("p",{className:"m-0 min-w-0 truncate text-[12px] text-foreground/45",children:r})})]}),x.jsx("div",{className:"flex items-center gap-1 max-[1200px]:w-full max-[1200px]:justify-end",children:x.jsx(Oa,{type:"button",variant:"outline","aria-label":"Present slides",title:"Present mode UI placeholder",children:"Present"})})]})}function o_({className:n,children:r,...o}){return x.jsxs(sA,{"data-slot":"scroll-area",className:Ie("relative",n),...o,children:[x.jsx(uA,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:r}),x.jsx(i_,{}),x.jsx(fA,{})]})}function i_({className:n,orientation:r="vertical",...o}){return x.jsx(C0,{"data-slot":"scroll-area-scrollbar",orientation:r,className:Ie("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...o,children:x.jsx(_0,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function c_({slides:n,activeSlideId:r,slideCount:o,thumbnails:i,onSelectSlide:c}){const u=y.useCallback(d=>{d==null||d.scrollIntoView({block:"nearest",inline:"nearest"})},[]);return x.jsx("aside",{className:"group/sidebar relative flex min-h-0 min-w-0 basis-[124px] items-stretch justify-start overflow-hidden bg-transparent p-3 transition-[flex-basis,width,opacity] duration-200 ease-out after:absolute after:inset-y-1.5 after:right-0 after:w-px after:bg-foreground/10 hover:basis-[260px] focus-within:basis-[260px] max-[1200px]:basis-auto max-[1200px]:p-0 max-[1200px]:pb-2.5 max-[1200px]:after:inset-x-0 max-[1200px]:after:inset-y-auto max-[1200px]:after:bottom-0 max-[1200px]:after:h-px max-[1200px]:after:w-auto","data-testid":"slide-sidebar",children:x.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col gap-2.5","data-testid":"slide-sidebar-panel",children:[x.jsx("div",{className:"flex min-h-7 items-center pt-1",children:x.jsxs("span",{className:"inline-block text-[10px] font-medium uppercase tracking-wider text-foreground/40","data-testid":"slide-count",children:[o," slide",o===1?"":"s"]})}),x.jsx(o_,{className:"min-h-0 flex-1 overflow-hidden pt-2 [mask-image:linear-gradient(to_bottom,transparent_0,black_18px,black_calc(100%_-_18px),transparent_100%)]","data-testid":"slide-list",children:x.jsx("div",{className:"grid content-start gap-2.5 pr-2 transition-[gap] duration-150 group-[:not(:hover):not(:focus-within)]/sidebar:gap-2",children:n.map((d,h)=>x.jsx("button",{ref:d.id===r?u:null,className:Ie("grid w-full cursor-pointer gap-2 border-0 bg-transparent p-0 text-left opacity-100 transition-opacity duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",d.id!==r&&"group-[:not(:hover):not(:focus-within)]/sidebar:opacity-90"),onClick:()=>c(d.id),type:"button","aria-label":`Slide ${h+1}`,"aria-current":d.id===r?"true":void 0,"data-testid":"slide-card",children:x.jsxs("div",{className:Ie("relative aspect-video w-full overflow-hidden rounded-xl border border-foreground/[0.08] bg-white transition-[border-color,box-shadow,border-radius] duration-150 group-[:not(:hover):not(:focus-within)]/sidebar:rounded-lg",d.id===r&&"border-foreground/25 shadow-[0_0_0_2px_rgba(255,255,255,0.9),0_0_0_4px_rgba(0,0,0,0.08)]"),"data-testid":"slide-thumbnail",children:[i[d.id]?x.jsx("img",{alt:`Slide ${h+1}`,className:Ie("block size-full bg-transparent object-cover",d.id===r&&"shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]"),src:i[d.id]}):x.jsx("div",{className:Ie("grid size-full place-items-center bg-foreground/[0.03]",d.id===r&&"shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]"),"aria-hidden":"true",children:x.jsx("span",{className:"size-[18px] animate-spin rounded-full border-[1.5px] border-foreground/15 border-t-foreground/45"})}),x.jsx("span",{className:"pointer-events-none absolute right-2 top-2 rounded-md bg-foreground/65 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-background opacity-0 transition-opacity duration-150 group-hover/sidebar:opacity-100 group-focus-within/sidebar:opacity-100",children:h+1})]})},d.id))})})]})})}function s_({selectionBounds:n,snapGuides:r,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:c,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 x.jsxs(x.Fragment,{children:[r.map((h,m)=>{const p=h.variant==="spacing"?"2px":"1px";return x.jsx("div",{className:"pointer-events-none absolute z-[4] border-foreground","data-testid":`snap-guide-${h.orientation}`,"data-variant":h.variant,style:h.orientation==="vertical"?{left:`${h.start.x}px`,top:`${Math.min(h.start.y,h.end.y)}px`,width:"0",height:`${Math.max(Math.abs(h.end.y-h.start.y),32)}px`,borderLeftWidth:p,borderLeftStyle:"solid",opacity:h.variant==="spacing"?.9:.82}:{left:`${Math.min(h.start.x,h.end.x)}px`,top:`${h.start.y}px`,width:`${Math.max(Math.abs(h.end.x-h.start.x),32)}px`,height:"0",borderTopWidth:p,borderTopStyle:"solid",opacity:h.variant==="spacing"?.9:.82}},`${h.orientation}-${h.start.x}-${h.start.y}-${h.end.x}-${h.end.y}-${h.variant}-${m}`)}),x.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}),o.map(h=>x.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${h.corner}`,"aria-label":`Resize selected element from ${h.corner}`,style:{left:`${h.x}px`,top:`${h.y}px`},onMouseDown:m=>{c(h.corner,m)}},h.corner))]})}/**
|
|
92
|
+
* @license lucide-react v1.14.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Mx=(...n)=>n.filter((r,o,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===o).join(" ").trim();/**
|
|
97
|
+
* @license lucide-react v1.14.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const u_=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
102
|
+
* @license lucide-react v1.14.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const f_=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
|
|
107
|
+
* @license lucide-react v1.14.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const ev=n=>{const r=f_(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
112
|
+
* @license lucide-react v1.14.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/var Uf={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"};/**
|
|
117
|
+
* @license lucide-react v1.14.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const d_=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},h_=y.createContext({}),m_=()=>y.useContext(h_),p_=y.forwardRef(({color:n,size:r,strokeWidth:o,absoluteStrokeWidth:i,className:c="",children:u,iconNode:d,...h},m)=>{const{size:p=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,color:S="currentColor",className:E=""}=m_()??{},T=i??b?Number(o??v)*24/Number(r??p):o??v;return y.createElement("svg",{ref:m,...Uf,width:r??p??Uf.width,height:r??p??Uf.height,stroke:n??S,strokeWidth:T,className:Mx("lucide",E,c),...!u&&!d_(h)&&{"aria-hidden":"true"},...h},[...d.map(([C,A])=>y.createElement(C,A)),...Array.isArray(u)?u:[u]])});/**
|
|
122
|
+
* @license lucide-react v1.14.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Ge=(n,r)=>{const o=y.forwardRef(({className:i,...c},u)=>y.createElement(p_,{ref:u,iconNode:r,className:Mx(`lucide-${u_(ev(n))}`,`lucide-${n}`,i),...c}));return o.displayName=ev(n),o};/**
|
|
127
|
+
* @license lucide-react v1.14.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const g_=[["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"}]],dd=Ge("align-center-horizontal",g_);/**
|
|
132
|
+
* @license lucide-react v1.14.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const y_=[["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"}]],_x=Ge("align-center-vertical",y_);/**
|
|
137
|
+
* @license lucide-react v1.14.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const v_=[["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"}]],Rx=Ge("align-end-horizontal",v_);/**
|
|
142
|
+
* @license lucide-react v1.14.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const b_=[["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"}]],Nx=Ge("align-end-vertical",b_);/**
|
|
147
|
+
* @license lucide-react v1.14.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const x_=[["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"}]],Ox=Ge("align-start-horizontal",x_);/**
|
|
152
|
+
* @license lucide-react v1.14.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const S_=[["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"}]],zx=Ge("align-start-vertical",S_);/**
|
|
157
|
+
* @license lucide-react v1.14.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const w_=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],Dx=Ge("arrow-down-to-line",w_);/**
|
|
162
|
+
* @license lucide-react v1.14.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const E_=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],hd=Ge("arrow-up-to-line",E_);/**
|
|
167
|
+
* @license lucide-react v1.14.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const C_=[["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"}]],T_=Ge("box",C_);/**
|
|
172
|
+
* @license lucide-react v1.14.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const A_=[["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"}]],Bf=Ge("case-sensitive",A_);/**
|
|
177
|
+
* @license lucide-react v1.14.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const M_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],__=Ge("check",M_);/**
|
|
182
|
+
* @license lucide-react v1.14.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const R_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ls=Ge("chevron-down",R_);/**
|
|
187
|
+
* @license lucide-react v1.14.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const N_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],O_=Ge("chevron-right",N_);/**
|
|
192
|
+
* @license lucide-react v1.14.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const z_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ch=Ge("chevron-up",z_);/**
|
|
197
|
+
* @license lucide-react v1.14.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const D_=[["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"}]],md=Ge("columns-3",D_);/**
|
|
202
|
+
* @license lucide-react v1.14.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const j_=[["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"}]],L_=Ge("copy",j_);/**
|
|
207
|
+
* @license lucide-react v1.14.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const k_=[["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"}]],H_=Ge("eye",k_);/**
|
|
212
|
+
* @license lucide-react v1.14.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const U_=[["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"}]],pd=Ge("group",U_);/**
|
|
217
|
+
* @license lucide-react v1.14.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const B_=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],G_=Ge("hash",B_);/**
|
|
222
|
+
* @license lucide-react v1.14.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const Y_=[["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"}]],V_=Ge("layers",Y_);/**
|
|
227
|
+
* @license lucide-react v1.14.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const q_=[["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"}]],X_=Ge("link-2",q_);/**
|
|
232
|
+
* @license lucide-react v1.14.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const I_=[["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"}]],tv=Ge("lock",I_);/**
|
|
237
|
+
* @license lucide-react v1.14.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const P_=[["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"}]],nv=Ge("palette",P_);/**
|
|
242
|
+
* @license lucide-react v1.14.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const $_=[["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"}]],K_=Ge("pilcrow",$_);/**
|
|
247
|
+
* @license lucide-react v1.14.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const Q_=[["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"}]],Z_=Ge("rotate-cw",Q_);/**
|
|
252
|
+
* @license lucide-react v1.14.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const F_=[["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"}]],jx=Ge("rows-3",F_);/**
|
|
257
|
+
* @license lucide-react v1.14.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const J_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],lv=Ge("square",J_);/**
|
|
262
|
+
* @license lucide-react v1.14.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const W_=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],eR=Ge("text-align-center",W_);/**
|
|
267
|
+
* @license lucide-react v1.14.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const tR=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],nR=Ge("text-align-end",tR);/**
|
|
272
|
+
* @license lucide-react v1.14.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const lR=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],rR=Ge("text-align-start",lR);/**
|
|
277
|
+
* @license lucide-react v1.14.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const aR=[["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"}]],oR=Ge("trash-2",aR);/**
|
|
282
|
+
* @license lucide-react v1.14.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const iR=[["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"}]],rv=Ge("type",iR);/**
|
|
287
|
+
* @license lucide-react v1.14.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const cR=[["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"}]],Lx=Ge("ungroup",cR);function sR({...n}){return x.jsx(qT,{"data-slot":"context-menu",...n})}function uR({...n}){return x.jsx(XT,{"data-slot":"context-menu-trigger",...n})}function Gf({...n}){return x.jsx(QT,{"data-slot":"context-menu-sub",...n})}function Yf({className:n,inset:r,children:o,...i}){return x.jsxs(ZT,{"data-slot":"context-menu-sub-trigger","data-inset":r,className:Ie("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:[o,x.jsx(O_,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Vf({className:n,...r}){return x.jsx(FT,{"data-slot":"context-menu-sub-content",className:Ie("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),...r})}function fR({className:n,...r}){return x.jsx(IT,{children:x.jsx(PT,{"data-slot":"context-menu-content",className:Ie("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),...r})})}function zt({className:n,inset:r,variant:o="default",...i}){return x.jsx($T,{"data-slot":"context-menu-item","data-inset":r,"data-variant":o,className:Ie("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 av({className:n,...r}){return x.jsx(KT,{"data-slot":"context-menu-separator",className:Ie("-mx-1 my-1 h-px bg-foreground/10",n),...r})}function ov({className:n,...r}){return x.jsx("span",{"data-slot":"context-menu-shortcut",className:Ie("ml-auto text-[11px] tracking-normal text-foreground/40",n),...r})}function dR({children:n,selectionCommandAvailability:r,onAlignToSlide:o,onDelete:i,onDistribute:c,onDuplicate:u,onGroup:d,onLayerOrder:h,onUngroup:m}){return x.jsxs(sR,{children:[x.jsx(uR,{asChild:!0,children:n}),x.jsxs(fR,{"aria-label":"Selection actions",children:[x.jsxs(zt,{disabled:!r.group,onSelect:d,children:[x.jsx(pd,{className:"size-3.5"}),"Group"]}),x.jsxs(zt,{disabled:!r.ungroup,onSelect:m,children:[x.jsx(Lx,{className:"size-3.5"}),"Ungroup"]}),x.jsx(av,{}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(hd,{className:"size-3.5"}),"Layer"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>h("front"),children:[x.jsx(hd,{className:"size-3.5"}),"Bring to front"]}),x.jsxs(zt,{onSelect:()=>h("forward"),children:[x.jsx(ch,{className:"size-3.5"}),"Bring forward"]}),x.jsxs(zt,{onSelect:()=>h("backward"),children:[x.jsx(ls,{className:"size-3.5"}),"Send backward"]}),x.jsxs(zt,{onSelect:()=>h("back"),children:[x.jsx(Dx,{className:"size-3.5"}),"Send to back"]})]})]}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(dd,{className:"size-3.5"}),"Align"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>o("left"),children:[x.jsx(Ox,{className:"size-3.5"}),"Align left"]}),x.jsxs(zt,{onSelect:()=>o("hcenter"),children:[x.jsx(dd,{className:"size-3.5"}),"Align horizontal center"]}),x.jsxs(zt,{onSelect:()=>o("right"),children:[x.jsx(Rx,{className:"size-3.5"}),"Align right"]}),x.jsxs(zt,{onSelect:()=>o("top"),children:[x.jsx(zx,{className:"size-3.5"}),"Align top"]}),x.jsxs(zt,{onSelect:()=>o("vcenter"),children:[x.jsx(_x,{className:"size-3.5"}),"Align vertical center"]}),x.jsxs(zt,{onSelect:()=>o("bottom"),children:[x.jsx(Nx,{className:"size-3.5"}),"Align bottom"]})]})]}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(md,{className:"size-3.5"}),"Distribute"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>c("horizontal"),children:[x.jsx(md,{className:"size-3.5"}),"Horizontally"]}),x.jsxs(zt,{onSelect:()=>c("vertical"),children:[x.jsx(jx,{className:"size-3.5"}),"Vertically"]})]})]}),x.jsx(av,{}),x.jsxs(zt,{onSelect:u,children:[x.jsx(L_,{className:"size-3.5"}),"Duplicate",x.jsx(ov,{children:"⌘D"})]}),x.jsxs(zt,{variant:"destructive",onSelect:i,children:[x.jsx(oR,{className:"size-3.5"}),"Delete",x.jsx(ov,{children:"Del"})]})]})]})}const hR=[{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 mR(n,r){const o=cv(n),i=cv(r);return!o||!i?!1:o===i||sv(iv(n))===sv(iv(r))}function pR(n){const r=n.trim().toLowerCase();if(r==="bold"||r==="bolder")return!0;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>=600}function gd(n){const r=new Set,o=n.toLowerCase();if(!o||o==="none")return r;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&r.add(i);return r}function gR(n){return yR(n)?n.trim():vR(n)??"#000000"}function yR(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function iv(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function cv(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function sv(n){return n.toLowerCase().replace(/["']/g,"").trim()}function qf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function vR(n){const r=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return r?`#${qf(r[1]||"0")}${qf(r[2]||"0")}${qf(r[3]||"0")}`:null}function yd({feature:n,inspectedStyles:r,attributeValues:o}){var c,u;if(n.target==="attribute")return n.attributeName==="data-editor-locked"?o.locked:n.attributeName==="alt"?o.altText:n.attributeName==="aria-label"?o.ariaLabel:n.attributeName==="data-link-url"?o.linkUrl:"";if(!n.propertyName)return"";const i=xR(r,n.propertyName);return n.id==="font-family"?((u=(c=n.options)==null?void 0:c.find(d=>mR(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(Cn(i).rotate):n.controlType==="color"?gR(i):n.id==="text-align"&&i==="start"?"left":i}function uv(n,r){return n.id==="font-size"&&r.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(r)||8))}px`:n.id==="font-bold"?r?"700":"400":n.id==="font-italic"?r?"italic":"normal":n.id==="font-underline"?r?"underline":"none":n.id==="font-strikethrough"?r?"line-through":"none":n.id==="locked"?r?"true":"":r.trim()}function fv(n,r,o){const i=gd(n);return o?i.delete(r):i.add(r),i.size?Array.from(i).join(" "):"none"}function kx(n,r){return n.id==="font-bold"?pR(r):n.id==="font-italic"?r.trim().toLowerCase()==="italic":n.id==="font-underline"?gd(r).has("underline"):n.id==="font-strikethrough"?gd(r).has("line-through"):n.id==="locked"?r==="true":!!r}function bR(n,r){const o=n.options??[{label:"unset",value:""}];return!r||o.some(i=>i.value===r)?o:[{label:r,value:r},...o]}function xR(n,r){var o;return((o=n.find(i=>i.name===r))==null?void 0:o.value)??""}function SR({attributeValues:n,feature:r,inspectedStyles:o,nextValue:i,onAlignToSlide:c,onAttributeChange:u,onLayerOrder:d,onStyleChange:h}){if(r.target==="style"&&r.propertyName){const m=yd({feature:r,inspectedStyles:o,attributeValues:n});if(r.id==="rotation"){const p=wR(o),v=Cn(p),b=Number.parseFloat(i);h(r.propertyName,il(v.translateX,v.translateY,Number.isFinite(b)?b:0)??"");return}if(r.id==="font-underline"){h(r.propertyName,fv(m,"underline",i===""));return}if(r.id==="font-strikethrough"){h(r.propertyName,fv(m,"line-through",i===""));return}h(r.propertyName,uv(r,i));return}if(r.target==="attribute"&&r.attributeName){u(r.attributeName,uv(r,i));return}r.id==="align-to-slide"&&c(i),r.id==="layer-order"&&d(i)}function wR(n){var r;return((r=n.find(o=>o.name==="transform"))==null?void 0:r.value)??""}const ER=[{value:"left",label:"Left",icon:rR},{value:"center",label:"Center",icon:eR},{value:"right",label:"Right",icon:nR}],CR=[{value:"left",icon:Ox,label:"Align left"},{value:"hcenter",icon:dd,label:"Align horizontal center"},{value:"right",icon:Rx,label:"Align right"},{value:"top",icon:zx,label:"Align top"},{value:"vcenter",icon:_x,label:"Align vertical center"},{value:"bottom",icon:Nx,label:"Align bottom"}],TR=[{value:"front",icon:hd,label:"Bring to front"},{value:"forward",icon:ch,label:"Bring forward"},{value:"backward",icon:ls,label:"Send backward"},{value:"back",icon:Dx,label:"Send to back"}],AR=[{value:"horizontal",icon:md,label:"Distribute horizontally"},{value:"vertical",icon:jx,label:"Distribute vertically"}],dv=[{id:"typography",label:"Typography",icon:rv,subgroups:[{id:"font",label:"Font",icon:rv,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:hR.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"slider",target:"style",propertyName:"font-size",min:8,max:200,step:1,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:K_,features:[{id:"line-height",label:"Line height",controlType:"slider",target:"style",propertyName:"line-height",min:.8,max:3,step:.05},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:ER}]}]},{id:"appearance",label:"Appearance",icon:nv,subgroups:[{id:"fill",label:"Fill",icon:nv,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:T_,features:[{id:"border",label:"Border",controlType:"text",target:"style",propertyName:"border",placeholder:"1px solid #d1c1ae"},{id:"border-radius",label:"Border radius",controlType:"text",target:"style",propertyName:"border-radius",placeholder:"16px"},{id:"box-shadow",label:"Shadow",controlType:"text",target:"style",propertyName:"box-shadow",placeholder:"0 12px 30px rgba(...)"}]}]},{id:"layout",label:"Layout",icon:lv,subgroups:[{id:"size",label:"Size",icon:lv,features:[{id:"width",label:"Width",controlType:"text",target:"style",propertyName:"width",placeholder:"320px or auto"},{id:"height",label:"Height",controlType:"text",target:"style",propertyName:"height",placeholder:"240px or auto"}]},{id:"visibility",label:"Visibility",icon:H_,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:Z_,features:[{id:"rotation",label:"Rotation",controlType:"number",target:"style",propertyName:"transform",min:-360,max:360,step:1,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:V_,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:CR},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:TR},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:AR}]},{id:"grouping",label:"Group",icon:pd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:pd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:Lx,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:tv,subgroups:[{id:"state",label:"State",icon:tv,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:X_,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:Bf,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:Bf,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:Bf,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:G_,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],MR=200,Hx="motion-safe:duration-200 motion-safe:ease-out",Ux="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",_R="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";function Ho({className:n,type:r,...o}){return x.jsx("input",{type:r,"data-slot":"input",className:Ie("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),...o})}const RR=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],NR=["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 OR({value:n,includeGradients:r=!0,onChange:o}){const i=y.useRef(null),c=y.useRef(null),u=y.useMemo(()=>zR(n),[n]),d=Xf(u),[h,m]=y.useState(d.replace("#","")),p=`hsl(${u.h}, 100%, 50%)`;y.useEffect(()=>{m(d.replace("#",""))},[d]);function v(S){var A;const E=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Sc((S.clientX-E.left)/E.width,0,1),C=Sc(1-(S.clientY-E.top)/E.height,0,1);o(Xf({...u,s:T,v:C}))}function b(S){var C;const E=(C=c.current)==null?void 0:C.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Math.round(Sc((S.clientX-E.left)/E.width,0,1)*360);o(Xf({...u,h:T===360?0:T}))}return x.jsxs("div",{className:"grid gap-3",children:[x.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:i,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(u.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:p},onPointerDown:v,onPointerMove:S=>{S.buttons===1&&v(S)},children:x.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:d,left:`calc(${u.s*100}% + ${(.5-u.s)*22}px)`,top:`calc(${(1-u.v)*100}% + ${(u.v-.5)*22}px)`}})}),x.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:c,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":u.h,tabIndex:0,onPointerDown:b,onPointerMove:S=>{S.buttons===1&&b(S)},children:x.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:p,left:`${u.h/360*100}%`}})}),x.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[x.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:d},"aria-hidden":"true"}),x.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),x.jsx(Ho,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:h,spellCheck:!1,onChange:S=>{const E=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);m(E),E.length===6&&o(`#${E}`)},onBlur:()=>{m(d.replace("#",""))}})]}),x.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),x.jsx("div",{className:"grid grid-cols-12 gap-1",children:RR.map(S=>x.jsx("button",{className:Ie("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",S.toLowerCase()===n.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":`Use ${S}`,onClick:()=>{o(S)}},S))})]}),r?x.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),x.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:NR.map(S=>x.jsx("button",{className:Ie("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",S===n&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":"Use gradient",onClick:()=>{o(S)}},S))})]}):null]})}function Sc(n,r,o){return Math.min(Math.max(n,r),o)}function zR(n){const r={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return r;const i=o[1],c=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,h=Math.max(c,u,d),m=Math.min(c,u,d),p=h-m;let v=0;p!==0&&(h===c?v=(u-d)/p%6:h===u?v=(d-c)/p+2:v=(c-u)/p+4);const b=Math.round(v*60);return{h:b<0?b+360:b,s:h===0?0:p/h,v:h}}function Xf({h:n,s:r,v:o}){const i=o*r,c=i*(1-Math.abs(n/60%2-1)),u=o-i;let d=0,h=0,m=0;return n<60?(d=i,h=c):n<120?(d=c,h=i):n<180?(h=i,m=c):n<240?(h=c,m=i):n<300?(d=c,m=i):(d=i,m=c),`#${If(d+u)}${If(h+u)}${If(m+u)}`.toUpperCase()}function If(n){return Math.round(Sc(n,0,1)*255).toString(16).padStart(2,"0")}function DR({className:n,orientation:r="horizontal",decorative:o=!0,...i}){return x.jsx(ZA,{"data-slot":"separator",decorative:o,orientation:r,className:Ie("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 jR({children:n,active:r=!1,label:o,onClick:i}){return x.jsx(Oa,{variant:r?"secondary":"ghost",size:"icon-sm",className:Ie("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",r&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function LR({children:n,active:r=!1,label:o,onClick:i}){return x.jsx(Oa,{variant:r?"secondary":"ghost",size:"icon-sm",className:Ie("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",r&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function kR({children:n,left:r,width:o="default"}){const i=y.useRef(null),[c,u]=y.useState({x:0,y:0});y.useLayoutEffect(()=>{const h=i.current;if(!h)return;const m=h.getBoundingClientRect(),p=h.closest('[data-testid="floating-toolbar-anchor"]'),v=p instanceof HTMLElement?p.getBoundingClientRect():null,b=v?v.left+r:m.left-c.x,S=v?v.bottom+8:m.top-c.y,E={bottom:S+m.height,left:b,right:b+m.width,top:S},T=16;let C=0,A=0;E.right>window.innerWidth-T&&(C=window.innerWidth-T-E.right),E.left+C<T&&(C+=T-(E.left+C)),E.bottom>window.innerHeight-T&&(A=window.innerHeight-T-E.bottom),E.top+A<T&&(A+=T-(E.top+A)),(vd(c.x,C)||vd(c.y,A))&&u({x:C,y:A})},[r,c.x,c.y]);const d=o==="wide"?"w-80 max-w-[min(320px,calc(100vw-40px))] max-h-[calc(100vh-36px)] overflow-y-auto":o==="medium"?"w-[272px]":"w-64";return x.jsx("div",{className:Ie("absolute z-50 grid gap-1.5 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)] max-[1200px]:max-w-[calc(100vw-40px)]",Hx,Ux,d),ref:i,style:{left:r+c.x,top:`calc(100% + 8px + ${c.y}px)`},role:"menu",children:n})}function HR(n){return n.features.some(r=>r.controlType==="color")?"wide":n.features.some(r=>r.controlType==="action-group")?"medium":"default"}function vd(n,r){return Math.abs(n-r)>=.5}function UR(){return x.jsx(DR,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function BR({children:n}){return x.jsx("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:n})}function vr({children:n,htmlFor:r}){return x.jsx("label",{htmlFor:r,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function bd({icon:n}){return x.jsx(n,{className:"size-3.5"})}function GR({children:n,disabled:r=!1,onClick:o,title:i}){return x.jsx(Oa,{variant:"ghost",className:"min-h-8 w-full justify-start gap-2 rounded-md px-2 py-1.5 text-left text-[13px] font-normal text-foreground/70 hover:text-foreground",type:"button",disabled:r,title:i,onClick:o,children:n})}function YR({...n}){return x.jsx(jA,{"data-slot":"select",...n})}function VR({...n}){return x.jsx(YA,{"data-slot":"select-group",...n})}function qR({...n}){return x.jsx(kA,{"data-slot":"select-value",...n})}function XR({className:n,size:r="default",children:o,...i}){return x.jsxs(LA,{"data-slot":"select-trigger","data-size":r,className:Ie("flex w-fit items-center justify-between gap-2 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-sm whitespace-nowrap shadow-none transition-colors outline-none hover:bg-foreground/[0.05] 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-8 data-[size=sm]:h-8 *: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:[o,x.jsx(HA,{asChild:!0,children:x.jsx(ls,{className:"size-4 opacity-50"})})]})}function IR({className:n,children:r,position:o="item-aligned",align:i="center",...c}){return x.jsx(UA,{children:x.jsxs(BA,{"data-slot":"select-content",className:Ie("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-xl border border-foreground/[0.08] bg-white text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",o==="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:o,align:i,...c,children:[x.jsx($R,{}),x.jsx(GA,{className:Ie("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),x.jsx(KR,{})]})})}function PR({className:n,children:r,...o}){return x.jsxs(VA,{"data-slot":"select-item",className:Ie("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.04] 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),...o,children:[x.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:x.jsx(XA,{children:x.jsx(__,{className:"size-4"})})}),x.jsx(qA,{children:r})]})}function $R({className:n,...r}){return x.jsx(IA,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",n),...r,children:x.jsx(ch,{className:"size-4"})})}function KR({className:n,...r}){return x.jsx(PA,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",n),...r,children:x.jsx(ls,{className:"size-4"})})}const hc="__empty__";function QR({currentValue:n,feature:r,onClosePanel:o,onCommitFeature:i,operationAvailability:c,onStyleChange:u}){const d=`floating-${r.id}`;if(r.controlType==="select")return x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{htmlFor:d,children:r.label}),x.jsxs(YR,{value:n||hc,onValueChange:h=>i(r,h===hc?"":h),children:[x.jsx(XR,{id:d,"aria-label":r.label,size:"sm",className:"h-8 rounded-md border-transparent bg-foreground/[0.03] px-2 text-xs shadow-none hover:bg-foreground/[0.06]","data-value":n,children:x.jsx(qR,{})}),x.jsx(IR,{children:x.jsx(VR,{children:bR(r,n).map(h=>x.jsx(PR,{value:h.value||hc,"data-value":h.value,style:r.id==="font-family"&&h.value?{fontFamily:h.value}:void 0,children:h.label},h.value||hc))})})]})]},r.id);if(r.controlType==="color")return x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{children:r.label}),x.jsx(OR,{value:n,includeGradients:r.id==="background-color",onChange:h=>i(r,h)})]},r.id);if(r.controlType==="toggle"){const h=kx(r,n);return x.jsx(Oa,{type:"button",variant:h?"secondary":"outline","aria-pressed":h,onClick:()=>i(r,h?"":"true"),children:r.label},r.id)}return r.controlType==="slider"||r.controlType==="number"?x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{htmlFor:d,children:r.label}),x.jsx(Ho,{id:d,type:"number",min:r.min,max:r.max,step:r.step,value:n,onChange:h=>i(r,h.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},r.id):r.controlType==="action-group"?x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{children:r.label}),x.jsx("div",{className:"grid gap-1",children:(r.options??[]).map(h=>{const m=h.icon,p=r.target==="operation"&&c?c[r.id]===!1:!1;return x.jsxs(GR,{disabled:p,title:h.label,onClick:()=>{p||(i(r,h.value),o())},children:[m?x.jsx(bd,{icon:m}):null,x.jsx("span",{children:h.label})]},h.value)})})]},r.id):r.controlType==="custom-css"?x.jsx(ZR,{onCommit:u},r.id):x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{htmlFor:d,children:r.label}),x.jsx(Ho,{id:d,type:"text",value:n,placeholder:r.placeholder,onChange:h=>i(r,h.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},r.id)}function ZR({onCommit:n}){const r=y.useId(),o=y.useId(),[i,c]=y.useState(""),[u,d]=y.useState("");function h(){const m=i.trim();m&&(n(m,u.trim()),d(""))}return x.jsxs("div",{className:"grid gap-2",children:[x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{htmlFor:r,children:"Property name"}),x.jsx(Ho,{id:r,type:"text",value:i,placeholder:"e.g. justify-content",onChange:m=>c(m.target.value)})]}),x.jsxs("div",{className:"grid gap-1",children:[x.jsx(vr,{htmlFor:o,children:"Property value"}),x.jsx(Ho,{id:o,type:"text",value:u,placeholder:"e.g. space-between",onChange:m=>d(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())}})]}),x.jsx(Oa,{type:"button",variant:"outline",disabled:!i.trim(),onClick:h,children:"Apply property"})]})}function FR({inspectedStyles:n,selectedElementType:r,selectionCommandAvailability:o,attributeValues:i,onStyleChange:c,onAttributeChange:u,onAlignToSlide:d,onDistribute:h,onGroup:m,onLayerOrder:p,onUngroup:v}){const b=y.useRef(null),[S,E]=y.useState(null),[T,C]=y.useState(0),[A,N]=y.useState(0),z=y.useRef(0);y.useEffect(()=>{if(b.current)return()=>{const H=b.current,I=H==null?void 0:H.closest('[data-testid="stage-panel"]');if(!(H instanceof HTMLElement)||!(I instanceof HTMLElement))return;const J=H.getBoundingClientRect(),le=I.getBoundingClientRect(),re=H.cloneNode(!0);re instanceof HTMLElement&&(re.className=Ie(re.className,"absolute z-40 m-0 pointer-events-none"),re.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),re.className=Ie(re.className,_R),re.setAttribute("aria-hidden","true"),re.style.left=`${J.left-le.left}px`,re.style.top=`${J.top-le.top}px`,re.style.width=`${J.width}px`,re.style.height=`${J.height}px`,I.appendChild(re),re.addEventListener("animationend",()=>{re.remove()}),window.setTimeout(()=>{re.remove()},MR+50))}},[]),y.useLayoutEffect(()=>{const j=b.current;if(!j)return;const H=j.getBoundingClientRect(),I=H.left-z.current,J=H.right-z.current,le=16;let re=0;I<le&&(re=le-I),J+re>window.innerWidth-le&&(re+=window.innerWidth-le-(J+re)),vd(z.current,re)&&(z.current=re,N(re))},[]),y.useEffect(()=>{function j(H){var I;(I=b.current)!=null&&I.contains(H.target)||E(null)}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]),y.useEffect(()=>{function j(H){H.key==="Escape"&&E(null)}return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[]);function k(j,H){C(H),E(I=>I===j?null:j)}function q(j,H){if(j.id==="distribute"){h(H);return}if(j.id==="group"){m();return}if(j.id==="ungroup"){v();return}SR({attributeValues:i,feature:j,inspectedStyles:n,nextValue:H,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:p,onStyleChange:c})}const Z=JR(r);return x.jsxs("div",{className:Ie("relative grid w-max min-w-max max-w-[min(980px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",Hx,Ux),ref:b,style:{marginLeft:A},children:[x.jsx("div",{className:"flex w-max items-center gap-0.5 overflow-x-auto overflow-y-hidden rounded-md border border-foreground/[0.08] bg-white px-1.5 py-1.5 shadow-[0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:min-w-[760px]","aria-label":"Formatting toolbar",children:Z.map((j,H)=>x.jsxs("div",{className:"contents",children:[H>0?x.jsx(UR,{}):null,x.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:j.subgroups.map(I=>{const J=I.features.length===1?I.features[0]:null;return(J==null?void 0:J.controlType)==="toggle"?D(I,J):x.jsx(jR,{active:S===I.id,label:I.label,onClick:le=>k(I.id,le.currentTarget.offsetLeft),children:x.jsx(bd,{icon:I.icon})},I.id)})})]},j.id))}),Z.flatMap(j=>j.subgroups).map(j=>S===j.id?x.jsxs(kR,{left:T,width:HR(j),children:[x.jsx(BR,{children:j.label}),x.jsx("div",{className:"grid gap-2",children:j.features.map(_)})]},j.id):null)]});function D(j,H){const I=yd({feature:H,inspectedStyles:n,attributeValues:i}),J=kx(H,I);return x.jsx(LR,{label:H.label,active:J,onClick:()=>q(H,J?"":"true"),children:x.jsx(bd,{icon:j.icon})},j.id)}function _(j){return QR({currentValue:yd({feature:j,inspectedStyles:n,attributeValues:i}),feature:j,onClosePanel:()=>E(null),onCommitFeature:q,operationAvailability:o,onStyleChange:c})}}function JR(n){return n!=="group"?dv:dv.flatMap(r=>r.id!=="layout"?[]:[{...r,subgroups:r.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}function WR({slideWidth:n,slideHeight:r,offsetX:o,offsetY:i,scale:c,selectionOverlay:u,toolbarKey:d,inspectedStyles:h,selectedElementType:m,selectionCommandAvailability:p,groupScopeOverlayPassive:v,isEditingText:b,manipulationOverlay:S,attributeValues:E,iframeRef:T,stageViewportRef:C,selectionOverlayRef:A,isManipulating:N,onSelectionOverlayMouseDown:z,onResizeHandleMouseDown:k,onRotateHandleMouseDown:q,onSelectionOverlayDoubleClick:Z,onBackgroundClick:D,onStyleChange:_,onAttributeChange:j,onAlignToSlide:H,onDistribute:I,onGroup:J,onLayerOrder:le,onUngroup:re,onDuplicate:te,onDelete:ae}){const O=(G,$)=>{G===$&&D()},X=u?eN({selectionOverlay:u,offsetX:o,scale:c,slideWidth:n}):void 0;return x.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:C,onClick:G=>{O(G.target,G.currentTarget)},onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&O(G.target,G.currentTarget)},children:[u&&!N&&!b?x.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:x.jsx(FR,{inspectedStyles:h,selectedElementType:m,selectionCommandAvailability:p,attributeValues:E,onStyleChange:_,onAttributeChange:j,onAlignToSlide:H,onDistribute:I,onGroup:J,onLayerOrder:le,onUngroup:re},d)}):null,b?x.jsx("p",{className:"absolute left-10 top-4 z-40 rounded-md border border-foreground/[0.06] bg-white px-3 py-2 text-[12px] leading-normal text-foreground/65 shadow-sm",children:"Editing text. Press Enter to save or Escape to cancel."}):null,x.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:`${r}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${c})`},children:x.jsx("iframe",{ref:T,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!b?x.jsx(dR,{selectionCommandAvailability:p,onAlignToSlide:H,onDelete:ae,onDistribute:I,onDuplicate:te,onGroup:J,onLayerOrder:le,onUngroup:re,children:x.jsx("div",{ref:A,"data-testid":"selection-overlay",className:Ie("absolute z-[3] border border-dashed border-foreground/55 bg-foreground/[0.02]",v?"pointer-events-none":"pointer-events-auto"),style:{left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`},onMouseDown:z,onDoubleClick:G=>{Z(G)}})}):null,S?x.jsx(s_,{selectionBounds:S.selectionBounds,snapGuides:S.snapGuides,resizeHandles:S.resizeHandles,rotationHandle:S.rotationHandle,onResizeHandleMouseDown:k,onRotateHandleMouseDown:q}):null]})}function eN({selectionOverlay:n,offsetX:r,scale:o,slideWidth:i}){const u=r,d=r+i*o,h=Math.max((d-u)/2,0),m=Math.min(288,h),p=u+m,v=d-m,b=n.x+n.width/2;return{left:`${Math.min(Math.max(b,p),Math.max(p,v))}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 tN({delayDuration:n=0,...r}){return x.jsx(mM,{"data-slot":"tooltip-provider",delayDuration:n,...r})}function xd(n,r,o){return _w(n,r,o)}function Oo(n,r,o){var u;if(typeof DOMParser>"u")return"";const c=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Te}="${r}"]`);return((u=c==null?void 0:c.getAttribute(o))==null?void 0:u.trim())??""}function nN({elementId:n,nextValue:r,propertyName:o,slide:i}){const c=xd(i,n,o),u=r.trim();return c===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:c,nextValue:u,timestamp:Date.now()}}function lN({attributeName:n,elementId:r,nextValue:o,slide:i}){const c=Oo(i,r,n),u=o.trim();return c===u?null:{type:"attribute.update",slideId:i.id,elementId:r,attributeName:n,previousValue:c,nextValue:u,timestamp:Date.now()}}const rN=18,Bx=6,hv=80,mc=24,Uc=40,mv=12,pv=360;function Yl(n,r,o,i,c){return Math.max(n,o)-Math.min(r,i)<=c}function Gx(n,r){const o=[];return r.vertical&&o.push(...gv(n,r.vertical,"vertical")),r.horizontal&&o.push(...gv(n,r.horizontal,"horizontal")),o}function gv(n,r,o){return r.target.kind==="spacing"?oN(n,r,o):[aN(n,r,o)]}function aN(n,r,o){const i=r.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,o==="vertical"){const h=yv(n,r.anchor,"vertical");if(i.kind==="slide")return{orientation:o,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 m=Math.min(n.y,i.rect.y),p=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:h,y:m-mc},end:{x:h,y:p+mc},variant:"alignment"}}const c=yv(n,r.anchor,"horizontal");if(i.kind==="slide")return{orientation:o,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:o,start:{x:u-mc,y:c},end:{x:d+mc,y:c},variant:"alignment"}}function oN(n,r,o){const i=r.target.relatedRects;if(i.length<2)return[];const[c,u]=i;if(!c||!u)return[];if(o==="vertical"){const E=c.x<=u.x?c:u,T=E===c?u:c,C=E.x+E.width,A=T.x,N=r.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:C,y:E.y+E.height/2},end:{x:A,y:T.y+T.height/2},variant:"spacing"},k={orientation:"horizontal",start:r.anchor==="start"?{x:T.x+T.width,y:T.y+T.height/2}:{x:E.x,y:E.y+E.height/2},end:{x:N,y:n.y+n.height/2},variant:"spacing"};return[z,k]}const d=c.y<=u.y?c:u,h=d===c?u:c,m=d.y+d.height,p=h.y,v=r.anchor==="start"?n.y:n.y+n.height,b={orientation:"vertical",start:{x:d.x+d.width/2,y:m},end:{x:h.x+h.width/2,y:p},variant:"spacing"},S={orientation:"vertical",start:r.anchor==="start"?{x:h.x+h.width/2,y:h.y+h.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:v},variant:"spacing"};return[b,S]}function yv(n,r,o){return o==="vertical"?r==="start"?n.x:r==="end"?n.x+n.width:n.x+n.width/2:r==="start"?n.y:r==="end"?n.y+n.height:n.y+n.height/2}function iN({activeSlide:n,doc:r,rootRect:o,selectedElementId:i,slideStageRect:c,stageGeometry:u}){var S;const d=(E,T)=>({position:E,rect:c,kind:"slide",role:T,anchor:null,priority:T==="center"?0:2,elementId:null,relatedRects:[]}),h=[d(c.x,"start"),d(c.x+c.width/2,"center"),d(c.x+c.width,"end")],m=[d(c.y,"start"),d(c.y+c.height/2,"center"),d(c.y+c.height,"end")],p=r.querySelector(`[data-editor-id="${i}"]`),v=[];for(const E of n.elements){if(E.id===i)continue;const T=r.querySelector(`[data-editor-id="${E.id}"]`);if(!T||p&&(p.contains(T)||T.contains(p)))continue;const C=(S=r.defaultView)==null?void 0:S.getComputedStyle(T);if((C==null?void 0:C.display)==="none"||(C==null?void 0:C.visibility)==="hidden")continue;const A=T.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const N=zo(A,o,u);(E.type==="block"||E.type==="image")&&v.push({elementId:E.id,rect:N});const z=N.x,k=N.x+N.width/2,q=N.x+N.width,Z=N.y,D=N.y+N.height/2,_=N.y+N.height,j=(H,I)=>({position:H,rect:N,kind:"element",role:I,anchor:null,priority:I==="center"?3:4,elementId:E.id,relatedRects:[]});h.push(j(z,"start"),j(k,"center"),j(q,"end")),m.push(j(Z,"start"),j(D,"center"),j(_,"end"))}const b=cN(v);return h.push(...b.vertical),m.push(...b.horizontal),{vertical:h,horizontal:m}}function cN(n){const r=[],o=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),c=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],h=i[u+1];if(!d||!h)continue;if(!Yl(d.rect.x,d.rect.x+d.rect.width,h.rect.x,h.rect.x+h.rect.width,0)){const p=h.rect.x-(d.rect.x+d.rect.width);p>=mv&&p<=pv&&Yl(d.rect.y,d.rect.y+d.rect.height,h.rect.y,h.rect.y+h.rect.height,Uc)&&r.push(pc({position:h.rect.x+h.rect.width+p,rect:h.rect,anchor:"start",relatedRects:[d.rect,h.rect]}),pc({position:d.rect.x-p,rect:d.rect,anchor:"end",relatedRects:[d.rect,h.rect]}))}}for(let u=0;u<c.length-1;u+=1){const d=c[u],h=c[u+1];if(!d||!h)continue;if(!Yl(d.rect.y,d.rect.y+d.rect.height,h.rect.y,h.rect.y+h.rect.height,0)){const p=h.rect.y-(d.rect.y+d.rect.height);p>=mv&&p<=pv&&Yl(d.rect.x,d.rect.x+d.rect.width,h.rect.x,h.rect.x+h.rect.width,Uc)&&o.push(pc({position:h.rect.y+h.rect.height+p,rect:h.rect,anchor:"start",relatedRects:[d.rect,h.rect]}),pc({position:d.rect.y-p,rect:d.rect,anchor:"end",relatedRects:[d.rect,h.rect]}))}}return{vertical:r,horizontal:o}}function pc({position:n,rect:r,anchor:o,relatedRects:i}){return{position:n,rect:r,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function sN(n,r){const o=Bc([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],r.vertical,n,"vertical"),i=Bc([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],r.horizontal,n,"horizontal"),c={...n,x:n.x+((o==null?void 0:o.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:c,guides:Gx(c,{vertical:o,horizontal:i})}}function uN(n,r,o){const i={...n},c=r==="top-left"||r==="bottom-left"?"start":"end",u=r==="top-left"||r==="top-right"?"start":"end",d=Bc([{anchor:c,position:c==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),h=Bc([{anchor:u,position:u==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(c==="start"){const m=i.width-d.delta;m>=48&&(i.x+=d.delta,i.width=m)}else{const m=i.width+d.delta;m>=48&&(i.width=m)}if(h)if(u==="start"){const m=i.height-h.delta;m>=48&&(i.y+=h.delta,i.height=m)}else{const m=i.height+h.delta;m>=48&&(i.height=m)}return{rect:i,guides:Gx(i,{vertical:h,horizontal:d})}}function Bc(n,r,o,i){const c=mN(r);let u=null;for(const d of n)for(const h of c){if(!dN(o,h,i)||h.anchor&&h.anchor!==d.anchor)continue;const m=h.position-d.position,p=Math.abs(m);if(p>rN)continue;const v=h.kind==="spacing"?Math.max(0,p-Bx):p,b=Yx(d.anchor,h),S=v*100+h.priority+b,E=u?fN(u):Number.POSITIVE_INFINITY;S>=E||(u={anchor:d.anchor,delta:m,target:h})}return u}function fN(n){const r=Math.abs(n.delta);return(n.target.kind==="spacing"?Math.max(0,r-Bx):r)*100+n.target.priority+Yx(n.anchor,n.target)}function Yx(n,r){return r.kind==="slide"&&r.role==="center"&&n!=="center"?25:0}function dN(n,r,o){return r.kind==="slide"?!0:r.kind==="spacing"?hN(n,r,o):o==="vertical"?Yl(n.y,n.y+n.height,r.rect.y,r.rect.y+r.rect.height,hv):Yl(n.x,n.x+n.width,r.rect.x,r.rect.x+r.rect.width,hv)}function hN(n,r,o){if(r.relatedRects.length<2)return!1;if(o==="vertical"){const u=Math.min(...r.relatedRects.map(h=>h.y)),d=Math.max(...r.relatedRects.map(h=>h.y+h.height));return Yl(n.y,n.y+n.height,u,d,Uc)}const i=Math.min(...r.relatedRects.map(u=>u.x)),c=Math.max(...r.relatedRects.map(u=>u.x+u.width));return Yl(n.x,n.x+n.width,i,c,Uc)}function mN(n){const r=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return r.has(i)?!1:(r.add(i),!0)})}function gc(n){return`${Math.round(n*100)/100}px`}function Ul(n,r){return Math.max(n,48*r)}function Sd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function pN(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function gN(n){const[r,...o]=n;return r?o.reduce((i,c)=>{const u=Math.min(i.x,c.x),d=Math.min(i.y,c.y),h=Math.max(i.x+i.width,c.x+c.width),m=Math.max(i.y+i.height,c.y+c.height);return{x:u,y:d,width:h-u,height:m-d}},r):{x:0,y:0,width:0,height:0}}function vv(n,r,o,i){return Math.atan2(r-i,n-o)*180/Math.PI}function yN({resizeCorner:n,scale:r,stageDeltaX:o,stageDeltaY:i,startStageRect:c}){let u=c.x,d=c.y,h=c.width,m=c.height;switch(n){case"top-left":{h=Ul(c.width-o,r),m=Ul(c.height-i,r),u=c.x+(c.width-h),d=c.y+(c.height-m);break}case"top-right":{h=Ul(c.width+o,r),m=Ul(c.height-i,r),d=c.y+(c.height-m);break}case"bottom-left":{h=Ul(c.width-o,r),m=Ul(c.height+i,r),u=c.x+(c.width-h);break}default:{h=Ul(c.width+o,r),m=Ul(c.height+i,r);break}}return{x:u,y:d,width:h,height:m}}function wc(n,r){for(const o of _d)n.style[o]=r[o]??""}function vN(n){return n.elementIds.map(r=>{const o=n.targetNodes[r],i=n.previousStyles[r];if(!o||!i)return null;const c=Do(o);return JSON.stringify(c)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:r,previousStyle:i,nextStyle:c,timestamp:Date.now()}}).filter(r=>!!r)}function bN(n,r){return r.length===1?r[0]:{type:"operation.batch",slideId:n.slideId,operations:r,timestamp:Date.now()}}function xN({isEditingText:n,isManipulating:r,selectedElement:o,selectedElementId:i,snapGuides:c,stageRect:u}){return!u||!i||!pN(o)||n?null:{selectionBounds:u,snapGuides:r?c:[],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 SN({activeSlide:n,selectedElement:r,selectedElementId:o,selectedElementIds:i,selectedStageRect:c,iframeRef:u,stageGeometry:d,isEditingText:h,onCommitOperation:m}){const{offsetX:p,offsetY:v,scale:b,slideHeight:S,slideWidth:E}=d,T=y.useRef(null),C=y.useRef(null),[A,N]=y.useState(!1),[z,k]=y.useState(!1),[q,Z]=y.useState(null),[D,_]=y.useState([]),H=xN({isEditingText:h,isManipulating:A,selectedElement:r,selectedElementId:o,snapGuides:D,stageRect:q??c});y.useEffect(()=>()=>{T.current=null,C.current&&window.clearTimeout(C.current)},[]),y.useEffect(()=>{(!n||!o||!Sd(r)||h)&&(T.current=null,N(!1),Z(null))},[n,h,r,o]),y.useEffect(()=>{A||(Z(null),_([]))},[A]);const I=y.useCallback(()=>{k(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{k(!1),C.current=null},0)},[]),J=y.useCallback((le,re,te=null)=>{var jt;if(!n||!o||!c||!Sd(r)||h)return;const ae=(jt=u.current)==null?void 0:jt.contentDocument;if(!ae)return;const O=ae.querySelector(n.rootSelector),X=Ze(ae,o);if(!O||!X)return;const G=wN({activeSlide:n,doc:ae,mode:le,selectedElementId:o,selectedElementIds:i}),$=Object.fromEntries(G.map(Ne=>[Ne,Ze(ae,Ne)]).filter(Ne=>!!Ne[1]));if(!Object.keys($).length)return;const K=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,Do(be)])),M=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,EN(be,$)])),B=u.current,ne=(B==null?void 0:B.style.pointerEvents)||"";re.preventDefault(),re.stopPropagation();const oe=X.getBoundingClientRect(),ce=O.getBoundingClientRect(),ue={x:p,y:v,width:E*b,height:S*b},ie={scale:b,offsetX:p,offsetY:v},xe=iN({activeSlide:n,doc:ae,rootRect:ce,selectedElementId:o,slideStageRect:ue,stageGeometry:ie}),fe=Object.values($).map(Ne=>zo(Ne.getBoundingClientRect(),ce,ie)),Me=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,zo(be.getBoundingClientRect(),ce,ie)])),we=Object.fromEntries(Object.values($).map(Ne=>Ne.parentElement).filter(Ne=>!!Ne).map(Ne=>[Vx(Ne),zo(Ne.getBoundingClientRect(),ce,ie)])),Ee=fe.length?gN(fe):c;T.current={slideId:n.id,elementId:o,elementIds:Object.keys($),mode:le,resizeCorner:te,startPointer:{x:re.clientX,y:re.clientY},startStageRect:Ee,centerPoint:{x:oe.left+oe.width/2,y:oe.top+oe.height/2},previousStyle:K[o],previousStyles:K,startElementStageRects:Me,resizeParentElementIds:M,startParentStageRects:we,targetNodes:$,snapTargets:xe},N(!0),_([]),B&&(B.style.pointerEvents="none");const nt=Ne=>{const be=T.current;if(!be)return;Ne.preventDefault();const yn=Ne.clientX-be.startPointer.x,vn=Ne.clientY-be.startPointer.y;if(be.mode==="move"){const Un={x:be.startStageRect.x+yn,y:be.startStageRect.y+vn,width:be.startStageRect.width,height:be.startStageRect.height},se=Ne.altKey?{rect:Un,guides:[]}:sN(Un,be.snapTargets);Z(se.rect),_(se.guides);const Ce=(se.rect.x-be.startStageRect.x)/b,ye=(se.rect.y-be.startStageRect.y)/b;for(const Be of be.elementIds){const $e=be.targetNodes[Be],Ue=be.previousStyles[Be];if(!$e||!Ue)continue;const it=Cn(Ue.transform);wc($e,{...Ue,transform:il(it.translateX+Ce,it.translateY+ye,it.rotate),transformOrigin:Ue.transformOrigin||"center center"})}return}if(be.mode==="resize"){const Un=yN({resizeCorner:be.resizeCorner,scale:b,stageDeltaX:yn,stageDeltaY:vn,startStageRect:be.startStageRect}),se=Ne.altKey||!be.resizeCorner?{rect:Un,guides:[]}:uN(Un,be.resizeCorner,be.snapTargets);Z(se.rect),_(se.guides),CN(be,se.rect,{offsetX:p,offsetY:v,scale:b});return}const bn=Cn(be.previousStyle.transform),za=vv(be.startPointer.x,be.startPointer.y,be.centerPoint.x,be.centerPoint.y),Ct=vv(Ne.clientX,Ne.clientY,be.centerPoint.x,be.centerPoint.y);wc(X,{...be.previousStyle,transform:il(bn.translateX,bn.translateY,bn.rotate+(Ct-za)),transformOrigin:"center center"}),_([])},Pe=()=>{window.removeEventListener("mousemove",nt),window.removeEventListener("mouseup",kt),window.removeEventListener("keydown",Ht),B&&(B.style.pointerEvents=ne)},kt=()=>{const Ne=T.current;if(Pe(),N(!1),I(),T.current=null,_([]),!Ne)return;const be=vN(Ne);if(!be.length){Z(null);return}m(bN(Ne,be))},Ht=Ne=>{if(Ne.key!=="Escape")return;const be=T.current;if(Pe(),N(!1),I(),T.current=null,_([]),!!be){for(const yn of be.elementIds){const vn=be.targetNodes[yn],bn=be.previousStyles[yn];vn&&bn&&wc(vn,bn)}Z(null)}};window.addEventListener("mousemove",nt),window.addEventListener("mouseup",kt),window.addEventListener("keydown",Ht)},[n,u,h,m,r,o,i,c,b,p,v,E,S,I]);return{manipulationOverlay:H,isManipulating:A,suppressBackgroundClear:z,beginMove:le=>{J("move",le)},beginResize:(le,re)=>{J("resize",re,le)},beginRotate:le=>{J("rotate",le)}}}function wN({activeSlide:n,doc:r,mode:o,selectedElementId:i,selectedElementIds:c}){const u=c.filter(h=>{const m=n.elements.find(p=>p.id===h);return Sd(m)});if(o==="move")return u;if(o==="rotate")return[i];const d=new Set;for(const h of u.length?u:[i]){const m=Ze(r,h);if(m&&(d.add(h),m.getAttribute("data-group")==="true"))for(const p of m.querySelectorAll(`[data-editable][${Te}]`)){const v=p.getAttribute(Te);v&&d.add(v)}}return[...d]}function EN(n,r){const o=Object.entries(r);let i=n.parentElement;for(;i;){const c=o.find(([,u])=>u===i);if(c)return c[0];i=i.parentElement}return null}function CN(n,r,o){const i=n.startStageRect.width>0?r.width/n.startStageRect.width:1,c=n.startStageRect.height>0?r.height/n.startStageRect.height:1,u={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([h,m])=>[h,{x:r.x+(m.x-n.startStageRect.x)*i,y:r.y+(m.y-n.startStageRect.y)*c,width:m.width*i,height:m.height*c}]));for(const h of n.elementIds){const m=n.targetNodes[h],p=n.previousStyles[h],v=d[h];if(!m||!p||!v)continue;const b=n.resizeParentElementIds[h]?d[n.resizeParentElementIds[h]]:n.startParentStageRects[Vx(m.parentElement)]??u;if(!b)continue;const S=Cn(p.transform);wc(m,{...p,position:p.position||"absolute",left:gc((v.x-b.x)/o.scale),top:gc((v.y-b.y)/o.scale),width:gc(v.width/o.scale),height:gc(v.height/o.scale),transform:il(0,0,S.rotate),transformOrigin:p.transformOrigin||"center center"})}}function Vx(n){return n!=null&&n.getAttribute(Te)?`editable:${n.getAttribute(Te)}`:"slide"}function Vl(n){return Math.round(n*100)/100}function qx(n,r){var h;if(typeof DOMParser>"u")return n;const c=(h=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(c instanceof HTMLElement))return n;const u=Cn(c.style.transform),d=il(0,0,u.rotate);return c.style.position="absolute",c.style.left=`${Vl(r.x)}px`,c.style.top=`${Vl(r.y)}px`,c.style.width=`${Vl(r.width)}px`,c.style.height=`${Vl(r.height)}px`,c.style.margin="0px",c.style.boxSizing="border-box",d?c.style.transform=d:c.style.removeProperty("transform"),c.style.transformOrigin||(c.style.transformOrigin="center center"),c.outerHTML}function Xx(n,r){return{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}}function TN(n,r,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,c=i==null?void 0:i.querySelector(r.rootSelector),u=c==null?void 0:c.getBoundingClientRect();return{width:(u==null?void 0:u.width)||o.width,height:(u==null?void 0:u.height)||o.height}}function wd(n,r,o){return{x:Vl(n.x+r),y:Vl(n.y+o),width:n.width,height:n.height}}function AN(n){return n.length?n.reduce((r,o)=>{const i=Math.min(r.x,o.x),c=Math.min(r.y,o.y),u=Math.max(r.x+r.width,o.x+o.width),d=Math.max(r.y+r.height,o.y+o.height);return{x:i,y:c,width:u-i,height:d-c}}):null}function MN(n,r,o){const i=Math.max(0,o.width-n.width),c=Math.max(0,o.height-n.height),u=Math.min(i,Math.max(0,n.x+r)),d=Math.min(c,Math.max(0,n.y+r));return{x:Vl(u-n.x),y:Vl(d-n.y)}}const bv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function _N(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function RN(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function NN(n){return n.altKey?1:n.shiftKey?10:5}function ON(n,r,o){var d;const i={[r]:o};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 h of u.querySelectorAll("[data-editor-id]")){const m=h.getAttribute("data-editor-id");m&&(i[m]=`${o}-${m}`)}return i}function yc(n,r,o){return r.length?(o(r.length===1?r[0]:{type:"operation.batch",slideId:n,operations:r,timestamp:Date.now()}),!0):!1}function zN({activeSlide:n,selectedElementIds:r,iframeRef:o,slideWidth:i,slideHeight:c,isEditingText:u,canUndo:d,canRedo:h,onEscapeSelection:m,onCommitOperation:p,onSelectElementIds:v,onUndo:b,onRedo:S}){const E=y.useRef(null),T=y.useRef(n),C=y.useRef(r),A=y.useRef(d),N=y.useRef(h),z=y.useRef(u),k=y.useRef(m);T.current=n,C.current=r,A.current=d,N.current=h,z.current=u,k.current=m,y.useEffect(()=>{var le,re;const q=()=>{var M;const te=T.current,ae=C.current;if(!te||!ae.length)return!1;const O=(M=o.current)==null?void 0:M.contentDocument,X=O==null?void 0:O.querySelector(te.rootSelector),G=X==null?void 0:X.getBoundingClientRect();if(!G)return!1;const $=ae.map(B=>{const ne=Ac(te.htmlSource,B),oe=Tc(te.htmlSource,B),ce=O?Ze(O,B):null;return!ne||!oe||!ce?null:{sourceElementId:B,html:ne,rect:Xx(ce.getBoundingClientRect(),G),...oe}}).filter(B=>!!B);if(!$.length)return!1;const K=AN($.map(B=>B.rect));return K?(E.current={elements:$,unionRect:K},!0):!1},Z=()=>{const te=T.current,ae=C.current;if(!te||!ae.length)return!1;const O=ae.map(X=>{const G=Ac(te.htmlSource,X),$=Tc(te.htmlSource,X);return!G||!$?null:{type:"element.remove",slideId:te.id,elementId:X,...$,html:G,timestamp:Date.now()}}).filter(X=>!!X);return O.length?(yc(te.id,O,p),v([]),!0):!1},D=(te=E.current)=>{const ae=T.current;if(!ae||!te)return!1;let O=ae.htmlSource;const X=[],G=TN(o,ae,{width:i,height:c}),$=MN(te.unionRect,24,{width:G.width,height:G.height}),K=[],M=te.elements.map(B=>{const ne=Zf(O,`${B.sourceElementId}-copy`),oe=Vv(B.html,ON(B.html,B.sourceElementId,ne)),ce=wd(B.rect,$.x,$.y),ue=qx(oe,ce);return O=`${O}
|
|
292
|
+
<!-- ${ne} reserved -->`,X.push(ne),K.push({...B,rect:ce}),{type:"element.insert",slideId:ae.id,elementId:ne,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:ue,timestamp:Date.now()}});return yc(ae.id,M,p),v(X),E.current={elements:K,unionRect:wd(te.unionRect,$.x,$.y)},!0},_=te=>{var M;const ae=bv[te.key],O=T.current,X=C.current;if(!O||!X.length||!ae)return!1;const G=(M=o.current)==null?void 0:M.contentDocument,$=NN(te),K=X.map(B=>{const ne=O.elements.find(xe=>xe.id===B);if(!RN(ne))return null;const oe=G?Ze(G,B):null;if(!oe)return null;const ce=Do(oe),ue=Cn(ce.transform),ie=$f({...ce,transform:il(ue.translateX+ae.x*$,ue.translateY+ae.y*$,ue.rotate),transformOrigin:ce.transformOrigin||"center center"});return{type:"element.layout.update",slideId:O.id,elementId:B,previousStyle:ce,nextStyle:ie,timestamp:Date.now()}}).filter(B=>!!B);return yc(O.id,K,p),!0},j=te=>{var $;const ae=T.current,O=C.current;if(!ae||!O.length)return!1;const X=($=o.current)==null?void 0:$.contentDocument,G=O.map(K=>{const M=X?Ze(X,K):null;if(!M)return null;const B=Do(M),ne=Number.parseInt(B.zIndex||"",10),oe=Number.isFinite(ne)?ne:0,ce=te==="front"?999:te==="back"?0:Math.max(0,oe+(te==="forward"?1:-1)),ue=$f({...B,zIndex:String(ce)});return ue.zIndex===B.zIndex?null:{type:"element.layout.update",slideId:ae.id,elementId:K,previousStyle:B,nextStyle:ue,timestamp:Date.now()}}).filter(K=>!!K);return yc(ae.id,G,p)},H=te=>{if(te.defaultPrevented||z.current)return;const ae=te.key.toLowerCase(),O=te.metaKey||te.ctrlKey,X=O&&!te.shiftKey&&ae==="z",G=O&&(te.shiftKey&&ae==="z"||ae==="y"),$=_N(te.target);let K=!1;if(X&&A.current)b(),K=!0;else if(G&&N.current)S(),K=!0;else{if($)return;O&&!te.shiftKey&&ae==="c"?K=q():O&&!te.shiftKey&&ae==="x"?K=q()&&Z():O&&!te.shiftKey&&ae==="v"?K=D():O&&!te.shiftKey&&ae==="d"?K=q()&&D():te.key==="Backspace"||te.key==="Delete"?K=Z():te.key==="Escape"?K=k.current():te.key in bv?K=_(te):O&&te.key==="]"?K=j(te.shiftKey?"front":"forward"):O&&te.key==="["&&(K=j(te.shiftKey?"back":"backward"))}K&&(te.preventDefault(),te.stopPropagation())},I=(le=o.current)==null?void 0:le.contentDocument,J=(re=o.current)==null?void 0:re.contentWindow;return window.addEventListener("keydown",H),J==null||J.addEventListener("keydown",H),I==null||I.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H),J==null||J.removeEventListener("keydown",H),I==null||I.removeEventListener("keydown",H)}},[o,p,S,v,b,c,i])}const xv="hse-editing-text-style",DN=`
|
|
293
|
+
[data-hse-editing="true"] {
|
|
294
|
+
outline: none !important;
|
|
295
|
+
box-shadow: none !important;
|
|
296
|
+
overflow: visible;
|
|
297
|
+
caret-color: currentColor;
|
|
298
|
+
white-space: pre-wrap;
|
|
299
|
+
user-select: text;
|
|
300
|
+
-webkit-user-select: text;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[data-hse-editing="true"]:focus,
|
|
304
|
+
[data-hse-editing="true"]:focus-visible {
|
|
305
|
+
outline: none !important;
|
|
306
|
+
box-shadow: none !important;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
body[data-hse-group-scope] [data-editable] {
|
|
310
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
314
|
+
opacity: 0.28;
|
|
315
|
+
filter: blur(1.5px);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
319
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
320
|
+
outline-offset: 4px;
|
|
321
|
+
}
|
|
322
|
+
`;function jN(n){return n.closest(`[data-editable][${Te}]`)}function Sv(n,r){const o=Array.from(n.querySelectorAll("[data-editable]"));for(const c of o)c.removeAttribute("data-hse-active-group-scope"),c.removeAttribute("data-hse-outside-group-scope");if(!r){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",r);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Te}="${r}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const c of o)c!==i&&!i.contains(c)&&c.setAttribute("data-hse-outside-group-scope","true")}function wv(n,r){const o=jN(n);return o?r?o.closest(`[data-editable="block"][data-group="true"][${Te}="${r}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Te}]`)??o:null}function LN(n){if(n.getElementById(xv))return;const r=n.createElement("style");r.id=xv,r.textContent=DN,n.head.appendChild(r)}function kN(n){const r=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),r==null||r.removeAllRanges(),r==null||r.addRange(o)}function HN({activeSlide:n,iframeRef:r,onCommitOperation:o}){const[i,c]=y.useState([]),[u,d]=y.useState(null),[h,m]=y.useState(null),p=y.useRef(null),v=y.useRef(null),b=y.useRef(()=>{}),S=y.useRef(()=>{}),E=i[i.length-1]??null;function T(D){c(_=>{const j=typeof D=="function"?D(_[_.length-1]??null):D;return j?[j]:[]})}const C=y.useCallback(D=>{c(_=>_.includes(D)?_.filter(j=>j!==D):[..._,D])},[]),A=y.useCallback(D=>{var I;if(!n)return;const _=(I=r.current)==null?void 0:I.contentDocument,j=_?Ze(_,D):null;if(!j||j.getAttribute("data-editable")!=="text")return;const H={slideId:n.id,elementId:D,initialText:j.textContent||""};c([D]),p.current=H,m(H)},[n,r]),N=y.useCallback(D=>{d(D),v.current=D,c([D])},[]),z=y.useCallback(()=>{const D=v.current;v.current=null,d(null),c(D?[D]:[])},[]),k=y.useCallback(()=>p.current?!1:v.current?(z(),!0):i.length?(c([]),!0):!1,[z,i.length]);function q(D,_){const j=h;if(!n||!j||j.slideId!==n.id||j.elementId!==D){p.current=null,m(null);return}const H=j.initialText;p.current=null,m(null),_!==H&&o({type:"text.update",slideId:n.id,elementId:D,previousText:H,nextText:_,timestamp:Date.now()})}function Z(){var j;const D=(j=r.current)==null?void 0:j.contentDocument,_=p.current;if(_&&D){const H=Ze(D,_.elementId);H&&(H.textContent=_.initialText)}p.current=null,m(null)}return y.useEffect(()=>{p.current=h},[h]),y.useEffect(()=>{v.current=u},[u]),y.useEffect(()=>{!n||!h||h.slideId===n.id||m(null)},[n,h]),b.current=q,S.current=Z,y.useEffect(()=>{if(!n)return;const D=r.current;if(!D)return;const _=D.contentDocument;if(!_)return;_.open(),_.write(n.htmlSource),_.close(),LN(_),Sv(_,v.current);const j=I=>{const J=I.getAttribute(Te);J&&b.current(J,I.textContent||"")};_.onclick=I=>{const J=I.target;if(!(J instanceof Element)){if(p.current){const ae=Ze(_,p.current.elementId);if(ae){j(ae);return}}c([]);return}const le=p.current;if(le){const ae=Ze(_,le.elementId);if(ae&&!ae.contains(J)){j(ae);return}return}const re=wv(J,v.current);if(!re){v.current||c([]);return}const te=re.getAttribute(Te);te&&(I.shiftKey||I.metaKey||I.ctrlKey?C(te):c([te]))};const H=Array.from(_.querySelectorAll(`[data-editable][${Te}]`));for(const I of H)I.style.cursor="pointer",I.ondblclick=null,I.onblur=null,I.onkeydown=null,I.onclick=J=>{var te;J.stopPropagation();const le=wv(J.target,v.current);if(v.current&&!le)return;const re=(le==null?void 0:le.getAttribute(Te))??I.getAttribute(Te);((te=p.current)==null?void 0:te.elementId)!==re&&re&&(J.shiftKey||J.metaKey||J.ctrlKey?C(re):c([re]))},I.ondblclick=J=>{const le=I.getAttribute(Te),re=p.current;if(le&&I.getAttribute("data-group")==="true"){J.preventDefault(),J.stopPropagation(),N(le);return}if(I.getAttribute("data-editable")==="text"){if(le&&re&&re.slideId===n.id&&re.elementId===le){J.stopPropagation();return}J.preventDefault(),J.stopPropagation(),le&&A(le)}}},[n,N,A,r,C]),y.useEffect(()=>{var _;const D=(_=r.current)==null?void 0:_.contentDocument;D&&Sv(D,u)},[u,r]),y.useEffect(()=>{var X;const D=h;if(!D||!n||D.slideId!==n.id)return;const _=r.current,j=_==null?void 0:_.contentDocument;if(!_||!j)return;const H=j.querySelector(Ad(D.elementId));if(!H)return;const I=()=>{b.current(D.elementId,H.textContent||"")};let J=!1;const le=H.style.display,re=H.style.alignItems,te=H.style.overflow,ae=(X=H.ownerDocument.defaultView)==null?void 0:X.getComputedStyle(H),O=(ae==null?void 0:ae.display)??"";return H.setAttribute("contenteditable","plaintext-only"),H.setAttribute("spellcheck","false"),H.setAttribute("data-hse-editing","true"),H.style.cursor="text",H.style.overflow="visible",O==="inline-flex"?(H.style.display="inline-block",H.style.alignItems="normal"):(O==="flex"||O==="grid"||O==="inline-grid")&&(H.style.display="block",H.style.alignItems="normal"),H.focus(),kN(H),H.onkeydown=G=>{if(G.key==="Enter"&&!G.shiftKey){G.preventDefault(),I();return}G.key==="Escape"&&(G.preventDefault(),S.current())},H.onmousedown=()=>{J=!1},H.onmouseup=()=>{const G=H.ownerDocument.getSelection(),$=G==null?void 0:G.anchorNode,K=G==null?void 0:G.focusNode,M=$?H.contains($):!1,B=K?H.contains(K):!1;J=!!(G&&!G.isCollapsed&&M&&B)},H.onclick=G=>{G.stopPropagation(),J&&(G.preventDefault(),J=!1)},H.onblur=()=>{window.setTimeout(()=>{var ne;if(((ne=p.current)==null?void 0:ne.elementId)!==D.elementId)return;const G=H.ownerDocument.getSelection(),$=G==null?void 0:G.anchorNode,K=G==null?void 0:G.focusNode,M=H.ownerDocument.activeElement,B=!!(G&&!G.isCollapsed)&&!!($&&H.contains($))&&!!(K&&H.contains(K));M===H||B||I()},0)},()=>{H.removeAttribute("contenteditable"),H.removeAttribute("spellcheck"),H.removeAttribute("data-hse-editing"),H.style.cursor="pointer",H.style.display=le,H.style.alignItems=re,H.style.overflow=te,H.onblur=null,H.onclick=null,H.onkeydown=null,H.onmousedown=null,H.onmouseup=null}},[n,r,h]),{selectedElementId:E,selectedElementIds:i,activeGroupScopeId:u,isEditingText:!!(n&&(h==null?void 0:h.slideId)===n.id),setSelectedElementId:T,setSelectedElementIds:c,beginTextEditing:A,beginGroupEditingScope:N,exitGroupEditingScope:z,clearSelection:k}}function UN(n,r={}){var m;const{onSlidesChange:o}=r,[i,c]=y.useReducer(lc,n,qv),[u,d]=y.useState(((m=n[0])==null?void 0:m.id)??"");y.useEffect(()=>{var p;c({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const h=y.useMemo(()=>i.slides.find(p=>p.id===u)??i.slides[0],[u,i.slides]);return{slides:i.slides,activeSlide:h,activeSlideId:u,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const v=lc(i,{type:"history.commit",operation:p});c({type:"history.commit",operation:p}),o==null||o(v.slides)},runUndo:()=>{const p=lc(i,{type:"history.undo"});c({type:"history.undo"}),o==null||o(p.slides)},runRedo:()=>{const p=lc(i,{type:"history.redo"});c({type:"history.redo"}),o==null||o(p.slides)}}}const BN=["-webkit-","-moz-","-ms-"],GN=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 YN(n){return BN.some(r=>n.startsWith(r))?!1:!GN.has(n)}function VN(n){const r=window.getComputedStyle(n),o=[];for(const i of Array.from(r)){if(!YN(i))continue;const c=i==="transform"&&n.style.transform?n.style.transform.trim():r.getPropertyValue(i).trim();c.length!==0&&o.push({name:i,value:c})}return o.sort((i,c)=>i.name.localeCompare(c.name))}function qN({iframeRef:n,activeSlide:r,selectedElement:o,selectedElementIds:i,scale:c,offsetX:u,offsetY:d,slideWidth:h,slideHeight:m}){const[p,v]=y.useState(null),[b,S]=y.useState(null),[E,T]=y.useState([]);return y.useEffect(()=>{const C=n.current,A=C==null?void 0:C.contentDocument;if(!C||!A||!r){v(null),S(null),T([]);return}const N=A.querySelector(r.rootSelector),z=i[0]?Ze(A,i[0]):N;if(!z){v(null),S(null),T([]);return}const k=VN(z);if(T(_=>XN(_,k)?_:k),!i.length||!N){v(_=>_===null?_:null),S(_=>_===null?_:null);return}const q=N.getBoundingClientRect(),Z=i.map(_=>Ze(A,_)).filter(_=>!!_).map(_=>zo(_.getBoundingClientRect(),q,{scale:c,offsetX:u,offsetY:d}));if(!Z.length){v(_=>_===null?_:null),S(_=>_===null?_:null);return}const D=Z.reduce((_,j)=>{const H=Math.min(_.x,j.x),I=Math.min(_.y,j.y),J=Math.max(_.x+_.width,j.x+j.width),le=Math.max(_.y+_.height,j.y+j.height);return{x:H,y:I,width:J-H,height:le-I}});v(_=>Ev(_,D)?_:D),S(_=>Ev(_,D)?_:D)},[r,n,u,d,c,i,m,h]),{selectedStageRect:p,selectionOverlay:b,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:E}}function Ev(n,r){return n===r?!0:!n||!r?!1:n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function XN(n,r){return n.length!==r.length?!1:n.every((o,i)=>{const c=r[i];return(c==null?void 0:c.name)===o.name&&c.value===o.value})}function IN(n,r){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 o=document.implementation.createHTMLDocument(),i=o.createElement("base"),c=o.createElement("a");return o.head.appendChild(i),o.body.appendChild(c),r&&(i.href=r),c.href=n,c.href}const PN=(()=>{let n=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${r()}${n}`)})();function ql(n){const r=[];for(let o=0,i=n.length;o<i;o++)r.push(n[o]);return r}let ya=null;function Ix(n={}){return ya||(n.includeStyleProperties?(ya=n.includeStyleProperties,ya):(ya=ql(window.getComputedStyle(document.documentElement)),ya))}function Gc(n,r){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(r);return i?parseFloat(i.replace("px","")):0}function $N(n){const r=Gc(n,"border-left-width"),o=Gc(n,"border-right-width");return n.clientWidth+r+o}function KN(n){const r=Gc(n,"border-top-width"),o=Gc(n,"border-bottom-width");return n.clientHeight+r+o}function Px(n,r={}){const o=r.width||$N(n),i=r.height||KN(n);return{width:o,height:i}}function QN(){let n,r;try{r=process}catch{}const o=r&&r.env?r.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const en=16384;function ZN(n){(n.width>en||n.height>en)&&(n.width>en&&n.height>en?n.width>n.height?(n.height*=en/n.width,n.width=en):(n.width*=en/n.height,n.height=en):n.width>en?(n.height*=en/n.width,n.width=en):(n.width*=en/n.height,n.height=en))}function Yc(n){return new Promise((r,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>r(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function FN(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(r=>`data:image/svg+xml;charset=utf-8,${r}`)}async function JN(n,r,o){const i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return c.setAttribute("width",`${r}`),c.setAttribute("height",`${o}`),c.setAttribute("viewBox",`0 0 ${r} ${o}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),c.appendChild(u),u.appendChild(n),FN(c)}const Pt=(n,r)=>{if(n instanceof r)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===r.name||Pt(o,r)};function WN(n){const r=n.getPropertyValue("content");return`${n.cssText} content: '${r.replace(/'|"/g,"")}';`}function eO(n,r){return Ix(r).map(o=>{const i=n.getPropertyValue(o),c=n.getPropertyPriority(o);return`${o}: ${i}${c?" !important":""};`}).join(" ")}function tO(n,r,o,i){const c=`.${n}:${r}`,u=o.cssText?WN(o):eO(o,i);return document.createTextNode(`${c}{${u}}`)}function Cv(n,r,o,i){const c=window.getComputedStyle(n,o),u=c.getPropertyValue("content");if(u===""||u==="none")return;const d=PN();try{r.className=`${r.className} ${d}`}catch{return}const h=document.createElement("style");h.appendChild(tO(d,o,c,i)),r.appendChild(h)}function nO(n,r,o){Cv(n,r,":before",o),Cv(n,r,":after",o)}const Tv="application/font-woff",Av="image/jpeg",lO={woff:Tv,woff2:Tv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Av,jpeg:Av,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rO(n){const r=/\.([^./]*?)$/g.exec(n);return r?r[1]:""}function sh(n){const r=rO(n).toLowerCase();return lO[r]||""}function aO(n){return n.split(/,/)[1]}function Ed(n){return n.search(/^(data:)/)!==-1}function oO(n,r){return`data:${r};base64,${n}`}async function $x(n,r,o){const i=await fetch(n,r);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const c=await i.blob();return new Promise((u,d)=>{const h=new FileReader;h.onerror=d,h.onloadend=()=>{try{u(o({res:i,result:h.result}))}catch(m){d(m)}},h.readAsDataURL(c)})}const Pf={};function iO(n,r,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),r?`[${r}]${i}`:i}async function uh(n,r,o){const i=iO(n,r,o.includeQueryParams);if(Pf[i]!=null)return Pf[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let c;try{const u=await $x(n,o.fetchRequestInit,({res:d,result:h})=>(r||(r=d.headers.get("Content-Type")||""),aO(h)));c=oO(u,r)}catch(u){c=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return Pf[i]=c,c}async function cO(n){const r=n.toDataURL();return r==="data:,"?n.cloneNode(!1):Yc(r)}async function sO(n,r){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 h=u.toDataURL();return Yc(h)}const o=n.poster,i=sh(o),c=await uh(o,i,r);return Yc(c)}async function uO(n,r){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await rs(n.contentDocument.body,r,!0)}catch{}return n.cloneNode(!1)}async function fO(n,r){return Pt(n,HTMLCanvasElement)?cO(n):Pt(n,HTMLVideoElement)?sO(n,r):Pt(n,HTMLIFrameElement)?uO(n,r):n.cloneNode(Kx(n))}const dO=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",Kx=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function hO(n,r,o){var i,c;if(Kx(r))return r;let u=[];return dO(n)&&n.assignedNodes?u=ql(n.assignedNodes()):Pt(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=ql(n.contentDocument.body.childNodes):u=ql(((c=n.shadowRoot)!==null&&c!==void 0?c:n).childNodes),u.length===0||Pt(n,HTMLVideoElement)||await u.reduce((d,h)=>d.then(()=>rs(h,o)).then(m=>{m&&r.appendChild(m)}),Promise.resolve()),r}function mO(n,r,o){const i=r.style;if(!i)return;const c=window.getComputedStyle(n);c.cssText?(i.cssText=c.cssText,i.transformOrigin=c.transformOrigin):Ix(o).forEach(u=>{let d=c.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),Pt(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&r.getAttribute("d")&&(d=`path(${r.getAttribute("d")})`),i.setProperty(u,d,c.getPropertyPriority(u))})}function pO(n,r){Pt(n,HTMLTextAreaElement)&&(r.innerHTML=n.value),Pt(n,HTMLInputElement)&&r.setAttribute("value",n.value)}function gO(n,r){if(Pt(n,HTMLSelectElement)){const i=Array.from(r.children).find(c=>n.value===c.getAttribute("value"));i&&i.setAttribute("selected","")}}function yO(n,r,o){return Pt(r,Element)&&(mO(n,r,o),nO(n,r,o),pO(n,r),gO(n,r)),r}async function vO(n,r){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let u=0;u<o.length;u++){const h=o[u].getAttribute("xlink:href");if(h){const m=n.querySelector(h),p=document.querySelector(h);!m&&p&&!i[h]&&(i[h]=await rs(p,r,!0))}}const c=Object.values(i);if(c.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 h=document.createElementNS(u,"defs");d.appendChild(h);for(let m=0;m<c.length;m++)h.appendChild(c[m]);n.appendChild(d)}return n}async function rs(n,r,o){return!o&&r.filter&&!r.filter(n)?null:Promise.resolve(n).then(i=>fO(i,r)).then(i=>hO(n,i,r)).then(i=>yO(n,i,r)).then(i=>vO(i,r))}const Qx=/url\((['"]?)([^'"]+?)\1\)/g,bO=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xO=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function SO(n){const r=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${r})(['"]?\\))`,"g")}function wO(n){const r=[];return n.replace(Qx,(o,i,c)=>(r.push(c),o)),r.filter(o=>!Ed(o))}async function EO(n,r,o,i,c){try{const u=o?IN(r,o):r,d=sh(r);let h;return c||(h=await uh(u,d,i)),n.replace(SO(r),`$1${h}$3`)}catch{}return n}function CO(n,{preferredFontFormat:r}){return r?n.replace(xO,o=>{for(;;){const[i,,c]=bO.exec(o)||[];if(!c)return"";if(c===r)return`src: ${i};`}}):n}function Zx(n){return n.search(Qx)!==-1}async function Fx(n,r,o){if(!Zx(n))return n;const i=CO(n,o);return wO(i).reduce((u,d)=>u.then(h=>EO(h,d,r,o)),Promise.resolve(i))}async function va(n,r,o){var i;const c=(i=r.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(c){const u=await Fx(c,null,o);return r.style.setProperty(n,u,r.style.getPropertyPriority(n)),!0}return!1}async function TO(n,r){await va("background",n,r)||await va("background-image",n,r),await va("mask",n,r)||await va("-webkit-mask",n,r)||await va("mask-image",n,r)||await va("-webkit-mask-image",n,r)}async function AO(n,r){const o=Pt(n,HTMLImageElement);if(!(o&&!Ed(n.src))&&!(Pt(n,SVGImageElement)&&!Ed(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,c=await uh(i,sh(i),r);await new Promise((u,d)=>{n.onload=u,n.onerror=r.onImageErrorHandler?(...m)=>{try{u(r.onImageErrorHandler(...m))}catch(p){d(p)}}:d;const h=n;h.decode&&(h.decode=u),h.loading==="lazy"&&(h.loading="eager"),o?(n.srcset="",n.src=c):n.href.baseVal=c})}async function MO(n,r){const i=ql(n.childNodes).map(c=>Jx(c,r));await Promise.all(i).then(()=>n)}async function Jx(n,r){Pt(n,Element)&&(await TO(n,r),await AO(n,r),await MO(n,r))}function _O(n,r){const{style:o}=n;r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.width&&(o.width=`${r.width}px`),r.height&&(o.height=`${r.height}px`);const i=r.style;return i!=null&&Object.keys(i).forEach(c=>{o[c]=i[c]}),n}const Mv={};async function _v(n){let r=Mv[n];if(r!=null)return r;const i=await(await fetch(n)).text();return r={url:n,cssText:i},Mv[n]=r,r}async function Rv(n,r){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let h=d.replace(i,"$1");return h.startsWith("https://")||(h=new URL(h,n.url).href),$x(h,r.fetchRequestInit,({result:m})=>(o=o.replace(d,`url(${m})`),[d,m]))});return Promise.all(u).then(()=>o)}function Nv(n){if(n==null)return[];const r=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const c=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=c.exec(i);if(m===null)break;r.push(m[0])}i=i.replace(c,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",h=new RegExp(d,"gi");for(;;){let m=u.exec(i);if(m===null){if(m=h.exec(i),m===null)break;u.lastIndex=h.lastIndex}else h.lastIndex=u.lastIndex;r.push(m[0])}return r}async function RO(n,r){const o=[],i=[];return n.forEach(c=>{if("cssRules"in c)try{ql(c.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let h=d+1;const m=u.href,p=_v(m).then(v=>Rv(v,r)).then(v=>Nv(v).forEach(b=>{try{c.insertRule(b,b.startsWith("@import")?h+=1:c.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:b,error:S})}})).catch(v=>{console.error("Error loading remote css",v.toString())});i.push(p)}})}catch(u){const d=n.find(h=>h.href==null)||document.styleSheets[0];c.href!=null&&i.push(_v(c.href).then(h=>Rv(h,r)).then(h=>Nv(h).forEach(m=>{d.insertRule(m,d.cssRules.length)})).catch(h=>{console.error("Error loading remote stylesheet",h)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(c=>{if("cssRules"in c)try{ql(c.cssRules||[]).forEach(u=>{o.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${c.href}`,u)}}),o))}function NO(n){return n.filter(r=>r.type===CSSRule.FONT_FACE_RULE).filter(r=>Zx(r.style.getPropertyValue("src")))}async function OO(n,r){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=ql(n.ownerDocument.styleSheets),i=await RO(o,r);return NO(i)}function Wx(n){return n.trim().replace(/["']/g,"")}function zO(n){const r=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{r.add(Wx(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&o(u)})}return o(n),r}async function DO(n,r){const o=await OO(n,r),i=zO(n);return(await Promise.all(o.filter(u=>i.has(Wx(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return Fx(u.cssText,d,r)}))).join(`
|
|
323
|
+
`)}async function jO(n,r){const o=r.fontEmbedCSS!=null?r.fontEmbedCSS:r.skipFonts?null:await DO(n,r);if(o){const i=document.createElement("style"),c=document.createTextNode(o);i.appendChild(c),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function LO(n,r={}){const{width:o,height:i}=Px(n,r),c=await rs(n,r,!0);return await jO(c,r),await Jx(c,r),_O(c,r),await JN(c,o,i)}async function kO(n,r={}){const{width:o,height:i}=Px(n,r),c=await LO(n,r),u=await Yc(c),d=document.createElement("canvas"),h=d.getContext("2d"),m=r.pixelRatio||QN(),p=r.canvasWidth||o,v=r.canvasHeight||i;return d.width=p*m,d.height=v*m,r.skipAutoScale||ZN(d),d.style.width=`${p}`,d.style.height=`${v}`,r.backgroundColor&&(h.fillStyle=r.backgroundColor,h.fillRect(0,0,d.width,d.height)),h.drawImage(u,0,0,d.width,d.height),d}async function HO(n,r={}){return(await kO(n,r)).toDataURL()}const Ov=224,UO=2;function BO(n){return new Promise(r=>{window.setTimeout(r,n)})}async function GO(n){var r;if((r=n.fonts)!=null&&r.ready)try{await n.fonts.ready}catch{}}async function YO(n){const r=document.createElement("iframe");r.setAttribute("aria-hidden","true"),r.tabIndex=-1,r.style.position="fixed",r.style.left="-10000px",r.style.top="0",r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.opacity="0",r.style.pointerEvents="none",r.style.border="0",document.body.appendChild(r);try{const o=r.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await GO(o),await BO(50);const i=o.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const c=o.body??i;return await HO(c,{cacheBust:!0,pixelRatio:UO,canvasWidth:Ov,canvasHeight:Math.round(n.height/n.width*Ov),backgroundColor:"white",skipFonts:!1})}finally{r.remove()}}const VO=300;function qO(n){const[r,o]=y.useState({}),i=y.useRef(new Map),c=y.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return y.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const h={};for(const m of n){const p=`${m.id}:${m.htmlSource}`,v=i.current.get(p);if(v){h[m.id]=v;continue}try{const b=await YO(m);i.current.set(p,b),h[m.id]=b}catch{}if(u)return}u||o(m=>({...m,...h}))},VO);return()=>{u=!0,window.clearTimeout(d)}},[n]),y.useEffect(()=>{const u=new Set(c.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[c]),r}function XO({stageViewportRef:n,slideWidth:r,slideHeight:o}){const[i,c]=y.useState({width:0,height:0});y.useEffect(()=>{const p=n.current;if(!p)return;const v=()=>{const S=p.getBoundingClientRect();c(E=>E.width===S.width&&E.height===S.height?E:{width:S.width,height:S.height})};v();const b=new ResizeObserver(()=>{v()});return b.observe(p),()=>{b.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/r:1,i.height>0?i.height/o:1),d=Number.isFinite(u)&&u>0?u:1,h=r*d,m=o*d;return{scale:d,offsetX:Math.max((i.width-h)/2,0),offsetY:Math.max((i.height-m)/2,0)}}function IO({slides:n,deckTitle:r,sourceLabel:o,isSaving:i=!1,onSlidesChange:c}){const{slides:u,activeSlide:d,undoDepth:h,redoDepth:m,setActiveSlideId:p,commitOperation:v,runUndo:b,runRedo:S}=UN(n,{onSlidesChange:c}),E=y.useRef(null),T=y.useRef(null),C=y.useRef(null),A=qO(u),{selectedElementId:N,selectedElementIds:z,isEditingText:k,activeGroupScopeId:q,setSelectedElementId:Z,setSelectedElementIds:D,beginTextEditing:_,beginGroupEditingScope:j,clearSelection:H}=HN({activeSlide:d,iframeRef:E,onCommitOperation:v}),I=d==null?void 0:d.elements.find(se=>se.id===N),J=d==null?void 0:d.elements.find(se=>se.id===q),le=z.length>1?"multi":(I==null?void 0:I.type)??(J==null?void 0:J.type)??"block",re=d?z.map(se=>d.elements.find(Ce=>Ce.id===se)).filter(se=>!!se):[],te={group:z.length>=2&&re.length===z.length,ungroup:z.length===1&&(I==null?void 0:I.type)==="group"},ae=!!q&&z.length===1&&N===q,O=(r==null?void 0:r.trim())||"Untitled deck",X=(d==null?void 0:d.width)||xr,G=(d==null?void 0:d.height)||Sr,{scale:$,offsetX:K,offsetY:M}=XO({stageViewportRef:T,slideWidth:X,slideHeight:G}),{selectedStageRect:B,selectionOverlay:ne,inspectedStyles:oe}=qN({iframeRef:E,activeSlide:d,selectedElement:I,selectedElementIds:z,scale:$,offsetX:K,offsetY:M,slideWidth:X,slideHeight:G}),{manipulationOverlay:ce,isManipulating:ue,suppressBackgroundClear:ie,beginMove:xe,beginResize:fe,beginRotate:Me}=SN({activeSlide:d,selectedElement:I,selectedElementId:N,selectedElementIds:z,selectedStageRect:B,iframeRef:E,stageGeometry:{scale:$,offsetX:K,offsetY:M,slideWidth:X,slideHeight:G},isEditingText:k,onCommitOperation:v}),we=(ce==null?void 0:ce.selectionBounds)??ne,Ee=N??"slide-root",nt={locked:d?Oo(d,Ee,"data-editor-locked"):"",altText:d?Oo(d,Ee,"alt"):"",ariaLabel:d?Oo(d,Ee,"aria-label"):"",linkUrl:d?Oo(d,Ee,"data-link-url"):""};function Pe(se,Ce){if(!d)return;const ye=nN({elementId:Ee,nextValue:Ce,propertyName:se,slide:d});ye&&v(ye)}function kt(se,Ce){if(!d)return;const ye=lN({attributeName:se,elementId:Ee,nextValue:Ce,slide:d});ye&&v(ye)}function Ht(se){if(!d||z.length===0)return;const Ce=z.map(ye=>{const Be=xd(d,ye,"z-index"),$e=Number.parseInt(Be,10),Ue=Number.isFinite($e)?$e:0,it=se==="front"?"999":se==="back"?"0":String(Math.max(0,Ue+(se==="forward"?1:-1)));return Be===it?null:{type:"style.update",slideId:d.id,elementId:ye,propertyName:"z-index",previousValue:Be,nextValue:it,timestamp:Date.now()}}).filter(ye=>!!ye);jt(Ce)}function jt(se){!d||se.length===0||v(se.length===1?se[0]:{type:"operation.batch",slideId:d.id,operations:se,timestamp:Date.now()})}function Ne(se,Ce,ye){var it;const Be={[Ce]:ye},Ue=(it=new DOMParser().parseFromString(`<template>${se}</template>`,"text/html").querySelector("template"))==null?void 0:it.content.firstElementChild;if(!(Ue instanceof HTMLElement))return Be;for(const lt of Ue.querySelectorAll(`[${Te}]`)){const Fe=lt.getAttribute(Te);Fe&&(Be[Fe]=`${ye}-${Fe}`)}return Be}function be(){var it;if(!d||z.length===0)return;const se=(it=E.current)==null?void 0:it.contentDocument,Ce=se==null?void 0:se.querySelector(d.rootSelector),ye=Ce==null?void 0:Ce.getBoundingClientRect();let Be=d.htmlSource;const $e=[],Ue=z.map(lt=>{const Fe=Ac(d.htmlSource,lt),ht=Tc(d.htmlSource,lt),rt=se?Ze(se,lt):null;if(!Fe||!ht||!rt||!ye)return null;const Mn=Zf(Be,`${lt}-copy`),fl=Vv(Fe,Ne(Fe,lt,Mn)),Da=wd(Xx(rt.getBoundingClientRect(),ye),24,24),Bn=qx(fl,Da);return Be=`${Be}
|
|
324
|
+
<!-- ${Mn} reserved -->`,$e.push(Mn),{type:"element.insert",slideId:d.id,elementId:Mn,...ht,html:Bn,timestamp:Date.now()}}).filter(lt=>!!lt);jt(Ue),$e.length&&D($e)}function yn(){if(!d||z.length===0)return;const se=z.map(Ce=>{const ye=Ac(d.htmlSource,Ce),Be=Tc(d.htmlSource,Ce);return!ye||!Be?null:{type:"element.remove",slideId:d.id,elementId:Ce,...Be,html:ye,timestamp:Date.now()}}).filter(Ce=>!!Ce);jt(se),se.length&&D([])}function vn(){if(!d||z.length<2)return;const se=bn(),Ce=Zf(d.htmlSource,"group-1"),ye=kw({html:d.htmlSource,slideId:d.id,groupElementId:Ce,elementRects:se,elementIds:z});ye&&(v(ye),D([Ce]))}function bn(){var it;const se=(it=E.current)==null?void 0:it.contentDocument,Ce=se==null?void 0:se.querySelector((d==null?void 0:d.rootSelector)??"");if(!se||!Ce)return{};const ye=Ce.getBoundingClientRect(),Be=d?d.width/ye.width:1,$e=d?d.height/ye.height:1,Ue={};for(const lt of se.querySelectorAll(`[data-editable][${Te}]`)){const Fe=lt.getAttribute(Te);if(!Fe)continue;const ht=lt.getBoundingClientRect(),rt=lt.parentElement,Mn=rt!=null&&rt.hasAttribute("data-editable")&&rt.getAttribute(Te)?rt.getAttribute(Te):null,fl=Mn?Ue[Mn]??{x:0,y:0,width:ye.width,height:ye.height}:{x:0,y:0,width:ye.width,height:ye.height};Ue[Fe]={x:(ht.left-ye.left)*Be-fl.x,y:(ht.top-ye.top)*$e-fl.y,width:ht.width*Be,height:ht.height*$e}}return Ue}function za(){if(!d||z.length!==1||!N)return;const se=Hw({html:d.htmlSource,slideId:d.id,groupElementId:N,elementRects:bn()});se&&(v(se),D(se.childElementIds))}function Ct(se){if(!d||!N||!we)return;const Ce=xd(d,N,"transform"),ye={x:(we.x-K)/$,y:(we.y-M)/$,width:we.width/$,height:we.height/$};let Be=0,$e=0;if(se==="left"?Be=-ye.x:se==="hcenter"?Be=X/2-(ye.x+ye.width/2):se==="right"?Be=X-(ye.x+ye.width):se==="top"?$e=-ye.y:se==="vcenter"?$e=G/2-(ye.y+ye.height/2):se==="bottom"&&($e=G-(ye.y+ye.height)),Math.abs(Be)<.01&&Math.abs($e)<.01)return;const Ue=Cn(Ce);Pe("transform",il(Ue.translateX+Be,Ue.translateY+$e,Ue.rotate)??"")}function Un(se){var Bn;if(!d||z.length<3)return;const Ce=(Bn=E.current)==null?void 0:Bn.contentDocument,ye=Ce==null?void 0:Ce.querySelector(d.rootSelector),Be=ye==null?void 0:ye.getBoundingClientRect();if(!Ce||!Be)return;const $e=z.map(St=>{const ln=Ze(Ce,St);if(!ln)return null;const Ut=ln.getBoundingClientRect();return{elementId:St,node:ln,rect:{x:Ut.left-Be.left,y:Ut.top-Be.top,width:Ut.width,height:Ut.height}}}).filter(St=>!!St);if($e.length<3)return;const Ue=se==="vertical"?"y":"x",it=se==="vertical"?"height":"width",lt=[...$e].sort((St,ln)=>St.rect[Ue]-ln.rect[Ue]),Fe=lt[0],ht=lt[lt.length-1];if(!Fe||!ht)return;const rt=Fe.rect[Ue]+Fe.rect[it]/2,fl=(ht.rect[Ue]+ht.rect[it]/2-rt)/(lt.length-1),Da=lt.map((St,ln)=>{const Ut=rt+fl*ln,Mr=St.rect[Ue]+St.rect[it]/2,Gn=Ut-Mr;if(Math.abs(Gn)<.01)return null;const _r=Do(St.node),Rr=Cn(_r.transform),ja=$f({..._r,transform:il(Rr.translateX+(Ue==="x"?Gn:0),Rr.translateY+(Ue==="y"?Gn:0),Rr.rotate),transformOrigin:_r.transformOrigin||"center center"});return{type:"element.layout.update",slideId:d.id,elementId:St.elementId,previousStyle:_r,nextStyle:ja,timestamp:Date.now()}}).filter(St=>!!St);jt(Da)}return zN({activeSlide:d,selectedElementIds:z,iframeRef:E,slideWidth:X,slideHeight:G,isEditingText:k,canUndo:h>0,canRedo:m>0,onCommitOperation:v,onSelectElementIds:D,onEscapeSelection:H,onUndo:b,onRedo:S}),d?x.jsx(tN,{children:x.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[x.jsx(a_,{deckTitle:O,sourceLabel:o,isSaving:i}),x.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[x.jsx(c_,{slides:u,activeSlideId:d.id,slideCount:u.length,thumbnails:A,onSelectSlide:se=>{p(se),Z(null)}}),x.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:x.jsx(WR,{slideWidth:X,slideHeight:G,offsetX:K,offsetY:M,scale:$,selectionOverlay:we,toolbarKey:z.length?`${d.id}:${z.join(",")}`:null,inspectedStyles:oe,selectedElementType:le,selectionCommandAvailability:te,groupScopeOverlayPassive:ae,isEditingText:k,manipulationOverlay:ce,iframeRef:E,stageViewportRef:T,selectionOverlayRef:C,isManipulating:ue,onSelectionOverlayMouseDown:se=>{z.length&&xe({clientX:se.clientX,clientY:se.clientY,preventDefault:()=>se.preventDefault(),stopPropagation:()=>se.stopPropagation()})},onResizeHandleMouseDown:(se,Ce)=>{z.length&&fe(se,{clientX:Ce.clientX,clientY:Ce.clientY,preventDefault:()=>Ce.preventDefault(),stopPropagation:()=>Ce.stopPropagation()})},onRotateHandleMouseDown:se=>{z.length===1&&Me({clientX:se.clientX,clientY:se.clientY,preventDefault:()=>se.preventDefault(),stopPropagation:()=>se.stopPropagation()})},onSelectionOverlayDoubleClick:se=>{var Ce;if(q&&((Ce=E.current)!=null&&Ce.contentDocument)){const ye=E.current.getBoundingClientRect(),$e=E.current.contentDocument.elementFromPoint(se.clientX-ye.left,se.clientY-ye.top),Ue=$e==null?void 0:$e.closest(`[data-editable][${Te}]`);if((Ue==null?void 0:Ue.getAttribute("data-editable"))==="text"){const it=Ue.getAttribute(Te);if(it){_(it);return}}}if(z.length===1&&(I==null?void 0:I.type)==="text"&&N){_(N);return}z.length===1&&(I==null?void 0:I.type)==="group"&&N&&j(N)},onBackgroundClick:()=>{ie||H()},onStyleChange:Pe,onAttributeChange:kt,onAlignToSlide:Ct,onDistribute:Un,onGroup:vn,onLayerOrder:Ht,onUngroup:za,onDuplicate:be,onDelete:yn,attributeValues:nt})})]})]})}):x.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}const PO="/deck/manifest.json",$O="/__editor/save-generated-deck",zv=800;function KO(){const[n,r]=y.useState("Generated deck"),[o,i]=y.useState([]),[c,u]=y.useState("Generated deck"),[d,h]=y.useState(null),[m,p]=y.useState(!0),[v,b]=y.useState(!1),S=y.useRef(null),E=y.useRef([]),T=y.useRef(null),C=y.useRef(null),A=y.useRef(0),N=y.useRef(!1),z=y.useRef(Date.now());y.useEffect(()=>{let Z=!1;return Uw({manifestUrl:`${PO}?v=${Date.now()}`}).then(D=>{if(!Z){if(!D){r("Generated deck"),i([]),u("Generated deck unavailable"),h("No slides were found at /deck/manifest.json."),p(!1);return}S.current=D.manifest,r(D.manifest.topic||"Generated deck"),i(D.slides),E.current=D.slides,u(D.manifest.topic?`Generated deck: ${D.manifest.topic}`:"Generated deck from Starry Slides Editor e2e generator"),h(null),p(!1)}}).catch(()=>{Z||(r("Generated deck"),i([]),u("Generated deck unavailable"),h("The app could not load the generated deck."),p(!1))}),()=>{Z=!0,C.current&&window.clearTimeout(C.current)}},[]);const k=()=>{var H;const Z=S.current,D=T.current,_=A.current;if(!((H=Z==null?void 0:Z.slides)!=null&&H.length)||!(D!=null&&D.length)||N.current)return;N.current=!0;const j=new Map(E.current.map((I,J)=>{var le,re;return[I.id,I.sourceFile??((re=(le=Z.slides)==null?void 0:le[J])==null?void 0:re.file)]}));fetch($O,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:z.current,slides:D.map(I=>({file:I.sourceFile??j.get(I.id),htmlSource:I.htmlSource}))})}).catch(()=>{h("The app could not write generated slides back to disk.")}).finally(()=>{if(N.current=!1,A.current!==_){C.current||(C.current=window.setTimeout(()=>{C.current=null,k()},zv));return}b(!1)})};return{deckTitle:n,slides:o,sourceLabel:c,errorMessage:d,isLoading:m,isSaving:v,saveSlides:Z=>{var _;if(E.current===Z)return;const D=S.current;(_=D==null?void 0:D.slides)!=null&&_.length&&(E.current=Z,T.current=Z,A.current+=1,b(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,k()},zv))}}}function Dv({title:n,body:r}){return x.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:x.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:[x.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),x.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:r})]})})}function QO(){const{deckTitle:n,slides:r,sourceLabel:o,errorMessage:i,isLoading:c,isSaving:u,saveSlides:d}=KO();return c?x.jsx(Dv,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):i?x.jsx(Dv,{title:"Generated deck required",body:i}):x.jsx(IO,{slides:r,deckTitle:n,sourceLabel:o,isSaving:u,onSlidesChange:d})}const eS=document.getElementById("root");if(!eS)throw new Error("Root element #root was not found.");Ew.createRoot(eS).render(x.jsx(ol.StrictMode,{children:x.jsx(QO,{})}));
|