From 1fd27d587dae9aea89667d57f2cdab85f66020b4 Mon Sep 17 00:00:00 2001 From: Tobias Merkle Date: Tue, 4 Jun 2024 11:22:50 -0400 Subject: [PATCH] add dev server proxies to appstore, register, homepage; fix blackscreen on homepage --- .../app_store/app_store/src/http_api.rs | 2 +- .../{index-Mr04YvPM.js => index-I5kjLT9f.js} | 26 ++++---- kinode/packages/app_store/pkg/ui/index.html | 2 +- .../ui/src/components/UpdateButton.tsx | 7 +- .../{index-DqBTDSfz.js => index-BkgGa32-.js} | 66 +++++++++---------- kinode/packages/homepage/pkg/ui/index.html | 2 +- kinode/packages/homepage/ui/dist/index.html | 2 +- .../homepage/ui/src/components/AllApps.tsx | 2 +- .../homepage/ui/src/components/AppDisplay.tsx | 18 ++--- .../homepage/ui/src/components/AppsDock.tsx | 4 +- .../homepage/ui/src/components/Widgets.tsx | 1 + .../homepage/ui/src/pages/Homepage.tsx | 9 +-- .../packages/homepage/ui/src/utils/fetch.ts | 12 ++++ kinode/packages/homepage/ui/src/vite-env.d.ts | 12 ++++ kinode/packages/homepage/ui/vite.config.ts | 9 +++ .../{index-iKMNbHhl.js => index--NeI-a3U.js} | 54 +++++++-------- kinode/src/register-ui/build/index.html | 2 +- kinode/src/register-ui/src/App.tsx | 5 +- .../register-ui/src/pages/ClaimKnsInvite.tsx | 11 ++-- .../register-ui/src/pages/ImportKeyfile.tsx | 12 ++-- kinode/src/register-ui/src/pages/Login.tsx | 11 ++-- .../src/register-ui/src/pages/SetPassword.tsx | 5 +- kinode/src/register-ui/src/utils/fetch.ts | 12 ++++ kinode/src/register-ui/vite.config.ts | 25 +------ 24 files changed, 178 insertions(+), 133 deletions(-) rename kinode/packages/app_store/pkg/ui/assets/{index-Mr04YvPM.js => index-I5kjLT9f.js} (79%) rename kinode/packages/homepage/pkg/ui/assets/{index-DqBTDSfz.js => index-BkgGa32-.js} (52%) create mode 100644 kinode/packages/homepage/ui/src/utils/fetch.ts rename kinode/src/register-ui/build/assets/{index-iKMNbHhl.js => index--NeI-a3U.js} (76%) create mode 100644 kinode/src/register-ui/src/utils/fetch.ts diff --git a/kinode/packages/app_store/app_store/src/http_api.rs b/kinode/packages/app_store/app_store/src/http_api.rs index bfa69e7b..a6b761f6 100644 --- a/kinode/packages/app_store/app_store/src/http_api.rs +++ b/kinode/packages/app_store/app_store/src/http_api.rs @@ -95,7 +95,7 @@ fn make_widget() -> String { + diff --git a/kinode/packages/app_store/ui/src/components/UpdateButton.tsx b/kinode/packages/app_store/ui/src/components/UpdateButton.tsx index df4388c2..f58ec7b6 100644 --- a/kinode/packages/app_store/ui/src/components/UpdateButton.tsx +++ b/kinode/packages/app_store/ui/src/components/UpdateButton.tsx @@ -5,6 +5,7 @@ import Modal from "./Modal"; import { getAppName } from "../utils/app"; import Loader from "./Loader"; import classNames from "classnames"; +import { FaU } from "react-icons/fa6"; interface UpdateButtonProps extends React.HTMLAttributes { app: AppInfo; @@ -55,10 +56,12 @@ export default function UpdateButton({ app, isIcon = false, ...props }: UpdateBu setShowModal(false)}> {loading ? ( diff --git a/kinode/packages/homepage/pkg/ui/assets/index-DqBTDSfz.js b/kinode/packages/homepage/pkg/ui/assets/index-BkgGa32-.js similarity index 52% rename from kinode/packages/homepage/pkg/ui/assets/index-DqBTDSfz.js rename to kinode/packages/homepage/pkg/ui/assets/index-BkgGa32-.js index 9bc110fc..a2c8f603 100644 --- a/kinode/packages/homepage/pkg/ui/assets/index-DqBTDSfz.js +++ b/kinode/packages/homepage/pkg/ui/assets/index-BkgGa32-.js @@ -1,4 +1,4 @@ -function lm(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var df={exports:{}},Vo={},ff={exports:{}},j={};/** +function am(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ff={exports:{}},Go={},pf={exports:{}},j={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function lm(e,t){for(var r=0;r>>1,_=O[W];if(0>>1;Wi(Qe,M))Ke<_&&0>i(xt,Qe)?(O[W]=xt,O[Ke]=M,W=Ke):(O[W]=Qe,O[qe]=M,W=qe);else if(Ke<_&&0>i(xt,M))O[W]=xt,O[Ke]=M,W=Ke;else break e}}return B}function i(O,B){var M=O.sortIndex-B.sortIndex;return M!==0?M:O.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var u=[],s=[],f=1,d=null,c=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(O){for(var B=r(s);B!==null;){if(B.callback===null)n(s);else if(B.startTime<=O)n(s),B.sortIndex=B.expirationTime,t(u,B);else break;B=r(s)}}function S(O){if(y=!1,h(O),!m)if(r(u)!==null)m=!0,ye(x);else{var B=r(s);B!==null&&vt(S,B.startTime-O)}}function x(O,B){m=!1,y&&(y=!1,g(N),N=-1),p=!0;var M=c;try{for(h(B),d=r(u);d!==null&&(!(d.expirationTime>B)||O&&!F());){var W=d.callback;if(typeof W=="function"){d.callback=null,c=d.priorityLevel;var _=W(d.expirationTime<=B);B=e.unstable_now(),typeof _=="function"?d.callback=_:d===r(u)&&n(u),h(B)}else n(u);d=r(u)}if(d!==null)var gt=!0;else{var qe=r(s);qe!==null&&vt(S,qe.startTime-B),gt=!1}return gt}finally{d=null,c=M,p=!1}}var C=!1,P=null,N=-1,T=5,k=-1;function F(){return!(e.unstable_now()-kO||125W?(O.sortIndex=M,t(s,O),r(u)===null&&O===r(s)&&(y?(g(N),N=-1):y=!0,vt(S,M-W))):(O.sortIndex=_,t(u,O),m||p||(m=!0,ye(x))),O},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(O){var B=c;return function(){var M=c;c=B;try{return O.apply(this,arguments)}finally{c=M}}}})(bf);Cf.exports=bf;var Om=Cf.exports;/** + */(function(e){function t(O,B){var M=O.length;O.push(B);e:for(;0>>1,_=O[W];if(0>>1;Wi(Qe,M))Ke<_&&0>i(xt,Qe)?(O[W]=xt,O[Ke]=M,W=Ke):(O[W]=Qe,O[qe]=M,W=qe);else if(Ke<_&&0>i(xt,M))O[W]=xt,O[Ke]=M,W=Ke;else break e}}return B}function i(O,B){var M=O.sortIndex-B.sortIndex;return M!==0?M:O.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var u=[],s=[],f=1,d=null,c=3,p=!1,m=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(O){for(var B=r(s);B!==null;){if(B.callback===null)n(s);else if(B.startTime<=O)n(s),B.sortIndex=B.expirationTime,t(u,B);else break;B=r(s)}}function S(O){if(y=!1,h(O),!m)if(r(u)!==null)m=!0,ye(x);else{var B=r(s);B!==null&&vt(S,B.startTime-O)}}function x(O,B){m=!1,y&&(y=!1,g(N),N=-1),p=!0;var M=c;try{for(h(B),d=r(u);d!==null&&(!(d.expirationTime>B)||O&&!F());){var W=d.callback;if(typeof W=="function"){d.callback=null,c=d.priorityLevel;var _=W(d.expirationTime<=B);B=e.unstable_now(),typeof _=="function"?d.callback=_:d===r(u)&&n(u),h(B)}else n(u);d=r(u)}if(d!==null)var gt=!0;else{var qe=r(s);qe!==null&&vt(S,qe.startTime-B),gt=!1}return gt}finally{d=null,c=M,p=!1}}var C=!1,P=null,N=-1,T=5,k=-1;function F(){return!(e.unstable_now()-kO||125W?(O.sortIndex=M,t(s,O),r(u)===null&&O===r(s)&&(y?(g(N),N=-1):y=!0,vt(S,M-W))):(O.sortIndex=_,t(u,O),m||p||(m=!0,ye(x))),O},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(O){var B=c;return function(){var M=c;c=B;try{return O.apply(this,arguments)}finally{c=M}}}})(Df);bf.exports=Df;var Rm=bf.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function lm(e,t){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=Object.prototype.hasOwnProperty,km=/^[: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]*$/,nc={},ic={};function Tm(e){return Ea.call(ic,e)?!0:Ea.call(nc,e)?!1:km.test(e)?ic[e]=!0:(nc[e]=!0,!1)}function Am(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lm(e,t,r,n){if(t===null||typeof t>"u"||Am(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ie(e,t,r,n,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new Ie(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Ie(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){he[e]=new Ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ru=/[\-:]([a-z])/g;function ku(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ru,ku);he[t]=new Ie(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ru,ku);he[t]=new Ie(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ru,ku);he[t]=new Ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Ie(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Tu(e,t,r,n){var i=he.hasOwnProperty(t)?he[t]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ca=Object.prototype.hasOwnProperty,Tm=/^[: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]*$/,ic={},oc={};function Am(e){return Ca.call(oc,e)?!0:Ca.call(ic,e)?!1:Tm.test(e)?oc[e]=!0:(ic[e]=!0,!1)}function Lm(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Mm(e,t,r,n){if(t===null||typeof t>"u"||Lm(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ie(e,t,r,n,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new Ie(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Ie(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){he[e]=new Ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var ku=/[\-:]([a-z])/g;function Tu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ku,Tu);he[t]=new Ie(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ku,Tu);he[t]=new Ie(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ku,Tu);he[t]=new Ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Ie(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Au(e,t,r,n){var i=he.hasOwnProperty(t)?he[t]:null;(i!==null?i.type!==0:n||!(2a||i[l]!==o[a]){var u=` -`+i[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=a);break}}}finally{jl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?En(e):""}function Mm(e){switch(e.tag){case 5:return En(e.type);case 16:return En("Lazy");case 13:return En("Suspense");case 19:return En("SuspenseList");case 0:case 2:case 15:return e=zl(e.type,!1),e;case 11:return e=zl(e.type.render,!1),e;case 1:return e=zl(e.type,!0),e;default:return""}}function Pa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ir:return"Fragment";case Pr:return"Portal";case Ca:return"Profiler";case Au:return"StrictMode";case ba:return"Suspense";case Da:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case If:return(e.displayName||"Context")+".Consumer";case Pf:return(e._context.displayName||"Context")+".Provider";case Lu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mu:return t=e.displayName||null,t!==null?t:Pa(e.type)||"Memo";case At:t=e._payload,e=e._init;try{return Pa(e(t))}catch{}}return null}function Bm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pa(t);case 8:return t===Au?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Of(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fm(e){var t=Of(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oi(e){e._valueTracker||(e._valueTracker=Fm(e))}function Rf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Of(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ao(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}}function Ia(e,t){var r=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function lc(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xt(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function kf(e,t){t=t.checked,t!=null&&Tu(e,"checked",t,!1)}function Na(e,t){kf(e,t);var r=Xt(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oa(e,t.type,r):t.hasOwnProperty("defaultValue")&&Oa(e,t.type,Xt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ac(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Oa(e,t,r){(t!=="number"||ao(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Cn=Array.isArray;function jr(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Pn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jm=["Webkit","ms","Moz","O"];Object.keys(Pn).forEach(function(e){jm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pn[t]=Pn[e]})});function Mf(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Pn.hasOwnProperty(e)&&Pn[e]?(""+t).trim():t+"px"}function Bf(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Mf(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var zm=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ta(e,t){if(t){if(zm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Aa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 La=null;function Bu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,zr=null,$r=null;function cc(e){if(e=di(e)){if(typeof Ma!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Yo(t),Ma(e.stateNode,e.type,t))}}function Ff(e){zr?$r?$r.push(e):$r=[e]:zr=e}function jf(){if(zr){var e=zr,t=$r;if($r=zr=null,cc(e),t)for(e=0;e>>=0,e===0?32:31-(Ym(e)/Xm|0)|0}var ki=64,Ti=4194304;function bn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fo(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,l=r&268435455;if(l!==0){var a=l&~i;a!==0?n=bn(a):(o&=l,o!==0&&(n=bn(o)))}else l=r&~i,l!==0?n=bn(l):o!==0&&(n=bn(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function si(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=r}function th(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Nn),wc=" ",Sc=!1;function ip(e,t){switch(e){case"keyup":return Oh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nr=!1;function kh(e,t){switch(e){case"compositionend":return op(t);case"keypress":return t.which!==32?null:(Sc=!0,wc);case"textInput":return e=t.data,e===wc&&Sc?null:e;default:return null}}function Th(e,t){if(Nr)return e==="compositionend"||!Hu&&ip(e,t)?(e=rp(),Xi=Uu=Ft=null,Nr=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=bc(r)}}function sp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cp(){for(var e=window,t=ao();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ao(e.document)}return t}function Vu(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")}function Uh(e){var t=cp(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&sp(r.ownerDocument.documentElement,r)){if(n!==null&&Vu(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=Dc(r,o);var l=Dc(r,n);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Or=null,Ua=null,Rn=null,_a=!1;function Pc(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;_a||Or==null||Or!==ao(n)||(n=Or,"selectionStart"in n&&Vu(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Rn&&Hn(Rn,n)||(Rn=n,n=go(Ua,"onSelect"),0Tr||(e.current=Qa[Tr],Qa[Tr]=null,Tr--)}function q(e,t){Tr++,Qa[Tr]=e.current,e.current=t}var Zt={},Ee=tr(Zt),Ae=tr(!1),gr=Zt;function Gr(e,t){var r=e.type.contextTypes;if(!r)return Zt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Le(e){return e=e.childContextTypes,e!=null}function ho(){K(Ae),K(Ee)}function Ac(e,t,r){if(Ee.current!==Zt)throw Error(D(168));q(Ee,t),q(Ae,r)}function wp(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(D(108,Bm(e)||"Unknown",i));return ee({},r,n)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zt,gr=Ee.current,q(Ee,e),q(Ae,Ae.current),!0}function Lc(e,t,r){var n=e.stateNode;if(!n)throw Error(D(169));r?(e=wp(e,t,gr),n.__reactInternalMemoizedMergedChildContext=e,K(Ae),K(Ee),q(Ee,e)):K(Ae),q(Ae,r)}var Ct=null,Xo=!1,Jl=!1;function Sp(e){Ct===null?Ct=[e]:Ct.push(e)}function Jh(e){Xo=!0,Sp(e)}function rr(){if(!Jl&&Ct!==null){Jl=!0;var e=0,t=H;try{var r=Ct;for(H=1;e>=l,i-=l,bt=1<<32-ct(t)+i|r<N?(T=P,P=null):T=P.sibling;var k=c(g,P,h[N],S);if(k===null){P===null&&(P=T);break}e&&P&&k.alternate===null&&t(g,P),v=o(k,v,N),C===null?x=k:C.sibling=k,C=k,P=T}if(N===h.length)return r(g,P),X&&ar(g,N),x;if(P===null){for(;NN?(T=P,P=null):T=P.sibling;var F=c(g,P,k.value,S);if(F===null){P===null&&(P=T);break}e&&P&&F.alternate===null&&t(g,P),v=o(F,v,N),C===null?x=F:C.sibling=F,C=F,P=T}if(k.done)return r(g,P),X&&ar(g,N),x;if(P===null){for(;!k.done;N++,k=h.next())k=d(g,k.value,S),k!==null&&(v=o(k,v,N),C===null?x=k:C.sibling=k,C=k);return X&&ar(g,N),x}for(P=n(g,P);!k.done;N++,k=h.next())k=p(P,g,N,k.value,S),k!==null&&(e&&k.alternate!==null&&P.delete(k.key===null?N:k.key),v=o(k,v,N),C===null?x=k:C.sibling=k,C=k);return e&&P.forEach(function(le){return t(g,le)}),X&&ar(g,N),x}function w(g,v,h,S){if(typeof h=="object"&&h!==null&&h.type===Ir&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ni:e:{for(var x=h.key,C=v;C!==null;){if(C.key===x){if(x=h.type,x===Ir){if(C.tag===7){r(g,C.sibling),v=i(C,h.props.children),v.return=g,g=v;break e}}else if(C.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===At&&Fc(x)===C.type){r(g,C.sibling),v=i(C,h.props),v.ref=mn(g,C,h),v.return=g,g=v;break e}r(g,C);break}else t(g,C);C=C.sibling}h.type===Ir?(v=vr(h.props.children,g.mode,S,h.key),v.return=g,g=v):(S=oo(h.type,h.key,h.props,null,g.mode,S),S.ref=mn(g,v,h),S.return=g,g=S)}return l(g);case Pr:e:{for(C=h.key;v!==null;){if(v.key===C)if(v.tag===4&&v.stateNode.containerInfo===h.containerInfo&&v.stateNode.implementation===h.implementation){r(g,v.sibling),v=i(v,h.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=aa(h,g.mode,S),v.return=g,g=v}return l(g);case At:return C=h._init,w(g,v,C(h._payload),S)}if(Cn(h))return m(g,v,h,S);if(dn(h))return y(g,v,h,S);zi(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,v!==null&&v.tag===6?(r(g,v.sibling),v=i(v,h),v.return=g,g=v):(r(g,v),v=la(h,g.mode,S),v.return=g,g=v),l(g)):r(g,v)}return w}var Qr=bp(!0),Dp=bp(!1),xo=tr(null),Eo=null,Mr=null,Ku=null;function Yu(){Ku=Mr=Eo=null}function Xu(e){var t=xo.current;K(xo),e._currentValue=t}function Xa(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function _r(e,t){Eo=e,Ku=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(Ku!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(Eo===null)throw Error(D(308));Mr=e,Eo.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var dr=null;function Zu(e){dr===null?dr=[e]:dr.push(e)}function Pp(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Zu(t)):(r.next=i.next,i.next=r),t.interleaved=r,Ot(e,n)}function Ot(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Lt=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ip(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ht(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,U&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Ot(e,r)}return i=n.interleaved,i===null?(t.next=t,Zu(n)):(t.next=i.next,i.next=t),n.interleaved=t,Ot(e,r)}function Ji(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ju(e,r)}}function jc(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var l={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=l:o=o.next=l,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Co(e,t,r,n){var i=e.updateQueue;Lt=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,s=u.next;u.next=null,l===null?o=s:l.next=s,l=u;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==l&&(a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;l=0,f=s=u=null,a=o;do{var c=a.lane,p=a.eventTime;if((n&c)===c){f!==null&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(c=t,p=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,c);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,c=typeof m=="function"?m.call(p,d,c):m,c==null)break e;d=ee({},d,c);break e;case 2:Lt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,c=i.effects,c===null?i.effects=[a]:c.push(a))}else p={eventTime:p,lane:c,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(s=f=p,u=d):f=f.next=p,l|=c;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;c=a,a=c.next,c.next=null,i.lastBaseUpdate=c,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);yr|=l,e.lanes=l,e.memoizedState=d}}function zc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=ta.transition;ta.transition={};try{e(!1),t()}finally{H=r,ta.transition=n}}function Hp(){return it().memoizedState}function ny(e,t,r){var n=Gt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Vp(e))Gp(t,r);else if(r=Pp(e,t,r,n),r!==null){var i=De();dt(r,e,n,i),qp(r,t,n)}}function iy(e,t,r){var n=Gt(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Vp(e))Gp(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,a=o(l,r);if(i.hasEagerState=!0,i.eagerState=a,ft(a,l)){var u=t.interleaved;u===null?(i.next=i,Zu(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=Pp(e,t,i,n),r!==null&&(i=De(),dt(r,e,n,i),qp(r,t,n))}}function Vp(e){var t=e.alternate;return e===J||t!==null&&t===J}function Gp(e,t){kn=Do=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function qp(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ju(e,r)}}var Po={readContext:nt,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},oy={readContext:nt,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Uc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,to(4194308,4,zp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return to(4194308,4,e,t)},useInsertionEffect:function(e,t){return to(4,2,e,t)},useMemo:function(e,t){var r=ht();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ht();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ny.bind(null,J,e),[n.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:$c,useDebugValue:as,useDeferredValue:function(e){return ht().memoizedState=e},useTransition:function(){var e=$c(!1),t=e[0];return e=ry.bind(null,e[1]),ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=J,i=ht();if(X){if(r===void 0)throw Error(D(407));r=r()}else{if(r=t(),se===null)throw Error(D(349));hr&30||kp(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,Uc(Ap.bind(null,n,o,e),[e]),n.flags|=2048,Zn(9,Tp.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=ht(),t=se.identifierPrefix;if(X){var r=Dt,n=bt;r=(n&~(1<<32-ct(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Yn++,0")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=a);break}}}finally{zl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?En(e):""}function Bm(e){switch(e.tag){case 5:return En(e.type);case 16:return En("Lazy");case 13:return En("Suspense");case 19:return En("SuspenseList");case 0:case 2:case 15:return e=$l(e.type,!1),e;case 11:return e=$l(e.type.render,!1),e;case 1:return e=$l(e.type,!0),e;default:return""}}function Ia(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ir:return"Fragment";case Pr:return"Portal";case ba:return"Profiler";case Lu:return"StrictMode";case Da:return"Suspense";case Pa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nf:return(e.displayName||"Context")+".Consumer";case If:return(e._context.displayName||"Context")+".Provider";case Mu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bu:return t=e.displayName||null,t!==null?t:Ia(e.type)||"Memo";case At:t=e._payload,e=e._init;try{return Ia(e(t))}catch{}}return null}function Fm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ia(t);case 8:return t===Lu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jm(e){var t=Rf(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ri(e){e._valueTracker||(e._valueTracker=jm(e))}function kf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Rf(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function uo(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}}function Na(e,t){var r=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function ac(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xt(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Tf(e,t){t=t.checked,t!=null&&Au(e,"checked",t,!1)}function Oa(e,t){Tf(e,t);var r=Xt(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ra(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ra(e,t.type,Xt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uc(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ra(e,t,r){(t!=="number"||uo(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Cn=Array.isArray;function jr(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zm=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){zm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function Bf(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function Ff(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Bf(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var $m=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Aa(e,t){if(t){if($m[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function La(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ma=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ba=null,zr=null,$r=null;function dc(e){if(e=fi(e)){if(typeof Ba!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Xo(t),Ba(e.stateNode,e.type,t))}}function jf(e){zr?$r?$r.push(e):$r=[e]:zr=e}function zf(){if(zr){var e=zr,t=$r;if($r=zr=null,dc(e),t)for(e=0;e>>=0,e===0?32:31-(Xm(e)/Zm|0)|0}var Ti=64,Ai=4194304;function bn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function po(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,l=r&268435455;if(l!==0){var a=l&~i;a!==0?n=bn(a):(o&=l,o!==0&&(n=bn(o)))}else l=r&~i,l!==0?n=bn(l):o!==0&&(n=bn(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function ci(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=r}function rh(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=On),Sc=" ",xc=!1;function op(e,t){switch(e){case"keyup":return Rh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nr=!1;function Th(e,t){switch(e){case"compositionend":return lp(t);case"keypress":return t.which!==32?null:(xc=!0,Sc);case"textInput":return e=t.data,e===Sc&&xc?null:e;default:return null}}function Ah(e,t){if(Nr)return e==="compositionend"||!Vu&&op(e,t)?(e=np(),Zi=_u=Ft=null,Nr=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Dc(r)}}function cp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dp(){for(var e=window,t=uo();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=uo(e.document)}return t}function Gu(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")}function _h(e){var t=dp(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&cp(r.ownerDocument.documentElement,r)){if(n!==null&&Gu(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=Pc(r,o);var l=Pc(r,n);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Or=null,_a=null,kn=null,Wa=!1;function Ic(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wa||Or==null||Or!==uo(n)||(n=Or,"selectionStart"in n&&Gu(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),kn&&Vn(kn,n)||(kn=n,n=mo(_a,"onSelect"),0Tr||(e.current=Ka[Tr],Ka[Tr]=null,Tr--)}function q(e,t){Tr++,Ka[Tr]=e.current,e.current=t}var Zt={},Ee=tr(Zt),Ae=tr(!1),gr=Zt;function Gr(e,t){var r=e.type.contextTypes;if(!r)return Zt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Le(e){return e=e.childContextTypes,e!=null}function yo(){K(Ae),K(Ee)}function Lc(e,t,r){if(Ee.current!==Zt)throw Error(D(168));q(Ee,t),q(Ae,r)}function Sp(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(D(108,Fm(e)||"Unknown",i));return ee({},r,n)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zt,gr=Ee.current,q(Ee,e),q(Ae,Ae.current),!0}function Mc(e,t,r){var n=e.stateNode;if(!n)throw Error(D(169));r?(e=Sp(e,t,gr),n.__reactInternalMemoizedMergedChildContext=e,K(Ae),K(Ee),q(Ee,e)):K(Ae),q(Ae,r)}var Ct=null,Zo=!1,ea=!1;function xp(e){Ct===null?Ct=[e]:Ct.push(e)}function ey(e){Zo=!0,xp(e)}function rr(){if(!ea&&Ct!==null){ea=!0;var e=0,t=H;try{var r=Ct;for(H=1;e>=l,i-=l,bt=1<<32-ct(t)+i|r<N?(T=P,P=null):T=P.sibling;var k=c(g,P,h[N],S);if(k===null){P===null&&(P=T);break}e&&P&&k.alternate===null&&t(g,P),v=o(k,v,N),C===null?x=k:C.sibling=k,C=k,P=T}if(N===h.length)return r(g,P),X&&ar(g,N),x;if(P===null){for(;NN?(T=P,P=null):T=P.sibling;var F=c(g,P,k.value,S);if(F===null){P===null&&(P=T);break}e&&P&&F.alternate===null&&t(g,P),v=o(F,v,N),C===null?x=F:C.sibling=F,C=F,P=T}if(k.done)return r(g,P),X&&ar(g,N),x;if(P===null){for(;!k.done;N++,k=h.next())k=d(g,k.value,S),k!==null&&(v=o(k,v,N),C===null?x=k:C.sibling=k,C=k);return X&&ar(g,N),x}for(P=n(g,P);!k.done;N++,k=h.next())k=p(P,g,N,k.value,S),k!==null&&(e&&k.alternate!==null&&P.delete(k.key===null?N:k.key),v=o(k,v,N),C===null?x=k:C.sibling=k,C=k);return e&&P.forEach(function(le){return t(g,le)}),X&&ar(g,N),x}function w(g,v,h,S){if(typeof h=="object"&&h!==null&&h.type===Ir&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Oi:e:{for(var x=h.key,C=v;C!==null;){if(C.key===x){if(x=h.type,x===Ir){if(C.tag===7){r(g,C.sibling),v=i(C,h.props.children),v.return=g,g=v;break e}}else if(C.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===At&&jc(x)===C.type){r(g,C.sibling),v=i(C,h.props),v.ref=mn(g,C,h),v.return=g,g=v;break e}r(g,C);break}else t(g,C);C=C.sibling}h.type===Ir?(v=vr(h.props.children,g.mode,S,h.key),v.return=g,g=v):(S=lo(h.type,h.key,h.props,null,g.mode,S),S.ref=mn(g,v,h),S.return=g,g=S)}return l(g);case Pr:e:{for(C=h.key;v!==null;){if(v.key===C)if(v.tag===4&&v.stateNode.containerInfo===h.containerInfo&&v.stateNode.implementation===h.implementation){r(g,v.sibling),v=i(v,h.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=ua(h,g.mode,S),v.return=g,g=v}return l(g);case At:return C=h._init,w(g,v,C(h._payload),S)}if(Cn(h))return m(g,v,h,S);if(dn(h))return y(g,v,h,S);$i(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,v!==null&&v.tag===6?(r(g,v.sibling),v=i(v,h),v.return=g,g=v):(r(g,v),v=aa(h,g.mode,S),v.return=g,g=v),l(g)):r(g,v)}return w}var Qr=Dp(!0),Pp=Dp(!1),Eo=tr(null),Co=null,Mr=null,Yu=null;function Xu(){Yu=Mr=Co=null}function Zu(e){var t=Eo.current;K(Eo),e._currentValue=t}function Za(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function _r(e,t){Co=e,Yu=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(Yu!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(Co===null)throw Error(D(308));Mr=e,Co.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var dr=null;function Ju(e){dr===null?dr=[e]:dr.push(e)}function Ip(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Ju(t)):(r.next=i.next,i.next=r),t.interleaved=r,Ot(e,n)}function Ot(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Lt=!1;function es(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Np(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ht(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,U&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Ot(e,r)}return i=n.interleaved,i===null?(t.next=t,Ju(n)):(t.next=i.next,i.next=t),n.interleaved=t,Ot(e,r)}function eo(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zu(e,r)}}function zc(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var l={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=l:o=o.next=l,r=r.next}while(r!==null);o===null?i=o=t:o=o.next=t}else i=o=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function bo(e,t,r,n){var i=e.updateQueue;Lt=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,s=u.next;u.next=null,l===null?o=s:l.next=s,l=u;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==l&&(a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;l=0,f=s=u=null,a=o;do{var c=a.lane,p=a.eventTime;if((n&c)===c){f!==null&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(c=t,p=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(p,d,c);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,c=typeof m=="function"?m.call(p,d,c):m,c==null)break e;d=ee({},d,c);break e;case 2:Lt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,c=i.effects,c===null?i.effects=[a]:c.push(a))}else p={eventTime:p,lane:c,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(s=f=p,u=d):f=f.next=p,l|=c;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;c=a,a=c.next,c.next=null,i.lastBaseUpdate=c,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);yr|=l,e.lanes=l,e.memoizedState=d}}function $c(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=ra.transition;ra.transition={};try{e(!1),t()}finally{H=r,ra.transition=n}}function Vp(){return it().memoizedState}function iy(e,t,r){var n=Gt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Gp(e))qp(t,r);else if(r=Ip(e,t,r,n),r!==null){var i=De();dt(r,e,n,i),Qp(r,t,n)}}function oy(e,t,r){var n=Gt(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Gp(e))qp(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,a=o(l,r);if(i.hasEagerState=!0,i.eagerState=a,ft(a,l)){var u=t.interleaved;u===null?(i.next=i,Ju(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=Ip(e,t,i,n),r!==null&&(i=De(),dt(r,e,n,i),Qp(r,t,n))}}function Gp(e){var t=e.alternate;return e===J||t!==null&&t===J}function qp(e,t){Tn=Po=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Qp(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zu(e,r)}}var Io={readContext:nt,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},ly={readContext:nt,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:_c,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ro(4194308,4,$p.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){return ro(4,2,e,t)},useMemo:function(e,t){var r=ht();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ht();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=iy.bind(null,J,e),[n.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:Uc,useDebugValue:us,useDeferredValue:function(e){return ht().memoizedState=e},useTransition:function(){var e=Uc(!1),t=e[0];return e=ny.bind(null,e[1]),ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=J,i=ht();if(X){if(r===void 0)throw Error(D(407));r=r()}else{if(r=t(),se===null)throw Error(D(349));hr&30||Tp(n,t,r)}i.memoizedState=r;var o={value:r,getSnapshot:t};return i.queue=o,_c(Lp.bind(null,n,o,e),[e]),n.flags|=2048,Jn(9,Ap.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=ht(),t=se.identifierPrefix;if(X){var r=Dt,n=bt;r=(n&~(1<<32-ct(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Xn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=l.createElement(r,{is:n.is}):(e=l.createElement(r),r==="select"&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,r),e[yt]=t,e[qn]=n,nv(e,t,!1,!1),t.stateNode=e;e:{switch(l=Aa(r,n),r){case"dialog":Q("cancel",e),Q("close",e),i=n;break;case"iframe":case"object":case"embed":Q("load",e),i=n;break;case"video":case"audio":for(i=0;iXr&&(t.flags|=128,n=!0,hn(o,!1),t.lanes=4194304)}else{if(!n)if(e=bo(l),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),hn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!X)return Se(t),null}else 2*re()-o.renderingStartTime>Xr&&r!==1073741824&&(t.flags|=128,n=!0,hn(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(r=o.last,r!==null?r.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=re(),t.sibling=null,r=Z.current,q(Z,n?r&1|2:r&1),t):(Se(t),null);case 22:case 23:return ps(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Fe&1073741824&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function py(e,t){switch(qu(t),t.tag){case 1:return Le(t.type)&&ho(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),K(Ae),K(Ee),rs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ts(t),null;case 13:if(K(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(Z),null;case 4:return Kr(),null;case 10:return Xu(t.type._context),null;case 22:case 23:return ps(),null;case 24:return null;default:return null}}var Ui=!1,xe=!1,vy=typeof WeakSet=="function"?WeakSet:Set,R=null;function Br(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){te(e,t,n)}else r.current=null}function lu(e,t,r){try{r()}catch(n){te(e,t,n)}}var Zc=!1;function gy(e,t){if(Wa=po,e=cp(),Vu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var l=0,a=-1,u=-1,s=0,f=0,d=e,c=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(a=l+i),d!==o||n!==0&&d.nodeType!==3||(u=l+n),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)c=d,d=p;for(;;){if(d===e)break t;if(c===r&&++s===i&&(a=l),c===o&&++f===n&&(u=l),(p=d.nextSibling)!==null)break;d=c,c=d.parentNode}d=p}r=a===-1||u===-1?null:{start:a,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Ha={focusedElem:e,selectionRange:r},po=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:lt(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return m=Zc,Zc=!1,m}function Tn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&lu(t,r,o)}i=i.next}while(i!==n)}}function el(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function au(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function lv(e){var t=e.alternate;t!==null&&(e.alternate=null,lv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[qn],delete t[qa],delete t[Xh],delete t[Zh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function av(e){return e.tag===5||e.tag===3||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||av(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.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 uu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=mo));else if(n!==4&&(e=e.child,e!==null))for(uu(e,t,r),e=e.sibling;e!==null;)uu(e,t,r),e=e.sibling}function su(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(su(e,t,r),e=e.sibling;e!==null;)su(e,t,r),e=e.sibling}var ve=null,at=!1;function Tt(e,t,r){for(r=r.child;r!==null;)uv(e,t,r),r=r.sibling}function uv(e,t,r){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Go,r)}catch{}switch(r.tag){case 5:xe||Br(r,t);case 6:var n=ve,i=at;ve=null,Tt(e,t,r),ve=n,at=i,ve!==null&&(at?(e=ve,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ve.removeChild(r.stateNode));break;case 18:ve!==null&&(at?(e=ve,r=r.stateNode,e.nodeType===8?Zl(e.parentNode,r):e.nodeType===1&&Zl(e,r),_n(e)):Zl(ve,r.stateNode));break;case 4:n=ve,i=at,ve=r.stateNode.containerInfo,at=!0,Tt(e,t,r),ve=n,at=i;break;case 0:case 11:case 14:case 15:if(!xe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&lu(r,t,l),i=i.next}while(i!==n)}Tt(e,t,r);break;case 1:if(!xe&&(Br(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){te(r,t,a)}Tt(e,t,r);break;case 21:Tt(e,t,r);break;case 22:r.mode&1?(xe=(n=xe)||r.memoizedState!==null,Tt(e,t,r),xe=n):Tt(e,t,r);break;default:Tt(e,t,r)}}function ed(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new vy),t.forEach(function(n){var i=by.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ot(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=l),n&=~o}if(n=i,n=re()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hy(n/1960))-n,10e?16:e,jt===null)var n=!1;else{if(e=jt,jt=null,Oo=0,U&6)throw Error(D(331));var i=U;for(U|=4,R=e.current;R!==null;){var o=R,l=o.child;if(R.flags&16){var a=o.deletions;if(a!==null){for(var u=0;ure()-ds?pr(e,0):cs|=r),Me(e,t)}function mv(e,t){t===0&&(e.mode&1?(t=Ti,Ti<<=1,!(Ti&130023424)&&(Ti=4194304)):t=1);var r=De();e=Ot(e,t),e!==null&&(si(e,t,r),Me(e,r))}function Cy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),mv(e,r)}function by(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(D(314))}n!==null&&n.delete(t),mv(e,r)}var hv;hv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)ke=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ke=!1,dy(e,t,r);ke=!!(e.flags&131072)}else ke=!1,X&&t.flags&1048576&&xp(t,So,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ro(e,t),e=t.pendingProps;var i=Gr(t,Ee.current);_r(t,r),i=is(null,t,n,e,i,r);var o=os();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(n)?(o=!0,yo(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ju(t),i.updater=Jo,t.stateNode=i,i._reactInternals=t,Ja(t,n,e,r),t=ru(null,t,n,!0,o,r)):(t.tag=0,X&&o&&Gu(t),be(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ro(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Py(n),e=lt(n,e),i){case 0:t=tu(null,t,n,e,r);break e;case 1:t=Kc(null,t,n,e,r);break e;case 11:t=qc(null,t,n,e,r);break e;case 14:t=Qc(null,t,n,lt(n.type,e),r);break e}throw Error(D(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),tu(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),Kc(e,t,n,i,r);case 3:e:{if(ev(t),e===null)throw Error(D(387));n=t.pendingProps,o=t.memoizedState,i=o.element,Ip(e,t),Co(t,n,null,r);var l=t.memoizedState;if(n=l.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Yr(Error(D(423)),t),t=Yc(e,t,n,r,i);break e}else if(n!==i){i=Yr(Error(D(424)),t),t=Yc(e,t,n,r,i);break e}else for(je=Wt(t.stateNode.containerInfo.firstChild),$e=t,X=!0,ut=null,r=Dp(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(qr(),n===i){t=Rt(e,t,r);break e}be(e,t,n,r)}t=t.child}return t;case 5:return Np(t),e===null&&Ya(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Va(n,i)?l=null:o!==null&&Va(n,o)&&(t.flags|=32),Jp(e,t),be(e,t,l,r),t.child;case 6:return e===null&&Ya(t),null;case 13:return tv(e,t,r);case 4:return es(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Qr(t,null,n,r):be(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),qc(e,t,n,i,r);case 7:return be(e,t,t.pendingProps,r),t.child;case 8:return be(e,t,t.pendingProps.children,r),t.child;case 12:return be(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,q(xo,n._currentValue),n._currentValue=l,o!==null)if(ft(o.value,l)){if(o.children===i.children&&!Ae.current){t=Rt(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var u=a.firstContext;u!==null;){if(u.context===n){if(o.tag===1){u=Pt(-1,r&-r),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),Xa(o.return,r,t),a.lanes|=r;break}u=u.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(D(341));l.lanes|=r,a=l.alternate,a!==null&&(a.lanes|=r),Xa(l,r,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}be(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,_r(t,r),i=nt(i),n=n(i),t.flags|=1,be(e,t,n,r),t.child;case 14:return n=t.type,i=lt(n,t.pendingProps),i=lt(n.type,i),Qc(e,t,n,i,r);case 15:return Xp(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),ro(e,t),t.tag=1,Le(n)?(e=!0,yo(t)):e=!1,_r(t,r),Qp(t,n,i),Ja(t,n,i,r),ru(null,t,n,!0,e,r);case 19:return rv(e,t,r);case 22:return Zp(e,t,r)}throw Error(D(156,t.tag))};function yv(e,t){return Vf(e,t)}function Dy(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,t,r,n){return new Dy(e,t,r,n)}function gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Py(e){if(typeof e=="function")return gs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lu)return 11;if(e===Mu)return 14}return 2}function qt(e,t){var r=e.alternate;return r===null?(r=Je(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function oo(e,t,r,n,i,o){var l=2;if(n=e,typeof e=="function")gs(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Ir:return vr(r.children,i,o,t);case Au:l=8,i|=8;break;case Ca:return e=Je(12,r,t,i|2),e.elementType=Ca,e.lanes=o,e;case ba:return e=Je(13,r,t,i),e.elementType=ba,e.lanes=o,e;case Da:return e=Je(19,r,t,i),e.elementType=Da,e.lanes=o,e;case Nf:return rl(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pf:l=10;break e;case If:l=9;break e;case Lu:l=11;break e;case Mu:l=14;break e;case At:l=16,n=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Je(l,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function vr(e,t,r,n){return e=Je(7,e,n,t),e.lanes=r,e}function rl(e,t,r,n){return e=Je(22,e,n,t),e.elementType=Nf,e.lanes=r,e.stateNode={isHidden:!1},e}function la(e,t,r){return e=Je(6,e,null,t),e.lanes=r,e}function aa(e,t,r){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Iy(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ul(0),this.expirationTimes=Ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ul(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ms(e,t,r,n,i,o,l,a,u){return e=new Iy(e,t,r,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Je(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ju(o),e}function Ny(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ev)}catch(e){console.error(e)}}Ev(),Ef.exports=He;var Ss=Ef.exports;const Ay=ai(Ss);var ud=Ss;xa.createRoot=ud.createRoot,xa.hydrateRoot=ud.hydrateRoot;const sd=()=>b.jsxs("svg",{width:"289.5",height:"36",viewBox:"0 0 580 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsxs("g",{"clip-path":"url(#clip0_6_641)",children:[b.jsx("path",{d:"M0.824922 1.07031L0.794922 70.0703H14.7949L14.8049 1.07031H0.824922Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M16.5947 36.8803L41.2547 1.07031H58.2447L33.1647 36.8803L61.2447 70.0703H42.9947L16.5947 36.8803Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M119.885 1.07031H105.765V70.0703H119.885V1.07031Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M173.185 1.07031V70.0703H186.775V26.8303L224.045 70.0703H234.825V1.07031H221.325V45.6803L183.445 1.07031H173.185Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M342.465 8.86C333.025 0.15 321.645 0 318.535 0C315.475 0 303.575 0.22 294.005 9.52C283.845 19.4 283.805 32.24 283.795 35.66C283.785 39.3 283.895 49.03 290.805 57.99C300.855 71.02 316.695 71.31 318.535 71.32C321.375 71.32 334.185 71 343.965 60.66C353.065 51.04 353.265 39.4 353.275 35.66C353.275 32.49 353.305 18.86 342.455 8.86H342.465ZM318.435 58.01C307.095 58.01 297.895 47.95 297.895 35.54C297.895 23.13 307.085 13.07 318.435 13.07C329.785 13.07 338.975 23.13 338.975 35.54C338.975 47.95 329.785 58.01 318.435 58.01Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M450.495 12.0802C444.975 5.46023 437.135 0.990234 427.955 0.990234C417.555 0.990234 405.295 1.07023 402.295 1.07023V69.9802C405.285 69.9802 417.555 70.0602 427.955 70.0602C445.525 70.0602 458.445 53.4102 459.065 36.8602C459.395 28.0102 456.185 18.9002 450.495 12.0802ZM440.085 49.9502C436.895 53.8702 432.705 56.6902 427.665 57.5602C424.025 58.1902 420.095 57.8302 416.405 57.8302C416.405 50.4002 416.405 42.9802 416.405 35.5502V13.2202C423.795 13.2202 430.525 12.7002 436.605 17.6002C440.275 20.5602 442.925 24.7102 444.165 29.2402C444.525 30.5402 444.765 31.8802 444.875 33.2302C445.395 39.3702 443.995 45.1402 440.085 49.9502Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M508.135 0.990234V70.0602H552.715V57.9302H522.035V40.4202H547.125V28.0702H521.995V13.3202H552.715V0.990234H508.135Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M574.835 66.0398H572.745L571.015 63.0698H569.845V66.0398H567.805V57.5498H571.765C572.845 57.5498 573.865 57.9298 574.425 58.9398C575.205 60.3698 574.665 62.3798 573.105 63.0298C573.725 64.1198 574.225 64.9498 574.845 66.0398H574.835ZM570.375 61.0798H570.845C571.335 61.0798 572.365 61.0798 572.365 60.2898C572.365 59.5598 571.335 59.5598 570.845 59.5598H570.375V61.0798Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M570.964 69.0002C574.913 69.0002 578.114 65.799 578.114 61.8502C578.114 57.9014 574.913 54.7002 570.964 54.7002C567.016 54.7002 563.814 57.9014 563.814 61.8502C563.814 65.799 567.016 69.0002 570.964 69.0002Z",stroke:"#FFF5D9","stroke-width":"2.2","stroke-miterlimit":"10"})]}),b.jsx("defs",{children:b.jsx("clipPath",{id:"clip0_6_641",children:b.jsx("rect",{width:"578.41",height:"71.32",fill:"white",transform:"translate(0.794922)"})})})]}),cd=()=>b.jsxs("svg",{className:"mt-2",width:"67.5",height:"48",viewBox:"0 0 122 81",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("g",{"clip-path":"url(#clip0_6_651)",children:b.jsx("path",{d:"M89.3665 8.06803L121.5 0.35155L66.5111 0.320312L63.7089 7.69502L0.5 5.7032L54.0253 32.9925L36.1529 80.3203L89.3665 8.06803Z",fill:"#FFF5D9"})}),b.jsx("defs",{children:b.jsx("clipPath",{id:"clip0_6_651",children:b.jsx("rect",{width:"121",height:"80",fill:"white",transform:"translate(0.5 0.320312)"})})})]});var Ly={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const dd=e=>{let t;const r=new Set,n=(f,d)=>{const c=typeof f=="function"?f(t):f;if(!Object.is(c,t)){const p=t;t=d??(typeof c!="object"||c===null)?c:Object.assign({},t,c),r.forEach(m=>m(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>s,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(Ly?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},s=t=e(n,i,u);return u},My=e=>e?dd(e):dd;var Cv={exports:{}},bv={},Dv={exports:{}},Pv={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function oa(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function tu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var sy=typeof WeakMap=="function"?WeakMap:Map;function Yp(e,t,r){r=Pt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Oo||(Oo=!0,du=n),tu(e,t)},r}function Xp(e,t,r){r=Pt(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){tu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){tu(e,t),typeof n!="function"&&(Vt===null?Vt=new Set([this]):Vt.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),r}function Vc(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new sy;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Cy.bind(null,e,t,r),t.then(e,e))}function Gc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qc(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Pt(-1,1),t.tag=2,Ht(r,t,1))),r.lanes|=1),e)}var cy=kt.ReactCurrentOwner,ke=!1;function be(e,t,r,n){t.child=e===null?Pp(t,null,r,n):Qr(t,e.child,r,n)}function Qc(e,t,r,n,i){r=r.render;var o=t.ref;return _r(t,i),n=os(e,t,r,n,o,i),r=ls(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rt(e,t,i)):(X&&r&&qu(t),t.flags|=1,be(e,t,n,i),t.child)}function Kc(e,t,r,n,i){if(e===null){var o=r.type;return typeof o=="function"&&!ms(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Zp(e,t,o,n,i)):(e=lo(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(r=r.compare,r=r!==null?r:Vn,r(l,n)&&e.ref===t.ref)return Rt(e,t,i)}return t.flags|=1,e=qt(o,n),e.ref=t.ref,e.return=t,t.child=e}function Zp(e,t,r,n,i){if(e!==null){var o=e.memoizedProps;if(Vn(o,n)&&e.ref===t.ref)if(ke=!1,t.pendingProps=n=o,(e.lanes&i)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,Rt(e,t,i)}return ru(e,t,r,n,i)}function Jp(e,t,r){var n=t.pendingProps,i=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},q(Fr,Fe),Fe|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,q(Fr,Fe),Fe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,q(Fr,Fe),Fe|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,q(Fr,Fe),Fe|=n;return be(e,t,i,r),t.child}function ev(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ru(e,t,r,n,i){var o=Le(r)?gr:Ee.current;return o=Gr(t,o),_r(t,i),r=os(e,t,r,n,o,i),n=ls(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rt(e,t,i)):(X&&n&&qu(t),t.flags|=1,be(e,t,r,i),t.child)}function Yc(e,t,r,n,i){if(Le(r)){var o=!0;wo(t)}else o=!1;if(_r(t,i),t.stateNode===null)no(e,t),Kp(t,r,n),eu(t,r,n,i),n=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var u=l.context,s=r.contextType;typeof s=="object"&&s!==null?s=nt(s):(s=Le(r)?gr:Ee.current,s=Gr(t,s));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==n||u!==s)&&Hc(t,l,n,s),Lt=!1;var c=t.memoizedState;l.state=c,bo(t,n,l,i),u=t.memoizedState,a!==n||c!==u||Ae.current||Lt?(typeof f=="function"&&(Ja(t,r,f,n),u=t.memoizedState),(a=Lt||Wc(t,r,a,n,c,u,s))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),l.props=n,l.state=u,l.context=s,n=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{l=t.stateNode,Np(e,t),a=t.memoizedProps,s=t.type===t.elementType?a:lt(t.type,a),l.props=s,d=t.pendingProps,c=l.context,u=r.contextType,typeof u=="object"&&u!==null?u=nt(u):(u=Le(r)?gr:Ee.current,u=Gr(t,u));var p=r.getDerivedStateFromProps;(f=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==d||c!==u)&&Hc(t,l,n,u),Lt=!1,c=t.memoizedState,l.state=c,bo(t,n,l,i);var m=t.memoizedState;a!==d||c!==m||Ae.current||Lt?(typeof p=="function"&&(Ja(t,r,p,n),m=t.memoizedState),(s=Lt||Wc(t,r,s,n,c,m,u)||!1)?(f||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(n,m,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(n,m,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),l.props=n,l.state=m,l.context=u,n=s):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),n=!1)}return nu(e,t,r,n,o,i)}function nu(e,t,r,n,i,o){ev(e,t);var l=(t.flags&128)!==0;if(!n&&!l)return i&&Mc(t,r,!1),Rt(e,t,o);n=t.stateNode,cy.current=t;var a=l&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&l?(t.child=Qr(t,e.child,null,o),t.child=Qr(t,null,a,o)):be(e,t,a,o),t.memoizedState=n.state,i&&Mc(t,r,!0),t.child}function tv(e){var t=e.stateNode;t.pendingContext?Lc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lc(e,t.context,!1),ts(e,t.containerInfo)}function Xc(e,t,r,n,i){return qr(),Ku(i),t.flags|=256,be(e,t,r,n),t.child}var iu={dehydrated:null,treeContext:null,retryLane:0};function ou(e){return{baseLanes:e,cachePool:null,transitions:null}}function rv(e,t,r){var n=t.pendingProps,i=Z.current,o=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),q(Z,i&1),e===null)return Xa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=n.children,e=n.fallback,o?(n=t.mode,o=t.child,l={mode:"hidden",children:l},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=nl(l,n,0,null),e=vr(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ou(r),t.memoizedState=iu,e):ss(t,l));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return dy(e,t,l,n,a,i,r);if(o){o=n.fallback,l=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:n.children};return!(l&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=qt(i,u),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=qt(a,o):(o=vr(o,l,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,l=e.child.memoizedState,l=l===null?ou(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~r,t.memoizedState=iu,n}return o=e.child,e=o.sibling,n=qt(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function ss(e,t){return t=nl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ui(e,t,r,n){return n!==null&&Ku(n),Qr(t,e.child,null,r),e=ss(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dy(e,t,r,n,i,o,l){if(r)return t.flags&256?(t.flags&=-257,n=oa(Error(D(422))),Ui(e,t,l,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,i=t.mode,n=nl({mode:"visible",children:n.children},i,0,null),o=vr(o,i,l,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Qr(t,e.child,null,l),t.child.memoizedState=ou(l),t.memoizedState=iu,o);if(!(t.mode&1))return Ui(e,t,l,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(D(419)),n=oa(o,n,void 0),Ui(e,t,l,n)}if(a=(l&e.childLanes)!==0,ke||a){if(n=se,n!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ot(e,i),dt(n,e,i,-1))}return gs(),n=oa(Error(D(421))),Ui(e,t,l,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=by.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,je=Wt(i.nextSibling),$e=t,X=!0,ut=null,e!==null&&(Xe[Ze++]=bt,Xe[Ze++]=Dt,Xe[Ze++]=mr,bt=e.id,Dt=e.overflow,mr=t),t=ss(t,n.children),t.flags|=4096,t)}function Zc(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Za(e.return,t,r)}function la(e,t,r,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function nv(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(be(e,t,n.children,r),n=Z.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zc(e,r,t);else if(e.tag===19)Zc(e,r,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}n&=1}if(q(Z,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Do(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),la(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Do(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}la(t,!0,r,null,o);break;case"together":la(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function no(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),yr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,r=qt(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=qt(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function fy(e,t,r){switch(t.tag){case 3:tv(t),qr();break;case 5:Op(t);break;case 1:Le(t.type)&&wo(t);break;case 4:ts(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;q(Eo,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(q(Z,Z.current&1),t.flags|=128,null):r&t.child.childLanes?rv(e,t,r):(q(Z,Z.current&1),e=Rt(e,t,r),e!==null?e.sibling:null);q(Z,Z.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return nv(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),q(Z,Z.current),n)break;return null;case 22:case 23:return t.lanes=0,Jp(e,t,r)}return Rt(e,t,r)}var iv,lu,ov,lv;iv=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};lu=function(){};ov=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,fr(St.current);var o=null;switch(r){case"input":i=Na(e,i),n=Na(e,n),o=[];break;case"select":i=ee({},i,{value:void 0}),n=ee({},n,{value:void 0}),o=[];break;case"textarea":i=ka(e,i),n=ka(e,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ho)}Aa(r,n);var l;r=null;for(s in i)if(!n.hasOwnProperty(s)&&i.hasOwnProperty(s)&&i[s]!=null)if(s==="style"){var a=i[s];for(l in a)a.hasOwnProperty(l)&&(r||(r={}),r[l]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(jn.hasOwnProperty(s)?o||(o=[]):(o=o||[]).push(s,null));for(s in n){var u=n[s];if(a=i!=null?i[s]:void 0,n.hasOwnProperty(s)&&u!==a&&(u!=null||a!=null))if(s==="style")if(a){for(l in a)!a.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(r||(r={}),r[l]="");for(l in u)u.hasOwnProperty(l)&&a[l]!==u[l]&&(r||(r={}),r[l]=u[l])}else r||(o||(o=[]),o.push(s,r)),r=u;else s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(s,u)):s==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(s,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(jn.hasOwnProperty(s)?(u!=null&&s==="onScroll"&&Q("scroll",e),o||a===u||(o=[])):(o=o||[]).push(s,u))}r&&(o=o||[]).push("style",r);var s=o;(t.updateQueue=s)&&(t.flags|=4)}};lv=function(e,t,r,n){r!==n&&(t.flags|=4)};function hn(e,t){if(!X)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Se(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function py(e,t,r){var n=t.pendingProps;switch(Qu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(t),null;case 1:return Le(t.type)&&yo(),Se(t),null;case 3:return n=t.stateNode,Kr(),K(Ae),K(Ee),ns(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ut!==null&&(vu(ut),ut=null))),lu(e,t),Se(t),null;case 5:rs(t);var i=fr(Yn.current);if(r=t.type,e!==null&&t.stateNode!=null)ov(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(D(166));return Se(t),null}if(e=fr(St.current),zi(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[yt]=t,n[Qn]=o,e=(t.mode&1)!==0,r){case"dialog":Q("cancel",n),Q("close",n);break;case"iframe":case"object":case"embed":Q("load",n);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=l.createElement(r,{is:n.is}):(e=l.createElement(r),r==="select"&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,r),e[yt]=t,e[Qn]=n,iv(e,t,!1,!1),t.stateNode=e;e:{switch(l=La(r,n),r){case"dialog":Q("cancel",e),Q("close",e),i=n;break;case"iframe":case"object":case"embed":Q("load",e),i=n;break;case"video":case"audio":for(i=0;iXr&&(t.flags|=128,n=!0,hn(o,!1),t.lanes=4194304)}else{if(!n)if(e=Do(l),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),hn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!X)return Se(t),null}else 2*re()-o.renderingStartTime>Xr&&r!==1073741824&&(t.flags|=128,n=!0,hn(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(r=o.last,r!==null?r.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=re(),t.sibling=null,r=Z.current,q(Z,n?r&1|2:r&1),t):(Se(t),null);case 22:case 23:return vs(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Fe&1073741824&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function vy(e,t){switch(Qu(t),t.tag){case 1:return Le(t.type)&&yo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),K(Ae),K(Ee),ns(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rs(t),null;case 13:if(K(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(Z),null;case 4:return Kr(),null;case 10:return Zu(t.type._context),null;case 22:case 23:return vs(),null;case 24:return null;default:return null}}var _i=!1,xe=!1,gy=typeof WeakSet=="function"?WeakSet:Set,R=null;function Br(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){te(e,t,n)}else r.current=null}function au(e,t,r){try{r()}catch(n){te(e,t,n)}}var Jc=!1;function my(e,t){if(Ha=vo,e=dp(),Gu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var l=0,a=-1,u=-1,s=0,f=0,d=e,c=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(a=l+i),d!==o||n!==0&&d.nodeType!==3||(u=l+n),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)c=d,d=p;for(;;){if(d===e)break t;if(c===r&&++s===i&&(a=l),c===o&&++f===n&&(u=l),(p=d.nextSibling)!==null)break;d=c,c=d.parentNode}d=p}r=a===-1||u===-1?null:{start:a,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Va={focusedElem:e,selectionRange:r},vo=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,w=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:lt(t.type,y),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return m=Jc,Jc=!1,m}function An(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&au(t,r,o)}i=i.next}while(i!==n)}}function tl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function uu(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function av(e){var t=e.alternate;t!==null&&(e.alternate=null,av(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[Qn],delete t[Qa],delete t[Zh],delete t[Jh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uv(e){return e.tag===5||e.tag===3||e.tag===4}function ed(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uv(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.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 su(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ho));else if(n!==4&&(e=e.child,e!==null))for(su(e,t,r),e=e.sibling;e!==null;)su(e,t,r),e=e.sibling}function cu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(cu(e,t,r),e=e.sibling;e!==null;)cu(e,t,r),e=e.sibling}var ve=null,at=!1;function Tt(e,t,r){for(r=r.child;r!==null;)sv(e,t,r),r=r.sibling}function sv(e,t,r){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(qo,r)}catch{}switch(r.tag){case 5:xe||Br(r,t);case 6:var n=ve,i=at;ve=null,Tt(e,t,r),ve=n,at=i,ve!==null&&(at?(e=ve,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ve.removeChild(r.stateNode));break;case 18:ve!==null&&(at?(e=ve,r=r.stateNode,e.nodeType===8?Jl(e.parentNode,r):e.nodeType===1&&Jl(e,r),Wn(e)):Jl(ve,r.stateNode));break;case 4:n=ve,i=at,ve=r.stateNode.containerInfo,at=!0,Tt(e,t,r),ve=n,at=i;break;case 0:case 11:case 14:case 15:if(!xe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&au(r,t,l),i=i.next}while(i!==n)}Tt(e,t,r);break;case 1:if(!xe&&(Br(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){te(r,t,a)}Tt(e,t,r);break;case 21:Tt(e,t,r);break;case 22:r.mode&1?(xe=(n=xe)||r.memoizedState!==null,Tt(e,t,r),xe=n):Tt(e,t,r);break;default:Tt(e,t,r)}}function td(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new gy),t.forEach(function(n){var i=Dy.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ot(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=l),n&=~o}if(n=i,n=re()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*yy(n/1960))-n,10e?16:e,jt===null)var n=!1;else{if(e=jt,jt=null,Ro=0,U&6)throw Error(D(331));var i=U;for(U|=4,R=e.current;R!==null;){var o=R,l=o.child;if(R.flags&16){var a=o.deletions;if(a!==null){for(var u=0;ure()-fs?pr(e,0):ds|=r),Me(e,t)}function hv(e,t){t===0&&(e.mode&1?(t=Ai,Ai<<=1,!(Ai&130023424)&&(Ai=4194304)):t=1);var r=De();e=Ot(e,t),e!==null&&(ci(e,t,r),Me(e,r))}function by(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),hv(e,r)}function Dy(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(D(314))}n!==null&&n.delete(t),hv(e,r)}var yv;yv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)ke=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ke=!1,fy(e,t,r);ke=!!(e.flags&131072)}else ke=!1,X&&t.flags&1048576&&Ep(t,xo,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;no(e,t),e=t.pendingProps;var i=Gr(t,Ee.current);_r(t,r),i=os(null,t,n,e,i,r);var o=ls();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(n)?(o=!0,wo(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,es(t),i.updater=el,t.stateNode=i,i._reactInternals=t,eu(t,n,e,r),t=nu(null,t,n,!0,o,r)):(t.tag=0,X&&o&&qu(t),be(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(no(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Iy(n),e=lt(n,e),i){case 0:t=ru(null,t,n,e,r);break e;case 1:t=Yc(null,t,n,e,r);break e;case 11:t=Qc(null,t,n,e,r);break e;case 14:t=Kc(null,t,n,lt(n.type,e),r);break e}throw Error(D(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),ru(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),Yc(e,t,n,i,r);case 3:e:{if(tv(t),e===null)throw Error(D(387));n=t.pendingProps,o=t.memoizedState,i=o.element,Np(e,t),bo(t,n,null,r);var l=t.memoizedState;if(n=l.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Yr(Error(D(423)),t),t=Xc(e,t,n,r,i);break e}else if(n!==i){i=Yr(Error(D(424)),t),t=Xc(e,t,n,r,i);break e}else for(je=Wt(t.stateNode.containerInfo.firstChild),$e=t,X=!0,ut=null,r=Pp(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(qr(),n===i){t=Rt(e,t,r);break e}be(e,t,n,r)}t=t.child}return t;case 5:return Op(t),e===null&&Xa(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Ga(n,i)?l=null:o!==null&&Ga(n,o)&&(t.flags|=32),ev(e,t),be(e,t,l,r),t.child;case 6:return e===null&&Xa(t),null;case 13:return rv(e,t,r);case 4:return ts(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Qr(t,null,n,r):be(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),Qc(e,t,n,i,r);case 7:return be(e,t,t.pendingProps,r),t.child;case 8:return be(e,t,t.pendingProps.children,r),t.child;case 12:return be(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,q(Eo,n._currentValue),n._currentValue=l,o!==null)if(ft(o.value,l)){if(o.children===i.children&&!Ae.current){t=Rt(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var u=a.firstContext;u!==null;){if(u.context===n){if(o.tag===1){u=Pt(-1,r&-r),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),Za(o.return,r,t),a.lanes|=r;break}u=u.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(D(341));l.lanes|=r,a=l.alternate,a!==null&&(a.lanes|=r),Za(l,r,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}be(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,_r(t,r),i=nt(i),n=n(i),t.flags|=1,be(e,t,n,r),t.child;case 14:return n=t.type,i=lt(n,t.pendingProps),i=lt(n.type,i),Kc(e,t,n,i,r);case 15:return Zp(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:lt(n,i),no(e,t),t.tag=1,Le(n)?(e=!0,wo(t)):e=!1,_r(t,r),Kp(t,n,i),eu(t,n,i,r),nu(null,t,n,!0,e,r);case 19:return nv(e,t,r);case 22:return Jp(e,t,r)}throw Error(D(156,t.tag))};function wv(e,t){return Gf(e,t)}function Py(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,t,r,n){return new Py(e,t,r,n)}function ms(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Iy(e){if(typeof e=="function")return ms(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mu)return 11;if(e===Bu)return 14}return 2}function qt(e,t){var r=e.alternate;return r===null?(r=Je(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function lo(e,t,r,n,i,o){var l=2;if(n=e,typeof e=="function")ms(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Ir:return vr(r.children,i,o,t);case Lu:l=8,i|=8;break;case ba:return e=Je(12,r,t,i|2),e.elementType=ba,e.lanes=o,e;case Da:return e=Je(13,r,t,i),e.elementType=Da,e.lanes=o,e;case Pa:return e=Je(19,r,t,i),e.elementType=Pa,e.lanes=o,e;case Of:return nl(r,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case If:l=10;break e;case Nf:l=9;break e;case Mu:l=11;break e;case Bu:l=14;break e;case At:l=16,n=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Je(l,r,t,i),t.elementType=e,t.type=n,t.lanes=o,t}function vr(e,t,r,n){return e=Je(7,e,n,t),e.lanes=r,e}function nl(e,t,r,n){return e=Je(22,e,n,t),e.elementType=Of,e.lanes=r,e.stateNode={isHidden:!1},e}function aa(e,t,r){return e=Je(6,e,null,t),e.lanes=r,e}function ua(e,t,r){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ny(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_l(0),this.expirationTimes=_l(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_l(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hs(e,t,r,n,i,o,l,a,u){return e=new Ny(e,t,r,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Je(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},es(o),e}function Oy(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Cv)}catch(e){console.error(e)}}Cv(),Cf.exports=He;var xs=Cf.exports;const Ly=ui(xs);var sd=xs;Ea.createRoot=sd.createRoot,Ea.hydrateRoot=sd.hydrateRoot;const cd=()=>b.jsxs("svg",{width:"289.5",height:"36",viewBox:"0 0 580 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsxs("g",{"clip-path":"url(#clip0_6_641)",children:[b.jsx("path",{d:"M0.824922 1.07031L0.794922 70.0703H14.7949L14.8049 1.07031H0.824922Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M16.5947 36.8803L41.2547 1.07031H58.2447L33.1647 36.8803L61.2447 70.0703H42.9947L16.5947 36.8803Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M119.885 1.07031H105.765V70.0703H119.885V1.07031Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M173.185 1.07031V70.0703H186.775V26.8303L224.045 70.0703H234.825V1.07031H221.325V45.6803L183.445 1.07031H173.185Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M342.465 8.86C333.025 0.15 321.645 0 318.535 0C315.475 0 303.575 0.22 294.005 9.52C283.845 19.4 283.805 32.24 283.795 35.66C283.785 39.3 283.895 49.03 290.805 57.99C300.855 71.02 316.695 71.31 318.535 71.32C321.375 71.32 334.185 71 343.965 60.66C353.065 51.04 353.265 39.4 353.275 35.66C353.275 32.49 353.305 18.86 342.455 8.86H342.465ZM318.435 58.01C307.095 58.01 297.895 47.95 297.895 35.54C297.895 23.13 307.085 13.07 318.435 13.07C329.785 13.07 338.975 23.13 338.975 35.54C338.975 47.95 329.785 58.01 318.435 58.01Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M450.495 12.0802C444.975 5.46023 437.135 0.990234 427.955 0.990234C417.555 0.990234 405.295 1.07023 402.295 1.07023V69.9802C405.285 69.9802 417.555 70.0602 427.955 70.0602C445.525 70.0602 458.445 53.4102 459.065 36.8602C459.395 28.0102 456.185 18.9002 450.495 12.0802ZM440.085 49.9502C436.895 53.8702 432.705 56.6902 427.665 57.5602C424.025 58.1902 420.095 57.8302 416.405 57.8302C416.405 50.4002 416.405 42.9802 416.405 35.5502V13.2202C423.795 13.2202 430.525 12.7002 436.605 17.6002C440.275 20.5602 442.925 24.7102 444.165 29.2402C444.525 30.5402 444.765 31.8802 444.875 33.2302C445.395 39.3702 443.995 45.1402 440.085 49.9502Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M508.135 0.990234V70.0602H552.715V57.9302H522.035V40.4202H547.125V28.0702H521.995V13.3202H552.715V0.990234H508.135Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M574.835 66.0398H572.745L571.015 63.0698H569.845V66.0398H567.805V57.5498H571.765C572.845 57.5498 573.865 57.9298 574.425 58.9398C575.205 60.3698 574.665 62.3798 573.105 63.0298C573.725 64.1198 574.225 64.9498 574.845 66.0398H574.835ZM570.375 61.0798H570.845C571.335 61.0798 572.365 61.0798 572.365 60.2898C572.365 59.5598 571.335 59.5598 570.845 59.5598H570.375V61.0798Z",fill:"#FFF5D9"}),b.jsx("path",{d:"M570.964 69.0002C574.913 69.0002 578.114 65.799 578.114 61.8502C578.114 57.9014 574.913 54.7002 570.964 54.7002C567.016 54.7002 563.814 57.9014 563.814 61.8502C563.814 65.799 567.016 69.0002 570.964 69.0002Z",stroke:"#FFF5D9","stroke-width":"2.2","stroke-miterlimit":"10"})]}),b.jsx("defs",{children:b.jsx("clipPath",{id:"clip0_6_641",children:b.jsx("rect",{width:"578.41",height:"71.32",fill:"white",transform:"translate(0.794922)"})})})]}),dd=()=>b.jsxs("svg",{className:"mt-2",width:"67.5",height:"48",viewBox:"0 0 122 81",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("g",{"clip-path":"url(#clip0_6_651)",children:b.jsx("path",{d:"M89.3665 8.06803L121.5 0.35155L66.5111 0.320312L63.7089 7.69502L0.5 5.7032L54.0253 32.9925L36.1529 80.3203L89.3665 8.06803Z",fill:"#FFF5D9"})}),b.jsx("defs",{children:b.jsx("clipPath",{id:"clip0_6_651",children:b.jsx("rect",{width:"121",height:"80",fill:"white",transform:"translate(0.5 0.320312)"})})})]});var My={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fd=e=>{let t;const r=new Set,n=(f,d)=>{const c=typeof f=="function"?f(t):f;if(!Object.is(c,t)){const p=t;t=d??(typeof c!="object"||c===null)?c:Object.assign({},t,c),r.forEach(m=>m(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>s,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(My?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},s=t=e(n,i,u);return u},By=e=>e?fd(e):fd;var bv={exports:{}},Dv={},Pv={exports:{}},Iv={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,7 +45,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Zr=E;function By(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fy=typeof Object.is=="function"?Object.is:By,jy=Zr.useState,zy=Zr.useEffect,$y=Zr.useLayoutEffect,Uy=Zr.useDebugValue;function _y(e,t){var r=t(),n=jy({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return $y(function(){i.value=r,i.getSnapshot=t,ua(i)&&o({inst:i})},[e,r,t]),zy(function(){return ua(i)&&o({inst:i}),e(function(){ua(i)&&o({inst:i})})},[e]),Uy(r),r}function ua(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Fy(e,r)}catch{return!0}}function Wy(e,t){return t()}var Hy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Wy:_y;Pv.useSyncExternalStore=Zr.useSyncExternalStore!==void 0?Zr.useSyncExternalStore:Hy;Dv.exports=Pv;var Vy=Dv.exports;/** + */var Zr=E;function Fy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jy=typeof Object.is=="function"?Object.is:Fy,zy=Zr.useState,$y=Zr.useEffect,Uy=Zr.useLayoutEffect,_y=Zr.useDebugValue;function Wy(e,t){var r=t(),n=zy({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return Uy(function(){i.value=r,i.getSnapshot=t,sa(i)&&o({inst:i})},[e,r,t]),$y(function(){return sa(i)&&o({inst:i}),e(function(){sa(i)&&o({inst:i})})},[e]),_y(r),r}function sa(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jy(e,r)}catch{return!0}}function Hy(e,t){return t()}var Vy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hy:Wy;Iv.useSyncExternalStore=Zr.useSyncExternalStore!==void 0?Zr.useSyncExternalStore:Vy;Pv.exports=Iv;var Gy=Pv.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -53,31 +53,31 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var al=E,Gy=Vy;function qy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qy=typeof Object.is=="function"?Object.is:qy,Ky=Gy.useSyncExternalStore,Yy=al.useRef,Xy=al.useEffect,Zy=al.useMemo,Jy=al.useDebugValue;bv.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=Yy(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=Zy(function(){function u(p){if(!s){if(s=!0,f=p,p=n(p),i!==void 0&&l.hasValue){var m=l.value;if(i(m,p))return d=m}return d=p}if(m=d,Qy(f,p))return m;var y=n(p);return i!==void 0&&i(m,y)?m:(f=p,d=y)}var s=!1,f,d,c=r===void 0?null:r;return[function(){return u(t())},c===null?void 0:function(){return u(c())}]},[t,r,n,i]);var a=Ky(e,o[0],o[1]);return Xy(function(){l.hasValue=!0,l.value=a},[a]),Jy(a),a};Cv.exports=bv;var e0=Cv.exports;const t0=ai(e0);var Iv={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:r0}=z,{useSyncExternalStoreWithSelector:n0}=t0;let fd=!1;const i0=e=>e;function o0(e,t=i0,r){(Iv?"production":void 0)!=="production"&&r&&!fd&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),fd=!0);const n=n0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return r0(n),n}const l0=e=>{(Iv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?My(e):e,r=(n,i)=>o0(t,n,i);return Object.assign(r,t),r},Nv=e=>l0;var a0={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function xs(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var o;const l=u=>u===null?null:JSON.parse(u,void 0),a=(o=r.getItem(i))!=null?o:null;return a instanceof Promise?a.then(l):l(a)},setItem:(i,o)=>r.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>r.removeItem(i)}}const ei=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return ei(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return ei(n)(r)}}}},u0=(e,t)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,g)=>({...g,...w}),...t},l=!1;const a=new Set,u=new Set;let s;try{s=o.getStorage()}catch{}if(!s)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...w)},n,i);const f=ei(o.serialize),d=()=>{const w=o.partialize({...n()});let g;const v=f({state:w,version:o.version}).then(h=>s.setItem(o.name,h)).catch(h=>{g=h});if(g)throw g;return v},c=i.setState;i.setState=(w,g)=>{c(w,g),d()};const p=e((...w)=>{r(...w),d()},n,i);let m;const y=()=>{var w;if(!s)return;l=!1,a.forEach(v=>v(n()));const g=((w=o.onRehydrateStorage)==null?void 0:w.call(o,n()))||void 0;return ei(s.getItem.bind(s))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var h;return m=o.merge(v,(h=n())!=null?h:p),r(m,!0),d()}).then(()=>{g==null||g(m,void 0),l=!0,u.forEach(v=>v(m))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(s=w.getStorage())},clearStorage:()=>{s==null||s.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>l,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(u.add(w),()=>{u.delete(w)})},y(),m||p},s0=(e,t)=>(r,n,i)=>{let o={storage:xs(()=>localStorage),partialize:y=>y,version:0,merge:(y,w)=>({...w,...y}),...t},l=!1;const a=new Set,u=new Set;let s=o.storage;if(!s)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...y)},n,i);const f=()=>{const y=o.partialize({...n()});return s.setItem(o.name,{state:y,version:o.version})},d=i.setState;i.setState=(y,w)=>{d(y,w),f()};const c=e((...y)=>{r(...y),f()},n,i);i.getInitialState=()=>c;let p;const m=()=>{var y,w;if(!s)return;l=!1,a.forEach(v=>{var h;return v((h=n())!=null?h:c)});const g=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(y=n())!=null?y:c))||void 0;return ei(s.getItem.bind(s))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var h;return p=o.merge(v,(h=n())!=null?h:c),r(p,!0),f()}).then(()=>{g==null||g(p,void 0),p=n(),l=!0,u.forEach(v=>v(p))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:y=>{o={...o,...y},y.storage&&(s=y.storage)},clearStorage:()=>{s==null||s.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},o.skipHydration||m(),p||c},c0=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((a0?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),u0(e,t)):s0(e,t),Ov=c0,ln=Nv()(Ov((e,t)=>({get:t,set:e,apps:[],setApps:r=>e({apps:r}),showWidgetsSettings:!1,setShowWidgetsSettings:r=>e({showWidgetsSettings:r}),isHosted:!1,setIsHosted:r=>e({isHosted:r}),fetchHostedStatus:async r=>{let n=!1;try{n=(await fetch(`https://${r.replace(".os","")}.hosting.kinode.net/`)).status===200}catch{}finally{e({isHosted:n})}}}),{name:"homepage_store",storage:xs(()=>sessionStorage)}));var Rv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pd=z.createContext&&z.createContext(Rv),d0=["attr","size","title"];function f0(e,t){if(e==null)return{};var r=p0(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p0(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;tz.createElement(t.tag,Ao({key:r},t.attr),kv(t.child)))}function nr(e){return t=>z.createElement(h0,To({attr:Ao({},e.attr)},t),kv(e.child))}function h0(e){var t=r=>{var{attr:n,size:i,title:o}=e,l=f0(e,d0),a=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),z.createElement("svg",To({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,l,{className:u,style:Ao(Ao({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&z.createElement("title",null,o),e.children)};return pd!==void 0?z.createElement(pd.Consumer,null,r=>t(r)):t(Rv)}function y0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"},child:[]}]})(e)}function w0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"},child:[]}]})(e)}function S0(e){return nr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"},child:[]}]})(e)}function x0(e){return nr({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"},child:[]}]})(e)}function E0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"},child:[]}]})(e)}function C0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4h54.1l109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109V104c0-7.5-3.5-14.5-9.4-19L78.6 5zM19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L233.7 374.3c-7.8-20.9-9-43.6-3.6-65.1l-61.7-61.7L19.9 396.1zM512 144c0-10.5-1.1-20.7-3.2-30.5c-2.4-11.2-16.1-14.1-24.2-6l-63.9 63.9c-3 3-7.1 4.7-11.3 4.7H352c-8.8 0-16-7.2-16-16V102.6c0-4.2 1.7-8.3 4.7-11.3l63.9-63.9c8.1-8.1 5.2-21.8-6-24.2C388.7 1.1 378.5 0 368 0C288.5 0 224 64.5 224 144l0 .8 85.3 85.3c36-9.1 75.8 .5 104 28.7L429 274.5c49-23 83-72.8 83-130.5zM56 432a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"},child:[]}]})(e)}function b0(e){return nr({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(e)}function D0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8v-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5v3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20c0 0-.1-.1-.1-.1c0 0 0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5v3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2v-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z"},child:[]}]})(e)}var Tv={exports:{}};/*! + */var ul=E,qy=Gy;function Qy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ky=typeof Object.is=="function"?Object.is:Qy,Yy=qy.useSyncExternalStore,Xy=ul.useRef,Zy=ul.useEffect,Jy=ul.useMemo,e0=ul.useDebugValue;Dv.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=Xy(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=Jy(function(){function u(p){if(!s){if(s=!0,f=p,p=n(p),i!==void 0&&l.hasValue){var m=l.value;if(i(m,p))return d=m}return d=p}if(m=d,Ky(f,p))return m;var y=n(p);return i!==void 0&&i(m,y)?m:(f=p,d=y)}var s=!1,f,d,c=r===void 0?null:r;return[function(){return u(t())},c===null?void 0:function(){return u(c())}]},[t,r,n,i]);var a=Yy(e,o[0],o[1]);return Zy(function(){l.hasValue=!0,l.value=a},[a]),e0(a),a};bv.exports=Dv;var t0=bv.exports;const r0=ui(t0);var Nv={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:n0}=z,{useSyncExternalStoreWithSelector:i0}=r0;let pd=!1;const o0=e=>e;function l0(e,t=o0,r){(Nv?"production":void 0)!=="production"&&r&&!pd&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),pd=!0);const n=i0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return n0(n),n}const a0=e=>{(Nv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?By(e):e,r=(n,i)=>l0(t,n,i);return Object.assign(r,t),r},Ov=e=>a0;var u0={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};function Es(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var o;const l=u=>u===null?null:JSON.parse(u,void 0),a=(o=r.getItem(i))!=null?o:null;return a instanceof Promise?a.then(l):l(a)},setItem:(i,o)=>r.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>r.removeItem(i)}}const ti=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return ti(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return ti(n)(r)}}}},s0=(e,t)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,g)=>({...g,...w}),...t},l=!1;const a=new Set,u=new Set;let s;try{s=o.getStorage()}catch{}if(!s)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...w)},n,i);const f=ti(o.serialize),d=()=>{const w=o.partialize({...n()});let g;const v=f({state:w,version:o.version}).then(h=>s.setItem(o.name,h)).catch(h=>{g=h});if(g)throw g;return v},c=i.setState;i.setState=(w,g)=>{c(w,g),d()};const p=e((...w)=>{r(...w),d()},n,i);let m;const y=()=>{var w;if(!s)return;l=!1,a.forEach(v=>v(n()));const g=((w=o.onRehydrateStorage)==null?void 0:w.call(o,n()))||void 0;return ti(s.getItem.bind(s))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var h;return m=o.merge(v,(h=n())!=null?h:p),r(m,!0),d()}).then(()=>{g==null||g(m,void 0),l=!0,u.forEach(v=>v(m))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(s=w.getStorage())},clearStorage:()=>{s==null||s.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>l,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(u.add(w),()=>{u.delete(w)})},y(),m||p},c0=(e,t)=>(r,n,i)=>{let o={storage:Es(()=>localStorage),partialize:y=>y,version:0,merge:(y,w)=>({...w,...y}),...t},l=!1;const a=new Set,u=new Set;let s=o.storage;if(!s)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...y)},n,i);const f=()=>{const y=o.partialize({...n()});return s.setItem(o.name,{state:y,version:o.version})},d=i.setState;i.setState=(y,w)=>{d(y,w),f()};const c=e((...y)=>{r(...y),f()},n,i);i.getInitialState=()=>c;let p;const m=()=>{var y,w;if(!s)return;l=!1,a.forEach(v=>{var h;return v((h=n())!=null?h:c)});const g=((w=o.onRehydrateStorage)==null?void 0:w.call(o,(y=n())!=null?y:c))||void 0;return ti(s.getItem.bind(s))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var h;return p=o.merge(v,(h=n())!=null?h:c),r(p,!0),f()}).then(()=>{g==null||g(p,void 0),p=n(),l=!0,u.forEach(v=>v(p))}).catch(v=>{g==null||g(void 0,v)})};return i.persist={setOptions:y=>{o={...o,...y},y.storage&&(s=y.storage)},clearStorage:()=>{s==null||s.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},o.skipHydration||m(),p||c},d0=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((u0?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),s0(e,t)):c0(e,t),Rv=d0,ln=Ov()(Rv((e,t)=>({get:t,set:e,apps:[],setApps:r=>e({apps:r}),showWidgetsSettings:!1,setShowWidgetsSettings:r=>e({showWidgetsSettings:r}),isHosted:!1,setIsHosted:r=>e({isHosted:r}),fetchHostedStatus:async r=>{let n=!1;try{n=(await fetch(`https://${r.replace(".os","")}.hosting.kinode.net/`)).status===200}catch{}finally{e({isHosted:n})}}}),{name:"homepage_store",storage:Es(()=>sessionStorage)}));var kv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},vd=z.createContext&&z.createContext(kv),f0=["attr","size","title"];function p0(e,t){if(e==null)return{};var r=v0(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function v0(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;tz.createElement(t.tag,Lo({key:r},t.attr),Tv(t.child)))}function nr(e){return t=>z.createElement(y0,Ao({attr:Lo({},e.attr)},t),Tv(e.child))}function y0(e){var t=r=>{var{attr:n,size:i,title:o}=e,l=p0(e,f0),a=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),z.createElement("svg",Ao({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,l,{className:u,style:Lo(Lo({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&z.createElement("title",null,o),e.children)};return vd!==void 0?z.createElement(vd.Consumer,null,r=>t(r)):t(kv)}function w0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"},child:[]}]})(e)}function S0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"},child:[]}]})(e)}function x0(e){return nr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"},child:[]}]})(e)}function E0(e){return nr({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"},child:[]}]})(e)}function C0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"},child:[]}]})(e)}function b0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4h54.1l109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109V104c0-7.5-3.5-14.5-9.4-19L78.6 5zM19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L233.7 374.3c-7.8-20.9-9-43.6-3.6-65.1l-61.7-61.7L19.9 396.1zM512 144c0-10.5-1.1-20.7-3.2-30.5c-2.4-11.2-16.1-14.1-24.2-6l-63.9 63.9c-3 3-7.1 4.7-11.3 4.7H352c-8.8 0-16-7.2-16-16V102.6c0-4.2 1.7-8.3 4.7-11.3l63.9-63.9c8.1-8.1 5.2-21.8-6-24.2C388.7 1.1 378.5 0 368 0C288.5 0 224 64.5 224 144l0 .8 85.3 85.3c36-9.1 75.8 .5 104 28.7L429 274.5c49-23 83-72.8 83-130.5zM56 432a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"},child:[]}]})(e)}function D0(e){return nr({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(e)}function P0(e){return nr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8v-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5v3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20c0 0-.1-.1-.1-.1c0 0 0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5v3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2v-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z"},child:[]}]})(e)}var Av={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",l=0;l({get:t,set:e,widgetSettings:{},favoriteApps:{},setWidgetSettings:r=>e({widgetSettings:r}),setFavoriteApps:r=>e({favoriteApps:r}),toggleWidgetVisibility:r=>{var i;const{widgetSettings:n}=t();window.confirm("Really hide this widget?")&&e({widgetSettings:{...n,[r]:{...n[r],hide:!((i=n[r])!=null&&i.hide)}}})},setWidgetSize:(r,n)=>{const{widgetSettings:i}=t();e({widgetSettings:{...i,[r]:{...i[r],size:n}}})},favoriteApp:async r=>{var i;const{favoriteApps:n}=t();e({favoriteApps:{...n,[r]:{...n[r],favorite:!((i=n[r])!=null&&i.favorite)}}})}}),{name:"homepage_persistent_store",storage:xs(()=>localStorage)})),ir=()=>window.innerWidth<=600,I0=({text:e,className:t,size:r})=>{var l;const i=`/icons/${((l=e.split("").pop())==null?void 0:l.toUpperCase())||"0"}`;if(!i)return null;const o=ir();return b.jsx("img",{src:i,className:Te("m-0 align-self-center rounded-full",{"h-32 w-32":!o&&r==="large","h-18 w-18":!o&&r==="medium","h-12 w-12":o||r==="small"},t)})},vu=({app:e})=>{var l,a;const{favoriteApp:t,favoriteApps:r}=pi(),[n,i]=E.useState(!1),o=ir();return b.jsxs("a",{className:Te("flex-col-center gap-2 relative hover:opacity-90 transition-opacity",{"cursor-pointer":e.path,"cursor-not-allowed":!e.path}),id:e.package_name,href:e.path,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[e.base64_icon?b.jsx("img",{src:e.base64_icon,className:Te("rounded",{"h-8 w-8":o,"h-16 w-16":!o})}):b.jsx(I0,{text:((l=e.state)==null?void 0:l.our_version)||"0",size:"small",className:"h-16 w-16"}),b.jsx("h6",{children:e.label}),e.path&&n&&b.jsx("button",{className:"absolute p-2 -top-2 -right-2 clear text-sm",onClick:u=>{u.preventDefault(),t(e.package_name)},children:(a=r[e.package_name])!=null&&a.favorite?b.jsx(E0,{}):b.jsx(D0,{})})]})};function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gu(e,t)}function Av(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gu(e,t)}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(Lv)(e,t)}if(typeof e!="function")throw new Error(Oe(2));var i=e,o=t,l=[],a=l,u=!1;function s(){a===l&&(a=l.slice())}function f(){if(u)throw new Error(Oe(3));return o}function d(y){if(typeof y!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));var w=!0;return s(),a.push(y),function(){if(w){if(u)throw new Error(Oe(6));w=!1,s();var v=a.indexOf(y);a.splice(v,1),l=null}}}function c(y){if(!k0(y))throw new Error(Oe(7));if(typeof y.type>"u")throw new Error(Oe(8));if(u)throw new Error(Oe(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var w=l=a,g=0;g=0)continue;r[n]=e[n]}return r}var $v={exports:{}},V={};/** @license React v16.13.1 +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",l=0;l({get:t,set:e,widgetSettings:{},favoriteApps:{},setWidgetSettings:r=>e({widgetSettings:r}),setFavoriteApps:r=>e({favoriteApps:r}),toggleWidgetVisibility:r=>{var i;const{widgetSettings:n}=t();window.confirm("Really hide this widget?")&&e({widgetSettings:{...n,[r]:{...n[r],hide:!((i=n[r])!=null&&i.hide)}}})},setWidgetSize:(r,n)=>{const{widgetSettings:i}=t();e({widgetSettings:{...i,[r]:{...i[r],size:n}}})},favoriteApp:async r=>{var i;const{favoriteApps:n}=t();e({favoriteApps:{...n,[r]:{...n[r],favorite:!((i=n[r])!=null&&i.favorite)}}})}}),{name:"homepage_persistent_store",storage:Es(()=>localStorage)})),ir=()=>window.innerWidth<=600,N0=({text:e,className:t,size:r})=>{var l;const i=`/icons/${((l=e.split("").pop())==null?void 0:l.toUpperCase())||"0"}`;if(!i)return null;const o=ir();return b.jsx("img",{src:i,className:Te("m-0 align-self-center rounded-full",{"h-32 w-32":!o&&r==="large","h-18 w-18":!o&&r==="medium","h-12 w-12":o||r==="small"},t)})},gu=({app:e})=>{var l,a;const{favoriteApp:t,favoriteApps:r}=vi(),[n,i]=E.useState(!1),o=ir();return b.jsxs("a",{className:Te("flex-col-center gap-2 relative hover:opacity-90 transition-opacity",{"cursor-pointer":e==null?void 0:e.path,"cursor-not-allowed":!(e!=null&&e.path)}),id:e==null?void 0:e.package_name,href:e==null?void 0:e.path,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[e!=null&&e.base64_icon?b.jsx("img",{src:e.base64_icon,className:Te("rounded",{"h-8 w-8":o,"h-16 w-16":!o})}):b.jsx(N0,{text:((l=e==null?void 0:e.state)==null?void 0:l.our_version)||"0",size:"small",className:"h-16 w-16"}),b.jsx("h6",{children:e==null?void 0:e.label}),(e==null?void 0:e.path)&&n&&b.jsx("button",{className:"absolute p-2 -top-2 -right-2 clear text-sm",onClick:u=>{u.preventDefault(),t(e.package_name)},children:(a=r[e.package_name])!=null&&a.favorite?b.jsx(C0,{}):b.jsx(P0,{})})]})};function mu(e,t){return mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mu(e,t)}function Lv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mu(e,t)}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(Mv)(e,t)}if(typeof e!="function")throw new Error(Oe(2));var i=e,o=t,l=[],a=l,u=!1;function s(){a===l&&(a=l.slice())}function f(){if(u)throw new Error(Oe(3));return o}function d(y){if(typeof y!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));var w=!0;return s(),a.push(y),function(){if(w){if(u)throw new Error(Oe(6));w=!1,s();var v=a.indexOf(y);a.splice(v,1),l=null}}}function c(y){if(!T0(y))throw new Error(Oe(7));if(typeof y.type>"u")throw new Error(Oe(8));if(u)throw new Error(Oe(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var w=l=a,g=0;g=0)continue;r[n]=e[n]}return r}var Uv={exports:{}},V={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var fe=typeof Symbol=="function"&&Symbol.for,Es=fe?Symbol.for("react.element"):60103,Cs=fe?Symbol.for("react.portal"):60106,ul=fe?Symbol.for("react.fragment"):60107,sl=fe?Symbol.for("react.strict_mode"):60108,cl=fe?Symbol.for("react.profiler"):60114,dl=fe?Symbol.for("react.provider"):60109,fl=fe?Symbol.for("react.context"):60110,bs=fe?Symbol.for("react.async_mode"):60111,pl=fe?Symbol.for("react.concurrent_mode"):60111,vl=fe?Symbol.for("react.forward_ref"):60112,gl=fe?Symbol.for("react.suspense"):60113,j0=fe?Symbol.for("react.suspense_list"):60120,ml=fe?Symbol.for("react.memo"):60115,hl=fe?Symbol.for("react.lazy"):60116,z0=fe?Symbol.for("react.block"):60121,$0=fe?Symbol.for("react.fundamental"):60117,U0=fe?Symbol.for("react.responder"):60118,_0=fe?Symbol.for("react.scope"):60119;function Ge(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Es:switch(e=e.type,e){case bs:case pl:case ul:case cl:case sl:case gl:return e;default:switch(e=e&&e.$$typeof,e){case fl:case vl:case hl:case ml:case dl:return e;default:return t}}case Cs:return t}}}function Uv(e){return Ge(e)===pl}V.AsyncMode=bs;V.ConcurrentMode=pl;V.ContextConsumer=fl;V.ContextProvider=dl;V.Element=Es;V.ForwardRef=vl;V.Fragment=ul;V.Lazy=hl;V.Memo=ml;V.Portal=Cs;V.Profiler=cl;V.StrictMode=sl;V.Suspense=gl;V.isAsyncMode=function(e){return Uv(e)||Ge(e)===bs};V.isConcurrentMode=Uv;V.isContextConsumer=function(e){return Ge(e)===fl};V.isContextProvider=function(e){return Ge(e)===dl};V.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Es};V.isForwardRef=function(e){return Ge(e)===vl};V.isFragment=function(e){return Ge(e)===ul};V.isLazy=function(e){return Ge(e)===hl};V.isMemo=function(e){return Ge(e)===ml};V.isPortal=function(e){return Ge(e)===Cs};V.isProfiler=function(e){return Ge(e)===cl};V.isStrictMode=function(e){return Ge(e)===sl};V.isSuspense=function(e){return Ge(e)===gl};V.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ul||e===pl||e===cl||e===sl||e===gl||e===j0||typeof e=="object"&&e!==null&&(e.$$typeof===hl||e.$$typeof===ml||e.$$typeof===dl||e.$$typeof===fl||e.$$typeof===vl||e.$$typeof===$0||e.$$typeof===U0||e.$$typeof===_0||e.$$typeof===z0)};V.typeOf=Ge;$v.exports=V;var W0=$v.exports,Ds=W0,H0={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V0={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},G0={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_v={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ps={};Ps[Ds.ForwardRef]=G0;Ps[Ds.Memo]=_v;function Ed(e){return Ds.isMemo(e)?_v:Ps[e.$$typeof]||H0}var q0=Object.defineProperty,Q0=Object.getOwnPropertyNames,Cd=Object.getOwnPropertySymbols,K0=Object.getOwnPropertyDescriptor,Y0=Object.getPrototypeOf,bd=Object.prototype;function Wv(e,t,r){if(typeof t!="string"){if(bd){var n=Y0(t);n&&n!==bd&&Wv(e,n,r)}var i=Q0(t);Cd&&(i=i.concat(Cd(t)));for(var o=Ed(e),l=Ed(t),a=0;a=0;n--){var i=t[n](e);if(i)return i}return function(o,l){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+l.wrappedComponentName+".")}}function B1(e,t){return e===t}function F1(e){var t={},r=t.connectHOC,n=r===void 0?h1:r,i=t.mapStateToPropsFactories,o=i===void 0?D1:i,l=t.mapDispatchToPropsFactories,a=l===void 0?E1:l,u=t.mergePropsFactories,s=u===void 0?R1:u,f=t.selectorFactory,d=f===void 0?L1:f;return function(p,m,y,w){w===void 0&&(w={});var g=w,v=g.pure,h=v===void 0?!0:v,S=g.areStatesEqual,x=S===void 0?B1:S,C=g.areOwnPropsEqual,P=C===void 0?ca:C,N=g.areStatePropsEqual,T=N===void 0?ca:N,k=g.areMergedPropsEqual,F=k===void 0?ca:k,le=Lo(g,M1),ae=da(p,o,"mapStateToProps"),Y=da(m,a,"mapDispatchToProps"),Ne=da(y,s,"mergeProps");return n(d,L({methodName:"connect",getDisplayName:function(vt){return"Connect("+vt+")"},shouldHandleStateChanges:!!p,initMapStateToProps:ae,initMapDispatchToProps:Y,initMergeProps:Ne,pure:h,areStatesEqual:x,areOwnPropsEqual:P,areStatePropsEqual:T,areMergedPropsEqual:F},le))}}const Xv=F1();L0(Ss.unstable_batchedUpdates);function j1(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(a){n.callbacks=a},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=et(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(i){if(i instanceof Fo){this.setState({});return}throw i},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(z.Component),K1=` + */var wl=60103,Sl=60106,gi=60107,mi=60108,hi=60114,yi=60109,wi=60110,Si=60112,xi=60113,Ns=60120,Ei=60115,Ci=60116,Gv=60121,qv=60122,Qv=60117,Kv=60129,Yv=60131;if(typeof Symbol=="function"&&Symbol.for){var pe=Symbol.for;wl=pe("react.element"),Sl=pe("react.portal"),gi=pe("react.fragment"),mi=pe("react.strict_mode"),hi=pe("react.profiler"),yi=pe("react.provider"),wi=pe("react.context"),Si=pe("react.forward_ref"),xi=pe("react.suspense"),Ns=pe("react.suspense_list"),Ei=pe("react.memo"),Ci=pe("react.lazy"),Gv=pe("react.block"),qv=pe("react.server.block"),Qv=pe("react.fundamental"),Kv=pe("react.debug_trace_mode"),Yv=pe("react.legacy_hidden")}function pt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wl:switch(e=e.type,e){case gi:case hi:case mi:case xi:case Ns:return e;default:switch(e=e&&e.$$typeof,e){case wi:case Si:case Ci:case Ei:case yi:return e;default:return t}}case Sl:return t}}}var J0=yi,e1=wl,t1=Si,r1=gi,n1=Ci,i1=Ei,o1=Sl,l1=hi,a1=mi,u1=xi;G.ContextConsumer=wi;G.ContextProvider=J0;G.Element=e1;G.ForwardRef=t1;G.Fragment=r1;G.Lazy=n1;G.Memo=i1;G.Portal=o1;G.Profiler=l1;G.StrictMode=a1;G.Suspense=u1;G.isAsyncMode=function(){return!1};G.isConcurrentMode=function(){return!1};G.isContextConsumer=function(e){return pt(e)===wi};G.isContextProvider=function(e){return pt(e)===yi};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wl};G.isForwardRef=function(e){return pt(e)===Si};G.isFragment=function(e){return pt(e)===gi};G.isLazy=function(e){return pt(e)===Ci};G.isMemo=function(e){return pt(e)===Ei};G.isPortal=function(e){return pt(e)===Sl};G.isProfiler=function(e){return pt(e)===hi};G.isStrictMode=function(e){return pt(e)===mi};G.isSuspense=function(e){return pt(e)===xi};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gi||e===hi||e===Kv||e===mi||e===xi||e===Ns||e===Yv||typeof e=="object"&&e!==null&&(e.$$typeof===Ci||e.$$typeof===Ei||e.$$typeof===yi||e.$$typeof===wi||e.$$typeof===Si||e.$$typeof===Qv||e.$$typeof===Gv||e[0]===qv)};G.typeOf=pt;Vv.exports=G;var s1=Vv.exports,c1=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],d1=["reactReduxForwardedRef"],f1=[],p1=[null,null];function v1(e,t){var r=e[1];return[t.payload,r+1]}function Id(e,t,r){$v(function(){return e.apply(void 0,t)},r)}function g1(e,t,r,n,i,o,l){e.current=n,t.current=i,r.current=!1,o.current&&(o.current=null,l())}function m1(e,t,r,n,i,o,l,a,u,s){if(e){var f=!1,d=null,c=function(){if(!f){var y=t.getState(),w,g;try{w=n(y,i.current)}catch(v){g=v,d=v}g||(d=null),w===o.current?l.current||u():(o.current=w,a.current=w,l.current=!0,s({type:"STORE_UPDATED",payload:{error:g}}))}};r.onStateChange=c,r.trySubscribe(),c();var p=function(){if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d};return p}}var h1=function(){return[null,0]};function y1(e,t){t===void 0&&(t={});var r=t,n=r.getDisplayName,i=n===void 0?function(h){return"ConnectAdvanced("+h+")"}:n,o=r.methodName,l=o===void 0?"connectAdvanced":o,a=r.renderCountProp,u=a===void 0?void 0:a,s=r.shouldHandleStateChanges,f=s===void 0?!0:s,d=r.storeKey,c=d===void 0?"store":d;r.withRef;var p=r.forwardRef,m=p===void 0?!1:p,y=r.context,w=y===void 0?Fv:y,g=Mo(r,c1),v=w;return function(S){var x=S.displayName||S.name||"Component",C=i(x),P=L({},g,{getDisplayName:i,methodName:l,renderCountProp:u,shouldHandleStateChanges:f,storeKey:c,displayName:C,wrappedComponentName:x,WrappedComponent:S}),N=g.pure;function T(Y){return e(Y.dispatch,P)}var k=N?E.useMemo:function(Y){return Y()};function F(Y){var Ne=E.useMemo(function(){var cn=Y.reactReduxForwardedRef,Bl=Mo(Y,d1);return[Y.context,cn,Bl]},[Y]),ye=Ne[0],vt=Ne[1],O=Ne[2],B=E.useMemo(function(){return ye&&ye.Consumer&&s1.isContextConsumer(z.createElement(ye.Consumer,null))?ye:v},[ye,v]),M=E.useContext(B),W=!!Y.store&&!!Y.store.getState&&!!Y.store.dispatch;M&&M.store;var _=W?Y.store:M.store,gt=E.useMemo(function(){return T(_)},[_]),qe=E.useMemo(function(){if(!f)return p1;var cn=zv(_,W?null:M.subscription),Bl=cn.notifyNestedSubs.bind(cn);return[cn,Bl]},[_,W,M]),Qe=qe[0],Ke=qe[1],xt=E.useMemo(function(){return W?M:L({},M,{subscription:Qe})},[W,M,Qe]),Pi=E.useReducer(v1,f1,h1),kl=Pi[0],Cr=kl[0],Tl=Pi[1];if(Cr&&Cr.error)throw Cr.error;var Js=E.useRef(),Al=E.useRef(O),Ii=E.useRef(),ec=E.useRef(!1),Ll=k(function(){return Ii.current&&O===Al.current?Ii.current:gt(_.getState(),O)},[_,Cr,O]);Id(g1,[Al,Js,ec,O,Ll,Ii,Ke]),Id(m1,[f,_,Qe,gt,Al,Js,ec,Ii,Ke,Tl],[_,Qe,gt]);var Ml=E.useMemo(function(){return z.createElement(S,L({},Ll,{ref:vt}))},[vt,S,Ll]),lm=E.useMemo(function(){return f?z.createElement(B.Provider,{value:xt},Ml):Ml},[B,Ml,xt]);return lm}var le=N?z.memo(F):F;if(le.WrappedComponent=S,le.displayName=F.displayName=C,m){var ae=z.forwardRef(function(Ne,ye){return z.createElement(le,L({},Ne,{reactReduxForwardedRef:ye}))});return ae.displayName=C,ae.WrappedComponent=S,Pd(ae,S)}return Pd(le,S)}}function Nd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function da(e,t){if(Nd(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i=0;n--){var i=t[n](e);if(i)return i}return function(o,l){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+l.wrappedComponentName+".")}}function F1(e,t){return e===t}function j1(e){var t={},r=t.connectHOC,n=r===void 0?y1:r,i=t.mapStateToPropsFactories,o=i===void 0?P1:i,l=t.mapDispatchToPropsFactories,a=l===void 0?C1:l,u=t.mergePropsFactories,s=u===void 0?k1:u,f=t.selectorFactory,d=f===void 0?M1:f;return function(p,m,y,w){w===void 0&&(w={});var g=w,v=g.pure,h=v===void 0?!0:v,S=g.areStatesEqual,x=S===void 0?F1:S,C=g.areOwnPropsEqual,P=C===void 0?da:C,N=g.areStatePropsEqual,T=N===void 0?da:N,k=g.areMergedPropsEqual,F=k===void 0?da:k,le=Mo(g,B1),ae=fa(p,o,"mapStateToProps"),Y=fa(m,a,"mapDispatchToProps"),Ne=fa(y,s,"mergeProps");return n(d,L({methodName:"connect",getDisplayName:function(vt){return"Connect("+vt+")"},shouldHandleStateChanges:!!p,initMapStateToProps:ae,initMapDispatchToProps:Y,initMergeProps:Ne,pure:h,areStatesEqual:x,areOwnPropsEqual:P,areStatePropsEqual:T,areMergedPropsEqual:F},le))}}const Zv=j1();M0(xs.unstable_batchedUpdates);function z1(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(a){n.callbacks=a},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=et(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(i){if(i instanceof jo){this.setState({});return}throw i},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(z.Component),Y1=` Press space bar to start a drag. When dragging you can use the arrow keys to move the item around and escape to cancel. Some screen readers may require you to be in focus mode or to use your pass through key -`,jo=function(t){return t+1},Y1=function(t){return` - You have lifted an item in position `+jo(t.source.index)+` -`},rg=function(t,r){var n=t.droppableId===r.droppableId,i=jo(t.index),o=jo(r.index);return n?` +`,zo=function(t){return t+1},X1=function(t){return` + You have lifted an item in position `+zo(t.source.index)+` +`},ng=function(t,r){var n=t.droppableId===r.droppableId,i=zo(t.index),o=zo(r.index);return n?` You have moved the item from position `+i+` to position `+o+` `:` @@ -85,38 +85,38 @@ Error generating stack: `+o.message+` in list `+t.droppableId+` to list `+r.droppableId+` in position `+o+` - `},ng=function(t,r,n){var i=r.droppableId===n.droppableId;return i?` + `},ig=function(t,r,n){var i=r.droppableId===n.droppableId;return i?` The item `+t+` has been combined with `+n.draggableId:` The item `+t+` in list `+r.droppableId+` has been combined with `+n.draggableId+` in list `+n.droppableId+` - `},X1=function(t){var r=t.destination;if(r)return rg(t.source,r);var n=t.combine;return n?ng(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},kd=function(t){return` + `},Z1=function(t){var r=t.destination;if(r)return ng(t.source,r);var n=t.combine;return n?ig(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},Td=function(t){return` The item has returned to its starting position - of `+jo(t.index)+` -`},Z1=function(t){if(t.reason==="CANCEL")return` + of `+zo(t.index)+` +`},J1=function(t){if(t.reason==="CANCEL")return` Movement cancelled. - `+kd(t.source)+` + `+Td(t.source)+` `;var r=t.destination,n=t.combine;return r?` You have dropped the item. - `+rg(t.source,r)+` + `+ng(t.source,r)+` `:n?` You have dropped the item. - `+ng(t.draggableId,t.source,n)+` + `+ig(t.draggableId,t.source,n)+` `:` The item has been dropped while not over a drop area. - `+kd(t.source)+` - `},lo={dragHandleUsageInstructions:K1,onDragStart:Y1,onDragUpdate:X1,onDragEnd:Z1},de={x:0,y:0},ge=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},ze=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Kt=function(t,r){return t.x===r.x&&t.y===r.y},an=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Sr=function(t,r,n){var i;return n===void 0&&(n=0),i={},i[t]=r,i[t==="x"?"y":"x"]=n,i},ni=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},Td=function(t,r){return Math.min.apply(Math,r.map(function(n){return ni(t,n)}))},ig=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},J1=function(e,t){var r=st({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},Ci=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},Ad=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},ew={top:0,right:0,bottom:0,left:0},tw=function(t,r){return r?Ci(t,r.scroll.diff.displacement):t},rw=function(t,r,n){if(n&&n.increasedBy){var i;return L({},t,(i={},i[r.end]=t[r.end]+n.increasedBy[r.line],i))}return t},nw=function(t,r){return r&&r.shouldClipSubject?J1(r.pageMarginBox,t):st(t)},Jr=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,i=e.frame,o=tw(t.marginBox,i),l=rw(o,n,r),a=nw(l,i);return{page:t,withPlaceholder:r,active:a}},ks=function(e,t){e.frame||I();var r=e.frame,n=ze(t,r.scroll.initial),i=an(n),o=L({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:i},max:r.scroll.max}}),l=Jr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=L({},e,{frame:o,subject:l});return a};function zo(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Ts(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,s=n.lefte.right,f=u&&s;if(f)return!0;var d=u&&l||s&&o;return d}},aw=function(e){var t=rt(e.top,e.bottom),r=rt(e.left,e.right);return function(n){var i=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return i}},Ls={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},cg={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},uw=function(e){return function(t){var r=rt(t.top,t.bottom),n=rt(t.left,t.right);return function(i){return e===Ls?r(i.top)&&r(i.bottom):n(i.left)&&n(i.right)}}},sw=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:de;return Ci(t,n)},cw=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},dw=function(t,r,n){return n(r)(t)},Ms=function(t){var r=t.target,n=t.destination,i=t.viewport,o=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,a=o?sw(r,n):r;return cw(a,n,l)&&dw(a,i,l)},fw=function(t){return Ms(L({},t,{isVisibleThroughFrameFn:sg}))},dg=function(t){return Ms(L({},t,{isVisibleThroughFrameFn:aw}))},pw=function(t){return Ms(L({},t,{isVisibleThroughFrameFn:uw(t.destination.axis)}))},vw=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var i=r.invisible,o=r.visible;if(i[t])return!1;var l=o[t];return l?l.shouldAnimate:!0};function gw(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return st(Os(r,n))}function oi(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,l=e.last;return t.reduce(function(u,s){var f=gw(s,n),d=s.descriptor.id;u.all.push(d);var c=fw({target:f,destination:r,viewport:i,withDroppableDisplacement:!0});if(!c)return u.invisible[s.descriptor.id]=!0,u;var p=vw(d,l,o),m={draggableId:d,shouldAnimate:p};return u.visible[d]=m,u},{all:[],visible:{},invisible:{}})}function mw(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function Ld(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,i=e.destination,o=mw(t,{inHomeList:r});return{displaced:ii,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function $o(e){var t=e.draggable,r=e.insideDestination,n=e.destination,i=e.viewport,o=e.displacedBy,l=e.last,a=e.index,u=e.forceShouldAnimate,s=sn(t,n);if(a==null)return Ld({insideDestination:r,inHomeList:s,displacedBy:o,destination:n});var f=or(r,function(y){return y.descriptor.index===a});if(!f)return Ld({insideDestination:r,inHomeList:s,displacedBy:o,destination:n});var d=El(t,r),c=r.indexOf(f),p=d.slice(c),m=oi({afterDragging:p,destination:n,displacedBy:o,last:l,viewport:i.frame,forceShouldAnimate:u});return{displaced:m,displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function Jt(e,t){return!!t.effected[e]}var hw=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,i=e.combine,o=e.afterCritical;if(!r.isCombineEnabled)return null;var l=i.draggableId,a=n[l],u=a.descriptor.index,s=Jt(l,o);return s?t?u:u-1:t?u+1:u},yw=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,i=e.location;if(!n.length)return null;var o=i.index,l=t?o+1:o-1,a=n[0].descriptor.index,u=n[n.length-1].descriptor.index,s=r?u:u+1;return ls?null:l},ww=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,i=e.draggables,o=e.destination,l=e.insideDestination,a=e.previousImpact,u=e.viewport,s=e.afterCritical,f=a.at;if(f||I(),f.type==="REORDER"){var d=yw({isMovingForward:t,isInHomeList:r,location:f.destination,insideDestination:l});return d==null?null:$o({draggable:n,insideDestination:l,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:d})}var c=hw({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:f.combine,afterCritical:s});return c==null?null:$o({draggable:n,insideDestination:l,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:c})},Sw=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,i=e.displacedBy,o=!!(t.visible[n]||t.invisible[n]);return Jt(n,r)?o?de:an(i.point):o?i.point:de},xw=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,i=xl(r);i||I();var o=i.draggableId,l=n[o].page.borderBox.center,a=Sw({displaced:r.displaced,afterCritical:t,combineWith:o,displacedBy:r.displacedBy});return ge(l,a)},fg=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},Ew=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},Bs=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},Md=function(t){var r=t.axis,n=t.moveRelativeTo,i=t.isMoving;return Sr(r.line,n.marginBox[r.end]+fg(r,i),Bs(r,n.marginBox,i))},Bd=function(t){var r=t.axis,n=t.moveRelativeTo,i=t.isMoving;return Sr(r.line,n.marginBox[r.start]-Ew(r,i),Bs(r,n.marginBox,i))},Cw=function(t){var r=t.axis,n=t.moveInto,i=t.isMoving;return Sr(r.line,n.contentBox[r.start]+fg(r,i),Bs(r,n.contentBox,i))},bw=function(e){var t=e.impact,r=e.draggable,n=e.draggables,i=e.droppable,o=e.afterCritical,l=un(i.descriptor.id,n),a=r.page,u=i.axis;if(!l.length)return Cw({axis:u,moveInto:i.page,isMoving:a});var s=t.displaced,f=t.displacedBy,d=s.all[0];if(d){var c=n[d];if(Jt(d,o))return Bd({axis:u,moveRelativeTo:c.page,isMoving:a});var p=Mo(c.page,f.point);return Bd({axis:u,moveRelativeTo:p,isMoving:a})}var m=l[l.length-1];if(m.descriptor.id===r.descriptor.id)return a.borderBox.center;if(Jt(m.descriptor.id,o)){var y=Mo(m.page,an(o.displacedBy.point));return Md({axis:u,moveRelativeTo:y,isMoving:a})}return Md({axis:u,moveRelativeTo:m.page,isMoving:a})},mu=function(e,t){var r=e.frame;return r?ge(t,r.scroll.diff.displacement):t},Dw=function(t){var r=t.impact,n=t.draggable,i=t.droppable,o=t.draggables,l=t.afterCritical,a=n.page.borderBox.center,u=r.at;return!i||!u?a:u.type==="REORDER"?bw({impact:r,draggable:n,draggables:o,droppable:i,afterCritical:l}):xw({impact:r,draggables:o,afterCritical:l})},Cl=function(e){var t=Dw(e),r=e.droppable,n=r?mu(r,t):t;return n},pg=function(e,t){var r=ze(t,e.scroll.initial),n=an(r),i=st({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return o};function Fd(e,t){return e.map(function(r){return t[r]})}function Pw(e,t){for(var r=0;r1?f.sort(function(d,c){return Ce(d)[a.start]-Ce(c)[a.start]})[0]:s.sort(function(d,c){var p=Td(r,Ad(Ce(d))),m=Td(r,Ad(Ce(c)));return p!==m?p-m:Ce(d)[a.start]-Ce(c)[a.start]})[0]},jd=function(t,r){var n=t.page.borderBox.center;return Jt(t.descriptor.id,r)?ze(n,r.displacedBy.point):n},kw=function(t,r){var n=t.page.borderBox;return Jt(t.descriptor.id,r)?Ci(n,an(r.displacedBy.point)):n},Tw=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,i=e.insideDestination,o=e.afterCritical,l=i.filter(function(a){return dg({target:kw(a,o),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var s=ni(t,mu(n,jd(a,o))),f=ni(t,mu(n,jd(u,o)));return st.left&&e.topt.top}function $w(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,i=r.page.borderBox.center,o=n.map(function(l){var a=l.axis,u=Sr(l.axis.line,t.center[a.line],l.page.borderBox.center[a.crossAxisLine]);return{id:l.descriptor.id,distance:ni(i,u)}}).sort(function(l,a){return a.distance-l.distance});return o[0]?o[0].id:null}function Uw(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,i=Sl(n).filter(function(o){if(!o.isEnabled)return!1;var l=o.subject.active;if(!l||!zw(t,l))return!1;if(hg(l)(t.center))return!0;var a=o.axis,u=l.center[a.crossAxisLine],s=t[a.crossAxisStart],f=t[a.crossAxisEnd],d=rt(l[a.crossAxisStart],l[a.crossAxisEnd]),c=d(s),p=d(f);return!c&&!p?!0:c?su});return i.length?i.length===1?i[0].descriptor.id:$w({pageBorderBox:t,draggable:r,candidates:i}):null}var yg=function(t,r){return st(Ci(t,r))},_w=function(e,t){var r=e.frame;return r?yg(t,r.scroll.diff.value):t};function wg(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function Ww(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var Hw=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,i=e.insideDestination,o=e.last,l=e.viewport,a=e.afterCritical,u=n.axis,s=bi(n.axis,r.displaceBy),f=s.value,d=t[u.start],c=t[u.end],p=El(r,i),m=or(p,function(w){var g=w.descriptor.id,v=w.page.borderBox.center[u.line],h=Jt(g,a),S=wg({displaced:o,id:g});return h?S?c<=v:dg[a.start]+h&&dg[a.start]-s+h&&fg[a.start]+s+h&&dg[a.start]+h&&f=Ud)return Ng;var o=i/Ud,l=wu+xS*o,a=n==="CANCEL"?l*ES:l;return Number(a.toFixed(2))},bS=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,i=e.viewport,o=e.afterCritical,l=n.draggables,a=n.droppables,u=Ue(t),s=u?a[u]:null,f=a[r.descriptor.droppableId],d=Eg({impact:t,draggable:r,draggables:l,afterCritical:o,droppable:s||f,viewport:i}),c=ze(d,r.client.borderBox.center);return c},DS=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,i=e.home,o=e.viewport,l=e.onLiftImpact;if(!n.at||r!=="DROP"){var a=xg({draggables:t,impact:l,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var u=L({},n,{displaced:ii});return{impact:u,didDropInsideDroppable:!0}},PS=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(i){if(i.type!=="DROP"){n(i);return}var o=t(),l=i.payload.reason;if(o.phase==="COLLECTING"){r(yS({reason:l}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&I(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||I();var u=o.critical,s=o.dimensions,f=s.draggables[o.critical.draggable.id],d=DS({reason:l,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),c=d.impact,p=d.didDropInsideDroppable,m=p?As(c):null,y=p?xl(c):null,w={index:u.draggable.index,droppableId:u.droppable.id},g={draggableId:f.descriptor.id,type:f.descriptor.type,source:w,reason:l,mode:o.movementMode,destination:m,combine:y},v=bS({impact:c,draggable:f,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),h={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:c},S=!Kt(o.current.client.offset,v)||!!g.combine;if(!S){r($s({completed:h}));return}var x=CS({current:o.current.client.offset,destination:v,reason:l}),C={newHomeClientOffset:v,dropDuration:x,completed:h};r(hS(C))}}}},Og=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function IS(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function NS(e){var t=e.onWindowScroll;function r(){t(Og())}var n=ri(r),i=IS(n),o=Qt;function l(){return o!==Qt}function a(){l()&&I(),o=et(window,[i])}function u(){l()||I(),n.cancel(),o(),o=Qt}return{start:a,stop:u,isActive:l}}var OS=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},RS=function(e){var t=NS({onWindowScroll:function(n){e.dispatch(dS({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&OS(n)&&t.stop(),r(n)}}},kS=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),i=function(l){t||r||(t=!0,e(l),clearTimeout(n))};return i.wasCalled=function(){return t},i},TS=function(){var e=[],t=function(o){var l=Ts(e,function(s){return s.timerId===o});l===-1&&I();var a=e.splice(l,1),u=a[0];u.callback()},r=function(o){var l=setTimeout(function(){return t(l)}),a={timerId:l,callback:o};e.push(a)},n=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:r,flush:n}},AS=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},LS=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},MS=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,i=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&i},wn=function(t,r){r()},Hi=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},ga=function(t,r,n,i){if(!t){n(i(r));return}var o=kS(n),l={announce:o};t(r,l),o.wasCalled()||n(i(r))},BS=function(e,t){var r=TS(),n=null,i=function(c,p){n&&I(),wn("onBeforeCapture",function(){var m=e().onBeforeCapture;if(m){var y={draggableId:c,mode:p};m(y)}})},o=function(c,p){n&&I(),wn("onBeforeDragStart",function(){var m=e().onBeforeDragStart;m&&m(Hi(c,p))})},l=function(c,p){n&&I();var m=Hi(c,p);n={mode:p,lastCritical:c,lastLocation:m.source,lastCombine:null},r.add(function(){wn("onDragStart",function(){return ga(e().onDragStart,m,t,lo.onDragStart)})})},a=function(c,p){var m=As(p),y=xl(p);n||I();var w=!MS(c,n.lastCritical);w&&(n.lastCritical=c);var g=!AS(n.lastLocation,m);g&&(n.lastLocation=m);var v=!LS(n.lastCombine,y);if(v&&(n.lastCombine=y),!(!w&&!g&&!v)){var h=L({},Hi(c,n.mode),{combine:y,destination:m});r.add(function(){wn("onDragUpdate",function(){return ga(e().onDragUpdate,h,t,lo.onDragUpdate)})})}},u=function(){n||I(),r.flush()},s=function(c){n||I(),n=null,wn("onDragEnd",function(){return ga(e().onDragEnd,c,t,lo.onDragEnd)})},f=function(){if(n){var c=L({},Hi(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});s(c)}};return{beforeCapture:i,beforeStart:o,start:l,update:a,flush:u,drop:s,abort:f}},FS=function(e,t){var r=BS(e,t);return function(n){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var l=o.payload.critical;r.beforeStart(l,o.payload.movementMode),i(o),r.start(l,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var a=o.payload.completed.result;r.flush(),i(o),r.drop(a);return}if(i(o),o.type==="FLUSH"){r.abort();return}var u=n.getState();u.phase==="DRAGGING"&&r.update(u.critical,u.impact)}}}},jS=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&I(),e.dispatch($s({completed:n.completed}))}}},zS=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&n(),i(o),o.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(Ig())}};r=requestAnimationFrame(function(){r=null,t=et(window,[l])})}}}},$S=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},US=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var i=n.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},_S=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},WS=function(e){return function(t){return function(r){return function(n){if(_S(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var i=t.getState();i.phase!=="DRAGGING"&&I(),e.start(i);return}r(n),e.scroll(t.getState())}}}},HS=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(Pg({reason:n.reason})))}}}},VS=Mv,GS=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,i=e.getResponders,o=e.announce,l=e.autoScroller;return Lv(rS,VS(T0(SS(n),$S(t),wS(t),PS,jS,zS,HS,WS(l),RS,US(r),FS(i,o))))},ma=function(){return{additions:{},removals:{},modified:{}}};function qS(e){var t=e.registry,r=e.callbacks,n=ma(),i=null,o=function(){i||(r.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=n,d=f.additions,c=f.removals,p=f.modified,m=Object.keys(d).map(function(g){return t.draggable.getById(g).getDimension(de)}).sort(function(g,v){return g.descriptor.index-v.descriptor.index}),y=Object.keys(p).map(function(g){var v=t.droppable.getById(g),h=v.callbacks.getScrollWhileDragging();return{droppableId:g,scroll:h}}),w={additions:m,removals:Object.keys(c),modified:y};n=ma(),r.publish(w)}))},l=function(f){var d=f.descriptor.id;n.additions[d]=f,n.modified[f.descriptor.droppableId]=!0,n.removals[d]&&delete n.removals[d],o()},a=function(f){var d=f.descriptor;n.removals[d.id]=!0,n.modified[d.droppableId]=!0,n.additions[d.id]&&delete n.additions[d.id],o()},u=function(){i&&(cancelAnimationFrame(i),i=null,n=ma())};return{add:l,remove:a,stop:u}}var Rg=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,i=e.width,o=ze({x:r,y:t},{x:i,y:n}),l={x:Math.max(0,o.x),y:Math.max(0,o.y)};return l},kg=function(){var e=document.documentElement;return e||I(),e},Tg=function(){var e=kg(),t=Rg({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},QS=function(){var e=Og(),t=Tg(),r=e.y,n=e.x,i=kg(),o=i.clientWidth,l=i.clientHeight,a=n+o,u=r+l,s=st({top:r,left:n,right:a,bottom:u}),f={frame:s,scroll:{initial:e,current:e,max:t,diff:{value:de,displacement:de}}};return f},KS=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,i=QS(),o=i.scroll.current,l=t.droppable,a=n.droppable.getAllByType(l.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,r)}),u=n.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(o)}),s={draggables:ag(u),droppables:lg(a)},f={dimensions:s,critical:t,viewport:i};return f};function _d(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var YS=function(e,t){var r=null,n=qS({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(p,m){e.droppable.exists(p)||I(),r&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},o=function(p,m){r&&(e.droppable.exists(p)||I(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},l=function(p,m){r&&(e.droppable.exists(p)||I(),t.updateDroppableScroll({id:p,newScroll:m}))},a=function(p,m){r&&e.droppable.getById(p).callbacks.scroll(m)},u=function(){if(r){n.stop();var p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(m){return m.callbacks.dragStopped()}),r.unsubscribe(),r=null}},s=function(p){r||I();var m=r.critical.draggable;p.type==="ADDITION"&&_d(e,m,p.value)&&n.add(p.value),p.type==="REMOVAL"&&_d(e,m,p.value)&&n.remove(p.value)},f=function(p){r&&I();var m=e.draggable.getById(p.draggableId),y=e.droppable.getById(m.descriptor.droppableId),w={draggable:m.descriptor,droppable:y.descriptor},g=e.subscribe(s);return r={critical:w,unsubscribe:g},KS({critical:w,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:l,startPublishing:f,stopPublishing:u};return d},Ag=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},XS=function(e){window.scrollBy(e.x,e.y)},ZS=ce(function(e){return Sl(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),JS=function(t,r){var n=or(ZS(r),function(i){return i.frame||I(),hg(i.frame.pageMarginBox)(t)});return n},e2=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var i=n[r];return i.frame?i:null}var o=JS(t,n);return o},Yt={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},t2=function(e,t){var r=e[t.size]*Yt.startFromPercentage,n=e[t.size]*Yt.maxScrollAtPercentage,i={startScrollingFrom:r,maxScrollValueAt:n};return i},Lg=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,i=r-t;if(i===0)return 0;var o=n-t,l=o/i;return l},Ws=1,r2=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Yt.maxPixelScroll;if(e===t.startScrollingFrom)return Ws;var r=Lg({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,i=Yt.maxPixelScroll*Yt.ease(n);return Math.ceil(i)},Wd=Yt.durationDampening.accelerateAt,Hd=Yt.durationDampening.stopDampeningAt,n2=function(e,t){var r=t,n=Hd,i=Date.now(),o=i-r;if(o>=Hd)return e;if(ot.height,o=r.width>t.width;return!o&&!i?n:o&&i?null:{x:o?0:n.x,y:i?0:n.y}},o2=ig(function(e){return e===0?0:e}),Mg=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,i=e.center,o=e.shouldUseTimeDampening,l={top:i.y-r.top,right:r.right-i.x,bottom:r.bottom-i.y,left:i.x-r.left},a=Gd({container:r,distanceToEdges:l,dragStartTime:t,axis:Ls,shouldUseTimeDampening:o}),u=Gd({container:r,distanceToEdges:l,dragStartTime:t,axis:cg,shouldUseTimeDampening:o}),s=o2({x:u,y:a});if(Kt(s,de))return null;var f=i2({container:r,subject:n,proposedScroll:s});return f?Kt(f,de)?null:f:null},l2=ig(function(e){return e===0?0:e>0?1:-1}),Hs=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,i=t.change,o=ge(r,i),l={x:e(o.x,n.x),y:e(o.y,n.y)};return Kt(l,de)?null:l}}(),Bg=function(t){var r=t.max,n=t.current,i=t.change,o={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=l2(i),a=Hs({max:o,current:n,change:l});return!a||l.x!==0&&a.x===0||l.y!==0&&a.y===0},Vs=function(t,r){return Bg({current:t.scroll.current,max:t.scroll.max,change:r})},a2=function(t,r){if(!Vs(t,r))return null;var n=t.scroll.max,i=t.scroll.current;return Hs({current:i,max:n,change:r})},Gs=function(t,r){var n=t.frame;return n?Bg({current:n.scroll.current,max:n.scroll.max,change:r}):!1},u2=function(t,r){var n=t.frame;return!n||!Gs(t,r)?null:Hs({current:n.scroll.current,max:n.scroll.max,change:r})},s2=function(e){var t=e.viewport,r=e.subject,n=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,l=Mg({dragStartTime:i,container:t.frame,subject:r,center:n,shouldUseTimeDampening:o});return l&&Vs(t,l)?l:null},c2=function(e){var t=e.droppable,r=e.subject,n=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var a=Mg({dragStartTime:i,container:l.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:o});return a&&Gs(t,a)?a:null},qd=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,l=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var s=t.viewport,f=s2({dragStartTime:r,viewport:s,subject:u,center:l,shouldUseTimeDampening:n});if(f){i(f);return}}var d=e2({center:l,destination:Ue(t.impact),droppables:t.dimensions.droppables});if(d){var c=c2({dragStartTime:r,droppable:d,subject:u,center:l,shouldUseTimeDampening:n});c&&o(d.descriptor.id,c)}},d2=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=ri(t),i=ri(r),o=null,l=function(f){o||I();var d=o,c=d.shouldUseTimeDampening,p=d.dragStartTime;qd({state:f,scrollWindow:n,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:c})},a=function(f){o&&I();var d=Date.now(),c=!1,p=function(){c=!0};qd({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:c},c&&l(f)},u=function(){o&&(n.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:l}},f2=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,i=function(s,f){var d=ge(s.current.client.selection,f);t({client:d})},o=function(s,f){if(!Gs(s,f))return f;var d=u2(s,f);if(!d)return r(s.descriptor.id,f),null;var c=ze(f,d);r(s.descriptor.id,c);var p=ze(f,c);return p},l=function(s,f,d){if(!s||!Vs(f,d))return d;var c=a2(f,d);if(!c)return n(d),null;var p=ze(d,c);n(p);var m=ze(d,p);return m},a=function(s){var f=s.scrollJumpRequest;if(f){var d=Ue(s.impact);d||I();var c=o(s.dimensions.droppables[d],f);if(c){var p=s.viewport,m=l(s.isWindowScrollAllowed,p,c);m&&i(s,m)}}};return a},p2=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,i=d2({scrollWindow:r,scrollDroppable:t}),o=f2({move:n,scrollWindow:r,scrollDroppable:t}),l=function(s){if(s.phase==="DRAGGING"){if(s.movementMode==="FLUID"){i.scroll(s);return}s.scrollJumpRequest&&o(s)}},a={scroll:l,start:i.start,stop:i.stop};return a},en="data-rbd",tn=function(){var e=en+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Su=function(){var e=en+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),v2=function(){var e=en+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Qd={contextId:en+"-scroll-container-context-id"},g2=function(t){return function(r){return"["+r+'="'+t+'"]'}},Sn=function(t,r){return t.map(function(n){var i=n.styles[r];return i?n.selector+" { "+i+" }":""}).join(" ")},m2="pointer-events: none;",h2=function(e){var t=g2(e),r=function(){var a=` + `+Td(t.source)+` + `},ao={dragHandleUsageInstructions:Y1,onDragStart:X1,onDragUpdate:Z1,onDragEnd:J1},de={x:0,y:0},ge=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},ze=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Kt=function(t,r){return t.x===r.x&&t.y===r.y},an=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Sr=function(t,r,n){var i;return n===void 0&&(n=0),i={},i[t]=r,i[t==="x"?"y":"x"]=n,i},ii=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},Ad=function(t,r){return Math.min.apply(Math,r.map(function(n){return ii(t,n)}))},og=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},ew=function(e,t){var r=st({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},bi=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},Ld=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},tw={top:0,right:0,bottom:0,left:0},rw=function(t,r){return r?bi(t,r.scroll.diff.displacement):t},nw=function(t,r,n){if(n&&n.increasedBy){var i;return L({},t,(i={},i[r.end]=t[r.end]+n.increasedBy[r.line],i))}return t},iw=function(t,r){return r&&r.shouldClipSubject?ew(r.pageMarginBox,t):st(t)},Jr=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,i=e.frame,o=rw(t.marginBox,i),l=nw(o,n,r),a=iw(l,i);return{page:t,withPlaceholder:r,active:a}},Ts=function(e,t){e.frame||I();var r=e.frame,n=ze(t,r.scroll.initial),i=an(n),o=L({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:i},max:r.scroll.max}}),l=Jr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=L({},e,{frame:o,subject:l});return a};function $o(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function As(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,s=n.lefte.right,f=u&&s;if(f)return!0;var d=u&&l||s&&o;return d}},uw=function(e){var t=rt(e.top,e.bottom),r=rt(e.left,e.right);return function(n){var i=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return i}},Ms={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},dg={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},sw=function(e){return function(t){var r=rt(t.top,t.bottom),n=rt(t.left,t.right);return function(i){return e===Ms?r(i.top)&&r(i.bottom):n(i.left)&&n(i.right)}}},cw=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:de;return bi(t,n)},dw=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},fw=function(t,r,n){return n(r)(t)},Bs=function(t){var r=t.target,n=t.destination,i=t.viewport,o=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,a=o?cw(r,n):r;return dw(a,n,l)&&fw(a,i,l)},pw=function(t){return Bs(L({},t,{isVisibleThroughFrameFn:cg}))},fg=function(t){return Bs(L({},t,{isVisibleThroughFrameFn:uw}))},vw=function(t){return Bs(L({},t,{isVisibleThroughFrameFn:sw(t.destination.axis)}))},gw=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var i=r.invisible,o=r.visible;if(i[t])return!1;var l=o[t];return l?l.shouldAnimate:!0};function mw(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return st(Rs(r,n))}function li(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,l=e.last;return t.reduce(function(u,s){var f=mw(s,n),d=s.descriptor.id;u.all.push(d);var c=pw({target:f,destination:r,viewport:i,withDroppableDisplacement:!0});if(!c)return u.invisible[s.descriptor.id]=!0,u;var p=gw(d,l,o),m={draggableId:d,shouldAnimate:p};return u.visible[d]=m,u},{all:[],visible:{},invisible:{}})}function hw(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function Md(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,i=e.destination,o=hw(t,{inHomeList:r});return{displaced:oi,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Uo(e){var t=e.draggable,r=e.insideDestination,n=e.destination,i=e.viewport,o=e.displacedBy,l=e.last,a=e.index,u=e.forceShouldAnimate,s=sn(t,n);if(a==null)return Md({insideDestination:r,inHomeList:s,displacedBy:o,destination:n});var f=or(r,function(y){return y.descriptor.index===a});if(!f)return Md({insideDestination:r,inHomeList:s,displacedBy:o,destination:n});var d=Cl(t,r),c=r.indexOf(f),p=d.slice(c),m=li({afterDragging:p,destination:n,displacedBy:o,last:l,viewport:i.frame,forceShouldAnimate:u});return{displaced:m,displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function Jt(e,t){return!!t.effected[e]}var yw=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,i=e.combine,o=e.afterCritical;if(!r.isCombineEnabled)return null;var l=i.draggableId,a=n[l],u=a.descriptor.index,s=Jt(l,o);return s?t?u:u-1:t?u+1:u},ww=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,i=e.location;if(!n.length)return null;var o=i.index,l=t?o+1:o-1,a=n[0].descriptor.index,u=n[n.length-1].descriptor.index,s=r?u:u+1;return ls?null:l},Sw=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,i=e.draggables,o=e.destination,l=e.insideDestination,a=e.previousImpact,u=e.viewport,s=e.afterCritical,f=a.at;if(f||I(),f.type==="REORDER"){var d=ww({isMovingForward:t,isInHomeList:r,location:f.destination,insideDestination:l});return d==null?null:Uo({draggable:n,insideDestination:l,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:d})}var c=yw({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:f.combine,afterCritical:s});return c==null?null:Uo({draggable:n,insideDestination:l,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:c})},xw=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,i=e.displacedBy,o=!!(t.visible[n]||t.invisible[n]);return Jt(n,r)?o?de:an(i.point):o?i.point:de},Ew=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,i=El(r);i||I();var o=i.draggableId,l=n[o].page.borderBox.center,a=xw({displaced:r.displaced,afterCritical:t,combineWith:o,displacedBy:r.displacedBy});return ge(l,a)},pg=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},Cw=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},Fs=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},Bd=function(t){var r=t.axis,n=t.moveRelativeTo,i=t.isMoving;return Sr(r.line,n.marginBox[r.end]+pg(r,i),Fs(r,n.marginBox,i))},Fd=function(t){var r=t.axis,n=t.moveRelativeTo,i=t.isMoving;return Sr(r.line,n.marginBox[r.start]-Cw(r,i),Fs(r,n.marginBox,i))},bw=function(t){var r=t.axis,n=t.moveInto,i=t.isMoving;return Sr(r.line,n.contentBox[r.start]+pg(r,i),Fs(r,n.contentBox,i))},Dw=function(e){var t=e.impact,r=e.draggable,n=e.draggables,i=e.droppable,o=e.afterCritical,l=un(i.descriptor.id,n),a=r.page,u=i.axis;if(!l.length)return bw({axis:u,moveInto:i.page,isMoving:a});var s=t.displaced,f=t.displacedBy,d=s.all[0];if(d){var c=n[d];if(Jt(d,o))return Fd({axis:u,moveRelativeTo:c.page,isMoving:a});var p=Bo(c.page,f.point);return Fd({axis:u,moveRelativeTo:p,isMoving:a})}var m=l[l.length-1];if(m.descriptor.id===r.descriptor.id)return a.borderBox.center;if(Jt(m.descriptor.id,o)){var y=Bo(m.page,an(o.displacedBy.point));return Bd({axis:u,moveRelativeTo:y,isMoving:a})}return Bd({axis:u,moveRelativeTo:m.page,isMoving:a})},hu=function(e,t){var r=e.frame;return r?ge(t,r.scroll.diff.displacement):t},Pw=function(t){var r=t.impact,n=t.draggable,i=t.droppable,o=t.draggables,l=t.afterCritical,a=n.page.borderBox.center,u=r.at;return!i||!u?a:u.type==="REORDER"?Dw({impact:r,draggable:n,draggables:o,droppable:i,afterCritical:l}):Ew({impact:r,draggables:o,afterCritical:l})},bl=function(e){var t=Pw(e),r=e.droppable,n=r?hu(r,t):t;return n},vg=function(e,t){var r=ze(t,e.scroll.initial),n=an(r),i=st({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return o};function jd(e,t){return e.map(function(r){return t[r]})}function Iw(e,t){for(var r=0;r1?f.sort(function(d,c){return Ce(d)[a.start]-Ce(c)[a.start]})[0]:s.sort(function(d,c){var p=Ad(r,Ld(Ce(d))),m=Ad(r,Ld(Ce(c)));return p!==m?p-m:Ce(d)[a.start]-Ce(c)[a.start]})[0]},zd=function(t,r){var n=t.page.borderBox.center;return Jt(t.descriptor.id,r)?ze(n,r.displacedBy.point):n},Tw=function(t,r){var n=t.page.borderBox;return Jt(t.descriptor.id,r)?bi(n,an(r.displacedBy.point)):n},Aw=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,i=e.insideDestination,o=e.afterCritical,l=i.filter(function(a){return fg({target:Tw(a,o),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var s=ii(t,hu(n,zd(a,o))),f=ii(t,hu(n,zd(u,o)));return st.left&&e.topt.top}function Uw(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,i=r.page.borderBox.center,o=n.map(function(l){var a=l.axis,u=Sr(l.axis.line,t.center[a.line],l.page.borderBox.center[a.crossAxisLine]);return{id:l.descriptor.id,distance:ii(i,u)}}).sort(function(l,a){return a.distance-l.distance});return o[0]?o[0].id:null}function _w(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,i=xl(n).filter(function(o){if(!o.isEnabled)return!1;var l=o.subject.active;if(!l||!$w(t,l))return!1;if(yg(l)(t.center))return!0;var a=o.axis,u=l.center[a.crossAxisLine],s=t[a.crossAxisStart],f=t[a.crossAxisEnd],d=rt(l[a.crossAxisStart],l[a.crossAxisEnd]),c=d(s),p=d(f);return!c&&!p?!0:c?su});return i.length?i.length===1?i[0].descriptor.id:Uw({pageBorderBox:t,draggable:r,candidates:i}):null}var wg=function(t,r){return st(bi(t,r))},Ww=function(e,t){var r=e.frame;return r?wg(t,r.scroll.diff.value):t};function Sg(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function Hw(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var Vw=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,i=e.insideDestination,o=e.last,l=e.viewport,a=e.afterCritical,u=n.axis,s=Di(n.axis,r.displaceBy),f=s.value,d=t[u.start],c=t[u.end],p=Cl(r,i),m=or(p,function(w){var g=w.descriptor.id,v=w.page.borderBox.center[u.line],h=Jt(g,a),S=Sg({displaced:o,id:g});return h?S?c<=v:dg[a.start]+h&&dg[a.start]-s+h&&fg[a.start]+s+h&&dg[a.start]+h&&f=_d)return Og;var o=i/_d,l=Su+ES*o,a=n==="CANCEL"?l*CS:l;return Number(a.toFixed(2))},DS=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,i=e.viewport,o=e.afterCritical,l=n.draggables,a=n.droppables,u=Ue(t),s=u?a[u]:null,f=a[r.descriptor.droppableId],d=Cg({impact:t,draggable:r,draggables:l,afterCritical:o,droppable:s||f,viewport:i}),c=ze(d,r.client.borderBox.center);return c},PS=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,i=e.home,o=e.viewport,l=e.onLiftImpact;if(!n.at||r!=="DROP"){var a=Eg({draggables:t,impact:l,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var u=L({},n,{displaced:oi});return{impact:u,didDropInsideDroppable:!0}},IS=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(i){if(i.type!=="DROP"){n(i);return}var o=t(),l=i.payload.reason;if(o.phase==="COLLECTING"){r(wS({reason:l}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&I(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||I();var u=o.critical,s=o.dimensions,f=s.draggables[o.critical.draggable.id],d=PS({reason:l,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),c=d.impact,p=d.didDropInsideDroppable,m=p?Ls(c):null,y=p?El(c):null,w={index:u.draggable.index,droppableId:u.droppable.id},g={draggableId:f.descriptor.id,type:f.descriptor.type,source:w,reason:l,mode:o.movementMode,destination:m,combine:y},v=DS({impact:c,draggable:f,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),h={critical:o.critical,afterCritical:o.afterCritical,result:g,impact:c},S=!Kt(o.current.client.offset,v)||!!g.combine;if(!S){r(Us({completed:h}));return}var x=bS({current:o.current.client.offset,destination:v,reason:l}),C={newHomeClientOffset:v,dropDuration:x,completed:h};r(yS(C))}}}},Rg=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function NS(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function OS(e){var t=e.onWindowScroll;function r(){t(Rg())}var n=ni(r),i=NS(n),o=Qt;function l(){return o!==Qt}function a(){l()&&I(),o=et(window,[i])}function u(){l()||I(),n.cancel(),o(),o=Qt}return{start:a,stop:u,isActive:l}}var RS=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},kS=function(e){var t=OS({onWindowScroll:function(n){e.dispatch(fS({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&RS(n)&&t.stop(),r(n)}}},TS=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),i=function(l){t||r||(t=!0,e(l),clearTimeout(n))};return i.wasCalled=function(){return t},i},AS=function(){var e=[],t=function(o){var l=As(e,function(s){return s.timerId===o});l===-1&&I();var a=e.splice(l,1),u=a[0];u.callback()},r=function(o){var l=setTimeout(function(){return t(l)}),a={timerId:l,callback:o};e.push(a)},n=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:r,flush:n}},LS=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},MS=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},BS=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,i=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&i},wn=function(t,r){r()},Vi=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},ma=function(t,r,n,i){if(!t){n(i(r));return}var o=TS(n),l={announce:o};t(r,l),o.wasCalled()||n(i(r))},FS=function(e,t){var r=AS(),n=null,i=function(c,p){n&&I(),wn("onBeforeCapture",function(){var m=e().onBeforeCapture;if(m){var y={draggableId:c,mode:p};m(y)}})},o=function(c,p){n&&I(),wn("onBeforeDragStart",function(){var m=e().onBeforeDragStart;m&&m(Vi(c,p))})},l=function(c,p){n&&I();var m=Vi(c,p);n={mode:p,lastCritical:c,lastLocation:m.source,lastCombine:null},r.add(function(){wn("onDragStart",function(){return ma(e().onDragStart,m,t,ao.onDragStart)})})},a=function(c,p){var m=Ls(p),y=El(p);n||I();var w=!BS(c,n.lastCritical);w&&(n.lastCritical=c);var g=!LS(n.lastLocation,m);g&&(n.lastLocation=m);var v=!MS(n.lastCombine,y);if(v&&(n.lastCombine=y),!(!w&&!g&&!v)){var h=L({},Vi(c,n.mode),{combine:y,destination:m});r.add(function(){wn("onDragUpdate",function(){return ma(e().onDragUpdate,h,t,ao.onDragUpdate)})})}},u=function(){n||I(),r.flush()},s=function(c){n||I(),n=null,wn("onDragEnd",function(){return ma(e().onDragEnd,c,t,ao.onDragEnd)})},f=function(){if(n){var c=L({},Vi(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});s(c)}};return{beforeCapture:i,beforeStart:o,start:l,update:a,flush:u,drop:s,abort:f}},jS=function(e,t){var r=FS(e,t);return function(n){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var l=o.payload.critical;r.beforeStart(l,o.payload.movementMode),i(o),r.start(l,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var a=o.payload.completed.result;r.flush(),i(o),r.drop(a);return}if(i(o),o.type==="FLUSH"){r.abort();return}var u=n.getState();u.phase==="DRAGGING"&&r.update(u.critical,u.impact)}}}},zS=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&I(),e.dispatch(Us({completed:n.completed}))}}},$S=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&n(),i(o),o.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(Ng())}};r=requestAnimationFrame(function(){r=null,t=et(window,[l])})}}}},US=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},_S=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var i=n.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},WS=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},HS=function(e){return function(t){return function(r){return function(n){if(WS(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var i=t.getState();i.phase!=="DRAGGING"&&I(),e.start(i);return}r(n),e.scroll(t.getState())}}}},VS=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(Ig({reason:n.reason})))}}}},GS=Bv,qS=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,i=e.getResponders,o=e.announce,l=e.autoScroller;return Mv(nS,GS(A0(xS(n),US(t),SS(t),IS,zS,$S,VS,HS(l),kS,_S(r),jS(i,o))))},ha=function(){return{additions:{},removals:{},modified:{}}};function QS(e){var t=e.registry,r=e.callbacks,n=ha(),i=null,o=function(){i||(r.collectionStarting(),i=requestAnimationFrame(function(){i=null;var f=n,d=f.additions,c=f.removals,p=f.modified,m=Object.keys(d).map(function(g){return t.draggable.getById(g).getDimension(de)}).sort(function(g,v){return g.descriptor.index-v.descriptor.index}),y=Object.keys(p).map(function(g){var v=t.droppable.getById(g),h=v.callbacks.getScrollWhileDragging();return{droppableId:g,scroll:h}}),w={additions:m,removals:Object.keys(c),modified:y};n=ha(),r.publish(w)}))},l=function(f){var d=f.descriptor.id;n.additions[d]=f,n.modified[f.descriptor.droppableId]=!0,n.removals[d]&&delete n.removals[d],o()},a=function(f){var d=f.descriptor;n.removals[d.id]=!0,n.modified[d.droppableId]=!0,n.additions[d.id]&&delete n.additions[d.id],o()},u=function(){i&&(cancelAnimationFrame(i),i=null,n=ha())};return{add:l,remove:a,stop:u}}var kg=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,i=e.width,o=ze({x:r,y:t},{x:i,y:n}),l={x:Math.max(0,o.x),y:Math.max(0,o.y)};return l},Tg=function(){var e=document.documentElement;return e||I(),e},Ag=function(){var e=Tg(),t=kg({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},KS=function(){var e=Rg(),t=Ag(),r=e.y,n=e.x,i=Tg(),o=i.clientWidth,l=i.clientHeight,a=n+o,u=r+l,s=st({top:r,left:n,right:a,bottom:u}),f={frame:s,scroll:{initial:e,current:e,max:t,diff:{value:de,displacement:de}}};return f},YS=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,i=KS(),o=i.scroll.current,l=t.droppable,a=n.droppable.getAllByType(l.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,r)}),u=n.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(o)}),s={draggables:ug(u),droppables:ag(a)},f={dimensions:s,critical:t,viewport:i};return f};function Wd(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var XS=function(e,t){var r=null,n=QS({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(p,m){e.droppable.exists(p)||I(),r&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},o=function(p,m){r&&(e.droppable.exists(p)||I(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},l=function(p,m){r&&(e.droppable.exists(p)||I(),t.updateDroppableScroll({id:p,newScroll:m}))},a=function(p,m){r&&e.droppable.getById(p).callbacks.scroll(m)},u=function(){if(r){n.stop();var p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(m){return m.callbacks.dragStopped()}),r.unsubscribe(),r=null}},s=function(p){r||I();var m=r.critical.draggable;p.type==="ADDITION"&&Wd(e,m,p.value)&&n.add(p.value),p.type==="REMOVAL"&&Wd(e,m,p.value)&&n.remove(p.value)},f=function(p){r&&I();var m=e.draggable.getById(p.draggableId),y=e.droppable.getById(m.descriptor.droppableId),w={draggable:m.descriptor,droppable:y.descriptor},g=e.subscribe(s);return r={critical:w,unsubscribe:g},YS({critical:w,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:l,startPublishing:f,stopPublishing:u};return d},Lg=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},ZS=function(e){window.scrollBy(e.x,e.y)},JS=ce(function(e){return xl(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),e2=function(t,r){var n=or(JS(r),function(i){return i.frame||I(),yg(i.frame.pageMarginBox)(t)});return n},t2=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var i=n[r];return i.frame?i:null}var o=e2(t,n);return o},Yt={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},r2=function(e,t){var r=e[t.size]*Yt.startFromPercentage,n=e[t.size]*Yt.maxScrollAtPercentage,i={startScrollingFrom:r,maxScrollValueAt:n};return i},Mg=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,i=r-t;if(i===0)return 0;var o=n-t,l=o/i;return l},Hs=1,n2=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Yt.maxPixelScroll;if(e===t.startScrollingFrom)return Hs;var r=Mg({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,i=Yt.maxPixelScroll*Yt.ease(n);return Math.ceil(i)},Hd=Yt.durationDampening.accelerateAt,Vd=Yt.durationDampening.stopDampeningAt,i2=function(e,t){var r=t,n=Vd,i=Date.now(),o=i-r;if(o>=Vd)return e;if(ot.height,o=r.width>t.width;return!o&&!i?n:o&&i?null:{x:o?0:n.x,y:i?0:n.y}},l2=og(function(e){return e===0?0:e}),Bg=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,i=e.center,o=e.shouldUseTimeDampening,l={top:i.y-r.top,right:r.right-i.x,bottom:r.bottom-i.y,left:i.x-r.left},a=qd({container:r,distanceToEdges:l,dragStartTime:t,axis:Ms,shouldUseTimeDampening:o}),u=qd({container:r,distanceToEdges:l,dragStartTime:t,axis:dg,shouldUseTimeDampening:o}),s=l2({x:u,y:a});if(Kt(s,de))return null;var f=o2({container:r,subject:n,proposedScroll:s});return f?Kt(f,de)?null:f:null},a2=og(function(e){return e===0?0:e>0?1:-1}),Vs=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,i=t.change,o=ge(r,i),l={x:e(o.x,n.x),y:e(o.y,n.y)};return Kt(l,de)?null:l}}(),Fg=function(t){var r=t.max,n=t.current,i=t.change,o={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=a2(i),a=Vs({max:o,current:n,change:l});return!a||l.x!==0&&a.x===0||l.y!==0&&a.y===0},Gs=function(t,r){return Fg({current:t.scroll.current,max:t.scroll.max,change:r})},u2=function(t,r){if(!Gs(t,r))return null;var n=t.scroll.max,i=t.scroll.current;return Vs({current:i,max:n,change:r})},qs=function(t,r){var n=t.frame;return n?Fg({current:n.scroll.current,max:n.scroll.max,change:r}):!1},s2=function(t,r){var n=t.frame;return!n||!qs(t,r)?null:Vs({current:n.scroll.current,max:n.scroll.max,change:r})},c2=function(e){var t=e.viewport,r=e.subject,n=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,l=Bg({dragStartTime:i,container:t.frame,subject:r,center:n,shouldUseTimeDampening:o});return l&&Gs(t,l)?l:null},d2=function(e){var t=e.droppable,r=e.subject,n=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var a=Bg({dragStartTime:i,container:l.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:o});return a&&qs(t,a)?a:null},Qd=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,l=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var s=t.viewport,f=c2({dragStartTime:r,viewport:s,subject:u,center:l,shouldUseTimeDampening:n});if(f){i(f);return}}var d=t2({center:l,destination:Ue(t.impact),droppables:t.dimensions.droppables});if(d){var c=d2({dragStartTime:r,droppable:d,subject:u,center:l,shouldUseTimeDampening:n});c&&o(d.descriptor.id,c)}},f2=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=ni(t),i=ni(r),o=null,l=function(f){o||I();var d=o,c=d.shouldUseTimeDampening,p=d.dragStartTime;Qd({state:f,scrollWindow:n,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:c})},a=function(f){o&&I();var d=Date.now(),c=!1,p=function(){c=!0};Qd({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:c},c&&l(f)},u=function(){o&&(n.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:l}},p2=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,i=function(s,f){var d=ge(s.current.client.selection,f);t({client:d})},o=function(s,f){if(!qs(s,f))return f;var d=s2(s,f);if(!d)return r(s.descriptor.id,f),null;var c=ze(f,d);r(s.descriptor.id,c);var p=ze(f,c);return p},l=function(s,f,d){if(!s||!Gs(f,d))return d;var c=u2(f,d);if(!c)return n(d),null;var p=ze(d,c);n(p);var m=ze(d,p);return m},a=function(s){var f=s.scrollJumpRequest;if(f){var d=Ue(s.impact);d||I();var c=o(s.dimensions.droppables[d],f);if(c){var p=s.viewport,m=l(s.isWindowScrollAllowed,p,c);m&&i(s,m)}}};return a},v2=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,i=f2({scrollWindow:r,scrollDroppable:t}),o=p2({move:n,scrollWindow:r,scrollDroppable:t}),l=function(s){if(s.phase==="DRAGGING"){if(s.movementMode==="FLUID"){i.scroll(s);return}s.scrollJumpRequest&&o(s)}},a={scroll:l,start:i.start,stop:i.stop};return a},en="data-rbd",tn=function(){var e=en+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),xu=function(){var e=en+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),g2=function(){var e=en+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Kd={contextId:en+"-scroll-container-context-id"},m2=function(t){return function(r){return"["+r+'="'+t+'"]'}},Sn=function(t,r){return t.map(function(n){var i=n.styles[r];return i?n.selector+" { "+i+" }":""}).join(" ")},h2="pointer-events: none;",y2=function(e){var t=m2(e),r=function(){var a=` cursor: -webkit-grab; cursor: grab; `;return{selector:t(tn.contextId),styles:{always:` -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0,0,0,0); touch-action: manipulation; - `,resting:a,dragging:m2,dropAnimating:a}}}(),n=function(){var a=` - transition: `+Bn.outOfTheWay+`; - `;return{selector:t(Su.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(v2.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` + `,resting:a,dragging:h2,dropAnimating:a}}}(),n=function(){var a=` + transition: `+Fn.outOfTheWay+`; + `;return{selector:t(xu.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(g2.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:` cursor: grabbing; cursor: -webkit-grabbing; user-select: none; @@ -124,7 +124,7 @@ Error generating stack: `+o.message+` -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}},l=[n,r,i,o];return{always:Sn(l,"always"),resting:Sn(l,"resting"),dragging:Sn(l,"dragging"),dropAnimating:Sn(l,"dropAnimating"),userCancel:Sn(l,"userCancel")}},_e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.useLayoutEffect:E.useEffect,ha=function(){var t=document.querySelector("head");return t||I(),t},Kd=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function y2(e,t){var r=$(function(){return h2(e)},[e]),n=E.useRef(null),i=E.useRef(null),o=A(ce(function(d){var c=i.current;c||I(),c.textContent=d}),[]),l=A(function(d){var c=n.current;c||I(),c.textContent=d},[]);_e(function(){!n.current&&!i.current||I();var d=Kd(t),c=Kd(t);return n.current=d,i.current=c,d.setAttribute(en+"-always",e),c.setAttribute(en+"-dynamic",e),ha().appendChild(d),ha().appendChild(c),l(r.always),o(r.resting),function(){var p=function(y){var w=y.current;w||I(),ha().removeChild(w),y.current=null};p(n),p(i)}},[t,l,o,r.always,r.resting,e]);var a=A(function(){return o(r.dragging)},[o,r.dragging]),u=A(function(d){if(d==="DROP"){o(r.dropAnimating);return}o(r.userCancel)},[o,r.dropAnimating,r.userCancel]),s=A(function(){i.current&&o(r.resting)},[o,r.resting]),f=$(function(){return{dragging:a,dropping:u,resting:s}},[a,u,s]);return f}var Fg=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function bl(e){return e instanceof Fg(e).HTMLElement}function w2(e,t){var r="["+tn.contextId+'="'+e+'"]',n=og(document.querySelectorAll(r));if(!n.length)return null;var i=or(n,function(o){return o.getAttribute(tn.draggableId)===t});return!i||!bl(i)?null:i}function S2(e){var t=E.useRef({}),r=E.useRef(null),n=E.useRef(null),i=E.useRef(!1),o=A(function(c,p){var m={id:c,focus:p};return t.current[c]=m,function(){var w=t.current,g=w[c];g!==m&&delete w[c]}},[]),l=A(function(c){var p=w2(e,c);p&&p!==document.activeElement&&p.focus()},[e]),a=A(function(c,p){r.current===c&&(r.current=p)},[]),u=A(function(){n.current||i.current&&(n.current=requestAnimationFrame(function(){n.current=null;var c=r.current;c&&l(c)}))},[l]),s=A(function(c){r.current=null;var p=document.activeElement;p&&p.getAttribute(tn.draggableId)===c&&(r.current=c)},[]);_e(function(){return i.current=!0,function(){i.current=!1;var c=n.current;c&&cancelAnimationFrame(c)}},[]);var f=$(function(){return{register:o,tryRecordFocus:s,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,s,u,a]);return f}function x2(){var e={draggables:{},droppables:{}},t=[];function r(d){return t.push(d),function(){var p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function n(d){t.length&&t.forEach(function(c){return c(d)})}function i(d){return e.draggables[d]||null}function o(d){var c=i(d);return c||I(),c}var l={register:function(c){e.draggables[c.descriptor.id]=c,n({type:"ADDITION",value:c})},update:function(c,p){var m=e.draggables[p.descriptor.id];m&&m.uniqueId===c.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[c.descriptor.id]=c)},unregister:function(c){var p=c.descriptor.id,m=i(p);m&&c.uniqueId===m.uniqueId&&(delete e.draggables[p],n({type:"REMOVAL",value:c}))},getById:o,findById:i,exists:function(c){return!!i(c)},getAllByType:function(c){return zo(e.draggables).filter(function(p){return p.descriptor.type===c})}};function a(d){return e.droppables[d]||null}function u(d){var c=a(d);return c||I(),c}var s={register:function(c){e.droppables[c.descriptor.id]=c},unregister:function(c){var p=a(c.descriptor.id);p&&c.uniqueId===p.uniqueId&&delete e.droppables[c.descriptor.id]},getById:u,findById:a,exists:function(c){return!!a(c)},getAllByType:function(c){return zo(e.droppables).filter(function(p){return p.descriptor.type===c})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:s,subscribe:r,clean:f}}function E2(){var e=$(x2,[]);return E.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var qs=z.createContext(null),Uo=function(){var e=document.body;return e||I(),e},C2={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},b2=function(t){return"rbd-announcement-"+t};function D2(e){var t=$(function(){return b2(e)},[e]),r=E.useRef(null);E.useEffect(function(){var o=document.createElement("div");return r.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),L(o.style,C2),Uo().appendChild(o),function(){setTimeout(function(){var u=Uo();u.contains(o)&&u.removeChild(o),o===r.current&&(r.current=null)})}},[t]);var n=A(function(i){var o=r.current;if(o){o.textContent=i;return}},[]);return n}var P2=0,I2={separator:"::"};function Qs(e,t){return t===void 0&&(t=I2),$(function(){return""+e+t.separator+P2++},[t.separator,e])}function N2(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function O2(e){var t=e.contextId,r=e.text,n=Qs("hidden-text",{separator:"-"}),i=$(function(){return N2({contextId:t,uniqueId:n})},[n,t]);return E.useEffect(function(){var l=document.createElement("div");return l.id=i,l.textContent=r,l.style.display="none",Uo().appendChild(l),function(){var u=Uo();u.contains(l)&&u.removeChild(l)}},[i,r]),i}var Dl=z.createContext(null);function jg(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e}),t}function R2(){var e=null;function t(){return!!e}function r(l){return l===e}function n(l){e&&I();var a={abandon:l};return e=a,a}function i(){e||I(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:r,claim:n,release:i,tryAbandon:o}}var k2=9,T2=13,Ks=27,zg=32,A2=33,L2=34,M2=35,B2=36,F2=37,j2=38,z2=39,$2=40,Vi,U2=(Vi={},Vi[T2]=!0,Vi[k2]=!0,Vi),$g=function(e){U2[e.keyCode]&&e.preventDefault()},Pl=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=or(t,function(n){return"on"+n in document});return r||e}(),Ug=0,Yd=5;function _2(e,t){return Math.abs(t.x-e.x)>=Yd||Math.abs(t.y-e.y)>=Yd}var Xd={type:"IDLE"};function W2(e){var t=e.cancel,r=e.completed,n=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(l){var a=l.button,u=l.clientX,s=l.clientY;if(a===Ug){var f={x:u,y:s},d=n();if(d.type==="DRAGGING"){l.preventDefault(),d.actions.move(f);return}d.type!=="PENDING"&&I();var c=d.point;if(_2(c,f)){l.preventDefault();var p=d.actions.fluidLift(f);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(l){var a=n();if(a.type!=="DRAGGING"){t();return}l.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(l){n().type==="DRAGGING"&&l.preventDefault(),t()}},{eventName:"keydown",fn:function(l){var a=n();if(a.type==="PENDING"){t();return}if(l.keyCode===Ks){l.preventDefault(),t();return}$g(l)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(l){var a=n();if(a.type==="IDLE"&&I(),a.actions.shouldRespectForcePress()){t();return}l.preventDefault()}},{eventName:Pl,fn:t}]}function H2(e){var t=E.useRef(Xd),r=E.useRef(Qt),n=$(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===Ug&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var c=e.findClosestDraggableId(d);if(c){var p=e.tryGetLock(c,l,{sourceEvent:d});if(p){d.preventDefault();var m={x:d.clientX,y:d.clientY};r.current(),s(p,m)}}}}}},[e]),i=$(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var c=e.findClosestDraggableId(d);if(c){var p=e.findOptionsForDraggable(c);p&&(p.shouldRespectForcePress||e.canGetLock(c)&&d.preventDefault())}}}}},[e]),o=A(function(){var d={passive:!1,capture:!0};r.current=et(window,[i,n],d)},[i,n]),l=A(function(){var f=t.current;f.type!=="IDLE"&&(t.current=Xd,r.current(),o())},[o]),a=A(function(){var f=t.current;l(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[l]),u=A(function(){var d={capture:!0,passive:!1},c=W2({cancel:a,completed:l,getPhase:function(){return t.current},setPhase:function(m){t.current=m}});r.current=et(window,c,d)},[a,l]),s=A(function(d,c){t.current.type!=="IDLE"&&I(),t.current={type:"PENDING",point:c,actions:d},u()},[u]);_e(function(){return o(),function(){r.current()}},[o])}var Dr;function V2(){}var G2=(Dr={},Dr[L2]=!0,Dr[A2]=!0,Dr[B2]=!0,Dr[M2]=!0,Dr);function q2(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Ks){o.preventDefault(),r();return}if(o.keyCode===zg){o.preventDefault(),n();return}if(o.keyCode===$2){o.preventDefault(),e.moveDown();return}if(o.keyCode===j2){o.preventDefault(),e.moveUp();return}if(o.keyCode===z2){o.preventDefault(),e.moveRight();return}if(o.keyCode===F2){o.preventDefault(),e.moveLeft();return}if(G2[o.keyCode]){o.preventDefault();return}$g(o)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:Pl,fn:r}]}function Q2(e){var t=E.useRef(V2),r=$(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==zg)return;var l=e.findClosestDraggableId(o);if(!l)return;var a=e.tryGetLock(l,f,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,s=a.snapLift();t.current();function f(){u||I(),u=!1,t.current(),n()}t.current=et(window,q2(s,f),{capture:!0,passive:!1})}}},[e]),n=A(function(){var o={passive:!1,capture:!0};t.current=et(window,[r],o)},[r]);_e(function(){return n(),function(){t.current()}},[n])}var ya={type:"IDLE"},K2=120,Y2=.15;function X2(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(r().type!=="DRAGGING"){t();return}i.keyCode===Ks&&i.preventDefault(),t()}},{eventName:Pl,fn:t}]}function Z2(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var l=n();if(l.type!=="DRAGGING"){t();return}l.hasMoved=!0;var a=o.touches[0],u=a.clientX,s=a.clientY,f={x:u,y:s};o.preventDefault(),l.actions.move(f)}},{eventName:"touchend",fn:function(o){var l=n();if(l.type!=="DRAGGING"){t();return}o.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var l=n();l.type==="IDLE"&&I();var a=o.touches[0];if(a){var u=a.force>=Y2;if(u){var s=l.actions.shouldRespectForcePress();if(l.type==="PENDING"){s&&t();return}if(s){if(l.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Pl,fn:t}]}function J2(e){var t=E.useRef(ya),r=E.useRef(Qt),n=A(function(){return t.current},[]),i=A(function(p){t.current=p},[]),o=$(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var m=e.findClosestDraggableId(p);if(m){var y=e.tryGetLock(m,a,{sourceEvent:p});if(y){var w=p.touches[0],g=w.clientX,v=w.clientY,h={x:g,y:v};r.current(),d(y,h)}}}}}},[e]),l=A(function(){var p={capture:!0,passive:!1};r.current=et(window,[o],p)},[o]),a=A(function(){var c=t.current;c.type!=="IDLE"&&(c.type==="PENDING"&&clearTimeout(c.longPressTimerId),i(ya),r.current(),l())},[l,i]),u=A(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=A(function(){var p={capture:!0,passive:!1},m={cancel:u,completed:a,getPhase:n},y=et(window,Z2(m),p),w=et(window,X2(m),p);r.current=function(){y(),w()}},[u,n,a]),f=A(function(){var p=n();p.type!=="PENDING"&&I();var m=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:m,hasMoved:!1})},[n,i]),d=A(function(p,m){n().type!=="IDLE"&&I();var y=setTimeout(f,K2);i({type:"PENDING",point:m,actions:p,longPressTimerId:y}),s()},[s,n,i,f]);_e(function(){return l(),function(){r.current();var m=n();m.type==="PENDING"&&(clearTimeout(m.longPressTimerId),i(ya))}},[n,l,i]),_e(function(){var p=et(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var ex={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function _g(e,t){if(t==null)return!1;var r=!!ex[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:_g(e,t.parentElement)}function tx(e,t){var r=t.target;return bl(r)?_g(e,r):!1}var rx=function(e){return st(e.getBoundingClientRect()).center};function nx(e){return e instanceof Fg(e).Element}var ix=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=or(t,function(n){return n in Element.prototype});return r||e}();function Wg(e,t){return e==null?null:e[ix](t)?e:Wg(e.parentElement,t)}function ox(e,t){return e.closest?e.closest(t):Wg(e,t)}function lx(e){return"["+tn.contextId+'="'+e+'"]'}function ax(e,t){var r=t.target;if(!nx(r))return null;var n=lx(e),i=ox(r,n);return!i||!bl(i)?null:i}function ux(e,t){var r=ax(e,t);return r?r.getAttribute(tn.draggableId):null}function sx(e,t){var r="["+Su.contextId+'="'+e+'"]',n=og(document.querySelectorAll(r)),i=or(n,function(o){return o.getAttribute(Su.id)===t});return!i||!bl(i)?null:i}function cx(e){e.preventDefault()}function Gi(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function Hg(e){var t=e.lockAPI,r=e.store,n=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=n.draggable.findById(i);return!(!o||!o.options.isEnabled||!Ag(r.getState(),i))}function dx(e){var t=e.lockAPI,r=e.contextId,n=e.store,i=e.registry,o=e.draggableId,l=e.forceSensorStop,a=e.sourceEvent,u=Hg({lockAPI:t,store:n,registry:i,draggableId:o});if(!u)return null;var s=i.draggable.getById(o),f=sx(r,s.descriptor.id);if(!f||a&&!s.options.canDragInteractiveElements&&tx(f,a))return null;var d=t.claim(l||Qt),c="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function m(){return t.isActive(d)}function y(C,P){Gi({expected:C,phase:c,isLockActive:m,shouldWarn:!0})&&n.dispatch(P())}var w=y.bind(null,"DRAGGING");function g(C){function P(){t.release(),c="COMPLETED"}c!=="PRE_DRAG"&&(P(),c!=="PRE_DRAG"&&I()),n.dispatch(iS(C.liftActionArgs)),c="DRAGGING";function N(T,k){if(k===void 0&&(k={shouldBlockNextClick:!1}),C.cleanup(),k.shouldBlockNextClick){var F=et(window,[{eventName:"click",fn:cx,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(F)}P(),n.dispatch(Pg({reason:T}))}return L({isActive:function(){return Gi({expected:"DRAGGING",phase:c,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(k){return N("DROP",k)},cancel:function(k){return N("CANCEL",k)}},C.actions)}function v(C){var P=ri(function(T){w(function(){return Dg({client:T})})}),N=g({liftActionArgs:{id:o,clientSelection:C,movementMode:"FLUID"},cleanup:function(){return P.cancel()},actions:{move:P}});return L({},N,{move:P})}function h(){var C={moveUp:function(){return w(pS)},moveRight:function(){return w(gS)},moveDown:function(){return w(vS)},moveLeft:function(){return w(mS)}};return g({liftActionArgs:{id:o,clientSelection:rx(f),movementMode:"SNAP"},cleanup:Qt,actions:C})}function S(){var C=Gi({expected:"PRE_DRAG",phase:c,isLockActive:m,shouldWarn:!0});C&&t.release()}var x={isActive:function(){return Gi({expected:"PRE_DRAG",phase:c,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:v,snapLift:h,abort:S};return x}var fx=[H2,Q2,J2];function px(e){var t=e.contextId,r=e.store,n=e.registry,i=e.customSensors,o=e.enableDefaultSensors,l=[].concat(o?fx:[],i||[]),a=E.useState(function(){return R2()})[0],u=A(function(v,h){v.isDragging&&!h.isDragging&&a.tryAbandon()},[a]);_e(function(){var v=r.getState(),h=r.subscribe(function(){var S=r.getState();u(v,S),v=S});return h},[a,r,u]),_e(function(){return a.tryAbandon},[a.tryAbandon]);for(var s=A(function(g){return Hg({lockAPI:a,registry:n,store:r,draggableId:g})},[a,n,r]),f=A(function(g,v,h){return dx({lockAPI:a,registry:n,contextId:t,store:r,draggableId:g,forceSensorStop:v,sourceEvent:h&&h.sourceEvent?h.sourceEvent:null})},[t,a,n,r]),d=A(function(g){return ux(t,g)},[t]),c=A(function(g){var v=n.draggable.findById(g);return v?v.options:null},[n.draggable]),p=A(function(){a.isClaimed()&&(a.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch(zs()))},[a,r]),m=A(a.isClaimed,[a]),y=$(function(){return{canGetLock:s,tryGetLock:f,findClosestDraggableId:d,findOptionsForDraggable:c,tryReleaseLock:p,isLockClaimed:m}},[s,f,d,c,p,m]),w=0;w{const{apps:e}=ln(),{favoriteApps:t,setFavoriteApps:r}=pi(),[n,i]=E.useState([]);E.useEffect(()=>{let u=[];const s=Object.entries(t).filter(([c,{favorite:p}])=>p).map(([c,{order:p}])=>({...e.find(m=>m.package_name===c),order:p})).filter(c=>c),f=s.filter(c=>c.order!==void 0&&c.order!==null),d=s.filter(c=>c.order===void 0||c.order===null);for(let c=0;cc),d.forEach(c=>u.push(c)),console.log({final:u}),i(u)},[e,t]);const o=ir(),l=(u,s,f)=>{const d=Array.from(u),[c]=d.splice(s,1);return d.splice(f,0,c),d},a=u=>{if(!u.destination)return;const f=l(n,u.source.index,u.destination.index).map(c=>c.package_name),d={...t};f.forEach((c,p)=>{console.log("setting order for",c,"to",p),d[c].order=p}),r(d),console.log({favoriteApps:t}),fetch("/order",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(c=>{console.log({data:c})}).catch(c=>console.error(c))};return b.jsx(yx,{onDragEnd:a,children:b.jsx(Yg,{droppableId:"droppable",direction:"horizontal",children:(u,s)=>b.jsxs("div",{ref:u.innerRef,...u.droppableProps,className:Te("flex-center flex-wrap border border-orange bg-orange/25 p-2 rounded !rounded-xl",{"gap-8":!o&&n.length>0,"gap-4":!o&&n.length===0,"mb-4":!o,"gap-4 mb-2":o,"flex-col":n.length===0}),children:[n.length===0?b.jsx(vu,{app:e.find(f=>f.package_name==="app_store")}):n.map(f=>b.jsx(tE,{draggableId:f.package_name,index:n.indexOf(f),children:(d,c)=>b.jsx("div",{ref:d.innerRef,...d.draggableProps,...d.dragHandleProps,children:b.jsx(vu,{app:f})})},f.package_name)),u.placeholder,n.length===0&&b.jsx("div",{children:"Favorite an app to pin it to your dock."})]})})})},uE=({expanded:e})=>{const{apps:t}=ln(),r=ir();return b.jsx("div",{className:Te("flex-center flex-wrap overflow-y-auto fixed h-screen w-screen backdrop-blur-md transition transition-all ease-in-out duration-500",{"top-[100vh]":!e,"top-0":e,"gap-4 p-8":r,"gap-8 p-16":!r}),children:t.length===0?b.jsx("div",{children:"Loading apps..."}):t.map(n=>b.jsx(vu,{app:n}))})},sE=({package_name:e,widget:t,forceLarge:r})=>{var d,c,p,m,y;const{apps:n}=ln(),{widgetSettings:i,toggleWidgetVisibility:o}=pi(),[l,a]=E.useState(!1),u=ir(),s=r||((d=i[e])==null?void 0:d.size)==="large",f=!((c=i[e])!=null&&c.size)||((p=i[e])==null?void 0:p.size)==="small";return b.jsxs("div",{className:Te("self-stretch flex-col-center shadow-lg rounded-lg relative",{"max-w-1/2 min-w-1/2":s&&!u,"max-w-1/4 min-w-1/4":f&&!u,"w-full":u}),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[b.jsx("h6",{className:"flex-center my-2",children:((m=n.find(w=>w.package_name===e))==null?void 0:m.label)||e}),b.jsx("iframe",{srcDoc:t||"",className:"grow self-stretch","data-widget-code":t}),l&&b.jsx("button",{className:"absolute top-0 left-0 icon",onClick:()=>o(e),children:(y=i[e])!=null&&y.hide?b.jsx(x0,{}):b.jsx(S0,{})})]})},cE=()=>{const{apps:e}=ln(),{widgetSettings:t}=pi(),r=ir();return b.jsx("div",{className:Te("flex-center flex-wrap flex-grow self-stretch",{"gap-2 m-2":r,"gap-4 m-4":!r}),children:e.filter(n=>n.widget).map(({widget:n,package_name:i},o,l)=>{var a;return!((a=t[i])!=null&&a.hide)&&b.jsx(sE,{package_name:i,widget:n,forceLarge:l.length===1})})})},dE=({title:e,onClose:t,children:r})=>{const n=ir();return b.jsx("div",{className:"flex fixed top-0 left-0 w-full h-full bg-black bg-opacity-50 place-items-center place-content-center backdrop-blur-md",children:b.jsxs("div",{className:Te("flex flex-col rounded-lg bg-black py-4 shadow-lg max-h-screen overflow-y-auto",{"min-w-[500px] px-8 w-1/2":!n,"px-4 w-full":n}),children:[b.jsxs("div",{className:"flex",children:[b.jsx("h1",{className:"grow",children:e}),b.jsx("button",{className:"icon self-start",onClick:t,children:b.jsx(b0,{})})]}),r]})})},fE=()=>{const{apps:e,setShowWidgetsSettings:t}=ln(),{widgetSettings:r,toggleWidgetVisibility:n,setWidgetSize:i}=pi();return b.jsx(dE,{title:"Widget Settings",onClose:()=>t(!1),children:b.jsxs("div",{className:"flex-col-center gap-4 mt-4",children:[e.filter(o=>o.widget).map(({label:o,package_name:l})=>{var a,u,s,f;return b.jsxs("div",{className:"flex items-start bg-white/10 rounded p-2 self-stretch",children:[b.jsx("h4",{className:"mr-4 grow",children:o}),b.jsxs("div",{className:"flex flex-col gap-4 grow",children:[b.jsxs("div",{className:"flex-center gap-2",children:[b.jsx("span",{children:"Show widget"}),b.jsxs("div",{className:"flex relative grow",children:[b.jsx("input",{type:"checkbox",checked:!((a=r[l])!=null&&a.hide),onChange:()=>n(l),autoFocus:!0}),!((u=r[l])!=null&&u.hide)&&b.jsx("span",{onClick:()=>n(l),className:"checkmark",children:"✓"})]})]}),b.jsxs("div",{className:"flex-center gap-2",children:[b.jsx("span",{children:"Widget size"}),b.jsxs("div",{className:"flex-center grow",children:[b.jsx("button",{className:Te({clear:((s=r[l])==null?void 0:s.size)==="large"}),onClick:()=>i(l,"small"),children:"Small"}),b.jsx("button",{className:Te({clear:((f=r[l])==null?void 0:f.size)!=="large"}),onClick:()=>i(l,"large"),children:"Large"})]})]})]})]})}),b.jsx("button",{className:"clear",onClick:()=>window.location.href="/settings:settings:sys",children:"Looking for system settings?"})]})})},pE="/assets/valet-icon-COgctyxf.png";function vE(){const[e,t]=E.useState(""),[r,n]=E.useState(""),[i,o]=E.useState(!1),{setApps:l,isHosted:a,fetchHostedStatus:u,showWidgetsSettings:s,setShowWidgetsSettings:f}=ln(),d=ir(),c=()=>{Promise.all([fetch("/apps").then(p=>p.json()),fetch("/main:app_store:sys/apps").then(p=>p.json()),fetch("/version").then(p=>p.text())]).then(([p,m,y])=>{console.log({appsData:p,appStoreData:m,version:y}),n(y);const w=p.map(g=>({...g,is_favorite:!1}));m.forEach(g=>{const v=w.findIndex(h=>h.package_name===g.package);v===-1?w.push({package_name:g.package,path:"",label:g.package,state:g.state,is_favorite:!1}):w[v]={...w[v],state:g.state}}),l(w);for(let g=0;g<5&&w.find(v=>v.package_name==="app_store"&&!v.base64_icon);g++)c()})};return E.useEffect(()=>{c()},[e]),E.useEffect(()=>{fetch("/our").then(p=>p.text()).then(p=>{p.match(/^[a-zA-Z0-9\-\.]+\.[a-zA-Z]+$/)&&(t(p),u(p))})},[e]),b.jsxs("div",{className:Te("flex-col-center relative w-screen overflow-hidden special-bg-homepage min-h-screen",{}),children:[b.jsxs("h5",{className:Te("absolute flex gap-4 c",{"top-8 left-8 right-8":!d,"top-2 left-2 right-2":d}),children:[a&&b.jsx("img",{src:pE,className:"!w-12 !h-12 !p-1 button icon object-cover",onClick:()=>window.location.href=`https://${e.replace(".os","")}.hosting.kinode.net/`}),b.jsx("span",{children:e}),b.jsxs("span",{className:"bg-white/10 rounded p-1",children:["v",r]}),b.jsx("button",{className:"icon ml-auto",onClick:()=>f(!0),children:b.jsx(C0,{})})]}),d?b.jsxs("div",{className:"flex-center gap-4 p-8 mt-8 max-w-screen",children:[b.jsx(cd,{}),b.jsx(sd,{})]}):b.jsxs("div",{className:Te("flex-col-center mx-0 gap-4 mt-8 mb-4"),children:[b.jsx("h3",{className:"text-center",children:"Welcome to"}),b.jsx(sd,{}),b.jsx(cd,{})]}),b.jsx(aE,{}),b.jsx(cE,{}),b.jsxs("button",{className:Te("fixed alt clear flex-center self-center z-20",{"bottom-2 right-2":d,"bottom-8 right-8":!d}),onClick:()=>o(!i),children:[i?b.jsx(y0,{}):b.jsx(w0,{}),b.jsx("span",{className:"ml-2",children:i?"Collapse":"All apps"})]}),b.jsx(uE,{expanded:i}),s&&b.jsx(fE,{})]})}/** + `}},l=[n,r,i,o];return{always:Sn(l,"always"),resting:Sn(l,"resting"),dragging:Sn(l,"dragging"),dropAnimating:Sn(l,"dropAnimating"),userCancel:Sn(l,"userCancel")}},_e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.useLayoutEffect:E.useEffect,ya=function(){var t=document.querySelector("head");return t||I(),t},Yd=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function w2(e,t){var r=$(function(){return y2(e)},[e]),n=E.useRef(null),i=E.useRef(null),o=A(ce(function(d){var c=i.current;c||I(),c.textContent=d}),[]),l=A(function(d){var c=n.current;c||I(),c.textContent=d},[]);_e(function(){!n.current&&!i.current||I();var d=Yd(t),c=Yd(t);return n.current=d,i.current=c,d.setAttribute(en+"-always",e),c.setAttribute(en+"-dynamic",e),ya().appendChild(d),ya().appendChild(c),l(r.always),o(r.resting),function(){var p=function(y){var w=y.current;w||I(),ya().removeChild(w),y.current=null};p(n),p(i)}},[t,l,o,r.always,r.resting,e]);var a=A(function(){return o(r.dragging)},[o,r.dragging]),u=A(function(d){if(d==="DROP"){o(r.dropAnimating);return}o(r.userCancel)},[o,r.dropAnimating,r.userCancel]),s=A(function(){i.current&&o(r.resting)},[o,r.resting]),f=$(function(){return{dragging:a,dropping:u,resting:s}},[a,u,s]);return f}var jg=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Dl(e){return e instanceof jg(e).HTMLElement}function S2(e,t){var r="["+tn.contextId+'="'+e+'"]',n=lg(document.querySelectorAll(r));if(!n.length)return null;var i=or(n,function(o){return o.getAttribute(tn.draggableId)===t});return!i||!Dl(i)?null:i}function x2(e){var t=E.useRef({}),r=E.useRef(null),n=E.useRef(null),i=E.useRef(!1),o=A(function(c,p){var m={id:c,focus:p};return t.current[c]=m,function(){var w=t.current,g=w[c];g!==m&&delete w[c]}},[]),l=A(function(c){var p=S2(e,c);p&&p!==document.activeElement&&p.focus()},[e]),a=A(function(c,p){r.current===c&&(r.current=p)},[]),u=A(function(){n.current||i.current&&(n.current=requestAnimationFrame(function(){n.current=null;var c=r.current;c&&l(c)}))},[l]),s=A(function(c){r.current=null;var p=document.activeElement;p&&p.getAttribute(tn.draggableId)===c&&(r.current=c)},[]);_e(function(){return i.current=!0,function(){i.current=!1;var c=n.current;c&&cancelAnimationFrame(c)}},[]);var f=$(function(){return{register:o,tryRecordFocus:s,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,s,u,a]);return f}function E2(){var e={draggables:{},droppables:{}},t=[];function r(d){return t.push(d),function(){var p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function n(d){t.length&&t.forEach(function(c){return c(d)})}function i(d){return e.draggables[d]||null}function o(d){var c=i(d);return c||I(),c}var l={register:function(c){e.draggables[c.descriptor.id]=c,n({type:"ADDITION",value:c})},update:function(c,p){var m=e.draggables[p.descriptor.id];m&&m.uniqueId===c.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[c.descriptor.id]=c)},unregister:function(c){var p=c.descriptor.id,m=i(p);m&&c.uniqueId===m.uniqueId&&(delete e.draggables[p],n({type:"REMOVAL",value:c}))},getById:o,findById:i,exists:function(c){return!!i(c)},getAllByType:function(c){return $o(e.draggables).filter(function(p){return p.descriptor.type===c})}};function a(d){return e.droppables[d]||null}function u(d){var c=a(d);return c||I(),c}var s={register:function(c){e.droppables[c.descriptor.id]=c},unregister:function(c){var p=a(c.descriptor.id);p&&c.uniqueId===p.uniqueId&&delete e.droppables[c.descriptor.id]},getById:u,findById:a,exists:function(c){return!!a(c)},getAllByType:function(c){return $o(e.droppables).filter(function(p){return p.descriptor.type===c})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:s,subscribe:r,clean:f}}function C2(){var e=$(E2,[]);return E.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Qs=z.createContext(null),_o=function(){var e=document.body;return e||I(),e},b2={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},D2=function(t){return"rbd-announcement-"+t};function P2(e){var t=$(function(){return D2(e)},[e]),r=E.useRef(null);E.useEffect(function(){var o=document.createElement("div");return r.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),L(o.style,b2),_o().appendChild(o),function(){setTimeout(function(){var u=_o();u.contains(o)&&u.removeChild(o),o===r.current&&(r.current=null)})}},[t]);var n=A(function(i){var o=r.current;if(o){o.textContent=i;return}},[]);return n}var I2=0,N2={separator:"::"};function Ks(e,t){return t===void 0&&(t=N2),$(function(){return""+e+t.separator+I2++},[t.separator,e])}function O2(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function R2(e){var t=e.contextId,r=e.text,n=Ks("hidden-text",{separator:"-"}),i=$(function(){return O2({contextId:t,uniqueId:n})},[n,t]);return E.useEffect(function(){var l=document.createElement("div");return l.id=i,l.textContent=r,l.style.display="none",_o().appendChild(l),function(){var u=_o();u.contains(l)&&u.removeChild(l)}},[i,r]),i}var Pl=z.createContext(null);function zg(e){var t=E.useRef(e);return E.useEffect(function(){t.current=e}),t}function k2(){var e=null;function t(){return!!e}function r(l){return l===e}function n(l){e&&I();var a={abandon:l};return e=a,a}function i(){e||I(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:r,claim:n,release:i,tryAbandon:o}}var T2=9,A2=13,Ys=27,$g=32,L2=33,M2=34,B2=35,F2=36,j2=37,z2=38,$2=39,U2=40,Gi,_2=(Gi={},Gi[A2]=!0,Gi[T2]=!0,Gi),Ug=function(e){_2[e.keyCode]&&e.preventDefault()},Il=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=or(t,function(n){return"on"+n in document});return r||e}(),_g=0,Xd=5;function W2(e,t){return Math.abs(t.x-e.x)>=Xd||Math.abs(t.y-e.y)>=Xd}var Zd={type:"IDLE"};function H2(e){var t=e.cancel,r=e.completed,n=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(l){var a=l.button,u=l.clientX,s=l.clientY;if(a===_g){var f={x:u,y:s},d=n();if(d.type==="DRAGGING"){l.preventDefault(),d.actions.move(f);return}d.type!=="PENDING"&&I();var c=d.point;if(W2(c,f)){l.preventDefault();var p=d.actions.fluidLift(f);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(l){var a=n();if(a.type!=="DRAGGING"){t();return}l.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(l){n().type==="DRAGGING"&&l.preventDefault(),t()}},{eventName:"keydown",fn:function(l){var a=n();if(a.type==="PENDING"){t();return}if(l.keyCode===Ys){l.preventDefault(),t();return}Ug(l)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(l){var a=n();if(a.type==="IDLE"&&I(),a.actions.shouldRespectForcePress()){t();return}l.preventDefault()}},{eventName:Il,fn:t}]}function V2(e){var t=E.useRef(Zd),r=E.useRef(Qt),n=$(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===_g&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var c=e.findClosestDraggableId(d);if(c){var p=e.tryGetLock(c,l,{sourceEvent:d});if(p){d.preventDefault();var m={x:d.clientX,y:d.clientY};r.current(),s(p,m)}}}}}},[e]),i=$(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var c=e.findClosestDraggableId(d);if(c){var p=e.findOptionsForDraggable(c);p&&(p.shouldRespectForcePress||e.canGetLock(c)&&d.preventDefault())}}}}},[e]),o=A(function(){var d={passive:!1,capture:!0};r.current=et(window,[i,n],d)},[i,n]),l=A(function(){var f=t.current;f.type!=="IDLE"&&(t.current=Zd,r.current(),o())},[o]),a=A(function(){var f=t.current;l(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[l]),u=A(function(){var d={capture:!0,passive:!1},c=H2({cancel:a,completed:l,getPhase:function(){return t.current},setPhase:function(m){t.current=m}});r.current=et(window,c,d)},[a,l]),s=A(function(d,c){t.current.type!=="IDLE"&&I(),t.current={type:"PENDING",point:c,actions:d},u()},[u]);_e(function(){return o(),function(){r.current()}},[o])}var Dr;function G2(){}var q2=(Dr={},Dr[M2]=!0,Dr[L2]=!0,Dr[F2]=!0,Dr[B2]=!0,Dr);function Q2(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Ys){o.preventDefault(),r();return}if(o.keyCode===$g){o.preventDefault(),n();return}if(o.keyCode===U2){o.preventDefault(),e.moveDown();return}if(o.keyCode===z2){o.preventDefault(),e.moveUp();return}if(o.keyCode===$2){o.preventDefault(),e.moveRight();return}if(o.keyCode===j2){o.preventDefault(),e.moveLeft();return}if(q2[o.keyCode]){o.preventDefault();return}Ug(o)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:Il,fn:r}]}function K2(e){var t=E.useRef(G2),r=$(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==$g)return;var l=e.findClosestDraggableId(o);if(!l)return;var a=e.tryGetLock(l,f,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,s=a.snapLift();t.current();function f(){u||I(),u=!1,t.current(),n()}t.current=et(window,Q2(s,f),{capture:!0,passive:!1})}}},[e]),n=A(function(){var o={passive:!1,capture:!0};t.current=et(window,[r],o)},[r]);_e(function(){return n(),function(){t.current()}},[n])}var wa={type:"IDLE"},Y2=120,X2=.15;function Z2(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(r().type!=="DRAGGING"){t();return}i.keyCode===Ys&&i.preventDefault(),t()}},{eventName:Il,fn:t}]}function J2(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var l=n();if(l.type!=="DRAGGING"){t();return}l.hasMoved=!0;var a=o.touches[0],u=a.clientX,s=a.clientY,f={x:u,y:s};o.preventDefault(),l.actions.move(f)}},{eventName:"touchend",fn:function(o){var l=n();if(l.type!=="DRAGGING"){t();return}o.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var l=n();l.type==="IDLE"&&I();var a=o.touches[0];if(a){var u=a.force>=X2;if(u){var s=l.actions.shouldRespectForcePress();if(l.type==="PENDING"){s&&t();return}if(s){if(l.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:Il,fn:t}]}function ex(e){var t=E.useRef(wa),r=E.useRef(Qt),n=A(function(){return t.current},[]),i=A(function(p){t.current=p},[]),o=$(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var m=e.findClosestDraggableId(p);if(m){var y=e.tryGetLock(m,a,{sourceEvent:p});if(y){var w=p.touches[0],g=w.clientX,v=w.clientY,h={x:g,y:v};r.current(),d(y,h)}}}}}},[e]),l=A(function(){var p={capture:!0,passive:!1};r.current=et(window,[o],p)},[o]),a=A(function(){var c=t.current;c.type!=="IDLE"&&(c.type==="PENDING"&&clearTimeout(c.longPressTimerId),i(wa),r.current(),l())},[l,i]),u=A(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=A(function(){var p={capture:!0,passive:!1},m={cancel:u,completed:a,getPhase:n},y=et(window,J2(m),p),w=et(window,Z2(m),p);r.current=function(){y(),w()}},[u,n,a]),f=A(function(){var p=n();p.type!=="PENDING"&&I();var m=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:m,hasMoved:!1})},[n,i]),d=A(function(p,m){n().type!=="IDLE"&&I();var y=setTimeout(f,Y2);i({type:"PENDING",point:m,actions:p,longPressTimerId:y}),s()},[s,n,i,f]);_e(function(){return l(),function(){r.current();var m=n();m.type==="PENDING"&&(clearTimeout(m.longPressTimerId),i(wa))}},[n,l,i]),_e(function(){var p=et(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var tx={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Wg(e,t){if(t==null)return!1;var r=!!tx[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:Wg(e,t.parentElement)}function rx(e,t){var r=t.target;return Dl(r)?Wg(e,r):!1}var nx=function(e){return st(e.getBoundingClientRect()).center};function ix(e){return e instanceof jg(e).Element}var ox=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=or(t,function(n){return n in Element.prototype});return r||e}();function Hg(e,t){return e==null?null:e[ox](t)?e:Hg(e.parentElement,t)}function lx(e,t){return e.closest?e.closest(t):Hg(e,t)}function ax(e){return"["+tn.contextId+'="'+e+'"]'}function ux(e,t){var r=t.target;if(!ix(r))return null;var n=ax(e),i=lx(r,n);return!i||!Dl(i)?null:i}function sx(e,t){var r=ux(e,t);return r?r.getAttribute(tn.draggableId):null}function cx(e,t){var r="["+xu.contextId+'="'+e+'"]',n=lg(document.querySelectorAll(r)),i=or(n,function(o){return o.getAttribute(xu.id)===t});return!i||!Dl(i)?null:i}function dx(e){e.preventDefault()}function qi(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function Vg(e){var t=e.lockAPI,r=e.store,n=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=n.draggable.findById(i);return!(!o||!o.options.isEnabled||!Lg(r.getState(),i))}function fx(e){var t=e.lockAPI,r=e.contextId,n=e.store,i=e.registry,o=e.draggableId,l=e.forceSensorStop,a=e.sourceEvent,u=Vg({lockAPI:t,store:n,registry:i,draggableId:o});if(!u)return null;var s=i.draggable.getById(o),f=cx(r,s.descriptor.id);if(!f||a&&!s.options.canDragInteractiveElements&&rx(f,a))return null;var d=t.claim(l||Qt),c="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function m(){return t.isActive(d)}function y(C,P){qi({expected:C,phase:c,isLockActive:m,shouldWarn:!0})&&n.dispatch(P())}var w=y.bind(null,"DRAGGING");function g(C){function P(){t.release(),c="COMPLETED"}c!=="PRE_DRAG"&&(P(),c!=="PRE_DRAG"&&I()),n.dispatch(oS(C.liftActionArgs)),c="DRAGGING";function N(T,k){if(k===void 0&&(k={shouldBlockNextClick:!1}),C.cleanup(),k.shouldBlockNextClick){var F=et(window,[{eventName:"click",fn:dx,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(F)}P(),n.dispatch(Ig({reason:T}))}return L({isActive:function(){return qi({expected:"DRAGGING",phase:c,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(k){return N("DROP",k)},cancel:function(k){return N("CANCEL",k)}},C.actions)}function v(C){var P=ni(function(T){w(function(){return Pg({client:T})})}),N=g({liftActionArgs:{id:o,clientSelection:C,movementMode:"FLUID"},cleanup:function(){return P.cancel()},actions:{move:P}});return L({},N,{move:P})}function h(){var C={moveUp:function(){return w(vS)},moveRight:function(){return w(mS)},moveDown:function(){return w(gS)},moveLeft:function(){return w(hS)}};return g({liftActionArgs:{id:o,clientSelection:nx(f),movementMode:"SNAP"},cleanup:Qt,actions:C})}function S(){var C=qi({expected:"PRE_DRAG",phase:c,isLockActive:m,shouldWarn:!0});C&&t.release()}var x={isActive:function(){return qi({expected:"PRE_DRAG",phase:c,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:v,snapLift:h,abort:S};return x}var px=[V2,K2,ex];function vx(e){var t=e.contextId,r=e.store,n=e.registry,i=e.customSensors,o=e.enableDefaultSensors,l=[].concat(o?px:[],i||[]),a=E.useState(function(){return k2()})[0],u=A(function(v,h){v.isDragging&&!h.isDragging&&a.tryAbandon()},[a]);_e(function(){var v=r.getState(),h=r.subscribe(function(){var S=r.getState();u(v,S),v=S});return h},[a,r,u]),_e(function(){return a.tryAbandon},[a.tryAbandon]);for(var s=A(function(g){return Vg({lockAPI:a,registry:n,store:r,draggableId:g})},[a,n,r]),f=A(function(g,v,h){return fx({lockAPI:a,registry:n,contextId:t,store:r,draggableId:g,forceSensorStop:v,sourceEvent:h&&h.sourceEvent?h.sourceEvent:null})},[t,a,n,r]),d=A(function(g){return sx(t,g)},[t]),c=A(function(g){var v=n.draggable.findById(g);return v?v.options:null},[n.draggable]),p=A(function(){a.isClaimed()&&(a.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch($s()))},[a,r]),m=A(a.isClaimed,[a]),y=$(function(){return{canGetLock:s,tryGetLock:f,findClosestDraggableId:d,findOptionsForDraggable:c,tryReleaseLock:p,isLockClaimed:m}},[s,f,d,c,p,m]),w=0;w{const{apps:e}=ln(),{favoriteApps:t,setFavoriteApps:r}=vi(),[n,i]=E.useState([]);E.useEffect(()=>{let u=[];const s=Object.entries(t).filter(([c,{favorite:p}])=>p).map(([c,{order:p}])=>({...e.find(m=>m.package_name===c),order:p})).filter(c=>c),f=s.filter(c=>c.order!==void 0&&c.order!==null),d=s.filter(c=>c.order===void 0||c.order===null);for(let c=0;cc),d.forEach(c=>u.push(c)),console.log({final:u}),i(u)},[e,t]);const o=ir(),l=(u,s,f)=>{const d=Array.from(u),[c]=d.splice(s,1);return d.splice(f,0,c),d},a=u=>{if(!u.destination)return;const f=l(n,u.source.index,u.destination.index).map(c=>c.package_name),d={...t};f.forEach((c,p)=>{console.log("setting order for",c,"to",p),d[c].order=p}),r(d),console.log({favoriteApps:t}),fetch(Pn("/order"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(f)}).then(c=>{console.log({data:c})}).catch(c=>console.error(c))};return b.jsx(wx,{onDragEnd:a,children:b.jsx(Xg,{droppableId:"droppable",direction:"horizontal",children:(u,s)=>b.jsxs("div",{ref:u.innerRef,...u.droppableProps,className:Te("flex-center flex-wrap border border-orange bg-orange/25 p-2 rounded !rounded-xl",{"gap-8":!o&&n.length>0,"gap-4":!o&&n.length===0,"mb-4":!o,"gap-4 mb-2":o,"flex-col":n.length===0}),children:[n.length===0?b.jsx(gu,{app:e.find(f=>f.package_name==="app_store")}):n.map(f=>b.jsx(rE,{draggableId:f.package_name,index:n.indexOf(f),children:(d,c)=>b.jsx("div",{ref:d.innerRef,...d.draggableProps,...d.dragHandleProps,children:b.jsx(gu,{app:f})})},f.package_name)),u.placeholder,n.length===0&&b.jsx("div",{children:"Favorite an app to pin it to your dock."})]})})})},sE=({expanded:e})=>{const{apps:t}=ln(),r=ir();return b.jsx("div",{className:Te("flex-center flex-wrap overflow-y-auto fixed h-screen w-screen backdrop-blur-md transition transition-all ease-in-out duration-500",{"top-[100vh]":!e,"top-0":e,"gap-4 p-8":r,"gap-8 p-16":!r}),children:t.length===0?b.jsx("div",{children:"Loading apps..."}):t.map(n=>b.jsx(gu,{app:n},n.package_name))})},cE=({package_name:e,widget:t,forceLarge:r})=>{var d,c,p,m,y;const{apps:n}=ln(),{widgetSettings:i,toggleWidgetVisibility:o}=vi(),[l,a]=E.useState(!1),u=ir(),s=r||((d=i[e])==null?void 0:d.size)==="large",f=!((c=i[e])!=null&&c.size)||((p=i[e])==null?void 0:p.size)==="small";return b.jsxs("div",{className:Te("self-stretch flex-col-center shadow-lg rounded-lg relative",{"max-w-1/2 min-w-1/2":s&&!u,"max-w-1/4 min-w-1/4":f&&!u,"w-full":u}),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[b.jsx("h6",{className:"flex-center my-2",children:((m=n.find(w=>w.package_name===e))==null?void 0:m.label)||e}),b.jsx("iframe",{srcDoc:t||"",className:"grow self-stretch","data-widget-code":t}),l&&b.jsx("button",{className:"absolute top-0 left-0 icon",onClick:()=>o(e),children:(y=i[e])!=null&&y.hide?b.jsx(E0,{}):b.jsx(x0,{})})]})},dE=()=>{const{apps:e}=ln(),{widgetSettings:t}=vi(),r=ir();return b.jsx("div",{className:Te("flex-center flex-wrap flex-grow self-stretch",{"gap-2 m-2":r,"gap-4 m-4":!r}),children:e.filter(n=>n.widget).map(({widget:n,package_name:i},o,l)=>{var a;return!((a=t[i])!=null&&a.hide)&&b.jsx(cE,{package_name:i,widget:n,forceLarge:l.length===1},i)})})},fE=({title:e,onClose:t,children:r})=>{const n=ir();return b.jsx("div",{className:"flex fixed top-0 left-0 w-full h-full bg-black bg-opacity-50 place-items-center place-content-center backdrop-blur-md",children:b.jsxs("div",{className:Te("flex flex-col rounded-lg bg-black py-4 shadow-lg max-h-screen overflow-y-auto",{"min-w-[500px] px-8 w-1/2":!n,"px-4 w-full":n}),children:[b.jsxs("div",{className:"flex",children:[b.jsx("h1",{className:"grow",children:e}),b.jsx("button",{className:"icon self-start",onClick:t,children:b.jsx(D0,{})})]}),r]})})},pE=()=>{const{apps:e,setShowWidgetsSettings:t}=ln(),{widgetSettings:r,toggleWidgetVisibility:n,setWidgetSize:i}=vi();return b.jsx(fE,{title:"Widget Settings",onClose:()=>t(!1),children:b.jsxs("div",{className:"flex-col-center gap-4 mt-4",children:[e.filter(o=>o.widget).map(({label:o,package_name:l})=>{var a,u,s,f;return b.jsxs("div",{className:"flex items-start bg-white/10 rounded p-2 self-stretch",children:[b.jsx("h4",{className:"mr-4 grow",children:o}),b.jsxs("div",{className:"flex flex-col gap-4 grow",children:[b.jsxs("div",{className:"flex-center gap-2",children:[b.jsx("span",{children:"Show widget"}),b.jsxs("div",{className:"flex relative grow",children:[b.jsx("input",{type:"checkbox",checked:!((a=r[l])!=null&&a.hide),onChange:()=>n(l),autoFocus:!0}),!((u=r[l])!=null&&u.hide)&&b.jsx("span",{onClick:()=>n(l),className:"checkmark",children:"✓"})]})]}),b.jsxs("div",{className:"flex-center gap-2",children:[b.jsx("span",{children:"Widget size"}),b.jsxs("div",{className:"flex-center grow",children:[b.jsx("button",{className:Te({clear:((s=r[l])==null?void 0:s.size)==="large"}),onClick:()=>i(l,"small"),children:"Small"}),b.jsx("button",{className:Te({clear:((f=r[l])==null?void 0:f.size)!=="large"}),onClick:()=>i(l,"large"),children:"Large"})]})]})]})]})}),b.jsx("button",{className:"clear",onClick:()=>window.location.href="/settings:settings:sys",children:"Looking for system settings?"})]})})},vE="/assets/valet-icon-COgctyxf.png";function gE(){const[e,t]=E.useState(""),[r,n]=E.useState(""),[i,o]=E.useState(!1),{setApps:l,isHosted:a,fetchHostedStatus:u,showWidgetsSettings:s,setShowWidgetsSettings:f}=ln(),d=ir(),c=()=>{Promise.all([fetch(Pn("/apps"),{credentials:"include"}).then(p=>p.json()).catch(()=>[]),fetch(Pn("/main:app_store:sys/apps"),{credentials:"include"}).then(p=>p.json()).catch(()=>[]),fetch(Pn("/version"),{credentials:"include"}).then(p=>p.text()).catch(()=>"")]).then(([p,m,y])=>{console.log({appsData:p,appStoreData:m,version:y}),n(y);const w=p.map(g=>({...g,is_favorite:!1}));m.forEach(g=>{const v=w.findIndex(h=>h.package_name===g.package);v===-1?w.push({package_name:g.package,path:"",label:g.package,state:g.state,is_favorite:!1}):w[v]={...w[v],state:g.state}}),l(w);for(let g=0;g<5&&w.find(v=>v.package_name==="app_store"&&!v.base64_icon);g++)c()})};return E.useEffect(()=>{c()},[e]),E.useEffect(()=>{fetch(Pn("/our"),{credentials:"include"}).then(p=>p.text()).then(p=>{p.match(/^[a-zA-Z0-9\-\.]+\.[a-zA-Z]+$/)&&(t(p),u(p))})},[e]),b.jsxs("div",{className:Te("flex-col-center relative w-screen overflow-hidden special-bg-homepage min-h-screen",{}),children:[b.jsxs("h5",{className:Te("absolute flex gap-4 c",{"top-8 left-8 right-8":!d,"top-2 left-2 right-2":d}),children:[a&&b.jsx("img",{src:vE,className:"!w-12 !h-12 !p-1 button icon object-cover",onClick:()=>window.location.href=`https://${e.replace(".os","")}.hosting.kinode.net/`}),b.jsx("span",{children:e}),b.jsxs("span",{className:"bg-white/10 rounded p-1",children:["v",r]}),b.jsx("button",{className:"icon ml-auto",onClick:()=>f(!0),children:b.jsx(b0,{})})]}),d?b.jsxs("div",{className:"flex-center gap-4 p-8 mt-8 max-w-screen",children:[b.jsx(dd,{}),b.jsx(cd,{})]}):b.jsxs("div",{className:Te("flex-col-center mx-0 gap-4 mt-8 mb-4"),children:[b.jsx("h3",{className:"text-center",children:"Welcome to"}),b.jsx(cd,{}),b.jsx(dd,{})]}),b.jsx(uE,{}),b.jsx(dE,{}),b.jsxs("button",{className:Te("fixed alt clear flex-center self-center z-20",{"bottom-2 right-2":d,"bottom-8 right-8":!d}),onClick:()=>o(!i),children:[i?b.jsx(w0,{}):b.jsx(S0,{}),b.jsx("span",{className:"ml-2",children:i?"Collapse":"All apps"})]}),b.jsx(sE,{expanded:i}),s&&b.jsx(pE,{})]})}/** * @remix-run/router v1.16.0 * * Copyright (c) Remix Software Inc. @@ -133,7 +133,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Xg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mE(){return Math.random().toString(36).substr(2,8)}function of(e,t){return{usr:e.state,key:e.key,idx:t}}function Eu(e,t,r,n){return r===void 0&&(r=null),Wo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Il(t):t,{state:r,key:t&&t.key||n||mE()})}function Zg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Il(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function hE(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,l=i.history,a=zt.Pop,u=null,s=f();s==null&&(s=0,l.replaceState(Wo({},l.state,{idx:s}),""));function f(){return(l.state||{idx:null}).idx}function d(){a=zt.Pop;let w=f(),g=w==null?null:w-s;s=w,u&&u({action:a,location:y.location,delta:g})}function c(w,g){a=zt.Push;let v=Eu(y.location,w,g);s=f()+1;let h=of(v,s),S=y.createHref(v);try{l.pushState(h,"",S)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(S)}o&&u&&u({action:a,location:y.location,delta:1})}function p(w,g){a=zt.Replace;let v=Eu(y.location,w,g);s=f();let h=of(v,s),S=y.createHref(v);l.replaceState(h,"",S),o&&u&&u({action:a,location:y.location,delta:0})}function m(w){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Zg(w);return v=v.replace(/ $/,"%20"),Be(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let y={get action(){return a},get location(){return e(i,l)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(nf,d),u=w,()=>{i.removeEventListener(nf,d),u=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let g=m(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:c,replace:p,go(w){return l.go(w)}};return y}var lf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lf||(lf={}));function yE(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Il(t):t,i=tm(n.pathname||"/",r);if(i==null)return null;let o=Jg(e);wE(o);let l=null;for(let a=0;l==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(Be(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let s=Hr([n,u.relativePath]),f=r.concat(u);o.children&&o.children.length>0&&(Be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Jg(o.children,t,f,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:PE(s,o.index),routesMeta:f})};return e.forEach((o,l)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,l);else for(let u of em(o.path))i(o,l,u)}),t}function em(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let l=em(n.join("/")),a=[];return a.push(...l.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...l),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function wE(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:IE(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const SE=/^:[\w-]+$/,xE=3,EE=2,CE=1,bE=10,DE=-2,af=e=>e==="*";function PE(e,t){let r=e.split("/"),n=r.length;return r.some(af)&&(n+=DE),t&&(n+=EE),r.filter(i=>!af(i)).reduce((i,o)=>i+(SE.test(o)?xE:o===""?CE:bE),n)}function IE(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function NE(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let l=0;l{let{paramName:c,isOptional:p}=f;if(c==="*"){let y=a[d]||"";l=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[d];return p&&!m?s[c]=void 0:s[c]=(m||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:l,pattern:e}}function RE(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Xg(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,a,u)=>(n.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function kE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xg(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Hr=e=>e.join("/").replace(/\/\/+/g,"/"),TE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function AE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rm=["post","put","patch","delete"];new Set(rm);const LE=["get",...rm];new Set(LE);/** + */function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Zg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hE(){return Math.random().toString(36).substr(2,8)}function lf(e,t){return{usr:e.state,key:e.key,idx:t}}function Cu(e,t,r,n){return r===void 0&&(r=null),Ho({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Nl(t):t,{state:r,key:t&&t.key||n||hE()})}function Jg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Nl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yE(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,l=i.history,a=zt.Pop,u=null,s=f();s==null&&(s=0,l.replaceState(Ho({},l.state,{idx:s}),""));function f(){return(l.state||{idx:null}).idx}function d(){a=zt.Pop;let w=f(),g=w==null?null:w-s;s=w,u&&u({action:a,location:y.location,delta:g})}function c(w,g){a=zt.Push;let v=Cu(y.location,w,g);s=f()+1;let h=lf(v,s),S=y.createHref(v);try{l.pushState(h,"",S)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(S)}o&&u&&u({action:a,location:y.location,delta:1})}function p(w,g){a=zt.Replace;let v=Cu(y.location,w,g);s=f();let h=lf(v,s),S=y.createHref(v);l.replaceState(h,"",S),o&&u&&u({action:a,location:y.location,delta:0})}function m(w){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Jg(w);return v=v.replace(/ $/,"%20"),Be(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let y={get action(){return a},get location(){return e(i,l)},listen(w){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(of,d),u=w,()=>{i.removeEventListener(of,d),u=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let g=m(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:c,replace:p,go(w){return l.go(w)}};return y}var af;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(af||(af={}));function wE(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Nl(t):t,i=rm(n.pathname||"/",r);if(i==null)return null;let o=em(e);SE(o);let l=null;for(let a=0;l==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(Be(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let s=Hr([n,u.relativePath]),f=r.concat(u);o.children&&o.children.length>0&&(Be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),em(o.children,t,f,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:IE(s,o.index),routesMeta:f})};return e.forEach((o,l)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,l);else for(let u of tm(o.path))i(o,l,u)}),t}function tm(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let l=tm(n.join("/")),a=[];return a.push(...l.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...l),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function SE(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:NE(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const xE=/^:[\w-]+$/,EE=3,CE=2,bE=1,DE=10,PE=-2,uf=e=>e==="*";function IE(e,t){let r=e.split("/"),n=r.length;return r.some(uf)&&(n+=PE),t&&(n+=CE),r.filter(i=>!uf(i)).reduce((i,o)=>i+(xE.test(o)?EE:o===""?bE:DE),n)}function NE(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function OE(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let l=0;l{let{paramName:c,isOptional:p}=f;if(c==="*"){let y=a[d]||"";l=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[d];return p&&!m?s[c]=void 0:s[c]=(m||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:l,pattern:e}}function kE(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Zg(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,a,u)=>(n.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function TE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Zg(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function rm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Hr=e=>e.join("/").replace(/\/\/+/g,"/"),AE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function LE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const nm=["post","put","patch","delete"];new Set(nm);const ME=["get",...nm];new Set(ME);/** * React Router v6.23.0 * * Copyright (c) Remix Software Inc. @@ -142,7 +142,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},w,{params:Object.assign({},a,w.params),pathname:Hr([u,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:Hr([u,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return t&&y?E.createElement(Nl.Provider,{value:{location:Ho({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:zt.Pop}},y):y}function $E(){let e=QE(),t=AE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:i},r):null,null)}const UE=E.createElement($E,null);class _E extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?E.createElement(Ol.Provider,{value:this.props.routeContext},E.createElement(im.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function WE(e){let{routeContext:t,match:r,children:n}=e,i=E.useContext(ME);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(Ol.Provider,{value:t},n)}function HE(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let l=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let f=l.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Be(!1),l=l.slice(0,Math.min(l.length,f+1))}let u=!1,s=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?l=l.slice(0,s+1):l=[l[0]];break}}}return l.reduceRight((f,d,c)=>{let p,m=!1,y=null,w=null;r&&(p=a&&d.route.id?a[d.route.id]:void 0,y=d.route.errorElement||UE,u&&(s<0&&c===0?(m=!0,w=null):s===c&&(m=!0,w=d.route.hydrateFallbackElement||null)));let g=t.concat(l.slice(0,c+1)),v=()=>{let h;return p?h=y:m?h=w:d.route.Component?h=E.createElement(d.route.Component,null):d.route.element?h=d.route.element:h=f,E.createElement(WE,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:h})};return r&&(d.route.ErrorBoundary||d.route.errorElement||c===0)?E.createElement(_E,{location:r.location,revalidation:r.revalidation,component:y,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var Cu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cu||{});function VE(e){let t=E.useContext(BE);return t||Be(!1),t}function GE(e){let t=E.useContext(Ol);return t||Be(!1),t}function qE(e){let t=GE(),r=t.matches[t.matches.length-1];return r.route.id||Be(!1),r.route.id}function QE(){var e;let t=E.useContext(im),r=VE(Cu.UseRouteError),n=qE(Cu.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function bu(e){Be(!1)}function KE(e){let{basename:t="/",children:r=null,location:n,navigationType:i=zt.Pop,navigator:o,static:l=!1,future:a}=e;Xs()&&Be(!1);let u=t.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:u,navigator:o,static:l,future:Ho({v7_relativeSplatPath:!1},a)}),[u,a,o,l]);typeof n=="string"&&(n=Il(n));let{pathname:f="/",search:d="",hash:c="",state:p=null,key:m="default"}=n,y=E.useMemo(()=>{let w=tm(f,u);return w==null?null:{location:{pathname:w,search:d,hash:c,state:p,key:m},navigationType:i}},[u,f,d,c,p,m,i]);return y==null?null:E.createElement(nm.Provider,{value:s},E.createElement(Nl.Provider,{children:r,value:y}))}function YE(e){let{children:t,location:r}=e;return jE(Du(t),r)}new Promise(()=>{});function Du(e,t){t===void 0&&(t=[]);let r=[];return E.Children.forEach(e,(n,i)=>{if(!E.isValidElement(n))return;let o=[...t,i];if(n.type===E.Fragment){r.push.apply(r,Du(n.props.children,o));return}n.type!==bu&&Be(!1),!n.props.index||!n.props.children||Be(!1);let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=Du(n.props.children,o)),r.push(l)}),r}/** + */function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},w,{params:Object.assign({},a,w.params),pathname:Hr([u,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:Hr([u,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return t&&y?E.createElement(Ol.Provider,{value:{location:Vo({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:zt.Pop}},y):y}function UE(){let e=KE(),t=LE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:i},r):null,null)}const _E=E.createElement(UE,null);class WE extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?E.createElement(Rl.Provider,{value:this.props.routeContext},E.createElement(om.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HE(e){let{routeContext:t,match:r,children:n}=e,i=E.useContext(BE);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(Rl.Provider,{value:t},n)}function VE(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let l=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let f=l.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Be(!1),l=l.slice(0,Math.min(l.length,f+1))}let u=!1,s=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?l=l.slice(0,s+1):l=[l[0]];break}}}return l.reduceRight((f,d,c)=>{let p,m=!1,y=null,w=null;r&&(p=a&&d.route.id?a[d.route.id]:void 0,y=d.route.errorElement||_E,u&&(s<0&&c===0?(m=!0,w=null):s===c&&(m=!0,w=d.route.hydrateFallbackElement||null)));let g=t.concat(l.slice(0,c+1)),v=()=>{let h;return p?h=y:m?h=w:d.route.Component?h=E.createElement(d.route.Component,null):d.route.element?h=d.route.element:h=f,E.createElement(HE,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:h})};return r&&(d.route.ErrorBoundary||d.route.errorElement||c===0)?E.createElement(WE,{location:r.location,revalidation:r.revalidation,component:y,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var bu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(bu||{});function GE(e){let t=E.useContext(FE);return t||Be(!1),t}function qE(e){let t=E.useContext(Rl);return t||Be(!1),t}function QE(e){let t=qE(),r=t.matches[t.matches.length-1];return r.route.id||Be(!1),r.route.id}function KE(){var e;let t=E.useContext(om),r=GE(bu.UseRouteError),n=QE(bu.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Du(e){Be(!1)}function YE(e){let{basename:t="/",children:r=null,location:n,navigationType:i=zt.Pop,navigator:o,static:l=!1,future:a}=e;Zs()&&Be(!1);let u=t.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:u,navigator:o,static:l,future:Vo({v7_relativeSplatPath:!1},a)}),[u,a,o,l]);typeof n=="string"&&(n=Nl(n));let{pathname:f="/",search:d="",hash:c="",state:p=null,key:m="default"}=n,y=E.useMemo(()=>{let w=rm(f,u);return w==null?null:{location:{pathname:w,search:d,hash:c,state:p,key:m},navigationType:i}},[u,f,d,c,p,m,i]);return y==null?null:E.createElement(im.Provider,{value:s},E.createElement(Ol.Provider,{children:r,value:y}))}function XE(e){let{children:t,location:r}=e;return zE(Pu(t),r)}new Promise(()=>{});function Pu(e,t){t===void 0&&(t=[]);let r=[];return E.Children.forEach(e,(n,i)=>{if(!E.isValidElement(n))return;let o=[...t,i];if(n.type===E.Fragment){r.push.apply(r,Pu(n.props.children,o));return}n.type!==Du&&Be(!1),!n.props.index||!n.props.children||Be(!1);let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=Pu(n.props.children,o)),r.push(l)}),r}/** * React Router DOM v6.23.0 * * Copyright (c) Remix Software Inc. @@ -151,4 +151,4 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const XE="6";try{window.__reactRouterVersion=XE}catch{}const ZE="startTransition",uf=Em[ZE];function JE(e){let{basename:t,children:r,future:n,window:i}=e,o=E.useRef();o.current==null&&(o.current=gE({window:i,v5Compat:!0}));let l=o.current,[a,u]=E.useState({action:l.action,location:l.location}),{v7_startTransition:s}=n||{},f=E.useCallback(d=>{s&&uf?uf(()=>u(d)):u(d)},[u,s]);return E.useLayoutEffect(()=>l.listen(f),[l,f]),E.createElement(KE,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:l,future:n})}var sf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(sf||(sf={}));var cf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(cf||(cf={}));const eC=()=>b.jsx("div",{children:"Settings go here!"});xa.createRoot(document.getElementById("root")).render(b.jsx(z.StrictMode,{children:b.jsx(JE,{children:b.jsxs(YE,{children:[b.jsx(bu,{path:"/",element:b.jsx(vE,{})}),b.jsx(bu,{path:"/settings",element:b.jsx(eC,{})})]})})})); + */const ZE="6";try{window.__reactRouterVersion=ZE}catch{}const JE="startTransition",sf=Cm[JE];function eC(e){let{basename:t,children:r,future:n,window:i}=e,o=E.useRef();o.current==null&&(o.current=mE({window:i,v5Compat:!0}));let l=o.current,[a,u]=E.useState({action:l.action,location:l.location}),{v7_startTransition:s}=n||{},f=E.useCallback(d=>{s&&sf?sf(()=>u(d)):u(d)},[u,s]);return E.useLayoutEffect(()=>l.listen(f),[l,f]),E.createElement(YE,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:l,future:n})}var cf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cf||(cf={}));var df;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(df||(df={}));const tC=()=>b.jsx("div",{children:"Settings go here!"});Ea.createRoot(document.getElementById("root")).render(b.jsx(z.StrictMode,{children:b.jsx(eC,{children:b.jsxs(XE,{children:[b.jsx(Du,{path:"/",element:b.jsx(gE,{})}),b.jsx(Du,{path:"/settings",element:b.jsx(tC,{})})]})})})); diff --git a/kinode/packages/homepage/pkg/ui/index.html b/kinode/packages/homepage/pkg/ui/index.html index b16eec88..5e0d972a 100644 --- a/kinode/packages/homepage/pkg/ui/index.html +++ b/kinode/packages/homepage/pkg/ui/index.html @@ -9,7 +9,7 @@ - + diff --git a/kinode/packages/homepage/ui/dist/index.html b/kinode/packages/homepage/ui/dist/index.html index b16eec88..5e0d972a 100644 --- a/kinode/packages/homepage/ui/dist/index.html +++ b/kinode/packages/homepage/ui/dist/index.html @@ -9,7 +9,7 @@ - + diff --git a/kinode/packages/homepage/ui/src/components/AllApps.tsx b/kinode/packages/homepage/ui/src/components/AllApps.tsx index da3ba734..584f476b 100644 --- a/kinode/packages/homepage/ui/src/components/AllApps.tsx +++ b/kinode/packages/homepage/ui/src/components/AllApps.tsx @@ -15,7 +15,7 @@ const AllApps: React.FC<{ expanded: boolean }> = ({ expanded }) => { })}> {apps.length === 0 ?
Loading apps...
- : apps.map(app => )} + : apps.map(app => )} } diff --git a/kinode/packages/homepage/ui/src/components/AppDisplay.tsx b/kinode/packages/homepage/ui/src/components/AppDisplay.tsx index 1e5d373e..cd38a731 100644 --- a/kinode/packages/homepage/ui/src/components/AppDisplay.tsx +++ b/kinode/packages/homepage/ui/src/components/AppDisplay.tsx @@ -7,7 +7,7 @@ import { isMobileCheck } from "../utils/dimensions" import AppIconPlaceholder from "./AppIconPlaceholder" interface AppDisplayProps { - app: HomepageApp + app?: HomepageApp } const AppDisplay: React.FC = ({ app }) => { @@ -17,15 +17,15 @@ const AppDisplay: React.FC = ({ app }) => { return setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > - {app.base64_icon + {app?.base64_icon ? = ({ app }) => { })} /> : } -
{app.label}
- {app.path && isHovered &&