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.
Files changed (160) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +131 -0
  3. package/dist/assets/index---ub3Dty.css +1 -0
  4. package/dist/assets/index-7Xs_Dyp0.js +354 -0
  5. package/dist/assets/index-8ul7coaw.js +451 -0
  6. package/dist/assets/index-B4_bJa9t.js +412 -0
  7. package/dist/assets/index-B9p6L9Wx.js +324 -0
  8. package/dist/assets/index-BF-Vi1Nh.js +413 -0
  9. package/dist/assets/index-BKvVbgXz.css +1 -0
  10. package/dist/assets/index-BNZJ_Wz-.js +417 -0
  11. package/dist/assets/index-BO2gtiKn.js +413 -0
  12. package/dist/assets/index-BYpD8kgo.js +456 -0
  13. package/dist/assets/index-BaZRfz_9.css +1 -0
  14. package/dist/assets/index-BlsWm4PI.js +412 -0
  15. package/dist/assets/index-BnUIBFtw.js +393 -0
  16. package/dist/assets/index-BvhCbfCi.js +412 -0
  17. package/dist/assets/index-BxEkxfy1.js +412 -0
  18. package/dist/assets/index-BzrA7O0L.js +422 -0
  19. package/dist/assets/index-C0xGkdRg.js +413 -0
  20. package/dist/assets/index-C1Rjncf1.js +456 -0
  21. package/dist/assets/index-CCgb2gqc.js +413 -0
  22. package/dist/assets/index-CDFJQRFx.js +413 -0
  23. package/dist/assets/index-CEOai0RW.js +456 -0
  24. package/dist/assets/index-CG2uWTey.css +1 -0
  25. package/dist/assets/index-CLe3_iTu.js +412 -0
  26. package/dist/assets/index-CS_optob.js +324 -0
  27. package/dist/assets/index-CXgwXOZH.css +1 -0
  28. package/dist/assets/index-CcBvAcE2.js +408 -0
  29. package/dist/assets/index-CllmR_MT.js +408 -0
  30. package/dist/assets/index-CnMy6wxq.js +412 -0
  31. package/dist/assets/index-CoWNjYgb.js +422 -0
  32. package/dist/assets/index-CtfA3BPy.css +1 -0
  33. package/dist/assets/index-D-JiuJIv.js +324 -0
  34. package/dist/assets/index-D2uEYXyQ.css +1 -0
  35. package/dist/assets/index-D70beOHW.js +456 -0
  36. package/dist/assets/index-D8xuxnF1.js +456 -0
  37. package/dist/assets/index-DKAtkRd8.css +1 -0
  38. package/dist/assets/index-DU3l9_k0.css +1 -0
  39. package/dist/assets/index-DaLY98jk.js +456 -0
  40. package/dist/assets/index-DkNHJHQl.js +412 -0
  41. package/dist/assets/index-DmFnifK8.js +456 -0
  42. package/dist/assets/index-DndZR7Ds.css +1 -0
  43. package/dist/assets/index-DuRa7Y6g.js +324 -0
  44. package/dist/assets/index-EnDjTeHF.js +451 -0
  45. package/dist/assets/index-J3nQgjqJ.js +451 -0
  46. package/dist/assets/index-wD_iWTBn.js +413 -0
  47. package/dist/chunk-AK5J4CXH.js +1671 -0
  48. package/dist/chunk-ARFDESSF.js +1583 -0
  49. package/dist/chunk-DHWTBXGS.js +985 -0
  50. package/dist/chunk-FCRRFL7N.js +1571 -0
  51. package/dist/chunk-J7W4Y7WJ.js +1620 -0
  52. package/dist/chunk-OCJULB7Z.js +1140 -0
  53. package/dist/chunk-WCJWV5SO.js +36 -0
  54. package/dist/cli/index.d.ts +2 -0
  55. package/dist/cli/index.js +1119 -0
  56. package/dist/cli/index.test.d.ts +1 -0
  57. package/dist/core/deck-slide-operations.d.ts +5 -0
  58. package/dist/core/generated-deck.d.ts +8 -0
  59. package/dist/core/generated-deck.test.d.ts +1 -0
  60. package/dist/core/group-operations.d.ts +24 -0
  61. package/dist/core/history.d.ts +20 -0
  62. package/dist/core/history.test.d.ts +1 -0
  63. package/dist/core/html-export.d.ts +20 -0
  64. package/dist/core/index.d.ts +11 -0
  65. package/dist/core/layout.d.ts +36 -0
  66. package/dist/core/layout.test.d.ts +1 -0
  67. package/dist/core/pdf-export.d.ts +20 -0
  68. package/dist/core/presentation.d.ts +7 -0
  69. package/dist/core/slide-contract.d.ts +41 -0
  70. package/dist/core/slide-document.d.ts +5 -0
  71. package/dist/core/slide-document.test.d.ts +1 -0
  72. package/dist/core/slide-html-document.d.ts +3 -0
  73. package/dist/core/slide-operation-reducer.d.ts +4 -0
  74. package/dist/core/slide-operation-reducer.test.d.ts +1 -0
  75. package/dist/core/slide-operation-types.d.ts +123 -0
  76. package/dist/core/slide-operations-helpers.d.ts +14 -0
  77. package/dist/core/slide-operations.d.ts +5 -0
  78. package/dist/core/slide-operations.test.d.ts +1 -0
  79. package/dist/core/verify-deck.d.ts +48 -0
  80. package/dist/core/verify-deck.test.d.ts +1 -0
  81. package/dist/editor/app/App.d.ts +2 -0
  82. package/dist/editor/app/main.d.ts +1 -0
  83. package/dist/editor/app/use-slides-data.d.ts +14 -0
  84. package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
  85. package/dist/editor/components/color-picker.d.ts +10 -0
  86. package/dist/editor/components/context-menu.d.ts +26 -0
  87. package/dist/editor/components/editor-header.d.ts +18 -0
  88. package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
  89. package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
  90. package/dist/editor/components/floating-toolbar.d.ts +27 -0
  91. package/dist/editor/components/presenter-view.d.ts +13 -0
  92. package/dist/editor/components/slide-sidebar.d.ts +18 -0
  93. package/dist/editor/components/stage-canvas.d.ts +77 -0
  94. package/dist/editor/components/ui/accordion.d.ts +7 -0
  95. package/dist/editor/components/ui/button.d.ts +10 -0
  96. package/dist/editor/components/ui/context-menu.d.ts +25 -0
  97. package/dist/editor/components/ui/dialog.d.ts +10 -0
  98. package/dist/editor/components/ui/input.d.ts +3 -0
  99. package/dist/editor/components/ui/popover.d.ts +10 -0
  100. package/dist/editor/components/ui/scroll-area.d.ts +5 -0
  101. package/dist/editor/components/ui/select.d.ts +15 -0
  102. package/dist/editor/components/ui/separator.d.ts +4 -0
  103. package/dist/editor/components/ui/tabs.d.ts +11 -0
  104. package/dist/editor/components/ui/textarea.d.ts +3 -0
  105. package/dist/editor/components/ui/toggle-group.d.ts +9 -0
  106. package/dist/editor/components/ui/toggle.d.ts +9 -0
  107. package/dist/editor/components/ui/tooltip.d.ts +7 -0
  108. package/dist/editor/editor-operations.d.ts +15 -0
  109. package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
  110. package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
  111. package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
  112. package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
  113. package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
  114. package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
  115. package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
  116. package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
  117. package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
  118. package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
  119. package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
  120. package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
  121. package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
  122. package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
  123. package/dist/editor/hooks/use-slide-history.d.ts +17 -0
  124. package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
  125. package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
  126. package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
  127. package/dist/editor/index.d.ts +13 -0
  128. package/dist/editor/index.js +8260 -0
  129. package/dist/editor/lib/block-snap-constants.d.ts +8 -0
  130. package/dist/editor/lib/block-snap-guides.d.ts +6 -0
  131. package/dist/editor/lib/block-snap-targets.d.ts +13 -0
  132. package/dist/editor/lib/block-snap-types.d.ts +30 -0
  133. package/dist/editor/lib/block-snapping.d.ts +17 -0
  134. package/dist/editor/lib/collect-css-properties.d.ts +5 -0
  135. package/dist/editor/lib/element-tool-commit.d.ts +18 -0
  136. package/dist/editor/lib/element-tool-model.d.ts +16 -0
  137. package/dist/editor/lib/element-tool-types.d.ts +35 -0
  138. package/dist/editor/lib/element-tool-values.d.ts +23 -0
  139. package/dist/editor/lib/motion.d.ts +8 -0
  140. package/dist/editor/lib/selection-overlay.d.ts +4 -0
  141. package/dist/editor/lib/style-controls.d.ts +17 -0
  142. package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
  143. package/dist/editor/lib/utils.d.ts +3 -0
  144. package/dist/index.html +13 -0
  145. package/dist/node/deck-runtime-middleware.d.ts +8 -0
  146. package/dist/node/deck-source.d.ts +1 -0
  147. package/dist/node/html-export.d.ts +16 -0
  148. package/dist/node/open-browser.d.ts +1 -0
  149. package/dist/node/pdf-export.d.ts +20 -0
  150. package/dist/node/ports.d.ts +1 -0
  151. package/dist/node/view-renderer.d.ts +31 -0
  152. package/dist/runtime/deck-source.d.ts +1 -0
  153. package/dist/runtime/html-export.d.ts +16 -0
  154. package/dist/runtime/open-browser.d.ts +1 -0
  155. package/dist/runtime/pdf-export.d.ts +20 -0
  156. package/dist/runtime/ports.d.ts +1 -0
  157. package/dist/runtime/view-renderer.d.ts +31 -0
  158. package/dist/runtime/view-renderer.test.d.ts +1 -0
  159. package/dist/test/deck-fixtures.d.ts +14 -0
  160. package/package.json +94 -0
@@ -0,0 +1,408 @@
1
+ function Sw(n,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(i,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(c){if(c.ep)return;c.ep=!0;const f=o(c);fetch(c.href,f)}})();function kd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tf={exports:{}},Uo={};/**
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 uy;function ww(){if(uy)return Uo;uy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:i,key:d,ref:c!==void 0?c:null,props:f}}return Uo.Fragment=l,Uo.jsx=o,Uo.jsxs=o,Uo}var fy;function Ew(){return fy||(fy=1,Tf.exports=ww()),Tf.exports}var v=Ew(),Cf={exports:{}},ze={};/**
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 dy;function Tw(){if(dy)return ze;dy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),S=Symbol.iterator;function T(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function R(_,L,Z){this.props=_,this.context=L,this.refs=A,this.updater=Z||C}R.prototype.isReactComponent={},R.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,L,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function z(){}z.prototype=R.prototype;function N(_,L,Z){this.props=_,this.context=L,this.refs=A,this.updater=Z||C}var B=N.prototype=new z;B.constructor=N,E(B,R.prototype),B.isPureReactComponent=!0;var te=Array.isArray;function G(){}var H={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function F(_,L,Z){var ie=Z.ref;return{$$typeof:n,type:_,key:L,ref:ie!==void 0?ie:null,props:Z}}function ee(_,L){return F(_.type,L,_.props)}function fe(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function W(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Z){return L[Z]})}var P=/\/+/g;function K(_,L){return typeof _=="object"&&_!==null&&_.key!=null?W(""+_.key):L.toString(36)}function q(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(G,G):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,L,Z,ie,ne){var me=typeof _;(me==="undefined"||me==="boolean")&&(_=null);var ce=!1;if(_===null)ce=!0;else switch(me){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(_.$$typeof){case n:case l:ce=!0;break;case x:return ce=_._init,M(ce(_._payload),L,Z,ie,ne)}}if(ce)return ne=ne(_),ce=ie===""?"."+K(_,0):ie,te(ne)?(Z="",ce!=null&&(Z=ce.replace(P,"$&/")+"/"),M(ne,L,Z,"",function(be){return be})):ne!=null&&(fe(ne)&&(ne=ee(ne,Z+(ne.key==null||_&&_.key===ne.key?"":(""+ne.key).replace(P,"$&/")+"/")+ce)),L.push(ne)),1;ce=0;var Q=ie===""?".":ie+":";if(te(_))for(var re=0;re<_.length;re++)ie=_[re],me=Q+K(ie,re),ce+=M(ie,L,Z,me,ne);else if(re=T(_),typeof re=="function")for(_=re.call(_),re=0;!(ie=_.next()).done;)ie=ie.value,me=Q+K(ie,re++),ce+=M(ie,L,Z,me,ne);else if(me==="object"){if(typeof _.then=="function")return M(q(_),L,Z,ie,ne);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ce}function j(_,L,Z){if(_==null)return _;var ie=[],ne=0;return M(_,ie,"","",function(me){return L.call(Z,me,ne++)}),ie}function Y(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(Z){(_._status===0||_._status===-1)&&(_._status=1,_._result=Z)},function(Z){(_._status===0||_._status===-1)&&(_._status=2,_._result=Z)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var V=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},U={map:j,forEach:function(_,L,Z){j(_,function(){L.apply(this,arguments)},Z)},count:function(_){var L=0;return j(_,function(){L++}),L},toArray:function(_){return j(_,function(L){return L})||[]},only:function(_){if(!fe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ze.Activity=p,ze.Children=U,ze.Component=R,ze.Fragment=o,ze.Profiler=c,ze.PureComponent=N,ze.StrictMode=i,ze.Suspense=h,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,ze.__COMPILER_RUNTIME={__proto__:null,c:function(_){return H.H.useMemoCache(_)}},ze.cache=function(_){return function(){return _.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(_,L,Z){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ie=E({},_.props),ne=_.key;if(L!=null)for(me in L.key!==void 0&&(ne=""+L.key),L)!O.call(L,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&L.ref===void 0||(ie[me]=L[me]);var me=arguments.length-2;if(me===1)ie.children=Z;else if(1<me){for(var ce=Array(me),Q=0;Q<me;Q++)ce[Q]=arguments[Q+2];ie.children=ce}return F(_.type,ne,ie)},ze.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},ze.createElement=function(_,L,Z){var ie,ne={},me=null;if(L!=null)for(ie in L.key!==void 0&&(me=""+L.key),L)O.call(L,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ne[ie]=L[ie]);var ce=arguments.length-2;if(ce===1)ne.children=Z;else if(1<ce){for(var Q=Array(ce),re=0;re<ce;re++)Q[re]=arguments[re+2];ne.children=Q}if(_&&_.defaultProps)for(ie in ce=_.defaultProps,ce)ne[ie]===void 0&&(ne[ie]=ce[ie]);return F(_,me,ne)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(_){return{$$typeof:m,render:_}},ze.isValidElement=fe,ze.lazy=function(_){return{$$typeof:x,_payload:{_status:-1,_result:_},_init:Y}},ze.memo=function(_,L){return{$$typeof:g,type:_,compare:L===void 0?null:L}},ze.startTransition=function(_){var L=H.T,Z={};H.T=Z;try{var ie=_(),ne=H.S;ne!==null&&ne(Z,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(G,V)}catch(me){V(me)}finally{L!==null&&Z.types!==null&&(L.types=Z.types),H.T=L}},ze.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},ze.use=function(_){return H.H.use(_)},ze.useActionState=function(_,L,Z){return H.H.useActionState(_,L,Z)},ze.useCallback=function(_,L){return H.H.useCallback(_,L)},ze.useContext=function(_){return H.H.useContext(_)},ze.useDebugValue=function(){},ze.useDeferredValue=function(_,L){return H.H.useDeferredValue(_,L)},ze.useEffect=function(_,L){return H.H.useEffect(_,L)},ze.useEffectEvent=function(_){return H.H.useEffectEvent(_)},ze.useId=function(){return H.H.useId()},ze.useImperativeHandle=function(_,L,Z){return H.H.useImperativeHandle(_,L,Z)},ze.useInsertionEffect=function(_,L){return H.H.useInsertionEffect(_,L)},ze.useLayoutEffect=function(_,L){return H.H.useLayoutEffect(_,L)},ze.useMemo=function(_,L){return H.H.useMemo(_,L)},ze.useOptimistic=function(_,L){return H.H.useOptimistic(_,L)},ze.useReducer=function(_,L,Z){return H.H.useReducer(_,L,Z)},ze.useRef=function(_){return H.H.useRef(_)},ze.useState=function(_){return H.H.useState(_)},ze.useSyncExternalStore=function(_,L,Z){return H.H.useSyncExternalStore(_,L,Z)},ze.useTransition=function(){return H.H.useTransition()},ze.version="19.2.5",ze}var my;function Ld(){return my||(my=1,Cf.exports=Tw()),Cf.exports}var b=Ld();const he=kd(b),P0=Sw({__proto__:null,default:he},[b]);var Mf={exports:{}},Io={},Af={exports:{}},_f={};/**
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 hy;function Cw(){return hy||(hy=1,(function(n){function l(M,j){var Y=M.length;M.push(j);e:for(;0<Y;){var V=Y-1>>>1,U=M[V];if(0<c(U,j))M[V]=j,M[Y]=U,Y=V;else break e}}function o(M){return M.length===0?null:M[0]}function i(M){if(M.length===0)return null;var j=M[0],Y=M.pop();if(Y!==j){M[0]=Y;e:for(var V=0,U=M.length,_=U>>>1;V<_;){var L=2*(V+1)-1,Z=M[L],ie=L+1,ne=M[ie];if(0>c(Z,Y))ie<U&&0>c(ne,Z)?(M[V]=ne,M[ie]=Y,V=ie):(M[V]=Z,M[L]=Y,V=L);else if(ie<U&&0>c(ne,Y))M[V]=ne,M[ie]=Y,V=ie;else break e}}return j}function c(M,j){var Y=M.sortIndex-j.sortIndex;return Y!==0?Y:M.id-j.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],x=1,p=null,S=3,T=!1,C=!1,E=!1,A=!1,R=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function B(M){for(var j=o(g);j!==null;){if(j.callback===null)i(g);else if(j.startTime<=M)i(g),j.sortIndex=j.expirationTime,l(h,j);else break;j=o(g)}}function te(M){if(E=!1,B(M),!C)if(o(h)!==null)C=!0,G||(G=!0,W());else{var j=o(g);j!==null&&q(te,j.startTime-M)}}var G=!1,H=-1,O=5,F=-1;function ee(){return A?!0:!(n.unstable_now()-F<O)}function fe(){if(A=!1,G){var M=n.unstable_now();F=M;var j=!0;try{e:{C=!1,E&&(E=!1,z(H),H=-1),T=!0;var Y=S;try{t:{for(B(M),p=o(h);p!==null&&!(p.expirationTime>M&&ee());){var V=p.callback;if(typeof V=="function"){p.callback=null,S=p.priorityLevel;var U=V(p.expirationTime<=M);if(M=n.unstable_now(),typeof U=="function"){p.callback=U,B(M),j=!0;break t}p===o(h)&&i(h),B(M)}else i(h);p=o(h)}if(p!==null)j=!0;else{var _=o(g);_!==null&&q(te,_.startTime-M),j=!1}}break e}finally{p=null,S=Y,T=!1}j=void 0}}finally{j?W():G=!1}}}var W;if(typeof N=="function")W=function(){N(fe)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,K=P.port2;P.port1.onmessage=fe,W=function(){K.postMessage(null)}}else W=function(){R(fe,0)};function q(M,j){H=R(function(){M(n.unstable_now())},j)}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(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(M){switch(S){case 1:case 2:case 3:var j=3;break;default:j=S}var Y=S;S=j;try{return M()}finally{S=Y}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,j){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var Y=S;S=M;try{return j()}finally{S=Y}},n.unstable_scheduleCallback=function(M,j,Y){var V=n.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?V+Y:V):Y=V,M){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=Y+U,M={id:x++,callback:j,priorityLevel:M,startTime:Y,expirationTime:U,sortIndex:-1},Y>V?(M.sortIndex=Y,l(g,M),o(h)===null&&M===o(g)&&(E?(z(H),H=-1):E=!0,q(te,Y-V))):(M.sortIndex=U,l(h,M),C||T||(C=!0,G||(G=!0,W()))),M},n.unstable_shouldYield=ee,n.unstable_wrapCallback=function(M){var j=S;return function(){var Y=S;S=j;try{return M.apply(this,arguments)}finally{S=Y}}}})(_f)),_f}var py;function Mw(){return py||(py=1,Af.exports=Cw()),Af.exports}var Rf={exports:{}},qt={};/**
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 gy;function Aw(){if(gy)return qt;gy=1;var n=Ld();function l(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(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 f(h,g,x){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:p==null?null:""+p,children:h,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qt.createPortal=function(h,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return f(h,g,null,x)},qt.flushSync=function(h){var g=d.T,x=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=x,i.d.f()}},qt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},qt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},qt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:S,fetchPriority:T}):x==="script"&&i.d.X(h,{crossOrigin:p,integrity:S,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},qt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);i.d.M(h,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(h)},qt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin);i.d.L(h,x,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},qt.preloadModule=function(h,g){if(typeof h=="string")if(g){var x=m(g.as,g.crossOrigin);i.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(h)},qt.requestFormReset=function(h){i.d.r(h)},qt.unstable_batchedUpdates=function(h,g){return h(g)},qt.useFormState=function(h,g,x){return d.H.useFormState(h,g,x)},qt.useFormStatus=function(){return d.H.useHostTransitionStatus()},qt.version="19.2.5",qt}var yy;function X0(){if(yy)return Rf.exports;yy=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(l){console.error(l)}}return n(),Rf.exports=Aw(),Rf.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 vy;function _w(){if(vy)return Io;vy=1;var n=Mw(),l=Ld(),o=X0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(f(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,r=t;;){var s=a.return;if(s===null)break;var u=s.alternate;if(u===null){if(r=s.return,r!==null){a=r;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===a)return h(s),e;if(u===r)return h(s),t;u=u.sibling}throw Error(i(188))}if(a.return!==r.return)a=s,r=u;else{for(var y=!1,w=s.child;w;){if(w===a){y=!0,a=s,r=u;break}if(w===r){y=!0,r=s,a=u;break}w=w.sibling}if(!y){for(w=u.child;w;){if(w===a){y=!0,a=u,r=s;break}if(w===r){y=!0,r=u,a=s;break}w=w.sibling}if(!y)throw Error(i(189))}}if(a.alternate!==r)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,S=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),N=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var P=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case R:return"Profiler";case A:return"StrictMode";case te:return"Suspense";case G:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case N:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case B:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var q=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},V=[],U=-1;function _(e){return{current:e}}function L(e){0>U||(e.current=V[U],V[U]=null,U--)}function Z(e,t){U++,V[U]=e.current,e.current=t}var ie=_(null),ne=_(null),me=_(null),ce=_(null);function Q(e,t){switch(Z(me,t),Z(ne,e),Z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dg(t),e=jg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ie),Z(ie,e)}function re(){L(ie),L(ne),L(me)}function be(e){e.memoizedState!==null&&Z(ce,e);var t=ie.current,a=jg(t,e.type);t!==a&&(Z(ne,e),Z(ie,a))}function Me(e){ne.current===e&&(L(ie),L(ne)),ce.current===e&&(L(ce),ko._currentValue=Y)}var Ae,$e;function Ge(e){if(Ae===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||"",$e=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ae+e+$e}var Yt=!1;function wt(e,t){if(!e||Yt)return"";Yt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var J=ae}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ae){J=ae}e.call(ue.prototype)}}else{try{throw Error()}catch(ae){J=ae}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&J&&typeof ae.stack=="string")return[ae.stack,J.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=r.DetermineComponentFrameRoot(),y=u[0],w=u[1];if(y&&w){var D=y.split(`
44
+ `),$=w.split(`
45
+ `);for(s=r=0;r<D.length&&!D[r].includes("DetermineComponentFrameRoot");)r++;for(;s<$.length&&!$[s].includes("DetermineComponentFrameRoot");)s++;if(r===D.length||s===$.length)for(r=D.length-1,s=$.length-1;1<=r&&0<=s&&D[r]!==$[s];)s--;for(;1<=r&&0<=s;r--,s--)if(D[r]!==$[s]){if(r!==1||s!==1)do if(r--,s--,0>s||D[r]!==$[s]){var oe=`
46
+ `+D[r].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=r&&0<=s);break}}}finally{Yt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ge(a):""}function Ot(e,t){switch(e.tag){case 26:case 27:case 5:return Ge(e.type);case 16:return Ge("Lazy");case 13:return e.child!==t&&t!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return wt(e.type,!1);case 11:return wt(e.type.render,!1);case 1:return wt(e.type,!0);case 31:return Ge("Activity");default:return""}}function De(e){try{var t="",a=null;do t+=Ot(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var ye=Object.prototype.hasOwnProperty,rn=n.unstable_scheduleCallback,on=n.unstable_cancelCallback,et=n.unstable_shouldYield,Lt=n.unstable_requestPaint,_t=n.unstable_now,bn=n.unstable_getCurrentPriorityLevel,zt=n.unstable_ImmediatePriority,_a=n.unstable_UserBlockingPriority,Ft=n.unstable_NormalPriority,qn=n.unstable_LowPriority,Qt=n.unstable_IdlePriority,jn=n.log,Vt=n.unstable_setDisableYieldValue,na=null,Ht=null;function sn(e){if(typeof jn=="function"&&Vt(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(na,e)}catch{}}var Dt=Math.clz32?Math.clz32:xn,Fr=Math.log,pl=Math.LN2;function xn(e){return e>>>=0,e===0?32:31-(Fr(e)/pl|0)|0}var Ra=256,aa=262144,la=4194304;function Sn(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 Re(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var s=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~u,r!==0?s=Sn(r):(y&=w,y!==0?s=Sn(y):a||(a=w&~e,a!==0&&(s=Sn(a))))):(w=r&~u,w!==0?s=Sn(w):y!==0?s=Sn(y):a||(a=r&~e,a!==0&&(s=Sn(a)))),s===0?0:t!==0&&t!==s&&(t&u)===0&&(u=s&-s,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:s}function ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function le(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 de(){var e=la;return la<<=1,(la&62914560)===0&&(la=4194304),e}function pe(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,a,r,s,u){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,D=e.expirationTimes,$=e.hiddenUpdates;for(a=y&~a;0<a;){var oe=31-Dt(a),ue=1<<oe;w[oe]=0,D[oe]=-1;var J=$[oe];if(J!==null)for($[oe]=null,oe=0;oe<J.length;oe++){var ae=J[oe];ae!==null&&(ae.lane&=-536870913)}a&=~ue}r!==0&&ke(e,r,0),u!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function ke(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Dt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function Be(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Dt(a),s=1<<r;s&t|e[r]&t&&(e[r]|=t),a&=~s}}function Ye(e,t){var a=t&-t;return a=(a&42)!==0?1:at(a),(a&(e.suspendedLanes|t))!==0?0:a}function at(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 mt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function lt(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:ay(e.type))}function $t(e,t){var a=j.p;try{return j.p=e,t()}finally{j.p=a}}var Et=Math.random().toString(36).slice(2),Pe="__reactFiber$"+Et,gt="__reactProps$"+Et,pt="__reactContainer$"+Et,kn="__reactEvents$"+Et,Na="__reactListeners$"+Et,pc="__reactHandles$"+Et,$l="__reactResources$"+Et,Pn="__reactMarker$"+Et;function gl(e){delete e[Pe],delete e[gt],delete e[kn],delete e[Na],delete e[pc]}function Oa(e){var t=e[Pe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pt]||a[Pe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Gg(e);e!==null;){if(a=e[Pe])return a;e=Gg(e)}return t}e=a,a=e.parentNode}return null}function Kl(e){if(e=e[Pe]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Qr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Fl(e){var t=e[$l];return t||(t=e[$l]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[Pn]=!0}var Sm=new Set,wm={};function yl(e,t){Ql(e,t),Ql(e+"Capture",t)}function Ql(e,t){for(wm[e]=t,e=0;e<t.length;e++)Sm.add(t[e])}var d1=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]*$"),Em={},Tm={};function m1(e){return ye.call(Tm,e)?!0:ye.call(Em,e)?!1:d1.test(e)?Tm[e]=!0:(Em[e]=!0,!1)}function ai(e,t,a){if(m1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function li(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ra(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function wn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(y){a=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gc(e){if(!e._valueTracker){var t=Cm(e)?"checked":"value";e._valueTracker=h1(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Cm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function ri(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 p1=/[\n"\\]/g;function En(e){return e.replace(p1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yc(e,t,a,r,s,u,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wn(t)):e.value!==""+wn(t)&&(e.value=""+wn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?vc(e,y,wn(t)):a!=null?vc(e,y,wn(a)):r!=null&&e.removeAttribute("value"),s==null&&u!=null&&(e.defaultChecked=!!u),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+wn(w):e.removeAttribute("name")}function Am(e,t,a,r,s,u,y,w){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){gc(e);return}a=a!=null?""+wn(a):"",t=t!=null?""+wn(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??s,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),gc(e)}function vc(e,t,a){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Zl(e,t,a,r){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&r&&(e[a].defaultSelected=!0)}else{for(a=""+wn(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function _m(e,t,a){if(t!=null&&(t=""+wn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wn(a):""}function Rm(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(i(92));if(q(r)){if(1<r.length)throw Error(i(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=wn(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),gc(e)}function Jl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var g1=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 Nm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||g1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Om(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var s in t)r=t[s],t.hasOwnProperty(s)&&a[s]!==r&&Nm(e,s,r)}else for(var u in t)t.hasOwnProperty(u)&&Nm(e,u,t[u])}function bc(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 y1=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"]]),v1=/^[\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 oi(e){return v1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function oa(){}var xc=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,er=null;function zm(e){var t=Kl(e);if(t&&(e=t.stateNode)){var a=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(yc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+En(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var s=r[gt]||null;if(!s)throw Error(i(90));yc(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&Mm(r)}break e;case"textarea":_m(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Zl(e,!!a.multiple,t,!1)}}}var wc=!1;function Dm(e,t,a){if(wc)return e(t,a);wc=!0;try{var r=e(t);return r}finally{if(wc=!1,(Wl!==null||er!==null)&&($i(),Wl&&(t=Wl,e=er,er=Wl=null,zm(t),e)))for(t=0;t<e.length;t++)zm(e[t])}}function Zr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[gt]||null;if(r===null)return null;a=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ec=!1;if(ia)try{var Jr={};Object.defineProperty(Jr,"passive",{get:function(){Ec=!0}}),window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{Ec=!1}var za=null,Tc=null,ii=null;function jm(){if(ii)return ii;var e,t=Tc,a=t.length,r,s="value"in za?za.value:za.textContent,u=s.length;for(e=0;e<a&&t[e]===s[e];e++);var y=a-e;for(r=1;r<=y&&t[a-r]===s[u-r];r++);return ii=s.slice(e,1<r?1-r:void 0)}function si(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 ci(){return!0}function km(){return!1}function Zt(e){function t(a,r,s,u,y){this._reactName=a,this._targetInst=s,this.type=r,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(u):u[w]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ci:km,this.isPropagationStopped=km,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ci)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ci)},persist:function(){},isPersistent:ci}),t}var vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ui=Zt(vl),Wr=p({},vl,{view:0,detail:0}),b1=Zt(Wr),Cc,Mc,eo,fi=p({},Wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_c,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!==eo&&(eo&&e.type==="mousemove"?(Cc=e.screenX-eo.screenX,Mc=e.screenY-eo.screenY):Mc=Cc=0,eo=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),Lm=Zt(fi),x1=p({},fi,{dataTransfer:0}),S1=Zt(x1),w1=p({},Wr,{relatedTarget:0}),Ac=Zt(w1),E1=p({},vl,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=Zt(E1),C1=p({},vl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),M1=Zt(C1),A1=p({},vl,{data:0}),Hm=Zt(A1),_1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N1[e])?!!t[e]:!1}function _c(){return O1}var z1=p({},Wr,{key:function(e){if(e.key){var t=_1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_c,charCode:function(e){return e.type==="keypress"?si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D1=Zt(z1),j1=p({},fi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bm=Zt(j1),k1=p({},Wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_c}),L1=Zt(k1),H1=p({},vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),B1=Zt(H1),U1=p({},fi,{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}),I1=Zt(U1),G1=p({},vl,{newState:0,oldState:0}),Y1=Zt(G1),V1=[9,13,27,32],Rc=ia&&"CompositionEvent"in window,to=null;ia&&"documentMode"in document&&(to=document.documentMode);var q1=ia&&"TextEvent"in window&&!to,Um=ia&&(!Rc||to&&8<to&&11>=to),Im=" ",Gm=!1;function Ym(e,t){switch(e){case"keyup":return V1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tr=!1;function P1(e,t){switch(e){case"compositionend":return Vm(t);case"keypress":return t.which!==32?null:(Gm=!0,Im);case"textInput":return e=t.data,e===Im&&Gm?null:e;default:return null}}function X1(e,t){if(tr)return e==="compositionend"||!Rc&&Ym(e,t)?(e=jm(),ii=Tc=za=null,tr=!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 Um&&t.locale!=="ko"?null:t.data;default:return null}}var $1={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 qm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$1[e.type]:t==="textarea"}function Pm(e,t,a,r){Wl?er?er.push(r):er=[r]:Wl=r,t=es(t,"onChange"),0<t.length&&(a=new ui("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var no=null,ao=null;function K1(e){Ag(e,0)}function di(e){var t=Qr(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var $m=!1;if(ia){var Nc;if(ia){var Oc="oninput"in document;if(!Oc){var Km=document.createElement("div");Km.setAttribute("oninput","return;"),Oc=typeof Km.oninput=="function"}Nc=Oc}else Nc=!1;$m=Nc&&(!document.documentMode||9<document.documentMode)}function Fm(){no&&(no.detachEvent("onpropertychange",Qm),ao=no=null)}function Qm(e){if(e.propertyName==="value"&&di(ao)){var t=[];Pm(t,ao,e,Sc(e)),Dm(K1,t)}}function F1(e,t,a){e==="focusin"?(Fm(),no=t,ao=a,no.attachEvent("onpropertychange",Qm)):e==="focusout"&&Fm()}function Q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return di(ao)}function Z1(e,t){if(e==="click")return di(t)}function J1(e,t){if(e==="input"||e==="change")return di(t)}function W1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:W1;function lo(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var s=a[r];if(!ye.call(t,s)||!cn(e[s],t[s]))return!1}return!0}function Zm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jm(e,t){var a=Zm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zm(a)}}function Wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ri(e.document)}return t}function zc(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 eS=ia&&"documentMode"in document&&11>=document.documentMode,nr=null,Dc=null,ro=null,jc=!1;function th(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jc||nr==null||nr!==ri(r)||(r=nr,"selectionStart"in r&&zc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ro&&lo(ro,r)||(ro=r,r=es(Dc,"onSelect"),0<r.length&&(t=new ui("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=nr)))}function bl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ar={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionrun:bl("Transition","TransitionRun"),transitionstart:bl("Transition","TransitionStart"),transitioncancel:bl("Transition","TransitionCancel"),transitionend:bl("Transition","TransitionEnd")},kc={},nh={};ia&&(nh=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function xl(e){if(kc[e])return kc[e];if(!ar[e])return e;var t=ar[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in nh)return kc[e]=t[a];return e}var ah=xl("animationend"),lh=xl("animationiteration"),rh=xl("animationstart"),tS=xl("transitionrun"),nS=xl("transitionstart"),aS=xl("transitioncancel"),oh=xl("transitionend"),ih=new Map,Lc="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(" ");Lc.push("scrollEnd");function Ln(e,t){ih.set(e,t),yl(t,[e])}var mi=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)},Tn=[],lr=0,Hc=0;function hi(){for(var e=lr,t=Hc=lr=0;t<e;){var a=Tn[t];Tn[t++]=null;var r=Tn[t];Tn[t++]=null;var s=Tn[t];Tn[t++]=null;var u=Tn[t];if(Tn[t++]=null,r!==null&&s!==null){var y=r.pending;y===null?s.next=s:(s.next=y.next,y.next=s),r.pending=s}u!==0&&sh(a,s,u)}}function pi(e,t,a,r){Tn[lr++]=e,Tn[lr++]=t,Tn[lr++]=a,Tn[lr++]=r,Hc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Bc(e,t,a,r){return pi(e,t,a,r),gi(e)}function Sl(e,t){return pi(e,null,null,t),gi(e)}function sh(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var s=!1,u=e.return;u!==null;)u.childLanes|=a,r=u.alternate,r!==null&&(r.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(s=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,s&&t!==null&&(s=31-Dt(a),e=u.hiddenUpdates,r=e[s],r===null?e[s]=[t]:r.push(t),t.lane=a|536870912),u):null}function gi(e){if(50<_o)throw _o=0,$u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var rr={};function lS(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,a,r){return new lS(e,t,a,r)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var a=e.alternate;return a===null?(a=un(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ch(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yi(e,t,a,r,s,u){var y=0;if(r=e,typeof e=="function")Uc(e)&&(y=1);else if(typeof e=="string")y=cw(e,a,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=un(31,a,t,s),e.elementType=F,e.lanes=u,e;case E:return wl(a.children,s,u,t);case A:y=8,s|=24;break;case R:return e=un(12,a,t,s|2),e.elementType=R,e.lanes=u,e;case te:return e=un(13,a,t,s),e.elementType=te,e.lanes=u,e;case G:return e=un(19,a,t,s),e.elementType=G,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:y=10;break e;case z:y=9;break e;case B:y=11;break e;case H:y=14;break e;case O:y=16,r=null;break e}y=29,a=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=un(y,a,t,s),t.elementType=e,t.type=r,t.lanes=u,t}function wl(e,t,a,r){return e=un(7,e,r,t),e.lanes=a,e}function Ic(e,t,a){return e=un(6,e,null,t),e.lanes=a,e}function uh(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Gc(e,t,a){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fh=new WeakMap;function Cn(e,t){if(typeof e=="object"&&e!==null){var a=fh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:De(t)},fh.set(e,t),t)}return{value:e,source:t,stack:De(t)}}var or=[],ir=0,vi=null,oo=0,Mn=[],An=0,Da=null,Xn=1,$n="";function ca(e,t){or[ir++]=oo,or[ir++]=vi,vi=e,oo=t}function dh(e,t,a){Mn[An++]=Xn,Mn[An++]=$n,Mn[An++]=Da,Da=e;var r=Xn;e=$n;var s=32-Dt(r)-1;r&=~(1<<s),a+=1;var u=32-Dt(t)+s;if(30<u){var y=s-s%5;u=(r&(1<<y)-1).toString(32),r>>=y,s-=y,Xn=1<<32-Dt(t)+s|a<<s|r,$n=u+e}else Xn=1<<u|a<<s|r,$n=e}function Yc(e){e.return!==null&&(ca(e,1),dh(e,1,0))}function Vc(e){for(;e===vi;)vi=or[--ir],or[ir]=null,oo=or[--ir],or[ir]=null;for(;e===Da;)Da=Mn[--An],Mn[An]=null,$n=Mn[--An],Mn[An]=null,Xn=Mn[--An],Mn[An]=null}function mh(e,t){Mn[An++]=Xn,Mn[An++]=$n,Mn[An++]=Da,Xn=t.id,$n=t.overflow,Da=e}var Bt=null,ft=null,Xe=!1,ja=null,_n=!1,qc=Error(i(519));function ka(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw io(Cn(t,e)),qc}function hh(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[Pe]=e,t[gt]=r,a){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(a=0;a<No.length;a++)Ie(No[a],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),Am(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Rm(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||Og(t.textContent,a)?(r.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),r.onScroll!=null&&Ie("scroll",t),r.onScrollEnd!=null&&Ie("scrollend",t),r.onClick!=null&&(t.onclick=oa),t=!0):t=!1,t||ka(e,!0)}function ph(e){for(Bt=e.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Bt=Bt.return}}function sr(e){if(e!==Bt)return!1;if(!Xe)return ph(e),Xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cf(e.type,e.memoizedProps)),a=!a),a&&ft&&ka(e),ph(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=Ig(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=Ig(e)}else t===27?(t=ft,Fa(e.type)?(e=hf,hf=null,ft=e):ft=t):ft=Bt?Nn(e.stateNode.nextSibling):null;return!0}function El(){ft=Bt=null,Xe=!1}function Pc(){var e=ja;return e!==null&&(tn===null?tn=e:tn.push.apply(tn,e),ja=null),e}function io(e){ja===null?ja=[e]:ja.push(e)}var Xc=_(null),Tl=null,ua=null;function La(e,t,a){Z(Xc,t._currentValue),t._currentValue=a}function fa(e){e._currentValue=Xc.current,L(Xc)}function $c(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Kc(e,t,a,r){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){var y=s.child;u=u.firstContext;e:for(;u!==null;){var w=u;u=s;for(var D=0;D<t.length;D++)if(w.context===t[D]){u.lanes|=a,w=u.alternate,w!==null&&(w.lanes|=a),$c(u.return,a,e),r||(y=null);break e}u=w.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(i(341));y.lanes|=a,u=y.alternate,u!==null&&(u.lanes|=a),$c(y,a,e),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===e){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function cr(e,t,a,r){e=null;for(var s=t,u=!1;s!==null;){if(!u){if((s.flags&524288)!==0)u=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var w=s.type;cn(s.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(s===ce.current){if(y=s.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}s=s.return}e!==null&&Kc(t,e,a,r),t.flags|=262144}function bi(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cl(e){Tl=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return gh(Tl,e)}function xi(e,t){return Tl===null&&Cl(e),gh(e,t)}function gh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ua===null){if(e===null)throw Error(i(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return a}var rS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},oS=n.unstable_scheduleCallback,iS=n.unstable_NormalPriority,Tt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fc(){return{controller:new rS,data:new Map,refCount:0}}function so(e){e.refCount--,e.refCount===0&&oS(iS,function(){e.controller.abort()})}var co=null,Qc=0,ur=0,fr=null;function sS(e,t){if(co===null){var a=co=[];Qc=0,ur=Wu(),fr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Qc++,t.then(yh,yh),t}function yh(){if(--Qc===0&&co!==null){fr!==null&&(fr.status="fulfilled");var e=co;co=null,ur=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(r.status="rejected",r.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),r}var vh=M.S;M.S=function(e,t){tg=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sS(e,t),vh!==null&&vh(e,t)};var Ml=_(null);function Zc(){var e=Ml.current;return e!==null?e:st.pooledCache}function Si(e,t){t===null?Z(Ml,Ml.current):Z(Ml,t.pool)}function bh(){var e=Zc();return e===null?null:{parent:Tt._currentValue,pool:e}}var dr=Error(i(460)),Jc=Error(i(474)),wi=Error(i(542)),Ei={then:function(){}};function xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(oa,oa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e;default:if(typeof t.status=="string")t.then(oa,oa);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=r}},function(r){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e}throw _l=t,dr}}function Al(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_l=a,dr):a}}var _l=null;function wh(){if(_l===null)throw Error(i(459));var e=_l;return _l=null,e}function Eh(e){if(e===dr||e===wi)throw Error(i(483))}var mr=null,uo=0;function Ti(e){var t=uo;return uo+=1,mr===null&&(mr=[]),Sh(mr,e,t)}function fo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ci(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 Th(e){function t(I,k){if(e){var X=I.deletions;X===null?(I.deletions=[k],I.flags|=16):X.push(k)}}function a(I,k){if(!e)return null;for(;k!==null;)t(I,k),k=k.sibling;return null}function r(I){for(var k=new Map;I!==null;)I.key!==null?k.set(I.key,I):k.set(I.index,I),I=I.sibling;return k}function s(I,k){return I=sa(I,k),I.index=0,I.sibling=null,I}function u(I,k,X){return I.index=X,e?(X=I.alternate,X!==null?(X=X.index,X<k?(I.flags|=67108866,k):X):(I.flags|=67108866,k)):(I.flags|=1048576,k)}function y(I){return e&&I.alternate===null&&(I.flags|=67108866),I}function w(I,k,X,se){return k===null||k.tag!==6?(k=Ic(X,I.mode,se),k.return=I,k):(k=s(k,X),k.return=I,k)}function D(I,k,X,se){var Ce=X.type;return Ce===E?oe(I,k,X.props.children,se,X.key):k!==null&&(k.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===O&&Al(Ce)===k.type)?(k=s(k,X.props),fo(k,X),k.return=I,k):(k=yi(X.type,X.key,X.props,null,I.mode,se),fo(k,X),k.return=I,k)}function $(I,k,X,se){return k===null||k.tag!==4||k.stateNode.containerInfo!==X.containerInfo||k.stateNode.implementation!==X.implementation?(k=Gc(X,I.mode,se),k.return=I,k):(k=s(k,X.children||[]),k.return=I,k)}function oe(I,k,X,se,Ce){return k===null||k.tag!==7?(k=wl(X,I.mode,se,Ce),k.return=I,k):(k=s(k,X),k.return=I,k)}function ue(I,k,X){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ic(""+k,I.mode,X),k.return=I,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return X=yi(k.type,k.key,k.props,null,I.mode,X),fo(X,k),X.return=I,X;case C:return k=Gc(k,I.mode,X),k.return=I,k;case O:return k=Al(k),ue(I,k,X)}if(q(k)||W(k))return k=wl(k,I.mode,X,null),k.return=I,k;if(typeof k.then=="function")return ue(I,Ti(k),X);if(k.$$typeof===N)return ue(I,xi(I,k),X);Ci(I,k)}return null}function J(I,k,X,se){var Ce=k!==null?k.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ce!==null?null:w(I,k,""+X,se);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case T:return X.key===Ce?D(I,k,X,se):null;case C:return X.key===Ce?$(I,k,X,se):null;case O:return X=Al(X),J(I,k,X,se)}if(q(X)||W(X))return Ce!==null?null:oe(I,k,X,se,null);if(typeof X.then=="function")return J(I,k,Ti(X),se);if(X.$$typeof===N)return J(I,k,xi(I,X),se);Ci(I,X)}return null}function ae(I,k,X,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return I=I.get(X)||null,w(k,I,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case T:return I=I.get(se.key===null?X:se.key)||null,D(k,I,se,Ce);case C:return I=I.get(se.key===null?X:se.key)||null,$(k,I,se,Ce);case O:return se=Al(se),ae(I,k,X,se,Ce)}if(q(se)||W(se))return I=I.get(X)||null,oe(k,I,se,Ce,null);if(typeof se.then=="function")return ae(I,k,X,Ti(se),Ce);if(se.$$typeof===N)return ae(I,k,X,xi(k,se),Ce);Ci(k,se)}return null}function ve(I,k,X,se){for(var Ce=null,Fe=null,we=k,Le=k=0,qe=null;we!==null&&Le<X.length;Le++){we.index>Le?(qe=we,we=null):qe=we.sibling;var Qe=J(I,we,X[Le],se);if(Qe===null){we===null&&(we=qe);break}e&&we&&Qe.alternate===null&&t(I,we),k=u(Qe,k,Le),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe,we=qe}if(Le===X.length)return a(I,we),Xe&&ca(I,Le),Ce;if(we===null){for(;Le<X.length;Le++)we=ue(I,X[Le],se),we!==null&&(k=u(we,k,Le),Fe===null?Ce=we:Fe.sibling=we,Fe=we);return Xe&&ca(I,Le),Ce}for(we=r(we);Le<X.length;Le++)qe=ae(we,I,Le,X[Le],se),qe!==null&&(e&&qe.alternate!==null&&we.delete(qe.key===null?Le:qe.key),k=u(qe,k,Le),Fe===null?Ce=qe:Fe.sibling=qe,Fe=qe);return e&&we.forEach(function(el){return t(I,el)}),Xe&&ca(I,Le),Ce}function _e(I,k,X,se){if(X==null)throw Error(i(151));for(var Ce=null,Fe=null,we=k,Le=k=0,qe=null,Qe=X.next();we!==null&&!Qe.done;Le++,Qe=X.next()){we.index>Le?(qe=we,we=null):qe=we.sibling;var el=J(I,we,Qe.value,se);if(el===null){we===null&&(we=qe);break}e&&we&&el.alternate===null&&t(I,we),k=u(el,k,Le),Fe===null?Ce=el:Fe.sibling=el,Fe=el,we=qe}if(Qe.done)return a(I,we),Xe&&ca(I,Le),Ce;if(we===null){for(;!Qe.done;Le++,Qe=X.next())Qe=ue(I,Qe.value,se),Qe!==null&&(k=u(Qe,k,Le),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe);return Xe&&ca(I,Le),Ce}for(we=r(we);!Qe.done;Le++,Qe=X.next())Qe=ae(we,I,Le,Qe.value,se),Qe!==null&&(e&&Qe.alternate!==null&&we.delete(Qe.key===null?Le:Qe.key),k=u(Qe,k,Le),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe);return e&&we.forEach(function(xw){return t(I,xw)}),Xe&&ca(I,Le),Ce}function it(I,k,X,se){if(typeof X=="object"&&X!==null&&X.type===E&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case T:e:{for(var Ce=X.key;k!==null;){if(k.key===Ce){if(Ce=X.type,Ce===E){if(k.tag===7){a(I,k.sibling),se=s(k,X.props.children),se.return=I,I=se;break e}}else if(k.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===O&&Al(Ce)===k.type){a(I,k.sibling),se=s(k,X.props),fo(se,X),se.return=I,I=se;break e}a(I,k);break}else t(I,k);k=k.sibling}X.type===E?(se=wl(X.props.children,I.mode,se,X.key),se.return=I,I=se):(se=yi(X.type,X.key,X.props,null,I.mode,se),fo(se,X),se.return=I,I=se)}return y(I);case C:e:{for(Ce=X.key;k!==null;){if(k.key===Ce)if(k.tag===4&&k.stateNode.containerInfo===X.containerInfo&&k.stateNode.implementation===X.implementation){a(I,k.sibling),se=s(k,X.children||[]),se.return=I,I=se;break e}else{a(I,k);break}else t(I,k);k=k.sibling}se=Gc(X,I.mode,se),se.return=I,I=se}return y(I);case O:return X=Al(X),it(I,k,X,se)}if(q(X))return ve(I,k,X,se);if(W(X)){if(Ce=W(X),typeof Ce!="function")throw Error(i(150));return X=Ce.call(X),_e(I,k,X,se)}if(typeof X.then=="function")return it(I,k,Ti(X),se);if(X.$$typeof===N)return it(I,k,xi(I,X),se);Ci(I,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,k!==null&&k.tag===6?(a(I,k.sibling),se=s(k,X),se.return=I,I=se):(a(I,k),se=Ic(X,I.mode,se),se.return=I,I=se),y(I)):a(I,k)}return function(I,k,X,se){try{uo=0;var Ce=it(I,k,X,se);return mr=null,Ce}catch(we){if(we===dr||we===wi)throw we;var Fe=un(29,we,null,I.mode);return Fe.lanes=se,Fe.return=I,Fe}finally{}}}var Rl=Th(!0),Ch=Th(!1),Ha=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eu(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Je&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,t=gi(e),sh(e,null,a),t}return pi(e,r,t,a),gi(e)}function mo(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,Be(e,a)}}function tu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var s=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?s=u=y:u=u.next=y,a=a.next}while(a!==null);u===null?s=u=t:u=u.next=t}else s=u=t;a={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nu=!1;function ho(){if(nu){var e=fr;if(e!==null)throw e}}function po(e,t,a,r){nu=!1;var s=e.updateQueue;Ha=!1;var u=s.firstBaseUpdate,y=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var D=w,$=D.next;D.next=null,y===null?u=$:y.next=$,y=D;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,w=oe.lastBaseUpdate,w!==y&&(w===null?oe.firstBaseUpdate=$:w.next=$,oe.lastBaseUpdate=D))}if(u!==null){var ue=s.baseState;y=0,oe=$=D=null,w=u;do{var J=w.lane&-536870913,ae=J!==w.lane;if(ae?(Ve&J)===J:(r&J)===J){J!==0&&J===ur&&(nu=!0),oe!==null&&(oe=oe.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ve=e,_e=w;J=t;var it=a;switch(_e.tag){case 1:if(ve=_e.payload,typeof ve=="function"){ue=ve.call(it,ue,J);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=_e.payload,J=typeof ve=="function"?ve.call(it,ue,J):ve,J==null)break e;ue=p({},ue,J);break e;case 2:Ha=!0}}J=w.callback,J!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=s.callbacks,ae===null?s.callbacks=[J]:ae.push(J))}else ae={lane:J,tag:w.tag,payload:w.payload,callback:w.callback,next:null},oe===null?($=oe=ae,D=ue):oe=oe.next=ae,y|=J;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;ae=w,w=ae.next,ae.next=null,s.lastBaseUpdate=ae,s.shared.pending=null}}while(!0);oe===null&&(D=ue),s.baseState=D,s.firstBaseUpdate=$,s.lastBaseUpdate=oe,u===null&&(s.shared.lanes=0),qa|=y,e.lanes=y,e.memoizedState=ue}}function Mh(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Ah(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mh(a[e],t)}var hr=_(null),Mi=_(0);function _h(e,t){e=xa,Z(Mi,e),Z(hr,t),xa=e|t.baseLanes}function au(){Z(Mi,xa),Z(hr,hr.current)}function lu(){xa=Mi.current,L(hr),L(Mi)}var fn=_(null),Rn=null;function Ia(e){var t=e.alternate;Z(bt,bt.current&1),Z(fn,e),Rn===null&&(t===null||hr.current!==null||t.memoizedState!==null)&&(Rn=e)}function ru(e){Z(bt,bt.current),Z(fn,e),Rn===null&&(Rn=e)}function Rh(e){e.tag===22?(Z(bt,bt.current),Z(fn,e),Rn===null&&(Rn=e)):Ga()}function Ga(){Z(bt,bt.current),Z(fn,fn.current)}function dn(e){L(fn),Rn===e&&(Rn=null),L(bt)}var bt=_(0);function Ai(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||df(a)||mf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var da=0,je=null,rt=null,Ct=null,_i=!1,pr=!1,Nl=!1,Ri=0,go=0,gr=null,uS=0;function yt(){throw Error(i(321))}function ou(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!cn(e[a],t[a]))return!1;return!0}function iu(e,t,a,r,s,u){return da=u,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?dp:wu,Nl=!1,u=a(r,s),Nl=!1,pr&&(u=Oh(t,a,r,s)),Nh(e),u}function Nh(e){M.H=bo;var t=rt!==null&&rt.next!==null;if(da=0,Ct=rt=je=null,_i=!1,go=0,gr=null,t)throw Error(i(300));e===null||Mt||(e=e.dependencies,e!==null&&bi(e)&&(Mt=!0))}function Oh(e,t,a,r){je=e;var s=0;do{if(pr&&(gr=null),go=0,pr=!1,25<=s)throw Error(i(301));if(s+=1,Ct=rt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=mp,u=t(a,r)}while(pr);return u}function fS(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?yo(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(je.flags|=1024),t}function su(){var e=Ri!==0;return Ri=0,e}function cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function uu(e){if(_i){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_i=!1}da=0,Ct=rt=je=null,pr=!1,go=Ri=0,gr=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?je.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function xt(){if(rt===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Ct===null?je.memoizedState:Ct.next;if(t!==null)Ct=t,rt=e;else{if(e===null)throw je.alternate===null?Error(i(467)):Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ct===null?je.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Ni(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yo(e){var t=go;return go+=1,gr===null&&(gr=[]),e=Sh(gr,e,t),t=je,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?dp:wu),e}function Oi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yo(e);if(e.$$typeof===N)return Ut(e)}throw Error(i(438,String(e)))}function fu(e){var t=null,a=je.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=je.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ni(),je.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=ee;return t.index++,a}function ma(e,t){return typeof t=="function"?t(e):t}function zi(e){var t=xt();return du(t,rt,e)}function du(e,t,a){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=a;var s=e.baseQueue,u=r.pending;if(u!==null){if(s!==null){var y=s.next;s.next=u.next,u.next=y}t.baseQueue=s=u,r.pending=null}if(u=e.baseState,s===null)e.memoizedState=u;else{t=s.next;var w=y=null,D=null,$=t,oe=!1;do{var ue=$.lane&-536870913;if(ue!==$.lane?(Ve&ue)===ue:(da&ue)===ue){var J=$.revertLane;if(J===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),ue===ur&&(oe=!0);else if((da&J)===J){$=$.next,J===ur&&(oe=!0);continue}else ue={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},D===null?(w=D=ue,y=u):D=D.next=ue,je.lanes|=J,qa|=J;ue=$.action,Nl&&a(u,ue),u=$.hasEagerState?$.eagerState:a(u,ue)}else J={lane:ue,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},D===null?(w=D=J,y=u):D=D.next=J,je.lanes|=ue,qa|=ue;$=$.next}while($!==null&&$!==t);if(D===null?y=u:D.next=w,!cn(u,e.memoizedState)&&(Mt=!0,oe&&(a=fr,a!==null)))throw a;e.memoizedState=u,e.baseState=y,e.baseQueue=D,r.lastRenderedState=u}return s===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function mu(e){var t=xt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var r=a.dispatch,s=a.pending,u=t.memoizedState;if(s!==null){a.pending=null;var y=s=s.next;do u=e(u,y.action),y=y.next;while(y!==s);cn(u,t.memoizedState)||(Mt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,r]}function zh(e,t,a){var r=je,s=xt(),u=Xe;if(u){if(a===void 0)throw Error(i(407));a=a()}else a=t();var y=!cn((rt||s).memoizedState,a);if(y&&(s.memoizedState=a,Mt=!0),s=s.queue,gu(kh.bind(null,r,s,e),[e]),s.getSnapshot!==t||y||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,yr(9,{destroy:void 0},jh.bind(null,r,s,a,t),null),st===null)throw Error(i(349));u||(da&127)!==0||Dh(r,t,a)}return a}function Dh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=je.updateQueue,t===null?(t=Ni(),je.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jh(e,t,a,r){t.value=a,t.getSnapshot=r,Lh(t)&&Hh(e)}function kh(e,t,a){return a(function(){Lh(t)&&Hh(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!cn(e,a)}catch{return!0}}function Hh(e){var t=Sl(e,2);t!==null&&nn(t,e,2)}function hu(e){var t=Kt();if(typeof e=="function"){var a=e;if(e=a(),Nl){sn(!0);try{a()}finally{sn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Bh(e,t,a,r){return e.baseState=a,du(e,rt,typeof r=="function"?r:ma)}function dS(e,t,a,r,s){if(ki(e))throw Error(i(485));if(e=t.action,e!==null){var u={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};M.T!==null?a(!0):u.isTransition=!1,r(u),a=t.pending,a===null?(u.next=t.pending=u,Uh(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Uh(e,t){var a=t.action,r=t.payload,s=e.state;if(t.isTransition){var u=M.T,y={};M.T=y;try{var w=a(s,r),D=M.S;D!==null&&D(y,w),Ih(e,t,w)}catch($){pu(e,t,$)}finally{u!==null&&y.types!==null&&(u.types=y.types),M.T=u}}else try{u=a(s,r),Ih(e,t,u)}catch($){pu(e,t,$)}}function Ih(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Gh(e,t,r)},function(r){return pu(e,t,r)}):Gh(e,t,a)}function Gh(e,t,a){t.status="fulfilled",t.value=a,Yh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Uh(e,a)))}function pu(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Yh(t),t=t.next;while(t!==r)}e.action=null}function Yh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vh(e,t){return t}function qh(e,t){if(Xe){var a=st.formState;if(a!==null){e:{var r=je;if(Xe){if(ft){t:{for(var s=ft,u=_n;s.nodeType!==8;){if(!u){s=null;break t}if(s=Nn(s.nextSibling),s===null){s=null;break t}}u=s.data,s=u==="F!"||u==="F"?s:null}if(s){ft=Nn(s.nextSibling),r=s.data==="F!";break e}}ka(r)}r=!1}r&&(t=a[0])}}return a=Kt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:t},a.queue=r,a=cp.bind(null,je,r),r.dispatch=a,r=hu(!1),u=Su.bind(null,je,!1,r.queue),r=Kt(),s={state:t,dispatch:null,action:e,pending:null},r.queue=s,a=dS.bind(null,je,s,u,a),s.dispatch=a,r.memoizedState=e,[t,a,!1]}function Ph(e){var t=xt();return Xh(t,rt,e)}function Xh(e,t,a){if(t=du(e,t,Vh)[0],e=zi(ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=yo(t)}catch(y){throw y===dr?wi:y}else r=t;t=xt();var s=t.queue,u=s.dispatch;return a!==t.memoizedState&&(je.flags|=2048,yr(9,{destroy:void 0},mS.bind(null,s,a),null)),[r,u,e]}function mS(e,t){e.action=t}function $h(e){var t=xt(),a=rt;if(a!==null)return Xh(t,a,e);xt(),t=t.memoizedState,a=xt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function yr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=je.updateQueue,t===null&&(t=Ni(),je.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Kh(){return xt().memoizedState}function Di(e,t,a,r){var s=Kt();je.flags|=e,s.memoizedState=yr(1|t,{destroy:void 0},a,r===void 0?null:r)}function ji(e,t,a,r){var s=xt();r=r===void 0?null:r;var u=s.memoizedState.inst;rt!==null&&r!==null&&ou(r,rt.memoizedState.deps)?s.memoizedState=yr(t,u,a,r):(je.flags|=e,s.memoizedState=yr(1|t,u,a,r))}function Fh(e,t){Di(8390656,8,e,t)}function gu(e,t){ji(2048,8,e,t)}function hS(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Ni(),je.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Qh(e){var t=xt().memoizedState;return hS({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Zh(e,t){return ji(4,2,e,t)}function Jh(e,t){return ji(4,4,e,t)}function Wh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,a){a=a!=null?a.concat([e]):null,ji(4,4,Wh.bind(null,t,e),a)}function yu(){}function tp(e,t){var a=xt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&ou(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function np(e,t){var a=xt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&ou(t,r[1]))return r[0];if(r=e(),Nl){sn(!0);try{e()}finally{sn(!1)}}return a.memoizedState=[r,t],r}function vu(e,t,a){return a===void 0||(da&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ag(),je.lanes|=e,qa|=e,a)}function ap(e,t,a,r){return cn(a,t)?a:hr.current!==null?(e=vu(e,a,r),cn(e,t)||(Mt=!0),e):(da&42)===0||(da&1073741824)!==0&&(Ve&261930)===0?(Mt=!0,e.memoizedState=a):(e=ag(),je.lanes|=e,qa|=e,t)}function lp(e,t,a,r,s){var u=j.p;j.p=u!==0&&8>u?u:8;var y=M.T,w={};M.T=w,Su(e,!1,t,a);try{var D=s(),$=M.S;if($!==null&&$(w,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var oe=cS(D,r);vo(e,t,oe,pn(e))}else vo(e,t,r,pn(e))}catch(ue){vo(e,t,{then:function(){},status:"rejected",reason:ue},pn())}finally{j.p=u,y!==null&&w.types!==null&&(y.types=w.types),M.T=y}}function pS(){}function bu(e,t,a,r){if(e.tag!==5)throw Error(i(476));var s=rp(e).queue;lp(e,s,t,Y,a===null?pS:function(){return op(e),a(r)})}function rp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:Y},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function op(e){var t=rp(e);t.next===null&&(t=e.alternate.memoizedState),vo(e,t.next.queue,{},pn())}function xu(){return Ut(ko)}function ip(){return xt().memoizedState}function sp(){return xt().memoizedState}function gS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=pn();e=Ba(a);var r=Ua(t,e,a);r!==null&&(nn(r,t,a),mo(r,t,a)),t={cache:Fc()},e.payload=t;return}t=t.return}}function yS(e,t,a){var r=pn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ki(e)?up(t,a):(a=Bc(e,t,a,r),a!==null&&(nn(a,e,r),fp(a,t,r)))}function cp(e,t,a){var r=pn();vo(e,t,a,r)}function vo(e,t,a,r){var s={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ki(e))up(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,w=u(y,a);if(s.hasEagerState=!0,s.eagerState=w,cn(w,y))return pi(e,t,s,0),st===null&&hi(),!1}catch{}finally{}if(a=Bc(e,t,s,r),a!==null)return nn(a,e,r),fp(a,t,r),!0}return!1}function Su(e,t,a,r){if(r={lane:2,revertLane:Wu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ki(e)){if(t)throw Error(i(479))}else t=Bc(e,a,r,2),t!==null&&nn(t,e,2)}function ki(e){var t=e.alternate;return e===je||t!==null&&t===je}function up(e,t){pr=_i=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function fp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,Be(e,a)}}var bo={readContext:Ut,use:Oi,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};bo.useEffectEvent=yt;var dp={readContext:Ut,use:Oi,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Fh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Di(4194308,4,Wh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){Di(4,2,e,t)},useMemo:function(e,t){var a=Kt();t=t===void 0?null:t;var r=e();if(Nl){sn(!0);try{e()}finally{sn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=Kt();if(a!==void 0){var s=a(t);if(Nl){sn(!0);try{a(t)}finally{sn(!1)}}}else s=t;return r.memoizedState=r.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},r.queue=e,e=e.dispatch=yS.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=hu(e);var t=e.queue,a=cp.bind(null,je,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:yu,useDeferredValue:function(e,t){var a=Kt();return vu(a,e,t)},useTransition:function(){var e=hu(!1);return e=lp.bind(null,je,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=je,s=Kt();if(Xe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),st===null)throw Error(i(349));(Ve&127)!==0||Dh(r,t,a)}s.memoizedState=a;var u={value:a,getSnapshot:t};return s.queue=u,Fh(kh.bind(null,r,u,e),[e]),r.flags|=2048,yr(9,{destroy:void 0},jh.bind(null,r,u,a,t),null),a},useId:function(){var e=Kt(),t=st.identifierPrefix;if(Xe){var a=$n,r=Xn;a=(r&~(1<<32-Dt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ri++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=uS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:qh,useActionState:qh,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Su.bind(null,je,!0,a),a.dispatch=t,[e,t]},useMemoCache:fu,useCacheRefresh:function(){return Kt().memoizedState=gS.bind(null,je)},useEffectEvent:function(e){var t=Kt(),a={impl:e};return t.memoizedState=a,function(){if((Je&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},wu={readContext:Ut,use:Oi,useCallback:tp,useContext:Ut,useEffect:gu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:zi,useRef:Kh,useState:function(){return zi(ma)},useDebugValue:yu,useDeferredValue:function(e,t){var a=xt();return ap(a,rt.memoizedState,e,t)},useTransition:function(){var e=zi(ma)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:yo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:xu,useFormState:Ph,useActionState:Ph,useOptimistic:function(e,t){var a=xt();return Bh(a,rt,e,t)},useMemoCache:fu,useCacheRefresh:sp};wu.useEffectEvent=Qh;var mp={readContext:Ut,use:Oi,useCallback:tp,useContext:Ut,useEffect:gu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:mu,useRef:Kh,useState:function(){return mu(ma)},useDebugValue:yu,useDeferredValue:function(e,t){var a=xt();return rt===null?vu(a,e,t):ap(a,rt.memoizedState,e,t)},useTransition:function(){var e=mu(ma)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:yo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:xu,useFormState:$h,useActionState:$h,useOptimistic:function(e,t){var a=xt();return rt!==null?Bh(a,rt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fu,useCacheRefresh:sp};mp.useEffectEvent=Qh;function Eu(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Tu={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=pn(),s=Ba(r);s.payload=t,a!=null&&(s.callback=a),t=Ua(e,s,r),t!==null&&(nn(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=pn(),s=Ba(r);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=Ua(e,s,r),t!==null&&(nn(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=pn(),r=Ba(a);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,a),t!==null&&(nn(t,e,a),mo(t,e,a))}};function hp(e,t,a,r,s,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,y):t.prototype&&t.prototype.isPureReactComponent?!lo(a,r)||!lo(s,u):!0}function pp(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Tu.enqueueReplaceState(t,t.state,null)}function Ol(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function gp(e){mi(e)}function yp(e){console.error(e)}function vp(e){mi(e)}function Li(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function bp(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Cu(e,t,a){return a=Ba(a),a.tag=3,a.payload={element:null},a.callback=function(){Li(e,t)},a}function xp(e){return e=Ba(e),e.tag=3,e}function Sp(e,t,a,r){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var u=r.value;e.payload=function(){return s(u)},e.callback=function(){bp(t,a,r)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){bp(t,a,r),typeof s!="function"&&(Pa===null?Pa=new Set([this]):Pa.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function vS(e,t,a,r,s){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&cr(t,a,s,!0),a=fn.current,a!==null){switch(a.tag){case 31:case 13:return Rn===null?Ki():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=s,r===Ei?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),Qu(e,r,s)),!1;case 22:return a.flags|=65536,r===Ei?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),Qu(e,r,s)),!1}throw Error(i(435,a.tag))}return Qu(e,r,s),Ki(),!1}if(Xe)return t=fn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,r!==qc&&(e=Error(i(422),{cause:r}),io(Cn(e,a)))):(r!==qc&&(t=Error(i(423),{cause:r}),io(Cn(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,r=Cn(r,a),s=Cu(e.stateNode,r,s),tu(e,s),vt!==4&&(vt=2)),!1;var u=Error(i(520),{cause:r});if(u=Cn(u,a),Ao===null?Ao=[u]:Ao.push(u),vt!==4&&(vt=2),t===null)return!0;r=Cn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Cu(a.stateNode,r,e),tu(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Pa===null||!Pa.has(u))))return a.flags|=65536,s&=-s,a.lanes|=s,s=xp(s),Sp(s,e,a,r),tu(a,s),!1}a=a.return}while(a!==null);return!1}var Mu=Error(i(461)),Mt=!1;function It(e,t,a,r){t.child=e===null?Ch(t,null,a,r):Rl(t,e.child,a,r)}function wp(e,t,a,r,s){a=a.render;var u=t.ref;if("ref"in r){var y={};for(var w in r)w!=="ref"&&(y[w]=r[w])}else y=r;return Cl(t),r=iu(e,t,a,y,u,s),w=su(),e!==null&&!Mt?(cu(e,t,s),ha(e,t,s)):(Xe&&w&&Yc(t),t.flags|=1,It(e,t,r,s),t.child)}function Ep(e,t,a,r,s){if(e===null){var u=a.type;return typeof u=="function"&&!Uc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Tp(e,t,u,r,s)):(e=yi(a.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!ju(e,s)){var y=u.memoizedProps;if(a=a.compare,a=a!==null?a:lo,a(y,r)&&e.ref===t.ref)return ha(e,t,s)}return t.flags|=1,e=sa(u,r),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,a,r,s){if(e!==null){var u=e.memoizedProps;if(lo(u,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=u,ju(e,s))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,ha(e,t,s)}return Au(e,t,a,r,s)}function Cp(e,t,a,r){var s=r.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(r=t.child=e.child,s=0;r!==null;)s=s|r.lanes|r.childLanes,r=r.sibling;r=s&~u}else r=0,t.child=null;return Mp(e,t,u,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Si(t,u!==null?u.cachePool:null),u!==null?_h(t,u):au(),Rh(t);else return r=t.lanes=536870912,Mp(e,t,u!==null?u.baseLanes|a:a,a,r)}else u!==null?(Si(t,u.cachePool),_h(t,u),Ga(),t.memoizedState=null):(e!==null&&Si(t,null),au(),Ga());return It(e,t,s,a),t.child}function xo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mp(e,t,a,r,s){var u=Zc();return u=u===null?null:{parent:Tt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Si(t,null),au(),Rh(t),e!==null&&cr(e,t,r,!0),t.childLanes=s,null}function Hi(e,t){return t=Ui({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,a){return Rl(t,e.child,null,a),e=Hi(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function bS(e,t,a){var r=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(r.mode==="hidden")return e=Hi(t,r),t.lanes=536870912,xo(null,e);if(ru(t),(e=ft)?(e=Ug(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Da!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,Bt=t,ft=null)):e=null,e===null)throw ka(t);return t.lanes=536870912,null}return Hi(t,r)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(ru(t),s)if(t.flags&256)t.flags&=-257,t=Ap(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Mt||cr(e,t,a,!1),s=(a&e.childLanes)!==0,Mt||s){if(r=st,r!==null&&(y=Ye(r,a),y!==0&&y!==u.retryLane))throw u.retryLane=y,Sl(e,y),nn(r,e,y),Mu;Ki(),t=Ap(e,t,a)}else e=u.treeContext,ft=Nn(y.nextSibling),Bt=t,Xe=!0,ja=null,_n=!1,e!==null&&mh(t,e),t=Hi(t,r),t.flags|=4096;return t}return e=sa(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bi(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Au(e,t,a,r,s){return Cl(t),a=iu(e,t,a,r,void 0,s),r=su(),e!==null&&!Mt?(cu(e,t,s),ha(e,t,s)):(Xe&&r&&Yc(t),t.flags|=1,It(e,t,a,s),t.child)}function _p(e,t,a,r,s,u){return Cl(t),t.updateQueue=null,a=Oh(t,r,a,s),Nh(e),r=su(),e!==null&&!Mt?(cu(e,t,u),ha(e,t,u)):(Xe&&r&&Yc(t),t.flags|=1,It(e,t,a,u),t.child)}function Rp(e,t,a,r,s){if(Cl(t),t.stateNode===null){var u=rr,y=a.contextType;typeof y=="object"&&y!==null&&(u=Ut(y)),u=new a(r,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Tu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=r,u.state=t.memoizedState,u.refs={},Wc(t),y=a.contextType,u.context=typeof y=="object"&&y!==null?Ut(y):rr,u.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Eu(t,a,y,r),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Tu.enqueueReplaceState(u,u.state,null),po(t,r,u,s),ho(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){u=t.stateNode;var w=t.memoizedProps,D=Ol(a,w);u.props=D;var $=u.context,oe=a.contextType;y=rr,typeof oe=="object"&&oe!==null&&(y=Ut(oe));var ue=a.getDerivedStateFromProps;oe=typeof ue=="function"||typeof u.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,oe||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(w||$!==y)&&pp(t,u,r,y),Ha=!1;var J=t.memoizedState;u.state=J,po(t,r,u,s),ho(),$=t.memoizedState,w||J!==$||Ha?(typeof ue=="function"&&(Eu(t,a,ue,r),$=t.memoizedState),(D=Ha||hp(t,a,D,r,J,$,y))?(oe||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=$),u.props=r,u.state=$,u.context=y,r=D):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,eu(e,t),y=t.memoizedProps,oe=Ol(a,y),u.props=oe,ue=t.pendingProps,J=u.context,$=a.contextType,D=rr,typeof $=="object"&&$!==null&&(D=Ut($)),w=a.getDerivedStateFromProps,($=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==ue||J!==D)&&pp(t,u,r,D),Ha=!1,J=t.memoizedState,u.state=J,po(t,r,u,s),ho();var ae=t.memoizedState;y!==ue||J!==ae||Ha||e!==null&&e.dependencies!==null&&bi(e.dependencies)?(typeof w=="function"&&(Eu(t,a,w,r),ae=t.memoizedState),(oe=Ha||hp(t,a,oe,r,J,ae,D)||e!==null&&e.dependencies!==null&&bi(e.dependencies))?($||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,ae,D),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,ae,D)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=ae),u.props=r,u.state=ae,u.context=D,r=oe):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&J===e.memoizedState||(t.flags|=1024),r=!1)}return u=r,Bi(e,t),r=(t.flags&128)!==0,u||r?(u=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&r?(t.child=Rl(t,e.child,null,s),t.child=Rl(t,null,a,s)):It(e,t,a,s),t.memoizedState=u.state,e=t.child):e=ha(e,t,s),e}function Np(e,t,a,r){return El(),t.flags|=256,It(e,t,a,r),t.child}var _u={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ru(e){return{baseLanes:e,cachePool:bh()}}function Nu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=hn),e}function Op(e,t,a){var r=t.pendingProps,s=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),y&&(s=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(s?Ia(t):Ga(),(e=ft)?(e=Ug(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Da!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,Bt=t,ft=null)):e=null,e===null)throw ka(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var w=r.children;return r=r.fallback,s?(Ga(),s=t.mode,w=Ui({mode:"hidden",children:w},s),r=wl(r,s,a,null),w.return=t,r.return=t,w.sibling=r,t.child=w,r=t.child,r.memoizedState=Ru(a),r.childLanes=Nu(e,y,a),t.memoizedState=_u,xo(null,r)):(Ia(t),Ou(t,w))}var D=e.memoizedState;if(D!==null&&(w=D.dehydrated,w!==null)){if(u)t.flags&256?(Ia(t),t.flags&=-257,t=zu(e,t,a)):t.memoizedState!==null?(Ga(),t.child=e.child,t.flags|=128,t=null):(Ga(),w=r.fallback,s=t.mode,r=Ui({mode:"visible",children:r.children},s),w=wl(w,s,a,null),w.flags|=2,r.return=t,w.return=t,r.sibling=w,t.child=r,Rl(t,e.child,null,a),r=t.child,r.memoizedState=Ru(a),r.childLanes=Nu(e,y,a),t.memoizedState=_u,t=xo(null,r));else if(Ia(t),mf(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var $=y.dgst;y=$,r=Error(i(419)),r.stack="",r.digest=y,io({value:r,source:null,stack:null}),t=zu(e,t,a)}else if(Mt||cr(e,t,a,!1),y=(a&e.childLanes)!==0,Mt||y){if(y=st,y!==null&&(r=Ye(y,a),r!==0&&r!==D.retryLane))throw D.retryLane=r,Sl(e,r),nn(y,e,r),Mu;df(w)||Ki(),t=zu(e,t,a)}else df(w)?(t.flags|=192,t.child=e.child,t=null):(e=D.treeContext,ft=Nn(w.nextSibling),Bt=t,Xe=!0,ja=null,_n=!1,e!==null&&mh(t,e),t=Ou(t,r.children),t.flags|=4096);return t}return s?(Ga(),w=r.fallback,s=t.mode,D=e.child,$=D.sibling,r=sa(D,{mode:"hidden",children:r.children}),r.subtreeFlags=D.subtreeFlags&65011712,$!==null?w=sa($,w):(w=wl(w,s,a,null),w.flags|=2),w.return=t,r.return=t,r.sibling=w,t.child=r,xo(null,r),r=t.child,w=e.child.memoizedState,w===null?w=Ru(a):(s=w.cachePool,s!==null?(D=Tt._currentValue,s=s.parent!==D?{parent:D,pool:D}:s):s=bh(),w={baseLanes:w.baseLanes|a,cachePool:s}),r.memoizedState=w,r.childLanes=Nu(e,y,a),t.memoizedState=_u,xo(e.child,r)):(Ia(t),a=e.child,e=a.sibling,a=sa(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function Ou(e,t){return t=Ui({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ui(e,t){return e=un(22,e,null,t),e.lanes=0,e}function zu(e,t,a){return Rl(t,e.child,null,a),e=Ou(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$c(e.return,t,a)}function Du(e,t,a,r,s,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:s,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=a,y.tailMode=s,y.treeForkCount=u)}function Dp(e,t,a){var r=t.pendingProps,s=r.revealOrder,u=r.tail;r=r.children;var y=bt.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,Z(bt,y),It(e,t,r,a),r=Xe?oo:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zp(e,a,t);else if(e.tag===19)zp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ai(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Du(t,!1,s,a,u,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ai(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Du(t,!0,a,null,u,r);break;case"together":Du(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function ha(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(cr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=sa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=sa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ju(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bi(e)))}function xS(e,t,a){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),La(t,Tt,e.memoizedState.cache),El();break;case 27:case 5:be(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:La(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ia(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Op(e,t,a):(Ia(t),e=ha(e,t,a),e!==null?e.sibling:null);Ia(t);break;case 19:var s=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(cr(e,t,a,!1),r=(a&t.childLanes)!==0),s){if(r)return Dp(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Z(bt,bt.current),r)break;return null;case 22:return t.lanes=0,Cp(e,t,a,t.pendingProps);case 24:La(t,Tt,e.memoizedState.cache)}return ha(e,t,a)}function jp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!ju(e,a)&&(t.flags&128)===0)return Mt=!1,xS(e,t,a);Mt=(e.flags&131072)!==0}else Mt=!1,Xe&&(t.flags&1048576)!==0&&dh(t,oo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Al(t.elementType),t.type=e,typeof e=="function")Uc(e)?(r=Ol(e,r),t.tag=1,t=Rp(null,t,e,r,a)):(t.tag=0,t=Au(null,t,e,r,a));else{if(e!=null){var s=e.$$typeof;if(s===B){t.tag=11,t=wp(null,t,e,r,a);break e}else if(s===H){t.tag=14,t=Ep(null,t,e,r,a);break e}}throw t=K(e)||e,Error(i(306,t,""))}}return t;case 0:return Au(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,s=Ol(r,t.pendingProps),Rp(e,t,r,s,a);case 3:e:{if(Q(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var u=t.memoizedState;s=u.element,eu(e,t),po(t,r,null,a);var y=t.memoizedState;if(r=y.cache,La(t,Tt,r),r!==u.cache&&Kc(t,[Tt],a,!0),ho(),r=y.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Np(e,t,r,a);break e}else if(r!==s){s=Cn(Error(i(424)),t),io(s),t=Np(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ft=Nn(e.firstChild),Bt=t,Xe=!0,ja=null,_n=!0,a=Ch(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(El(),r===s){t=ha(e,t,a);break e}It(e,t,r,a)}t=t.child}return t;case 26:return Bi(e,t),e===null?(a=Pg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Xe||(a=t.type,e=t.pendingProps,r=ts(me.current).createElement(a),r[Pe]=t,r[gt]=e,Gt(r,a,e),jt(r),t.stateNode=r):t.memoizedState=Pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&Xe&&(r=t.stateNode=Yg(t.type,t.pendingProps,me.current),Bt=t,_n=!0,s=ft,Fa(t.type)?(hf=s,ft=Nn(r.firstChild)):ft=s),It(e,t,t.pendingProps.children,a),Bi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((s=r=ft)&&(r=QS(r,t.type,t.pendingProps,_n),r!==null?(t.stateNode=r,Bt=t,ft=Nn(r.firstChild),_n=!1,s=!0):s=!1),s||ka(t)),be(t),s=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,r=u.children,cf(s,u)?r=null:y!==null&&cf(s,y)&&(t.flags|=32),t.memoizedState!==null&&(s=iu(e,t,fS,null,null,a),ko._currentValue=s),Bi(e,t),It(e,t,r,a),t.child;case 6:return e===null&&Xe&&((e=a=ft)&&(a=ZS(a,t.pendingProps,_n),a!==null?(t.stateNode=a,Bt=t,ft=null,e=!0):e=!1),e||ka(t)),null;case 13:return Op(e,t,a);case 4:return Q(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rl(t,null,r,a):It(e,t,r,a),t.child;case 11:return wp(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,La(t,t.type,r.value),It(e,t,r.children,a),t.child;case 9:return s=t.type._context,r=t.pendingProps.children,Cl(t),s=Ut(s),r=r(s),t.flags|=1,It(e,t,r,a),t.child;case 14:return Ep(e,t,t.type,t.pendingProps,a);case 15:return Tp(e,t,t.type,t.pendingProps,a);case 19:return Dp(e,t,a);case 31:return bS(e,t,a);case 22:return Cp(e,t,a,t.pendingProps);case 24:return Cl(t),r=Ut(Tt),e===null?(s=Zc(),s===null&&(s=st,u=Fc(),s.pooledCache=u,u.refCount++,u!==null&&(s.pooledCacheLanes|=a),s=u),t.memoizedState={parent:r,cache:s},Wc(t),La(t,Tt,s)):((e.lanes&a)!==0&&(eu(e,t),po(t,null,null,a),ho()),s=e.memoizedState,u=t.memoizedState,s.parent!==r?(s={parent:r,cache:r},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),La(t,Tt,r)):(r=u.cache,La(t,Tt,r),r!==s.cache&&Kc(t,[Tt],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pa(e){e.flags|=4}function ku(e,t,a,r,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(ig())e.flags|=8192;else throw _l=Ei,Jc}else e.flags&=-16777217}function kp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(ig())e.flags|=8192;else throw _l=Ei,Jc}function Ii(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?de():536870912,e.lanes|=t,Sr|=t)}function So(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,r|=s.subtreeFlags&65011712,r|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function SS(e,t,a){var r=t.pendingProps;switch(Vc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),fa(Tt),re(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(sr(t)?pa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),dt(t),null;case 26:var s=t.type,u=t.memoizedState;return e===null?(pa(t),u!==null?(dt(t),kp(t,u)):(dt(t),ku(t,s,null,r,a))):u?u!==e.memoizedState?(pa(t),dt(t),kp(t,u)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&pa(t),dt(t),ku(t,s,e,r,a)),null;case 27:if(Me(t),a=me.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dt(t),null}e=ie.current,sr(t)?hh(t):(e=Yg(s,r,a),t.stateNode=e,pa(t))}return dt(t),null;case 5:if(Me(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dt(t),null}if(u=ie.current,sr(t))hh(t);else{var y=ts(me.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?u.multiple=!0:r.size&&(u.size=r.size);break;default:u=typeof r.is=="string"?y.createElement(s,{is:r.is}):y.createElement(s)}}u[Pe]=t,u[gt]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=u;e:switch(Gt(u,s,r),s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&pa(t)}}return dt(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=me.current,sr(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,s=Bt,s!==null)switch(s.tag){case 27:case 5:r=s.memoizedProps}e[Pe]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Og(e.nodeValue,a)),e||ka(t,!0)}else e=ts(e).createTextNode(r),e[Pe]=t,t.stateNode=e}return dt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=sr(t),a!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Pe]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else a=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return dt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=sr(t),r!==null&&r.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[Pe]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),s=!1}else s=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,s=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(s=r.alternate.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==s&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ii(t,t.updateQueue),dt(t),null);case 4:return re(),e===null&&af(t.stateNode.containerInfo),dt(t),null;case 10:return fa(t.type),dt(t),null;case 19:if(L(bt),r=t.memoizedState,r===null)return dt(t),null;if(s=(t.flags&128)!==0,u=r.rendering,u===null)if(s)So(r,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ai(e),u!==null){for(t.flags|=128,So(r,!1),e=u.updateQueue,t.updateQueue=e,Ii(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ch(a,e),a=a.sibling;return Z(bt,bt.current&1|2),Xe&&ca(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_t()>Pi&&(t.flags|=128,s=!0,So(r,!1),t.lanes=4194304)}else{if(!s)if(e=Ai(u),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ii(t,e),So(r,!0),r.tail===null&&r.tailMode==="hidden"&&!u.alternate&&!Xe)return dt(t),null}else 2*_t()-r.renderingStartTime>Pi&&a!==536870912&&(t.flags|=128,s=!0,So(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_t(),e.sibling=null,a=bt.current,Z(bt,s?a&1|2:a&1),Xe&&ca(t,r.treeForkCount),e):(dt(t),null);case 22:case 23:return dn(t),lu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),a=t.updateQueue,a!==null&&Ii(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&L(Ml),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),fa(Tt),dt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function wS(e,t){switch(Vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fa(Tt),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(i(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(bt),null;case 4:return re(),null;case 10:return fa(t.type),null;case 22:case 23:return dn(t),lu(),e!==null&&L(Ml),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fa(Tt),null;case 25:return null;default:return null}}function Lp(e,t){switch(Vc(t),t.tag){case 3:fa(Tt),re();break;case 26:case 27:case 5:Me(t);break;case 4:re();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:L(bt);break;case 10:fa(t.type);break;case 22:case 23:dn(t),lu(),e!==null&&L(Ml);break;case 24:fa(Tt)}}function wo(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var s=r.next;a=s;do{if((a.tag&e)===e){r=void 0;var u=a.create,y=a.inst;r=u(),y.destroy=r}a=a.next}while(a!==s)}}catch(w){nt(t,t.return,w)}}function Ya(e,t,a){try{var r=t.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var u=s.next;r=u;do{if((r.tag&e)===e){var y=r.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,s=t;var D=a,$=w;try{$()}catch(oe){nt(s,D,oe)}}}r=r.next}while(r!==u)}}catch(oe){nt(t,t.return,oe)}}function Hp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ah(t,a)}catch(r){nt(e,e.return,r)}}}function Bp(e,t,a){a.props=Ol(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){nt(e,t,r)}}function Eo(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(s){nt(e,t,s)}}function Kn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(s){nt(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){nt(e,t,s)}else a.current=null}function Up(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(s){nt(e,e.return,s)}}function Lu(e,t,a){try{var r=e.stateNode;qS(r,e.type,a,t),r[gt]=t}catch(s){nt(e,e.return,s)}}function Ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Fa(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 Bu(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=oa));else if(r!==4&&(r===27&&Fa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Bu(e,t,a),e=e.sibling;e!==null;)Bu(e,t,a),e=e.sibling}function Gi(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&Fa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Gi(e,t,a),e=e.sibling;e!==null;)Gi(e,t,a),e=e.sibling}function Gp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Gt(t,r,a),t[Pe]=e,t[gt]=a}catch(u){nt(e,e.return,u)}}var ga=!1,At=!1,Uu=!1,Yp=typeof WeakSet=="function"?WeakSet:Set,kt=null;function ES(e,t){if(e=e.containerInfo,of=ss,e=eh(e),zc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var s=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var y=0,w=-1,D=-1,$=0,oe=0,ue=e,J=null;t:for(;;){for(var ae;ue!==a||s!==0&&ue.nodeType!==3||(w=y+s),ue!==u||r!==0&&ue.nodeType!==3||(D=y+r),ue.nodeType===3&&(y+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)J=ue,ue=ae;for(;;){if(ue===e)break t;if(J===a&&++$===s&&(w=y),J===u&&++oe===r&&(D=y),(ae=ue.nextSibling)!==null)break;ue=J,J=ue.parentNode}ue=ae}a=w===-1||D===-1?null:{start:w,end:D}}else a=null}a=a||{start:0,end:0}}else a=null;for(sf={focusedElem:e,selectionRange:a},ss=!1,kt=t;kt!==null;)if(t=kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,kt=e;else for(;kt!==null;){switch(t=kt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,s=u.memoizedProps,u=u.memoizedState,r=a.stateNode;try{var ve=Ol(a.type,s);e=r.getSnapshotBeforeUpdate(ve,u),r.__reactInternalSnapshotBeforeUpdate=e}catch(_e){nt(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)ff(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ff(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,kt=e;break}kt=t.return}}function Vp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:va(e,a),r&4&&wo(5,a);break;case 1:if(va(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){nt(a,a.return,y)}else{var s=Ol(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){nt(a,a.return,y)}}r&64&&Hp(a),r&512&&Eo(a,a.return);break;case 3:if(va(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ah(e,t)}catch(y){nt(a,a.return,y)}}break;case 27:t===null&&r&4&&Gp(a);case 26:case 5:va(e,a),t===null&&r&4&&Up(a),r&512&&Eo(a,a.return);break;case 12:va(e,a);break;case 31:va(e,a),r&4&&Xp(e,a);break;case 13:va(e,a),r&4&&$p(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=zS.bind(null,a),JS(e,a))));break;case 22:if(r=a.memoizedState!==null||ga,!r){t=t!==null&&t.memoizedState!==null||At,s=ga;var u=At;ga=r,(At=t)&&!u?ba(e,a,(a.subtreeFlags&8772)!==0):va(e,a),ga=s,At=u}break;case 30:break;default:va(e,a)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gl(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 ht=null,Jt=!1;function ya(e,t,a){for(a=a.child;a!==null;)Pp(e,t,a),a=a.sibling}function Pp(e,t,a){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(na,a)}catch{}switch(a.tag){case 26:At||Kn(a,t),ya(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:At||Kn(a,t);var r=ht,s=Jt;Fa(a.type)&&(ht=a.stateNode,Jt=!1),ya(e,t,a),zo(a.stateNode),ht=r,Jt=s;break;case 5:At||Kn(a,t);case 6:if(r=ht,s=Jt,ht=null,ya(e,t,a),ht=r,Jt=s,ht!==null)if(Jt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(u){nt(a,t,u)}else try{ht.removeChild(a.stateNode)}catch(u){nt(a,t,u)}break;case 18:ht!==null&&(Jt?(e=ht,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Rr(e)):Hg(ht,a.stateNode));break;case 4:r=ht,s=Jt,ht=a.stateNode.containerInfo,Jt=!0,ya(e,t,a),ht=r,Jt=s;break;case 0:case 11:case 14:case 15:Ya(2,a,t),At||Ya(4,a,t),ya(e,t,a);break;case 1:At||(Kn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Bp(a,t,r)),ya(e,t,a);break;case 21:ya(e,t,a);break;case 22:At=(r=At)||a.memoizedState!==null,ya(e,t,a),At=r;break;default:ya(e,t,a)}}function Xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rr(e)}catch(a){nt(t,t.return,a)}}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rr(e)}catch(a){nt(t,t.return,a)}}function TS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yp),t;default:throw Error(i(435,e.tag))}}function Yi(e,t){var a=TS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var s=DS.bind(null,e,r);r.then(s,s)}})}function Wt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var s=a[r],u=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(Fa(w.type)){ht=w.stateNode,Jt=!1;break e}break;case 5:ht=w.stateNode,Jt=!1;break e;case 3:case 4:ht=w.stateNode.containerInfo,Jt=!0;break e}w=w.return}if(ht===null)throw Error(i(160));Pp(u,y,s),ht=null,Jt=!1,u=s.alternate,u!==null&&(u.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kp(t,e),t=t.sibling}var Hn=null;function Kp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),en(e),r&4&&(Ya(3,e,e.return),wo(3,e),Ya(5,e,e.return));break;case 1:Wt(t,e),en(e),r&512&&(At||a===null||Kn(a,a.return)),r&64&&ga&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var s=Hn;if(Wt(t,e),en(e),r&512&&(At||a===null||Kn(a,a.return)),r&4){var u=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(r){case"title":u=s.getElementsByTagName("title")[0],(!u||u[Pn]||u[Pe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=s.createElement(r),s.head.insertBefore(u,s.querySelector("head > title"))),Gt(u,r,a),u[Pe]=e,jt(u),r=u;break e;case"link":var y=Kg("link","href",s).get(r+(a.href||""));if(y){for(var w=0;w<y.length;w++)if(u=y[w],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(w,1);break t}}u=s.createElement(r),Gt(u,r,a),s.head.appendChild(u);break;case"meta":if(y=Kg("meta","content",s).get(r+(a.content||""))){for(w=0;w<y.length;w++)if(u=y[w],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(w,1);break t}}u=s.createElement(r),Gt(u,r,a),s.head.appendChild(u);break;default:throw Error(i(468,r))}u[Pe]=e,jt(u),r=u}e.stateNode=r}else Fg(s,e.type,e.stateNode);else e.stateNode=$g(s,r,e.memoizedProps);else u!==r?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,r===null?Fg(s,e.type,e.stateNode):$g(s,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,a.memoizedProps)}break;case 27:Wt(t,e),en(e),r&512&&(At||a===null||Kn(a,a.return)),a!==null&&r&4&&Lu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Wt(t,e),en(e),r&512&&(At||a===null||Kn(a,a.return)),e.flags&32){s=e.stateNode;try{Jl(s,"")}catch(ve){nt(e,e.return,ve)}}r&4&&e.stateNode!=null&&(s=e.memoizedProps,Lu(e,s,a!==null?a.memoizedProps:s)),r&1024&&(Uu=!0);break;case 6:if(Wt(t,e),en(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(ve){nt(e,e.return,ve)}}break;case 3:if(ls=null,s=Hn,Hn=ns(t.containerInfo),Wt(t,e),Hn=s,en(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Rr(t.containerInfo)}catch(ve){nt(e,e.return,ve)}Uu&&(Uu=!1,Fp(e));break;case 4:r=Hn,Hn=ns(e.stateNode.containerInfo),Wt(t,e),en(e),Hn=r;break;case 12:Wt(t,e),en(e);break;case 31:Wt(t,e),en(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Yi(e,r)));break;case 13:Wt(t,e),en(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qi=_t()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Yi(e,r)));break;case 22:s=e.memoizedState!==null;var D=a!==null&&a.memoizedState!==null,$=ga,oe=At;if(ga=$||s,At=oe||D,Wt(t,e),At=oe,ga=$,en(e),r&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||D||ga||At||zl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){D=a=t;try{if(u=D.stateNode,s)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=D.stateNode;var ue=D.memoizedProps.style,J=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(ve){nt(D,D.return,ve)}}}else if(t.tag===6){if(a===null){D=t;try{D.stateNode.nodeValue=s?"":D.memoizedProps}catch(ve){nt(D,D.return,ve)}}}else if(t.tag===18){if(a===null){D=t;try{var ae=D.stateNode;s?Bg(ae,!0):Bg(D.stateNode,!1)}catch(ve){nt(D,D.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Yi(e,a))));break;case 19:Wt(t,e),en(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Yi(e,r)));break;case 30:break;case 21:break;default:Wt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Ip(r)){a=r;break}r=r.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var s=a.stateNode,u=Hu(e);Gi(e,u,s);break;case 5:var y=a.stateNode;a.flags&32&&(Jl(y,""),a.flags&=-33);var w=Hu(e);Gi(e,w,y);break;case 3:case 4:var D=a.stateNode.containerInfo,$=Hu(e);Bu(e,$,D);break;default:throw Error(i(161))}}catch(oe){nt(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vp(e,t.alternate,t),t=t.sibling}function zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ya(4,t,t.return),zl(t);break;case 1:Kn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Bp(t,t.return,a),zl(t);break;case 27:zo(t.stateNode);case 26:case 5:Kn(t,t.return),zl(t);break;case 22:t.memoizedState===null&&zl(t);break;case 30:zl(t);break;default:zl(t)}e=e.sibling}}function ba(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,s=e,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:ba(s,u,a),wo(4,u);break;case 1:if(ba(s,u,a),r=u,s=r.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch($){nt(r,r.return,$)}if(r=u,s=r.updateQueue,s!==null){var w=r.stateNode;try{var D=s.shared.hiddenCallbacks;if(D!==null)for(s.shared.hiddenCallbacks=null,s=0;s<D.length;s++)Mh(D[s],w)}catch($){nt(r,r.return,$)}}a&&y&64&&Hp(u),Eo(u,u.return);break;case 27:Gp(u);case 26:case 5:ba(s,u,a),a&&r===null&&y&4&&Up(u),Eo(u,u.return);break;case 12:ba(s,u,a);break;case 31:ba(s,u,a),a&&y&4&&Xp(s,u);break;case 13:ba(s,u,a),a&&y&4&&$p(s,u);break;case 22:u.memoizedState===null&&ba(s,u,a),Eo(u,u.return);break;case 30:break;default:ba(s,u,a)}t=t.sibling}}function Iu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&so(a))}function Gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e))}function Bn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,a,r),t=t.sibling}function Qp(e,t,a,r){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Bn(e,t,a,r),s&2048&&wo(9,t);break;case 1:Bn(e,t,a,r);break;case 3:Bn(e,t,a,r),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e)));break;case 12:if(s&2048){Bn(e,t,a,r),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,w=u.onPostCommit;typeof w=="function"&&w(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){nt(t,t.return,D)}}else Bn(e,t,a,r);break;case 31:Bn(e,t,a,r);break;case 13:Bn(e,t,a,r);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?Bn(e,t,a,r):To(e,t):u._visibility&2?Bn(e,t,a,r):(u._visibility|=2,vr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Iu(y,t);break;case 24:Bn(e,t,a,r),s&2048&&Gu(t.alternate,t);break;default:Bn(e,t,a,r)}}function vr(e,t,a,r,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,w=a,D=r,$=y.flags;switch(y.tag){case 0:case 11:case 15:vr(u,y,w,D,s),wo(8,y);break;case 23:break;case 22:var oe=y.stateNode;y.memoizedState!==null?oe._visibility&2?vr(u,y,w,D,s):To(u,y):(oe._visibility|=2,vr(u,y,w,D,s)),s&&$&2048&&Iu(y.alternate,y);break;case 24:vr(u,y,w,D,s),s&&$&2048&&Gu(y.alternate,y);break;default:vr(u,y,w,D,s)}t=t.sibling}}function To(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,s=r.flags;switch(r.tag){case 22:To(a,r),s&2048&&Iu(r.alternate,r);break;case 24:To(a,r),s&2048&&Gu(r.alternate,r);break;default:To(a,r)}t=t.sibling}}var Co=8192;function br(e,t,a){if(e.subtreeFlags&Co)for(e=e.child;e!==null;)Zp(e,t,a),e=e.sibling}function Zp(e,t,a){switch(e.tag){case 26:br(e,t,a),e.flags&Co&&e.memoizedState!==null&&uw(a,Hn,e.memoizedState,e.memoizedProps);break;case 5:br(e,t,a);break;case 3:case 4:var r=Hn;Hn=ns(e.stateNode.containerInfo),br(e,t,a),Hn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Co,Co=16777216,br(e,t,a),Co=r):br(e,t,a));break;default:br(e,t,a)}}function Jp(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 Mo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];kt=r,eg(r,e)}Jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wp(e),e=e.sibling}function Wp(e){switch(e.tag){case 0:case 11:case 15:Mo(e),e.flags&2048&&Ya(9,e,e.return);break;case 3:Mo(e);break;case 12:Mo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vi(e)):Mo(e);break;default:Mo(e)}}function Vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];kt=r,eg(r,e)}Jp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ya(8,t,t.return),Vi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Vi(t));break;default:Vi(t)}e=e.sibling}}function eg(e,t){for(;kt!==null;){var a=kt;switch(a.tag){case 0:case 11:case 15:Ya(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:so(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,kt=r;else e:for(a=e;kt!==null;){r=kt;var s=r.sibling,u=r.return;if(qp(r),r===a){kt=null;break e}if(s!==null){s.return=u,kt=s;break e}kt=u}}}var CS={getCacheForType:function(e){var t=Ut(Tt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ut(Tt).controller.signal}},MS=typeof WeakMap=="function"?WeakMap:Map,Je=0,st=null,Ue=null,Ve=0,tt=0,mn=null,Va=!1,xr=!1,Yu=!1,xa=0,vt=0,qa=0,Dl=0,Vu=0,hn=0,Sr=0,Ao=null,tn=null,qu=!1,qi=0,tg=0,Pi=1/0,Xi=null,Pa=null,Rt=0,Xa=null,wr=null,Sa=0,Pu=0,Xu=null,ng=null,_o=0,$u=null;function pn(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:M.T!==null?Wu():lt()}function ag(){if(hn===0)if((Ve&536870912)===0||Xe){var e=aa;aa<<=1,(aa&3932160)===0&&(aa=262144),hn=e}else hn=536870912;return e=fn.current,e!==null&&(e.flags|=32),hn}function nn(e,t,a){(e===st&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Er(e,0),$a(e,Ve,hn,!1)),ge(e,a),((Je&2)===0||e!==st)&&(e===st&&((Je&2)===0&&(Dl|=a),vt===4&&$a(e,Ve,hn,!1)),Fn(e))}function lg(e,t,a){if((Je&6)!==0)throw Error(i(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ct(e,t),s=r?RS(e,t):Fu(e,t,!0),u=r;do{if(s===0){xr&&!r&&$a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!AS(a)){s=Fu(e,t,!1),u=!1;continue}if(s===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;s=Ao;var D=w.current.memoizedState.isDehydrated;if(D&&(Er(w,y).flags|=256),y=Fu(w,y,!1),y!==2){if(Yu&&!D){w.errorRecoveryDisabledLanes|=u,Dl|=u,s=4;break e}u=tn,tn=s,u!==null&&(tn===null?tn=u:tn.push.apply(tn,u))}s=y}if(u=!1,s!==2)continue}}if(s===1){Er(e,0),$a(e,t,0,!0);break}e:{switch(r=e,u=s,u){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:$a(r,t,hn,!Va);break e;case 2:tn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=qi+300-_t(),10<s)){if($a(r,t,hn,!Va),Re(r,0,!0)!==0)break e;Sa=t,r.timeoutHandle=kg(rg.bind(null,r,a,tn,Xi,qu,t,hn,Dl,Sr,Va,u,"Throttled",-0,0),s);break e}rg(r,a,tn,Xi,qu,t,hn,Dl,Sr,Va,u,null,-0,0)}}break}while(!0);Fn(e)}function rg(e,t,a,r,s,u,y,w,D,$,oe,ue,J,ae){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oa},Zp(t,u,ue);var ve=(u&62914560)===u?qi-_t():(u&4194048)===u?tg-_t():0;if(ve=fw(ue,ve),ve!==null){Sa=u,e.cancelPendingCommit=ve(mg.bind(null,e,t,u,a,r,s,y,w,D,oe,ue,null,J,ae)),$a(e,u,y,!$);return}}mg(e,t,u,a,r,s,y,w,D)}function AS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var s=a[r],u=s.getSnapshot;s=s.value;try{if(!cn(u(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $a(e,t,a,r){t&=~Vu,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var s=t;0<s;){var u=31-Dt(s),y=1<<u;r[u]=-1,s&=~y}a!==0&&ke(e,a,t)}function $i(){return(Je&6)===0?(Ro(0),!1):!0}function Ku(){if(Ue!==null){if(tt===0)var e=Ue.return;else e=Ue,ua=Tl=null,uu(e),mr=null,uo=0,e=Ue;for(;e!==null;)Lp(e.alternate,e),e=e.return;Ue=null}}function Er(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,$S(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Sa=0,Ku(),st=e,Ue=a=sa(e.current,null),Ve=t,tt=0,mn=null,Va=!1,xr=ct(e,t),Yu=!1,Sr=hn=Vu=Dl=qa=vt=0,tn=Ao=null,qu=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var s=31-Dt(r),u=1<<s;t|=e[s],r&=~u}return xa=t,hi(),a}function og(e,t){je=null,M.H=bo,t===dr||t===wi?(t=wh(),tt=3):t===Jc?(t=wh(),tt=4):tt=t===Mu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Ue===null&&(vt=1,Li(e,Cn(t,e.current)))}function ig(){var e=fn.current;return e===null?!0:(Ve&4194048)===Ve?Rn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===Rn:!1}function sg(){var e=M.H;return M.H=bo,e===null?bo:e}function cg(){var e=M.A;return M.A=CS,e}function Ki(){vt=4,Va||(Ve&4194048)!==Ve&&fn.current!==null||(xr=!0),(qa&134217727)===0&&(Dl&134217727)===0||st===null||$a(st,Ve,hn,!1)}function Fu(e,t,a){var r=Je;Je|=2;var s=sg(),u=cg();(st!==e||Ve!==t)&&(Xi=null,Er(e,t)),t=!1;var y=vt;e:do try{if(tt!==0&&Ue!==null){var w=Ue,D=mn;switch(tt){case 8:Ku(),y=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var $=tt;if(tt=0,mn=null,Tr(e,w,D,$),a&&xr){y=0;break e}break;default:$=tt,tt=0,mn=null,Tr(e,w,D,$)}}_S(),y=vt;break}catch(oe){og(e,oe)}while(!0);return t&&e.shellSuspendCounter++,ua=Tl=null,Je=r,M.H=s,M.A=u,Ue===null&&(st=null,Ve=0,hi()),y}function _S(){for(;Ue!==null;)ug(Ue)}function RS(e,t){var a=Je;Je|=2;var r=sg(),s=cg();st!==e||Ve!==t?(Xi=null,Pi=_t()+500,Er(e,t)):xr=ct(e,t);e:do try{if(tt!==0&&Ue!==null){t=Ue;var u=mn;t:switch(tt){case 1:tt=0,mn=null,Tr(e,t,u,1);break;case 2:case 9:if(xh(u)){tt=0,mn=null,fg(t);break}t=function(){tt!==2&&tt!==9||st!==e||(tt=7),Fn(e)},u.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:xh(u)?(tt=0,mn=null,fg(t)):(tt=0,mn=null,Tr(e,t,u,7));break;case 5:var y=null;switch(Ue.tag){case 26:y=Ue.memoizedState;case 5:case 27:var w=Ue;if(y?Qg(y):w.stateNode.complete){tt=0,mn=null;var D=w.sibling;if(D!==null)Ue=D;else{var $=w.return;$!==null?(Ue=$,Fi($)):Ue=null}break t}}tt=0,mn=null,Tr(e,t,u,5);break;case 6:tt=0,mn=null,Tr(e,t,u,6);break;case 8:Ku(),vt=6;break e;default:throw Error(i(462))}}NS();break}catch(oe){og(e,oe)}while(!0);return ua=Tl=null,M.H=r,M.A=s,Je=a,Ue!==null?0:(st=null,Ve=0,hi(),vt)}function NS(){for(;Ue!==null&&!et();)ug(Ue)}function ug(e){var t=jp(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?Fi(e):Ue=t}function fg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=_p(a,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=_p(a,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:uu(t);default:Lp(a,t),t=Ue=ch(t,xa),t=jp(a,t,xa)}e.memoizedProps=e.pendingProps,t===null?Fi(e):Ue=t}function Tr(e,t,a,r){ua=Tl=null,uu(t),mr=null,uo=0;var s=t.return;try{if(vS(e,s,t,a,Ve)){vt=1,Li(e,Cn(a,e.current)),Ue=null;return}}catch(u){if(s!==null)throw Ue=s,u;vt=1,Li(e,Cn(a,e.current)),Ue=null;return}t.flags&32768?(Xe||r===1?e=!0:xr||(Ve&536870912)!==0?e=!1:(Va=e=!0,(r===2||r===9||r===3||r===6)&&(r=fn.current,r!==null&&r.tag===13&&(r.flags|=16384))),dg(t,e)):Fi(t)}function Fi(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Va);return}e=t.return;var a=SS(t.alternate,t,xa);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);vt===0&&(vt=5)}function dg(e,t){do{var a=wS(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);vt=6,Ue=null}function mg(e,t,a,r,s,u,y,w,D){e.cancelPendingCommit=null;do Qi();while(Rt!==0);if((Je&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(u=t.lanes|t.childLanes,u|=Hc,Oe(e,a,u,y,w,D),e===st&&(Ue=st=null,Ve=0),wr=t,Xa=e,Sa=a,Pu=u,Xu=s,ng=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jS(Ft,function(){return vg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,s=j.p,j.p=2,y=Je,Je|=4;try{ES(e,t,a)}finally{Je=y,j.p=s,M.T=r}}Rt=1,hg(),pg(),gg()}}function hg(){if(Rt===1){Rt=0;var e=Xa,t=wr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var r=j.p;j.p=2;var s=Je;Je|=4;try{Kp(t,e);var u=sf,y=eh(e.containerInfo),w=u.focusedElem,D=u.selectionRange;if(y!==w&&w&&w.ownerDocument&&Wm(w.ownerDocument.documentElement,w)){if(D!==null&&zc(w)){var $=D.start,oe=D.end;if(oe===void 0&&(oe=$),"selectionStart"in w)w.selectionStart=$,w.selectionEnd=Math.min(oe,w.value.length);else{var ue=w.ownerDocument||document,J=ue&&ue.defaultView||window;if(J.getSelection){var ae=J.getSelection(),ve=w.textContent.length,_e=Math.min(D.start,ve),it=D.end===void 0?_e:Math.min(D.end,ve);!ae.extend&&_e>it&&(y=it,it=_e,_e=y);var I=Jm(w,_e),k=Jm(w,it);if(I&&k&&(ae.rangeCount!==1||ae.anchorNode!==I.node||ae.anchorOffset!==I.offset||ae.focusNode!==k.node||ae.focusOffset!==k.offset)){var X=ue.createRange();X.setStart(I.node,I.offset),ae.removeAllRanges(),_e>it?(ae.addRange(X),ae.extend(k.node,k.offset)):(X.setEnd(k.node,k.offset),ae.addRange(X))}}}}for(ue=[],ae=w;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var se=ue[w];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ss=!!of,sf=of=null}finally{Je=s,j.p=r,M.T=a}}e.current=t,Rt=2}}function pg(){if(Rt===2){Rt=0;var e=Xa,t=wr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var r=j.p;j.p=2;var s=Je;Je|=4;try{Vp(e,t.alternate,t)}finally{Je=s,j.p=r,M.T=a}}Rt=3}}function gg(){if(Rt===4||Rt===3){Rt=0,Lt();var e=Xa,t=wr,a=Sa,r=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,wr=Xa=null,yg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Pa=null),mt(a),t=t.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(na,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=M.T,s=j.p,j.p=2,M.T=null;try{for(var u=e.onRecoverableError,y=0;y<r.length;y++){var w=r[y];u(w.value,{componentStack:w.stack})}}finally{M.T=t,j.p=s}}(Sa&3)!==0&&Qi(),Fn(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===$u?_o++:(_o=0,$u=e):_o=0,Ro(0)}}function yg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,so(t)))}function Qi(){return hg(),pg(),gg(),vg()}function vg(){if(Rt!==5)return!1;var e=Xa,t=Pu;Pu=0;var a=mt(Sa),r=M.T,s=j.p;try{j.p=32>a?32:a,M.T=null,a=Xu,Xu=null;var u=Xa,y=Sa;if(Rt=0,wr=Xa=null,Sa=0,(Je&6)!==0)throw Error(i(331));var w=Je;if(Je|=4,Wp(u.current),Qp(u,u.current,y,a),Je=w,Ro(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(na,u)}catch{}return!0}finally{j.p=s,M.T=r,yg(e,t)}}function bg(e,t,a){t=Cn(a,t),t=Cu(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(ge(e,2),Fn(e))}function nt(e,t,a){if(e.tag===3)bg(e,e,a);else for(;t!==null;){if(t.tag===3){bg(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pa===null||!Pa.has(r))){e=Cn(a,e),a=xp(2),r=Ua(t,a,2),r!==null&&(Sp(a,r,t,e),ge(r,2),Fn(r));break}}t=t.return}}function Qu(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new MS;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(a)||(Yu=!0,s.add(a),e=OS.bind(null,e,t,a),t.then(e,e))}function OS(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,st===e&&(Ve&a)===a&&(vt===4||vt===3&&(Ve&62914560)===Ve&&300>_t()-qi?(Je&2)===0&&Er(e,0):Vu|=a,Sr===Ve&&(Sr=0)),Fn(e)}function xg(e,t){t===0&&(t=de()),e=Sl(e,t),e!==null&&(ge(e,t),Fn(e))}function zS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),xg(e,a)}function DS(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),xg(e,a)}function jS(e,t){return rn(e,t)}var Zi=null,Cr=null,Zu=!1,Ji=!1,Ju=!1,Ka=0;function Fn(e){e!==Cr&&e.next===null&&(Cr===null?Zi=Cr=e:Cr=Cr.next=e),Ji=!0,Zu||(Zu=!0,LS())}function Ro(e,t){if(!Ju&&Ji){Ju=!0;do for(var a=!1,r=Zi;r!==null;){if(e!==0){var s=r.pendingLanes;if(s===0)var u=0;else{var y=r.suspendedLanes,w=r.pingedLanes;u=(1<<31-Dt(42|e)+1)-1,u&=s&~(y&~w),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Tg(r,u))}else u=Ve,u=Re(r,r===st?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(u&3)===0||ct(r,u)||(a=!0,Tg(r,u));r=r.next}while(a);Ju=!1}}function kS(){Sg()}function Sg(){Ji=Zu=!1;var e=0;Ka!==0&&XS()&&(e=Ka);for(var t=_t(),a=null,r=Zi;r!==null;){var s=r.next,u=wg(r,t);u===0?(r.next=null,a===null?Zi=s:a.next=s,s===null&&(Cr=a)):(a=r,(e!==0||(u&3)!==0)&&(Ji=!0)),r=s}Rt!==0&&Rt!==5||Ro(e),Ka!==0&&(Ka=0)}function wg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Dt(u),w=1<<y,D=s[y];D===-1?((w&a)===0||(w&r)!==0)&&(s[y]=le(w,t)):D<=t&&(e.expiredLanes|=w),u&=~w}if(t=st,a=Ve,a=Re(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&on(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ct(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&on(r),mt(a)){case 2:case 8:a=_a;break;case 32:a=Ft;break;case 268435456:a=Qt;break;default:a=Ft}return r=Eg.bind(null,e),a=rn(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&on(r),e.callbackPriority=2,e.callbackNode=null,2}function Eg(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Qi()&&e.callbackNode!==a)return null;var r=Ve;return r=Re(e,e===st?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(lg(e,r,t),wg(e,_t()),e.callbackNode!=null&&e.callbackNode===a?Eg.bind(null,e):null)}function Tg(e,t){if(Qi())return null;lg(e,t,!0)}function LS(){KS(function(){(Je&6)!==0?rn(zt,kS):Sg()})}function Wu(){if(Ka===0){var e=ur;e===0&&(e=Ra,Ra<<=1,(Ra&261888)===0&&(Ra=256)),Ka=e}return Ka}function Cg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function Mg(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function HS(e,t,a,r,s){if(t==="submit"&&a&&a.stateNode===s){var u=Cg((s[gt]||null).action),y=r.submitter;y&&(t=(t=y[gt]||null)?Cg(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var w=new ui("action","action",null,r,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ka!==0){var D=y?Mg(s,y):new FormData(s);bu(a,{pending:!0,data:D,method:s.method,action:u},null,D)}}else typeof u=="function"&&(w.preventDefault(),D=y?Mg(s,y):new FormData(s),bu(a,{pending:!0,data:D,method:s.method,action:u},u,D))},currentTarget:s}]})}}for(var ef=0;ef<Lc.length;ef++){var tf=Lc[ef],BS=tf.toLowerCase(),US=tf[0].toUpperCase()+tf.slice(1);Ln(BS,"on"+US)}Ln(ah,"onAnimationEnd"),Ln(lh,"onAnimationIteration"),Ln(rh,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(tS,"onTransitionRun"),Ln(nS,"onTransitionStart"),Ln(aS,"onTransitionCancel"),Ln(oh,"onTransitionEnd"),Ql("onMouseEnter",["mouseout","mouseover"]),Ql("onMouseLeave",["mouseout","mouseover"]),Ql("onPointerEnter",["pointerout","pointerover"]),Ql("onPointerLeave",["pointerout","pointerover"]),yl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yl("onBeforeInput",["compositionend","keypress","textInput","paste"]),yl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var No="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(" "),IS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(No));function Ag(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],s=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var y=r.length-1;0<=y;y--){var w=r[y],D=w.instance,$=w.currentTarget;if(w=w.listener,D!==u&&s.isPropagationStopped())break e;u=w,s.currentTarget=$;try{u(s)}catch(oe){mi(oe)}s.currentTarget=null,u=D}else for(y=0;y<r.length;y++){if(w=r[y],D=w.instance,$=w.currentTarget,w=w.listener,D!==u&&s.isPropagationStopped())break e;u=w,s.currentTarget=$;try{u(s)}catch(oe){mi(oe)}s.currentTarget=null,u=D}}}}function Ie(e,t){var a=t[kn];a===void 0&&(a=t[kn]=new Set);var r=e+"__bubble";a.has(r)||(_g(t,e,2,!1),a.add(r))}function nf(e,t,a){var r=0;t&&(r|=4),_g(a,e,r,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function af(e){if(!e[Wi]){e[Wi]=!0,Sm.forEach(function(a){a!=="selectionchange"&&(IS.has(a)||nf(a,!1,e),nf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wi]||(t[Wi]=!0,nf("selectionchange",!1,t))}}function _g(e,t,a,r){switch(ay(t)){case 2:var s=hw;break;case 8:s=pw;break;default:s=bf}a=s.bind(null,t,a,e),s=void 0,!Ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function lf(e,t,a,r,s){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var w=r.stateNode.containerInfo;if(w===s)break;if(y===4)for(y=r.return;y!==null;){var D=y.tag;if((D===3||D===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;w!==null;){if(y=Oa(w),y===null)return;if(D=y.tag,D===5||D===6||D===26||D===27){r=u=y;continue e}w=w.parentNode}}r=r.return}Dm(function(){var $=u,oe=Sc(a),ue=[];e:{var J=ih.get(e);if(J!==void 0){var ae=ui,ve=e;switch(e){case"keypress":if(si(a)===0)break e;case"keydown":case"keyup":ae=D1;break;case"focusin":ve="focus",ae=Ac;break;case"focusout":ve="blur",ae=Ac;break;case"beforeblur":case"afterblur":ae=Ac;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Lm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=S1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=L1;break;case ah:case lh:case rh:ae=T1;break;case oh:ae=B1;break;case"scroll":case"scrollend":ae=b1;break;case"wheel":ae=I1;break;case"copy":case"cut":case"paste":ae=M1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Bm;break;case"toggle":case"beforetoggle":ae=Y1}var _e=(t&4)!==0,it=!_e&&(e==="scroll"||e==="scrollend"),I=_e?J!==null?J+"Capture":null:J;_e=[];for(var k=$,X;k!==null;){var se=k;if(X=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||X===null||I===null||(se=Zr(k,I),se!=null&&_e.push(Oo(k,se,X))),it)break;k=k.return}0<_e.length&&(J=new ae(J,ve,null,a,oe),ue.push({event:J,listeners:_e}))}}if((t&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",J&&a!==xc&&(ve=a.relatedTarget||a.fromElement)&&(Oa(ve)||ve[pt]))break e;if((ae||J)&&(J=oe.window===oe?oe:(J=oe.ownerDocument)?J.defaultView||J.parentWindow:window,ae?(ve=a.relatedTarget||a.toElement,ae=$,ve=ve?Oa(ve):null,ve!==null&&(it=f(ve),_e=ve.tag,ve!==it||_e!==5&&_e!==27&&_e!==6)&&(ve=null)):(ae=null,ve=$),ae!==ve)){if(_e=Lm,se="onMouseLeave",I="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Bm,se="onPointerLeave",I="onPointerEnter",k="pointer"),it=ae==null?J:Qr(ae),X=ve==null?J:Qr(ve),J=new _e(se,k+"leave",ae,a,oe),J.target=it,J.relatedTarget=X,se=null,Oa(oe)===$&&(_e=new _e(I,k+"enter",ve,a,oe),_e.target=X,_e.relatedTarget=it,se=_e),it=se,ae&&ve)t:{for(_e=GS,I=ae,k=ve,X=0,se=I;se;se=_e(se))X++;se=0;for(var Ce=k;Ce;Ce=_e(Ce))se++;for(;0<X-se;)I=_e(I),X--;for(;0<se-X;)k=_e(k),se--;for(;X--;){if(I===k||k!==null&&I===k.alternate){_e=I;break t}I=_e(I),k=_e(k)}_e=null}else _e=null;ae!==null&&Rg(ue,J,ae,_e,!1),ve!==null&&it!==null&&Rg(ue,it,ve,_e,!0)}}e:{if(J=$?Qr($):window,ae=J.nodeName&&J.nodeName.toLowerCase(),ae==="select"||ae==="input"&&J.type==="file")var Fe=Xm;else if(qm(J))if($m)Fe=J1;else{Fe=Q1;var we=F1}else ae=J.nodeName,!ae||ae.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?$&&bc($.elementType)&&(Fe=Xm):Fe=Z1;if(Fe&&(Fe=Fe(e,$))){Pm(ue,Fe,a,oe);break e}we&&we(e,J,$),e==="focusout"&&$&&J.type==="number"&&$.memoizedProps.value!=null&&vc(J,"number",J.value)}switch(we=$?Qr($):window,e){case"focusin":(qm(we)||we.contentEditable==="true")&&(nr=we,Dc=$,ro=null);break;case"focusout":ro=Dc=nr=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,th(ue,a,oe);break;case"selectionchange":if(eS)break;case"keydown":case"keyup":th(ue,a,oe)}var Le;if(Rc)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else tr?Ym(e,a)&&(qe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(qe="onCompositionStart");qe&&(Um&&a.locale!=="ko"&&(tr||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&tr&&(Le=jm()):(za=oe,Tc="value"in za?za.value:za.textContent,tr=!0)),we=es($,qe),0<we.length&&(qe=new Hm(qe,e,null,a,oe),ue.push({event:qe,listeners:we}),Le?qe.data=Le:(Le=Vm(a),Le!==null&&(qe.data=Le)))),(Le=q1?P1(e,a):X1(e,a))&&(qe=es($,"onBeforeInput"),0<qe.length&&(we=new Hm("onBeforeInput","beforeinput",null,a,oe),ue.push({event:we,listeners:qe}),we.data=Le)),HS(ue,e,$,a,oe)}Ag(ue,t)})}function Oo(e,t,a){return{instance:e,listener:t,currentTarget:a}}function es(e,t){for(var a=t+"Capture",r=[];e!==null;){var s=e,u=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||u===null||(s=Zr(e,a),s!=null&&r.unshift(Oo(e,s,u)),s=Zr(e,t),s!=null&&r.push(Oo(e,s,u))),e.tag===3)return r;e=e.return}return[]}function GS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,t,a,r,s){for(var u=t._reactName,y=[];a!==null&&a!==r;){var w=a,D=w.alternate,$=w.stateNode;if(w=w.tag,D!==null&&D===r)break;w!==5&&w!==26&&w!==27||$===null||(D=$,s?($=Zr(a,u),$!=null&&y.unshift(Oo(a,$,D))):s||($=Zr(a,u),$!=null&&y.push(Oo(a,$,D)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var YS=/\r\n?/g,VS=/\u0000|\uFFFD/g;function Ng(e){return(typeof e=="string"?e:""+e).replace(YS,`
49
+ `).replace(VS,"")}function Og(e,t){return t=Ng(t),Ng(e)===t}function ot(e,t,a,r,s,u){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Jl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Jl(e,""+r);break;case"className":li(e,"class",r);break;case"tabIndex":li(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":li(e,a,r);break;case"style":Om(e,r,u);break;case"data":if(t!=="object"){li(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=oi(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&ot(e,t,"name",s.name,s,null),ot(e,t,"formEncType",s.formEncType,s,null),ot(e,t,"formMethod",s.formMethod,s,null),ot(e,t,"formTarget",s.formTarget,s,null)):(ot(e,t,"encType",s.encType,s,null),ot(e,t,"method",s.method,s,null),ot(e,t,"target",s.target,s,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=oi(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=oa);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=oi(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),ai(e,"popover",r);break;case"xlinkActuate":ra(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ra(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ra(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ra(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ra(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ra(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ra(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ra(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ra(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ai(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=y1.get(a)||a,ai(e,a,r))}}function rf(e,t,a,r,s,u){switch(a){case"style":Om(e,r,u);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Jl(e,r):(typeof r=="number"||typeof r=="bigint")&&Jl(e,""+r);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"onClick":r!=null&&(e.onclick=oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),u=e[gt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,s),typeof r=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,s);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):ai(e,a,r)}}}function Gt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var r=!1,s=!1,u;for(u in a)if(a.hasOwnProperty(u)){var y=a[u];if(y!=null)switch(u){case"src":r=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,u,y,a,null)}}s&&ot(e,t,"srcSet",a.srcSet,a,null),r&&ot(e,t,"src",a.src,a,null);return;case"input":Ie("invalid",e);var w=u=y=s=null,D=null,$=null;for(r in a)if(a.hasOwnProperty(r)){var oe=a[r];if(oe!=null)switch(r){case"name":s=oe;break;case"type":y=oe;break;case"checked":D=oe;break;case"defaultChecked":$=oe;break;case"value":u=oe;break;case"defaultValue":w=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,t));break;default:ot(e,t,r,oe,a,null)}}Am(e,u,w,D,$,y,s,!1);return;case"select":Ie("invalid",e),r=y=u=null;for(s in a)if(a.hasOwnProperty(s)&&(w=a[s],w!=null))switch(s){case"value":u=w;break;case"defaultValue":y=w;break;case"multiple":r=w;default:ot(e,t,s,w,a,null)}t=u,a=y,e.multiple=!!r,t!=null?Zl(e,!!r,t,!1):a!=null&&Zl(e,!!r,a,!0);return;case"textarea":Ie("invalid",e),u=s=r=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":r=w;break;case"defaultValue":s=w;break;case"children":u=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:ot(e,t,y,w,a,null)}Rm(e,r,s,u);return;case"option":for(D in a)if(a.hasOwnProperty(D)&&(r=a[D],r!=null))switch(D){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ot(e,t,D,r,a,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<No.length;r++)Ie(No[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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($ in a)if(a.hasOwnProperty($)&&(r=a[$],r!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,$,r,a,null)}return;default:if(bc(t)){for(oe in a)a.hasOwnProperty(oe)&&(r=a[oe],r!==void 0&&rf(e,t,oe,r,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null&&ot(e,t,w,r,a,null))}function qS(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,u=null,y=null,w=null,D=null,$=null,oe=null;for(ae in a){var ue=a[ae];if(a.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":D=ue;default:r.hasOwnProperty(ae)||ot(e,t,ae,null,r,ue)}}for(var J in r){var ae=r[J];if(ue=a[J],r.hasOwnProperty(J)&&(ae!=null||ue!=null))switch(J){case"type":u=ae;break;case"name":s=ae;break;case"checked":$=ae;break;case"defaultChecked":oe=ae;break;case"value":y=ae;break;case"defaultValue":w=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,t));break;default:ae!==ue&&ot(e,t,J,ae,r,ue)}}yc(e,y,w,D,$,oe,u,s);return;case"select":ae=y=w=J=null;for(u in a)if(D=a[u],a.hasOwnProperty(u)&&D!=null)switch(u){case"value":break;case"multiple":ae=D;default:r.hasOwnProperty(u)||ot(e,t,u,null,r,D)}for(s in r)if(u=r[s],D=a[s],r.hasOwnProperty(s)&&(u!=null||D!=null))switch(s){case"value":J=u;break;case"defaultValue":w=u;break;case"multiple":y=u;default:u!==D&&ot(e,t,s,u,r,D)}t=w,a=y,r=ae,J!=null?Zl(e,!!a,J,!1):!!r!=!!a&&(t!=null?Zl(e,!!a,t,!0):Zl(e,!!a,a?[]:"",!1));return;case"textarea":ae=J=null;for(w in a)if(s=a[w],a.hasOwnProperty(w)&&s!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ot(e,t,w,null,r,s)}for(y in r)if(s=r[y],u=a[y],r.hasOwnProperty(y)&&(s!=null||u!=null))switch(y){case"value":J=s;break;case"defaultValue":ae=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==u&&ot(e,t,y,s,r,u)}_m(e,J,ae);return;case"option":for(var ve in a)if(J=a[ve],a.hasOwnProperty(ve)&&J!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:ot(e,t,ve,null,r,J)}for(D in r)if(J=r[D],ae=a[D],r.hasOwnProperty(D)&&J!==ae&&(J!=null||ae!=null))switch(D){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:ot(e,t,D,J,r,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var _e in a)J=a[_e],a.hasOwnProperty(_e)&&J!=null&&!r.hasOwnProperty(_e)&&ot(e,t,_e,null,r,J);for($ in r)if(J=r[$],ae=a[$],r.hasOwnProperty($)&&J!==ae&&(J!=null||ae!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(i(137,t));break;default:ot(e,t,$,J,r,ae)}return;default:if(bc(t)){for(var it in a)J=a[it],a.hasOwnProperty(it)&&J!==void 0&&!r.hasOwnProperty(it)&&rf(e,t,it,void 0,r,J);for(oe in r)J=r[oe],ae=a[oe],!r.hasOwnProperty(oe)||J===ae||J===void 0&&ae===void 0||rf(e,t,oe,J,r,ae);return}}for(var I in a)J=a[I],a.hasOwnProperty(I)&&J!=null&&!r.hasOwnProperty(I)&&ot(e,t,I,null,r,J);for(ue in r)J=r[ue],ae=a[ue],!r.hasOwnProperty(ue)||J===ae||J==null&&ae==null||ot(e,t,ue,J,r,ae)}function zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var s=a[r],u=s.transferSize,y=s.initiatorType,w=s.duration;if(u&&w&&zg(y)){for(y=0,w=s.responseEnd,r+=1;r<a.length;r++){var D=a[r],$=D.startTime;if($>w)break;var oe=D.transferSize,ue=D.initiatorType;oe&&zg(ue)&&(D=D.responseEnd,y+=oe*(D<w?1:(w-$)/(D-$)))}if(--r,t+=8*(u+y)/(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 of=null,sf=null;function ts(e){return e.nodeType===9?e:e.ownerDocument}function Dg(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 jg(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 cf(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 uf=null;function XS(){var e=window.event;return e&&e.type==="popstate"?e===uf?!1:(uf=e,!0):(uf=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,$S=typeof clearTimeout=="function"?clearTimeout:void 0,Lg=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Lg<"u"?function(e){return Lg.resolve(null).then(e).catch(FS)}:kg;function FS(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function Hg(e,t){var a=t,r=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(s),Rr(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")zo(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zo(a);for(var u=a.firstChild;u;){var y=u.nextSibling,w=u.nodeName;u[Pn]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=y}}else a==="body"&&zo(e.ownerDocument.body);a=s}while(a);Rr(t)}function Bg(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ff(a),gl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function QS(e,t,a,r){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Pn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==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(u=e.getAttribute("src"),(u!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Nn(e.nextSibling),e===null)break}return null}function ZS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Nn(e.nextSibling),e===null))return null;return e}function Ug(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nn(e.nextSibling),e===null))return null;return e}function df(e){return e.data==="$?"||e.data==="$~"}function mf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function JS(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Nn(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 hf=null;function Ig(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Nn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Gg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Yg(e,t,a){switch(t=ts(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function zo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gl(e)}var On=new Map,Vg=new Set;function ns(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wa=j.d;j.d={f:WS,r:ew,D:tw,C:nw,L:aw,m:lw,X:ow,S:rw,M:iw};function WS(){var e=wa.f(),t=$i();return e||t}function ew(e){var t=Kl(e);t!==null&&t.tag===5&&t.type==="form"?op(t):wa.r(e)}var Mr=typeof document>"u"?null:document;function qg(e,t,a){var r=Mr;if(r&&typeof t=="string"&&t){var s=En(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Vg.has(s)||(Vg.add(s),e={rel:e,crossOrigin:a,href:t},r.querySelector(s)===null&&(t=r.createElement("link"),Gt(t,"link",e),jt(t),r.head.appendChild(t)))}}function tw(e){wa.D(e),qg("dns-prefetch",e,null)}function nw(e,t){wa.C(e,t),qg("preconnect",e,t)}function aw(e,t,a){wa.L(e,t,a);var r=Mr;if(r&&e&&t){var s='link[rel="preload"][as="'+En(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+En(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+En(a.imageSizes)+'"]')):s+='[href="'+En(e)+'"]';var u=s;switch(t){case"style":u=Ar(e);break;case"script":u=_r(e)}On.has(u)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),On.set(u,e),r.querySelector(s)!==null||t==="style"&&r.querySelector(Do(u))||t==="script"&&r.querySelector(jo(u))||(t=r.createElement("link"),Gt(t,"link",e),jt(t),r.head.appendChild(t)))}}function lw(e,t){wa.m(e,t);var a=Mr;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+En(r)+'"][href="'+En(e)+'"]',u=s;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=_r(e)}if(!On.has(u)&&(e=p({rel:"modulepreload",href:e},t),On.set(u,e),a.querySelector(s)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(jo(u)))return}r=a.createElement("link"),Gt(r,"link",e),jt(r),a.head.appendChild(r)}}}function rw(e,t,a){wa.S(e,t,a);var r=Mr;if(r&&e){var s=Fl(r).hoistableStyles,u=Ar(e);t=t||"default";var y=s.get(u);if(!y){var w={loading:0,preload:null};if(y=r.querySelector(Do(u)))w.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=On.get(u))&&pf(e,a);var D=y=r.createElement("link");jt(D),Gt(D,"link",e),D._p=new Promise(function($,oe){D.onload=$,D.onerror=oe}),D.addEventListener("load",function(){w.loading|=1}),D.addEventListener("error",function(){w.loading|=2}),w.loading|=4,as(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:w},s.set(u,y)}}}function ow(e,t){wa.X(e,t);var a=Mr;if(a&&e){var r=Fl(a).hoistableScripts,s=_r(e),u=r.get(s);u||(u=a.querySelector(jo(s)),u||(e=p({src:e,async:!0},t),(t=On.get(s))&&gf(e,t),u=a.createElement("script"),jt(u),Gt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(s,u))}}function iw(e,t){wa.M(e,t);var a=Mr;if(a&&e){var r=Fl(a).hoistableScripts,s=_r(e),u=r.get(s);u||(u=a.querySelector(jo(s)),u||(e=p({src:e,async:!0,type:"module"},t),(t=On.get(s))&&gf(e,t),u=a.createElement("script"),jt(u),Gt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(s,u))}}function Pg(e,t,a,r){var s=(s=me.current)?ns(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ar(a.href),a=Fl(s).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ar(a.href);var u=Fl(s).hoistableStyles,y=u.get(e);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=s.querySelector(Do(e)))&&!u._p&&(y.instance=u,y.state.loading=5),On.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},On.set(e,a),u||sw(s,e,a,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_r(a),a=Fl(s).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ar(e){return'href="'+En(e)+'"'}function Do(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function sw(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Gt(t,"link",a),jt(t),e.head.appendChild(t))}function _r(e){return'[src="'+En(e)+'"]'}function jo(e){return"script[async]"+e}function $g(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+En(a.href)+'"]');if(r)return t.instance=r,jt(r),r;var s=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),jt(r),Gt(r,"style",s),as(r,a.precedence,e),t.instance=r;case"stylesheet":s=Ar(a.href);var u=e.querySelector(Do(s));if(u)return t.state.loading|=4,t.instance=u,jt(u),u;r=Xg(a),(s=On.get(s))&&pf(r,s),u=(e.ownerDocument||e).createElement("link"),jt(u);var y=u;return y._p=new Promise(function(w,D){y.onload=w,y.onerror=D}),Gt(u,"link",r),t.state.loading|=4,as(u,a.precedence,e),t.instance=u;case"script":return u=_r(a.src),(s=e.querySelector(jo(u)))?(t.instance=s,jt(s),s):(r=a,(s=On.get(u))&&(r=p({},a),gf(r,s)),e=e.ownerDocument||e,s=e.createElement("script"),jt(s),Gt(s,"link",r),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&&(r=t.instance,t.state.loading|=4,as(r,a.precedence,e));return t.instance}function as(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=r.length?r[r.length-1]:null,u=s,y=0;y<r.length;y++){var w=r[y];if(w.dataset.precedence===t)u=w;else if(u!==s)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ls=null;function Kg(e,t,a){if(ls===null){var r=new Map,s=ls=new Map;s.set(a,r)}else s=ls,r=s.get(a),r||(r=new Map,s.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var u=a[s];if(!(u[Pn]||u[Pe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var w=r.get(y);w?w.push(u):r.set(y,[u])}}return r}function Fg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function cw(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uw(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Ar(r.href),u=t.querySelector(Do(s));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,jt(u);return}u=t.ownerDocument||t,r=Xg(r),(s=On.get(s))&&pf(r,s),u=u.createElement("link"),jt(u);var y=u;y._p=new Promise(function(w,D){y.onload=w,y.onerror=D}),Gt(u,"link",r),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=rs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yf=0;function fw(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&is(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&yf===0&&(yf=62500*PS());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&is(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>yf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(s)}}:null}function rs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var os=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,os=new Map,t.forEach(dw,e),os=null,rs.call(e))}function dw(e,t){if(!(t.state.loading&4)){var a=os.get(e);if(a)var r=a.get(null);else{a=new Map,os.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<s.length;u++){var y=s[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),r=y)}r&&a.set(null,r)}s=t.instance,y=s.getAttribute("data-precedence"),u=a.get(y)||r,u===r&&a.set(null,s),a.set(y,s),this.count++,r=rs.bind(this),s.addEventListener("load",r),s.addEventListener("error",r),u?u.parentNode.insertBefore(s,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ko={$$typeof:N,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function mw(e,t,a,r,s,u,y,w,D){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=pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pe(0),this.hiddenUpdates=pe(null),this.identifierPrefix=r,this.onUncaughtError=s,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Zg(e,t,a,r,s,u,y,w,D,$,oe,ue){return e=new mw(e,t,a,y,D,$,oe,ue,w),t=1,u===!0&&(t|=24),u=un(3,null,null,t),e.current=u,u.stateNode=e,t=Fc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:a,cache:t},Wc(u),e}function Jg(e){return e?(e=rr,e):rr}function Wg(e,t,a,r,s,u){s=Jg(s),r.context===null?r.context=s:r.pendingContext=s,r=Ba(t),r.payload={element:a},u=u===void 0?null:u,u!==null&&(r.callback=u),a=Ua(e,r,t),a!==null&&(nn(a,e,t),mo(a,e,t))}function ey(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function vf(e,t){ey(e,t),(e=e.alternate)&&ey(e,t)}function ty(e){if(e.tag===13||e.tag===31){var t=Sl(e,67108864);t!==null&&nn(t,e,67108864),vf(e,67108864)}}function ny(e){if(e.tag===13||e.tag===31){var t=pn();t=at(t);var a=Sl(e,t);a!==null&&nn(a,e,t),vf(e,t)}}var ss=!0;function hw(e,t,a,r){var s=M.T;M.T=null;var u=j.p;try{j.p=2,bf(e,t,a,r)}finally{j.p=u,M.T=s}}function pw(e,t,a,r){var s=M.T;M.T=null;var u=j.p;try{j.p=8,bf(e,t,a,r)}finally{j.p=u,M.T=s}}function bf(e,t,a,r){if(ss){var s=xf(r);if(s===null)lf(e,t,r,cs,a),ly(e,r);else if(yw(s,e,t,a,r))r.stopPropagation();else if(ly(e,r),t&4&&-1<gw.indexOf(e)){for(;s!==null;){var u=Kl(s);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Sn(u.pendingLanes);if(y!==0){var w=u;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var D=1<<31-Dt(y);w.entanglements[1]|=D,y&=~D}Fn(u),(Je&6)===0&&(Pi=_t()+500,Ro(0))}}break;case 31:case 13:w=Sl(u,2),w!==null&&nn(w,u,2),$i(),vf(u,2)}if(u=xf(r),u===null&&lf(e,t,r,cs,a),u===s)break;s=u}s!==null&&r.stopPropagation()}else lf(e,t,r,null,a)}}function xf(e){return e=Sc(e),Sf(e)}var cs=null;function Sf(e){if(cs=null,e=Oa(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return cs=e,null}function ay(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(bn()){case zt:return 2;case _a:return 8;case Ft:case qn:return 32;case Qt:return 268435456;default:return 32}default:return 32}}var wf=!1,Qa=null,Za=null,Ja=null,Lo=new Map,Ho=new Map,Wa=[],gw="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 ly(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Ja=null;break;case"pointerover":case"pointerout":Lo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function Bo(e,t,a,r,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:u,targetContainers:[s]},t!==null&&(t=Kl(t),t!==null&&ty(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function yw(e,t,a,r,s){switch(t){case"focusin":return Qa=Bo(Qa,e,t,a,r,s),!0;case"dragenter":return Za=Bo(Za,e,t,a,r,s),!0;case"mouseover":return Ja=Bo(Ja,e,t,a,r,s),!0;case"pointerover":var u=s.pointerId;return Lo.set(u,Bo(Lo.get(u)||null,e,t,a,r,s)),!0;case"gotpointercapture":return u=s.pointerId,Ho.set(u,Bo(Ho.get(u)||null,e,t,a,r,s)),!0}return!1}function ry(e){var t=Oa(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,$t(e.priority,function(){ny(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,$t(e.priority,function(){ny(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function us(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=xf(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);xc=r,a.target.dispatchEvent(r),xc=null}else return t=Kl(a),t!==null&&ty(t),e.blockedOn=a,!1;t.shift()}return!0}function oy(e,t,a){us(e)&&a.delete(t)}function vw(){wf=!1,Qa!==null&&us(Qa)&&(Qa=null),Za!==null&&us(Za)&&(Za=null),Ja!==null&&us(Ja)&&(Ja=null),Lo.forEach(oy),Ho.forEach(oy)}function fs(e,t){e.blockedOn===t&&(e.blockedOn=null,wf||(wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vw)))}var ds=null;function iy(e){ds!==e&&(ds=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ds===e&&(ds=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],s=e[t+2];if(typeof r!="function"){if(Sf(r||a)===null)continue;break}var u=Kl(a);u!==null&&(e.splice(t,3),t-=3,bu(u,{pending:!0,data:s,method:a.method,action:r},r,s))}}))}function Rr(e){function t(D){return fs(D,e)}Qa!==null&&fs(Qa,e),Za!==null&&fs(Za,e),Ja!==null&&fs(Ja,e),Lo.forEach(t),Ho.forEach(t);for(var a=0;a<Wa.length;a++){var r=Wa[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Wa.length&&(a=Wa[0],a.blockedOn===null);)ry(a),a.blockedOn===null&&Wa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var s=a[r],u=a[r+1],y=s[gt]||null;if(typeof u=="function")y||iy(a);else if(y){var w=null;if(u&&u.hasAttribute("formAction")){if(s=u,y=u[gt]||null)w=y.formAction;else if(Sf(s)!==null)continue}else w=y.action;typeof w=="function"?a[r+1]=w:(a.splice(r,3),r-=3),iy(a)}}}function sy(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Ef(e){this._internalRoot=e}ms.prototype.render=Ef.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,r=pn();Wg(a,r,e,t,null,null)},ms.prototype.unmount=Ef.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wg(e.current,2,null,e,null,null),$i(),t[pt]=null}};function ms(e){this._internalRoot=e}ms.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Wa.length&&t!==0&&t<Wa[a].priority;a++);Wa.splice(a,0,e),a===0&&ry(e)}};var cy=l.version;if(cy!=="19.2.5")throw Error(i(527,cy,"19.2.5"));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var bw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hs.isDisabled&&hs.supportsFiber)try{na=hs.inject(bw),Ht=hs}catch{}}return Io.createRoot=function(e,t){if(!c(e))throw Error(i(299));var a=!1,r="",s=gp,u=yp,y=vp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Zg(e,1,!1,null,null,a,r,null,s,u,y,sy),e[pt]=t.current,af(e),new Ef(t)},Io.hydrateRoot=function(e,t,a){if(!c(e))throw Error(i(299));var r=!1,s="",u=gp,y=yp,w=vp,D=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(D=a.formState)),t=Zg(e,1,!0,t,a??null,r,s,D,u,y,w,sy),t.context=Jg(null),a=t.current,r=pn(),r=at(r),s=Ba(r),s.callback=null,Ua(a,s,r),a=r,t.current.lanes=a,ge(t,a),Fn(t),e[pt]=t.current,af(e),new ms(t)},Io.version="19.2.5",Io}var by;function Rw(){if(by)return Mf.exports;by=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(l){console.error(l)}}return n(),Mf.exports=_w(),Mf.exports}var Nw=Rw();const Ow=kd(Nw);var Qo=X0();const $0=kd(Qo);function zw(n){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",l.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const Dw=n=>{switch(n){case"success":return Lw;case"info":return Bw;case"warning":return Hw;case"error":return Uw;default:return null}},jw=Array(12).fill(0),kw=({visible:n,className:l})=>he.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":n},he.createElement("div",{className:"sonner-spinner"},jw.map((o,i)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Lw=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Hw=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Bw=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Uw=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Iw=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Gw=()=>{const[n,l]=he.useState(document.hidden);return he.useEffect(()=>{const o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let ad=1;class Yw{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const o=this.subscribers.indexOf(l);this.subscribers.splice(o,1)}),this.publish=l=>{this.subscribers.forEach(o=>o(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var o;const{message:i,...c}=l,f=typeof(l==null?void 0:l.id)=="number"||((o=l.id)==null?void 0:o.length)>0?l.id:ad++,d=this.toasts.find(h=>h.id===f),m=l.dismissible===void 0?!0:l.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(h=>h.id===f?(this.publish({...h,...l,id:f,title:i}),{...h,...l,id:f,dismissible:m,title:i}):h):this.addToast({title:i,...c,dismissible:m,id:f}),f},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:l,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),l),this.message=(l,o)=>this.create({...o,message:l}),this.error=(l,o)=>this.create({...o,message:l,type:"error"}),this.success=(l,o)=>this.create({...o,type:"success",message:l}),this.info=(l,o)=>this.create({...o,type:"info",message:l}),this.warning=(l,o)=>this.create({...o,type:"warning",message:l}),this.loading=(l,o)=>this.create({...o,type:"loading",message:l}),this.promise=(l,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:l,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const c=Promise.resolve(l instanceof Function?l():l);let f=i!==void 0,d;const m=c.then(async g=>{if(d=["resolve",g],he.isValidElement(g))f=!1,this.create({id:i,type:"default",message:g});else if(qw(g)&&!g.ok){f=!1;const p=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,S=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,C=typeof p=="object"&&!he.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(g instanceof Error){f=!1;const p=typeof o.error=="function"?await o.error(g):o.error,S=typeof o.description=="function"?await o.description(g):o.description,C=typeof p=="object"&&!he.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(o.success!==void 0){f=!1;const p=typeof o.success=="function"?await o.success(g):o.success,S=typeof o.description=="function"?await o.description(g):o.description,C=typeof p=="object"&&!he.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:S,...C})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){f=!1;const x=typeof o.error=="function"?await o.error(g):o.error,p=typeof o.description=="function"?await o.description(g):o.description,T=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:p,...T})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((g,x)=>m.then(()=>d[0]==="reject"?x(d[1]):g(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(l,o)=>{const i=(o==null?void 0:o.id)||ad++;return this.create({jsx:l(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const an=new Yw,Vw=(n,l)=>{const o=(l==null?void 0:l.id)||ad++;return an.addToast({title:n,...l,id:o}),o},qw=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Pw=Vw,Xw=()=>an.toasts,$w=()=>an.getActiveToasts(),rl=Object.assign(Pw,{success:an.success,info:an.info,warning:an.warning,error:an.error,custom:an.custom,message:an.message,promise:an.promise,dismiss:an.dismiss,loading:an.loading},{getHistory:Xw,getToasts:$w});zw("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ps(n){return n.label!==void 0}const Kw=3,Fw="24px",Qw="16px",xy=4e3,Zw=356,Jw=14,Ww=45,e2=200;function Qn(...n){return n.filter(Boolean).join(" ")}function t2(n){const[l,o]=n.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}const n2=n=>{var l,o,i,c,f,d,m,h,g;const{invert:x,toast:p,unstyled:S,interacting:T,setHeights:C,visibleToasts:E,heights:A,index:R,toasts:z,expanded:N,removeToast:B,defaultRichColors:te,closeButton:G,style:H,cancelButtonStyle:O,actionButtonStyle:F,className:ee="",descriptionClassName:fe="",duration:W,position:P,gap:K,expandByDefault:q,classNames:M,icons:j,closeButtonAriaLabel:Y="Close toast"}=n,[V,U]=he.useState(null),[_,L]=he.useState(null),[Z,ie]=he.useState(!1),[ne,me]=he.useState(!1),[ce,Q]=he.useState(!1),[re,be]=he.useState(!1),[Me,Ae]=he.useState(!1),[$e,Ge]=he.useState(0),[Yt,wt]=he.useState(0),Ot=he.useRef(p.duration||W||xy),De=he.useRef(null),ye=he.useRef(null),rn=R===0,on=R+1<=E,et=p.type,Lt=p.dismissible!==!1,_t=p.className||"",bn=p.descriptionClassName||"",zt=he.useMemo(()=>A.findIndex(Re=>Re.toastId===p.id)||0,[A,p.id]),_a=he.useMemo(()=>{var Re;return(Re=p.closeButton)!=null?Re:G},[p.closeButton,G]),Ft=he.useMemo(()=>p.duration||W||xy,[p.duration,W]),qn=he.useRef(0),Qt=he.useRef(0),jn=he.useRef(0),Vt=he.useRef(null),[na,Ht]=P.split("-"),sn=he.useMemo(()=>A.reduce((Re,ct,le)=>le>=zt?Re:Re+ct.height,0),[A,zt]),Dt=Gw(),Fr=p.invert||x,pl=et==="loading";Qt.current=he.useMemo(()=>zt*K+sn,[zt,sn]),he.useEffect(()=>{Ot.current=Ft},[Ft]),he.useEffect(()=>{ie(!0)},[]),he.useEffect(()=>{const Re=ye.current;if(Re){const ct=Re.getBoundingClientRect().height;return wt(ct),C(le=>[{toastId:p.id,height:ct,position:p.position},...le]),()=>C(le=>le.filter(de=>de.toastId!==p.id))}},[C,p.id]),he.useLayoutEffect(()=>{if(!Z)return;const Re=ye.current,ct=Re.style.height;Re.style.height="auto";const le=Re.getBoundingClientRect().height;Re.style.height=ct,wt(le),C(de=>de.find(ge=>ge.toastId===p.id)?de.map(ge=>ge.toastId===p.id?{...ge,height:le}:ge):[{toastId:p.id,height:le,position:p.position},...de])},[Z,p.title,p.description,C,p.id,p.jsx,p.action,p.cancel]);const xn=he.useCallback(()=>{me(!0),Ge(Qt.current),C(Re=>Re.filter(ct=>ct.toastId!==p.id)),setTimeout(()=>{B(p)},e2)},[p,B,C,Qt]);he.useEffect(()=>{if(p.promise&&et==="loading"||p.duration===1/0||p.type==="loading")return;let Re;return N||T||Dt?(()=>{if(jn.current<qn.current){const de=new Date().getTime()-qn.current;Ot.current=Ot.current-de}jn.current=new Date().getTime()})():(()=>{Ot.current!==1/0&&(qn.current=new Date().getTime(),Re=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),xn()},Ot.current))})(),()=>clearTimeout(Re)},[N,T,p,et,Dt,xn]),he.useEffect(()=>{p.delete&&(xn(),p.onDismiss==null||p.onDismiss.call(p,p))},[xn,p.delete]);function Ra(){var Re;if(j!=null&&j.loading){var ct;return he.createElement("div",{className:Qn(M==null?void 0:M.loader,p==null||(ct=p.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":et==="loading"},j.loading)}return he.createElement(kw,{className:Qn(M==null?void 0:M.loader,p==null||(Re=p.classNames)==null?void 0:Re.loader),visible:et==="loading"})}const aa=p.icon||(j==null?void 0:j[et])||Dw(et);var la,Sn;return he.createElement("li",{tabIndex:0,ref:ye,className:Qn(ee,_t,M==null?void 0:M.toast,p==null||(l=p.classNames)==null?void 0:l.toast,M==null?void 0:M.default,M==null?void 0:M[et],p==null||(o=p.classNames)==null?void 0:o[et]),"data-sonner-toast":"","data-rich-colors":(la=p.richColors)!=null?la:te,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":Z,"data-promise":!!p.promise,"data-swiped":Me,"data-removed":ne,"data-visible":on,"data-y-position":na,"data-x-position":Ht,"data-index":R,"data-front":rn,"data-swiping":ce,"data-dismissible":Lt,"data-type":et,"data-invert":Fr,"data-swipe-out":re,"data-swipe-direction":_,"data-expanded":!!(N||q&&Z),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":z.length-R,"--offset":`${ne?$e:Qt.current}px`,"--initial-height":q?"auto":`${Yt}px`,...H,...p.style},onDragEnd:()=>{Q(!1),U(null),Vt.current=null},onPointerDown:Re=>{Re.button!==2&&(pl||!Lt||(De.current=new Date,Ge(Qt.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(Q(!0),Vt.current={x:Re.clientX,y:Re.clientY})))},onPointerUp:()=>{var Re,ct,le;if(re||!Lt)return;Vt.current=null;const de=Number(((Re=ye.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pe=Number(((ct=ye.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((le=De.current)==null?void 0:le.getTime()),Oe=V==="x"?de:pe,ke=Math.abs(Oe)/ge;if(Math.abs(Oe)>=Ww||ke>.11){Ge(Qt.current),p.onDismiss==null||p.onDismiss.call(p,p),L(V==="x"?de>0?"right":"left":pe>0?"down":"up"),xn(),be(!0);return}else{var Be,Ye;(Be=ye.current)==null||Be.style.setProperty("--swipe-amount-x","0px"),(Ye=ye.current)==null||Ye.style.setProperty("--swipe-amount-y","0px")}Ae(!1),Q(!1),U(null)},onPointerMove:Re=>{var ct,le,de;if(!Vt.current||!Lt||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const ge=Re.clientY-Vt.current.y,Oe=Re.clientX-Vt.current.x;var ke;const Be=(ke=n.swipeDirections)!=null?ke:t2(P);!V&&(Math.abs(Oe)>1||Math.abs(ge)>1)&&U(Math.abs(Oe)>Math.abs(ge)?"x":"y");let Ye={x:0,y:0};const at=mt=>1/(1.5+Math.abs(mt)/20);if(V==="y"){if(Be.includes("top")||Be.includes("bottom"))if(Be.includes("top")&&ge<0||Be.includes("bottom")&&ge>0)Ye.y=ge;else{const mt=ge*at(ge);Ye.y=Math.abs(mt)<Math.abs(ge)?mt:ge}}else if(V==="x"&&(Be.includes("left")||Be.includes("right")))if(Be.includes("left")&&Oe<0||Be.includes("right")&&Oe>0)Ye.x=Oe;else{const mt=Oe*at(Oe);Ye.x=Math.abs(mt)<Math.abs(Oe)?mt:Oe}(Math.abs(Ye.x)>0||Math.abs(Ye.y)>0)&&Ae(!0),(le=ye.current)==null||le.style.setProperty("--swipe-amount-x",`${Ye.x}px`),(de=ye.current)==null||de.style.setProperty("--swipe-amount-y",`${Ye.y}px`)}},_a&&!p.jsx&&et!=="loading"?he.createElement("button",{"aria-label":Y,"data-disabled":pl,"data-close-button":!0,onClick:pl||!Lt?()=>{}:()=>{xn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Qn(M==null?void 0:M.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(Sn=j==null?void 0:j.close)!=null?Sn:Iw):null,(et||p.icon||p.promise)&&p.icon!==null&&((j==null?void 0:j[et])!==null||p.icon)?he.createElement("div",{"data-icon":"",className:Qn(M==null?void 0:M.icon,p==null||(c=p.classNames)==null?void 0:c.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Ra():null,p.type!=="loading"?aa:null):null,he.createElement("div",{"data-content":"",className:Qn(M==null?void 0:M.content,p==null||(f=p.classNames)==null?void 0:f.content)},he.createElement("div",{"data-title":"",className:Qn(M==null?void 0:M.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?he.createElement("div",{"data-description":"",className:Qn(fe,bn,M==null?void 0:M.description,p==null||(m=p.classNames)==null?void 0:m.description)},typeof p.description=="function"?p.description():p.description):null),he.isValidElement(p.cancel)?p.cancel:p.cancel&&ps(p.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:Re=>{ps(p.cancel)&&Lt&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Re),xn())},className:Qn(M==null?void 0:M.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,he.isValidElement(p.action)?p.action:p.action&&ps(p.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:Re=>{ps(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Re),!Re.defaultPrevented&&xn())},className:Qn(M==null?void 0:M.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Sy(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function a2(n,l){const o={};return[n,l].forEach((i,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",m=f?Qw:Fw;function h(g){["top","right","bottom","left"].forEach(x=>{o[`${d}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),o}const l2=he.forwardRef(function(l,o){const{id:i,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:x,mobileOffset:p,theme:S="light",richColors:T,duration:C,style:E,visibleToasts:A=Kw,toastOptions:R,dir:z=Sy(),gap:N=Jw,icons:B,containerAriaLabel:te="Notifications"}=l,[G,H]=he.useState([]),O=he.useMemo(()=>i?G.filter(Z=>Z.toasterId===i):G.filter(Z=>!Z.toasterId),[G,i]),F=he.useMemo(()=>Array.from(new Set([f].concat(O.filter(Z=>Z.position).map(Z=>Z.position)))),[O,f]),[ee,fe]=he.useState([]),[W,P]=he.useState(!1),[K,q]=he.useState(!1),[M,j]=he.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=he.useRef(null),V=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=he.useRef(null),_=he.useRef(!1),L=he.useCallback(Z=>{H(ie=>{var ne;return(ne=ie.find(me=>me.id===Z.id))!=null&&ne.delete||an.dismiss(Z.id),ie.filter(({id:me})=>me!==Z.id)})},[]);return he.useEffect(()=>an.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{H(ie=>ie.map(ne=>ne.id===Z.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{$0.flushSync(()=>{H(ie=>{const ne=ie.findIndex(me=>me.id===Z.id);return ne!==-1?[...ie.slice(0,ne),{...ie[ne],...Z},...ie.slice(ne+1)]:[Z,...ie]})})})}),[G]),he.useEffect(()=>{if(S!=="system"){j(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:ie})=>{j(ie?"dark":"light")})}catch{Z.addListener(({matches:ne})=>{try{j(ne?"dark":"light")}catch(me){console.error(me)}})}},[S]),he.useEffect(()=>{G.length<=1&&P(!1)},[G]),he.useEffect(()=>{const Z=ie=>{var ne;if(d.every(Q=>ie[Q]||ie.code===Q)){var ce;P(!0),(ce=Y.current)==null||ce.focus()}ie.code==="Escape"&&(document.activeElement===Y.current||(ne=Y.current)!=null&&ne.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[d]),he.useEffect(()=>{if(Y.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,_.current=!1)}},[Y.current]),he.createElement("section",{ref:o,"aria-label":`${te} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((Z,ie)=>{var ne;const[me,ce]=Z.split("-");return O.length?he.createElement("ol",{key:Z,dir:z==="auto"?Sy():z,tabIndex:-1,ref:Y,className:g,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":me,"data-x-position":ce,style:{"--front-toast-height":`${((ne=ee[0])==null?void 0:ne.height)||0}px`,"--width":`${Zw}px`,"--gap":`${N}px`,...E,...a2(x,p)},onBlur:Q=>{_.current&&!Q.currentTarget.contains(Q.relatedTarget)&&(_.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||_.current||(_.current=!0,U.current=Q.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{K||P(!1)},onDragEnd:()=>P(!1),onPointerDown:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},O.filter(Q=>!Q.position&&ie===0||Q.position===Z).map((Q,re)=>{var be,Me;return he.createElement(n2,{key:Q.id,icons:B,index:re,toast:Q,defaultRichColors:T,duration:(be=R==null?void 0:R.duration)!=null?be:C,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:c,visibleToasts:A,closeButton:(Me=R==null?void 0:R.closeButton)!=null?Me:h,interacting:K,position:Z,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:L,toasts:O.filter(Ae=>Ae.position==Q.position),heights:ee.filter(Ae=>Ae.position==Q.position),setHeights:fe,expandByDefault:m,gap:N,expanded:W,swipeDirections:l.swipeDirections})})):null}))}),Ee="data-editor-id",Bl="data-slide-root",Ul=1920,Il=1080;function Hd(n){return`[${Ee}="${n}"]`}function r2(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function K0(n,l){return`${l}-${n+1}`}function wy(n,l){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:l}function o2(n){return r2(n)}function Bs(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function F0(n){const l=n.querySelector(`[${Bl}]`);if(l)return l.getAttribute("data-slide-width")||l.setAttribute("data-slide-width",String(Ul)),l.getAttribute("data-slide-height")||l.setAttribute("data-slide-height",String(Il)),l;const o=n.querySelector(".slide-container");return o?(o.setAttribute(Bl,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(Ul)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Il)),o):null}function i2(n){return`<!DOCTYPE html>
50
+ ${n.documentElement.outerHTML}`}function s2(n){const l=Bs(n);if(!l)return n;const o=F0(l),i=Array.from(l.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Ee)&&o.setAttribute(Ee,"slide-root"),i.forEach((c,f)=>{if(!c.getAttribute(Ee)){const d=c.getAttribute("data-editable")||"block";c.setAttribute(Ee,K0(f,d))}}),i2(l)}function Zn(n,l="slide-1"){var T;if(!Bs(n))return{id:l,title:"Untitled Slide",htmlSource:n,rootSelector:`[${Bl}]`,width:Ul,height:Il,elements:[]};const i=s2(n),c=Bs(i);if(!c)return{id:l,title:"Untitled Slide",htmlSource:i,rootSelector:`[${Bl}]`,width:Ul,height:Il,elements:[]};const f=F0(c),d=Array.from(c.querySelectorAll("[data-editable]")),m=f!=null&&f.getAttribute(Ee)?`[${Ee}="${f.getAttribute(Ee)}"]`:`[${Bl}]`,h=wy((f==null?void 0:f.getAttribute("data-slide-width"))??null,Ul),g=wy((f==null?void 0:f.getAttribute("data-slide-height"))??null,Il),x=d.map((C,E)=>{const A=C.getAttribute("data-editable")||"block",R=C.getAttribute(Ee)||K0(E,A);return{id:R,selector:Hd(R),type:A==="block"&&C.getAttribute("data-group")==="true"?"group":A,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),p=c.querySelector("h1, h2, title"),S=((T=p==null?void 0:p.textContent)==null?void 0:T.trim())||`Slide ${l}`;return{id:o2(l),title:S,htmlSource:i,rootSelector:m,width:h,height:g,elements:x}}function Ke(n,l){return n.querySelector(Hd(l))}function c2(n,l,o){const i=Bs(n.htmlSource);if(!i)return"";const c=Ke(i,l);return(c==null?void 0:c.style.getPropertyValue(o).trim())||""}function ul(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Bd(n){return`<!DOCTYPE html>
51
+ ${n.documentElement.outerHTML}`}function Vr(n,l){const o=ul(n);return o?(l(o),Bd(o)):n}const Ud=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Q0(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Po(n){const l=Q0();for(const o of Ud){const i=n.style[o];l[o]=i||null}return l}function ld(n){return{...Q0(),...n}}function Gn(n){const l=n||"",o=l.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=l.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 Nf(n){return Math.round(n*100)/100}function Ta(n,l,o){const i=[];return(Math.abs(n)>.01||Math.abs(l)>.01)&&i.push(`translate(${Nf(n)}px, ${Nf(l)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Nf(o)}deg)`),i.length?i.join(" "):null}function Lr(n,l,o){return{x:o.offsetX+(n.left-l.left)*o.scale,y:o.offsetY+(n.top-l.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function jl(n,l){return{...l,hidden:n.hidden,sourceFile:n.sourceFile}}function Z0(n,l){if(l.type==="slide.visibility.update")return n.id!==l.slideId?n:{...n,hidden:l.nextHidden};if(!("slideId"in l)||l.type==="slide.reorder"||n.id!==l.slideId)return n;switch(l.type){case"operation.batch":return l.operations.reduce((o,i)=>Z0(o,i),n);case"text.update":return jl(n,Zn(f2(n.htmlSource,l.elementId,l.nextText),n.id));case"style.update":return jl(n,Zn(d2(n.htmlSource,l.elementId,l.propertyName,l.nextValue),n.id));case"attribute.update":return jl(n,Zn(m2(n.htmlSource,l.elementId,l.attributeName,l.nextValue),n.id));case"element.layout.update":return jl(n,Zn(p2(n.htmlSource,l.elementId,l.nextStyle),n.id));case"element.insert":return jl(n,Zn(g2(n.htmlSource,l),n.id));case"element.remove":return jl(n,Zn(y2(n.htmlSource,l.elementId),n.id));case"group.create":case"group.ungroup":return jl(n,Zn(l.nextHtmlSource,n.id))}}function J0(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(l=>J0(l)).reverse(),timestamp:n.timestamp};case"text.update":return{...n,previousText:n.nextText,nextText:n.previousText};case"style.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"attribute.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"element.layout.update":return{...n,previousStyle:n.nextStyle,nextStyle:n.previousStyle};case"element.insert":return{type:"element.remove",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"element.remove":return{type:"element.insert",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"group.create":return{type:"group.ungroup",slideId:n.slideId,groupElementId:n.groupElementId,childElementIds:n.elementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"group.ungroup":return{type:"group.create",slideId:n.slideId,groupElementId:n.groupElementId,elementIds:n.childElementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"slide.create":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.delete":return{type:"slide.create",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.duplicate":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.reorder":return{...n,fromIndex:n.toIndex,toIndex:n.fromIndex};case"slide.visibility.update":return{...n,previousHidden:n.nextHidden,nextHidden:n.previousHidden}}}function gs(n){const l=Number.parseFloat(n||"");return Number.isFinite(l)?l:0}function Ey(n){const l=Gn(n.style.transform);return{x:gs(n.style.left)+l.translateX,y:gs(n.style.top)+l.translateY,width:gs(n.style.width)||Ul,height:gs(n.style.height)||Il}}function Us(n,l={}){let o=n,i=0,c=0;const f=n.getAttribute(Ee)??"",d=l[f]??Ey(n),m=d.width,h=d.height;for(;o;){const g=o.getAttribute(Ee)??"",x=l[g]??Ey(o);i+=x.x,c+=x.y;const p=o.parentElement;if(!p||!p.hasAttribute("data-editable"))break;o=p}return{x:i,y:c,width:m,height:h}}function W0(n,l={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Us(o,l);return{x:i.x,y:i.y}}function rd(n,l){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(l.x*100)/100}px`,n.style.top=`${Math.round(l.y*100)/100}px`,n.style.width=`${Math.round(l.width*100)/100}px`,n.style.height=`${Math.round(l.height*100)/100}px`;const o=Gn(n.style.transform),i=Ta(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Ty(n,l){l&&(l.color&&(n.style.color=l.color),l.fontSize&&(n.style.fontSize=l.fontSize),l.fontWeight&&(n.style.fontWeight=l.fontWeight),l.fontStyle&&(n.style.fontStyle=l.fontStyle),l.lineHeight&&(n.style.lineHeight=l.lineHeight),l.textAlign&&(n.style.textAlign=l.textAlign),l.paddingTop&&(n.style.paddingTop=l.paddingTop),l.paddingRight&&(n.style.paddingRight=l.paddingRight),l.paddingBottom&&(n.style.paddingBottom=l.paddingBottom),l.paddingLeft&&(n.style.paddingLeft=l.paddingLeft),l.listStylePosition&&(n.style.listStylePosition=l.listStylePosition),l.listStyleType&&(n.style.listStyleType=l.listStyleType))}function Of(n){const l=n.parentElement;return l&&(l.hasAttribute(Bl)||l.hasAttribute("data-editable"))?l:null}function od(n){return Array.from(n.children).filter(l=>l instanceof HTMLElement&&l.hasAttribute("data-editable"))}function ev(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function tv(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Ee}]`)).map(d=>d.getAttribute(Ee)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),c=(i==null?void 0:i[1])||l;let f=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${c}-${f}`);)f+=1;return`${c}-${f}`}function u2(n,l){return Array.from(n.children).filter(o=>o instanceof HTMLElement?o.hasAttribute("data-editable")?!0:ev(o)?(o.setAttribute("data-editable","block"),o.getAttribute(Ee)||o.setAttribute(Ee,tv(l,"block-1")),!0):!1:!1)}function f2(n,l,o){return Vr(n,i=>{const c=Ke(i,l);c&&(c.textContent=o)})}function d2(n,l,o,i){return Vr(n,c=>{var d;const f=Ke(c,l);f&&(i.trim().length===0?f.style.removeProperty(o):f.style.setProperty(o,i),(d=f.getAttribute("style"))!=null&&d.trim()||f.removeAttribute("style"))})}function m2(n,l,o,i){return Vr(n,c=>{const f=Ke(c,l);f&&(i.trim().length===0?f.removeAttribute(o):f.setAttribute(o,i))})}function h2(n,l){var o;for(const i of Ud){const c=l[i];if(c===null){n.style[i]="";continue}n.style[i]=c}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function p2(n,l,o){return Vr(n,i=>{const c=Ke(i,l);c&&h2(c,o)})}function Is(n,l){const o=ul(n);if(!o)return null;const i=Ke(o,l);if(!i||!(i.parentElement instanceof HTMLElement))return null;const c=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Ee):null,f=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Ee):null;return{parentElementId:i.parentElement.getAttribute(Ee),previousSiblingElementId:c,nextSiblingElementId:f}}function Gs(n,l){var i;const o=ul(n);return o?((i=Ke(o,l))==null?void 0:i.outerHTML)??null:null}function nv(n,l){var f;const o=ul(`<template>${n}</template>`),i=(f=o==null?void 0:o.querySelector("template"))==null?void 0:f.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const c=[i,...Array.from(i.querySelectorAll(`[${Ee}]`))];for(const d of c){const m=d.getAttribute(Ee);m&&l[m]&&d.setAttribute(Ee,l[m])}return i.outerHTML}function id(n,l){const o=ul(n);return o?tv(o,l):l}function g2(n,l){return Vr(n,o=>{var h;if(Ke(o,l.elementId))return;const i=ul(`<template>${l.html}</template>`),c=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(c instanceof HTMLElement))return;const f=(l.parentElementId?Ke(o,l.parentElementId):null)??o.querySelector(`[${Bl}]`)??o.body,d=l.nextSiblingElementId?Ke(o,l.nextSiblingElementId):null,m=l.previousSiblingElementId?Ke(o,l.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===f?f.insertBefore(o.importNode(c,!0),d):(m==null?void 0:m.parentElement)===f?m.after(o.importNode(c,!0)):f.appendChild(o.importNode(c,!0))})}function y2(n,l){return Vr(n,o=>{var i;(i=Ke(o,l))==null||i.remove()})}function v2({html:n,slideId:l,groupElementId:o,elementIds:i,elementRects:c={},timestamp:f=Date.now()}){const d=ul(n);if(!d||!i.length)return null;const m=i.map(G=>Ke(d,G)).filter(G=>!!G);if(m.length!==i.length)return null;const g=m.flatMap(G=>G.getAttribute("data-group")==="true"?od(G):[G]).filter((G,H,O)=>O.findIndex(F=>F===G)===H);if(g.length<2)return null;const x=Of(m[0]);if(!x||m.some(G=>Of(G)!==x)||Ke(d,o))return null;const p=m.filter(G=>G.getAttribute("data-group")==="true"),S=g.map(G=>Us(G,c)),T=Math.min(...S.map(G=>G.x)),C=Math.min(...S.map(G=>G.y)),E=Math.max(...S.map(G=>G.x+G.width)),A=Math.max(...S.map(G=>G.y+G.height)),R=W0(m[0],c),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(Ee,o),rd(z,{x:T-R.x,y:C-R.y,width:E-T,height:A-C});const N=Array.from(x.children).flatMap(G=>G instanceof HTMLElement?p.includes(G)?od(G).filter(H=>g.includes(H)):g.includes(G)?[G]:[]:[]),B=m.find(G=>Of(G)===x)??null;(B==null?void 0:B.parentElement)===x?x.insertBefore(z,B):x.appendChild(z);for(const G of N){const H=Us(G,c);rd(G,{x:H.x-T,y:H.y-C,width:H.width,height:H.height}),z.appendChild(G)}for(const G of p)G.children.length||G.remove();const te=Bd(d);return te===n?null:{type:"group.create",slideId:l,groupElementId:o,elementIds:N.map(G=>G.getAttribute(Ee)).filter(G=>!!G),previousHtmlSource:n,nextHtmlSource:te,timestamp:f}}function b2({html:n,slideId:l,groupElementId:o,elementRects:i={},elementPresentationStyles:c={},timestamp:f=Date.now()}){const d=ul(n);if(!d)return null;const m=Ke(d,o);if(!m||!m.parentElement)return null;const h=m.parentElement,g=W0(m,i),x=m.getAttribute("data-group")==="true",p=x?od(m):u2(m,d);if(!p.length)return null;const S=m.getAttribute(Ee),T=x?m:m.nextSibling,C=p.map(A=>A.getAttribute(Ee)).filter(A=>!!A);for(const A of p){const R=Us(A,i);if(rd(A,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!x){const z=A.getAttribute(Ee)??"";Ty(A,c[z]),ev(A)&&(A.style.margin="0px");for(const N of Array.from(A.querySelectorAll(`[data-editable][${Ee}]`))){const B=N.getAttribute(Ee)??"";Ty(N,c[B])}}h.insertBefore(A,T)}x&&m.remove();const E=Bd(d);return E===n?null:{type:"group.ungroup",slideId:l,groupElementId:o,childElementIds:x||!S?C:[S,...C],previousHtmlSource:n,nextHtmlSource:E,timestamp:f}}const x2=`<!DOCTYPE html>
52
+ <html lang="en">
53
+ <head>
54
+ <meta charset="utf-8" />
55
+ <title>Untitled Slide</title>
56
+ </head>
57
+ <body>
58
+ <main
59
+ data-slide-root="true"
60
+ data-slide-width="1920"
61
+ data-slide-height="1080"
62
+ data-editor-id="slide-root"
63
+ style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #ffffff;"
64
+ >
65
+ <h1 data-editable="text" data-editor-id="text-1" style="position: absolute; left: 160px; top: 160px; width: 1200px; margin: 0; font-size: 96px; line-height: 1.05;">
66
+ Untitled Slide
67
+ </h1>
68
+ </main>
69
+ </body>
70
+ </html>`;function av(n,l){const o=new Set(n.map(c=>c.id));if(!o.has(l))return l;let i=2;for(;o.has(`${l}-${i}`);)i+=1;return`${l}-${i}`}function lv(n,l){const o=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!o.has(l))return l;const i=l.lastIndexOf("."),c=i>=0?l.slice(0,i):l,f=i>=0?l.slice(i):"";let d=2;for(;o.has(`${c}-${d}${f}`);)d+=1;return`${c}-${d}${f}`}function S2(n,l){const o=Math.max(l+1,1),i=av(n,`generated-slide-${o}`),c=lv(n,`${String(o).padStart(2,"0")}-untitled.html`);return{...Zn(x2,i),hidden:!1,sourceFile:c,title:"Untitled Slide"}}function w2(n,l){const o=av(n,`${l.id}-copy`),i=lv(n,l.sourceFile?E2(l.sourceFile,"copy"):`${o}.html`);return{...Zn(l.htmlSource,o),hidden:l.hidden===!0,sourceFile:i,title:l.title}}function E2(n,l){const o=n.lastIndexOf(".");return o<0?`${n}-${l}`:`${n.slice(0,o)}-${l}${n.slice(o)}`}function Cy(n,l){return Math.min(Math.max(n,0),l)}function zf(n,l){switch(l.type){case"slide.create":case"slide.duplicate":{const o=Cy(l.index,n.length);return[...n.slice(0,o),l.slide,...n.slice(o)]}case"slide.delete":return n.filter(o=>o.id!==l.slide.id);case"slide.reorder":{const o=n.findIndex(f=>f.id===l.slideId);if(o<0)return n;const i=[...n],[c]=i.splice(o,1);return c?(i.splice(Cy(l.toIndex,i.length),0,c),i):n}default:return n.map(o=>Z0(o,l))}}function rv(n){return{slides:n,undoStack:[],redoStack:[]}}function ys(n,l){switch(l.type){case"history.reset":return rv(l.slides);case"history.commit":return{slides:zf(n.slides,l.operation),undoStack:[...n.undoStack,l.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:zf(n.slides,J0(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:zf(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function T2({manifestUrl:n,fetchImpl:l,requestInit:o,slideIdPrefix:i="generated-slide-"}){var p;const c=l??globalThis.fetch;if(!c)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const f={cache:"no-store",...o},d=await c(n,f);if(!d.ok)return null;const m=await d.json();if(!((p=m.slides)!=null&&p.length))return null;const h=d.url||n,g=new URL(h),x=await Promise.all(m.slides.map(async(S,T)=>{const C=new URL(S.file,h);for(const[z,N]of g.searchParams)C.searchParams.has(z)||C.searchParams.set(z,N);const E=await c(C.toString(),f);if(!E.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await E.text(),R=Zn(A,`${i}${T+1}`);return{...R,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||R.title}}));return{manifest:m,slides:x}}/**
71
+ * @license lucide-react v1.14.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const ov=(...n)=>n.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).join(" ").trim();/**
76
+ * @license lucide-react v1.14.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const C2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
81
+ * @license lucide-react v1.14.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const M2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
86
+ * @license lucide-react v1.14.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const My=n=>{const l=M2(n);return l.charAt(0).toUpperCase()+l.slice(1)};/**
91
+ * @license lucide-react v1.14.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */var Df={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
96
+ * @license lucide-react v1.14.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const A2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},_2=b.createContext({}),R2=()=>b.useContext(_2),N2=b.forwardRef(({color:n,size:l,strokeWidth:o,absoluteStrokeWidth:i,className:c="",children:f,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:p=!1,color:S="currentColor",className:T=""}=R2()??{},C=i??p?Number(o??x)*24/Number(l??g):o??x;return b.createElement("svg",{ref:h,...Df,width:l??g??Df.width,height:l??g??Df.height,stroke:n??S,strokeWidth:C,className:ov("lucide",T,c),...!f&&!A2(m)&&{"aria-hidden":"true"},...m},[...d.map(([E,A])=>b.createElement(E,A)),...Array.isArray(f)?f:[f]])});/**
101
+ * @license lucide-react v1.14.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Ne=(n,l)=>{const o=b.forwardRef(({className:i,...c},f)=>b.createElement(N2,{ref:f,iconNode:l,className:ov(`lucide-${C2(My(n))}`,`lucide-${n}`,i),...c}));return o.displayName=My(n),o};/**
106
+ * @license lucide-react v1.14.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const O2=[["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"}]],sd=Ne("align-center-horizontal",O2);/**
111
+ * @license lucide-react v1.14.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const z2=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]],iv=Ne("align-center-vertical",z2);/**
116
+ * @license lucide-react v1.14.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const D2=[["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"}]],sv=Ne("align-end-horizontal",D2);/**
121
+ * @license lucide-react v1.14.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const j2=[["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"}]],cv=Ne("align-end-vertical",j2);/**
126
+ * @license lucide-react v1.14.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const k2=[["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"}]],uv=Ne("align-start-horizontal",k2);/**
131
+ * @license lucide-react v1.14.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const L2=[["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"}]],fv=Ne("align-start-vertical",L2);/**
136
+ * @license lucide-react v1.14.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const H2=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],dv=Ne("arrow-down-to-line",H2);/**
141
+ * @license lucide-react v1.14.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const B2=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],cd=Ne("arrow-up-to-line",B2);/**
146
+ * @license lucide-react v1.14.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const U2=[["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"}]],I2=Ne("box",U2);/**
151
+ * @license lucide-react v1.14.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const G2=[["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"}]],jf=Ne("case-sensitive",G2);/**
156
+ * @license lucide-react v1.14.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Y2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mv=Ne("check",Y2);/**
161
+ * @license lucide-react v1.14.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const V2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zo=Ne("chevron-down",V2);/**
166
+ * @license lucide-react v1.14.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const q2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],P2=Ne("chevron-right",q2);/**
171
+ * @license lucide-react v1.14.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const X2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Id=Ne("chevron-up",X2);/**
176
+ * @license lucide-react v1.14.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const $2=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],K2=Ne("cloud",$2);/**
181
+ * @license lucide-react v1.14.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const F2=[["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"}]],ud=Ne("columns-3",F2);/**
186
+ * @license lucide-react v1.14.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const Q2=[["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"}]],hv=Ne("copy",Q2);/**
191
+ * @license lucide-react v1.14.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Z2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],J2=Ne("download",Z2);/**
196
+ * @license lucide-react v1.14.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const W2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Ay=Ne("eye-off",W2);/**
201
+ * @license lucide-react v1.14.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const eE=[["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"}]],pv=Ne("eye",eE);/**
206
+ * @license lucide-react v1.14.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const tE=[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],nE=Ne("file-check-corner",tE);/**
211
+ * @license lucide-react v1.14.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const aE=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],lE=Ne("file-code-corner",aE);/**
216
+ * @license lucide-react v1.14.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const rE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gv=Ne("file-text",rE);/**
221
+ * @license lucide-react v1.14.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const oE=[["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"}]],fd=Ne("group",oE);/**
226
+ * @license lucide-react v1.14.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const iE=[["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"}]],sE=Ne("hash",iE);/**
231
+ * @license lucide-react v1.14.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const cE=[["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"}]],yv=Ne("layers",cE);/**
236
+ * @license lucide-react v1.14.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const uE=[["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"}]],fE=Ne("link-2",uE);/**
241
+ * @license lucide-react v1.14.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const dE=[["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"}]],_y=Ne("lock",dE);/**
246
+ * @license lucide-react v1.14.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const mE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],hE=Ne("maximize-2",mE);/**
251
+ * @license lucide-react v1.14.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const pE=[["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"}]],Ry=Ne("palette",pE);/**
256
+ * @license lucide-react v1.14.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const gE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],yE=Ne("pen",gE);/**
261
+ * @license lucide-react v1.14.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const vE=[["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"}]],bE=Ne("pilcrow",vE);/**
266
+ * @license lucide-react v1.14.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const xE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],SE=Ne("play",xE);/**
271
+ * @license lucide-react v1.14.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const wE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kf=Ne("plus",wE);/**
276
+ * @license lucide-react v1.14.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const EE=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],TE=Ne("presentation",EE);/**
281
+ * @license lucide-react v1.14.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const CE=[["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"}]],ME=Ne("rotate-cw",CE);/**
286
+ * @license lucide-react v1.14.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const AE=[["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"}]],vv=Ne("rows-3",AE);/**
291
+ * @license lucide-react v1.14.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const _E=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ny=Ne("square",_E);/**
296
+ * @license lucide-react v1.14.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const RE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],NE=Ne("text-align-center",RE);/**
301
+ * @license lucide-react v1.14.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const OE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],zE=Ne("text-align-end",OE);/**
306
+ * @license lucide-react v1.14.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const DE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],jE=Ne("text-align-start",DE);/**
311
+ * @license lucide-react v1.14.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const kE=[["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"}]],bv=Ne("trash-2",kE);/**
316
+ * @license lucide-react v1.14.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const LE=[["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"}]],Oy=Ne("type",LE);/**
321
+ * @license lucide-react v1.14.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const HE=[["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"}]],xv=Ne("ungroup",HE);/**
326
+ * @license lucide-react v1.14.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const BE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sv=Ne("x",BE);/**
331
+ * @license lucide-react v1.14.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const UE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],IE=Ne("zap",UE);function wv(n){var l,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(l=0;l<c;l++)n[l]&&(o=wv(n[l]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Ev(){for(var n,l,o=0,i="",c=arguments.length;o<c;o++)(n=arguments[o])&&(l=wv(n))&&(i&&(i+=" "),i+=l);return i}const GE=(n,l)=>{const o=new Array(n.length+l.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<l.length;i++)o[n.length+i]=l[i];return o},YE=(n,l)=>({classGroupId:n,validator:l}),Tv=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),Ys="-",zy=[],VE="arbitrary..",qE=n=>{const l=XE(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return PE(d);const m=d.split(Ys),h=m[0]===""&&m.length>1?1:0;return Cv(m,h,l)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=o[d];return h?g?GE(g,h):h:g||zy}return o[d]||zy}}},Cv=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const c=n[l],f=o.nextPart.get(c);if(f){const g=Cv(n,l+1,f);if(g)return g}const d=o.validators;if(d===null)return;const m=l===0?n.join(Ys):n.slice(l).join(Ys),h=d.length;for(let g=0;g<h;g++){const x=d[g];if(x.validator(m))return x.classGroupId}},PE=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),i=l.slice(0,o);return i?VE+i:void 0})(),XE=n=>{const{theme:l,classGroups:o}=n;return $E(o,l)},$E=(n,l)=>{const o=Tv();for(const i in n){const c=n[i];Gd(c,o,i,l)}return o},Gd=(n,l,o,i)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];KE(d,l,o,i)}},KE=(n,l,o,i)=>{if(typeof n=="string"){FE(n,l,o);return}if(typeof n=="function"){QE(n,l,o,i);return}ZE(n,l,o,i)},FE=(n,l,o)=>{const i=n===""?l:Mv(l,n);i.classGroupId=o},QE=(n,l,o,i)=>{if(JE(n)){Gd(n(i),l,o,i);return}l.validators===null&&(l.validators=[]),l.validators.push(YE(o,n))},ZE=(n,l,o,i)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,h]=c[d];Gd(h,Mv(l,m),o,i)}},Mv=(n,l)=>{let o=n;const i=l.split(Ys),c=i.length;for(let f=0;f<c;f++){const d=i[f];let m=o.nextPart.get(d);m||(m=Tv(),o.nextPart.set(d,m)),o=m}return o},JE=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,WE=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),i=Object.create(null);const c=(f,d)=>{o[f]=d,l++,l>n&&(l=0,i=o,o=Object.create(null))};return{get(f){let d=o[f];if(d!==void 0)return d;if((d=i[f])!==void 0)return c(f,d),d},set(f,d){f in o?o[f]=d:c(f,d)}}},dd="!",Dy=":",eT=[],jy=(n,l,o,i,c)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:i,isExternal:c}),tT=n=>{const{prefix:l,experimentalParseClassName:o}=n;let i=c=>{const f=[];let d=0,m=0,h=0,g;const x=c.length;for(let E=0;E<x;E++){const A=c[E];if(d===0&&m===0){if(A===Dy){f.push(c.slice(h,E)),h=E+1;continue}if(A==="/"){g=E;continue}}A==="["?d++:A==="]"?d--:A==="("?m++:A===")"&&m--}const p=f.length===0?c:c.slice(h);let S=p,T=!1;p.endsWith(dd)?(S=p.slice(0,-1),T=!0):p.startsWith(dd)&&(S=p.slice(1),T=!0);const C=g&&g>h?g-h:void 0;return jy(f,T,S,C)};if(l){const c=l+Dy,f=i;i=d=>d.startsWith(c)?f(d.slice(c.length)):jy(eT,!1,d,void 0,!0)}if(o){const c=i;i=f=>o({className:f,parseClassName:c})}return i},nT=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{l.set(o,1e6+i)}),o=>{const i=[];let c=[];for(let f=0;f<o.length;f++){const d=o[f],m=d[0]==="[",h=l.has(d);m||h?(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}},aT=n=>({cache:WE(n.cacheSize),parseClassName:tT(n),sortModifiers:nT(n),...qE(n)}),lT=/\s+/,rT=(n,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:f}=l,d=[],m=n.trim().split(lT);let h="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:p,modifiers:S,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:E}=o(x);if(p){h=x+(h.length>0?" "+h:h);continue}let A=!!E,R=i(A?C.substring(0,E):C);if(!R){if(!A){h=x+(h.length>0?" "+h:h);continue}if(R=i(C),!R){h=x+(h.length>0?" "+h:h);continue}A=!1}const z=S.length===0?"":S.length===1?S[0]:f(S).join(":"),N=T?z+dd:z,B=N+R;if(d.indexOf(B)>-1)continue;d.push(B);const te=c(R,A);for(let G=0;G<te.length;++G){const H=te[G];d.push(N+H)}h=x+(h.length>0?" "+h:h)}return h},oT=(...n)=>{let l=0,o,i,c="";for(;l<n.length;)(o=n[l++])&&(i=Av(o))&&(c&&(c+=" "),c+=i);return c},Av=n=>{if(typeof n=="string")return n;let l,o="";for(let i=0;i<n.length;i++)n[i]&&(l=Av(n[i]))&&(o&&(o+=" "),o+=l);return o},iT=(n,...l)=>{let o,i,c,f;const d=h=>{const g=l.reduce((x,p)=>p(x),n());return o=aT(g),i=o.cache.get,c=o.cache.set,f=m,m(h)},m=h=>{const g=i(h);if(g)return g;const x=rT(h,o);return c(h,x),x};return f=d,(...h)=>f(oT(...h))},sT=[],Nt=n=>{const l=o=>o[n]||sT;return l.isThemeGetter=!0,l},_v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fT=/\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$/,dT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tl=n=>cT.test(n),He=n=>!!n&&!Number.isNaN(Number(n)),nl=n=>!!n&&Number.isInteger(Number(n)),Lf=n=>n.endsWith("%")&&He(n.slice(0,-1)),Ea=n=>uT.test(n),Nv=()=>!0,pT=n=>fT.test(n)&&!dT.test(n),Yd=()=>!1,gT=n=>mT.test(n),yT=n=>hT.test(n),vT=n=>!xe(n)&&!Se(n),bT=n=>fl(n,Dv,Yd),xe=n=>_v.test(n),kl=n=>fl(n,jv,pT),ky=n=>fl(n,AT,He),xT=n=>fl(n,Lv,Nv),ST=n=>fl(n,kv,Yd),Ly=n=>fl(n,Ov,Yd),wT=n=>fl(n,zv,yT),vs=n=>fl(n,Hv,gT),Se=n=>Rv.test(n),Go=n=>ql(n,jv),ET=n=>ql(n,kv),Hy=n=>ql(n,Ov),TT=n=>ql(n,Dv),CT=n=>ql(n,zv),bs=n=>ql(n,Hv,!0),MT=n=>ql(n,Lv,!0),fl=(n,l,o)=>{const i=_v.exec(n);return i?i[1]?l(i[1]):o(i[2]):!1},ql=(n,l,o=!1)=>{const i=Rv.exec(n);return i?i[1]?l(i[1]):o:!1},Ov=n=>n==="position"||n==="percentage",zv=n=>n==="image"||n==="url",Dv=n=>n==="length"||n==="size"||n==="bg-size",jv=n=>n==="length",AT=n=>n==="number",kv=n=>n==="family-name",Lv=n=>n==="number"||n==="weight",Hv=n=>n==="shadow",_T=()=>{const n=Nt("color"),l=Nt("font"),o=Nt("text"),i=Nt("font-weight"),c=Nt("tracking"),f=Nt("leading"),d=Nt("breakpoint"),m=Nt("container"),h=Nt("spacing"),g=Nt("radius"),x=Nt("shadow"),p=Nt("inset-shadow"),S=Nt("text-shadow"),T=Nt("drop-shadow"),C=Nt("blur"),E=Nt("perspective"),A=Nt("aspect"),R=Nt("ease"),z=Nt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],te=()=>[...B(),Se,xe],G=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],O=()=>[Se,xe,h],F=()=>[tl,"full","auto",...O()],ee=()=>[nl,"none","subgrid",Se,xe],fe=()=>["auto",{span:["full",nl,Se,xe]},nl,Se,xe],W=()=>[nl,"auto",Se,xe],P=()=>["auto","min","max","fr",Se,xe],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...O()],j=()=>[tl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],Y=()=>[tl,"screen","full","dvw","lvw","svw","min","max","fit",...O()],V=()=>[tl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],U=()=>[n,Se,xe],_=()=>[...B(),Hy,Ly,{position:[Se,xe]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",TT,bT,{size:[Se,xe]}],ie=()=>[Lf,Go,kl],ne=()=>["","none","full",g,Se,xe],me=()=>["",He,Go,kl],ce=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[He,Lf,Hy,Ly],be=()=>["","none",C,Se,xe],Me=()=>["none",He,Se,xe],Ae=()=>["none",He,Se,xe],$e=()=>[He,Se,xe],Ge=()=>[tl,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ea],breakpoint:[Ea],color:[Nv],container:[Ea],"drop-shadow":[Ea],ease:["in","out","in-out"],font:[vT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ea],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ea],shadow:[Ea],spacing:["px",He],text:[Ea],"text-shadow":[Ea],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tl,xe,Se,A]}],container:["container"],columns:[{columns:[He,xe,Se,m]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:te()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[nl,"auto",Se,xe]}],basis:[{basis:[tl,"full","auto",m,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,tl,"auto","initial","none",xe]}],grow:[{grow:["",He,Se,xe]}],shrink:[{shrink:["",He,Se,xe]}],order:[{order:[nl,"first","last","none",Se,xe]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[m,"screen",...j()]}],"min-w":[{"min-w":[m,"screen","none",...j()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",o,Go,kl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,MT,xT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lf,xe]}],"font-family":[{font:[ET,ST,l]}],"font-features":[{"font-features":[xe]}],"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,Se,xe]}],"line-clamp":[{"line-clamp":[He,"none",Se,ky]}],leading:[{leading:[f,...O()]}],"list-image":[{"list-image":["none",Se,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Se,kl]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[He,"auto",Se,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,xe]}],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",Se,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nl,Se,xe],radial:["",Se,xe],conic:[nl,Se,xe]},CT,wT]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Se,xe]}],"outline-w":[{outline:["",He,Go,kl]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",x,bs,vs]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",p,bs,vs]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[He,kl]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",S,bs,vs]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[He,Se,xe]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Se,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"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":B()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,xe]}],filter:[{filter:["","none",Se,xe]}],blur:[{blur:be()}],brightness:[{brightness:[He,Se,xe]}],contrast:[{contrast:[He,Se,xe]}],"drop-shadow":[{"drop-shadow":["","none",T,bs,vs]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",He,Se,xe]}],"hue-rotate":[{"hue-rotate":[He,Se,xe]}],invert:[{invert:["",He,Se,xe]}],saturate:[{saturate:[He,Se,xe]}],sepia:[{sepia:["",He,Se,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,xe]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[He,Se,xe]}],"backdrop-contrast":[{"backdrop-contrast":[He,Se,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Se,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Se,xe]}],"backdrop-invert":[{"backdrop-invert":["",He,Se,xe]}],"backdrop-opacity":[{"backdrop-opacity":[He,Se,xe]}],"backdrop-saturate":[{"backdrop-saturate":[He,Se,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Se,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Se,xe]}],ease:[{ease:["linear","initial",R,Se,xe]}],delay:[{delay:[He,Se,xe]}],animate:[{animate:["none",z,Se,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Se,xe]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[Se,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"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",Se,xe]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Se,xe]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[He,Go,kl,ky]}],stroke:[{stroke:["none",...U()]}],"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"]}},RT=iT(_T);function Ze(...n){return RT(Ev(n))}const NT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:lE},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:gv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:TE,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:K2,soon:!0}];function OT({title:n,onTitleChange:l,onPresent:o,onExportPdf:i,onExportHtml:c,pdfSlides:f=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=b.useState(!1),[x,p]=b.useState(!1),[S,T]=b.useState(0),C=b.useRef(null),E=n||"Untitled presentation";b.useEffect(()=>{const z=N=>{C.current&&!C.current.contains(N.target)&&g(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const A=b.useCallback(z=>{if(!z)return;const N=z.getBoundingClientRect().width;T(Math.ceil(N))},[]),R=z=>{if(g(!1),z.soon){rl(`${z.label} is not available yet.`,{description:"We are still building this export option."});return}if(z.id==="pdf"){p(!0);return}if(z.id==="html"){c==null||c();return}rl(`Exporting as ${z.label}...`)};return v.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[v.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[v.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:v.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),v.jsx("div",{className:"w-px h-5 bg-foreground/10"}),v.jsxs("div",{className:"relative min-w-0 flex-1",children:[v.jsx("input",{value:n,onChange:z=>l==null?void 0:l(z.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:S?{width:`${S}px`}:void 0,placeholder:"Untitled presentation"}),v.jsx("span",{ref:A,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:E},E)]}),m?v.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]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("div",{className:"relative",ref:C,children:[v.jsxs("button",{type:"button",onClick:()=>g(z=>!z),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[v.jsx(J2,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Export"}),v.jsx(Zo,{className:Ze("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&v.jsxs("div",{className:"absolute right-0 mt-1.5 w-[280px] bg-white rounded-xl border border-foreground/[0.08] shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] p-1.5 animate-fade-in z-50",children:[v.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),NT.map(z=>{const N=z.icon;return v.jsxs("button",{type:"button",onClick:()=>R(z),className:Ze("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",z.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[v.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:v.jsx(N,{className:"w-3.5 h-3.5 text-foreground/70"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-[13px] font-medium text-foreground",children:z.label}),z.soon&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),v.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:z.desc})]}),!z.soon&&v.jsx(mv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},z.id)})]})]}),v.jsxs("button",{type:"button",onClick:o,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[v.jsx(SE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Present"})]})]}),x?v.jsx(zT,{slides:f,thumbnails:d,onClose:()=>p(!1),onExport:z=>{p(!1),i==null||i(z)}}):null]})}function zT({slides:n,thumbnails:l,onClose:o,onExport:i}){const c=n.filter(C=>C.file),[f,d]=b.useState("all"),[m,h]=b.useState([]),g=new Set(m),x=m.length,p=f==="all"||f==="selected"&&x>0;b.useEffect(()=>{const C=E=>{E.key==="Escape"&&o()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[o]);const S=(C,E)=>{h(A=>E?A.includes(C)?A:[...A,C]:A.filter(R=>R!==C))},T=()=>{if(f==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&o()},children:v.jsxs("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"pdf-export-title",className:"relative m-0 flex max-h-[86vh] w-full max-w-[680px] flex-col overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]",children:[v.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(gv,{className:"h-4 w-4 text-foreground/70"})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),v.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),v.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:o,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:v.jsx(Sv,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[v.jsxs("fieldset",{className:"space-y-2",children:[v.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),v.jsx(By,{checked:f==="all",icon:yv,label:"All slides",detail:`${c.length} slides`,onChange:()=>d("all")}),v.jsx(By,{checked:f==="selected",icon:nE,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>d("selected")})]}),f==="selected"?v.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[v.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),v.jsx("div",{className:"grid max-h-[360px] grid-cols-2 gap-2 overflow-auto p-2 max-[620px]:grid-cols-1","data-testid":"pdf-slide-picker",children:c.map((C,E)=>{const A=C.file;return A?v.jsxs("label",{"data-testid":"pdf-slide-option",className:Ze("grid cursor-pointer grid-cols-[104px_1fr] gap-2 rounded-md border border-foreground/[0.08] bg-white p-2 text-[12px] transition-colors hover:border-foreground/20 hover:bg-foreground/[0.025]",g.has(A)&&"border-foreground/35 bg-foreground/[0.035]"),children:[v.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:l[C.id]?v.jsx("img",{alt:`Slide ${E+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:l[C.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",E+1]})}),v.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("input",{type:"checkbox","aria-label":`Select slide ${E+1}`,checked:g.has(A),onChange:R=>S(A,R.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:E+1}),v.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:C.title})]})]})})]},C.id):null})})]}):null]}),v.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx("button",{type:"button",onClick:o,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),v.jsx("button",{type:"button",onClick:T,disabled:!p,className:"h-8 rounded-md bg-foreground px-3.5 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:opacity-40",children:"Export PDF"})]})]})})}function By({checked:n,disabled:l,icon:o,label:i,detail:c,onChange:f}){return v.jsxs("label",{className:Ze("flex cursor-pointer items-center gap-3 rounded-md border border-foreground/[0.08] px-3 py-2.5 transition-colors",n&&"border-foreground/30 bg-foreground/[0.035]",l?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[v.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:l,onChange:f,className:"h-3.5 w-3.5 accent-foreground"}),v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(o,{className:"h-4 w-4 text-foreground/65"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),v.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:c})]})]})}const Uy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Iy=Ev,DT=(n,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return Iy(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:c,defaultVariants:f}=l,d=Object.keys(c).map(g=>{const x=o==null?void 0:o[g],p=f==null?void 0:f[g];if(x===null)return null;const S=Uy(x)||Uy(p);return c[g][S]}),m=o&&Object.entries(o).reduce((g,x)=>{let[p,S]=x;return S===void 0||(g[p]=S),g},{}),h=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:p,className:S,...T}=x;return Object.entries(T).every(C=>{let[E,A]=C;return Array.isArray(A)?A.includes({...f,...m}[E]):{...f,...m}[E]===A})?[...g,p,S]:g},[]);return Iy(n,d,h,o==null?void 0:o.class,o==null?void 0:o.className)};function Gy(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Vd(...n){return l=>{let o=!1;const i=n.map(c=>{const f=Gy(c,l);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let c=0;c<i.length;c++){const f=i[c];typeof f=="function"?f():Gy(n[c],null)}}}}function ut(...n){return b.useCallback(Vd(...n),n)}function Ur(n){const l=kT(n),o=b.forwardRef((i,c)=>{const{children:f,...d}=i,m=b.Children.toArray(f),h=m.find(HT);if(h){const g=h.props.children,x=m.map(p=>p===h?b.Children.count(g)>1?b.Children.only(null):b.isValidElement(g)?g.props.children:null:p);return v.jsx(l,{...d,ref:c,children:b.isValidElement(g)?b.cloneElement(g,void 0,x):null})}return v.jsx(l,{...d,ref:c,children:f})});return o.displayName=`${n}.Slot`,o}var jT=Ur("Slot");function kT(n){const l=b.forwardRef((o,i)=>{const{children:c,...f}=o;if(b.isValidElement(c)){const d=UT(c),m=BT(f,c.props);return c.type!==b.Fragment&&(m.ref=i?Vd(i,d):d),b.cloneElement(c,m)}return b.Children.count(c)>1?b.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Bv=Symbol("radix.slottable");function LT(n){const l=({children:o})=>v.jsx(v.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=Bv,l}function HT(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Bv}function BT(n,l){const o={...l};for(const i in l){const c=n[i],f=l[i];/^on[A-Z]/.test(i)?c&&f?o[i]=(...m)=>{const h=f(...m);return c(...m),h}:c&&(o[i]=c):i==="style"?o[i]={...c,...f}:i==="className"&&(o[i]=[c,f].filter(Boolean).join(" "))}return{...n,...o}}function UT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var IT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=IT.reduce((n,l)=>{const o=Ur(`Primitive.${l}`),i=b.forwardRef((c,f)=>{const{asChild:d,...m}=c,h=d?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...m,ref:f})});return i.displayName=`Primitive.${l}`,{...n,[l]:i}},{});function Uv(n,l){n&&Qo.flushSync(()=>n.dispatchEvent(l))}var Iv=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"}),GT="VisuallyHidden",Gv=b.forwardRef((n,l)=>v.jsx(We.span,{...n,ref:l,style:{...Iv,...n.style}}));Gv.displayName=GT;var YT=Gv;function Pl(n,l=[]){let o=[];function i(f,d){const m=b.createContext(d),h=o.length;o=[...o,d];const g=p=>{var R;const{scope:S,children:T,...C}=p,E=((R=S==null?void 0:S[n])==null?void 0:R[h])||m,A=b.useMemo(()=>C,Object.values(C));return v.jsx(E.Provider,{value:A,children:T})};g.displayName=f+"Provider";function x(p,S){var E;const T=((E=S==null?void 0:S[n])==null?void 0:E[h])||m,C=b.useContext(T);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${f}\``)}return[g,x]}const c=()=>{const f=o.map(d=>b.createContext(d));return function(m){const h=(m==null?void 0:m[n])||f;return b.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return c.scopeName=n,[i,VT(c,...l)]}function VT(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const i=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(f){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const p=h(f)[`__scope${g}`];return{...m,...p}},{});return b.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return o.scopeName=l.scopeName,o}function qd(n){const l=n+"CollectionProvider",[o,i]=Pl(l),[c,f]=o(l,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:A,children:R}=E,z=he.useRef(null),N=he.useRef(new Map).current;return v.jsx(c,{scope:A,itemMap:N,collectionRef:z,children:R})};d.displayName=l;const m=n+"CollectionSlot",h=Ur(m),g=he.forwardRef((E,A)=>{const{scope:R,children:z}=E,N=f(m,R),B=ut(A,N.collectionRef);return v.jsx(h,{ref:B,children:z})});g.displayName=m;const x=n+"CollectionItemSlot",p="data-radix-collection-item",S=Ur(x),T=he.forwardRef((E,A)=>{const{scope:R,children:z,...N}=E,B=he.useRef(null),te=ut(A,B),G=f(x,R);return he.useEffect(()=>(G.itemMap.set(B,{ref:B,...N}),()=>void G.itemMap.delete(B))),v.jsx(S,{[p]:"",ref:te,children:z})});T.displayName=x;function C(E){const A=f(n+"CollectionConsumer",E);return he.useCallback(()=>{const z=A.collectionRef.current;if(!z)return[];const N=Array.from(z.querySelectorAll(`[${p}]`));return Array.from(A.itemMap.values()).sort((G,H)=>N.indexOf(G.ref.current)-N.indexOf(H.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:g,ItemSlot:T},C,i]}function Te(n,l,{checkForDefaultPrevented:o=!0}={}){return function(c){if(n==null||n(c),o===!1||!c.defaultPrevented)return l==null?void 0:l(c)}}var Pt=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},qT=P0[" useInsertionEffect ".trim().toString()]||Pt;function Vs({prop:n,defaultProp:l,onChange:o=()=>{},caller:i}){const[c,f,d]=PT({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:c;{const x=b.useRef(n!==void 0);b.useEffect(()=>{const p=x.current;p!==m&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=m},[m,i])}const g=b.useCallback(x=>{var p;if(m){const S=XT(x)?x(n):x;S!==n&&((p=d.current)==null||p.call(d,S))}else f(x)},[m,n,f,d]);return[h,g]}function PT({defaultProp:n,onChange:l}){const[o,i]=b.useState(n),c=b.useRef(o),f=b.useRef(l);return qT(()=>{f.current=l},[l]),b.useEffect(()=>{var d;c.current!==o&&((d=f.current)==null||d.call(f,o),c.current=o)},[o,c]),[o,i,f]}function XT(n){return typeof n=="function"}function $T(n,l){return b.useReducer((o,i)=>l[o][i]??o,n)}var qr=n=>{const{present:l,children:o}=n,i=KT(l),c=typeof o=="function"?o({present:i.isPresent}):b.Children.only(o),f=ut(i.ref,FT(c));return typeof o=="function"||i.isPresent?b.cloneElement(c,{ref:f}):null};qr.displayName="Presence";function KT(n){const[l,o]=b.useState(),i=b.useRef(null),c=b.useRef(n),f=b.useRef("none"),d=n?"mounted":"unmounted",[m,h]=$T(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const g=xs(i.current);f.current=m==="mounted"?g:"none"},[m]),Pt(()=>{const g=i.current,x=c.current;if(x!==n){const S=f.current,T=xs(g);n?h("MOUNT"):T==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(x&&S!==T?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,h]),Pt(()=>{if(l){let g;const x=l.ownerDocument.defaultView??window,p=T=>{const E=xs(i.current).includes(CSS.escape(T.animationName));if(T.target===l&&E&&(h("ANIMATION_END"),!c.current)){const A=l.style.animationFillMode;l.style.animationFillMode="forwards",g=x.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=A)})}},S=T=>{T.target===l&&(f.current=xs(i.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",p),l.addEventListener("animationend",p),()=>{x.clearTimeout(g),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",p),l.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:b.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function xs(n){return(n==null?void 0:n.animationName)||"none"}function FT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var QT=P0[" useId ".trim().toString()]||(()=>{}),ZT=0;function Ir(n){const[l,o]=b.useState(QT());return Pt(()=>{o(i=>i??String(ZT++))},[n]),n||(l?`radix-${l}`:"")}var JT=b.createContext(void 0);function Pd(n){const l=b.useContext(JT);return n||l||"ltr"}function Dn(n){const l=b.useRef(n);return b.useEffect(()=>{l.current=n}),b.useMemo(()=>(...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)},[])}function WT(n,l=globalThis==null?void 0:globalThis.document){const o=Dn(n);b.useEffect(()=>{const i=c=>{c.key==="Escape"&&o(c)};return l.addEventListener("keydown",i,{capture:!0}),()=>l.removeEventListener("keydown",i,{capture:!0})},[o,l])}var eC="DismissableLayer",md="dismissableLayer.update",tC="dismissableLayer.pointerDownOutside",nC="dismissableLayer.focusOutside",Yy,Yv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nc=b.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:d,onDismiss:m,...h}=n,g=b.useContext(Yv),[x,p]=b.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,T]=b.useState({}),C=ut(l,H=>p(H)),E=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(A),z=x?E.indexOf(x):-1,N=g.layersWithOutsidePointerEventsDisabled.size>0,B=z>=R,te=rC(H=>{const O=H.target,F=[...g.branches].some(ee=>ee.contains(O));!B||F||(c==null||c(H),d==null||d(H),H.defaultPrevented||m==null||m())},S),G=oC(H=>{const O=H.target;[...g.branches].some(ee=>ee.contains(O))||(f==null||f(H),d==null||d(H),H.defaultPrevented||m==null||m())},S);return WT(H=>{z===g.layers.size-1&&(i==null||i(H),!H.defaultPrevented&&m&&(H.preventDefault(),m()))},S),b.useEffect(()=>{if(x)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Yy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),Vy(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Yy)}},[x,S,o,g]),b.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),Vy())},[x,g]),b.useEffect(()=>{const H=()=>T({});return document.addEventListener(md,H),()=>document.removeEventListener(md,H)},[]),v.jsx(We.div,{...h,ref:C,style:{pointerEvents:N?B?"auto":"none":void 0,...n.style},onFocusCapture:Te(n.onFocusCapture,G.onFocusCapture),onBlurCapture:Te(n.onBlurCapture,G.onBlurCapture),onPointerDownCapture:Te(n.onPointerDownCapture,te.onPointerDownCapture)})});nc.displayName=eC;var aC="DismissableLayerBranch",lC=b.forwardRef((n,l)=>{const o=b.useContext(Yv),i=b.useRef(null),c=ut(l,i);return b.useEffect(()=>{const f=i.current;if(f)return o.branches.add(f),()=>{o.branches.delete(f)}},[o.branches]),v.jsx(We.div,{...n,ref:c})});lC.displayName=aC;function rC(n,l=globalThis==null?void 0:globalThis.document){const o=Dn(n),i=b.useRef(!1),c=b.useRef(()=>{});return b.useEffect(()=>{const f=m=>{if(m.target&&!i.current){let h=function(){Vv(tC,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=h,l.addEventListener("click",c.current,{once:!0})):h()}else l.removeEventListener("click",c.current);i.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",f),l.removeEventListener("click",c.current)}},[l,o]),{onPointerDownCapture:()=>i.current=!0}}function oC(n,l=globalThis==null?void 0:globalThis.document){const o=Dn(n),i=b.useRef(!1);return b.useEffect(()=>{const c=f=>{f.target&&!i.current&&Vv(nC,o,{originalEvent:f},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Vy(){const n=new CustomEvent(md);document.dispatchEvent(n)}function Vv(n,l,o,{discrete:i}){const c=o.originalEvent.target,f=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&c.addEventListener(n,l,{once:!0}),i?Uv(c,f):c.dispatchEvent(f)}var Hf="focusScope.autoFocusOnMount",Bf="focusScope.autoFocusOnUnmount",qy={bubbles:!1,cancelable:!0},iC="FocusScope",Xd=b.forwardRef((n,l)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:f,...d}=n,[m,h]=b.useState(null),g=Dn(c),x=Dn(f),p=b.useRef(null),S=ut(l,E=>h(E)),T=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let E=function(N){if(T.paused||!m)return;const B=N.target;m.contains(B)?p.current=B:ll(p.current,{select:!0})},A=function(N){if(T.paused||!m)return;const B=N.relatedTarget;B!==null&&(m.contains(B)||ll(p.current,{select:!0}))},R=function(N){if(document.activeElement===document.body)for(const te of N)te.removedNodes.length>0&&ll(m)};document.addEventListener("focusin",E),document.addEventListener("focusout",A);const z=new MutationObserver(R);return m&&z.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",A),z.disconnect()}}},[i,m,T.paused]),b.useEffect(()=>{if(m){Xy.add(T);const E=document.activeElement;if(!m.contains(E)){const R=new CustomEvent(Hf,qy);m.addEventListener(Hf,g),m.dispatchEvent(R),R.defaultPrevented||(sC(mC(qv(m)),{select:!0}),document.activeElement===E&&ll(m))}return()=>{m.removeEventListener(Hf,g),setTimeout(()=>{const R=new CustomEvent(Bf,qy);m.addEventListener(Bf,x),m.dispatchEvent(R),R.defaultPrevented||ll(E??document.body,{select:!0}),m.removeEventListener(Bf,x),Xy.remove(T)},0)}}},[m,g,x,T]);const C=b.useCallback(E=>{if(!o&&!i||T.paused)return;const A=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(A&&R){const z=E.currentTarget,[N,B]=cC(z);N&&B?!E.shiftKey&&R===B?(E.preventDefault(),o&&ll(N,{select:!0})):E.shiftKey&&R===N&&(E.preventDefault(),o&&ll(B,{select:!0})):R===z&&E.preventDefault()}},[o,i,T.paused]);return v.jsx(We.div,{tabIndex:-1,...d,ref:S,onKeyDown:C})});Xd.displayName=iC;function sC(n,{select:l=!1}={}){const o=document.activeElement;for(const i of n)if(ll(i,{select:l}),document.activeElement!==o)return}function cC(n){const l=qv(n),o=Py(l,n),i=Py(l.reverse(),n);return[o,i]}function qv(n){const l=[],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();)l.push(o.currentNode);return l}function Py(n,l){for(const o of n)if(!uC(o,{upTo:l}))return o}function uC(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function fC(n){return n instanceof HTMLInputElement&&"select"in n}function ll(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&fC(n)&&l&&n.select()}}var Xy=dC();function dC(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=$y(n,l),n.unshift(l)},remove(l){var o;n=$y(n,l),(o=n[0])==null||o.resume()}}}function $y(n,l){const o=[...n],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}function mC(n){return n.filter(l=>l.tagName!=="A")}var hC="Portal",$d=b.forwardRef((n,l)=>{var m;const{container:o,...i}=n,[c,f]=b.useState(!1);Pt(()=>f(!0),[]);const d=o||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?$0.createPortal(v.jsx(We.div,{...i,ref:l}),d):null});$d.displayName=hC;var Uf=0;function Pv(){b.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ky()),document.body.insertAdjacentElement("beforeend",n[1]??Ky()),Uf++,()=>{Uf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),Uf--}},[])}function Ky(){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 Jn=function(){return Jn=Object.assign||function(l){for(var o,i=1,c=arguments.length;i<c;i++){o=arguments[i];for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(l[f]=o[f])}return l},Jn.apply(this,arguments)};function Xv(n,l){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&l.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++)l.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(o[i[c]]=n[i[c]]);return o}function pC(n,l,o){if(o||arguments.length===2)for(var i=0,c=l.length,f;i<c;i++)(f||!(i in l))&&(f||(f=Array.prototype.slice.call(l,0,i)),f[i]=l[i]);return n.concat(f||Array.prototype.slice.call(l))}var Ds="right-scroll-bar-position",js="width-before-scroll-bar",gC="with-scroll-bars-hidden",yC="--removed-body-scroll-bar-size";function If(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function vC(n,l){var o=b.useState(function(){return{value:n,callback:l,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=l,o.facade}var bC=typeof window<"u"?b.useLayoutEffect:b.useEffect,Fy=new WeakMap;function xC(n,l){var o=vC(null,function(i){return n.forEach(function(c){return If(c,i)})});return bC(function(){var i=Fy.get(o);if(i){var c=new Set(i),f=new Set(n),d=o.current;c.forEach(function(m){f.has(m)||If(m,null)}),f.forEach(function(m){c.has(m)||If(m,d)})}Fy.set(o,n)},[n]),o}function SC(n){return n}function wC(n,l){l===void 0&&(l=SC);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(f){var d=l(f,i);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(f){for(i=!0;o.length;){var d=o;o=[],d.forEach(f)}o={push:function(m){return f(m)},filter:function(){return o}}},assignMedium:function(f){i=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(f),d=o}var h=function(){var x=d;d=[],x.forEach(f)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),o}}}};return c}function EC(n){n===void 0&&(n={});var l=wC(null);return l.options=Jn({async:!0,ssr:!1},n),l}var $v=function(n){var l=n.sideCar,o=Xv(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,Jn({},o))};$v.isSideCarExport=!0;function TC(n,l){return n.useMedium(l),$v}var Kv=EC(),Gf=function(){},ac=b.forwardRef(function(n,l){var o=b.useRef(null),i=b.useState({onScrollCapture:Gf,onWheelCapture:Gf,onTouchMoveCapture:Gf}),c=i[0],f=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,x=n.enabled,p=n.shards,S=n.sideCar,T=n.noRelative,C=n.noIsolation,E=n.inert,A=n.allowPinchZoom,R=n.as,z=R===void 0?"div":R,N=n.gapMode,B=Xv(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),te=S,G=xC([o,l]),H=Jn(Jn({},B),c);return b.createElement(b.Fragment,null,x&&b.createElement(te,{sideCar:Kv,removeScrollBar:g,shards:p,noRelative:T,noIsolation:C,inert:E,setCallbacks:f,allowPinchZoom:!!A,lockRef:o,gapMode:N}),d?b.cloneElement(b.Children.only(m),Jn(Jn({},H),{ref:G})):b.createElement(z,Jn({},H,{className:h,ref:G}),m))});ac.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ac.classNames={fullWidth:js,zeroRight:Ds};var CC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=CC();return l&&n.setAttribute("nonce",l),n}function AC(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function _C(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var RC=function(){var n=0,l=null;return{add:function(o){n==0&&(l=MC())&&(AC(l,o),_C(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},NC=function(){var n=RC();return function(l,o){b.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},Fv=function(){var n=NC(),l=function(o){var i=o.styles,c=o.dynamic;return n(i,c),null};return l},OC={left:0,top:0,right:0,gap:0},Yf=function(n){return parseInt(n||"",10)||0},zC=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],i=l[n==="padding"?"paddingTop":"marginTop"],c=l[n==="padding"?"paddingRight":"marginRight"];return[Yf(o),Yf(i),Yf(c)]},DC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return OC;var l=zC(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},jC=Fv(),Hr="data-scroll-locked",kC=function(n,l,o,i){var c=n.left,f=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
336
+ .`.concat(gC,` {
337
+ overflow: hidden `).concat(i,`;
338
+ padding-right: `).concat(m,"px ").concat(i,`;
339
+ }
340
+ body[`).concat(Hr,`] {
341
+ overflow: hidden `).concat(i,`;
342
+ overscroll-behavior: contain;
343
+ `).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
344
+ padding-left: `.concat(c,`px;
345
+ padding-top: `).concat(f,`px;
346
+ padding-right: `).concat(d,`px;
347
+ margin-left:0;
348
+ margin-top:0;
349
+ margin-right: `).concat(m,"px ").concat(i,`;
350
+ `),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
351
+ }
352
+
353
+ .`).concat(Ds,` {
354
+ right: `).concat(m,"px ").concat(i,`;
355
+ }
356
+
357
+ .`).concat(js,` {
358
+ margin-right: `).concat(m,"px ").concat(i,`;
359
+ }
360
+
361
+ .`).concat(Ds," .").concat(Ds,` {
362
+ right: 0 `).concat(i,`;
363
+ }
364
+
365
+ .`).concat(js," .").concat(js,` {
366
+ margin-right: 0 `).concat(i,`;
367
+ }
368
+
369
+ body[`).concat(Hr,`] {
370
+ `).concat(yC,": ").concat(m,`px;
371
+ }
372
+ `)},Qy=function(){var n=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(n)?n:0},LC=function(){b.useEffect(function(){return document.body.setAttribute(Hr,(Qy()+1).toString()),function(){var n=Qy()-1;n<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,n.toString())}},[])},HC=function(n){var l=n.noRelative,o=n.noImportant,i=n.gapMode,c=i===void 0?"margin":i;LC();var f=b.useMemo(function(){return DC(c)},[c]);return b.createElement(jC,{styles:kC(f,!l,c,o?"":"!important")})},hd=!1;if(typeof window<"u")try{var Ss=Object.defineProperty({},"passive",{get:function(){return hd=!0,!0}});window.addEventListener("test",Ss,Ss),window.removeEventListener("test",Ss,Ss)}catch{hd=!1}var Nr=hd?{passive:!1}:!1,BC=function(n){return n.tagName==="TEXTAREA"},Qv=function(n,l){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!BC(n)&&o[l]==="visible")},UC=function(n){return Qv(n,"overflowY")},IC=function(n){return Qv(n,"overflowX")},Zy=function(n,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=Zv(n,i);if(c){var f=Jv(n,i),d=f[1],m=f[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},GC=function(n){var l=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[l,o,i]},YC=function(n){var l=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[l,o,i]},Zv=function(n,l){return n==="v"?UC(l):IC(l)},Jv=function(n,l){return n==="v"?GC(l):YC(l)},VC=function(n,l){return n==="h"&&l==="rtl"?-1:1},qC=function(n,l,o,i,c){var f=VC(n,window.getComputedStyle(l).direction),d=f*i,m=o.target,h=l.contains(m),g=!1,x=d>0,p=0,S=0;do{if(!m)break;var T=Jv(n,m),C=T[0],E=T[1],A=T[2],R=E-A-f*C;(C||R)&&Zv(n,m)&&(p+=R,S+=C);var z=m.parentNode;m=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!h&&m!==document.body||h&&(l.contains(m)||l===m));return(x&&Math.abs(p)<1||!x&&Math.abs(S)<1)&&(g=!0),g},ws=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Jy=function(n){return[n.deltaX,n.deltaY]},Wy=function(n){return n&&"current"in n?n.current:n},PC=function(n,l){return n[0]===l[0]&&n[1]===l[1]},XC=function(n){return`
373
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
374
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
375
+ `)},$C=0,Or=[];function KC(n){var l=b.useRef([]),o=b.useRef([0,0]),i=b.useRef(),c=b.useState($C++)[0],f=b.useState(Fv)[0],d=b.useRef(n);b.useEffect(function(){d.current=n},[n]),b.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var E=pC([n.lockRef.current],(n.shards||[]).map(Wy),!0).filter(Boolean);return E.forEach(function(A){return A.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),E.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=b.useCallback(function(E,A){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var R=ws(E),z=o.current,N="deltaX"in E?E.deltaX:z[0]-R[0],B="deltaY"in E?E.deltaY:z[1]-R[1],te,G=E.target,H=Math.abs(N)>Math.abs(B)?"h":"v";if("touches"in E&&H==="h"&&G.type==="range")return!1;var O=window.getSelection(),F=O&&O.anchorNode,ee=F?F===G||F.contains(G):!1;if(ee)return!1;var fe=Zy(H,G);if(!fe)return!0;if(fe?te=H:(te=H==="v"?"h":"v",fe=Zy(H,G)),!fe)return!1;if(!i.current&&"changedTouches"in E&&(N||B)&&(i.current=te),!te)return!0;var W=i.current||te;return qC(W,A,E,W==="h"?N:B)},[]),h=b.useCallback(function(E){var A=E;if(!(!Or.length||Or[Or.length-1]!==f)){var R="deltaY"in A?Jy(A):ws(A),z=l.current.filter(function(te){return te.name===A.type&&(te.target===A.target||A.target===te.shadowParent)&&PC(te.delta,R)})[0];if(z&&z.should){A.cancelable&&A.preventDefault();return}if(!z){var N=(d.current.shards||[]).map(Wy).filter(Boolean).filter(function(te){return te.contains(A.target)}),B=N.length>0?m(A,N[0]):!d.current.noIsolation;B&&A.cancelable&&A.preventDefault()}}},[]),g=b.useCallback(function(E,A,R,z){var N={name:E,delta:A,target:R,should:z,shadowParent:FC(R)};l.current.push(N),setTimeout(function(){l.current=l.current.filter(function(B){return B!==N})},1)},[]),x=b.useCallback(function(E){o.current=ws(E),i.current=void 0},[]),p=b.useCallback(function(E){g(E.type,Jy(E),E.target,m(E,n.lockRef.current))},[]),S=b.useCallback(function(E){g(E.type,ws(E),E.target,m(E,n.lockRef.current))},[]);b.useEffect(function(){return Or.push(f),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:S}),document.addEventListener("wheel",h,Nr),document.addEventListener("touchmove",h,Nr),document.addEventListener("touchstart",x,Nr),function(){Or=Or.filter(function(E){return E!==f}),document.removeEventListener("wheel",h,Nr),document.removeEventListener("touchmove",h,Nr),document.removeEventListener("touchstart",x,Nr)}},[]);var T=n.removeScrollBar,C=n.inert;return b.createElement(b.Fragment,null,C?b.createElement(f,{styles:XC(c)}):null,T?b.createElement(HC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function FC(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const QC=TC(Kv,KC);var Kd=b.forwardRef(function(n,l){return b.createElement(ac,Jn({},n,{ref:l,sideCar:QC}))});Kd.classNames=ac.classNames;var ZC=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},zr=new WeakMap,Es=new WeakMap,Ts={},Vf=0,Wv=function(n){return n&&(n.host||Wv(n.parentNode))},JC=function(n,l){return l.map(function(o){if(n.contains(o))return o;var i=Wv(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})},WC=function(n,l,o,i){var c=JC(l,Array.isArray(n)?n:[n]);Ts[o]||(Ts[o]=new WeakMap);var f=Ts[o],d=[],m=new Set,h=new Set(c),g=function(p){!p||m.has(p)||(m.add(p),g(p.parentNode))};c.forEach(g);var x=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(S){if(m.has(S))x(S);else try{var T=S.getAttribute(i),C=T!==null&&T!=="false",E=(zr.get(S)||0)+1,A=(f.get(S)||0)+1;zr.set(S,E),f.set(S,A),d.push(S),E===1&&C&&Es.set(S,!0),A===1&&S.setAttribute(o,"true"),C||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return x(l),m.clear(),Vf++,function(){d.forEach(function(p){var S=zr.get(p)-1,T=f.get(p)-1;zr.set(p,S),f.set(p,T),S||(Es.has(p)||p.removeAttribute(i),Es.delete(p)),T||p.removeAttribute(o)}),Vf--,Vf||(zr=new WeakMap,zr=new WeakMap,Es=new WeakMap,Ts={})}},eb=function(n,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),c=ZC(n);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),WC(i,c,o,"aria-hidden")):function(){return null}};function eM(n){const l=b.useRef({value:n,previous:n});return b.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function tM(n){const[l,o]=b.useState(void 0);return Pt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const f=c[0];let d,m;if("borderBoxSize"in f){const h=f.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),l}const nM=["top","right","bottom","left"],sl=Math.min,yn=Math.max,qs=Math.round,Cs=Math.floor,ea=n=>({x:n,y:n}),aM={left:"right",right:"left",bottom:"top",top:"bottom"};function pd(n,l,o){return yn(n,sl(l,o))}function Ca(n,l){return typeof n=="function"?n(l):n}function Ma(n){return n.split("-")[0]}function Pr(n){return n.split("-")[1]}function Fd(n){return n==="x"?"y":"x"}function Qd(n){return n==="y"?"height":"width"}function Wn(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Zd(n){return Fd(Wn(n))}function lM(n,l,o){o===void 0&&(o=!1);const i=Pr(n),c=Zd(n),f=Qd(c);let d=c==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[f]>l.floating[f]&&(d=Ps(d)),[d,Ps(d)]}function rM(n){const l=Ps(n);return[gd(n),l,gd(l)]}function gd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const e0=["left","right"],t0=["right","left"],oM=["top","bottom"],iM=["bottom","top"];function sM(n,l,o){switch(n){case"top":case"bottom":return o?l?t0:e0:l?e0:t0;case"left":case"right":return l?oM:iM;default:return[]}}function cM(n,l,o,i){const c=Pr(n);let f=sM(Ma(n),o==="start",i);return c&&(f=f.map(d=>d+"-"+c),l&&(f=f.concat(f.map(gd)))),f}function Ps(n){const l=Ma(n);return aM[l]+n.slice(l.length)}function uM(n){return{top:0,right:0,bottom:0,left:0,...n}}function tb(n){return typeof n!="number"?uM(n):{top:n,right:n,bottom:n,left:n}}function Xs(n){const{x:l,y:o,width:i,height:c}=n;return{width:i,height:c,top:o,left:l,right:l+i,bottom:o+c,x:l,y:o}}function n0(n,l,o){let{reference:i,floating:c}=n;const f=Wn(l),d=Zd(l),m=Qd(d),h=Ma(l),g=f==="y",x=i.x+i.width/2-c.width/2,p=i.y+i.height/2-c.height/2,S=i[m]/2-c[m]/2;let T;switch(h){case"top":T={x,y:i.y-c.height};break;case"bottom":T={x,y:i.y+i.height};break;case"right":T={x:i.x+i.width,y:p};break;case"left":T={x:i.x-c.width,y:p};break;default:T={x:i.x,y:i.y}}switch(Pr(l)){case"start":T[d]-=S*(o&&g?-1:1);break;case"end":T[d]+=S*(o&&g?-1:1);break}return T}async function fM(n,l){var o;l===void 0&&(l={});const{x:i,y:c,platform:f,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:p="floating",altBoundary:S=!1,padding:T=0}=Ca(l,n),C=tb(T),A=m[S?p==="floating"?"reference":"floating":p],R=Xs(await f.getClippingRect({element:(o=await(f.isElement==null?void 0:f.isElement(A)))==null||o?A:A.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:g,rootBoundary:x,strategy:h})),z=p==="floating"?{x:i,y:c,width:d.floating.width,height:d.floating.height}:d.reference,N=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),B=await(f.isElement==null?void 0:f.isElement(N))?await(f.getScale==null?void 0:f.getScale(N))||{x:1,y:1}:{x:1,y:1},te=Xs(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:z,offsetParent:N,strategy:h}):z);return{top:(R.top-te.top+C.top)/B.y,bottom:(te.bottom-R.bottom+C.bottom)/B.y,left:(R.left-te.left+C.left)/B.x,right:(te.right-R.right+C.right)/B.x}}const dM=50,mM=async(n,l,o)=>{const{placement:i="bottom",strategy:c="absolute",middleware:f=[],platform:d}=o,m=d.detectOverflow?d:{...d,detectOverflow:fM},h=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:n,floating:l,strategy:c}),{x,y:p}=n0(g,i,h),S=i,T=0;const C={};for(let E=0;E<f.length;E++){const A=f[E];if(!A)continue;const{name:R,fn:z}=A,{x:N,y:B,data:te,reset:G}=await z({x,y:p,initialPlacement:i,placement:S,strategy:c,middlewareData:C,rects:g,platform:m,elements:{reference:n,floating:l}});x=N??x,p=B??p,C[R]={...C[R],...te},G&&T<dM&&(T++,typeof G=="object"&&(G.placement&&(S=G.placement),G.rects&&(g=G.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:c}):G.rects),{x,y:p}=n0(g,S,h)),E=-1)}return{x,y:p,placement:S,strategy:c,middlewareData:C}},hM=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:i,placement:c,rects:f,platform:d,elements:m,middlewareData:h}=l,{element:g,padding:x=0}=Ca(n,l)||{};if(g==null)return{};const p=tb(x),S={x:o,y:i},T=Zd(c),C=Qd(T),E=await d.getDimensions(g),A=T==="y",R=A?"top":"left",z=A?"bottom":"right",N=A?"clientHeight":"clientWidth",B=f.reference[C]+f.reference[T]-S[T]-f.floating[C],te=S[T]-f.reference[T],G=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let H=G?G[N]:0;(!H||!await(d.isElement==null?void 0:d.isElement(G)))&&(H=m.floating[N]||f.floating[C]);const O=B/2-te/2,F=H/2-E[C]/2-1,ee=sl(p[R],F),fe=sl(p[z],F),W=ee,P=H-E[C]-fe,K=H/2-E[C]/2+O,q=pd(W,K,P),M=!h.arrow&&Pr(c)!=null&&K!==q&&f.reference[C]/2-(K<W?ee:fe)-E[C]/2<0,j=M?K<W?K-W:K-P:0;return{[T]:S[T]+j,data:{[T]:q,centerOffset:K-q-j,...M&&{alignmentOffset:j}},reset:M}}}),pM=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,i;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:h,elements:g}=l,{mainAxis:x=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...A}=Ca(n,l);if((o=f.arrow)!=null&&o.alignmentOffset)return{};const R=Ma(c),z=Wn(m),N=Ma(m)===m,B=await(h.isRTL==null?void 0:h.isRTL(g.floating)),te=S||(N||!E?[Ps(m)]:rM(m)),G=C!=="none";!S&&G&&te.push(...cM(m,E,C,B));const H=[m,...te],O=await h.detectOverflow(l,A),F=[];let ee=((i=f.flip)==null?void 0:i.overflows)||[];if(x&&F.push(O[R]),p){const K=lM(c,d,B);F.push(O[K[0]],O[K[1]])}if(ee=[...ee,{placement:c,overflows:F}],!F.every(K=>K<=0)){var fe,W;const K=(((fe=f.flip)==null?void 0:fe.index)||0)+1,q=H[K];if(q&&(!(p==="alignment"?z!==Wn(q):!1)||ee.every(Y=>Wn(Y.placement)===z?Y.overflows[0]>0:!0)))return{data:{index:K,overflows:ee},reset:{placement:q}};let M=(W=ee.filter(j=>j.overflows[0]<=0).sort((j,Y)=>j.overflows[1]-Y.overflows[1])[0])==null?void 0:W.placement;if(!M)switch(T){case"bestFit":{var P;const j=(P=ee.filter(Y=>{if(G){const V=Wn(Y.placement);return V===z||V==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(V=>V>0).reduce((V,U)=>V+U,0)]).sort((Y,V)=>Y[1]-V[1])[0])==null?void 0:P[0];j&&(M=j);break}case"initialPlacement":M=m;break}if(c!==M)return{reset:{placement:M}}}return{}}}};function a0(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function l0(n){return nM.some(l=>n[l]>=0)}const gM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o,platform:i}=l,{strategy:c="referenceHidden",...f}=Ca(n,l);switch(c){case"referenceHidden":{const d=await i.detectOverflow(l,{...f,elementContext:"reference"}),m=a0(d,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:l0(m)}}}case"escaped":{const d=await i.detectOverflow(l,{...f,altBoundary:!0}),m=a0(d,o.floating);return{data:{escapedOffsets:m,escaped:l0(m)}}}default:return{}}}}},nb=new Set(["left","top"]);async function yM(n,l){const{placement:o,platform:i,elements:c}=n,f=await(i.isRTL==null?void 0:i.isRTL(c.floating)),d=Ma(o),m=Pr(o),h=Wn(o)==="y",g=nb.has(d)?-1:1,x=f&&h?-1:1,p=Ca(l,n);let{mainAxis:S,crossAxis:T,alignmentAxis:C}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&typeof C=="number"&&(T=m==="end"?C*-1:C),h?{x:T*x,y:S*g}:{x:S*g,y:T*x}}const vM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,i;const{x:c,y:f,placement:d,middlewareData:m}=l,h=await yM(l,n);return d===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+h.x,y:f+h.y,data:{...h,placement:d}}}}},bM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:i,placement:c,platform:f}=l,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:R=>{let{x:z,y:N}=R;return{x:z,y:N}}},...g}=Ca(n,l),x={x:o,y:i},p=await f.detectOverflow(l,g),S=Wn(Ma(c)),T=Fd(S);let C=x[T],E=x[S];if(d){const R=T==="y"?"top":"left",z=T==="y"?"bottom":"right",N=C+p[R],B=C-p[z];C=pd(N,C,B)}if(m){const R=S==="y"?"top":"left",z=S==="y"?"bottom":"right",N=E+p[R],B=E-p[z];E=pd(N,E,B)}const A=h.fn({...l,[T]:C,[S]:E});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[T]:d,[S]:m}}}}}},xM=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:i,placement:c,rects:f,middlewareData:d}=l,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Ca(n,l),x={x:o,y:i},p=Wn(c),S=Fd(p);let T=x[S],C=x[p];const E=Ca(m,l),A=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(h){const N=S==="y"?"height":"width",B=f.reference[S]-f.floating[N]+A.mainAxis,te=f.reference[S]+f.reference[N]-A.mainAxis;T<B?T=B:T>te&&(T=te)}if(g){var R,z;const N=S==="y"?"width":"height",B=nb.has(Ma(c)),te=f.reference[p]-f.floating[N]+(B&&((R=d.offset)==null?void 0:R[p])||0)+(B?0:A.crossAxis),G=f.reference[p]+f.reference[N]+(B?0:((z=d.offset)==null?void 0:z[p])||0)-(B?A.crossAxis:0);C<te?C=te:C>G&&(C=G)}return{[S]:T,[p]:C}}}},SM=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,i;const{placement:c,rects:f,platform:d,elements:m}=l,{apply:h=()=>{},...g}=Ca(n,l),x=await d.detectOverflow(l,g),p=Ma(c),S=Pr(c),T=Wn(c)==="y",{width:C,height:E}=f.floating;let A,R;p==="top"||p==="bottom"?(A=p,R=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(R=p,A=S==="end"?"top":"bottom");const z=E-x.top-x.bottom,N=C-x.left-x.right,B=sl(E-x[A],z),te=sl(C-x[R],N),G=!l.middlewareData.shift;let H=B,O=te;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(O=N),(i=l.middlewareData.shift)!=null&&i.enabled.y&&(H=z),G&&!S){const ee=yn(x.left,0),fe=yn(x.right,0),W=yn(x.top,0),P=yn(x.bottom,0);T?O=C-2*(ee!==0||fe!==0?ee+fe:yn(x.left,x.right)):H=E-2*(W!==0||P!==0?W+P:yn(x.top,x.bottom))}await h({...l,availableWidth:O,availableHeight:H});const F=await d.getDimensions(m.floating);return C!==F.width||E!==F.height?{reset:{rects:!0}}:{}}}};function lc(){return typeof window<"u"}function Xr(n){return ab(n)?(n.nodeName||"").toLowerCase():"#document"}function vn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ta(n){var l;return(l=(ab(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function ab(n){return lc()?n instanceof Node||n instanceof vn(n).Node:!1}function Yn(n){return lc()?n instanceof Element||n instanceof vn(n).Element:!1}function Aa(n){return lc()?n instanceof HTMLElement||n instanceof vn(n).HTMLElement:!1}function r0(n){return!lc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof vn(n).ShadowRoot}function Jo(n){const{overflow:l,overflowX:o,overflowY:i,display:c}=Vn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&c!=="inline"&&c!=="contents"}function wM(n){return/^(table|td|th)$/.test(Xr(n))}function rc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const EM=/transform|translate|scale|rotate|perspective|filter/,TM=/paint|layout|strict|content/,Ll=n=>!!n&&n!=="none";let qf;function Jd(n){const l=Yn(n)?Vn(n):n;return Ll(l.transform)||Ll(l.translate)||Ll(l.scale)||Ll(l.rotate)||Ll(l.perspective)||!Wd()&&(Ll(l.backdropFilter)||Ll(l.filter))||EM.test(l.willChange||"")||TM.test(l.contain||"")}function CM(n){let l=cl(n);for(;Aa(l)&&!Gr(l);){if(Jd(l))return l;if(rc(l))return null;l=cl(l)}return null}function Wd(){return qf==null&&(qf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qf}function Gr(n){return/^(html|body|#document)$/.test(Xr(n))}function Vn(n){return vn(n).getComputedStyle(n)}function oc(n){return Yn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function cl(n){if(Xr(n)==="html")return n;const l=n.assignedSlot||n.parentNode||r0(n)&&n.host||ta(n);return r0(l)?l.host:l}function lb(n){const l=cl(n);return Gr(l)?n.ownerDocument?n.ownerDocument.body:n.body:Aa(l)&&Jo(l)?l:lb(l)}function Xo(n,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const c=lb(n),f=c===((i=n.ownerDocument)==null?void 0:i.body),d=vn(c);if(f){const m=yd(d);return l.concat(d,d.visualViewport||[],Jo(c)?c:[],m&&o?Xo(m):[])}else return l.concat(c,Xo(c,[],o))}function yd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rb(n){const l=Vn(n);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const c=Aa(n),f=c?n.offsetWidth:o,d=c?n.offsetHeight:i,m=qs(o)!==f||qs(i)!==d;return m&&(o=f,i=d),{width:o,height:i,$:m}}function em(n){return Yn(n)?n:n.contextElement}function Br(n){const l=em(n);if(!Aa(l))return ea(1);const o=l.getBoundingClientRect(),{width:i,height:c,$:f}=rb(l);let d=(f?qs(o.width):o.width)/i,m=(f?qs(o.height):o.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const MM=ea(0);function ob(n){const l=vn(n);return!Wd()||!l.visualViewport?MM:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function AM(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==vn(n)?!1:l}function Gl(n,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const c=n.getBoundingClientRect(),f=em(n);let d=ea(1);l&&(i?Yn(i)&&(d=Br(i)):d=Br(n));const m=AM(f,o,i)?ob(f):ea(0);let h=(c.left+m.x)/d.x,g=(c.top+m.y)/d.y,x=c.width/d.x,p=c.height/d.y;if(f){const S=vn(f),T=i&&Yn(i)?vn(i):i;let C=S,E=yd(C);for(;E&&i&&T!==C;){const A=Br(E),R=E.getBoundingClientRect(),z=Vn(E),N=R.left+(E.clientLeft+parseFloat(z.paddingLeft))*A.x,B=R.top+(E.clientTop+parseFloat(z.paddingTop))*A.y;h*=A.x,g*=A.y,x*=A.x,p*=A.y,h+=N,g+=B,C=vn(E),E=yd(C)}}return Xs({width:x,height:p,x:h,y:g})}function ic(n,l){const o=oc(n).scrollLeft;return l?l.left+o:Gl(ta(n)).left+o}function ib(n,l){const o=n.getBoundingClientRect(),i=o.left+l.scrollLeft-ic(n,o),c=o.top+l.scrollTop;return{x:i,y:c}}function _M(n){let{elements:l,rect:o,offsetParent:i,strategy:c}=n;const f=c==="fixed",d=ta(i),m=l?rc(l.floating):!1;if(i===d||m&&f)return o;let h={scrollLeft:0,scrollTop:0},g=ea(1);const x=ea(0),p=Aa(i);if((p||!p&&!f)&&((Xr(i)!=="body"||Jo(d))&&(h=oc(i)),p)){const T=Gl(i);g=Br(i),x.x=T.x+i.clientLeft,x.y=T.y+i.clientTop}const S=d&&!p&&!f?ib(d,h):ea(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+x.x+S.x,y:o.y*g.y-h.scrollTop*g.y+x.y+S.y}}function RM(n){return Array.from(n.getClientRects())}function NM(n){const l=ta(n),o=oc(n),i=n.ownerDocument.body,c=yn(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),f=yn(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+ic(n);const m=-o.scrollTop;return Vn(i).direction==="rtl"&&(d+=yn(l.clientWidth,i.clientWidth)-c),{width:c,height:f,x:d,y:m}}const o0=25;function OM(n,l){const o=vn(n),i=ta(n),c=o.visualViewport;let f=i.clientWidth,d=i.clientHeight,m=0,h=0;if(c){f=c.width,d=c.height;const x=Wd();(!x||x&&l==="fixed")&&(m=c.offsetLeft,h=c.offsetTop)}const g=ic(i);if(g<=0){const x=i.ownerDocument,p=x.body,S=getComputedStyle(p),T=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-p.clientWidth-T);C<=o0&&(f-=C)}else g<=o0&&(f+=g);return{width:f,height:d,x:m,y:h}}function zM(n,l){const o=Gl(n,!0,l==="fixed"),i=o.top+n.clientTop,c=o.left+n.clientLeft,f=Aa(n)?Br(n):ea(1),d=n.clientWidth*f.x,m=n.clientHeight*f.y,h=c*f.x,g=i*f.y;return{width:d,height:m,x:h,y:g}}function i0(n,l,o){let i;if(l==="viewport")i=OM(n,o);else if(l==="document")i=NM(ta(n));else if(Yn(l))i=zM(l,o);else{const c=ob(n);i={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return Xs(i)}function sb(n,l){const o=cl(n);return o===l||!Yn(o)||Gr(o)?!1:Vn(o).position==="fixed"||sb(o,l)}function DM(n,l){const o=l.get(n);if(o)return o;let i=Xo(n,[],!1).filter(m=>Yn(m)&&Xr(m)!=="body"),c=null;const f=Vn(n).position==="fixed";let d=f?cl(n):n;for(;Yn(d)&&!Gr(d);){const m=Vn(d),h=Jd(d);!h&&m.position==="fixed"&&(c=null),(f?!h&&!c:!h&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Jo(d)&&!h&&sb(n,d))?i=i.filter(x=>x!==d):c=m,d=cl(d)}return l.set(n,i),i}function jM(n){let{element:l,boundary:o,rootBoundary:i,strategy:c}=n;const d=[...o==="clippingAncestors"?rc(l)?[]:DM(l,this._c):[].concat(o),i],m=i0(l,d[0],c);let h=m.top,g=m.right,x=m.bottom,p=m.left;for(let S=1;S<d.length;S++){const T=i0(l,d[S],c);h=yn(T.top,h),g=sl(T.right,g),x=sl(T.bottom,x),p=yn(T.left,p)}return{width:g-p,height:x-h,x:p,y:h}}function kM(n){const{width:l,height:o}=rb(n);return{width:l,height:o}}function LM(n,l,o){const i=Aa(l),c=ta(l),f=o==="fixed",d=Gl(n,!0,f,l);let m={scrollLeft:0,scrollTop:0};const h=ea(0);function g(){h.x=ic(c)}if(i||!i&&!f)if((Xr(l)!=="body"||Jo(c))&&(m=oc(l)),i){const T=Gl(l,!0,f,l);h.x=T.x+l.clientLeft,h.y=T.y+l.clientTop}else c&&g();f&&!i&&c&&g();const x=c&&!i&&!f?ib(c,m):ea(0),p=d.left+m.scrollLeft-h.x-x.x,S=d.top+m.scrollTop-h.y-x.y;return{x:p,y:S,width:d.width,height:d.height}}function Pf(n){return Vn(n).position==="static"}function s0(n,l){if(!Aa(n)||Vn(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return ta(n)===o&&(o=o.ownerDocument.body),o}function cb(n,l){const o=vn(n);if(rc(n))return o;if(!Aa(n)){let c=cl(n);for(;c&&!Gr(c);){if(Yn(c)&&!Pf(c))return c;c=cl(c)}return o}let i=s0(n,l);for(;i&&wM(i)&&Pf(i);)i=s0(i,l);return i&&Gr(i)&&Pf(i)&&!Jd(i)?o:i||CM(n)||o}const HM=async function(n){const l=this.getOffsetParent||cb,o=this.getDimensions,i=await o(n.floating);return{reference:LM(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function BM(n){return Vn(n).direction==="rtl"}const UM={convertOffsetParentRelativeRectToViewportRelativeRect:_M,getDocumentElement:ta,getClippingRect:jM,getOffsetParent:cb,getElementRects:HM,getClientRects:RM,getDimensions:kM,getScale:Br,isElement:Yn,isRTL:BM};function ub(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function IM(n,l){let o=null,i;const c=ta(n);function f(){var m;clearTimeout(i),(m=o)==null||m.disconnect(),o=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),f();const g=n.getBoundingClientRect(),{left:x,top:p,width:S,height:T}=g;if(m||l(),!S||!T)return;const C=Cs(p),E=Cs(c.clientWidth-(x+S)),A=Cs(c.clientHeight-(p+T)),R=Cs(x),N={rootMargin:-C+"px "+-E+"px "+-A+"px "+-R+"px",threshold:yn(0,sl(1,h))||1};let B=!0;function te(G){const H=G[0].intersectionRatio;if(H!==h){if(!B)return d();H?d(!1,H):i=setTimeout(()=>{d(!1,1e-7)},1e3)}H===1&&!ub(g,n.getBoundingClientRect())&&d(),B=!1}try{o=new IntersectionObserver(te,{...N,root:c.ownerDocument})}catch{o=new IntersectionObserver(te,N)}o.observe(n)}return d(!0),f}function GM(n,l,o,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=em(n),x=c||f?[...g?Xo(g):[],...l?Xo(l):[]]:[];x.forEach(R=>{c&&R.addEventListener("scroll",o,{passive:!0}),f&&R.addEventListener("resize",o)});const p=g&&m?IM(g,o):null;let S=-1,T=null;d&&(T=new ResizeObserver(R=>{let[z]=R;z&&z.target===g&&T&&l&&(T.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var N;(N=T)==null||N.observe(l)})),o()}),g&&!h&&T.observe(g),l&&T.observe(l));let C,E=h?Gl(n):null;h&&A();function A(){const R=Gl(n);E&&!ub(E,R)&&o(),E=R,C=requestAnimationFrame(A)}return o(),()=>{var R;x.forEach(z=>{c&&z.removeEventListener("scroll",o),f&&z.removeEventListener("resize",o)}),p==null||p(),(R=T)==null||R.disconnect(),T=null,h&&cancelAnimationFrame(C)}}const YM=vM,VM=bM,qM=pM,PM=SM,XM=gM,c0=hM,$M=xM,KM=(n,l,o)=>{const i=new Map,c={platform:UM,...o},f={...c.platform,_c:i};return mM(n,l,{...c,platform:f})};var FM=typeof document<"u",QM=function(){},ks=FM?b.useLayoutEffect:QM;function $s(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let o,i,c;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!$s(n[i],l[i]))return!1;return!0}if(c=Object.keys(n),o=c.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,c[i]))return!1;for(i=o;i--!==0;){const f=c[i];if(!(f==="_owner"&&n.$$typeof)&&!$s(n[f],l[f]))return!1}return!0}return n!==n&&l!==l}function fb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function u0(n,l){const o=fb(n);return Math.round(l*o)/o}function Xf(n){const l=b.useRef(n);return ks(()=>{l.current=n}),l}function ZM(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[x,p]=b.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,T]=b.useState(i);$s(S,i)||T(i);const[C,E]=b.useState(null),[A,R]=b.useState(null),z=b.useCallback(Y=>{Y!==G.current&&(G.current=Y,E(Y))},[]),N=b.useCallback(Y=>{Y!==H.current&&(H.current=Y,R(Y))},[]),B=f||C,te=d||A,G=b.useRef(null),H=b.useRef(null),O=b.useRef(x),F=h!=null,ee=Xf(h),fe=Xf(c),W=Xf(g),P=b.useCallback(()=>{if(!G.current||!H.current)return;const Y={placement:l,strategy:o,middleware:S};fe.current&&(Y.platform=fe.current),KM(G.current,H.current,Y).then(V=>{const U={...V,isPositioned:W.current!==!1};K.current&&!$s(O.current,U)&&(O.current=U,Qo.flushSync(()=>{p(U)}))})},[S,l,o,fe,W]);ks(()=>{g===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[g]);const K=b.useRef(!1);ks(()=>(K.current=!0,()=>{K.current=!1}),[]),ks(()=>{if(B&&(G.current=B),te&&(H.current=te),B&&te){if(ee.current)return ee.current(B,te,P);P()}},[B,te,P,ee,F]);const q=b.useMemo(()=>({reference:G,floating:H,setReference:z,setFloating:N}),[z,N]),M=b.useMemo(()=>({reference:B,floating:te}),[B,te]),j=b.useMemo(()=>{const Y={position:o,left:0,top:0};if(!M.floating)return Y;const V=u0(M.floating,x.x),U=u0(M.floating,x.y);return m?{...Y,transform:"translate("+V+"px, "+U+"px)",...fb(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:V,top:U}},[o,m,M.floating,x.x,x.y]);return b.useMemo(()=>({...x,update:P,refs:q,elements:M,floatingStyles:j}),[x,P,q,M,j])}const JM=n=>{function l(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&&l(i)?i.current!=null?c0({element:i.current,padding:c}).fn(o):{}:i?c0({element:i,padding:c}).fn(o):{}}}},WM=(n,l)=>{const o=YM(n);return{name:o.name,fn:o.fn,options:[n,l]}},eA=(n,l)=>{const o=VM(n);return{name:o.name,fn:o.fn,options:[n,l]}},tA=(n,l)=>({fn:$M(n).fn,options:[n,l]}),nA=(n,l)=>{const o=qM(n);return{name:o.name,fn:o.fn,options:[n,l]}},aA=(n,l)=>{const o=PM(n);return{name:o.name,fn:o.fn,options:[n,l]}},lA=(n,l)=>{const o=XM(n);return{name:o.name,fn:o.fn,options:[n,l]}},rA=(n,l)=>{const o=JM(n);return{name:o.name,fn:o.fn,options:[n,l]}};var oA="Arrow",db=b.forwardRef((n,l)=>{const{children:o,width:i=10,height:c=5,...f}=n;return v.jsx(We.svg,{...f,ref:l,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});db.displayName=oA;var iA=db,tm="Popper",[mb,$r]=Pl(tm),[sA,hb]=mb(tm),pb=n=>{const{__scopePopper:l,children:o}=n,[i,c]=b.useState(null);return v.jsx(sA,{scope:l,anchor:i,onAnchorChange:c,children:o})};pb.displayName=tm;var gb="PopperAnchor",yb=b.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:i,...c}=n,f=hb(gb,o),d=b.useRef(null),m=ut(l,d),h=b.useRef(null);return b.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&f.onAnchorChange(h.current)}),i?null:v.jsx(We.div,{...c,ref:m})});yb.displayName=gb;var nm="PopperContent",[cA,uA]=mb(nm),vb=b.forwardRef((n,l)=>{var ce,Q,re,be,Me,Ae;const{__scopePopper:o,side:i="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:p="partial",hideWhenDetached:S=!1,updatePositionStrategy:T="optimized",onPlaced:C,...E}=n,A=hb(nm,o),[R,z]=b.useState(null),N=ut(l,$e=>z($e)),[B,te]=b.useState(null),G=tM(B),H=(G==null?void 0:G.width)??0,O=(G==null?void 0:G.height)??0,F=i+(f!=="center"?"-"+f:""),ee=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},fe=Array.isArray(g)?g:[g],W=fe.length>0,P={padding:ee,boundary:fe.filter(dA),altBoundary:W},{refs:K,floatingStyles:q,placement:M,isPositioned:j,middlewareData:Y}=ZM({strategy:"fixed",placement:F,whileElementsMounted:(...$e)=>GM(...$e,{animationFrame:T==="always"}),elements:{reference:A.anchor},middleware:[WM({mainAxis:c+O,alignmentAxis:d}),h&&eA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?tA():void 0,...P}),h&&nA({...P}),aA({...P,apply:({elements:$e,rects:Ge,availableWidth:Yt,availableHeight:wt})=>{const{width:Ot,height:De}=Ge.reference,ye=$e.floating.style;ye.setProperty("--radix-popper-available-width",`${Yt}px`),ye.setProperty("--radix-popper-available-height",`${wt}px`),ye.setProperty("--radix-popper-anchor-width",`${Ot}px`),ye.setProperty("--radix-popper-anchor-height",`${De}px`)}}),B&&rA({element:B,padding:m}),mA({arrowWidth:H,arrowHeight:O}),S&&lA({strategy:"referenceHidden",...P})]}),[V,U]=Sb(M),_=Dn(C);Pt(()=>{j&&(_==null||_())},[j,_]);const L=(ce=Y.arrow)==null?void 0:ce.x,Z=(Q=Y.arrow)==null?void 0:Q.y,ie=((re=Y.arrow)==null?void 0:re.centerOffset)!==0,[ne,me]=b.useState();return Pt(()=>{R&&me(window.getComputedStyle(R).zIndex)},[R]),v.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:j?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(be=Y.transformOrigin)==null?void 0:be.x,(Me=Y.transformOrigin)==null?void 0:Me.y].join(" "),...((Ae=Y.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx(cA,{scope:o,placedSide:V,onArrowChange:te,arrowX:L,arrowY:Z,shouldHideArrow:ie,children:v.jsx(We.div,{"data-side":V,"data-align":U,...E,ref:N,style:{...E.style,animation:j?void 0:"none"}})})})});vb.displayName=nm;var bb="PopperArrow",fA={top:"bottom",right:"left",bottom:"top",left:"right"},xb=b.forwardRef(function(l,o){const{__scopePopper:i,...c}=l,f=uA(bb,i),d=fA[f.placedSide];return v.jsx("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:v.jsx(iA,{...c,ref:o,style:{...c.style,display:"block"}})})});xb.displayName=bb;function dA(n){return n!==null}var mA=n=>({name:"transformOrigin",options:n,fn(l){var A,R,z;const{placement:o,rects:i,middlewareData:c}=l,d=((A=c.arrow)==null?void 0:A.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,x]=Sb(o),p={start:"0%",center:"50%",end:"100%"}[x],S=(((R=c.arrow)==null?void 0:R.x)??0)+m/2,T=(((z=c.arrow)==null?void 0:z.y)??0)+h/2;let C="",E="";return g==="bottom"?(C=d?p:`${S}px`,E=`${-h}px`):g==="top"?(C=d?p:`${S}px`,E=`${i.floating.height+h}px`):g==="right"?(C=`${-h}px`,E=d?p:`${T}px`):g==="left"&&(C=`${i.floating.width+h}px`,E=d?p:`${T}px`),{data:{x:C,y:E}}}});function Sb(n){const[l,o="center"]=n.split("-");return[l,o]}var am=pb,lm=yb,rm=vb,om=xb,$f="rovingFocusGroup.onEntryFocus",hA={bubbles:!1,cancelable:!0},Wo="RovingFocusGroup",[vd,wb,pA]=qd(Wo),[gA,Eb]=Pl(Wo,[pA]),[yA,vA]=gA(Wo),Tb=b.forwardRef((n,l)=>v.jsx(vd.Provider,{scope:n.__scopeRovingFocusGroup,children:v.jsx(vd.Slot,{scope:n.__scopeRovingFocusGroup,children:v.jsx(bA,{...n,ref:l})})}));Tb.displayName=Wo;var bA=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...p}=n,S=b.useRef(null),T=ut(l,S),C=Pd(f),[E,A]=Vs({prop:d,defaultProp:m??null,onChange:h,caller:Wo}),[R,z]=b.useState(!1),N=Dn(g),B=wb(o),te=b.useRef(!1),[G,H]=b.useState(0);return b.useEffect(()=>{const O=S.current;if(O)return O.addEventListener($f,N),()=>O.removeEventListener($f,N)},[N]),v.jsx(yA,{scope:o,orientation:i,dir:C,loop:c,currentTabStopId:E,onItemFocus:b.useCallback(O=>A(O),[A]),onItemShiftTab:b.useCallback(()=>z(!0),[]),onFocusableItemAdd:b.useCallback(()=>H(O=>O+1),[]),onFocusableItemRemove:b.useCallback(()=>H(O=>O-1),[]),children:v.jsx(We.div,{tabIndex:R||G===0?-1:0,"data-orientation":i,...p,ref:T,style:{outline:"none",...n.style},onMouseDown:Te(n.onMouseDown,()=>{te.current=!0}),onFocus:Te(n.onFocus,O=>{const F=!te.current;if(O.target===O.currentTarget&&F&&!R){const ee=new CustomEvent($f,hA);if(O.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const fe=B().filter(M=>M.focusable),W=fe.find(M=>M.active),P=fe.find(M=>M.id===E),q=[W,P,...fe].filter(Boolean).map(M=>M.ref.current);Ab(q,x)}}te.current=!1}),onBlur:Te(n.onBlur,()=>z(!1))})})}),Cb="RovingFocusGroupItem",Mb=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:c=!1,tabStopId:f,children:d,...m}=n,h=Ir(),g=f||h,x=vA(Cb,o),p=x.currentTabStopId===g,S=wb(o),{onFocusableItemAdd:T,onFocusableItemRemove:C,currentTabStopId:E}=x;return b.useEffect(()=>{if(i)return T(),()=>C()},[i,T,C]),v.jsx(vd.ItemSlot,{scope:o,id:g,focusable:i,active:c,children:v.jsx(We.span,{tabIndex:p?0:-1,"data-orientation":x.orientation,...m,ref:l,onMouseDown:Te(n.onMouseDown,A=>{i?x.onItemFocus(g):A.preventDefault()}),onFocus:Te(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:Te(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){x.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const R=wA(A,x.orientation,x.dir);if(R!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let N=S().filter(B=>B.focusable).map(B=>B.ref.current);if(R==="last")N.reverse();else if(R==="prev"||R==="next"){R==="prev"&&N.reverse();const B=N.indexOf(A.currentTarget);N=x.loop?EA(N,B+1):N.slice(B+1)}setTimeout(()=>Ab(N))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:E!=null}):d})})});Mb.displayName=Cb;var xA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SA(n,l){return l!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function wA(n,l,o){const i=SA(n.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return xA[i]}function Ab(n,l=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}function EA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var TA=Tb,CA=Mb,bd=["Enter"," "],MA=["ArrowDown","PageUp","Home"],_b=["ArrowUp","PageDown","End"],AA=[...MA,..._b],_A={ltr:[...bd,"ArrowRight"],rtl:[...bd,"ArrowLeft"]},RA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ei="Menu",[$o,NA,OA]=qd(ei),[Xl,Rb]=Pl(ei,[OA,$r,Eb]),ti=$r(),Nb=Eb(),[Ob,dl]=Xl(ei),[zA,ni]=Xl(ei),zb=n=>{const{__scopeMenu:l,open:o=!1,children:i,dir:c,onOpenChange:f,modal:d=!0}=n,m=ti(l),[h,g]=b.useState(null),x=b.useRef(!1),p=Dn(f),S=Pd(c);return b.useEffect(()=>{const T=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),v.jsx(am,{...m,children:v.jsx(Ob,{scope:l,open:o,onOpenChange:p,content:h,onContentChange:g,children:v.jsx(zA,{scope:l,onClose:b.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:x,dir:S,modal:d,children:i})})})};zb.displayName=ei;var DA="MenuAnchor",im=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,c=ti(o);return v.jsx(lm,{...c,...i,ref:l})});im.displayName=DA;var sm="MenuPortal",[jA,Db]=Xl(sm,{forceMount:void 0}),jb=n=>{const{__scopeMenu:l,forceMount:o,children:i,container:c}=n,f=dl(sm,l);return v.jsx(jA,{scope:l,forceMount:o,children:v.jsx(qr,{present:o||f.open,children:v.jsx($d,{asChild:!0,container:c,children:i})})})};jb.displayName=sm;var zn="MenuContent",[kA,cm]=Xl(zn),kb=b.forwardRef((n,l)=>{const o=Db(zn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,f=dl(zn,n.__scopeMenu),d=ni(zn,n.__scopeMenu);return v.jsx($o.Provider,{scope:n.__scopeMenu,children:v.jsx(qr,{present:i||f.open,children:v.jsx($o.Slot,{scope:n.__scopeMenu,children:d.modal?v.jsx(LA,{...c,ref:l}):v.jsx(HA,{...c,ref:l})})})})}),LA=b.forwardRef((n,l)=>{const o=dl(zn,n.__scopeMenu),i=b.useRef(null),c=ut(l,i);return b.useEffect(()=>{const f=i.current;if(f)return eb(f)},[]),v.jsx(um,{...n,ref:c,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:Te(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),HA=b.forwardRef((n,l)=>{const o=dl(zn,n.__scopeMenu);return v.jsx(um,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),BA=Ur("MenuContent.ScrollLock"),um=b.forwardRef((n,l)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:c,onOpenAutoFocus:f,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:T,disableOutsideScroll:C,...E}=n,A=dl(zn,o),R=ni(zn,o),z=ti(o),N=Nb(o),B=NA(o),[te,G]=b.useState(null),H=b.useRef(null),O=ut(l,H,A.onContentChange),F=b.useRef(0),ee=b.useRef(""),fe=b.useRef(0),W=b.useRef(null),P=b.useRef("right"),K=b.useRef(0),q=C?Kd:b.Fragment,M=C?{as:BA,allowPinchZoom:!0}:void 0,j=V=>{var ce,Q;const U=ee.current+V,_=B().filter(re=>!re.disabled),L=document.activeElement,Z=(ce=_.find(re=>re.ref.current===L))==null?void 0:ce.textValue,ie=_.map(re=>re.textValue),ne=QA(ie,U,Z),me=(Q=_.find(re=>re.textValue===ne))==null?void 0:Q.ref.current;(function re(be){ee.current=be,window.clearTimeout(F.current),be!==""&&(F.current=window.setTimeout(()=>re(""),1e3))})(U),me&&setTimeout(()=>me.focus())};b.useEffect(()=>()=>window.clearTimeout(F.current),[]),Pv();const Y=b.useCallback(V=>{var _,L;return P.current===((_=W.current)==null?void 0:_.side)&&JA(V,(L=W.current)==null?void 0:L.area)},[]);return v.jsx(kA,{scope:o,searchRef:ee,onItemEnter:b.useCallback(V=>{Y(V)&&V.preventDefault()},[Y]),onItemLeave:b.useCallback(V=>{var U;Y(V)||((U=H.current)==null||U.focus(),G(null))},[Y]),onTriggerLeave:b.useCallback(V=>{Y(V)&&V.preventDefault()},[Y]),pointerGraceTimerRef:fe,onPointerGraceIntentChange:b.useCallback(V=>{W.current=V},[]),children:v.jsx(q,{...M,children:v.jsx(Xd,{asChild:!0,trapped:c,onMountAutoFocus:Te(f,V=>{var U;V.preventDefault(),(U=H.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:T,children:v.jsx(TA,{asChild:!0,...N,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:te,onCurrentTabStopIdChange:G,onEntryFocus:Te(h,V=>{R.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(rm,{role:"menu","aria-orientation":"vertical","data-state":Jb(A.open),"data-radix-menu-content":"",dir:R.dir,...z,...E,ref:O,style:{outline:"none",...E.style},onKeyDown:Te(E.onKeyDown,V=>{const _=V.target.closest("[data-radix-menu-content]")===V.currentTarget,L=V.ctrlKey||V.altKey||V.metaKey,Z=V.key.length===1;_&&(V.key==="Tab"&&V.preventDefault(),!L&&Z&&j(V.key));const ie=H.current;if(V.target!==ie||!AA.includes(V.key))return;V.preventDefault();const me=B().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);_b.includes(V.key)&&me.reverse(),KA(me)}),onBlur:Te(n.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(F.current),ee.current="")}),onPointerMove:Te(n.onPointerMove,Ko(V=>{const U=V.target,_=K.current!==V.clientX;if(V.currentTarget.contains(U)&&_){const L=V.clientX>K.current?"right":"left";P.current=L,K.current=V.clientX}}))})})})})})})});kb.displayName=zn;var UA="MenuGroup",fm=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{role:"group",...i,ref:l})});fm.displayName=UA;var IA="MenuLabel",Lb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{...i,ref:l})});Lb.displayName=IA;var Ks="MenuItem",f0="menu.itemSelect",sc=b.forwardRef((n,l)=>{const{disabled:o=!1,onSelect:i,...c}=n,f=b.useRef(null),d=ni(Ks,n.__scopeMenu),m=cm(Ks,n.__scopeMenu),h=ut(l,f),g=b.useRef(!1),x=()=>{const p=f.current;if(!o&&p){const S=new CustomEvent(f0,{bubbles:!0,cancelable:!0});p.addEventListener(f0,T=>i==null?void 0:i(T),{once:!0}),Uv(p,S),S.defaultPrevented?g.current=!1:d.onClose()}};return v.jsx(Hb,{...c,ref:h,disabled:o,onClick:Te(n.onClick,x),onPointerDown:p=>{var S;(S=n.onPointerDown)==null||S.call(n,p),g.current=!0},onPointerUp:Te(n.onPointerUp,p=>{var S;g.current||(S=p.currentTarget)==null||S.click()}),onKeyDown:Te(n.onKeyDown,p=>{const S=m.searchRef.current!=="";o||S&&p.key===" "||bd.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});sc.displayName=Ks;var Hb=b.forwardRef((n,l)=>{const{__scopeMenu:o,disabled:i=!1,textValue:c,...f}=n,d=cm(Ks,o),m=Nb(o),h=b.useRef(null),g=ut(l,h),[x,p]=b.useState(!1),[S,T]=b.useState("");return b.useEffect(()=>{const C=h.current;C&&T((C.textContent??"").trim())},[f.children]),v.jsx($o.ItemSlot,{scope:o,disabled:i,textValue:c??S,children:v.jsx(CA,{asChild:!0,...m,focusable:!i,children:v.jsx(We.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...f,ref:g,onPointerMove:Te(n.onPointerMove,Ko(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Te(n.onPointerLeave,Ko(C=>d.onItemLeave(C))),onFocus:Te(n.onFocus,()=>p(!0)),onBlur:Te(n.onBlur,()=>p(!1))})})})}),GA="MenuCheckboxItem",Bb=b.forwardRef((n,l)=>{const{checked:o=!1,onCheckedChange:i,...c}=n;return v.jsx(Vb,{scope:n.__scopeMenu,checked:o,children:v.jsx(sc,{role:"menuitemcheckbox","aria-checked":Fs(o)?"mixed":o,...c,ref:l,"data-state":hm(o),onSelect:Te(c.onSelect,()=>i==null?void 0:i(Fs(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Bb.displayName=GA;var Ub="MenuRadioGroup",[YA,VA]=Xl(Ub,{value:void 0,onValueChange:()=>{}}),Ib=b.forwardRef((n,l)=>{const{value:o,onValueChange:i,...c}=n,f=Dn(i);return v.jsx(YA,{scope:n.__scopeMenu,value:o,onValueChange:f,children:v.jsx(fm,{...c,ref:l})})});Ib.displayName=Ub;var Gb="MenuRadioItem",Yb=b.forwardRef((n,l)=>{const{value:o,...i}=n,c=VA(Gb,n.__scopeMenu),f=o===c.value;return v.jsx(Vb,{scope:n.__scopeMenu,checked:f,children:v.jsx(sc,{role:"menuitemradio","aria-checked":f,...i,ref:l,"data-state":hm(f),onSelect:Te(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,o)},{checkForDefaultPrevented:!1})})})});Yb.displayName=Gb;var dm="MenuItemIndicator",[Vb,qA]=Xl(dm,{checked:!1}),qb=b.forwardRef((n,l)=>{const{__scopeMenu:o,forceMount:i,...c}=n,f=qA(dm,o);return v.jsx(qr,{present:i||Fs(f.checked)||f.checked===!0,children:v.jsx(We.span,{...c,ref:l,"data-state":hm(f.checked)})})});qb.displayName=dm;var PA="MenuSeparator",Pb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})});Pb.displayName=PA;var XA="MenuArrow",Xb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,c=ti(o);return v.jsx(om,{...c,...i,ref:l})});Xb.displayName=XA;var mm="MenuSub",[$A,$b]=Xl(mm),Kb=n=>{const{__scopeMenu:l,children:o,open:i=!1,onOpenChange:c}=n,f=dl(mm,l),d=ti(l),[m,h]=b.useState(null),[g,x]=b.useState(null),p=Dn(c);return b.useEffect(()=>(f.open===!1&&p(!1),()=>p(!1)),[f.open,p]),v.jsx(am,{...d,children:v.jsx(Ob,{scope:l,open:i,onOpenChange:p,content:g,onContentChange:x,children:v.jsx($A,{scope:l,contentId:Ir(),triggerId:Ir(),trigger:m,onTriggerChange:h,children:o})})})};Kb.displayName=mm;var Yo="MenuSubTrigger",Fb=b.forwardRef((n,l)=>{const o=dl(Yo,n.__scopeMenu),i=ni(Yo,n.__scopeMenu),c=$b(Yo,n.__scopeMenu),f=cm(Yo,n.__scopeMenu),d=b.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=f,g={__scopeMenu:n.__scopeMenu},x=b.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return b.useEffect(()=>x,[x]),b.useEffect(()=>{const p=m.current;return()=>{window.clearTimeout(p),h(null)}},[m,h]),v.jsx(im,{asChild:!0,...g,children:v.jsx(Hb,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":c.contentId,"data-state":Jb(o.open),...n,ref:Vd(l,c.onTriggerChange),onClick:p=>{var S;(S=n.onClick)==null||S.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:Te(n.onPointerMove,Ko(p=>{f.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(f.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),x()},100))})),onPointerLeave:Te(n.onPointerLeave,Ko(p=>{var T,C;x();const S=(T=o.content)==null?void 0:T.getBoundingClientRect();if(S){const E=(C=o.content)==null?void 0:C.dataset.side,A=E==="right",R=A?-5:5,z=S[A?"left":"right"],N=S[A?"right":"left"];f.onPointerGraceIntentChange({area:[{x:p.clientX+R,y:p.clientY},{x:z,y:S.top},{x:N,y:S.top},{x:N,y:S.bottom},{x:z,y:S.bottom}],side:E}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.onPointerGraceIntentChange(null),300)}else{if(f.onTriggerLeave(p),p.defaultPrevented)return;f.onPointerGraceIntentChange(null)}})),onKeyDown:Te(n.onKeyDown,p=>{var T;const S=f.searchRef.current!=="";n.disabled||S&&p.key===" "||_A[i.dir].includes(p.key)&&(o.onOpenChange(!0),(T=o.content)==null||T.focus(),p.preventDefault())})})})});Fb.displayName=Yo;var Qb="MenuSubContent",Zb=b.forwardRef((n,l)=>{const o=Db(zn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,f=dl(zn,n.__scopeMenu),d=ni(zn,n.__scopeMenu),m=$b(Qb,n.__scopeMenu),h=b.useRef(null),g=ut(l,h);return v.jsx($o.Provider,{scope:n.__scopeMenu,children:v.jsx(qr,{present:i||f.open,children:v.jsx($o.Slot,{scope:n.__scopeMenu,children:v.jsx(um,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var p;d.isUsingKeyboardRef.current&&((p=h.current)==null||p.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:Te(n.onFocusOutside,x=>{x.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:Te(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:Te(n.onKeyDown,x=>{var T;const p=x.currentTarget.contains(x.target),S=RA[d.dir].includes(x.key);p&&S&&(f.onOpenChange(!1),(T=m.trigger)==null||T.focus(),x.preventDefault())})})})})})});Zb.displayName=Qb;function Jb(n){return n?"open":"closed"}function Fs(n){return n==="indeterminate"}function hm(n){return Fs(n)?"indeterminate":n?"checked":"unchecked"}function KA(n){const l=document.activeElement;for(const o of n)if(o===l||(o.focus(),document.activeElement!==l))return}function FA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}function QA(n,l,o){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?n.indexOf(o):-1;let d=FA(n,Math.max(f,0));c.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.toLowerCase().startsWith(c.toLowerCase()));return h!==o?h:void 0}function ZA(n,l){const{x:o,y:i}=n;let c=!1;for(let f=0,d=l.length-1;f<l.length;d=f++){const m=l[f],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(c=!c)}return c}function JA(n,l){if(!l)return!1;const o={x:n.clientX,y:n.clientY};return ZA(o,l)}function Ko(n){return l=>l.pointerType==="mouse"?n(l):void 0}var WA=zb,e_=im,t_=jb,n_=kb,a_=fm,l_=Lb,r_=sc,o_=Bb,i_=Ib,s_=Yb,c_=qb,u_=Pb,f_=Xb,d_=Kb,m_=Fb,h_=Zb,pm="ContextMenu",[p_]=Pl(pm,[Rb]),Xt=Rb(),[g_,Wb]=p_(pm),ex=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,dir:c,modal:f=!0}=n,[d,m]=b.useState(!1),h=Xt(l),g=Dn(i),x=b.useCallback(p=>{m(p),g(p)},[g]);return v.jsx(g_,{scope:l,open:d,onOpenChange:x,modal:f,children:v.jsx(WA,{...h,dir:c,open:d,onOpenChange:x,modal:f,children:o})})};ex.displayName=pm;var tx="ContextMenuTrigger",nx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,disabled:i=!1,...c}=n,f=Wb(tx,o),d=Xt(o),m=b.useRef({x:0,y:0}),h=b.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=b.useRef(0),x=b.useCallback(()=>window.clearTimeout(g.current),[]),p=S=>{m.current={x:S.clientX,y:S.clientY},f.onOpenChange(!0)};return b.useEffect(()=>x,[x]),b.useEffect(()=>void(i&&x()),[i,x]),v.jsxs(v.Fragment,{children:[v.jsx(e_,{...d,virtualRef:h}),v.jsx(We.span,{"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:l,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:Te(n.onContextMenu,S=>{x(),p(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:Te(n.onPointerDown,Ms(S=>{x(),g.current=window.setTimeout(()=>p(S),700)})),onPointerMove:i?n.onPointerMove:Te(n.onPointerMove,Ms(x)),onPointerCancel:i?n.onPointerCancel:Te(n.onPointerCancel,Ms(x)),onPointerUp:i?n.onPointerUp:Te(n.onPointerUp,Ms(x))})]})});nx.displayName=tx;var y_="ContextMenuPortal",ax=n=>{const{__scopeContextMenu:l,...o}=n,i=Xt(l);return v.jsx(t_,{...i,...o})};ax.displayName=y_;var lx="ContextMenuContent",rx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Wb(lx,o),f=Xt(o),d=b.useRef(!1);return v.jsx(n_,{...f,...i,ref:l,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!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)"}})});rx.displayName=lx;var v_="ContextMenuGroup",b_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(a_,{...c,...i,ref:l})});b_.displayName=v_;var x_="ContextMenuLabel",S_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(l_,{...c,...i,ref:l})});S_.displayName=x_;var w_="ContextMenuItem",ox=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(r_,{...c,...i,ref:l})});ox.displayName=w_;var E_="ContextMenuCheckboxItem",T_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(o_,{...c,...i,ref:l})});T_.displayName=E_;var C_="ContextMenuRadioGroup",M_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(i_,{...c,...i,ref:l})});M_.displayName=C_;var A_="ContextMenuRadioItem",__=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(s_,{...c,...i,ref:l})});__.displayName=A_;var R_="ContextMenuItemIndicator",N_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(c_,{...c,...i,ref:l})});N_.displayName=R_;var O_="ContextMenuSeparator",ix=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(u_,{...c,...i,ref:l})});ix.displayName=O_;var z_="ContextMenuArrow",D_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(f_,{...c,...i,ref:l})});D_.displayName=z_;var sx="ContextMenuSub",cx=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,open:c,defaultOpen:f}=n,d=Xt(l),[m,h]=Vs({prop:c,defaultProp:f??!1,onChange:i,caller:sx});return v.jsx(d_,{...d,open:m,onOpenChange:h,children:o})};cx.displayName=sx;var j_="ContextMenuSubTrigger",ux=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(m_,{...c,...i,ref:l})});ux.displayName=j_;var k_="ContextMenuSubContent",fx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Xt(o);return v.jsx(h_,{...c,...i,ref:l,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)"}})});fx.displayName=k_;function Ms(n){return l=>l.pointerType!=="mouse"?n(l):void 0}var L_=ex,H_=nx,B_=ax,U_=rx,I_=ox,G_=ix,Y_=cx,V_=ux,q_=fx;function d0(n,[l,o]){return Math.min(o,Math.max(l,n))}var P_=[" ","Enter","ArrowUp","ArrowDown"],X_=[" ","Enter"],Yl="Select",[cc,uc,$_]=qd(Yl),[Kr]=Pl(Yl,[$_,$r]),fc=$r(),[K_,ml]=Kr(Yl),[F_,Q_]=Kr(Yl),dx=n=>{const{__scopeSelect:l,children:o,open:i,defaultOpen:c,onOpenChange:f,value:d,defaultValue:m,onValueChange:h,dir:g,name:x,autoComplete:p,disabled:S,required:T,form:C}=n,E=fc(l),[A,R]=b.useState(null),[z,N]=b.useState(null),[B,te]=b.useState(!1),G=Pd(g),[H,O]=Vs({prop:i,defaultProp:c??!1,onChange:f,caller:Yl}),[F,ee]=Vs({prop:d,defaultProp:m,onChange:h,caller:Yl}),fe=b.useRef(null),W=A?C||!!A.closest("form"):!0,[P,K]=b.useState(new Set),q=Array.from(P).map(M=>M.props.value).join(";");return v.jsx(am,{...E,children:v.jsxs(K_,{required:T,scope:l,trigger:A,onTriggerChange:R,valueNode:z,onValueNodeChange:N,valueNodeHasChildren:B,onValueNodeHasChildrenChange:te,contentId:Ir(),value:F,onValueChange:ee,open:H,onOpenChange:O,dir:G,triggerPointerDownPosRef:fe,disabled:S,children:[v.jsx(cc.Provider,{scope:l,children:v.jsx(F_,{scope:n.__scopeSelect,onNativeOptionAdd:b.useCallback(M=>{K(j=>new Set(j).add(M))},[]),onNativeOptionRemove:b.useCallback(M=>{K(j=>{const Y=new Set(j);return Y.delete(M),Y})},[]),children:o})}),W?v.jsxs(kx,{"aria-hidden":!0,required:T,tabIndex:-1,name:x,autoComplete:p,value:F,onChange:M=>ee(M.target.value),disabled:S,form:C,children:[F===void 0?v.jsx("option",{value:""}):null,Array.from(P)]},q):null]})})};dx.displayName=Yl;var mx="SelectTrigger",hx=b.forwardRef((n,l)=>{const{__scopeSelect:o,disabled:i=!1,...c}=n,f=fc(o),d=ml(mx,o),m=d.disabled||i,h=ut(l,d.onTriggerChange),g=uc(o),x=b.useRef("touch"),[p,S,T]=Hx(E=>{const A=g().filter(N=>!N.disabled),R=A.find(N=>N.value===d.value),z=Bx(A,E,R);z!==void 0&&d.onValueChange(z.value)}),C=E=>{m||(d.onOpenChange(!0),T()),E&&(d.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return v.jsx(lm,{asChild:!0,...f,children:v.jsx(We.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Lx(d.value)?"":void 0,...c,ref:h,onClick:Te(c.onClick,E=>{E.currentTarget.focus(),x.current!=="mouse"&&C(E)}),onPointerDown:Te(c.onPointerDown,E=>{x.current=E.pointerType;const A=E.target;A.hasPointerCapture(E.pointerId)&&A.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:Te(c.onKeyDown,E=>{const A=p.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(A&&E.key===" ")&&P_.includes(E.key)&&(C(),E.preventDefault())})})})});hx.displayName=mx;var px="SelectValue",gx=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:c,children:f,placeholder:d="",...m}=n,h=ml(px,o),{onValueNodeHasChildrenChange:g}=h,x=f!==void 0,p=ut(l,h.onValueNodeChange);return Pt(()=>{g(x)},[g,x]),v.jsx(We.span,{...m,ref:p,style:{pointerEvents:"none"},children:Lx(h.value)?v.jsx(v.Fragment,{children:d}):f})});gx.displayName=px;var Z_="SelectIcon",yx=b.forwardRef((n,l)=>{const{__scopeSelect:o,children:i,...c}=n;return v.jsx(We.span,{"aria-hidden":!0,...c,ref:l,children:i||"▼"})});yx.displayName=Z_;var J_="SelectPortal",vx=n=>v.jsx($d,{asChild:!0,...n});vx.displayName=J_;var Vl="SelectContent",bx=b.forwardRef((n,l)=>{const o=ml(Vl,n.__scopeSelect),[i,c]=b.useState();if(Pt(()=>{c(new DocumentFragment)},[]),!o.open){const f=i;return f?Qo.createPortal(v.jsx(xx,{scope:n.__scopeSelect,children:v.jsx(cc.Slot,{scope:n.__scopeSelect,children:v.jsx("div",{children:n.children})})}),f):null}return v.jsx(Sx,{...n,ref:l})});bx.displayName=Vl;var Un=10,[xx,hl]=Kr(Vl),W_="SelectContentImpl",eR=Ur("SelectContent.RemoveScroll"),Sx=b.forwardRef((n,l)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:T,sticky:C,hideWhenDetached:E,avoidCollisions:A,...R}=n,z=ml(Vl,o),[N,B]=b.useState(null),[te,G]=b.useState(null),H=ut(l,ce=>B(ce)),[O,F]=b.useState(null),[ee,fe]=b.useState(null),W=uc(o),[P,K]=b.useState(!1),q=b.useRef(!1);b.useEffect(()=>{if(N)return eb(N)},[N]),Pv();const M=b.useCallback(ce=>{const[Q,...re]=W().map(Ae=>Ae.ref.current),[be]=re.slice(-1),Me=document.activeElement;for(const Ae of ce)if(Ae===Me||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===Q&&te&&(te.scrollTop=0),Ae===be&&te&&(te.scrollTop=te.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Me))return},[W,te]),j=b.useCallback(()=>M([O,N]),[M,O,N]);b.useEffect(()=>{P&&j()},[P,j]);const{onOpenChange:Y,triggerPointerDownPosRef:V}=z;b.useEffect(()=>{if(N){let ce={x:0,y:0};const Q=be=>{var Me,Ae;ce={x:Math.abs(Math.round(be.pageX)-(((Me=V.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Ae=V.current)==null?void 0:Ae.y)??0))}},re=be=>{ce.x<=10&&ce.y<=10?be.preventDefault():N.contains(be.target)||Y(!1),document.removeEventListener("pointermove",Q),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",re,{capture:!0})}}},[N,Y,V]),b.useEffect(()=>{const ce=()=>Y(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[Y]);const[U,_]=Hx(ce=>{const Q=W().filter(Me=>!Me.disabled),re=Q.find(Me=>Me.ref.current===document.activeElement),be=Bx(Q,ce,re);be&&setTimeout(()=>be.ref.current.focus())}),L=b.useCallback((ce,Q,re)=>{const be=!q.current&&!re;(z.value!==void 0&&z.value===Q||be)&&(F(ce),be&&(q.current=!0))},[z.value]),Z=b.useCallback(()=>N==null?void 0:N.focus(),[N]),ie=b.useCallback((ce,Q,re)=>{const be=!q.current&&!re;(z.value!==void 0&&z.value===Q||be)&&fe(ce)},[z.value]),ne=i==="popper"?xd:wx,me=ne===xd?{side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:T,sticky:C,hideWhenDetached:E,avoidCollisions:A}:{};return v.jsx(xx,{scope:o,content:N,viewport:te,onViewportChange:G,itemRefCallback:L,selectedItem:O,onItemLeave:Z,itemTextRefCallback:ie,focusSelectedItem:j,selectedItemText:ee,position:i,isPositioned:P,searchRef:U,children:v.jsx(Kd,{as:eR,allowPinchZoom:!0,children:v.jsx(Xd,{asChild:!0,trapped:z.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:Te(c,ce=>{var Q;(Q=z.trigger)==null||Q.focus({preventScroll:!0}),ce.preventDefault()}),children:v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:v.jsx(ne,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:ce=>ce.preventDefault(),...R,...me,onPlaced:()=>K(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Te(R.onKeyDown,ce=>{const Q=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!Q&&ce.key.length===1&&_(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let be=W().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Me=ce.target,Ae=be.indexOf(Me);be=be.slice(Ae+1)}setTimeout(()=>M(be)),ce.preventDefault()}})})})})})})});Sx.displayName=W_;var tR="SelectItemAlignedPosition",wx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onPlaced:i,...c}=n,f=ml(Vl,o),d=hl(Vl,o),[m,h]=b.useState(null),[g,x]=b.useState(null),p=ut(l,H=>x(H)),S=uc(o),T=b.useRef(!1),C=b.useRef(!0),{viewport:E,selectedItem:A,selectedItemText:R,focusSelectedItem:z}=d,N=b.useCallback(()=>{if(f.trigger&&f.valueNode&&m&&g&&E&&A&&R){const H=f.trigger.getBoundingClientRect(),O=g.getBoundingClientRect(),F=f.valueNode.getBoundingClientRect(),ee=R.getBoundingClientRect();if(f.dir!=="rtl"){const Me=ee.left-O.left,Ae=F.left-Me,$e=H.left-Ae,Ge=H.width+$e,Yt=Math.max(Ge,O.width),wt=window.innerWidth-Un,Ot=d0(Ae,[Un,Math.max(Un,wt-Yt)]);m.style.minWidth=Ge+"px",m.style.left=Ot+"px"}else{const Me=O.right-ee.right,Ae=window.innerWidth-F.right-Me,$e=window.innerWidth-H.right-Ae,Ge=H.width+$e,Yt=Math.max(Ge,O.width),wt=window.innerWidth-Un,Ot=d0(Ae,[Un,Math.max(Un,wt-Yt)]);m.style.minWidth=Ge+"px",m.style.right=Ot+"px"}const fe=S(),W=window.innerHeight-Un*2,P=E.scrollHeight,K=window.getComputedStyle(g),q=parseInt(K.borderTopWidth,10),M=parseInt(K.paddingTop,10),j=parseInt(K.borderBottomWidth,10),Y=parseInt(K.paddingBottom,10),V=q+M+P+Y+j,U=Math.min(A.offsetHeight*5,V),_=window.getComputedStyle(E),L=parseInt(_.paddingTop,10),Z=parseInt(_.paddingBottom,10),ie=H.top+H.height/2-Un,ne=W-ie,me=A.offsetHeight/2,ce=A.offsetTop+me,Q=q+M+ce,re=V-Q;if(Q<=ie){const Me=fe.length>0&&A===fe[fe.length-1].ref.current;m.style.bottom="0px";const Ae=g.clientHeight-E.offsetTop-E.offsetHeight,$e=Math.max(ne,me+(Me?Z:0)+Ae+j),Ge=Q+$e;m.style.height=Ge+"px"}else{const Me=fe.length>0&&A===fe[0].ref.current;m.style.top="0px";const $e=Math.max(ie,q+E.offsetTop+(Me?L:0)+me)+re;m.style.height=$e+"px",E.scrollTop=Q-ie+E.offsetTop}m.style.margin=`${Un}px 0`,m.style.minHeight=U+"px",m.style.maxHeight=W+"px",i==null||i(),requestAnimationFrame(()=>T.current=!0)}},[S,f.trigger,f.valueNode,m,g,E,A,R,f.dir,i]);Pt(()=>N(),[N]);const[B,te]=b.useState();Pt(()=>{g&&te(window.getComputedStyle(g).zIndex)},[g]);const G=b.useCallback(H=>{H&&C.current===!0&&(N(),z==null||z(),C.current=!1)},[N,z]);return v.jsx(aR,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:T,onScrollButtonChange:G,children:v.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:B},children:v.jsx(We.div,{...c,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});wx.displayName=tR;var nR="SelectPopperPosition",xd=b.forwardRef((n,l)=>{const{__scopeSelect:o,align:i="start",collisionPadding:c=Un,...f}=n,d=fc(o);return v.jsx(rm,{...d,...f,ref:l,align:i,collisionPadding:c,style:{boxSizing:"border-box",...f.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)"}})});xd.displayName=nR;var[aR,gm]=Kr(Vl,{}),Sd="SelectViewport",Ex=b.forwardRef((n,l)=>{const{__scopeSelect:o,nonce:i,...c}=n,f=hl(Sd,o),d=gm(Sd,o),m=ut(l,f.onViewportChange),h=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.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}),v.jsx(cc.Slot,{scope:o,children:v.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Te(c.onScroll,g=>{const x=g.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&p){const T=Math.abs(h.current-x.scrollTop);if(T>0){const C=window.innerHeight-Un*2,E=parseFloat(p.style.minHeight),A=parseFloat(p.style.height),R=Math.max(E,A);if(R<C){const z=R+T,N=Math.min(C,z),B=z-N;p.style.height=N+"px",p.style.bottom==="0px"&&(x.scrollTop=B>0?B:0,p.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});Ex.displayName=Sd;var Tx="SelectGroup",[lR,rR]=Kr(Tx),Cx=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=Ir();return v.jsx(lR,{scope:o,id:c,children:v.jsx(We.div,{role:"group","aria-labelledby":c,...i,ref:l})})});Cx.displayName=Tx;var Mx="SelectLabel",oR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=rR(Mx,o);return v.jsx(We.div,{id:c.id,...i,ref:l})});oR.displayName=Mx;var Qs="SelectItem",[iR,Ax]=Kr(Qs),_x=b.forwardRef((n,l)=>{const{__scopeSelect:o,value:i,disabled:c=!1,textValue:f,...d}=n,m=ml(Qs,o),h=hl(Qs,o),g=m.value===i,[x,p]=b.useState(f??""),[S,T]=b.useState(!1),C=ut(l,z=>{var N;return(N=h.itemRefCallback)==null?void 0:N.call(h,z,i,c)}),E=Ir(),A=b.useRef("touch"),R=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(iR,{scope:o,value:i,disabled:c,textId:E,isSelected:g,onItemTextChange:b.useCallback(z=>{p(N=>N||((z==null?void 0:z.textContent)??"").trim())},[]),children:v.jsx(cc.ItemSlot,{scope:o,value:i,disabled:c,textValue:x,children:v.jsx(We.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:C,onFocus:Te(d.onFocus,()=>T(!0)),onBlur:Te(d.onBlur,()=>T(!1)),onClick:Te(d.onClick,()=>{A.current!=="mouse"&&R()}),onPointerUp:Te(d.onPointerUp,()=>{A.current==="mouse"&&R()}),onPointerDown:Te(d.onPointerDown,z=>{A.current=z.pointerType}),onPointerMove:Te(d.onPointerMove,z=>{var N;A.current=z.pointerType,c?(N=h.onItemLeave)==null||N.call(h):A.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(d.onPointerLeave,z=>{var N;z.currentTarget===document.activeElement&&((N=h.onItemLeave)==null||N.call(h))}),onKeyDown:Te(d.onKeyDown,z=>{var B;((B=h.searchRef)==null?void 0:B.current)!==""&&z.key===" "||(X_.includes(z.key)&&R(),z.key===" "&&z.preventDefault())})})})})});_x.displayName=Qs;var Vo="SelectItemText",Rx=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:c,...f}=n,d=ml(Vo,o),m=hl(Vo,o),h=Ax(Vo,o),g=Q_(Vo,o),[x,p]=b.useState(null),S=ut(l,R=>p(R),h.onItemTextChange,R=>{var z;return(z=m.itemTextRefCallback)==null?void 0:z.call(m,R,h.value,h.disabled)}),T=x==null?void 0:x.textContent,C=b.useMemo(()=>v.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:E,onNativeOptionRemove:A}=g;return Pt(()=>(E(C),()=>A(C)),[E,A,C]),v.jsxs(v.Fragment,{children:[v.jsx(We.span,{id:h.textId,...f,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Qo.createPortal(f.children,d.valueNode):null]})});Rx.displayName=Vo;var Nx="SelectItemIndicator",Ox=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return Ax(Nx,o).isSelected?v.jsx(We.span,{"aria-hidden":!0,...i,ref:l}):null});Ox.displayName=Nx;var wd="SelectScrollUpButton",zx=b.forwardRef((n,l)=>{const o=hl(wd,n.__scopeSelect),i=gm(wd,n.__scopeSelect),[c,f]=b.useState(!1),d=ut(l,i.onScrollButtonChange);return Pt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollTop>0;f(g)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),c?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});zx.displayName=wd;var Ed="SelectScrollDownButton",Dx=b.forwardRef((n,l)=>{const o=hl(Ed,n.__scopeSelect),i=gm(Ed,n.__scopeSelect),[c,f]=b.useState(!1),d=ut(l,i.onScrollButtonChange);return Pt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<g;f(x)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),c?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});Dx.displayName=Ed;var jx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onAutoScroll:i,...c}=n,f=hl("SelectScrollButton",o),d=b.useRef(null),m=uc(o),h=b.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return b.useEffect(()=>()=>h(),[h]),Pt(()=>{var x;const g=m().find(p=>p.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),v.jsx(We.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:Te(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:Te(c.onPointerMove,()=>{var g;(g=f.onItemLeave)==null||g.call(f),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:Te(c.onPointerLeave,()=>{h()})})}),sR="SelectSeparator",cR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return v.jsx(We.div,{"aria-hidden":!0,...i,ref:l})});cR.displayName=sR;var Td="SelectArrow",uR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=fc(o),f=ml(Td,o),d=hl(Td,o);return f.open&&d.position==="popper"?v.jsx(om,{...c,...i,ref:l}):null});uR.displayName=Td;var fR="SelectBubbleInput",kx=b.forwardRef(({__scopeSelect:n,value:l,...o},i)=>{const c=b.useRef(null),f=ut(i,c),d=eM(l);return b.useEffect(()=>{const m=c.current;if(!m)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&x){const p=new Event("change",{bubbles:!0});x.call(m,l),m.dispatchEvent(p)}},[d,l]),v.jsx(We.select,{...o,style:{...Iv,...o.style},ref:f,defaultValue:l})});kx.displayName=fR;function Lx(n){return n===""||n===void 0}function Hx(n){const l=Dn(n),o=b.useRef(""),i=b.useRef(0),c=b.useCallback(d=>{const m=o.current+d;l(m),(function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[l]),f=b.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,c,f]}function Bx(n,l,o){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?n.indexOf(o):-1;let d=dR(n,Math.max(f,0));c.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return h!==o?h:void 0}function dR(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var mR=dx,hR=hx,pR=gx,gR=yx,yR=vx,vR=bx,bR=Ex,xR=Cx,SR=_x,wR=Rx,ER=Ox,TR=zx,CR=Dx,MR="Separator",m0="horizontal",AR=["horizontal","vertical"],Ux=b.forwardRef((n,l)=>{const{decorative:o,orientation:i=m0,...c}=n,f=_R(i)?i:m0,m=o?{role:"none"}:{"aria-orientation":f==="vertical"?f:void 0,role:"separator"};return v.jsx(We.div,{"data-orientation":f,...m,...c,ref:l})});Ux.displayName=MR;function _R(n){return AR.includes(n)}var RR=Ux,[dc]=Pl("Tooltip",[$r]),ym=$r(),Ix="TooltipProvider",NR=700,h0="tooltip.open",[OR,Gx]=dc(Ix),Yx=n=>{const{__scopeTooltip:l,delayDuration:o=NR,skipDelayDuration:i=300,disableHoverableContent:c=!1,children:f}=n,d=b.useRef(!0),m=b.useRef(!1),h=b.useRef(0);return b.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),v.jsx(OR,{scope:l,isOpenDelayedRef:d,delayDuration:o,onOpen:b.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:b.useCallback(g=>{m.current=g},[]),disableHoverableContent:c,children:f})};Yx.displayName=Ix;var Vx="Tooltip",[qO,mc]=dc(Vx),Cd="TooltipTrigger",zR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,c=mc(Cd,o),f=Gx(Cd,o),d=ym(o),m=b.useRef(null),h=ut(l,m,c.onTriggerChange),g=b.useRef(!1),x=b.useRef(!1),p=b.useCallback(()=>g.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(lm,{asChild:!0,...d,children:v.jsx(We.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:h,onPointerMove:Te(n.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!f.isPointerInTransitRef.current&&(c.onTriggerEnter(),x.current=!0)}),onPointerLeave:Te(n.onPointerLeave,()=>{c.onTriggerLeave(),x.current=!1}),onPointerDown:Te(n.onPointerDown,()=>{c.open&&c.onClose(),g.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Te(n.onFocus,()=>{g.current||c.onOpen()}),onBlur:Te(n.onBlur,c.onClose),onClick:Te(n.onClick,c.onClose)})})});zR.displayName=Cd;var DR="TooltipPortal",[PO,jR]=dc(DR,{forceMount:void 0}),Yr="TooltipContent",kR=b.forwardRef((n,l)=>{const o=jR(Yr,n.__scopeTooltip),{forceMount:i=o.forceMount,side:c="top",...f}=n,d=mc(Yr,n.__scopeTooltip);return v.jsx(qr,{present:i||d.open,children:d.disableHoverableContent?v.jsx(qx,{side:c,...f,ref:l}):v.jsx(LR,{side:c,...f,ref:l})})}),LR=b.forwardRef((n,l)=>{const o=mc(Yr,n.__scopeTooltip),i=Gx(Yr,n.__scopeTooltip),c=b.useRef(null),f=ut(l,c),[d,m]=b.useState(null),{trigger:h,onClose:g}=o,x=c.current,{onPointerInTransitChange:p}=i,S=b.useCallback(()=>{m(null),p(!1)},[p]),T=b.useCallback((C,E)=>{const A=C.currentTarget,R={x:C.clientX,y:C.clientY},z=GR(R,A.getBoundingClientRect()),N=YR(R,z),B=VR(E.getBoundingClientRect()),te=PR([...N,...B]);m(te),p(!0)},[p]);return b.useEffect(()=>()=>S(),[S]),b.useEffect(()=>{if(h&&x){const C=A=>T(A,x),E=A=>T(A,h);return h.addEventListener("pointerleave",C),x.addEventListener("pointerleave",E),()=>{h.removeEventListener("pointerleave",C),x.removeEventListener("pointerleave",E)}}},[h,x,T,S]),b.useEffect(()=>{if(d){const C=E=>{const A=E.target,R={x:E.clientX,y:E.clientY},z=(h==null?void 0:h.contains(A))||(x==null?void 0:x.contains(A)),N=!qR(R,d);z?S():N&&(S(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[h,x,d,g,S]),v.jsx(qx,{...n,ref:f})}),[HR,BR]=dc(Vx,{isInside:!1}),UR=LT("TooltipContent"),qx=b.forwardRef((n,l)=>{const{__scopeTooltip:o,children:i,"aria-label":c,onEscapeKeyDown:f,onPointerDownOutside:d,...m}=n,h=mc(Yr,o),g=ym(o),{onClose:x}=h;return b.useEffect(()=>(document.addEventListener(h0,x),()=>document.removeEventListener(h0,x)),[x]),b.useEffect(()=>{if(h.trigger){const p=S=>{const T=S.target;T!=null&&T.contains(h.trigger)&&x()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,x]),v.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:p=>p.preventDefault(),onDismiss:x,children:v.jsxs(rm,{"data-state":h.stateAttribute,...g,...m,ref:l,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(UR,{children:i}),v.jsx(HR,{scope:o,isInside:!0,children:v.jsx(YT,{id:h.contentId,role:"tooltip",children:c||i})})]})})});kR.displayName=Yr;var Px="TooltipArrow",IR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,c=ym(o);return BR(Px,o).isInside?null:v.jsx(om,{...c,...i,ref:l})});IR.displayName=Px;function GR(n,l){const o=Math.abs(l.top-n.y),i=Math.abs(l.bottom-n.y),c=Math.abs(l.right-n.x),f=Math.abs(l.left-n.x);switch(Math.min(o,i,c,f)){case f:return"left";case c:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function YR(n,l,o=5){const i=[];switch(l){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 VR(n){const{top:l,right:o,bottom:i,left:c}=n;return[{x:c,y:l},{x:o,y:l},{x:o,y:i},{x:c,y:i}]}function qR(n,l){const{x:o,y:i}=n;let c=!1;for(let f=0,d=l.length-1;f<l.length;d=f++){const m=l[f],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(c=!c)}return c}function PR(n){const l=n.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),XR(l)}function XR(n){if(n.length<=1)return n.slice();const l=[];for(let i=0;i<n.length;i++){const c=n[i];for(;l.length>=2;){const f=l[l.length-1],d=l[l.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))l.pop();else break}l.push(c)}l.pop();const o=[];for(let i=n.length-1;i>=0;i--){const c=n[i];for(;o.length>=2;){const f=o[o.length-1],d=o[o.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))o.pop();else break}o.push(c)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var $R=Yx;const KR=DT("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 In({className:n,variant:l="default",size:o="default",asChild:i=!1,...c}){const f=i?jT:"button";return v.jsx(f,{"data-slot":"button","data-variant":l,"data-size":o,className:Ze(KR({variant:l,size:o,className:n})),...c})}const FR=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function QR({slides:n,startSlideId:l,onExit:o}){const i=b.useMemo(()=>{const Q=n.findIndex(re=>re.id===l);return Q>=0?Q:0},[n,l]),[c,f]=b.useState(i),[d,m]=b.useState("none"),[h,g]=b.useState("#F59E0B"),[x,p]=b.useState(!1),[S,T]=b.useState([]),[C,E]=b.useState({x:-100,y:-100}),[A,R]=b.useState(!!document.fullscreenElement),[z,N]=b.useState(()=>({height:window.innerHeight,width:window.innerWidth})),B=b.useRef(null),te=b.useRef(null),G=b.useRef(null),H=b.useRef(0),O=b.useRef(c),F=b.useMemo(()=>{const Q=n.filter(re=>re.hidden!==!0);return Q.length>0?Q:n},[n]),ee=F[Math.min(c,F.length-1)]??null;b.useEffect(()=>{const Q=F.findIndex(re=>re.id===l);f(Q>=0?Q:0)},[F,l]),b.useEffect(()=>{const Q=F.findIndex(re=>re.id===(ee==null?void 0:ee.id));Q>=0&&Q!==c&&f(Q)},[c,ee==null?void 0:ee.id,F]),b.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]),b.useEffect(()=>{const Q=()=>{R(!!document.fullscreenElement),N({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",Q),document.addEventListener("fullscreenchange",Q),()=>{window.removeEventListener("resize",Q),document.removeEventListener("fullscreenchange",Q)}},[]);const fe=b.useCallback(()=>{p(!0),G.current&&window.clearTimeout(G.current),G.current=window.setTimeout(()=>{p(!1)},1500)},[]);function W(Q){m(re=>re===Q?"none":Q)}const P=b.useCallback(()=>{T([]),te.current=null},[]);function K(Q){m("none"),f(Math.min(Math.max(Q,0),F.length-1)),P()}function q(){K(c+1)}function M(){var re;const Q=document.documentElement;if(document.fullscreenElement){(re=document.exitFullscreen)==null||re.call(document);return}Q.requestFullscreen&&Q.requestFullscreen()}function j(Q){return Q.clientY>=window.innerHeight-96}function Y(Q){if(j(Q)&&fe(),d==="laser"&&E({x:Q.clientX,y:Q.clientY}),d==="pen"&&te.current){const re=B.current,be=re==null?void 0:re.getBoundingClientRect();if(re&&be){const Me=Math.min(Math.max(Q.clientX-be.left,0),be.width)/Z,Ae=Math.min(Math.max(Q.clientY-be.top,0),be.height)/Z,$e={...te.current,points:`${te.current.points} L ${Me.toFixed(1)} ${Ae.toFixed(1)}`};te.current=$e,T(Ge=>[...Ge.slice(0,-1),$e])}}}function V(Q){L(),!(d!=="none"||!B.current||!(Q.target instanceof Node))&&B.current.contains(Q.target)&&q()}function U(Q){if(d!=="none"||Math.abs(Q.deltaY)<Math.abs(Q.deltaX)||Q.deltaY<=8)return;const re=Date.now();re-H.current<360||(H.current=re,Q.preventDefault(),q())}function _(Q){if(d!=="pen"||!B.current||!(Q.target instanceof Node)||!B.current.contains(Q.target))return;const re=B.current.getBoundingClientRect();if(!(Q.clientX>=re.left&&Q.clientX<=re.right&&Q.clientY>=re.top&&Q.clientY<=re.bottom))return;const Me=Math.min(Math.max(Q.clientX-re.left,0),re.width)/Z,Ae=Math.min(Math.max(Q.clientY-re.top,0),re.height)/Z,$e={color:h,points:`M ${Me.toFixed(1)} ${Ae.toFixed(1)}`};te.current=$e,T(Ge=>[...Ge,$e])}function L(){te.current=null}if(b.useEffect(()=>{O.current!==c&&(O.current=c,P())},[c,P]),b.useEffect(()=>{const Q=re=>{if(re.key==="Escape"){if(d==="pen"){m("none"),P(),fe();return}o();return}(re.key==="ArrowRight"||re.key==="ArrowDown"||re.key==="PageDown")&&(m("none"),f(be=>Math.min(be+1,F.length-1))),(re.key==="ArrowLeft"||re.key==="ArrowUp"||re.key==="PageUp")&&(m("none"),f(be=>Math.max(be-1,0)))};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[P,o,F.length,fe,d]),b.useEffect(()=>{var re;if(!ee)return;const Q=(re=B.current)==null?void 0:re.querySelector("[data-testid='presenter-slide-iframe']");Q&&(Q.srcdoc=ee.htmlSource)},[ee]),!ee)return null;const Z=Math.min(z.width/ee.width,z.height/ee.height),ie=Math.max(320,Math.floor(ee.width*Z)),ne=Math.max(240,Math.floor(ee.height*Z)),me=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ce=d==="laser"?"none":d==="pen"?me:"default";return v.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ce},onPointerMove:Y,onPointerDown:_,onPointerUp:V,onPointerLeave:L,onWheel:U,children:[v.jsxs("div",{ref:B,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${ie}px`,height:`${ne}px`,transform:"translate(-50%, -50%)"},children:[v.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ee.width}px`,height:`${ee.height}px`,transform:`scale(${Z})`,transformOrigin:"top left"}}),v.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${ee.width} ${ee.height}`,children:S.map((Q,re)=>v.jsx("path",{d:Q.points,fill:"none",stroke:Q.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${Q.color}-${re}`))})]}),v.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:d==="laser"?1:0,transform:`translate(${C.x}px, ${C.y}px) translate(-50%, -50%)`}}),d==="pen"?v.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:FR.map(Q=>v.jsx("button",{type:"button","aria-label":`Use pen color ${Q}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:Q,outline:h===Q?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(Q)},Q))}):null,v.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":x?"true":"false",onPointerEnter:fe,onPointerMove:fe,children:[v.jsx(In,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>K(c-1),disabled:c===0,children:"Prev"}),v.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[c+1," / ",F.length]}),v.jsx(In,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>K(c+1),disabled:c>=F.length-1,children:"Next"}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(In,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>W("laser"),"aria-pressed":d==="laser",children:[v.jsx(IE,{className:"size-3.5"}),"Laser"]}),v.jsxs(In,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>W("pen"),"aria-pressed":d==="pen",children:[v.jsx(yE,{className:"size-3.5"}),"Pen"]}),v.jsxs(In,{variant:"ghost",size:"sm","aria-label":A?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:M,children:[v.jsx(hE,{className:"size-3.5"}),A?"Window":"Fullscreen"]}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(In,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:o,children:[v.jsx(Sv,{className:"size-3.5"}),"Exit"]})]})]})}function Xx({...n}){return v.jsx(L_,{"data-slot":"context-menu",...n})}function $x({...n}){return v.jsx(H_,{"data-slot":"context-menu-trigger",...n})}function Kf({...n}){return v.jsx(Y_,{"data-slot":"context-menu-sub",...n})}function Ff({className:n,inset:l,children:o,...i}){return v.jsxs(V_,{"data-slot":"context-menu-sub-trigger","data-inset":l,className:Ze("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,v.jsx(P2,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Qf({className:n,...l}){return v.jsx(q_,{"data-slot":"context-menu-sub-content",className:Ze("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),...l})}function Kx({className:n,...l}){return v.jsx(B_,{children:v.jsx(U_,{"data-slot":"context-menu-content",className:Ze("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),...l})})}function St({className:n,inset:l,variant:o="default",...i}){return v.jsx(I_,{"data-slot":"context-menu-item","data-inset":l,"data-variant":o,className:Ze("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 Zs({className:n,...l}){return v.jsx(G_,{"data-slot":"context-menu-separator",className:Ze("-mx-1 my-1 h-px bg-foreground/10",n),...l})}function p0({className:n,...l}){return v.jsx("span",{"data-slot":"context-menu-shortcut",className:Ze("ml-auto text-[11px] tracking-normal text-foreground/40",n),...l})}function ZR({slides:n,activeSlideId:l,slideCount:o,thumbnails:i,onSelectSlide:c,onAdd:f,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:x,onReorder:p}){const[S,T]=b.useState(null),[C,E]=b.useState(null),A=S?n.findIndex(N=>N.id===S):-1,R=b.useCallback(N=>{N==null||N.scrollIntoView({block:"nearest",inline:"nearest"})},[]),z=b.useCallback((N,B)=>{if(!N||B===null){T(null),E(null);return}const te=n.findIndex(G=>G.id===N);te>=0&&te!==B&&(p==null||p(N,B)),T(null),E(null)},[p,n]);return v.jsx("aside",{className:"flex h-[calc(100vh-3.5rem)] w-[212px] shrink-0 flex-col border-r border-foreground/[0.06] bg-white","data-testid":"slide-sidebar",children:v.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[v.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[v.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[v.jsx("span",{className:"tabular-nums",children:o})," slides"]}),v.jsx("button",{onClick:f,className:"flex size-7 items-center justify-center rounded-md text-foreground/50 transition-colors hover:bg-foreground/[0.06] hover:text-foreground",type:"button",title:"Add slide","aria-label":"Add slide",children:v.jsx(kf,{className:"size-3.5"})})]}),v.jsx("div",{className:"min-h-0 flex-1 space-y-2.5 overflow-y-auto px-2 py-2.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-testid":"slide-list",children:n.map((N,B)=>{const te=N.id===l,G=N.hidden===!0,H=N.id===S,O=A>=0&&C===B&&B<A&&S!==N.id,F=A>=0&&C===B&&B>A&&S!==N.id;return v.jsxs(Xx,{children:[v.jsx($x,{asChild:!0,children:v.jsxs("div",{draggable:!0,onDragStart:ee=>{T(N.id),E(B),ee.dataTransfer.effectAllowed="move",ee.dataTransfer.setData("text/plain",N.id)},onDragOver:ee=>{ee.preventDefault(),ee.dataTransfer.dropEffect="move",E(B)},onDrop:ee=>{ee.preventDefault(),ee.stopPropagation();const fe=ee.dataTransfer.getData("text/plain")||S;z(fe,B)},onDragEnd:()=>{T(null),E(null)},className:Ze("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",H&&"opacity-60"),"data-testid":"slide-card",children:[O?v.jsx(g0,{}):null,v.jsx("div",{className:Ze("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",te?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:B+1}),v.jsxs("button",{ref:te?R:null,className:Ze("relative flex-1 overflow-hidden rounded-lg text-left ring-1 ring-inset transition-all focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",te?"shadow-[0_0_0_2px_var(--background),0_0_0_3px_var(--foreground)] ring-foreground":"ring-foreground/30 shadow-[0_0_0_1px_rgba(0,0,0,0.05),0_1px_3px_rgba(0,0,0,0.04)] hover:ring-foreground/45",G&&"opacity-40"),onClick:()=>c(N.id),type:"button","aria-label":`Slide ${B+1}`,"aria-current":te?"true":void 0,children:[v.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[N.id]?v.jsx("img",{alt:`Slide ${B+1}`,className:"absolute inset-0 block size-full object-cover",src:i[N.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",B+1]}),G?v.jsx("div",{className:"absolute left-1 top-1 flex size-4 items-center justify-center rounded bg-foreground/80 text-background","data-testid":"slide-hidden-indicator",children:v.jsx(Ay,{className:"size-2.5"})}):null]}),N.title?v.jsx("div",{className:"truncate border-t border-foreground/[0.04] bg-white px-2 py-1 text-[11px] text-foreground/60",children:N.title}):null]}),F?v.jsx(g0,{position:"after"}):null]})}),v.jsxs(Kx,{"aria-label":"Slide actions",className:"min-w-36",children:[v.jsxs(St,{onSelect:()=>d==null?void 0:d(N.id),children:[v.jsx(kf,{className:"size-3.5"}),"Add Slide Above"]}),v.jsxs(St,{onSelect:()=>m==null?void 0:m(N.id),children:[v.jsx(kf,{className:"size-3.5"}),"Add Slide Below"]}),v.jsx(Zs,{}),v.jsxs(St,{onSelect:()=>h==null?void 0:h(N.id),children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate"]}),v.jsxs(St,{onSelect:()=>x==null?void 0:x(N.id),children:[G?v.jsx(pv,{className:"size-3.5"}):v.jsx(Ay,{className:"size-3.5"}),G?"Show":"Hide"]}),v.jsx(Zs,{}),v.jsxs(St,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(N.id),children:[v.jsx(bv,{className:"size-3.5"}),"Delete"]})]})]},N.id)})})]})})}function g0({position:n="before"}){return v.jsxs("div",{className:Ze("pointer-events-none absolute left-6 right-1 z-10 flex h-3 items-center",n==="before"?"-top-[11px]":"-bottom-[11px]"),"data-testid":"slide-insertion-marker",children:[v.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),v.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const JR=18,WR=6,As=24,_s="#ef4444",Js=40,y0=12,v0=360;function kr(n,l,o,i,c){return Math.max(n,o)-Math.min(l,i)<=c}function eN({selectionBounds:n,snapGuides:l,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:c,onRotateHandleMouseDown:f}){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 v.jsxs(v.Fragment,{children:[l.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",x=14,p=m.variant==="spacing"?2:1,S=m.orientation==="vertical",T=S?{left:`${m.start.x}px`,top:`${Math.min(m.start.y,m.end.y)}px`,width:"0",height:`${Math.max(Math.abs(m.end.y-m.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:_s,opacity:m.variant==="spacing"?.9:.82}:{left:`${Math.min(m.start.x,m.end.x)}px`,top:`${m.start.y}px`,width:`${Math.max(Math.abs(m.end.x-m.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:_s,opacity:m.variant==="spacing"?.9:.82},C=S?{width:`${x}px`,height:`${p}px`,left:`${-x/2}px`,backgroundColor:_s}:{width:`${p}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:_s};return v.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:T,children:m.variant==="spacing"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,top:"0"}:{...C,left:"0"}}),v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),v.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:f}),o.map(m=>v.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${m.corner}`,"aria-label":`Resize selected element from ${m.corner}`,style:{left:`${m.x}px`,top:`${m.y}px`},onMouseDown:h=>{c(m.corner,h)}},m.corner))]})}function tN({children:n,selectionCommandAvailability:l,onAlignToSlide:o,onDelete:i,onDistribute:c,onDuplicate:f,onGroup:d,onLayerOrder:m,onUngroup:h}){return v.jsxs(Xx,{children:[v.jsx($x,{asChild:!0,children:n}),v.jsxs(Kx,{"aria-label":"Selection actions",children:[v.jsxs(St,{disabled:!l.group,onSelect:d,children:[v.jsx(fd,{className:"size-3.5"}),"Group"]}),v.jsxs(St,{disabled:!l.ungroup,onSelect:h,children:[v.jsx(xv,{className:"size-3.5"}),"Ungroup"]}),v.jsx(Zs,{}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(cd,{className:"size-3.5"}),"Layer"]}),v.jsxs(Qf,{children:[v.jsxs(St,{onSelect:()=>m("front"),children:[v.jsx(cd,{className:"size-3.5"}),"Bring to front"]}),v.jsxs(St,{onSelect:()=>m("forward"),children:[v.jsx(Id,{className:"size-3.5"}),"Bring forward"]}),v.jsxs(St,{onSelect:()=>m("backward"),children:[v.jsx(Zo,{className:"size-3.5"}),"Send backward"]}),v.jsxs(St,{onSelect:()=>m("back"),children:[v.jsx(dv,{className:"size-3.5"}),"Send to back"]})]})]}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(sd,{className:"size-3.5"}),"Align"]}),v.jsxs(Qf,{children:[v.jsxs(St,{onSelect:()=>o("left"),children:[v.jsx(uv,{className:"size-3.5"}),"Align left"]}),v.jsxs(St,{onSelect:()=>o("hcenter"),children:[v.jsx(sd,{className:"size-3.5"}),"Align horizontal center"]}),v.jsxs(St,{onSelect:()=>o("right"),children:[v.jsx(sv,{className:"size-3.5"}),"Align right"]}),v.jsxs(St,{onSelect:()=>o("top"),children:[v.jsx(fv,{className:"size-3.5"}),"Align top"]}),v.jsxs(St,{onSelect:()=>o("vcenter"),children:[v.jsx(iv,{className:"size-3.5"}),"Align vertical center"]}),v.jsxs(St,{onSelect:()=>o("bottom"),children:[v.jsx(cv,{className:"size-3.5"}),"Align bottom"]})]})]}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(ud,{className:"size-3.5"}),"Distribute"]}),v.jsxs(Qf,{children:[v.jsxs(St,{onSelect:()=>c("horizontal"),children:[v.jsx(ud,{className:"size-3.5"}),"Horizontally"]}),v.jsxs(St,{onSelect:()=>c("vertical"),children:[v.jsx(vv,{className:"size-3.5"}),"Vertically"]})]})]}),v.jsx(Zs,{}),v.jsxs(St,{onSelect:f,children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate",v.jsx(p0,{children:"⌘D"})]}),v.jsxs(St,{variant:"destructive",onSelect:i,children:[v.jsx(bv,{className:"size-3.5"}),"Delete",v.jsx(p0,{children:"Del"})]})]})]})}const nN=[{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 aN(n,l){const o=x0(n),i=x0(l);return!o||!i?!1:o===i||S0(b0(n))===S0(b0(l))}function lN(n){const l=n.trim().toLowerCase();if(l==="bold"||l==="bolder")return!0;const o=Number.parseInt(l,10);return Number.isFinite(o)&&o>=600}function Md(n){const l=new Set,o=n.toLowerCase();if(!o||o==="none")return l;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&l.add(i);return l}function rN(n){return oN(n)?n.trim():iN(n)??"#000000"}function oN(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function b0(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function x0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function S0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Zf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function iN(n){const l=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return l?`#${Zf(l[1]||"0")}${Zf(l[2]||"0")}${Zf(l[3]||"0")}`:null}function Ad({feature:n,inspectedStyles:l,attributeValues:o}){var c,f;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=cN(l,n.propertyName);return n.id==="font-family"?((f=(c=n.options)==null?void 0:c.find(d=>aN(i,d.value)))==null?void 0:f.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(Gn(i).rotate):n.controlType==="color"?rN(i):n.id==="text-align"&&i==="start"?"left":i}function w0(n,l){return n.id==="font-size"&&l.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(l)||8))}px`:n.id==="font-bold"?l?"700":"400":n.id==="font-italic"?l?"italic":"normal":n.id==="font-underline"?l?"underline":"none":n.id==="font-strikethrough"?l?"line-through":"none":n.id==="locked"?l?"true":"":l.trim()}function E0(n,l,o){const i=Md(n);return o?i.delete(l):i.add(l),i.size?Array.from(i).join(" "):"none"}function Fx(n,l){return n.id==="font-bold"?lN(l):n.id==="font-italic"?l.trim().toLowerCase()==="italic":n.id==="font-underline"?Md(l).has("underline"):n.id==="font-strikethrough"?Md(l).has("line-through"):n.id==="locked"?l==="true":!!l}function sN(n,l){const o=n.options??[{label:"unset",value:""}];return!l||o.some(i=>i.value===l)?o:[{label:l,value:l},...o]}function cN(n,l){var o;return((o=n.find(i=>i.name===l))==null?void 0:o.value)??""}function uN({attributeValues:n,feature:l,inspectedStyles:o,nextValue:i,onAlignToSlide:c,onAttributeChange:f,onLayerOrder:d,onStyleChange:m}){if(l.target==="style"&&l.propertyName){const h=Ad({feature:l,inspectedStyles:o,attributeValues:n});if(l.id==="rotation"){const g=fN(o),x=Gn(g),p=Number.parseFloat(i);m(l.propertyName,Ta(x.translateX,x.translateY,Number.isFinite(p)?p:0)??"");return}if(l.id==="font-underline"){m(l.propertyName,E0(h,"underline",i===""));return}if(l.id==="font-strikethrough"){m(l.propertyName,E0(h,"line-through",i===""));return}m(l.propertyName,w0(l,i));return}if(l.target==="attribute"&&l.attributeName){f(l.attributeName,w0(l,i));return}l.id==="align-to-slide"&&c(i),l.id==="layer-order"&&d(i)}function fN(n){var l;return((l=n.find(o=>o.name==="transform"))==null?void 0:l.value)??""}const dN=[{value:"left",label:"Left",icon:jE},{value:"center",label:"Center",icon:NE},{value:"right",label:"Right",icon:zE}],mN=[{value:"left",icon:uv,label:"Align left"},{value:"hcenter",icon:sd,label:"Align horizontal center"},{value:"right",icon:sv,label:"Align right"},{value:"top",icon:fv,label:"Align top"},{value:"vcenter",icon:iv,label:"Align vertical center"},{value:"bottom",icon:cv,label:"Align bottom"}],hN=[{value:"front",icon:cd,label:"Bring to front"},{value:"forward",icon:Id,label:"Bring forward"},{value:"backward",icon:Zo,label:"Send backward"},{value:"back",icon:dv,label:"Send to back"}],pN=[{value:"horizontal",icon:ud,label:"Distribute horizontally"},{value:"vertical",icon:vv,label:"Distribute vertically"}],T0=[{id:"typography",label:"Typography",icon:Oy,subgroups:[{id:"font",label:"Font",icon:Oy,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:nN.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:bE,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:dN}]}]},{id:"appearance",label:"Appearance",icon:Ry,subgroups:[{id:"fill",label:"Fill",icon:Ry,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:I2,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:Ny,subgroups:[{id:"size",label:"Size",icon:Ny,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:pv,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:ME,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:yv,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:mN},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:hN},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:pN}]},{id:"grouping",label:"Group",icon:fd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:fd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:xv,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:_y,subgroups:[{id:"state",label:"State",icon:_y,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:fE,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:jf,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:jf,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:jf,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:sE,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],gN=200,Qx="motion-safe:duration-200 motion-safe:ease-out",Zx="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",yN="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";function Fo({className:n,type:l,...o}){return v.jsx("input",{type:l,"data-slot":"input",className:Ze("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 vN=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],bN=["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 xN({value:n,includeGradients:l=!0,onChange:o}){const i=b.useRef(null),c=b.useRef(null),f=b.useMemo(()=>SN(n),[n]),d=Jf(f),[m,h]=b.useState(d.replace("#","")),g=`hsl(${f.h}, 100%, 50%)`;b.useEffect(()=>{h(d.replace("#",""))},[d]);function x(S){var A;const T=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!T)return;S.currentTarget.setPointerCapture(S.pointerId);const C=Ls((S.clientX-T.left)/T.width,0,1),E=Ls(1-(S.clientY-T.top)/T.height,0,1);o(Jf({...f,s:C,v:E}))}function p(S){var E;const T=(E=c.current)==null?void 0:E.getBoundingClientRect();if(!T)return;S.currentTarget.setPointerCapture(S.pointerId);const C=Math.round(Ls((S.clientX-T.left)/T.width,0,1)*360);o(Jf({...f,h:C===360?0:C}))}return v.jsxs("div",{className:"grid gap-3",children:[v.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(f.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:g},onPointerDown:x,onPointerMove:S=>{S.buttons===1&&x(S)},children:v.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(${f.s*100}% + ${(.5-f.s)*22}px)`,top:`calc(${(1-f.v)*100}% + ${(f.v-.5)*22}px)`}})}),v.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":f.h,tabIndex:0,onPointerDown:p,onPointerMove:S=>{S.buttons===1&&p(S)},children:v.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:g,left:`${f.h/360*100}%`}})}),v.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[v.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"}),v.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),v.jsx(Fo,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:m,spellCheck:!1,onChange:S=>{const T=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);h(T),T.length===6&&o(`#${T}`)},onBlur:()=>{h(d.replace("#",""))}})]}),v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),v.jsx("div",{className:"grid grid-cols-12 gap-1",children:vN.map(S=>v.jsx("button",{className:Ze("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))})]}),l?v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),v.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:bN.map(S=>v.jsx("button",{className:Ze("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 Ls(n,l,o){return Math.min(Math.max(n,l),o)}function SN(n){const l={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return l;const i=o[1],c=Number.parseInt(i.slice(0,2),16)/255,f=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,m=Math.max(c,f,d),h=Math.min(c,f,d),g=m-h;let x=0;g!==0&&(m===c?x=(f-d)/g%6:m===f?x=(d-c)/g+2:x=(c-f)/g+4);const p=Math.round(x*60);return{h:p<0?p+360:p,s:m===0?0:g/m,v:m}}function Jf({h:n,s:l,v:o}){const i=o*l,c=i*(1-Math.abs(n/60%2-1)),f=o-i;let d=0,m=0,h=0;return n<60?(d=i,m=c):n<120?(d=c,m=i):n<180?(m=i,h=c):n<240?(m=c,h=i):n<300?(d=c,h=i):(d=i,h=c),`#${Wf(d+f)}${Wf(m+f)}${Wf(h+f)}`.toUpperCase()}function Wf(n){return Math.round(Ls(n,0,1)*255).toString(16).padStart(2,"0")}function wN({className:n,orientation:l="horizontal",decorative:o=!0,...i}){return v.jsx(RR,{"data-slot":"separator",decorative:o,orientation:l,className:Ze("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 EN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(In,{variant:l?"secondary":"ghost",size:"icon-sm",className:Ze("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function TN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(In,{variant:l?"secondary":"ghost",size:"icon-sm",className:Ze("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function CN({children:n,left:l,width:o="default"}){const i=b.useRef(null),[c,f]=b.useState({x:0,y:0});b.useLayoutEffect(()=>{const m=i.current;if(!m)return;const h=m.getBoundingClientRect(),g=m.closest('[data-testid="floating-toolbar-anchor"]'),x=g instanceof HTMLElement?g.getBoundingClientRect():null,p=x?x.left+l:h.left-c.x,S=x?x.bottom+8:h.top-c.y,T={bottom:S+h.height,left:p,right:p+h.width,top:S},C=16;let E=0,A=0;T.right>window.innerWidth-C&&(E=window.innerWidth-C-T.right),T.left+E<C&&(E+=C-(T.left+E)),T.bottom>window.innerHeight-C&&(A=window.innerHeight-C-T.bottom),T.top+A<C&&(A+=C-(T.top+A)),(_d(c.x,E)||_d(c.y,A))&&f({x:E,y:A})},[l,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 v.jsx("div",{className:Ze("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)]",Qx,Zx,d),ref:i,style:{left:l+c.x,top:`calc(100% + 8px + ${c.y}px)`},role:"menu",children:n})}function MN(n){return n.features.some(l=>l.controlType==="color")?"wide":n.features.some(l=>l.controlType==="action-group")?"medium":"default"}function _d(n,l){return Math.abs(n-l)>=.5}function AN(){return v.jsx(wN,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function _N({children:n}){return v.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 Hl({children:n,htmlFor:l}){return v.jsx("label",{htmlFor:l,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function Rd({icon:n}){return v.jsx(n,{className:"size-3.5"})}function RN({children:n,disabled:l=!1,onClick:o,title:i}){return v.jsx(In,{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:l,title:i,onClick:o,children:n})}function NN({...n}){return v.jsx(mR,{"data-slot":"select",...n})}function ON({...n}){return v.jsx(xR,{"data-slot":"select-group",...n})}function zN({...n}){return v.jsx(pR,{"data-slot":"select-value",...n})}function DN({className:n,size:l="default",children:o,...i}){return v.jsxs(hR,{"data-slot":"select-trigger","data-size":l,className:Ze("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,v.jsx(gR,{asChild:!0,children:v.jsx(Zo,{className:"size-4 opacity-50"})})]})}function jN({className:n,children:l,position:o="item-aligned",align:i="center",...c}){return v.jsx(yR,{children:v.jsxs(vR,{"data-slot":"select-content",className:Ze("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:[v.jsx(LN,{}),v.jsx(bR,{className:Ze("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:l}),v.jsx(HN,{})]})})}function kN({className:n,children:l,...o}){return v.jsxs(SR,{"data-slot":"select-item",className:Ze("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:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(ER,{children:v.jsx(mv,{className:"size-4"})})}),v.jsx(wR,{children:l})]})}function LN({className:n,...l}){return v.jsx(TR,{"data-slot":"select-scroll-up-button",className:Ze("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Id,{className:"size-4"})})}function HN({className:n,...l}){return v.jsx(CR,{"data-slot":"select-scroll-down-button",className:Ze("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Zo,{className:"size-4"})})}const Rs="__empty__";function BN({currentValue:n,feature:l,onClosePanel:o,onCommitFeature:i,operationAvailability:c,onStyleChange:f}){const d=`floating-${l.id}`;if(l.controlType==="select")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{htmlFor:d,children:l.label}),v.jsxs(NN,{value:n||Rs,onValueChange:m=>i(l,m===Rs?"":m),children:[v.jsx(DN,{id:d,"aria-label":l.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:v.jsx(zN,{})}),v.jsx(jN,{children:v.jsx(ON,{children:sN(l,n).map(m=>v.jsx(kN,{value:m.value||Rs,"data-value":m.value,style:l.id==="font-family"&&m.value?{fontFamily:m.value}:void 0,children:m.label},m.value||Rs))})})]})]},l.id);if(l.controlType==="color")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{children:l.label}),v.jsx(xN,{value:n,includeGradients:l.id==="background-color",onChange:m=>i(l,m)})]},l.id);if(l.controlType==="toggle"){const m=Fx(l,n);return v.jsx(In,{type:"button",variant:m?"secondary":"outline","aria-pressed":m,onClick:()=>i(l,m?"":"true"),children:l.label},l.id)}return l.controlType==="slider"||l.controlType==="number"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{htmlFor:d,children:l.label}),v.jsx(Fo,{id:d,type:"number",min:l.min,max:l.max,step:l.step,value:n,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},l.id):l.controlType==="action-group"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{children:l.label}),v.jsx("div",{className:"grid gap-1",children:(l.options??[]).map(m=>{const h=m.icon,g=l.target==="operation"&&c?c[l.id]===!1:!1;return v.jsxs(RN,{disabled:g,title:m.label,onClick:()=>{g||(i(l,m.value),o())},children:[h?v.jsx(Rd,{icon:h}):null,v.jsx("span",{children:m.label})]},m.value)})})]},l.id):l.controlType==="custom-css"?v.jsx(UN,{onCommit:f},l.id):v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{htmlFor:d,children:l.label}),v.jsx(Fo,{id:d,type:"text",value:n,placeholder:l.placeholder,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},l.id)}function UN({onCommit:n}){const l=b.useId(),o=b.useId(),[i,c]=b.useState(""),[f,d]=b.useState("");function m(){const h=i.trim();h&&(n(h,f.trim()),d(""))}return v.jsxs("div",{className:"grid gap-2",children:[v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{htmlFor:l,children:"Property name"}),v.jsx(Fo,{id:l,type:"text",value:i,placeholder:"e.g. justify-content",onChange:h=>c(h.target.value)})]}),v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Hl,{htmlFor:o,children:"Property value"}),v.jsx(Fo,{id:o,type:"text",value:f,placeholder:"e.g. space-between",onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),m())}})]}),v.jsx(In,{type:"button",variant:"outline",disabled:!i.trim(),onClick:m,children:"Apply property"})]})}function IN({inspectedStyles:n,selectedElementType:l,selectionCommandAvailability:o,attributeValues:i,onStyleChange:c,onAttributeChange:f,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:x}){const p=b.useRef(null),[S,T]=b.useState(null),[C,E]=b.useState(0),[A,R]=b.useState(0),z=b.useRef(0);b.useEffect(()=>{if(p.current)return()=>{const F=p.current,ee=F==null?void 0:F.closest('[data-testid="stage-panel"]');if(!(F instanceof HTMLElement)||!(ee instanceof HTMLElement))return;const fe=F.getBoundingClientRect(),W=ee.getBoundingClientRect(),P=F.cloneNode(!0);P instanceof HTMLElement&&(P.className=Ze(P.className,"absolute z-40 m-0 pointer-events-none"),P.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),P.className=Ze(P.className,yN),P.setAttribute("aria-hidden","true"),P.style.left=`${fe.left-W.left}px`,P.style.top=`${fe.top-W.top}px`,P.style.width=`${fe.width}px`,P.style.height=`${fe.height}px`,ee.appendChild(P),P.addEventListener("animationend",()=>{P.remove()}),window.setTimeout(()=>{P.remove()},gN+50))}},[]),b.useLayoutEffect(()=>{const O=p.current;if(!O)return;const F=O.getBoundingClientRect(),ee=F.left-z.current,fe=F.right-z.current,W=16;let P=0;ee<W&&(P=W-ee),fe+P>window.innerWidth-W&&(P+=window.innerWidth-W-(fe+P)),_d(z.current,P)&&(z.current=P,R(P))},[]),b.useEffect(()=>{function O(F){var ee;(ee=p.current)!=null&&ee.contains(F.target)||T(null)}return document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O)}},[]),b.useEffect(()=>{function O(F){F.key==="Escape"&&T(null)}return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O)}},[]);function N(O,F){E(F),T(ee=>ee===O?null:O)}function B(O,F){if(O.id==="distribute"){m(F);return}if(O.id==="group"){h();return}if(O.id==="ungroup"){x();return}uN({attributeValues:i,feature:O,inspectedStyles:n,nextValue:F,onAlignToSlide:d,onAttributeChange:f,onLayerOrder:g,onStyleChange:c})}const te=GN(l);return v.jsxs("div",{className:Ze("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",Qx,Zx),ref:p,style:{marginLeft:A},children:[v.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:te.map((O,F)=>v.jsxs("div",{className:"contents",children:[F>0?v.jsx(AN,{}):null,v.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:O.subgroups.map(ee=>{const fe=ee.features.length===1?ee.features[0]:null;return(fe==null?void 0:fe.controlType)==="toggle"?G(ee,fe):v.jsx(EN,{active:S===ee.id,label:ee.label,onClick:W=>N(ee.id,W.currentTarget.offsetLeft),children:v.jsx(Rd,{icon:ee.icon})},ee.id)})})]},O.id))}),te.flatMap(O=>O.subgroups).map(O=>S===O.id?v.jsxs(CN,{left:C,width:MN(O),children:[v.jsx(_N,{children:O.label}),v.jsx("div",{className:"grid gap-2",children:O.features.map(H)})]},O.id):null)]});function G(O,F){const ee=Ad({feature:F,inspectedStyles:n,attributeValues:i}),fe=Fx(F,ee);return v.jsx(TN,{label:F.label,active:fe,onClick:()=>B(F,fe?"":"true"),children:v.jsx(Rd,{icon:O.icon})},O.id)}function H(O){return BN({currentValue:Ad({feature:O,inspectedStyles:n,attributeValues:i}),feature:O,onClosePanel:()=>T(null),onCommitFeature:B,operationAvailability:o,onStyleChange:c})}}function GN(n){return n!=="group"?T0:T0.flatMap(l=>l.id!=="layout"?[]:[{...l,subgroups:l.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}const C0={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function YN({slideWidth:n,slideHeight:l,offsetX:o,offsetY:i,scale:c,preselectionOverlay:f,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:p,isEditingText:S,manipulationOverlay:T,attributeValues:C,iframeRef:E,stageViewportRef:A,selectionOverlayRef:R,isManipulating:z,onSelectionOverlayMouseDown:N,onSelectionOverlayMouseUp:B,onSelectionOverlayMouseMove:te,onStageMouseLeave:G,onResizeHandleMouseDown:H,onRotateHandleMouseDown:O,onSelectionOverlayDoubleClick:F,onBackgroundClick:ee,onStyleChange:fe,onAttributeChange:W,onAlignToSlide:P,onDistribute:K,onGroup:q,onLayerOrder:M,onUngroup:j,onDuplicate:Y,onDelete:V}){const U=(L,Z)=>{L===Z&&ee()},_=d?VN({selectionOverlay:d,offsetX:o,scale:c,slideWidth:n}):void 0;return v.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:A,onClick:L=>{U(L.target,L.currentTarget)},onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&U(L.target,L.currentTarget)},onMouseLeave:G,children:[d&&!z&&!S?v.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:_,"data-testid":"floating-toolbar-anchor",children:v.jsx(IN,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,attributeValues:C,onStyleChange:fe,onAttributeChange:W,onAlignToSlide:P,onDistribute:K,onGroup:q,onLayerOrder:M,onUngroup:j},m)}):null,S?v.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,v.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:`${l}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${c})`},children:v.jsx("iframe",{ref:E,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),f&&!S&&!z?v.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...C0,left:`${f.x}px`,top:`${f.y}px`,width:`${f.width}px`,height:`${f.height}px`}}):null,d&&!S?v.jsx(tN,{selectionCommandAvailability:x,onAlignToSlide:P,onDelete:V,onDistribute:K,onDuplicate:Y,onGroup:q,onLayerOrder:M,onUngroup:j,children:v.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Ze("absolute z-[3] border border-dashed",p?"pointer-events-none":"pointer-events-auto"),style:{...C0,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:N,onMouseMove:te,onMouseUp:B,onDoubleClick:L=>{F(L)}})}):null,T?v.jsx(eN,{selectionBounds:T.selectionBounds,snapGuides:T.snapGuides,resizeHandles:T.resizeHandles,rotationHandle:T.rotationHandle,onResizeHandleMouseDown:H,onRotateHandleMouseDown:O}):null]})}function VN({selectionOverlay:n,offsetX:l,scale:o,slideWidth:i}){const f=l,d=l+i*o,m=Math.max((d-f)/2,0),h=Math.min(288,m),g=f+h,x=d-h,p=n.x+n.width/2;return{left:`${Math.min(Math.max(p,g),Math.max(g,x))}px`,top:n.y<84?`${n.y+n.height+18}px`:`${n.y-18}px`,transform:n.y<84?"translate(-50%, 0)":"translate(-50%, -100%)"}}function qN({delayDuration:n=0,...l}){return v.jsx($R,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function Nd(n,l,o){return c2(n,l,o)}function qo(n,l,o){var f;if(typeof DOMParser>"u")return"";const c=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Ee}="${l}"]`);return((f=c==null?void 0:c.getAttribute(o))==null?void 0:f.trim())??""}function PN({elementId:n,nextValue:l,propertyName:o,slide:i}){const c=Nd(i,n,o),f=l.trim();return c===f?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:c,nextValue:f,timestamp:Date.now()}}function XN({attributeName:n,elementId:l,nextValue:o,slide:i}){const c=qo(i,l,n),f=o.trim();return c===f?null:{type:"attribute.update",slideId:i.id,elementId:l,attributeName:n,previousValue:c,nextValue:f,timestamp:Date.now()}}function ol(n){return Math.round(n*100)/100}function Jx(n,l){var m;if(typeof DOMParser>"u")return n;const c=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(c instanceof HTMLElement))return n;const f=Gn(c.style.transform),d=Ta(0,0,f.rotate);return c.style.position="absolute",c.style.left=`${ol(l.x)}px`,c.style.top=`${ol(l.y)}px`,c.style.width=`${ol(l.width)}px`,c.style.height=`${ol(l.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 Wx(n,l){return{x:n.left-l.left,y:n.top-l.top,width:n.width,height:n.height}}function $N(n,l,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,c=i==null?void 0:i.querySelector(l.rootSelector),f=c==null?void 0:c.getBoundingClientRect();return{width:(f==null?void 0:f.width)||o.width,height:(f==null?void 0:f.height)||o.height}}function Od(n,l,o){return{x:ol(n.x+l),y:ol(n.y+o),width:n.width,height:n.height}}function KN(n){return n.length?n.reduce((l,o)=>{const i=Math.min(l.x,o.x),c=Math.min(l.y,o.y),f=Math.max(l.x+l.width,o.x+o.width),d=Math.max(l.y+l.height,o.y+o.height);return{x:i,y:c,width:f-i,height:d-c}}):null}function FN(n,l,o){const i=Math.max(0,o.width-n.width),c=Math.max(0,o.height-n.height),f=Math.min(i,Math.max(0,n.x+l)),d=Math.min(c,Math.max(0,n.y+l));return{x:ol(f-n.x),y:ol(d-n.y)}}function e1(n,l){const o=[];return l.vertical&&o.push(...M0(n,l.vertical,"vertical")),l.horizontal&&o.push(...M0(n,l.horizontal,"horizontal")),o}function M0(n,l,o){return l.target.kind==="spacing"?ZN(n,l,o):[QN(n,l,o)]}function QN(n,l,o){const i=l.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 m=A0(n,l.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 h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:m,y:h-As},end:{x:m,y:g+As},variant:"alignment"}}const c=A0(n,l.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 f=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:f-As,y:c},end:{x:d+As,y:c},variant:"alignment"}}function ZN(n,l,o){const i=l.target.relatedRects;if(i.length<2)return[];const[c,f]=i;if(!c||!f)return[];if(o==="vertical"){const T=c.x<=f.x?c:f,C=T===c?f:c,E=T.x+T.width,A=C.x,R=l.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:E,y:T.y+T.height/2},end:{x:A,y:C.y+C.height/2},variant:"spacing"},N={orientation:"horizontal",start:l.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:T.x,y:T.y+T.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[z,N]}const d=c.y<=f.y?c:f,m=d===c?f:c,h=d.y+d.height,g=m.y,x=l.anchor==="start"?n.y:n.y+n.height,p={orientation:"vertical",start:{x:d.x+d.width/2,y:h},end:{x:m.x+m.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:l.anchor==="start"?{x:m.x+m.width/2,y:m.y+m.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[p,S]}function A0(n,l,o){return o==="vertical"?l==="start"?n.x:l==="end"?n.x+n.width:n.x+n.width/2:l==="start"?n.y:l==="end"?n.y+n.height:n.y+n.height/2}function JN({activeSlide:n,doc:l,rootRect:o,selectedElementId:i,slideStageRect:c,stageGeometry:f}){var S;const d=(T,C)=>({position:T,rect:c,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(c.x,"start"),d(c.x+c.width/2,"center"),d(c.x+c.width,"end")],h=[d(c.y,"start"),d(c.y+c.height/2,"center"),d(c.y+c.height,"end")],g=l.querySelector(`[data-editor-id="${i}"]`),x=[];for(const T of n.elements){if(T.id===i)continue;const C=l.querySelector(`[data-editor-id="${T.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const E=(S=l.defaultView)==null?void 0:S.getComputedStyle(C);if((E==null?void 0:E.display)==="none"||(E==null?void 0:E.visibility)==="hidden")continue;const A=C.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const R=Lr(A,o,f);(T.type==="block"||T.type==="image")&&x.push({elementId:T.id,rect:R});const z=R.x,N=R.x+R.width/2,B=R.x+R.width,te=R.y,G=R.y+R.height/2,H=R.y+R.height,O=(F,ee)=>({position:F,rect:R,kind:"element",role:ee,anchor:null,priority:ee==="center"?3:4,elementId:T.id,relatedRects:[]});m.push(O(z,"start"),O(N,"center"),O(B,"end")),h.push(O(te,"start"),O(G,"center"),O(H,"end"))}const p=WN(x);return m.push(...p.vertical),h.push(...p.horizontal),{vertical:m,horizontal:h}}function WN(n){const l=[],o=[],i=n.slice().sort((f,d)=>f.rect.x-d.rect.x).filter(f=>f.rect.width>0&&f.rect.height>0),c=n.slice().sort((f,d)=>f.rect.y-d.rect.y).filter(f=>f.rect.width>0&&f.rect.height>0);for(let f=0;f<i.length-1;f+=1){const d=i[f],m=i[f+1];if(!d||!m)continue;if(!kr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,0)){const g=m.rect.x-(d.rect.x+d.rect.width);g>=y0&&g<=v0&&kr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,Js)&&l.push(Ns({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ns({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let f=0;f<c.length-1;f+=1){const d=c[f],m=c[f+1];if(!d||!m)continue;if(!kr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,0)){const g=m.rect.y-(d.rect.y+d.rect.height);g>=y0&&g<=v0&&kr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,Js)&&o.push(Ns({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Ns({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:l,horizontal:o}}function Ns({position:n,rect:l,anchor:o,relatedRects:i}){return{position:n,rect:l,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function e5(n,l){const o=Ws([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],l.vertical,n,"vertical"),i=Ws([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],l.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:e1(c,{vertical:o,horizontal:i})}}function t5(n,l,o){const i={...n},c=l==="top-left"||l==="bottom-left"?"start":"end",f=l==="top-left"||l==="top-right"?"start":"end",d=Ws([{anchor:c,position:c==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),m=Ws([{anchor:f,position:f==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(c==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(f==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:e1(i,{vertical:m,horizontal:d})}}function Ws(n,l,o,i){const c=i5(l);let f=null;for(const d of n)for(const m of c){if(!r5(o,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>JR)continue;const x=_0({anchor:d.anchor,delta:h,target:m},o,i),p=f?_0(f,o,i):Number.POSITIVE_INFINITY;x>=p||(f={anchor:d.anchor,delta:h,target:m})}return f}function _0(n,l,o){const i=Math.abs(n.delta),c=n.target.kind==="spacing"?Math.max(0,i-WR):i,f=n5(n.target);return c*1e3+f+n.target.priority+a5(n.anchor,n.target)+l5(l,n.target,o)/100}function n5(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function a5(n,l){return l.kind==="slide"&&l.role==="center"&&n!=="center"?25:0}function l5(n,l,o){return l.kind==="slide"?0:o==="vertical"?R0(n.y,n.y+n.height,l.rect.y,l.rect.y+l.rect.height):R0(n.x,n.x+n.width,l.rect.x,l.rect.x+l.rect.width)}function R0(n,l,o,i){return l<o?o-l:i<n?n-i:0}function r5(n,l,o){return l.kind==="slide"?!0:l.kind==="spacing"?o5(n,l,o):!0}function o5(n,l,o){if(l.relatedRects.length<2)return!1;if(o==="vertical"){const f=Math.min(...l.relatedRects.map(m=>m.y)),d=Math.max(...l.relatedRects.map(m=>m.y+m.height));return kr(n.y,n.y+n.height,f,d,Js)}const i=Math.min(...l.relatedRects.map(f=>f.x)),c=Math.max(...l.relatedRects.map(f=>f.x+f.width));return kr(n.x,n.x+n.width,i,c,Js)}function i5(n){const l=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return l.has(i)?!1:(l.add(i),!0)})}function Os(n){return`${Math.round(n*100)/100}px`}function al(n,l){return Math.max(n,48*l)}function zd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function s5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function c5(n){const[l,...o]=n;return l?o.reduce((i,c)=>{const f=Math.min(i.x,c.x),d=Math.min(i.y,c.y),m=Math.max(i.x+i.width,c.x+c.width),h=Math.max(i.y+i.height,c.y+c.height);return{x:f,y:d,width:m-f,height:h-d}},l):{x:0,y:0,width:0,height:0}}function N0(n,l,o,i){return Math.atan2(l-i,n-o)*180/Math.PI}function u5({resizeCorner:n,scale:l,stageDeltaX:o,stageDeltaY:i,startStageRect:c}){let f=c.x,d=c.y,m=c.width,h=c.height;switch(n){case"top-left":{m=al(c.width-o,l),h=al(c.height-i,l),f=c.x+(c.width-m),d=c.y+(c.height-h);break}case"top-right":{m=al(c.width+o,l),h=al(c.height-i,l),d=c.y+(c.height-h);break}case"bottom-left":{m=al(c.width-o,l),h=al(c.height+i,l),f=c.x+(c.width-m);break}default:{m=al(c.width+o,l),h=al(c.height+i,l);break}}return{x:f,y:d,width:m,height:h}}function Hs(n,l){for(const o of Ud)n.style[o]=l[o]??""}function f5(n){return n.elementIds.map(l=>{const o=n.targetNodes[l],i=n.previousStyles[l];if(!o||!i)return null;const c=Po(o);return JSON.stringify(c)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:l,previousStyle:i,nextStyle:c,timestamp:Date.now()}}).filter(l=>!!l)}function d5(n,l){return l.length===1?l[0]:{type:"operation.batch",slideId:n.slideId,operations:l,timestamp:Date.now()}}function m5({isEditingText:n,isManipulating:l,selectedElement:o,selectedElementId:i,snapGuides:c,stageRect:f}){return!f||!i||!s5(o)||n?null:{selectionBounds:f,snapGuides:l?c:[],resizeHandles:[{corner:"top-left",x:f.x,y:f.y},{corner:"top-right",x:f.x+f.width,y:f.y},{corner:"bottom-right",x:f.x+f.width,y:f.y+f.height},{corner:"bottom-left",x:f.x,y:f.y+f.height}],rotationHandle:{x:f.x+f.width/2,y:f.y+f.height+20}}}function h5({activeSlide:n,selectedElement:l,selectedElementId:o,selectedElementIds:i,selectedStageRect:c,iframeRef:f,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:x,scale:p,slideHeight:S,slideWidth:T}=d,C=b.useRef(null),E=b.useRef(null),[A,R]=b.useState(!1),[z,N]=b.useState(!1),[B,te]=b.useState(null),[G,H]=b.useState([]),F=m5({isEditingText:m,isManipulating:A,selectedElement:l,selectedElementId:o,snapGuides:G,stageRect:B??c});b.useEffect(()=>()=>{C.current=null,E.current&&window.clearTimeout(E.current)},[]),b.useEffect(()=>{(!n||!o||!zd(l)||m)&&(C.current=null,R(!1),te(null))},[n,m,l,o]),b.useEffect(()=>{A||(te(null),H([]))},[A]);const ee=b.useCallback(()=>{N(!0),E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{N(!1),E.current=null},0)},[]),fe=b.useCallback((W,P,K=null)=>{var Ot;if(!n||!o||!c||!zd(l)||m)return;const q=(Ot=f.current)==null?void 0:Ot.contentDocument;if(!q)return;const M=q.querySelector(n.rootSelector),j=Ke(q,o);if(!M||!j)return;const Y=p5({activeSlide:n,doc:q,mode:W,selectedElementId:o,selectedElementIds:i}),V=Object.fromEntries(Y.map(De=>[De,Ke(q,De)]).filter(De=>!!De[1]));if(!Object.keys(V).length)return;const U=Object.fromEntries(Object.entries(V).map(([De,ye])=>[De,Po(ye)])),_=Object.fromEntries(Object.entries(V).map(([De,ye])=>[De,g5(ye,V)])),L=f.current,Z=(L==null?void 0:L.style.pointerEvents)||"";P.preventDefault(),P.stopPropagation();const ie=j.getBoundingClientRect(),ne=M.getBoundingClientRect(),me={x:g,y:x,width:T*p,height:S*p},ce={scale:p,offsetX:g,offsetY:x},Q=JN({activeSlide:n,doc:q,rootRect:ne,selectedElementId:o,slideStageRect:me,stageGeometry:ce}),re=Object.values(V).map(De=>Lr(De.getBoundingClientRect(),ne,ce)),be=Object.fromEntries(Object.entries(V).map(([De,ye])=>[De,Lr(ye.getBoundingClientRect(),ne,ce)])),Me=Object.fromEntries(Object.values(V).map(De=>De.parentElement).filter(De=>!!De).map(De=>[t1(De),Lr(De.getBoundingClientRect(),ne,ce)])),Ae=re.length?c5(re):c;C.current={slideId:n.id,elementId:o,elementIds:Object.keys(V),mode:W,resizeCorner:K,startPointer:{x:P.clientX,y:P.clientY},startStageRect:Ae,centerPoint:{x:ie.left+ie.width/2,y:ie.top+ie.height/2},previousStyle:U[o],previousStyles:U,startElementStageRects:be,resizeParentElementIds:_,startParentStageRects:Me,targetNodes:V,snapTargets:Q},R(!0),H([]),L&&(L.style.pointerEvents="none");const $e=De=>{const ye=C.current;if(!ye)return;De.preventDefault();const rn=De.clientX-ye.startPointer.x,on=De.clientY-ye.startPointer.y;if(ye.mode==="move"){const bn={x:ye.startStageRect.x+rn,y:ye.startStageRect.y+on,width:ye.startStageRect.width,height:ye.startStageRect.height},zt=De.altKey?{rect:bn,guides:[]}:e5(bn,ye.snapTargets);te(zt.rect),H(zt.guides);const _a=(zt.rect.x-ye.startStageRect.x)/p,Ft=(zt.rect.y-ye.startStageRect.y)/p;for(const qn of ye.elementIds){const Qt=ye.targetNodes[qn],jn=ye.previousStyles[qn];if(!Qt||!jn)continue;const Vt=Gn(jn.transform);Hs(Qt,{...jn,transform:Ta(Vt.translateX+_a,Vt.translateY+Ft,Vt.rotate),transformOrigin:jn.transformOrigin||"center center"})}return}if(ye.mode==="resize"){const bn=u5({resizeCorner:ye.resizeCorner,scale:p,stageDeltaX:rn,stageDeltaY:on,startStageRect:ye.startStageRect}),zt=De.altKey||!ye.resizeCorner?{rect:bn,guides:[]}:t5(bn,ye.resizeCorner,ye.snapTargets);te(zt.rect),H(zt.guides),y5(ye,zt.rect,{offsetX:g,offsetY:x,scale:p});return}const et=Gn(ye.previousStyle.transform),Lt=N0(ye.startPointer.x,ye.startPointer.y,ye.centerPoint.x,ye.centerPoint.y),_t=N0(De.clientX,De.clientY,ye.centerPoint.x,ye.centerPoint.y);Hs(j,{...ye.previousStyle,transform:Ta(et.translateX,et.translateY,et.rotate+(_t-Lt)),transformOrigin:"center center"}),H([])},Ge=()=>{window.removeEventListener("mousemove",$e),window.removeEventListener("mouseup",Yt),window.removeEventListener("keydown",wt),L&&(L.style.pointerEvents=Z)},Yt=()=>{const De=C.current;if(Ge(),R(!1),ee(),C.current=null,H([]),!De)return;const ye=f5(De);if(!ye.length){te(null);return}h(d5(De,ye))},wt=De=>{if(De.key!=="Escape")return;const ye=C.current;if(Ge(),R(!1),ee(),C.current=null,H([]),!!ye){for(const rn of ye.elementIds){const on=ye.targetNodes[rn],et=ye.previousStyles[rn];on&&et&&Hs(on,et)}te(null)}};window.addEventListener("mousemove",$e),window.addEventListener("mouseup",Yt),window.addEventListener("keydown",wt)},[n,f,m,h,l,o,i,c,p,g,x,T,S,ee]);return{manipulationOverlay:F,isManipulating:A,suppressBackgroundClear:z,beginMove:W=>{fe("move",W)},beginResize:(W,P)=>{fe("resize",P,W)},beginRotate:W=>{fe("rotate",W)}}}function p5({activeSlide:n,doc:l,mode:o,selectedElementId:i,selectedElementIds:c}){const f=c.filter(m=>{const h=n.elements.find(g=>g.id===m);return zd(h)});if(o==="move")return f;if(o==="rotate")return[i];const d=new Set;for(const m of f.length?f:[i]){const h=Ke(l,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${Ee}]`)){const x=g.getAttribute(Ee);x&&d.add(x)}}return[...d]}function g5(n,l){const o=Object.entries(l);let i=n.parentElement;for(;i;){const c=o.find(([,f])=>f===i);if(c)return c[0];i=i.parentElement}return null}function y5(n,l,o){const i=n.startStageRect.width>0?l.width/n.startStageRect.width:1,c=n.startStageRect.height>0?l.height/n.startStageRect.height:1,f={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:l.x+(h.x-n.startStageRect.x)*i,y:l.y+(h.y-n.startStageRect.y)*c,width:h.width*i,height:h.height*c}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],x=d[m];if(!h||!g||!x)continue;const p=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[t1(h.parentElement)]??f;if(!p)continue;const S=Gn(g.transform);Hs(h,{...g,position:g.position||"absolute",left:Os((x.x-p.x)/o.scale),top:Os((x.y-p.y)/o.scale),width:Os(x.width/o.scale),height:Os(x.height/o.scale),transform:Ta(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function t1(n){return n!=null&&n.getAttribute(Ee)?`editable:${n.getAttribute(Ee)}`:"slide"}const O0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function v5(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function b5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function x5(n){return n.altKey?1:n.shiftKey?10:5}function S5(n,l,o){var d;const i={[l]:o};if(typeof DOMParser>"u")return i;const f=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(f instanceof HTMLElement))return i;for(const m of f.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${o}-${h}`)}return i}function zs(n,l,o){return l.length?(o(l.length===1?l[0]:{type:"operation.batch",slideId:n,operations:l,timestamp:Date.now()}),!0):!1}function w5({activeSlide:n,selectedElementIds:l,iframeRef:o,slideWidth:i,slideHeight:c,isEditingText:f,canUndo:d,canRedo:m,onEscapeSelection:h,onCommitOperation:g,onSelectElementIds:x,onUndo:p,onRedo:S}){const T=b.useRef(null),C=b.useRef(n),E=b.useRef(l),A=b.useRef(d),R=b.useRef(m),z=b.useRef(f),N=b.useRef(h);C.current=n,E.current=l,A.current=d,R.current=m,z.current=f,N.current=h,b.useEffect(()=>{var W,P;const B=()=>{var _;const K=C.current,q=E.current;if(!K||!q.length)return!1;const M=(_=o.current)==null?void 0:_.contentDocument,j=M==null?void 0:M.querySelector(K.rootSelector),Y=j==null?void 0:j.getBoundingClientRect();if(!Y)return!1;const V=q.map(L=>{const Z=Gs(K.htmlSource,L),ie=Is(K.htmlSource,L),ne=M?Ke(M,L):null;return!Z||!ie||!ne?null:{sourceElementId:L,html:Z,rect:Wx(ne.getBoundingClientRect(),Y),...ie}}).filter(L=>!!L);if(!V.length)return!1;const U=KN(V.map(L=>L.rect));return U?(T.current={elements:V,unionRect:U},!0):!1},te=()=>{const K=C.current,q=E.current;if(!K||!q.length)return!1;const M=q.map(j=>{const Y=Gs(K.htmlSource,j),V=Is(K.htmlSource,j);return!Y||!V?null:{type:"element.remove",slideId:K.id,elementId:j,...V,html:Y,timestamp:Date.now()}}).filter(j=>!!j);return M.length?(zs(K.id,M,g),x([]),!0):!1},G=(K=T.current)=>{const q=C.current;if(!q||!K)return!1;let M=q.htmlSource;const j=[],Y=$N(o,q,{width:i,height:c}),V=FN(K.unionRect,24,{width:Y.width,height:Y.height}),U=[],_=K.elements.map(L=>{const Z=id(M,`${L.sourceElementId}-copy`),ie=nv(L.html,S5(L.html,L.sourceElementId,Z)),ne=Od(L.rect,V.x,V.y),me=Jx(ie,ne);return M=`${M}
376
+ <!-- ${Z} reserved -->`,j.push(Z),U.push({...L,rect:ne}),{type:"element.insert",slideId:q.id,elementId:Z,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:me,timestamp:Date.now()}});return zs(q.id,_,g),x(j),T.current={elements:U,unionRect:Od(K.unionRect,V.x,V.y)},!0},H=K=>{var _;const q=O0[K.key],M=C.current,j=E.current;if(!M||!j.length||!q)return!1;const Y=(_=o.current)==null?void 0:_.contentDocument,V=x5(K),U=j.map(L=>{const Z=M.elements.find(Q=>Q.id===L);if(!b5(Z))return null;const ie=Y?Ke(Y,L):null;if(!ie)return null;const ne=Po(ie),me=Gn(ne.transform),ce=ld({...ne,transform:Ta(me.translateX+q.x*V,me.translateY+q.y*V,me.rotate),transformOrigin:ne.transformOrigin||"center center"});return{type:"element.layout.update",slideId:M.id,elementId:L,previousStyle:ne,nextStyle:ce,timestamp:Date.now()}}).filter(L=>!!L);return zs(M.id,U,g),!0},O=K=>{var V;const q=C.current,M=E.current;if(!q||!M.length)return!1;const j=(V=o.current)==null?void 0:V.contentDocument,Y=M.map(U=>{const _=j?Ke(j,U):null;if(!_)return null;const L=Po(_),Z=Number.parseInt(L.zIndex||"",10),ie=Number.isFinite(Z)?Z:0,ne=K==="front"?999:K==="back"?0:Math.max(0,ie+(K==="forward"?1:-1)),me=ld({...L,zIndex:String(ne)});return me.zIndex===L.zIndex?null:{type:"element.layout.update",slideId:q.id,elementId:U,previousStyle:L,nextStyle:me,timestamp:Date.now()}}).filter(U=>!!U);return zs(q.id,Y,g)},F=K=>{if(K.defaultPrevented||z.current)return;const q=K.key.toLowerCase(),M=K.metaKey||K.ctrlKey,j=M&&!K.shiftKey&&q==="z",Y=M&&(K.shiftKey&&q==="z"||q==="y"),V=v5(K.target);let U=!1;if(j&&A.current)p(),U=!0;else if(Y&&R.current)S(),U=!0;else{if(V)return;M&&!K.shiftKey&&q==="c"?U=B():M&&!K.shiftKey&&q==="x"?U=B()&&te():M&&!K.shiftKey&&q==="v"?U=G():M&&!K.shiftKey&&q==="d"?U=B()&&G():K.key==="Backspace"||K.key==="Delete"?U=te():K.key==="Escape"?U=N.current():K.key in O0?U=H(K):M&&K.key==="]"?U=O(K.shiftKey?"front":"forward"):M&&K.key==="["&&(U=O(K.shiftKey?"back":"backward"))}U&&(K.preventDefault(),K.stopPropagation())},ee=(W=o.current)==null?void 0:W.contentDocument,fe=(P=o.current)==null?void 0:P.contentWindow;return window.addEventListener("keydown",F),fe==null||fe.addEventListener("keydown",F),ee==null||ee.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F),fe==null||fe.removeEventListener("keydown",F),ee==null||ee.removeEventListener("keydown",F)}},[o,g,S,x,p,c,i])}const z0="hse-editing-text-style",E5=`
377
+ [data-hse-editing="true"] {
378
+ outline: none !important;
379
+ box-shadow: none !important;
380
+ overflow: visible;
381
+ caret-color: currentColor;
382
+ white-space: pre-wrap;
383
+ user-select: text;
384
+ -webkit-user-select: text;
385
+ }
386
+
387
+ [data-hse-editing="true"]:focus,
388
+ [data-hse-editing="true"]:focus-visible {
389
+ outline: none !important;
390
+ box-shadow: none !important;
391
+ }
392
+
393
+ body[data-hse-group-scope] [data-editable] {
394
+ transition: opacity 120ms ease, filter 120ms ease;
395
+ }
396
+
397
+ body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
398
+ opacity: 0.28;
399
+ filter: blur(1.5px);
400
+ }
401
+
402
+ body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
403
+ outline: 1px solid rgba(15, 23, 42, 0.22);
404
+ outline-offset: 4px;
405
+ }
406
+ `;function T5(n){return n.closest(`[data-editable][${Ee}]`)}function D0(n,l,o,i){const c=n.elementFromPoint(l,o);return c?Dd(c,i):null}function j0(n,l){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(!l){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",l);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Ee}="${l}"]`);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 Dd(n,l){const o=T5(n);return o?l?o.closest(`[data-editable="block"][data-group="true"][${Ee}="${l}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Ee}]`)??o:null}function C5(n){if(n.getElementById(z0))return;const l=n.createElement("style");l.id=z0,l.textContent=E5,n.head.appendChild(l)}function M5(n){const l=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),l==null||l.removeAllRanges(),l==null||l.addRange(o)}function A5({activeSlide:n,iframeRef:l,onCommitOperation:o}){const[i,c]=b.useState([]),[f,d]=b.useState(null),[m,h]=b.useState(null),[g,x]=b.useState(null),p=b.useRef(null),S=b.useRef(null),T=b.useRef(()=>{}),C=b.useRef(()=>{}),E=i[i.length-1]??null,A=b.useCallback(()=>{d(W=>W===null?W:null)},[]);function R(W){c(P=>{const K=typeof W=="function"?W(P[P.length-1]??null):W;return K?[K]:[]})}const z=b.useCallback(W=>{c(P=>P.includes(W)?P.filter(K=>K!==W):[...P,W])},[]),N=b.useCallback((W,P)=>{const K=l.current,q=K==null?void 0:K.contentDocument;if(!K||!q||p.current)return null;const M=K.getBoundingClientRect(),j=M.width>0?K.clientWidth/M.width:1,Y=M.height>0?K.clientHeight/M.height:1,V=D0(q,(W-M.left)*j,(P-M.top)*Y,S.current);return(V==null?void 0:V.getAttribute(Ee))??null},[l]),B=b.useCallback((W,P)=>{const K=N(W,P);return d(q=>q===K?q:K),K},[N]),te=b.useCallback((W,P,K)=>{const q=N(W,P);return q?(K?z(q):c([q]),q):null},[N,z]),G=b.useCallback(W=>{var M;if(!n)return;const P=(M=l.current)==null?void 0:M.contentDocument,K=P?Ke(P,W):null;if(!K||K.getAttribute("data-editable")!=="text")return;const q={slideId:n.id,elementId:W,initialText:K.textContent||""};c([W]),p.current=q,x(q)},[n,l]),H=b.useCallback(W=>{h(W),S.current=W,c([W])},[]),O=b.useCallback(()=>{const W=S.current;S.current=null,h(null),c(W?[W]:[])},[]),F=b.useCallback(()=>p.current?!1:S.current?(O(),!0):i.length?(c([]),!0):!1,[O,i.length]);function ee(W,P){const K=g;if(!n||!K||K.slideId!==n.id||K.elementId!==W){p.current=null,x(null);return}const q=K.initialText;p.current=null,x(null),P!==q&&o({type:"text.update",slideId:n.id,elementId:W,previousText:q,nextText:P,timestamp:Date.now()})}function fe(){var K;const W=(K=l.current)==null?void 0:K.contentDocument,P=p.current;if(P&&W){const q=Ke(W,P.elementId);q&&(q.textContent=P.initialText)}p.current=null,x(null)}return b.useEffect(()=>{p.current=g},[g]),b.useEffect(()=>{S.current=m},[m]),b.useEffect(()=>{!n||!g||g.slideId===n.id||x(null)},[n,g]),T.current=ee,C.current=fe,b.useEffect(()=>{if(!n)return;const W=l.current;if(!W)return;const P=W.contentDocument;if(!P)return;P.open(),P.write(n.htmlSource),P.close(),C5(P),j0(P,S.current);const K=M=>{const j=M.getAttribute(Ee);j&&T.current(j,M.textContent||"")};P.onclick=M=>{const j=M.target;if(!(j instanceof Element)){if(p.current){const _=Ke(P,p.current.elementId);if(_){K(_);return}}c([]);return}const Y=p.current;if(Y){A();const _=Ke(P,Y.elementId);if(_&&!_.contains(j)){K(_);return}return}const V=Dd(j,S.current);if(!V){S.current||c([]);return}const U=V.getAttribute(Ee);U&&(M.shiftKey||M.metaKey||M.ctrlKey?z(U):c([U]))},P.onmousemove=M=>{if(p.current){A();return}const j=D0(P,M.clientX,M.clientY,S.current),Y=(j==null?void 0:j.getAttribute(Ee))??null;d(V=>V===Y?V:Y)},P.onmouseleave=()=>{A()};const q=Array.from(P.querySelectorAll(`[data-editable][${Ee}]`));for(const M of q)M.style.cursor="default",M.ondblclick=null,M.onblur=null,M.onkeydown=null,M.onclick=j=>{var U;j.stopPropagation();const Y=Dd(j.target,S.current);if(S.current&&!Y)return;const V=(Y==null?void 0:Y.getAttribute(Ee))??M.getAttribute(Ee);((U=p.current)==null?void 0:U.elementId)!==V&&V&&(j.shiftKey||j.metaKey||j.ctrlKey?z(V):c([V]))},M.ondblclick=j=>{const Y=M.getAttribute(Ee),V=p.current;if(Y&&M.getAttribute("data-group")==="true"){j.preventDefault(),j.stopPropagation(),H(Y);return}if(M.getAttribute("data-editable")==="text"){if(Y&&V&&V.slideId===n.id&&V.elementId===Y){j.stopPropagation();return}j.preventDefault(),j.stopPropagation(),Y&&G(Y)}}},[n,H,G,A,l,z]),b.useEffect(()=>{var P;const W=(P=l.current)==null?void 0:P.contentDocument;W&&j0(W,m)},[m,l]),b.useEffect(()=>{var ie;const W=g;if(!W||!n||W.slideId!==n.id)return;const P=l.current,K=P==null?void 0:P.contentDocument;if(!P||!K)return;const q=K.querySelector(Hd(W.elementId));if(!q)return;const M=()=>{T.current(W.elementId,q.textContent||"")};let j=!1;const Y=q.style.display,V=q.style.alignItems,U=q.style.overflow,_=q.style.cursor,L=(ie=q.ownerDocument.defaultView)==null?void 0:ie.getComputedStyle(q),Z=(L==null?void 0:L.display)??"";return q.setAttribute("contenteditable","plaintext-only"),q.setAttribute("spellcheck","false"),q.setAttribute("data-hse-editing","true"),q.style.cursor="text",q.style.overflow="visible",Z==="inline-flex"?(q.style.display="inline-block",q.style.alignItems="normal"):(Z==="flex"||Z==="grid"||Z==="inline-grid")&&(q.style.display="block",q.style.alignItems="normal"),q.focus(),M5(q),q.onkeydown=ne=>{if(ne.key==="Enter"&&!ne.shiftKey){ne.preventDefault(),M();return}ne.key==="Escape"&&(ne.preventDefault(),C.current())},q.onmousedown=()=>{j=!1},q.onmouseup=()=>{const ne=q.ownerDocument.getSelection(),me=ne==null?void 0:ne.anchorNode,ce=ne==null?void 0:ne.focusNode,Q=me?q.contains(me):!1,re=ce?q.contains(ce):!1;j=!!(ne&&!ne.isCollapsed&&Q&&re)},q.onclick=ne=>{ne.stopPropagation(),j&&(ne.preventDefault(),j=!1)},q.onblur=()=>{window.setTimeout(()=>{var be;if(((be=p.current)==null?void 0:be.elementId)!==W.elementId)return;const ne=q.ownerDocument.getSelection(),me=ne==null?void 0:ne.anchorNode,ce=ne==null?void 0:ne.focusNode,Q=q.ownerDocument.activeElement,re=!!(ne&&!ne.isCollapsed)&&!!(me&&q.contains(me))&&!!(ce&&q.contains(ce));Q===q||re||M()},0)},()=>{q.removeAttribute("contenteditable"),q.removeAttribute("spellcheck"),q.removeAttribute("data-hse-editing"),q.style.cursor=_,q.style.display=Y,q.style.alignItems=V,q.style.overflow=U,q.onblur=null,q.onclick=null,q.onkeydown=null,q.onmousedown=null,q.onmouseup=null}},[n,l,g]),{selectedElementId:E,selectedElementIds:i,preselectedElementId:f,activeGroupScopeId:m,isEditingText:!!(n&&(g==null?void 0:g.slideId)===n.id),setSelectedElementId:R,setSelectedElementIds:c,beginTextEditing:G,beginGroupEditingScope:H,exitGroupEditingScope:O,clearSelection:F,clearPreselection:A,updatePointerPreselection:B,retargetPointerSelection:te}}function _5(n,l={}){var x;const{onSlidesChange:o}=l,[i,c]=b.useReducer(ys,n,rv),[f,d]=b.useState(((x=n[0])==null?void 0:x.id)??"");b.useEffect(()=>{var p;c({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const m=b.useMemo(()=>i.slides.find(p=>p.id===f)??i.slides[0],[f,i.slides]),h=(m==null?void 0:m.id)??"";function g(p){var S;return p.some(T=>T.id===f)||d(((S=p[0])==null?void 0:S.id)??""),o==null||o(p),p}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const S=ys(i,{type:"history.commit",operation:p});return c({type:"history.commit",operation:p}),g(S.slides)},runUndo:()=>{const p=ys(i,{type:"history.undo"});c({type:"history.undo"}),g(p.slides)},runRedo:()=>{const p=ys(i,{type:"history.redo"});c({type:"history.redo"}),g(p.slides)}}}const R5=["-webkit-","-moz-","-ms-"],N5=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 O5(n){return R5.some(l=>n.startsWith(l))?!1:!N5.has(n)}function z5(n){const l=window.getComputedStyle(n),o=[];for(const i of Array.from(l)){if(!O5(i))continue;const c=i==="transform"&&n.style.transform?n.style.transform.trim():l.getPropertyValue(i).trim();c.length!==0&&o.push({name:i,value:c})}return o.sort((i,c)=>i.name.localeCompare(c.name))}function D5({iframeRef:n,activeSlide:l,selectedElement:o,selectedElementIds:i,preselectedElementId:c,scale:f,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const x=i.join("\0"),p=c??"",[S,T]=b.useState({key:"",rect:null}),[C,E]=b.useState({key:"",rect:null}),[A,R]=b.useState({key:"",rect:null}),[z,N]=b.useState([]),B=S.key===x?S.rect:null,te=C.key===p?C.rect:null,G=A.key===x?A.rect:null;return b.useEffect(()=>{const H=n.current,O=H==null?void 0:H.contentDocument;if(!H||!O||!l){T({key:x,rect:null}),E({key:p,rect:null}),R({key:x,rect:null}),N([]);return}const F=O.querySelector(l.rootSelector),ee=i[0]?Ke(O,i[0]):F;if(!ee){T({key:x,rect:null}),E({key:p,rect:null}),R({key:x,rect:null}),N([]);return}const fe=z5(ee);N(M=>k5(M,fe)?M:fe);const W=F==null?void 0:F.getBoundingClientRect();let P=null;if(!i.length||!F||!W)P=null;else{const M=i.map(j=>Ke(O,j)).filter(j=>!!j).map(j=>Lr(j.getBoundingClientRect(),W,{scale:f,offsetX:d,offsetY:m}));M.length&&(P=M.reduce((j,Y)=>{const V=Math.min(j.x,Y.x),U=Math.min(j.y,Y.y),_=Math.max(j.x+j.width,Y.x+Y.width),L=Math.max(j.y+j.height,Y.y+Y.height);return{x:V,y:U,width:_-V,height:L-U}}))}T(M=>ed(M,x,P)?M:{key:x,rect:P}),R(M=>ed(M,x,P)?M:{key:x,rect:P});const K=c?Ke(O,c):null,q=K&&W?Lr(K.getBoundingClientRect(),W,{scale:f,offsetX:d,offsetY:m}):null;E(M=>ed(M,p,q)?M:{key:p,rect:q})},[l,n,d,m,c,p,f,i,x,g,h]),{selectedStageRect:B,preselectionOverlay:te,selectionOverlay:G,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:z}}function ed(n,l,o){return n.key===l&&j5(n.rect,o)}function j5(n,l){return n===l?!0:!n||!l?!1:n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function k5(n,l){return n.length!==l.length?!1:n.every((o,i)=>{const c=l[i];return(c==null?void 0:c.name)===o.name&&c.value===o.value})}function L5(n,l){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),l&&(i.href=l),c.href=n,c.href}const H5=(()=>{let n=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${l()}${n}`)})();function il(n){const l=[];for(let o=0,i=n.length;o<i;o++)l.push(n[o]);return l}let Dr=null;function n1(n={}){return Dr||(n.includeStyleProperties?(Dr=n.includeStyleProperties,Dr):(Dr=il(window.getComputedStyle(document.documentElement)),Dr))}function ec(n,l){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(l);return i?parseFloat(i.replace("px","")):0}function B5(n){const l=ec(n,"border-left-width"),o=ec(n,"border-right-width");return n.clientWidth+l+o}function U5(n){const l=ec(n,"border-top-width"),o=ec(n,"border-bottom-width");return n.clientHeight+l+o}function a1(n,l={}){const o=l.width||B5(n),i=l.height||U5(n);return{width:o,height:i}}function I5(){let n,l;try{l=process}catch{}const o=l&&l.env?l.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const gn=16384;function G5(n){(n.width>gn||n.height>gn)&&(n.width>gn&&n.height>gn?n.width>n.height?(n.height*=gn/n.width,n.width=gn):(n.width*=gn/n.height,n.height=gn):n.width>gn?(n.height*=gn/n.width,n.width=gn):(n.width*=gn/n.height,n.height=gn))}function tc(n){return new Promise((l,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>l(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function Y5(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function V5(n,l,o){const i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),f=document.createElementNS(i,"foreignObject");return c.setAttribute("width",`${l}`),c.setAttribute("height",`${o}`),c.setAttribute("viewBox",`0 0 ${l} ${o}`),f.setAttribute("width","100%"),f.setAttribute("height","100%"),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("externalResourcesRequired","true"),c.appendChild(f),f.appendChild(n),Y5(c)}const ln=(n,l)=>{if(n instanceof l)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===l.name||ln(o,l)};function q5(n){const l=n.getPropertyValue("content");return`${n.cssText} content: '${l.replace(/'|"/g,"")}';`}function P5(n,l){return n1(l).map(o=>{const i=n.getPropertyValue(o),c=n.getPropertyPriority(o);return`${o}: ${i}${c?" !important":""};`}).join(" ")}function X5(n,l,o,i){const c=`.${n}:${l}`,f=o.cssText?q5(o):P5(o,i);return document.createTextNode(`${c}{${f}}`)}function k0(n,l,o,i){const c=window.getComputedStyle(n,o),f=c.getPropertyValue("content");if(f===""||f==="none")return;const d=H5();try{l.className=`${l.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(X5(d,o,c,i)),l.appendChild(m)}function $5(n,l,o){k0(n,l,":before",o),k0(n,l,":after",o)}const L0="application/font-woff",H0="image/jpeg",K5={woff:L0,woff2:L0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:H0,jpeg:H0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function F5(n){const l=/\.([^./]*?)$/g.exec(n);return l?l[1]:""}function vm(n){const l=F5(n).toLowerCase();return K5[l]||""}function Q5(n){return n.split(/,/)[1]}function jd(n){return n.search(/^(data:)/)!==-1}function Z5(n,l){return`data:${l};base64,${n}`}async function l1(n,l,o){const i=await fetch(n,l);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const c=await i.blob();return new Promise((f,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{f(o({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(c)})}const td={};function J5(n,l,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),l?`[${l}]${i}`:i}async function bm(n,l,o){const i=J5(n,l,o.includeQueryParams);if(td[i]!=null)return td[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let c;try{const f=await l1(n,o.fetchRequestInit,({res:d,result:m})=>(l||(l=d.headers.get("Content-Type")||""),Q5(m)));c=Z5(f,l)}catch(f){c=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;f&&(d=typeof f=="string"?f:f.message),d&&console.warn(d)}return td[i]=c,c}async function W5(n){const l=n.toDataURL();return l==="data:,"?n.cloneNode(!1):tc(l)}async function eO(n,l){if(n.currentSrc){const f=document.createElement("canvas"),d=f.getContext("2d");f.width=n.clientWidth,f.height=n.clientHeight,d==null||d.drawImage(n,0,0,f.width,f.height);const m=f.toDataURL();return tc(m)}const o=n.poster,i=vm(o),c=await bm(o,i,l);return tc(c)}async function tO(n,l){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await hc(n.contentDocument.body,l,!0)}catch{}return n.cloneNode(!1)}async function nO(n,l){return ln(n,HTMLCanvasElement)?W5(n):ln(n,HTMLVideoElement)?eO(n,l):ln(n,HTMLIFrameElement)?tO(n,l):n.cloneNode(r1(n))}const aO=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",r1=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function lO(n,l,o){var i,c;if(r1(l))return l;let f=[];return aO(n)&&n.assignedNodes?f=il(n.assignedNodes()):ln(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?f=il(n.contentDocument.body.childNodes):f=il(((c=n.shadowRoot)!==null&&c!==void 0?c:n).childNodes),f.length===0||ln(n,HTMLVideoElement)||await f.reduce((d,m)=>d.then(()=>hc(m,o)).then(h=>{h&&l.appendChild(h)}),Promise.resolve()),l}function rO(n,l,o){const i=l.style;if(!i)return;const c=window.getComputedStyle(n);c.cssText?(i.cssText=c.cssText,i.transformOrigin=c.transformOrigin):n1(o).forEach(f=>{let d=c.getPropertyValue(f);f==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),ln(n,HTMLIFrameElement)&&f==="display"&&d==="inline"&&(d="block"),f==="d"&&l.getAttribute("d")&&(d=`path(${l.getAttribute("d")})`),i.setProperty(f,d,c.getPropertyPriority(f))})}function oO(n,l){ln(n,HTMLTextAreaElement)&&(l.innerHTML=n.value),ln(n,HTMLInputElement)&&l.setAttribute("value",n.value)}function iO(n,l){if(ln(n,HTMLSelectElement)){const i=Array.from(l.children).find(c=>n.value===c.getAttribute("value"));i&&i.setAttribute("selected","")}}function sO(n,l,o){return ln(l,Element)&&(rO(n,l,o),$5(n,l,o),oO(n,l),iO(n,l)),l}async function cO(n,l){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let f=0;f<o.length;f++){const m=o[f].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await hc(g,l,!0))}}const c=Object.values(i);if(c.length){const f="http://www.w3.org/1999/xhtml",d=document.createElementNS(f,"svg");d.setAttribute("xmlns",f),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(f,"defs");d.appendChild(m);for(let h=0;h<c.length;h++)m.appendChild(c[h]);n.appendChild(d)}return n}async function hc(n,l,o){return!o&&l.filter&&!l.filter(n)?null:Promise.resolve(n).then(i=>nO(i,l)).then(i=>lO(n,i,l)).then(i=>sO(n,i,l)).then(i=>cO(i,l))}const o1=/url\((['"]?)([^'"]+?)\1\)/g,uO=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,fO=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function dO(n){const l=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function mO(n){const l=[];return n.replace(o1,(o,i,c)=>(l.push(c),o)),l.filter(o=>!jd(o))}async function hO(n,l,o,i,c){try{const f=o?L5(l,o):l,d=vm(l);let m;return c||(m=await bm(f,d,i)),n.replace(dO(l),`$1${m}$3`)}catch{}return n}function pO(n,{preferredFontFormat:l}){return l?n.replace(fO,o=>{for(;;){const[i,,c]=uO.exec(o)||[];if(!c)return"";if(c===l)return`src: ${i};`}}):n}function i1(n){return n.search(o1)!==-1}async function s1(n,l,o){if(!i1(n))return n;const i=pO(n,o);return mO(i).reduce((f,d)=>f.then(m=>hO(m,d,l,o)),Promise.resolve(i))}async function jr(n,l,o){var i;const c=(i=l.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(c){const f=await s1(c,null,o);return l.style.setProperty(n,f,l.style.getPropertyPriority(n)),!0}return!1}async function gO(n,l){await jr("background",n,l)||await jr("background-image",n,l),await jr("mask",n,l)||await jr("-webkit-mask",n,l)||await jr("mask-image",n,l)||await jr("-webkit-mask-image",n,l)}async function yO(n,l){const o=ln(n,HTMLImageElement);if(!(o&&!jd(n.src))&&!(ln(n,SVGImageElement)&&!jd(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,c=await bm(i,vm(i),l);await new Promise((f,d)=>{n.onload=f,n.onerror=l.onImageErrorHandler?(...h)=>{try{f(l.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=f),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=c):n.href.baseVal=c})}async function vO(n,l){const i=il(n.childNodes).map(c=>c1(c,l));await Promise.all(i).then(()=>n)}async function c1(n,l){ln(n,Element)&&(await gO(n,l),await yO(n,l),await vO(n,l))}function bO(n,l){const{style:o}=n;l.backgroundColor&&(o.backgroundColor=l.backgroundColor),l.width&&(o.width=`${l.width}px`),l.height&&(o.height=`${l.height}px`);const i=l.style;return i!=null&&Object.keys(i).forEach(c=>{o[c]=i[c]}),n}const B0={};async function U0(n){let l=B0[n];if(l!=null)return l;const i=await(await fetch(n)).text();return l={url:n,cssText:i},B0[n]=l,l}async function I0(n,l){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,f=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),l1(m,l.fetchRequestInit,({result:h})=>(o=o.replace(d,`url(${h})`),[d,h]))});return Promise.all(f).then(()=>o)}function G0(n){if(n==null)return[];const l=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const c=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=c.exec(i);if(h===null)break;l.push(h[0])}i=i.replace(c,"");const f=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=f.exec(i);if(h===null){if(h=m.exec(i),h===null)break;f.lastIndex=m.lastIndex}else m.lastIndex=f.lastIndex;l.push(h[0])}return l}async function xO(n,l){const o=[],i=[];return n.forEach(c=>{if("cssRules"in c)try{il(c.cssRules||[]).forEach((f,d)=>{if(f.type===CSSRule.IMPORT_RULE){let m=d+1;const h=f.href,g=U0(h).then(x=>I0(x,l)).then(x=>G0(x).forEach(p=>{try{c.insertRule(p,p.startsWith("@import")?m+=1:c.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:p,error:S})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(f){const d=n.find(m=>m.href==null)||document.styleSheets[0];c.href!=null&&i.push(U0(c.href).then(m=>I0(m,l)).then(m=>G0(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",f)}}),Promise.all(i).then(()=>(n.forEach(c=>{if("cssRules"in c)try{il(c.cssRules||[]).forEach(f=>{o.push(f)})}catch(f){console.error(`Error while reading CSS rules from ${c.href}`,f)}}),o))}function SO(n){return n.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>i1(l.style.getPropertyValue("src")))}async function wO(n,l){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=il(n.ownerDocument.styleSheets),i=await xO(o,l);return SO(i)}function u1(n){return n.trim().replace(/["']/g,"")}function EO(n){const l=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(f=>{l.add(u1(f))}),Array.from(i.children).forEach(f=>{f instanceof HTMLElement&&o(f)})}return o(n),l}async function TO(n,l){const o=await wO(n,l),i=EO(n);return(await Promise.all(o.filter(f=>i.has(u1(f.style.fontFamily))).map(f=>{const d=f.parentStyleSheet?f.parentStyleSheet.href:null;return s1(f.cssText,d,l)}))).join(`
407
+ `)}async function CO(n,l){const o=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await TO(n,l);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 MO(n,l={}){const{width:o,height:i}=a1(n,l),c=await hc(n,l,!0);return await CO(c,l),await c1(c,l),bO(c,l),await V5(c,o,i)}async function AO(n,l={}){const{width:o,height:i}=a1(n,l),c=await MO(n,l),f=await tc(c),d=document.createElement("canvas"),m=d.getContext("2d"),h=l.pixelRatio||I5(),g=l.canvasWidth||o,x=l.canvasHeight||i;return d.width=g*h,d.height=x*h,l.skipAutoScale||G5(d),d.style.width=`${g}`,d.style.height=`${x}`,l.backgroundColor&&(m.fillStyle=l.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(f,0,0,d.width,d.height),d}async function _O(n,l={}){return(await AO(n,l)).toDataURL()}const Y0=224,RO=2;function NO(n){return new Promise(l=>{window.setTimeout(l,n)})}async function OO(n){var l;if((l=n.fonts)!=null&&l.ready)try{await n.fonts.ready}catch{}}async function zO(n){const l=document.createElement("iframe");l.setAttribute("aria-hidden","true"),l.tabIndex=-1,l.style.position="fixed",l.style.left="-10000px",l.style.top="0",l.style.width=`${n.width}px`,l.style.height=`${n.height}px`,l.style.opacity="0",l.style.pointerEvents="none",l.style.border="0",document.body.appendChild(l);try{const o=l.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await OO(o),await NO(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 _O(c,{cacheBust:!0,pixelRatio:RO,canvasWidth:Y0,canvasHeight:Math.round(n.height/n.width*Y0),backgroundColor:"white",skipFonts:!1})}finally{l.remove()}}const DO=300;function jO(n){const[l,o]=b.useState({}),i=b.useRef(new Map),c=b.useMemo(()=>n.map(f=>({id:f.id,key:`${f.id}:${f.htmlSource}`})),[n]);return b.useEffect(()=>{let f=!1;const d=window.setTimeout(async()=>{const m={};for(const h of n){const g=`${h.id}:${h.htmlSource}`,x=i.current.get(g);if(x){m[h.id]=x;continue}try{const p=await zO(h);i.current.set(g,p),m[h.id]=p}catch{}if(f)return}f||o(h=>({...h,...m}))},DO);return()=>{f=!0,window.clearTimeout(d)}},[n]),b.useEffect(()=>{const f=new Set(c.map(d=>d.key));for(const d of i.current.keys())f.has(d)||i.current.delete(d)},[c]),l}function kO({stageViewportRef:n,slideWidth:l,slideHeight:o}){const[i,c]=b.useState({width:0,height:0});b.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const S=g.getBoundingClientRect();c(T=>T.width===S.width&&T.height===S.height?T:{width:S.width,height:S.height})};x();const p=new ResizeObserver(()=>{x()});return p.observe(g),()=>{p.disconnect()}},[n]);const f=Math.min(i.width>0?i.width/l:1,i.height>0?i.height/o:1),d=Number.isFinite(f)&&f>0?f:1,m=l*d,h=o*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function LO({slides:n,deckTitle:l,isSaving:o=!1,onSlidesChange:i,onDeckTitleChange:c,onExportPdf:f,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:x,redoDepth:p,setActiveSlideId:S,commitOperation:T,runUndo:C,runRedo:E}=_5(n,{onSlidesChange:i}),A=b.useRef(null),R=b.useRef(null),z=b.useRef(null),N=b.useRef(null),[B,te]=b.useState(!1),G=jO(m),{selectedElementId:H,selectedElementIds:O,preselectedElementId:F,isEditingText:ee,activeGroupScopeId:fe,setSelectedElementId:W,setSelectedElementIds:P,beginTextEditing:K,beginGroupEditingScope:q,clearSelection:M,clearPreselection:j,updatePointerPreselection:Y,retargetPointerSelection:V}=A5({activeSlide:h,iframeRef:A,onCommitOperation:T}),U=h==null?void 0:h.elements.find(le=>le.id===H),_=h==null?void 0:h.elements.find(le=>le.id===fe),L=O.length>1?"multi":(U==null?void 0:U.type)??(_==null?void 0:_.type)??"block",Z=h?O.map(le=>h.elements.find(de=>de.id===le)).filter(le=>!!le):[],ie={group:O.length>=2&&Z.length===O.length,ungroup:O.length===1&&!!((U==null?void 0:U.type)==="group"||h&&H&&HO(h.htmlSource,H))},ne=!!fe&&O.length===1&&H===fe,me=l??"",ce=(h==null?void 0:h.width)||Ul,Q=(h==null?void 0:h.height)||Il,{scale:re,offsetX:be,offsetY:Me}=kO({stageViewportRef:R,slideWidth:ce,slideHeight:Q}),{selectedStageRect:Ae,preselectionOverlay:$e,selectionOverlay:Ge,inspectedStyles:Yt}=D5({iframeRef:A,activeSlide:h,selectedElement:U,selectedElementIds:O,preselectedElementId:F,scale:re,offsetX:be,offsetY:Me,slideWidth:ce,slideHeight:Q}),{manipulationOverlay:wt,isManipulating:Ot,suppressBackgroundClear:De,beginMove:ye,beginResize:rn,beginRotate:on}=h5({activeSlide:h,selectedElement:U,selectedElementId:H,selectedElementIds:O,selectedStageRect:Ae,iframeRef:A,stageGeometry:{scale:re,offsetX:be,offsetY:Me,slideWidth:ce,slideHeight:Q},isEditingText:ee,onCommitOperation:T}),et=(wt==null?void 0:wt.selectionBounds)??Ge,Lt=H??"slide-root",_t={locked:h?qo(h,Lt,"data-editor-locked"):"",altText:h?qo(h,Lt,"alt"):"",ariaLabel:h?qo(h,Lt,"aria-label"):"",linkUrl:h?qo(h,Lt,"data-link-url"):""};function bn(le,de){if(!h)return;const pe=PN({elementId:Lt,nextValue:de,propertyName:le,slide:h});pe&&T(pe)}function zt(le,de){if(!h)return;const pe=XN({attributeName:le,elementId:Lt,nextValue:de,slide:h});pe&&T(pe)}function _a(le){if(!h||O.length===0)return;const de=O.map(pe=>{const ge=Nd(h,pe,"z-index"),Oe=Number.parseInt(ge,10),ke=Number.isFinite(Oe)?Oe:0,Be=le==="front"?"999":le==="back"?"0":String(Math.max(0,ke+(le==="forward"?1:-1)));return ge===Be?null:{type:"style.update",slideId:h.id,elementId:pe,propertyName:"z-index",previousValue:ge,nextValue:Be,timestamp:Date.now()}}).filter(pe=>!!pe);Ft(de)}function Ft(le){!h||le.length===0||T(le.length===1?le[0]:{type:"operation.batch",slideId:h.id,operations:le,timestamp:Date.now()})}function qn(le,de,pe){var Be;const ge={[de]:pe},ke=(Be=new DOMParser().parseFromString(`<template>${le}</template>`,"text/html").querySelector("template"))==null?void 0:Be.content.firstElementChild;if(!(ke instanceof HTMLElement))return ge;for(const Ye of ke.querySelectorAll(`[${Ee}]`)){const at=Ye.getAttribute(Ee);at&&(ge[at]=`${pe}-${at}`)}return ge}function Qt(){var Be;if(!h||O.length===0)return;const le=(Be=A.current)==null?void 0:Be.contentDocument,de=le==null?void 0:le.querySelector(h.rootSelector),pe=de==null?void 0:de.getBoundingClientRect();let ge=h.htmlSource;const Oe=[],ke=O.map(Ye=>{const at=Gs(h.htmlSource,Ye),mt=Is(h.htmlSource,Ye),lt=le?Ke(le,Ye):null;if(!at||!mt||!lt||!pe)return null;const $t=id(ge,`${Ye}-copy`),Et=nv(at,qn(at,Ye,$t)),Pe=Od(Wx(lt.getBoundingClientRect(),pe),24,24),gt=Jx(Et,Pe);return ge=`${ge}
408
+ <!-- ${$t} reserved -->`,Oe.push($t),{type:"element.insert",slideId:h.id,elementId:$t,...mt,html:gt,timestamp:Date.now()}}).filter(Ye=>!!Ye);Ft(ke),Oe.length&&P(Oe)}function jn(){if(!h||O.length===0)return;const le=O.map(de=>{const pe=Gs(h.htmlSource,de),ge=Is(h.htmlSource,de);return!pe||!ge?null:{type:"element.remove",slideId:h.id,elementId:de,...ge,html:pe,timestamp:Date.now()}}).filter(de=>!!de);Ft(le),le.length&&P([])}function Vt(le){if(!h||m.length===0)return;const de=S2(m,le);T({type:"slide.create",slide:de,index:le,timestamp:Date.now()}),S(de.id),M()}function na(){if(!h)return;const le=m.findIndex(pe=>pe.id===h.id),de=le>=0?le+1:m.length;Vt(de)}function Ht(le){const de=m.findIndex(pe=>pe.id===le);de<0||Vt(de)}function sn(le){const de=m.findIndex(pe=>pe.id===le);de<0||Vt(de+1)}function Dt(le){const de=m.find(ke=>ke.id===le);if(!de)return;const pe=m.findIndex(ke=>ke.id===le),ge=pe>=0?pe+1:m.length,Oe=w2(m,de);T({type:"slide.duplicate",sourceSlideId:le,slide:Oe,index:ge,timestamp:Date.now()}),S(Oe.id),M()}function Fr(le){if(m.length<=1)return;const de=m.findIndex(Oe=>Oe.id===le),pe=m[de];if(!pe)return;const ge=m[de+1]??m[de-1]??m[0];T({type:"slide.delete",slide:pe,index:de,timestamp:Date.now()}),g===le&&S((ge==null?void 0:ge.id)??""),M()}function pl(le){const de=m.find(pe=>pe.id===le);de&&T({type:"slide.visibility.update",slideId:le,previousHidden:de.hidden===!0,nextHidden:de.hidden!==!0,timestamp:Date.now()})}function xn(le,de){const pe=m.findIndex(ge=>ge.id===le);pe<0||pe===de||(T({type:"slide.reorder",slideId:le,fromIndex:pe,toIndex:de,timestamp:Date.now()}),S(le))}function Ra(){if(!h||O.length<2)return;const le=aa(),de=id(h.htmlSource,"group-1"),pe=v2({html:h.htmlSource,slideId:h.id,groupElementId:de,elementRects:le,elementIds:O});pe&&(T(pe),P([de]))}function aa(le){var mt;const de=(mt=A.current)==null?void 0:mt.contentDocument,pe=de==null?void 0:de.querySelector((h==null?void 0:h.rootSelector)??"");if(!de||!pe)return{};const ge=pe.getBoundingClientRect(),Oe=h?h.width/ge.width:1,ke=h?h.height/ge.height:1,Be={},Ye=V0(de,le),at=[...Array.from(de.querySelectorAll(`[data-editable][${Ee}]`)),...Array.from(Ye.keys())];for(const lt of at){const $t=lt.getAttribute(Ee)||Ye.get(lt);if(!$t)continue;const Et=lt.getBoundingClientRect(),Pe=lt.parentElement,gt=Pe!=null&&Pe.hasAttribute("data-editable")&&Pe.getAttribute(Ee)?Pe.getAttribute(Ee):null,pt=gt?Be[gt]??{x:0,y:0,width:ge.width,height:ge.height}:{x:0,y:0,width:ge.width,height:ge.height};Be[$t]={x:(Et.left-ge.left)*Oe-pt.x,y:(Et.top-ge.top)*ke-pt.y,width:Et.width*Oe,height:Et.height*ke}}return Be}function la(){if(!h||O.length!==1||!H)return;const le=b2({html:h.htmlSource,slideId:h.id,groupElementId:H,elementRects:aa(H),elementPresentationStyles:Sn(H)});le&&(T(le),P(le.childElementIds))}function Sn(le){var ke,Be,Ye;const de=(ke=A.current)==null?void 0:ke.contentDocument;if(!de)return{};const pe=Ke(de,le);if(!pe||pe.getAttribute("data-group")==="true")return{};const ge={},Oe=V0(de,le);for(const at of Array.from(pe.children)){if(!at.hasAttribute("data-editable")&&!xm(at))continue;const mt=at.getAttribute(Ee)||Oe.get(at),lt=(Be=at.ownerDocument.defaultView)==null?void 0:Be.getComputedStyle(at);if(!(!mt||!lt)){ge[mt]={color:lt.color,fontSize:lt.fontSize,fontWeight:lt.fontWeight,fontStyle:lt.fontStyle,lineHeight:lt.lineHeight,textAlign:lt.textAlign,paddingTop:lt.paddingTop,paddingRight:lt.paddingRight,paddingBottom:lt.paddingBottom,paddingLeft:lt.paddingLeft,listStylePosition:lt.listStylePosition,listStyleType:lt.listStyleType};for(const $t of Array.from(at.querySelectorAll(`[data-editable][${Ee}]`))){const Et=$t.getAttribute(Ee),Pe=(Ye=$t.ownerDocument.defaultView)==null?void 0:Ye.getComputedStyle($t);!Et||!Pe||(ge[Et]={color:Pe.color,fontSize:Pe.fontSize,fontWeight:Pe.fontWeight,fontStyle:Pe.fontStyle,lineHeight:Pe.lineHeight,textAlign:Pe.textAlign})}}}return ge}function Re(le){if(!h||!H||!et)return;const de=Nd(h,H,"transform"),pe={x:(et.x-be)/re,y:(et.y-Me)/re,width:et.width/re,height:et.height/re};let ge=0,Oe=0;if(le==="left"?ge=-pe.x:le==="hcenter"?ge=ce/2-(pe.x+pe.width/2):le==="right"?ge=ce-(pe.x+pe.width):le==="top"?Oe=-pe.y:le==="vcenter"?Oe=Q/2-(pe.y+pe.height/2):le==="bottom"&&(Oe=Q-(pe.y+pe.height)),Math.abs(ge)<.01&&Math.abs(Oe)<.01)return;const ke=Gn(de);bn("transform",Ta(ke.translateX+ge,ke.translateY+Oe,ke.rotate)??"")}function ct(le){var gt;if(!h||O.length<3)return;const de=(gt=A.current)==null?void 0:gt.contentDocument,pe=de==null?void 0:de.querySelector(h.rootSelector),ge=pe==null?void 0:pe.getBoundingClientRect();if(!de||!ge)return;const Oe=O.map(pt=>{const kn=Ke(de,pt);if(!kn)return null;const Na=kn.getBoundingClientRect();return{elementId:pt,node:kn,rect:{x:Na.left-ge.left,y:Na.top-ge.top,width:Na.width,height:Na.height}}}).filter(pt=>!!pt);if(Oe.length<3)return;const ke=le==="vertical"?"y":"x",Be=le==="vertical"?"height":"width",Ye=[...Oe].sort((pt,kn)=>pt.rect[ke]-kn.rect[ke]),at=Ye[0],mt=Ye[Ye.length-1];if(!at||!mt)return;const lt=at.rect[ke]+at.rect[Be]/2,Et=(mt.rect[ke]+mt.rect[Be]/2-lt)/(Ye.length-1),Pe=Ye.map((pt,kn)=>{const Na=lt+Et*kn,pc=pt.rect[ke]+pt.rect[Be]/2,$l=Na-pc;if(Math.abs($l)<.01)return null;const Pn=Po(pt.node),gl=Gn(Pn.transform),Oa=ld({...Pn,transform:Ta(gl.translateX+(ke==="x"?$l:0),gl.translateY+(ke==="y"?$l:0),gl.rotate),transformOrigin:Pn.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:pt.elementId,previousStyle:Pn,nextStyle:Oa,timestamp:Date.now()}}).filter(pt=>!!pt);Ft(Pe)}return w5({activeSlide:h,selectedElementIds:O,iframeRef:A,slideWidth:ce,slideHeight:Q,isEditingText:ee,canUndo:x>0,canRedo:p>0,onCommitOperation:T,onSelectElementIds:P,onEscapeSelection:M,onUndo:C,onRedo:E}),h?v.jsx(qN,{children:v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${B?"invisible pointer-events-none absolute inset-0":""}`,children:[v.jsx(OT,{title:me,onTitleChange:c,isSaving:o,onPresent:()=>{M(),te(!0)},onExportHtml:d,pdfSlides:m.map(le=>({id:le.id,title:le.title,file:le.sourceFile})),pdfThumbnails:G,onExportPdf:f}),v.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[v.jsx(ZR,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:G,onSelectSlide:le=>{S(le),W(null)},onAdd:na,onAddSlideAbove:Ht,onAddSlideBelow:sn,onDuplicate:Dt,onDelete:Fr,onToggleHidden:pl,onReorder:xn}),v.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:v.jsx(YN,{slideWidth:ce,slideHeight:Q,offsetX:be,offsetY:Me,scale:re,preselectionOverlay:$e,selectionOverlay:et,toolbarKey:O.length?`${h.id}:${O.join(",")}`:null,inspectedStyles:Yt,selectedElementType:L,selectionCommandAvailability:ie,groupScopeOverlayPassive:ne,isEditingText:ee,manipulationOverlay:wt,iframeRef:A,stageViewportRef:R,selectionOverlayRef:z,isManipulating:Ot,onSelectionOverlayMouseDown:le=>{if(!O.length)return;const de=le.shiftKey||le.metaKey||le.ctrlKey,pe=Y(le.clientX,le.clientY);if(N.current={clientX:le.clientX,clientY:le.clientY,additive:de,targetElementId:pe},pe&&pe!==H){le.stopPropagation();return}pe&&pe===H&&le.stopPropagation(),ye({clientX:le.clientX,clientY:le.clientY,preventDefault:()=>le.preventDefault(),stopPropagation:()=>le.stopPropagation()})},onSelectionOverlayMouseMove:le=>{const de=N.current;if(Y(le.clientX,le.clientY),!de||de.targetElementId===H)return;const pe=le.clientX-de.clientX,ge=le.clientY-de.clientY;Math.hypot(pe,ge)<=4||(N.current=null,ye({clientX:de.clientX,clientY:de.clientY,preventDefault:()=>le.preventDefault(),stopPropagation:()=>le.stopPropagation()}))},onSelectionOverlayMouseUp:le=>{const de=N.current;if(N.current=null,!de)return;const pe=le.clientX-de.clientX,ge=le.clientY-de.clientY;Math.hypot(pe,ge)>4||V(le.clientX,le.clientY,de.additive)},onStageMouseLeave:j,onResizeHandleMouseDown:(le,de)=>{O.length&&rn(le,{clientX:de.clientX,clientY:de.clientY,preventDefault:()=>de.preventDefault(),stopPropagation:()=>de.stopPropagation()})},onRotateHandleMouseDown:le=>{O.length===1&&on({clientX:le.clientX,clientY:le.clientY,preventDefault:()=>le.preventDefault(),stopPropagation:()=>le.stopPropagation()})},onSelectionOverlayDoubleClick:le=>{var de;if(fe&&((de=A.current)!=null&&de.contentDocument)){const pe=A.current.getBoundingClientRect(),Oe=A.current.contentDocument.elementFromPoint(le.clientX-pe.left,le.clientY-pe.top),ke=Oe==null?void 0:Oe.closest(`[data-editable][${Ee}]`);if((ke==null?void 0:ke.getAttribute("data-editable"))==="text"){const Be=ke.getAttribute(Ee);if(Be){K(Be);return}}}if(O.length===1&&(U==null?void 0:U.type)==="text"&&H){K(H);return}O.length===1&&(U==null?void 0:U.type)==="group"&&H&&q(H)},onBackgroundClick:()=>{De||M()},onStyleChange:bn,onAttributeChange:zt,onAlignToSlide:Re,onDistribute:ct,onGroup:Ra,onLayerOrder:_a,onUngroup:la,onDuplicate:Qt,onDelete:jn,attributeValues:_t})})]})]}),B?v.jsx(QR,{slides:m,startSlideId:h.id,onExit:()=>te(!1)}):null]})}):v.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function HO(n,l){if(typeof DOMParser>"u")return!1;const o=new DOMParser().parseFromString(n,"text/html"),i=Ke(o,l);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(c=>c instanceof HTMLElement&&(c.hasAttribute("data-editable")||xm(c)))}function V0(n,l){const o=new Map;if(!l)return o;const i=Ke(n,l);if(!i||i.getAttribute("data-group")==="true")return o;const c=new Set(Array.from(n.querySelectorAll(`[${Ee}]`)).map(d=>d.getAttribute(Ee)).filter(d=>!!d)),f=d=>{if(!c.has(d))return c.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;c.has(`${h}-${g}`);)g+=1;const x=`${h}-${g}`;return c.add(x),x};for(const d of Array.from(i.children))xm(d)&&o.set(d,d.getAttribute(Ee)||f("block-1"));return o}function xm(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}const BO="/deck/manifest.json",UO="/__editor/save-generated-deck",IO="/__editor/export-pdf",GO="/__editor/export-html",nd=800;function YO(){const[n,l]=b.useState("Generated deck"),[o,i]=b.useState([]),[c,f]=b.useState(null),[d,m]=b.useState(!0),[h,g]=b.useState(!1),x=b.useRef(null),p=b.useRef([]),S=b.useRef(null),T=b.useRef(null),C=b.useRef(null),E=b.useRef(0),A=b.useRef(!1),R=b.useRef(null),z=b.useRef(Date.now());b.useEffect(()=>{let O=!1;return T2({manifestUrl:`${BO}?v=${Date.now()}`}).then(F=>{if(O)return;if(!F){l("Generated deck"),i([]),f("No slides were found at /deck/manifest.json."),m(!1);return}x.current=F.manifest;const ee=F.manifest.topic||"Generated deck";T.current=ee,l(ee),i(F.slides),p.current=F.slides,f(null),m(!1)}).catch(()=>{O||(l("Generated deck"),i([]),f("The app could not load the generated deck."),m(!1))}),()=>{O=!0,C.current&&window.clearTimeout(C.current)}},[]);const N=async()=>{var q;const O=x.current,F=S.current??p.current,ee=T.current??n,fe=E.current;if(!((q=O==null?void 0:O.slides)!=null&&q.length)||!(F!=null&&F.length))return;if(A.current){await R.current,E.current!==fe&&await N();return}A.current=!0;const W=new Map(p.current.map((M,j)=>{var Y,V;return[M.id,M.sourceFile??((V=(Y=O.slides)==null?void 0:Y[j])==null?void 0:V.file)]})),P=F.flatMap(M=>{const j=M.sourceFile??W.get(M.id);return j?[{file:j,title:M.title,hidden:M.hidden===!0?!0:void 0}]:[]}),K=fetch(UO,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:z.current,manifest:{...O,topic:ee,slides:P},slides:F.map(M=>({file:M.sourceFile??W.get(M.id),htmlSource:M.htmlSource,title:M.title,hidden:M.hidden===!0}))})}).then(M=>{if(!M.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(M=>{throw f("The app could not write generated slides back to disk."),M}).finally(()=>{if(A.current=!1,R.current=null,E.current!==fe){C.current||(C.current=window.setTimeout(()=>{C.current=null,N()},nd));return}g(!1)});R.current=K,await K};return{deckTitle:n,slides:o,errorMessage:c,isLoading:d,isSaving:h,saveSlides:O=>{var ee;if(p.current===O)return;const F=x.current;(ee=F==null?void 0:F.slides)!=null&&ee.length&&(p.current=O,S.current=O,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,N()},nd))},saveDeckTitle:O=>{const F=O.trim()||"Untitled deck";l(O),T.current=F,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,N()},nd)},exportPdf:async O=>{C.current&&(window.clearTimeout(C.current),C.current=null),await N();const F=await fetch(IO,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:O})});if(!F.ok)throw new Error(await F.text());const ee=await F.blob(),fe=URL.createObjectURL(ee),W=document.createElement("a"),P=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";W.href=fe,W.download=`${P}.pdf`,document.body.appendChild(W),W.click(),W.remove(),URL.revokeObjectURL(fe)},exportHtml:async()=>{C.current&&(window.clearTimeout(C.current),C.current=null),await N();const O=await fetch(GO,{method:"POST"});if(!O.ok)throw new Error(await O.text());const F=await O.blob(),ee=URL.createObjectURL(F),fe=document.createElement("a"),W=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";fe.href=ee,fe.download=`${W}.html`,document.body.appendChild(fe),fe.click(),fe.remove(),URL.revokeObjectURL(ee)}}}function q0({title:n,body:l}){return v.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:v.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:[v.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),v.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:l})]})})}function VO(){const{deckTitle:n,slides:l,errorMessage:o,isLoading:i,isSaving:c,saveSlides:f,saveDeckTitle:d,exportPdf:m,exportHtml:h}=YO();return i?v.jsx(q0,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):o?v.jsx(q0,{title:"Generated deck required",body:o}):v.jsxs(v.Fragment,{children:[v.jsx(l2,{position:"top-center",richColors:!0,closeButton:!0}),v.jsx(LO,{slides:l,deckTitle:n,isSaving:c,onSlidesChange:f,onDeckTitleChange:d,onExportPdf:g=>{const x=rl.loading("Exporting PDF...");m(g).then(()=>{rl.success("PDF export is ready.",{id:x})}).catch(p=>{rl.error("PDF export failed.",{id:x,description:p instanceof Error?p.message:String(p)})})},onExportHtml:()=>{const g=rl.loading("Exporting HTML...");h().then(()=>{rl.success("HTML export is ready.",{id:g})}).catch(x=>{rl.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const f1=document.getElementById("root");if(!f1)throw new Error("Root element #root was not found.");Ow.createRoot(f1).render(v.jsx(he.StrictMode,{children:v.jsx(VO,{})}));