From fb4d43e4edf1a097291e8fa841c88200b3af84b5 Mon Sep 17 00:00:00 2001 From: pluja Date: Mon, 25 Mar 2024 11:17:30 +0100 Subject: [PATCH] remove unused disgus --- README.md | 2 +- src/frontend/static/disgus/disgus.css | 1 - src/frontend/static/disgus/index.js | 2095 ---------------------- src/frontend/templates/layouts/main.html | 13 +- src/frontend/templates/service.html | 2 +- 5 files changed, 3 insertions(+), 2110 deletions(-) delete mode 100644 src/frontend/static/disgus/disgus.css delete mode 100644 src/frontend/static/disgus/index.js diff --git a/README.md b/README.md index 458a34c..bfce571 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is the official repository of the KYCNOT.ME project. ## Comments -Comments are based on [Disgus](). I'm using a slightly modified version of the [Disgus]() project, to fit the KYCNOT.me theme and needs. +Comments are based on [Cactus](https://cactus.chat). ## ToS Checker diff --git a/src/frontend/static/disgus/disgus.css b/src/frontend/static/disgus/disgus.css deleted file mode 100644 index d1b22d4..0000000 --- a/src/frontend/static/disgus/disgus.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.absolute{position:absolute}.relative{position:relative}.right-0{right:0px}.z-10{z-index:10}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mx-1{margin-left:.25rem;margin-right:.25rem}.ml-14{margin-left:3.5rem}.-mt-1{margin-top:-.25rem}.mr-1{margin-right:.25rem}.ml-2{margin-left:.5rem}.mt-2{margin-top:.5rem}.ml-1{margin-left:.25rem}.mr-2{margin-right:.5rem}.-mr-1{margin-right:-.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-4{height:1rem}.h-3{height:.75rem}.h-6{height:1.5rem}.w-12{width:3rem}.w-10{width:2.5rem}.w-4{width:1rem}.w-3{width:.75rem}.w-6{width:1.5rem}.w-full{width:100%}.w-auto{width:auto}.w-56{width:14rem}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.origin-top-right{transform-origin:top right}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-300\/10{background-color:#d1d5db1a}.bg-lime-600{--tw-bg-opacity: 1;background-color:rgb(101 163 13 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-none{background-image:none}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-white\/75{color:#ffffffbf}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.opacity-70{opacity:.7}.opacity-0{opacity:0}.opacity-100{opacity:1}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-75{transition-duration:75ms}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.hover\:ring:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-gray-300:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:ml-20{margin-left:5rem}.sm\:h-10{height:2.5rem}.sm\:h-12{height:3rem}.sm\:w-16{width:4rem}.sm\:w-10{width:2.5rem}.sm\:w-12{width:3rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}} diff --git a/src/frontend/static/disgus/index.js b/src/frontend/static/disgus/index.js deleted file mode 100644 index 704180c..0000000 --- a/src/frontend/static/disgus/index.js +++ /dev/null @@ -1,2095 +0,0 @@ -var e0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xw=e0((n2,Kr)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function t0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(t,o);return new i}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ro={},n0={get exports(){return ro},set exports(e){ro=e}},il={},E={},r0={get exports(){return E},set exports(e){E=e}},H={};/** - * @license React - * react.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 Co=Symbol.for("react.element"),o0=Symbol.for("react.portal"),i0=Symbol.for("react.fragment"),l0=Symbol.for("react.strict_mode"),s0=Symbol.for("react.profiler"),u0=Symbol.for("react.provider"),a0=Symbol.for("react.context"),c0=Symbol.for("react.forward_ref"),f0=Symbol.for("react.suspense"),d0=Symbol.for("react.memo"),p0=Symbol.for("react.lazy"),Ba=Symbol.iterator;function h0(e){return e===null||typeof e!="object"?null:(e=Ba&&e[Ba]||e["@@iterator"],typeof e=="function"?e:null)}var bf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cf=Object.assign,_f={};function Er(e,t,n){this.props=e,this.context=t,this.refs=_f,this.updater=n||bf}Er.prototype.isReactComponent={};Er.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tf(){}Tf.prototype=Er.prototype;function xu(e,t,n){this.props=e,this.context=t,this.refs=_f,this.updater=n||bf}var Eu=xu.prototype=new Tf;Eu.constructor=xu;Cf(Eu,Er.prototype);Eu.isPureReactComponent=!0;var Ua=Array.isArray,Af=Object.prototype.hasOwnProperty,ku={current:null},Nf={key:!0,ref:!0,__self:!0,__source:!0};function If(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Af.call(t,r)&&!Nf.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,le=A[J];if(0>>1;Jo(Il,P))hno(Uo,Il)?(A[J]=Uo,A[hn]=P,J=hn):(A[J]=Il,A[pn]=P,J=pn);else if(hno(Uo,P))A[J]=Uo,A[hn]=P,J=hn;else break e}}return R}function o(A,R){var P=A.sortIndex-R.sortIndex;return P!==0?P:A.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var u=[],a=[],f=1,c=null,d=3,h=!1,w=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var R=n(a);R!==null;){if(R.callback===null)r(a);else if(R.startTime<=A)r(a),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(a)}}function g(A){if(v=!1,y(A),!w)if(n(u)!==null)w=!0,Ar(x);else{var R=n(a);R!==null&&Nt(g,R.startTime-A)}}function x(A,R){w=!1,v&&(v=!1,m(_),_=-1),h=!0;var P=d;try{for(y(R),c=n(u);c!==null&&(!(c.expirationTime>R)||A&&!te());){var J=c.callback;if(typeof J=="function"){c.callback=null,d=c.priorityLevel;var le=J(c.expirationTime<=R);R=e.unstable_now(),typeof le=="function"?c.callback=le:c===n(u)&&r(u),y(R)}else r(u);c=n(u)}if(c!==null)var Bo=!0;else{var pn=n(a);pn!==null&&Nt(g,pn.startTime-R),Bo=!1}return Bo}finally{c=null,d=P,h=!1}}var b=!1,S=null,_=-1,L=5,$=-1;function te(){return!(e.unstable_now()-$A||125J?(A.sortIndex=P,t(a,A),n(u)===null&&A===n(a)&&(v?(m(_),_=-1):v=!0,Nt(g,P-J))):(A.sortIndex=le,t(u,A),w||h||(w=!0,Ar(x))),A},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(A){var R=d;return function(){var P=d;d=R;try{return A.apply(this,arguments)}finally{d=P}}}})(Pf);(function(e){e.exports=Pf})(_0);/** - * @license React - * react-dom.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 Rf=E,Be=ys;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gs=Object.prototype.hasOwnProperty,T0=/^[: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]*$/,Da={},Fa={};function A0(e){return gs.call(Fa,e)?!0:gs.call(Da,e)?!1:T0.test(e)?Fa[e]=!0:(Da[e]=!0,!1)}function N0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function I0(e,t,n,r){if(t===null||typeof t>"u"||N0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Se(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Se(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 Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Se(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 Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var bu=/[\-:]([a-z])/g;function Cu(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(bu,Cu);he[t]=new Se(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(bu,Cu);he[t]=new Se(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(bu,Cu);he[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var o=he.hasOwnProperty(t)?he[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var u=` -`+o[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{Pl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function L0(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Rl(e.type,!1),e;case 11:return e=Rl(e.type.render,!1),e;case 1:return e=Rl(e.type,!0),e;default:return""}}function Es(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 Dn:return"Fragment";case jn:return"Portal";case vs:return"Profiler";case Tu:return"StrictMode";case ws:return"Suspense";case xs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hf:return(e.displayName||"Context")+".Consumer";case zf:return(e._context.displayName||"Context")+".Provider";case Au:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nu:return t=e.displayName||null,t!==null?t:Es(e.type)||"Memo";case Ht:t=e._payload,e=e._init;try{return Es(e(t))}catch{}}return null}function $0(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 Es(t);case 8:return t===Tu?"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 rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function P0(e){var t=Uf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fo(e){e._valueTracker||(e._valueTracker=P0(e))}function jf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ci(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 ks(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Va(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Df(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function Ss(e,t){Df(e,t);var n=rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?bs(e,t.type,n):t.hasOwnProperty("defaultValue")&&bs(e,t.type,rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ka(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function bs(e,t,n){(t!=="number"||Ci(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jr=Array.isArray;function Jn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Mo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function io(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wr={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},R0=["Webkit","ms","Moz","O"];Object.keys(Wr).forEach(function(e){R0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wr[t]=Wr[e]})});function Kf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wr.hasOwnProperty(e)&&Wr[e]?(""+t).trim():t+"px"}function Wf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Kf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var O0=Z({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 Ts(e,t){if(t){if(O0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function As(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 Ns=null;function Iu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Is=null,er=null,tr=null;function Ga(e){if(e=Ao(e)){if(typeof Is!="function")throw Error(C(280));var t=e.stateNode;t&&(t=cl(t),Is(e.stateNode,e.type,t))}}function Qf(e){er?tr?tr.push(e):tr=[e]:er=e}function Gf(){if(er){var e=er,t=tr;if(tr=er=null,Ga(e),t)for(e=0;e>>=0,e===0?32:31-(W0(e)/Q0|0)|0}var Vo=64,Ko=4194304;function Dr(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 Ni(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Dr(s):(i&=l,i!==0&&(r=Dr(i)))}else l=n&~o,l!==0?r=Dr(l):i!==0&&(r=Dr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _o(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function Z0(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Gr),rc=String.fromCharCode(32),oc=!1;function hd(e,t){switch(e){case"keyup":return Cm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function md(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fn=!1;function Tm(e,t){switch(e){case"compositionend":return md(t);case"keypress":return t.which!==32?null:(oc=!0,rc);case"textInput":return e=t.data,e===rc&&oc?null:e;default:return null}}function Am(e,t){if(Fn)return e==="compositionend"||!Bu&&hd(e,t)?(e=dd(),mi=Ou=Mt=null,Fn=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uc(n)}}function wd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xd(){for(var e=window,t=Ci();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ci(e.document)}return t}function Uu(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 Hm(e){var t=xd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wd(n.ownerDocument.documentElement,n)){if(r!==null&&Uu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ac(n,i);var l=ac(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Mn=null,zs=null,Xr=null,Hs=!1;function cc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||Mn==null||Mn!==Ci(r)||(r=Mn,"selectionStart"in r&&Uu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&fo(Xr,r)||(Xr=r,r=$i(zs,"onSelect"),0Wn||(e.current=Ms[Wn],Ms[Wn]=null,Wn--)}function V(e,t){Wn++,Ms[Wn]=e.current,e.current=t}var on={},we=an(on),Ae=an(!1),_n=on;function ur(e,t){var n=e.type.contextTypes;if(!n)return on;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ne(e){return e=e.childContextTypes,e!=null}function Ri(){W(Ae),W(we)}function gc(e,t,n){if(we.current!==on)throw Error(C(168));V(we,t),V(Ae,n)}function Nd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,$0(e)||"Unknown",o));return Z({},n,r)}function Oi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||on,_n=we.current,V(we,e),V(Ae,Ae.current),!0}function vc(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Nd(e,t,_n),r.__reactInternalMemoizedMergedChildContext=e,W(Ae),W(we),V(we,e)):W(Ae),V(Ae,n)}var yt=null,fl=!1,Gl=!1;function Id(e){yt===null?yt=[e]:yt.push(e)}function Ym(e){fl=!0,Id(e)}function cn(){if(!Gl&&yt!==null){Gl=!0;var e=0,t=M;try{var n=yt;for(M=1;e>=l,o-=l,gt=1<<32-tt(t)+o|n<_?(L=S,S=null):L=S.sibling;var $=d(m,S,y[_],g);if($===null){S===null&&(S=L);break}e&&S&&$.alternate===null&&t(m,S),p=i($,p,_),b===null?x=$:b.sibling=$,b=$,S=L}if(_===y.length)return n(m,S),G&&yn(m,_),x;if(S===null){for(;__?(L=S,S=null):L=S.sibling;var te=d(m,S,$.value,g);if(te===null){S===null&&(S=L);break}e&&S&&te.alternate===null&&t(m,S),p=i(te,p,_),b===null?x=te:b.sibling=te,b=te,S=L}if($.done)return n(m,S),G&&yn(m,_),x;if(S===null){for(;!$.done;_++,$=y.next())$=c(m,$.value,g),$!==null&&(p=i($,p,_),b===null?x=$:b.sibling=$,b=$);return G&&yn(m,_),x}for(S=r(m,S);!$.done;_++,$=y.next())$=h(S,m,_,$.value,g),$!==null&&(e&&$.alternate!==null&&S.delete($.key===null?_:$.key),p=i($,p,_),b===null?x=$:b.sibling=$,b=$);return e&&S.forEach(function(be){return t(m,be)}),G&&yn(m,_),x}function k(m,p,y,g){if(typeof y=="object"&&y!==null&&y.type===Dn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Do:e:{for(var x=y.key,b=p;b!==null;){if(b.key===x){if(x=y.type,x===Dn){if(b.tag===7){n(m,b.sibling),p=o(b,y.props.children),p.return=m,m=p;break e}}else if(b.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ht&&Cc(x)===b.type){n(m,b.sibling),p=o(b,y.props),p.ref=Rr(m,b,y),p.return=m,m=p;break e}n(m,b);break}else t(m,b);b=b.sibling}y.type===Dn?(p=Sn(y.props.children,m.mode,g,y.key),p.return=m,m=p):(g=Si(y.type,y.key,y.props,null,m.mode,g),g.ref=Rr(m,p,y),g.return=m,m=g)}return l(m);case jn:e:{for(b=y.key;p!==null;){if(p.key===b)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=o(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=ns(y,m.mode,g),p.return=m,m=p}return l(m);case Ht:return b=y._init,k(m,p,b(y._payload),g)}if(jr(y))return w(m,p,y,g);if(Nr(y))return v(m,p,y,g);qo(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,y),p.return=m,m=p):(n(m,p),p=ts(y,m.mode,g),p.return=m,m=p),l(m)):n(m,p)}return k}var cr=Bd(!0),Ud=Bd(!1),No={},ct=an(No),yo=an(No),go=an(No);function En(e){if(e===No)throw Error(C(174));return e}function Gu(e,t){switch(V(go,t),V(yo,e),V(ct,No),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_s(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_s(t,e)}W(ct),V(ct,t)}function fr(){W(ct),W(yo),W(go)}function jd(e){En(go.current);var t=En(ct.current),n=_s(t,e.type);t!==n&&(V(yo,e),V(ct,n))}function Yu(e){yo.current===e&&(W(ct),W(yo))}var Y=an(0);function Di(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Yl=[];function Xu(){for(var e=0;en?n:4,e(!0);var r=Xl.transition;Xl.transition={};try{e(!1),t()}finally{M=n,Xl.transition=r}}function np(){return Ge().memoizedState}function Jm(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rp(e))op(t,n);else if(n=Rd(e,t,n,r),n!==null){var o=Ee();nt(n,e,r,o),ip(n,t,r)}}function ey(e,t,n){var r=Jt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rp(e))op(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,rt(s,l)){var u=t.interleaved;u===null?(o.next=o,Wu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=Rd(e,t,o,r),n!==null&&(o=Ee(),nt(n,e,r,o),ip(n,t,r))}}function rp(e){var t=e.alternate;return e===X||t!==null&&t===X}function op(e,t){Zr=Fi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ip(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$u(e,n)}}var Mi={readContext:Qe,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},ty={readContext:Qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:Tc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,wi(4194308,4,Zd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wi(4194308,4,e,t)},useInsertionEffect:function(e,t){return wi(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jm.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:_c,useDebugValue:ta,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=_c(!1),t=e[0];return e=qm.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,o=st();if(G){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ae===null)throw Error(C(349));An&30||Md(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Tc(Kd.bind(null,r,i,e),[e]),r.flags|=2048,xo(9,Vd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=st(),t=ae.identifierPrefix;if(G){var n=vt,r=gt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ut]=t,e[mo]=r,hp(e,t,!1,!1),t.stateNode=e;e:{switch(l=As(n,r),n){case"dialog":K("cancel",e),K("close",e),o=r;break;case"iframe":case"object":case"embed":K("load",e),o=r;break;case"video":case"audio":for(o=0;opr&&(t.flags|=128,r=!0,Or(i,!1),t.lanes=4194304)}else{if(!r)if(e=Di(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Or(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!G)return ye(t),null}else 2*ee()-i.renderingStartTime>pr&&n!==1073741824&&(t.flags|=128,r=!0,Or(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ee(),t.sibling=null,n=Y.current,V(Y,r?n&1|2:n&1),t):(ye(t),null);case 22:case 23:return sa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function ay(e,t){switch(Du(t),t.tag){case 1:return Ne(t.type)&&Ri(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fr(),W(Ae),W(we),Xu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yu(t),null;case 13:if(W(Y),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Y),null;case 4:return fr(),null;case 10:return Ku(t.type._context),null;case 22:case 23:return sa(),null;case 24:return null;default:return null}}var ei=!1,ge=!1,cy=typeof WeakSet=="function"?WeakSet:Set,N=null;function Xn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){q(e,t,r)}}var zc=!1;function fy(e,t){if(Bs=Ii,e=xd(),Uu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,u=-1,a=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||o!==0&&c.nodeType!==3||(s=l+o),c!==i||r!==0&&c.nodeType!==3||(u=l+r),c.nodeType===3&&(l+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++a===o&&(s=l),d===i&&++f===r&&(u=l),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Us={focusedElem:e,selectionRange:n},Ii=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,k=w.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ze(t.type,v),k);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(g){q(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return w=zc,zc=!1,w}function qr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&tu(t,n,i)}o=o.next}while(o!==r)}}function hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function gp(e){var t=e.alternate;t!==null&&(e.alternate=null,gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[mo],delete t[Fs],delete t[Qm],delete t[Gm])),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 vp(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vp(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 ru(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pi));else if(r!==4&&(e=e.child,e!==null))for(ru(e,t,n),e=e.sibling;e!==null;)ru(e,t,n),e=e.sibling}function ou(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ou(e,t,n),e=e.sibling;e!==null;)ou(e,t,n),e=e.sibling}var ce=null,qe=!1;function It(e,t,n){for(n=n.child;n!==null;)wp(e,t,n),n=n.sibling}function wp(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(ll,n)}catch{}switch(n.tag){case 5:ge||Xn(n,t);case 6:var r=ce,o=qe;ce=null,It(e,t,n),ce=r,qe=o,ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(qe?(e=ce,n=n.stateNode,e.nodeType===8?Ql(e.parentNode,n):e.nodeType===1&&Ql(e,n),ao(e)):Ql(ce,n.stateNode));break;case 4:r=ce,o=qe,ce=n.stateNode.containerInfo,qe=!0,It(e,t,n),ce=r,qe=o;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&tu(n,t,l),o=o.next}while(o!==r)}It(e,t,n);break;case 1:if(!ge&&(Xn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){q(n,t,s)}It(e,t,n);break;case 21:It(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,It(e,t,n),ge=r):It(e,t,n);break;default:It(e,t,n)}}function Bc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cy),t.forEach(function(r){var o=xy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ye(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*py(r/1960))-r,10e?16:e,Vt===null)var r=!1;else{if(e=Vt,Vt=null,Wi=0,U&6)throw Error(C(331));var o=U;for(U|=4,N=e.current;N!==null;){var i=N,l=i.child;if(N.flags&16){var s=i.deletions;if(s!==null){for(var u=0;uee()-ia?kn(e,0):oa|=n),Ie(e,t)}function Tp(e,t){t===0&&(e.mode&1?(t=Ko,Ko<<=1,!(Ko&130023424)&&(Ko=4194304)):t=1);var n=Ee();e=bt(e,t),e!==null&&(_o(e,t,n),Ie(e,n))}function wy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tp(e,n)}function xy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Tp(e,n)}var Ap;Ap=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,sy(e,t,n);_e=!!(e.flags&131072)}else _e=!1,G&&t.flags&1048576&&Ld(t,Hi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xi(e,t),e=t.pendingProps;var o=ur(t,we.current);rr(t,n),o=qu(null,t,r,e,o,n);var i=Ju();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ne(r)?(i=!0,Oi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qu(t),o.updater=dl,t.stateNode=o,o._reactInternals=t,Gs(t,r,e,n),t=Zs(null,t,r,!0,i,n)):(t.tag=0,G&&i&&ju(t),xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ky(r),e=Ze(r,e),o){case 0:t=Xs(null,t,r,e,n);break e;case 1:t=Pc(null,t,r,e,n);break e;case 11:t=Lc(null,t,r,e,n);break e;case 14:t=$c(null,t,r,Ze(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ze(r,o),Xs(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ze(r,o),Pc(e,t,r,o,n);case 3:e:{if(fp(t),e===null)throw Error(C(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Od(e,t),ji(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=dr(Error(C(423)),t),t=Rc(e,t,r,n,o);break e}else if(r!==o){o=dr(Error(C(424)),t),t=Rc(e,t,r,n,o);break e}else for(ze=Xt(t.stateNode.containerInfo.firstChild),He=t,G=!0,Je=null,n=Ud(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ar(),r===o){t=Ct(e,t,n);break e}xe(e,t,r,n)}t=t.child}return t;case 5:return jd(t),e===null&&Ks(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,js(r,o)?l=null:i!==null&&js(r,i)&&(t.flags|=32),cp(e,t),xe(e,t,l,n),t.child;case 6:return e===null&&Ks(t),null;case 13:return dp(e,t,n);case 4:return Gu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cr(t,null,r,n):xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ze(r,o),Lc(e,t,r,o,n);case 7:return xe(e,t,t.pendingProps,n),t.child;case 8:return xe(e,t,t.pendingProps.children,n),t.child;case 12:return xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,V(Bi,r._currentValue),r._currentValue=l,i!==null)if(rt(i.value,l)){if(i.children===o.children&&!Ae.current){t=Ct(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=xt(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ws(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(C(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ws(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,rr(t,n),o=Qe(o),r=r(o),t.flags|=1,xe(e,t,r,n),t.child;case 14:return r=t.type,o=Ze(r,t.pendingProps),o=Ze(r.type,o),$c(e,t,r,o,n);case 15:return up(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ze(r,o),xi(e,t),t.tag=1,Ne(r)?(e=!0,Oi(t)):e=!1,rr(t,n),Hd(t,r,o),Gs(t,r,o,n),Zs(null,t,r,!0,e,n);case 19:return pp(e,t,n);case 22:return ap(e,t,n)}throw Error(C(156,t.tag))};function Np(e,t){return td(e,t)}function Ey(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(e,t,n,r){return new Ey(e,t,n,r)}function aa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ky(e){if(typeof e=="function")return aa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Au)return 11;if(e===Nu)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=Ve(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Si(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")aa(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Dn:return Sn(n.children,o,i,t);case Tu:l=8,o|=8;break;case vs:return e=Ve(12,n,t,o|2),e.elementType=vs,e.lanes=i,e;case ws:return e=Ve(13,n,t,o),e.elementType=ws,e.lanes=i,e;case xs:return e=Ve(19,n,t,o),e.elementType=xs,e.lanes=i,e;case Bf:return yl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zf:l=10;break e;case Hf:l=9;break e;case Au:l=11;break e;case Nu:l=14;break e;case Ht:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=Ve(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sn(e,t,n,r){return e=Ve(7,e,r,t),e.lanes=n,e}function yl(e,t,n,r){return e=Ve(22,e,r,t),e.elementType=Bf,e.lanes=n,e.stateNode={isHidden:!1},e}function ts(e,t,n){return e=Ve(6,e,null,t),e.lanes=n,e}function ns(e,t,n){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sy(e,t,n,r,o){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=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ca(e,t,n,r,o,i,l,s,u){return e=new Sy(e,t,n,s,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ve(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qu(i),e}function by(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ue})(C0);var Wc=ms;hs.createRoot=Wc.createRoot,hs.hydrateRoot=Wc.hydrateRoot;let ko=navigator.languages===void 0?[navigator.language]:navigator.languages;typeof ko>"u"&&(ko=["en-US"]);ko=ko.filter(e=>e.length>2).map(e=>e.replace("_","-"));function Ny(e,t=ko){const n=new Date().toLocaleDateString()===e.toLocaleDateString();return new Intl.DateTimeFormat(t,{dateStyle:n?void 0:"short",timeStyle:n?"medium":"short"}).format(e)}function rs(...e){return e.filter(Boolean).join(" ")}const Iy={},Ly=Object.freeze(Object.defineProperty({__proto__:null,default:Iy},Symbol.toStringTag,{value:"Module"}));/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const B=BigInt(0),Q=BigInt(1),Kt=BigInt(2),to=BigInt(3),$y=BigInt(8),D=Object.freeze({a:B,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:Q,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});function Qc(e){const{a:t,b:n}=D,r=T(e*e),o=T(r*e);return T(o+t*e+n)}const ri=D.a===B;class ha extends Error{constructor(t){super(t)}}class F{constructor(t,n,r){this.x=t,this.y=n,this.z=r}static fromAffine(t){if(!(t instanceof j))throw new TypeError("JacobianPoint#fromAffine: expected Point");return new F(t.x,t.y,Q)}static toAffineBatch(t){const n=Hy(t.map(r=>r.z));return t.map((r,o)=>r.toAffine(n[o]))}static normalizeZ(t){return F.toAffineBatch(t).map(F.fromAffine)}equals(t){if(!(t instanceof F))throw new TypeError("JacobianPoint expected");const{x:n,y:r,z:o}=this,{x:i,y:l,z:s}=t,u=T(o*o),a=T(s*s),f=T(n*a),c=T(i*u),d=T(T(r*s)*a),h=T(T(l*o)*u);return f===c&&d===h}negate(){return new F(this.x,T(-this.y),this.z)}double(){const{x:t,y:n,z:r}=this,o=T(t*t),i=T(n*n),l=T(i*i),s=t+i,u=T(Kt*(T(s*s)-o-l)),a=T(to*o),f=T(a*a),c=T(f-Kt*u),d=T(a*(u-c)-$y*l),h=T(Kt*n*r);return new F(c,d,h)}add(t){if(!(t instanceof F))throw new TypeError("JacobianPoint expected");const{x:n,y:r,z:o}=this,{x:i,y:l,z:s}=t;if(i===B||l===B)return this;if(n===B||r===B)return t;const u=T(o*o),a=T(s*s),f=T(n*a),c=T(i*u),d=T(T(r*s)*a),h=T(T(l*o)*u),w=T(c-f),v=T(h-d);if(w===B)return v===B?this.double():F.ZERO;const k=T(w*w),m=T(w*k),p=T(f*k),y=T(v*v-m-Kt*p),g=T(v*(p-y)-d*m),x=T(o*s*w);return new F(y,g,x)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const n=F.ZERO;if(typeof t=="bigint"&&t===B)return n;let r=Xc(t);if(r===Q)return this;if(!ri){let c=n,d=this;for(;r>B;)r&Q&&(c=c.add(d)),d=d.double(),r>>=Q;return c}let{k1neg:o,k1:i,k2neg:l,k2:s}=qc(r),u=n,a=n,f=this;for(;i>B||s>B;)i&Q&&(u=u.add(f)),s&Q&&(a=a.add(f)),f=f.double(),i>>=Q,s>>=Q;return o&&(u=u.negate()),l&&(a=a.negate()),a=new F(T(a.x*D.beta),a.y,a.z),u.add(a)}precomputeWindow(t){const n=ri?128/t+1:256/t+1,r=[];let o=this,i=o;for(let l=0;l>=c,w>u&&(w-=f,t+=Q),w===0){let v=o[h];d%2&&(v=v.negate()),l=l.add(v)}else{let v=o[h+Math.abs(w)-1];w<0&&(v=v.negate()),i=i.add(v)}}return{p:i,f:l}}multiply(t,n){let r=Xc(t),o,i;if(ri){const{k1neg:l,k1:s,k2neg:u,k2:a}=qc(r);let{p:f,f:c}=this.wNAF(s,n),{p:d,f:h}=this.wNAF(a,n);l&&(f=f.negate()),u&&(d=d.negate()),d=new F(T(d.x*D.beta),d.y,d.z),o=f.add(d),i=c.add(h)}else{const{p:l,f:s}=this.wNAF(r,n);o=l,i=s}return F.normalizeZ([o,i])[0]}toAffine(t=br(this.z)){const{x:n,y:r,z:o}=this,i=t,l=T(i*i),s=T(l*i),u=T(n*l),a=T(r*s);if(T(o*i)!==Q)throw new Error("invZ was invalid");return new j(u,a)}}F.BASE=new F(D.Gx,D.Gy,Q);F.ZERO=new F(B,Q,B);const au=new WeakMap;class j{constructor(t,n){this.x=t,this.y=n}_setWindowSize(t){this._WINDOW_SIZE=t,au.delete(this)}hasEvenY(){return this.y%Kt===B}static fromCompressedHex(t){const n=t.length===32,r=Le(n?t:t.subarray(1));if(!bi(r))throw new Error("Point is not on curve");const o=Qc(r);let i=zy(o);const l=(i&Q)===Q;n?l&&(i=T(-i)):(t[0]&1)===1!==l&&(i=T(-i));const s=new j(r,i);return s.assertValidity(),s}static fromUncompressedHex(t){const n=Le(t.subarray(1,33)),r=Le(t.subarray(33,65)),o=new j(n,r);return o.assertValidity(),o}static fromHex(t){const n=ft(t),r=n.length,o=n[0];if(r===32||r===33&&(o===2||o===3))return this.fromCompressedHex(n);if(r===65&&o===4)return this.fromUncompressedHex(n);throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return j.BASE.multiply(Ln(t))}static fromSignature(t,n,r){t=ft(t);const o=Pp(t),{r:i,s:l}=Rp(n);if(r!==0&&r!==1)throw new Error("Cannot recover signature: invalid recovery bit");const s=r&1?"03":"02",u=j.fromHex(s+tn(i)),{n:a}=D,f=br(i,a),c=T(-o*f,a),d=T(l*f,a),h=j.BASE.multiplyAndAddUnsafe(u,c,d);if(!h)throw new Error("Cannot recover signature: point at infinify");return h.assertValidity(),h}toRawBytes(t=!1){return nn(this.toHex(t))}toHex(t=!1){const n=tn(this.x);return t?`${this.hasEvenY()?"02":"03"}${n}`:`04${n}${tn(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:n,y:r}=this;if(!bi(n)||!bi(r))throw new Error(t);const o=T(r*r),i=Qc(n);if(T(o-i)!==B)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new j(this.x,T(-this.y))}double(){return F.fromAffine(this).double().toAffine()}add(t){return F.fromAffine(this).add(F.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return F.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,n,r){const o=F.fromAffine(this),i=n===B||n===Q||this!==j.BASE?o.multiplyUnsafe(n):o.multiply(n),l=F.fromAffine(t).multiplyUnsafe(r),s=i.add(l);return s.equals(F.ZERO)?void 0:s.toAffine()}}j.BASE=new j(D.Gx,D.Gy);j.ZERO=new j(B,B);function Gc(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function Yc(e){if(e.length<2||e[0]!==2)throw new Error(`Invalid signature integer tag: ${hr(e)}`);const t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new Error("Invalid signature integer: wrong length");if(n[0]===0&&n[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:Le(n),left:e.subarray(t+2)}}function Py(e){if(e.length<2||e[0]!=48)throw new Error(`Invalid signature tag: ${hr(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:n}=Yc(e.subarray(2)),{data:r,left:o}=Yc(n);if(o.length)throw new Error(`Invalid signature: left bytes after parsing: ${hr(o)}`);return{r:t,s:r}}class Et{constructor(t,n){this.r=t,this.s=n,this.assertValidity()}static fromCompact(t){const n=t instanceof Uint8Array,r="Signature.fromCompact";if(typeof t!="string"&&!n)throw new TypeError(`${r}: Expected string or Uint8Array`);const o=n?hr(t):t;if(o.length!==128)throw new Error(`${r}: Expected 64-byte hex`);return new Et(Yi(o.slice(0,64)),Yi(o.slice(64,128)))}static fromDER(t){const n=t instanceof Uint8Array;if(typeof t!="string"&&!n)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r,s:o}=Py(n?t:nn(t));return new Et(r,o)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:n}=this;if(!yr(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!yr(n))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=D.n>>Q;return this.s>t}normalizeS(){return this.hasHighS()?new Et(this.r,D.n-this.s):this}toDERRawBytes(t=!1){return nn(this.toDERHex(t))}toDERHex(t=!1){const n=Gc(Hr(this.s));if(t)return n;const r=Gc(Hr(this.r)),o=Hr(r.length/2),i=Hr(n.length/2);return`30${Hr(r.length/2+n.length/2+4)}02${o}${r}02${i}${n}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return nn(this.toCompactHex())}toCompactHex(){return tn(this.r)+tn(this.s)}}function Un(...e){if(!e.every(r=>r instanceof Uint8Array))throw new Error("Uint8Array list expected");if(e.length===1)return e[0];const t=e.reduce((r,o)=>r+o.length,0),n=new Uint8Array(t);for(let r=0,o=0;rt.toString(16).padStart(2,"0"));function hr(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let n=0;n0)return BigInt(e);if(typeof e=="bigint"&&yr(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function T(e,t=D.P){const n=e%t;return n>=B?n:t+n}function De(e,t){const{P:n}=D;let r=e;for(;t-- >B;)r*=r,r%=n;return r}function zy(e){const{P:t}=D,n=BigInt(6),r=BigInt(11),o=BigInt(22),i=BigInt(23),l=BigInt(44),s=BigInt(88),u=e*e*e%t,a=u*u*e%t,f=De(a,to)*a%t,c=De(f,to)*a%t,d=De(c,Kt)*u%t,h=De(d,r)*d%t,w=De(h,o)*h%t,v=De(w,l)*w%t,k=De(v,s)*v%t,m=De(k,l)*w%t,p=De(m,to)*a%t,y=De(p,i)*h%t,g=De(y,n)*u%t;return De(g,Kt)}function br(e,t=D.P){if(e===B||t<=B)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=T(e,t),r=t,o=B,i=Q;for(;n!==B;){const s=r/n,u=r%n,a=o-i*s;r=n,n=u,o=i,i=a}if(r!==Q)throw new Error("invert: does not exist");return T(o,t)}function Hy(e,t=D.P){const n=new Array(e.length),r=e.reduce((i,l,s)=>l===B?i:(n[s]=i,T(i*l,t)),Q),o=br(r,t);return e.reduceRight((i,l,s)=>l===B?i:(n[s]=T(i*n[s],t),T(i*l,t)),o),n}const Zc=(e,t)=>(e+t/Kt)/t,By={a1:BigInt("0x3086d221a7d46bcde86c90e49284eb15"),b1:-Q*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),a2:BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),b2:BigInt("0x3086d221a7d46bcde86c90e49284eb15"),POW_2_128:BigInt("0x100000000000000000000000000000000")};function qc(e){const{n:t}=D,{a1:n,b1:r,a2:o,b2:i,POW_2_128:l}=By,s=Zc(i*e,t),u=Zc(-r*e,t);let a=T(e-s*n-u*o,t),f=T(-s*r-u*i,t);const c=a>l,d=f>l;if(c&&(a=t-a),d&&(f=t-f),a>l||f>l)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:c,k1:a,k2neg:d,k2:f}}function Pp(e){const{n:t}=D,r=e.length*8-256;let o=Le(e);return r>0&&(o=o>>BigInt(r)),o>=t&&(o-=t),o}let ir,no;class Uy{constructor(){this.v=new Uint8Array(32).fill(1),this.k=new Uint8Array(32).fill(0),this.counter=0}hmac(...t){return z.hmacSha256(this.k,...t)}hmacSync(...t){return no(this.k,...t)}checkSync(){if(typeof no!="function")throw new ha("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),t.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),t.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){return this.incr(),this.v=await this.hmac(this.v),this.v}generateSync(){return this.checkSync(),this.incr(),this.v=this.hmacSync(this.v),this.v}}function yr(e){return B0)t=BigInt(e);else if(typeof e=="string"){if(e.length!==64)throw new Error("Expected 32 bytes of private key");t=Yi(e)}else if(e instanceof Uint8Array){if(e.length!==32)throw new Error("Expected 32 bytes of private key");t=Le(e)}else throw new TypeError("Expected valid private key");if(!yr(t))throw new Error("Expected private key: 0 < key < n");return t}function ma(e){return e instanceof j?(e.assertValidity(),e):j.fromHex(e)}function Rp(e){if(e instanceof Et)return e.assertValidity(),e;try{return Et.fromDER(e)}catch{return Et.fromCompact(e)}}function Dy(e,t=!1){return j.fromPrivateKey(e).toRawBytes(t)}function Jc(e){const t=e instanceof Uint8Array,n=typeof e=="string",r=(t||n)&&e.length;return t?r===33||r===65:n?r===66||r===130:e instanceof j}function Op(e,t,n=!1){if(Jc(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!Jc(t))throw new TypeError("getSharedSecret: second arg must be public key");const r=ma(t);return r.assertValidity(),r.multiply(Ln(e)).toRawBytes(n)}function zp(e){const t=e.length>32?e.slice(0,32):e;return Le(t)}function Fy(e){const t=zp(e),n=T(t,D.n);return Hp(n{if(e=ft(e),e.length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");const t=T(Le(e),D.n-Q)+Q;return mr(t)},randomBytes:(e=32)=>{if(Pe.web)return Pe.web.getRandomValues(new Uint8Array(e));if(Pe.node){const{randomBytes:t}=Pe.node;return Uint8Array.from(t(e))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>z.hashToPrivateKey(z.randomBytes(40)),sha256:async(...e)=>{if(Pe.web){const t=await Pe.web.subtle.digest("SHA-256",Un(...e));return new Uint8Array(t)}else if(Pe.node){const{createHash:t}=Pe.node,n=t("sha256");return e.forEach(r=>n.update(r)),Uint8Array.from(n.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(Pe.web){const n=await Pe.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),r=Un(...t),o=await Pe.web.subtle.sign("HMAC",n,r);return new Uint8Array(o)}else if(Pe.node){const{createHmac:n}=Pe.node,r=n("sha256",e);return t.forEach(o=>r.update(o)),Uint8Array.from(r.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...t)=>{let n=oi[e];if(n===void 0){const r=await z.sha256(Uint8Array.from(e,o=>o.charCodeAt(0)));n=Un(r,r),oi[e]=n}return z.sha256(n,...t)},taggedHashSync:(e,...t)=>{if(typeof ir!="function")throw new ha("sha256Sync is undefined, you need to set it");let n=oi[e];if(n===void 0){const r=ir(Uint8Array.from(e,o=>o.charCodeAt(0)));n=Un(r,r),oi[e]=n}return ir(n,...t)},precompute(e=8,t=j.BASE){const n=t===j.BASE?t:new j(t.x,t.y);return n._setWindowSize(e),n.multiply(to),n}};Object.defineProperties(z,{sha256Sync:{configurable:!1,get(){return ir},set(e){ir||(ir=e)}},hmacSha256Sync:{configurable:!1,get(){return no},set(e){no||(no=e)}}});const ef={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};/*! noble-hashes - MIT License (c) 2021 Paul Miller (paulmillr.com) */const os=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),lt=(e,t)=>e<<32-t|e>>>t,Zy=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Zy)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));(()=>{const e=typeof Kr<"u"&&typeof Kr.require=="function"&&Kr.require.bind(Kr);try{if(e){const{setImmediate:t}=e("timers");return()=>new Promise(n=>t(n))}}catch{}return()=>new Promise(t=>setTimeout(t,0))})();function qy(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function ya(e){if(typeof e=="string"&&(e=qy(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}function tf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Jy(e){if(typeof e!="function"||typeof e.init!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");tf(e.outputLen),tf(e.blockLen)}let cu=class{clone(){return this._cloneInto()}};function eg(e){const t=r=>e().update(ya(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t.init=t.create,t}function tg(e=32){if(ef.web)return ef.web.getRandomValues(new Uint8Array(e));throw new Error("The environment doesn't have randomBytes function")}function ng(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),l=Number(n>>o&i),s=Number(n&i),u=r?4:0,a=r?0:4;e.setUint32(t+u,l,r),e.setUint32(t+a,s,r)}let rg=class extends cu{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=os(this.buffer)}update(t){if(this.destroyed)throw new Error("instance is destroyed");const{view:n,buffer:r,blockLen:o,finished:i}=this;if(i)throw new Error("digest() was already called");t=ya(t);const l=t.length;for(let s=0;so-l&&(this.process(r,0),l=0);for(let u=l;us.setUint32(4*a,u,i))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:i,destroyed:l,pos:s}=this;return t.length=o,t.pos=s,t.finished=i,t.destroyed=l,o%n&&t.buffer.set(r),t}};const og=(e,t,n)=>e&t^~e&n,ig=(e,t,n)=>e&t^e&n^t&n,lg=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Lt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$t=new Uint32Array(64);let sg=class extends rg{constructor(){super(64,32,8,!1),this.A=Lt[0]|0,this.B=Lt[1]|0,this.C=Lt[2]|0,this.D=Lt[3]|0,this.E=Lt[4]|0,this.F=Lt[5]|0,this.G=Lt[6]|0,this.H=Lt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:l,G:s,H:u}=this;return[t,n,r,o,i,l,s,u]}set(t,n,r,o,i,l,s,u){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=l|0,this.G=s|0,this.H=u|0}process(t,n){for(let c=0;c<16;c++,n+=4)$t[c]=t.getUint32(n,!1);for(let c=16;c<64;c++){const d=$t[c-15],h=$t[c-2],w=lt(d,7)^lt(d,18)^d>>>3,v=lt(h,17)^lt(h,19)^h>>>10;$t[c]=v+$t[c-7]+w+$t[c-16]|0}let{A:r,B:o,C:i,D:l,E:s,F:u,G:a,H:f}=this;for(let c=0;c<64;c++){const d=lt(s,6)^lt(s,11)^lt(s,25),h=f+d+og(s,u,a)+lg[c]+$t[c]|0,v=(lt(r,2)^lt(r,13)^lt(r,22))+ig(r,o,i)|0;f=a,a=u,u=s,s=l+h|0,l=i,i=o,o=r,r=h+v|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,l=l+this.D|0,s=s+this.E|0,u=u+this.F|0,a=a+this.G|0,f=f+this.H|0,this.set(r,o,i,l,s,u,a,f)}roundClean(){$t.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Lo=eg(()=>new sg);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function fn(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function ot(...e){const t=(o,i)=>l=>o(i(l)),n=Array.from(e).reverse().reduce((o,i)=>o?t(o,i.encode):i.encode,void 0),r=e.reduce((o,i)=>o?t(o,i.decode):i.decode,void 0);return{encode:n,decode:r}}function dt(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(fn(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function pt(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function $o(e,t="="){if(fn(e),typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of n)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function Mp(e){if(typeof e!="function")throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function nf(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach(l=>{if(fn(l),l<0||l>=t)throw new Error(`Wrong integer: ${l}`)});;){let l=0,s=!0;for(let u=r;ut?Vp(t,e%t):e,Zi=(e,t)=>e+(t-Vp(e,t));function fu(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Zi(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Zi(t,n)}`);let o=0,i=0;const l=2**n-1,s=[];for(const u of e){if(fn(u),u>=2**t)throw new Error(`convertRadix2: invalid data word=${u} from=${t}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=n;i-=n)s.push((o>>i-n&l)>>>0);o&=2**i-1}if(o=o<=t)throw new Error("Excess padding");if(!r&&o)throw new Error(`Non-zero padding: ${o}`);return r&&i>0&&s.push(o>>>0),s}function Kp(e){return fn(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return nf(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(nf(t,e,2**8))}}}function At(e,t=!1){if(fn(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Zi(8,e)>32||Zi(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return fu(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(fu(n,e,8,t))}}}function rf(e){if(typeof e!="function")throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}function Wp(e,t){if(fn(e),typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),o=new Uint8Array(n.length+e);return o.set(n),o.set(r,n.length),o},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),o=t(r).slice(0,e),i=n.slice(-e);for(let l=0;le.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),vr=ot(At(6),dt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),$o(6),pt("")),Yp=ot(At(6),dt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),$o(6),pt("")),ga=e=>ot(Kp(58),dt(e),pt("")),So=ga("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),fg=ga("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),dg=ga("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),of=[0,2,3,5,6,7,9,10,11],Xp={encode(e){let t="";for(let n=0;not(Wp(4,t=>e(e(t))),So),du=ot(dt("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),pt("")),lf=[996825010,642813549,513874426,1027748829,705979059];function Br(e){const t=e>>25;let n=(e&33554431)<<5;for(let r=0;r>r&1)===1&&(n^=lf[r]);return n}function sf(e,t,n=1){const r=e.length;let o=1;for(let i=0;i126)throw new Error(`Invalid prefix (${e})`);o=Br(o)^l>>5}o=Br(o);for(let i=0;id)throw new TypeError(`Length ${h} exceeds limit ${d}`);return f=f.toLowerCase(),`${f}1${du.encode(c)}${sf(f,c,t)}`}function s(f,c=90){if(typeof f!="string")throw new Error(`bech32.decode input should be string, not ${typeof f}`);if(f.length<8||c!==!1&&f.length>c)throw new TypeError(`Wrong string length: ${f.length} (${f}). Expected (8..${c})`);const d=f.toLowerCase();if(f!==d&&f!==f.toUpperCase())throw new Error("String must be lowercase or uppercase");f=d;const h=f.lastIndexOf("1");if(h===0||h===-1)throw new Error('Letter "1" must be present between prefix and data only');const w=f.slice(0,h),v=f.slice(h+1);if(v.length<6)throw new Error("Data must be at least 6 characters long");const k=du.decode(v).slice(0,-6),m=sf(w,k,t);if(!v.endsWith(m))throw new Error(`Invalid checksum in ${f}: expected "${m}"`);return{prefix:w,words:k}}const u=rf(s);function a(f){const{prefix:c,words:d}=s(f,!1);return{prefix:c,words:d,bytes:r(d)}}return{encode:l,decode:s,decodeToBytes:a,decodeUnsafe:u,fromWords:r,fromWordsUnsafe:i,toWords:o}}const _t=qp("bech32"),pg=qp("bech32m"),Jp={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)},eh=ot(At(4),dt("0123456789abcdef"),pt(""),Mp(e=>{if(typeof e!="string"||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})),bo={utf8:Jp,hex:eh,base16:Qp,base32:Gp,base64:vr,base64url:Yp,base58:So,base58xmr:Xp},th=`Invalid encoding type. Available types: ${Object.keys(bo).join(", ")}`,nh=(e,t)=>{if(typeof e!="string"||!bo.hasOwnProperty(e))throw new TypeError(th);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return bo[e].encode(t)},hg=nh,rh=(e,t)=>{if(!bo.hasOwnProperty(e))throw new TypeError(th);if(typeof t!="string")throw new TypeError("stringToBytes() expects string");return bo[e].decode(t)},mg=rh,yg=Object.freeze(Object.defineProperty({__proto__:null,assertNumber:fn,base16:Qp,base32:Gp,base32crockford:cg,base32hex:ag,base58:So,base58check:Zp,base58flickr:fg,base58xmr:Xp,base58xrp:dg,base64:vr,base64url:Yp,bech32:_t,bech32m:pg,bytes:mg,bytesToString:nh,hex:eh,str:hg,stringToBytes:rh,utf8:Jp,utils:ug},Symbol.toStringTag,{value:"Module"}));var va={};Object.defineProperty(va,"__esModule",{value:!0});var wa=va.wordlist=void 0;wa=va.wordlist=`abandon -ability -able -about -above -absent -absorb -abstract -absurd -abuse -access -accident -account -accuse -achieve -acid -acoustic -acquire -across -act -action -actor -actress -actual -adapt -add -addict -address -adjust -admit -adult -advance -advice -aerobic -affair -afford -afraid -again -age -agent -agree -ahead -aim -air -airport -aisle -alarm -album -alcohol -alert -alien -all -alley -allow -almost -alone -alpha -already -also -alter -always -amateur -amazing -among -amount -amused -analyst -anchor -ancient -anger -angle -angry -animal -ankle -announce -annual -another -answer -antenna -antique -anxiety -any -apart -apology -appear -apple -approve -april -arch -arctic -area -arena -argue -arm -armed -armor -army -around -arrange -arrest -arrive -arrow -art -artefact -artist -artwork -ask -aspect -assault -asset -assist -assume -asthma -athlete -atom -attack -attend -attitude -attract -auction -audit -august -aunt -author -auto -autumn -average -avocado -avoid -awake -aware -away -awesome -awful -awkward -axis -baby -bachelor -bacon -badge -bag -balance -balcony -ball -bamboo -banana -banner -bar -barely -bargain -barrel -base -basic -basket -battle -beach -bean -beauty -because -become -beef -before -begin -behave -behind -believe -below -belt -bench -benefit -best -betray -better -between -beyond -bicycle -bid -bike -bind -biology -bird -birth -bitter -black -blade -blame -blanket -blast -bleak -bless -blind -blood -blossom -blouse -blue -blur -blush -board -boat -body -boil -bomb -bone -bonus -book -boost -border -boring -borrow -boss -bottom -bounce -box -boy -bracket -brain -brand -brass -brave -bread -breeze -brick -bridge -brief -bright -bring -brisk -broccoli -broken -bronze -broom -brother -brown -brush -bubble -buddy -budget -buffalo -build -bulb -bulk -bullet -bundle -bunker -burden -burger -burst -bus -business -busy -butter -buyer -buzz -cabbage -cabin -cable -cactus -cage -cake -call -calm -camera -camp -can -canal -cancel -candy -cannon -canoe -canvas -canyon -capable -capital -captain -car -carbon -card -cargo -carpet -carry -cart -case -cash -casino -castle -casual -cat -catalog -catch -category -cattle -caught -cause -caution -cave -ceiling -celery -cement -census -century -cereal -certain -chair -chalk -champion -change -chaos -chapter -charge -chase -chat -cheap -check -cheese -chef -cherry -chest -chicken -chief -child -chimney -choice -choose -chronic -chuckle -chunk -churn -cigar -cinnamon -circle -citizen -city -civil -claim -clap -clarify -claw -clay -clean -clerk -clever -click -client -cliff -climb -clinic -clip -clock -clog -close -cloth -cloud -clown -club -clump -cluster -clutch -coach -coast -coconut -code -coffee -coil -coin -collect -color -column -combine -come -comfort -comic -common -company -concert -conduct -confirm -congress -connect -consider -control -convince -cook -cool -copper -copy -coral -core -corn -correct -cost -cotton -couch -country -couple -course -cousin -cover -coyote -crack -cradle -craft -cram -crane -crash -crater -crawl -crazy -cream -credit -creek -crew -cricket -crime -crisp -critic -crop -cross -crouch -crowd -crucial -cruel -cruise -crumble -crunch -crush -cry -crystal -cube -culture -cup -cupboard -curious -current -curtain -curve -cushion -custom -cute -cycle -dad -damage -damp -dance -danger -daring -dash -daughter -dawn -day -deal -debate -debris -decade -december -decide -decline -decorate -decrease -deer -defense -define -defy -degree -delay -deliver -demand -demise -denial -dentist -deny -depart -depend -deposit -depth -deputy -derive -describe -desert -design -desk -despair -destroy -detail -detect -develop -device -devote -diagram -dial -diamond -diary -dice -diesel -diet -differ -digital -dignity -dilemma -dinner -dinosaur -direct -dirt -disagree -discover -disease -dish -dismiss -disorder -display -distance -divert -divide -divorce -dizzy -doctor -document -dog -doll -dolphin -domain -donate -donkey -donor -door -dose -double -dove -draft -dragon -drama -drastic -draw -dream -dress -drift -drill -drink -drip -drive -drop -drum -dry -duck -dumb -dune -during -dust -dutch -duty -dwarf -dynamic -eager -eagle -early -earn -earth -easily -east -easy -echo -ecology -economy -edge -edit -educate -effort -egg -eight -either -elbow -elder -electric -elegant -element -elephant -elevator -elite -else -embark -embody -embrace -emerge -emotion -employ -empower -empty -enable -enact -end -endless -endorse -enemy -energy -enforce -engage -engine -enhance -enjoy -enlist -enough -enrich -enroll -ensure -enter -entire -entry -envelope -episode -equal -equip -era -erase -erode -erosion -error -erupt -escape -essay -essence -estate -eternal -ethics -evidence -evil -evoke -evolve -exact -example -excess -exchange -excite -exclude -excuse -execute -exercise -exhaust -exhibit -exile -exist -exit -exotic -expand -expect -expire -explain -expose -express -extend -extra -eye -eyebrow -fabric -face -faculty -fade -faint -faith -fall -false -fame -family -famous -fan -fancy -fantasy -farm -fashion -fat -fatal -father -fatigue -fault -favorite -feature -february -federal -fee -feed -feel -female -fence -festival -fetch -fever -few -fiber -fiction -field -figure -file -film -filter -final -find -fine -finger -finish -fire -firm -first -fiscal -fish -fit -fitness -fix -flag -flame -flash -flat -flavor -flee -flight -flip -float -flock -floor -flower -fluid -flush -fly -foam -focus -fog -foil -fold -follow -food -foot -force -forest -forget -fork -fortune -forum -forward -fossil -foster -found -fox -fragile -frame -frequent -fresh -friend -fringe -frog -front -frost -frown -frozen -fruit -fuel -fun -funny -furnace -fury -future -gadget -gain -galaxy -gallery -game -gap -garage -garbage -garden -garlic -garment -gas -gasp -gate -gather -gauge -gaze -general -genius -genre -gentle -genuine -gesture -ghost -giant -gift -giggle -ginger -giraffe -girl -give -glad -glance -glare -glass -glide -glimpse -globe -gloom -glory -glove -glow -glue -goat -goddess -gold -good -goose -gorilla -gospel -gossip -govern -gown -grab -grace -grain -grant -grape -grass -gravity -great -green -grid -grief -grit -grocery -group -grow -grunt -guard -guess -guide -guilt -guitar -gun -gym -habit -hair -half -hammer -hamster -hand -happy -harbor -hard -harsh -harvest -hat -have -hawk -hazard -head -health -heart -heavy -hedgehog -height -hello -helmet -help -hen -hero -hidden -high -hill -hint -hip -hire -history -hobby -hockey -hold -hole -holiday -hollow -home -honey -hood -hope -horn -horror -horse -hospital -host -hotel -hour -hover -hub -huge -human -humble -humor -hundred -hungry -hunt -hurdle -hurry -hurt -husband -hybrid -ice -icon -idea -identify -idle -ignore -ill -illegal -illness -image -imitate -immense -immune -impact -impose -improve -impulse -inch -include -income -increase -index -indicate -indoor -industry -infant -inflict -inform -inhale -inherit -initial -inject -injury -inmate -inner -innocent -input -inquiry -insane -insect -inside -inspire -install -intact -interest -into -invest -invite -involve -iron -island -isolate -issue -item -ivory -jacket -jaguar -jar -jazz -jealous -jeans -jelly -jewel -job -join -joke -journey -joy -judge -juice -jump -jungle -junior -junk -just -kangaroo -keen -keep -ketchup -key -kick -kid -kidney -kind -kingdom -kiss -kit -kitchen -kite -kitten -kiwi -knee -knife -knock -know -lab -label -labor -ladder -lady -lake -lamp -language -laptop -large -later -latin -laugh -laundry -lava -law -lawn -lawsuit -layer -lazy -leader -leaf -learn -leave -lecture -left -leg -legal -legend -leisure -lemon -lend -length -lens -leopard -lesson -letter -level -liar -liberty -library -license -life -lift -light -like -limb -limit -link -lion -liquid -list -little -live -lizard -load -loan -lobster -local -lock -logic -lonely -long -loop -lottery -loud -lounge -love -loyal -lucky -luggage -lumber -lunar -lunch -luxury -lyrics -machine -mad -magic -magnet -maid -mail -main -major -make -mammal -man -manage -mandate -mango -mansion -manual -maple -marble -march -margin -marine -market -marriage -mask -mass -master -match -material -math -matrix -matter -maximum -maze -meadow -mean -measure -meat -mechanic -medal -media -melody -melt -member -memory -mention -menu -mercy -merge -merit -merry -mesh -message -metal -method -middle -midnight -milk -million -mimic -mind -minimum -minor -minute -miracle -mirror -misery -miss -mistake -mix -mixed -mixture -mobile -model -modify -mom -moment -monitor -monkey -monster -month -moon -moral -more -morning -mosquito -mother -motion -motor -mountain -mouse -move -movie -much -muffin -mule -multiply -muscle -museum -mushroom -music -must -mutual -myself -mystery -myth -naive -name -napkin -narrow -nasty -nation -nature -near -neck -need -negative -neglect -neither -nephew -nerve -nest -net -network -neutral -never -news -next -nice -night -noble -noise -nominee -noodle -normal -north -nose -notable -note -nothing -notice -novel -now -nuclear -number -nurse -nut -oak -obey -object -oblige -obscure -observe -obtain -obvious -occur -ocean -october -odor -off -offer -office -often -oil -okay -old -olive -olympic -omit -once -one -onion -online -only -open -opera -opinion -oppose -option -orange -orbit -orchard -order -ordinary -organ -orient -original -orphan -ostrich -other -outdoor -outer -output -outside -oval -oven -over -own -owner -oxygen -oyster -ozone -pact -paddle -page -pair -palace -palm -panda -panel -panic -panther -paper -parade -parent -park -parrot -party -pass -patch -path -patient -patrol -pattern -pause -pave -payment -peace -peanut -pear -peasant -pelican -pen -penalty -pencil -people -pepper -perfect -permit -person -pet -phone -photo -phrase -physical -piano -picnic -picture -piece -pig -pigeon -pill -pilot -pink -pioneer -pipe -pistol -pitch -pizza -place -planet -plastic -plate -play -please -pledge -pluck -plug -plunge -poem -poet -point -polar -pole -police -pond -pony -pool -popular -portion -position -possible -post -potato -pottery -poverty -powder -power -practice -praise -predict -prefer -prepare -present -pretty -prevent -price -pride -primary -print -priority -prison -private -prize -problem -process -produce -profit -program -project -promote -proof -property -prosper -protect -proud -provide -public -pudding -pull -pulp -pulse -pumpkin -punch -pupil -puppy -purchase -purity -purpose -purse -push -put -puzzle -pyramid -quality -quantum -quarter -question -quick -quit -quiz -quote -rabbit -raccoon -race -rack -radar -radio -rail -rain -raise -rally -ramp -ranch -random -range -rapid -rare -rate -rather -raven -raw -razor -ready -real -reason -rebel -rebuild -recall -receive -recipe -record -recycle -reduce -reflect -reform -refuse -region -regret -regular -reject -relax -release -relief -rely -remain -remember -remind -remove -render -renew -rent -reopen -repair -repeat -replace -report -require -rescue -resemble -resist -resource -response -result -retire -retreat -return -reunion -reveal -review -reward -rhythm -rib -ribbon -rice -rich -ride -ridge -rifle -right -rigid -ring -riot -ripple -risk -ritual -rival -river -road -roast -robot -robust -rocket -romance -roof -rookie -room -rose -rotate -rough -round -route -royal -rubber -rude -rug -rule -run -runway -rural -sad -saddle -sadness -safe -sail -salad -salmon -salon -salt -salute -same -sample -sand -satisfy -satoshi -sauce -sausage -save -say -scale -scan -scare -scatter -scene -scheme -school -science -scissors -scorpion -scout -scrap -screen -script -scrub -sea -search -season -seat -second -secret -section -security -seed -seek -segment -select -sell -seminar -senior -sense -sentence -series -service -session -settle -setup -seven -shadow -shaft -shallow -share -shed -shell -sheriff -shield -shift -shine -ship -shiver -shock -shoe -shoot -shop -short -shoulder -shove -shrimp -shrug -shuffle -shy -sibling -sick -side -siege -sight -sign -silent -silk -silly -silver -similar -simple -since -sing -siren -sister -situate -six -size -skate -sketch -ski -skill -skin -skirt -skull -slab -slam -sleep -slender -slice -slide -slight -slim -slogan -slot -slow -slush -small -smart -smile -smoke -smooth -snack -snake -snap -sniff -snow -soap -soccer -social -sock -soda -soft -solar -soldier -solid -solution -solve -someone -song -soon -sorry -sort -soul -sound -soup -source -south -space -spare -spatial -spawn -speak -special -speed -spell -spend -sphere -spice -spider -spike -spin -spirit -split -spoil -sponsor -spoon -sport -spot -spray -spread -spring -spy -square -squeeze -squirrel -stable -stadium -staff -stage -stairs -stamp -stand -start -state -stay -steak -steel -stem -step -stereo -stick -still -sting -stock -stomach -stone -stool -story -stove -strategy -street -strike -strong -struggle -student -stuff -stumble -style -subject -submit -subway -success -such -sudden -suffer -sugar -suggest -suit -summer -sun -sunny -sunset -super -supply -supreme -sure -surface -surge -surprise -surround -survey -suspect -sustain -swallow -swamp -swap -swarm -swear -sweet -swift -swim -swing -switch -sword -symbol -symptom -syrup -system -table -tackle -tag -tail -talent -talk -tank -tape -target -task -taste -tattoo -taxi -teach -team -tell -ten -tenant -tennis -tent -term -test -text -thank -that -theme -then -theory -there -they -thing -this -thought -three -thrive -throw -thumb -thunder -ticket -tide -tiger -tilt -timber -time -tiny -tip -tired -tissue -title -toast -tobacco -today -toddler -toe -together -toilet -token -tomato -tomorrow -tone -tongue -tonight -tool -tooth -top -topic -topple -torch -tornado -tortoise -toss -total -tourist -toward -tower -town -toy -track -trade -traffic -tragic -train -transfer -trap -trash -travel -tray -treat -tree -trend -trial -tribe -trick -trigger -trim -trip -trophy -trouble -truck -true -truly -trumpet -trust -truth -try -tube -tuition -tumble -tuna -tunnel -turkey -turn -turtle -twelve -twenty -twice -twin -twist -two -type -typical -ugly -umbrella -unable -unaware -uncle -uncover -under -undo -unfair -unfold -unhappy -uniform -unique -unit -universe -unknown -unlock -until -unusual -unveil -update -upgrade -uphold -upon -upper -upset -urban -urge -usage -use -used -useful -useless -usual -utility -vacant -vacuum -vague -valid -valley -valve -van -vanish -vapor -various -vast -vault -vehicle -velvet -vendor -venture -venue -verb -verify -version -very -vessel -veteran -viable -vibrant -vicious -victory -video -view -village -vintage -violin -virtual -virus -visa -visit -visual -vital -vivid -vocal -voice -void -volcano -volume -vote -voyage -wage -wagon -wait -walk -wall -walnut -want -warfare -warm -warrior -wash -wasp -waste -water -wave -way -wealth -weapon -wear -weasel -weather -web -wedding -weekend -weird -welcome -west -wet -whale -what -wheat -wheel -when -where -whip -whisper -wide -width -wife -wild -will -win -window -wine -wing -wink -winner -winter -wire -wisdom -wise -wish -witness -wolf -woman -wonder -wood -wool -word -work -world -worry -worth -wrap -wreck -wrestle -wrist -write -wrong -yard -year -yellow -you -young -youth -zebra -zero -zone -zoo`.split(` -`);var Oe={};function qi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function oh(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function Ft(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function ih(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");qi(e.outputLen),qi(e.blockLen)}function lh(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function sh(e,t){Ft(e);const n=t.outputLen;if(e.length0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}ve.bytes=xa;function ah(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ji(e.outputLen),Ji(e.blockLen)}ve.hash=ah;function ch(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ve.exists=ch;function fh(e,t){xa(e);const n=t.outputLen;if(e.lengthnew Uint8Array(g.buffer,g.byteOffset,g.byteLength);e.u8=n;const r=g=>new Uint32Array(g.buffer,g.byteOffset,Math.floor(g.byteLength/4));e.u32=r;const o=g=>new DataView(g.buffer,g.byteOffset,g.byteLength);e.createView=o;const i=(g,x)=>g<<32-x|g>>>x;if(e.rotr=i,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const l=Array.from({length:256},(g,x)=>x.toString(16).padStart(2,"0"));function s(g){if(!(g instanceof Uint8Array))throw new Error("Uint8Array expected");let x="";for(let b=0;b{};e.nextTick=a;async function f(g,x,b){let S=Date.now();for(let _=0;_=0&&LS instanceof Uint8Array))throw new Error("Uint8Array list expected");if(g.length===1)return g[0];const x=g.reduce((S,_)=>S+_.length,0),b=new Uint8Array(x);for(let S=0,_=0;SObject.prototype.toString.call(g)==="[object Object]"&&g.constructor===Object;function k(g,x){if(x!==void 0&&(typeof x!="object"||!v(x)))throw new TypeError("Options should be object or undefined");return Object.assign(g,x)}e.checkOpts=k;function m(g){const x=S=>g().update(d(S)).digest(),b=g();return x.outputLen=b.outputLen,x.blockLen=b.blockLen,x.create=()=>g(),x}e.wrapConstructor=m;function p(g){const x=(S,_)=>g(_).update(d(S)).digest(),b=g({});return x.outputLen=b.outputLen,x.blockLen=b.blockLen,x.create=S=>g(S),x}e.wrapConstructorWithOpts=p;function y(g=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(g));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(g).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=y})(Ea);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=ve,n=Ea;class r extends n.Hash{constructor(l,s){super(),this.finished=!1,this.destroyed=!1,t.default.hash(l);const u=(0,n.toBytes)(s);if(this.iHash=l.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const a=this.blockLen,f=new Uint8Array(a);f.set(u.length>a?l.create().update(u).digest():u);for(let c=0;cnew r(i,l).update(s).digest();e.hmac=o,e.hmac.create=(i,l)=>new r(i,l)})(dh);Object.defineProperty(wr,"__esModule",{value:!0});wr.pbkdf2Async=wr.pbkdf2=void 0;const ii=ve,kg=dh,lr=Ea;function ph(e,t,n,r){ii.default.hash(e);const o=(0,lr.checkOpts)({dkLen:32,asyncTick:10},r),{c:i,dkLen:l,asyncTick:s}=o;if(ii.default.number(i),ii.default.number(l),ii.default.number(s),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const u=(0,lr.toBytes)(t),a=(0,lr.toBytes)(n),f=new Uint8Array(l),c=kg.hmac.create(e,u),d=c._cloneInto().update(a);return{c:i,dkLen:l,asyncTick:s,DK:f,PRF:c,PRFSalt:d}}function hh(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),o.fill(0),n}function Sg(e,t,n,r){const{c:o,dkLen:i,DK:l,PRF:s,PRFSalt:u}=ph(e,t,n,r);let a;const f=new Uint8Array(4),c=(0,lr.createView)(f),d=new Uint8Array(s.outputLen);for(let h=1,w=0;w{u._cloneInto(f).update(h).digestInto(h);for(let p=0;pnew Uint8Array(e.buffer,e.byteOffset,e.byteLength),_g=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),bn=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Xe=(e,t)=>e<<32-t|e>>>t,mh=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!mh)throw new Error("Non little-endian hardware is not supported");const Tg=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function yh(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n=0;n{};async function Ag(e,t,n){let r=Date.now();for(let o=0;o=0&&ir instanceof Uint8Array))throw new Error("Uint8Array list expected");if(e.length===1)return e[0];const t=e.reduce((r,o)=>r+o.length,0),n=new Uint8Array(t);for(let r=0,o=0;rObject.prototype.toString.call(e)==="[object Object]"&&e.constructor===Object;function Ig(e,t){if(t!==void 0&&(typeof t!="object"||!Ng(t)))throw new TypeError("Options should be object or undefined");return Object.assign(e,t)}function dn(e){const t=r=>e().update(Po(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Lg(e){const t=(r,o)=>e(o).update(Po(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function $g(e=32){if(Mr.web)return Mr.web.getRandomValues(new Uint8Array(e));if(Mr.node)return new Uint8Array(Mr.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}const Pg=Object.freeze(Object.defineProperty({__proto__:null,Hash:Sa,asyncLoop:Ag,bytesToHex:yh,checkOpts:Ig,concatBytes:Vr,createView:bn,hexToBytes:gh,isLE:mh,nextTick:vh,randomBytes:$g,rotr:Xe,toBytes:Po,u32:_g,u8:Cg,utf8ToBytes:ka,wrapConstructor:dn,wrapConstructorWithOpts:Lg},Symbol.toStringTag,{value:"Module"}));function Rg(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),l=Number(n>>o&i),s=Number(n&i),u=r?4:0,a=r?0:4;e.setUint32(t+u,l,r),e.setUint32(t+a,s,r)}class ba extends Sa{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=bn(this.buffer)}update(t){Wt.exists(this);const{view:n,buffer:r,blockLen:o}=this;t=Po(t);const i=t.length;for(let l=0;lo-l&&(this.process(r,0),l=0);for(let c=l;cf.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;ce&t^~e&n,zg=(e,t,n)=>e&t^e&n^t&n,Hg=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Pt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Rt=new Uint32Array(64);class wh extends ba{constructor(){super(64,32,8,!1),this.A=Pt[0]|0,this.B=Pt[1]|0,this.C=Pt[2]|0,this.D=Pt[3]|0,this.E=Pt[4]|0,this.F=Pt[5]|0,this.G=Pt[6]|0,this.H=Pt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:l,G:s,H:u}=this;return[t,n,r,o,i,l,s,u]}set(t,n,r,o,i,l,s,u){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=l|0,this.G=s|0,this.H=u|0}process(t,n){for(let c=0;c<16;c++,n+=4)Rt[c]=t.getUint32(n,!1);for(let c=16;c<64;c++){const d=Rt[c-15],h=Rt[c-2],w=Xe(d,7)^Xe(d,18)^d>>>3,v=Xe(h,17)^Xe(h,19)^h>>>10;Rt[c]=v+Rt[c-7]+w+Rt[c-16]|0}let{A:r,B:o,C:i,D:l,E:s,F:u,G:a,H:f}=this;for(let c=0;c<64;c++){const d=Xe(s,6)^Xe(s,11)^Xe(s,25),h=f+d+Og(s,u,a)+Hg[c]+Rt[c]|0,v=(Xe(r,2)^Xe(r,13)^Xe(r,22))+zg(r,o,i)|0;f=a,a=u,u=s,s=l+h|0,l=i,i=o,o=r,r=h+v|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,l=l+this.D|0,s=s+this.E|0,u=u+this.F|0,a=a+this.G|0,f=f+this.H|0,this.set(r,o,i,l,s,u,a,f)}roundClean(){Rt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class Bg extends wh{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const El=dn(()=>new wh),Ug=dn(()=>new Bg),jg=Object.freeze(Object.defineProperty({__proto__:null,sha224:Ug,sha256:El},Symbol.toStringTag,{value:"Module"})),Dg=xr(jg),li=BigInt(2**32-1),pu=BigInt(32);function xh(e,t=!1){return t?{h:Number(e&li),l:Number(e>>pu&li)}:{h:Number(e>>pu&li)|0,l:Number(e&li)|0}}function Fg(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),Vg=(e,t,n)=>e>>>n,Kg=(e,t,n)=>e<<32-n|t>>>n,Wg=(e,t,n)=>e>>>n|t<<32-n,Qg=(e,t,n)=>e<<32-n|t>>>n,Gg=(e,t,n)=>e<<64-n|t>>>n-32,Yg=(e,t,n)=>e>>>n-32|t<<64-n,Xg=(e,t)=>t,Zg=(e,t)=>e,qg=(e,t,n)=>e<>>32-n,Jg=(e,t,n)=>t<>>32-n,e1=(e,t,n)=>t<>>64-n,t1=(e,t,n)=>e<>>64-n;function n1(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const r1=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),o1=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,i1=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),l1=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,s1=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),u1=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,O={fromBig:xh,split:Fg,toBig:Mg,shrSH:Vg,shrSL:Kg,rotrSH:Wg,rotrSL:Qg,rotrBH:Gg,rotrBL:Yg,rotr32H:Xg,rotr32L:Zg,rotlSH:qg,rotlSL:Jg,rotlBH:e1,rotlBL:t1,add:n1,add3L:r1,add3H:o1,add4L:i1,add4H:l1,add5H:u1,add5L:s1},[a1,c1]=O.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ot=new Uint32Array(80),zt=new Uint32Array(80);class Ro extends ba{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:i,Cl:l,Dh:s,Dl:u,Eh:a,El:f,Fh:c,Fl:d,Gh:h,Gl:w,Hh:v,Hl:k}=this;return[t,n,r,o,i,l,s,u,a,f,c,d,h,w,v,k]}set(t,n,r,o,i,l,s,u,a,f,c,d,h,w,v,k){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=l|0,this.Dh=s|0,this.Dl=u|0,this.Eh=a|0,this.El=f|0,this.Fh=c|0,this.Fl=d|0,this.Gh=h|0,this.Gl=w|0,this.Hh=v|0,this.Hl=k|0}process(t,n){for(let y=0;y<16;y++,n+=4)Ot[y]=t.getUint32(n),zt[y]=t.getUint32(n+=4);for(let y=16;y<80;y++){const g=Ot[y-15]|0,x=zt[y-15]|0,b=O.rotrSH(g,x,1)^O.rotrSH(g,x,8)^O.shrSH(g,x,7),S=O.rotrSL(g,x,1)^O.rotrSL(g,x,8)^O.shrSL(g,x,7),_=Ot[y-2]|0,L=zt[y-2]|0,$=O.rotrSH(_,L,19)^O.rotrBH(_,L,61)^O.shrSH(_,L,6),te=O.rotrSL(_,L,19)^O.rotrBL(_,L,61)^O.shrSL(_,L,6),be=O.add4L(S,te,zt[y-7],zt[y-16]),$e=O.add4H(be,b,$,Ot[y-7],Ot[y-16]);Ot[y]=$e|0,zt[y]=be|0}let{Ah:r,Al:o,Bh:i,Bl:l,Ch:s,Cl:u,Dh:a,Dl:f,Eh:c,El:d,Fh:h,Fl:w,Gh:v,Gl:k,Hh:m,Hl:p}=this;for(let y=0;y<80;y++){const g=O.rotrSH(c,d,14)^O.rotrSH(c,d,18)^O.rotrBH(c,d,41),x=O.rotrSL(c,d,14)^O.rotrSL(c,d,18)^O.rotrBL(c,d,41),b=c&h^~c&v,S=d&w^~d&k,_=O.add5L(p,x,S,c1[y],zt[y]),L=O.add5H(_,m,g,b,a1[y],Ot[y]),$=_|0,te=O.rotrSH(r,o,28)^O.rotrBH(r,o,34)^O.rotrBH(r,o,39),be=O.rotrSL(r,o,28)^O.rotrBL(r,o,34)^O.rotrBL(r,o,39),$e=r&i^r&s^i&s,On=o&l^o&u^l&u;m=v|0,p=k|0,v=h|0,k=w|0,h=c|0,w=d|0,{h:c,l:d}=O.add(a|0,f|0,L|0,$|0),a=s|0,f=u|0,s=i|0,u=l|0,i=r|0,l=o|0;const zn=O.add3L($,be,On);r=O.add3H(zn,L,te,$e),o=zn|0}({h:r,l:o}=O.add(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l}=O.add(this.Bh|0,this.Bl|0,i|0,l|0),{h:s,l:u}=O.add(this.Ch|0,this.Cl|0,s|0,u|0),{h:a,l:f}=O.add(this.Dh|0,this.Dl|0,a|0,f|0),{h:c,l:d}=O.add(this.Eh|0,this.El|0,c|0,d|0),{h,l:w}=O.add(this.Fh|0,this.Fl|0,h|0,w|0),{h:v,l:k}=O.add(this.Gh|0,this.Gl|0,v|0,k|0),{h:m,l:p}=O.add(this.Hh|0,this.Hl|0,m|0,p|0),this.set(r,o,i,l,s,u,a,f,c,d,h,w,v,k,m,p)}roundClean(){Ot.fill(0),zt.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class f1 extends Ro{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class d1 extends Ro{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class p1 extends Ro{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const hu=dn(()=>new Ro),h1=dn(()=>new f1),m1=dn(()=>new d1),y1=dn(()=>new p1),g1=Object.freeze(Object.defineProperty({__proto__:null,SHA512:Ro,sha384:y1,sha512:hu,sha512_224:h1,sha512_256:m1},Symbol.toStringTag,{value:"Module"})),v1=xr(g1),w1=xr(Pg),x1=xr(yg);Object.defineProperty(Oe,"__esModule",{value:!0});var Eh=Oe.mnemonicToSeedSync=Oe.mnemonicToSeed=Lh=Oe.validateMnemonic=Oe.entropyToMnemonic=Oe.mnemonicToEntropy=Th=Oe.generateMnemonic=void 0;/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const kh=vg,Sh=wr,E1=Dg,bh=v1,k1=w1,si=x1,S1=e=>e[0]==="あいこくしん";function Ch(e){if(typeof e!="string")throw new TypeError(`Invalid mnemonic type: ${typeof e}`);return e.normalize("NFKD")}function Ca(e){const t=Ch(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function _h(e){kh.default.bytes(e,16,20,24,28,32)}function b1(e,t=128){if(kh.default.number(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return Ih((0,k1.randomBytes)(t/8),e)}var Th=Oe.generateMnemonic=b1;const C1=e=>{const t=8-e.length/4;return new Uint8Array([(0,E1.sha256)(e)[0]>>t<{if(typeof t!="string")throw new Error(`Wordlist: non-string element: ${t}`)}),si.utils.chain(si.utils.checksum(1,C1),si.utils.radix2(11,!0),si.utils.alphabet(e))}function Nh(e,t){const{words:n}=Ca(e),r=Ah(t).decode(n);return _h(r),r}Oe.mnemonicToEntropy=Nh;function Ih(e,t){return _h(e),Ah(t).encode(e).join(S1(t)?" ":" ")}Oe.entropyToMnemonic=Ih;function _1(e,t){try{Nh(e,t)}catch{return!1}return!0}var Lh=Oe.validateMnemonic=_1;const $h=e=>Ch(`mnemonic${e}`);function T1(e,t=""){return(0,Sh.pbkdf2Async)(bh.sha512,Ca(e).nfkd,$h(t),{c:2048,dkLen:64})}Oe.mnemonicToSeed=T1;function A1(e,t=""){return(0,Sh.pbkdf2)(bh.sha512,Ca(e).nfkd,$h(t),{c:2048,dkLen:64})}Eh=Oe.mnemonicToSeedSync=A1;let Ph=class extends Sa{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Wt.hash(t);const r=Po(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?t.create().update(r).digest():r);for(let l=0;lnew Ph(e,t).update(n).digest();el.create=(e,t)=>new Ph(e,t);const N1=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Rh=Uint8Array.from({length:16},(e,t)=>t),I1=Rh.map(e=>(9*e+5)%16);let _a=[Rh],Ta=[I1];for(let e=0;e<4;e++)for(let t of[_a,Ta])t.push(t[e].map(n=>N1[n]));const Oh=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),L1=_a.map((e,t)=>e.map(n=>Oh[t][n])),$1=Ta.map((e,t)=>e.map(n=>Oh[t][n])),P1=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),R1=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),ui=(e,t)=>e<>>32-t;function uf(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const ai=new Uint32Array(16);class O1 extends ba{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:o,h4:i}=this;return[t,n,r,o,i]}set(t,n,r,o,i){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=o|0,this.h4=i|0}process(t,n){for(let h=0;h<16;h++,n+=4)ai[h]=t.getUint32(n,!0);let r=this.h0|0,o=r,i=this.h1|0,l=i,s=this.h2|0,u=s,a=this.h3|0,f=a,c=this.h4|0,d=c;for(let h=0;h<5;h++){const w=4-h,v=P1[h],k=R1[h],m=_a[h],p=Ta[h],y=L1[h],g=$1[h];for(let x=0;x<16;x++){const b=ui(r+uf(h,i,s,a)+ai[m[x]]+v,y[x])+c|0;r=c,c=a,a=ui(s,10)|0,s=i,i=b}for(let x=0;x<16;x++){const b=ui(o+uf(w,l,u,f)+ai[p[x]]+k,g[x])+d|0;o=d,d=f,f=ui(u,10)|0,u=l,l=b}}this.set(this.h1+s+f|0,this.h2+a+d|0,this.h3+c+o|0,this.h4+r+l|0,this.h0+i+u|0)}roundClean(){ai.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const z1=dn(()=>new O1);z.hmacSha256Sync=(e,...t)=>el(El,e,z.concatBytes(...t));const is=Zp(El);function af(e){return BigInt(`0x${yh(e)}`)}function H1(e){return gh(e.toString(16).padStart(64,"0"))}const B1=ka("Bitcoin seed"),ls={private:76066276,public:76067358},ss=2147483648,U1=e=>z1(El(e)),j1=e=>bn(e).getUint32(0,!1),ci=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return bn(t).setUint32(0,e,!1),t};class vn{constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||ls,this.depth=t.depth||0,this.chainCode=t.chainCode,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!z.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:af(t.privateKey),this.privKeyBytes=H1(this.privKey),this.pubKey=Dy(t.privateKey,!0)}else if(t.publicKey)this.pubKey=j.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=U1(this.pubKey)}get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return j1(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return is.encode(this.serialize(this.versions.private,Vr(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return is.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=ls){if(Ft(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=el(hu,B1,t);return new vn({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=ls){const r=is.decode(t),o=bn(r),i=o.getUint32(0,!1),l={versions:n,depth:r[4],parentFingerprint:o.getUint32(5,!1),index:o.getUint32(9,!1),chainCode:r.slice(13,45)},s=r.slice(45),u=s[0]===0;if(i!==n[u?"private":"public"])throw new Error("Version mismatch");return u?new vn({...l,privateKey:s.slice(1)}):new vn({...l,publicKey:s})}static fromJSON(t){return vn.fromExtendedKey(t.xpriv)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const o of n){const i=/^(\d+)('?)$/.exec(o);if(!i||i.length!==3)throw new Error(`Invalid child index: ${o}`);let l=+i[1];if(!Number.isSafeInteger(l)||l>=ss)throw new Error("Invalid index");i[2]==="'"&&(l+=ss),r=r.deriveChild(l)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=ci(t);if(t>=ss){const s=this.privateKey;if(!s)throw new Error("Could not derive hardened child key");n=Vr(new Uint8Array([0]),s,n)}else n=Vr(this.pubKey,n);const r=el(hu,this.chainCode,n),o=af(r.slice(0,32)),i=r.slice(32);if(!z.isValidPrivateKey(o))throw new Error("Tweak bigger than curve order");const l={versions:this.versions,chainCode:i,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const s=z.mod(this.privKey+o,D.n);if(!z.isValidPrivateKey(s))throw new Error("The tweak was out of range or the resulted private key is invalid");l.privateKey=s}else l.publicKey=j.fromHex(this.pubKey).add(j.fromPrivateKey(o)).toRawBytes(!0);return new vn(l)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Ft(t,32),Ky(t,this.privKey,{canonical:!0,der:!1})}verify(t,n){if(Ft(t,32),Ft(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=Et.fromCompact(n)}catch{return!1}return Qy(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Ft(n,33),Vr(ci(t),new Uint8Array([this.depth]),ci(this.parentFingerprint),ci(this.index),this.chainCode,n)}}class zh extends cu{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Jy(t);const r=ya(n);if(this.iHash=t.create(),!(this.iHash instanceof cu))throw new TypeError("Expected instance of class which extends utils.Hash");const o=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const i=new Uint8Array(o);i.set(r.length>this.iHash.blockLen?t.create().update(r).digest():r);for(let l=0;lnew zh(e,t).update(n).digest();tl.create=(e,t)=>new zh(e,t);tl.init=tl.create;var D1=Object.defineProperty,Oo=(e,t)=>{for(var n in t)D1(e,n,{get:t[n],enumerable:!0})};function Hh(){return z.bytesToHex(z.randomPrivateKey())}function nl(e){return z.bytesToHex(Io.getPublicKey(e))}var mu=new TextDecoder("utf-8"),Cr=new TextEncoder;function F1(){return{kind:255,pubkey:"",content:"",tags:[],created_at:0}}function M1(e){return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function kl(e){let t=Lo(Cr.encode(M1(e)));return z.bytesToHex(t)}function V1(e){if(e.id!==kl(e)||typeof e.content!="string"||typeof e.created_at!="number"||!Array.isArray(e.tags))return!1;for(let t=0;ti===n.slice(1)&&o.indexOf(l)!==-1))return!1}return!(e.since&&t.created_at=e.until)}function Q1(e,t){for(let n=0;n{t=new WebSocket(e),t.onopen=()=>{i.connect.forEach(w=>w()),d()},t.onerror=()=>{i.error.forEach(w=>w()),h()},t.onclose=async()=>{i.disconnect.forEach(w=>w()),n&&n()},t.onmessage=async w=>{var k,m,p,y;var v;try{v=JSON.parse(w.data)}catch{v=w.data}if(v.length>=1)switch(v[0]){case"EVENT":if(v.length!==3)return;let g=v[1],x=v[2];V1(x)&&o[g]&&(o[g].skipVerification||K1(x))&&Q1(o[g].filters,x)&&(o[g],(((k=l[g])==null?void 0:k.event)||[]).forEach(S=>S(x)));return;case"EOSE":{if(v.length!==2)return;let S=v[1];(((m=l[S])==null?void 0:m.eose)||[]).forEach(_=>_());return}case"OK":{if(v.length<3)return;let S=v[1],_=v[2],L=v[3]||"";_?(p=s[S])==null||p.ok.forEach($=>$()):(y=s[S])==null||y.failed.forEach($=>$(L));return}case"NOTICE":if(v.length!==2)return;let b=v[1];i.notice.forEach(S=>S(b));return}}})}async function a(){t!=null&&t.readyState&&t.readyState===1||await u()}async function f(d){let h=JSON.stringify(d);await r,t.send(h)}const c=(d,{skipVerification:h=!1,id:w=Math.random().toString().slice(2)}={})=>{let v=w;return o[v]={id:v,filters:d,skipVerification:h},f(["REQ",v,...d]),{sub:(k,m={})=>c(k||d,{skipVerification:m.skipVerification||h,id:v}),unsub:()=>{delete o[v],delete l[v],f(["CLOSE",v])},on:(k,m)=>{l[v]=l[v]||{event:[],eose:[]},l[v][k].push(m)},off:(k,m)=>{let p=l[v],y=p[k].indexOf(m);y>=0&&p[k].splice(y,1)}}};return{url:e,sub:c,on:(d,h)=>{i[d].push(h),d==="connect"&&(t==null?void 0:t.readyState)===1&&h()},off:(d,h)=>{let w=i[d].indexOf(h);w!==-1&&i[d].splice(w,1)},publish(d){if(!d.id)throw new Error(`event ${d} has no id`);let h=d.id;var w=!1,v=!1;f(["EVENT",d]).then(()=>{w=!0,v&&(k(),v=!1)}).catch(()=>{});const k=()=>{let m=c([{ids:[h]}],{id:`monitor-${h.slice(0,5)}`}),p=setTimeout(()=>{var y;(((y=s[h])==null?void 0:y.failed)||[]).forEach(g=>g("event not seen after 5 seconds")),m.unsub()},5e3);m.on("event",()=>{var y;clearTimeout(p),(((y=s[h])==null?void 0:y.seen)||[]).forEach(g=>g())})};return{on:(m,p)=>{s[h]=s[h]||{ok:[],seen:[],failed:[]},s[h][m].push(p),m==="seen"&&(w?k():v=!0)},off:(m,p)=>{let y=s[h];if(!y)return;let g=y[m].indexOf(p);g>=0&&y[m].splice(g,1)}}},connect:a,close(){return t.close(),new Promise(d=>{n=d})},get status(){return(t==null?void 0:t.readyState)??3}}}var Y1={};Oo(Y1,{decrypt:()=>Z1,encrypt:()=>X1});async function X1(e,t,n){const r=Op(e,"02"+t),o=Bh(r);let i=Uint8Array.from(tg(16)),l=Cr.encode(n),s=await crypto.subtle.importKey("raw",o,{name:"AES-CBC"},!1,["encrypt"]),u=await crypto.subtle.encrypt({name:"AES-CBC",iv:i},s,l),a=vr.encode(new Uint8Array(u)),f=vr.encode(new Uint8Array(i.buffer));return`${a}?iv=${f}`}async function Z1(e,t,n){let[r,o]=n.split("?iv="),i=Op(e,"02"+t),l=Bh(i),s=await crypto.subtle.importKey("raw",l,{name:"AES-CBC"},!1,["decrypt"]),u=vr.decode(r),a=vr.decode(o),f=await crypto.subtle.decrypt({name:"AES-CBC",iv:a},s,u);return mu.decode(f)}function Bh(e){return e.slice(1,33)}var q1={};Oo(q1,{queryProfile:()=>tv,searchDomain:()=>ev,useFetchImplementation:()=>J1});var Sl;try{Sl=fetch}catch{}function J1(e){Sl=e}async function ev(e,t=""){try{return(await(await Sl(`https://${e}/.well-known/nostr.json?name=${t}`)).json()).names}catch{return{}}}async function tv(e){var l,s;let[t,n]=e.split("@");if(n||(n=t,t="_"),!t.match(/^[a-z0-9-_]+$/))return null;let r=await(await Sl(`https://${n}/.well-known/nostr.json?name=${t}`)).json();if(!((l=r==null?void 0:r.names)!=null&&l[t]))return null;let o=r.names[t],i=((s=r.relays)==null?void 0:s[o])||[];return{pubkey:o,relays:i}}var nv={};Oo(nv,{generateSeedWords:()=>ov,privateKeyFromSeedWords:()=>rv,validateWords:()=>iv});function rv(e){let n=vn.fromMasterSeed(Eh(e)).derive("m/44'/1237'/0'/0/0").privateKey;if(!n)throw new Error("could not derive private key");return z.bytesToHex(n)}function ov(){return Th(wa)}function iv(e){return Lh(e,wa)}var lv={};Oo(lv,{decode:()=>sv,neventEncode:()=>dv,noteEncode:()=>cv,nprofileEncode:()=>fv,npubEncode:()=>av,nsecEncode:()=>uv});function sv(e){var o,i;let{prefix:t,words:n}=_t.decode(e,1e3),r=new Uint8Array(_t.fromWords(n));if(t==="nprofile"){let l=cf(r);if(!((o=l[0])!=null&&o[0]))throw new Error("missing TLV 0 for nprofile");if(l[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:z.bytesToHex(l[0][0]),relays:l[1].map(s=>mu.decode(s))}}}if(t==="nevent"){let l=cf(r);if(!((i=l[0])!=null&&i[0]))throw new Error("missing TLV 0 for nevent");if(l[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nevent",data:{id:z.bytesToHex(l[0][0]),relays:l[1].map(s=>mu.decode(s))}}}if(t==="nsec"||t==="npub"||t==="note")return{type:t,data:z.bytesToHex(r)};throw new Error(`unknown prefix ${t}`)}function cf(e){let t={},n=e;for(;n.length>0;){let r=n[0],o=n[1],i=n.slice(2,2+o);n=n.slice(2+o),!(i.lengthCr.encode(r))}),n=_t.toWords(t);return _t.encode("nprofile",n,1e3)}function dv(e){let t=Uh({0:[z.hexToBytes(e.id)],1:(e.relays||[]).map(r=>Cr.encode(r))}),n=_t.toWords(t);return _t.encode("nevent",n,1e3)}function Uh(e){let t=[];return Object.entries(e).forEach(([n,r])=>{r.forEach(o=>{let i=new Uint8Array(o.length+2);i.set([parseInt(n)],0),i.set([o.length],1),i.set(o,2),t.push(i)})}),z.concatBytes(...t)}var pv={};Oo(pv,{createDelegation:()=>hv,getDelegator:()=>mv});function hv(e,t){let n=[];(t.kind||-1)>=0&&n.push(`kind=${t.kind}`),t.until&&n.push(`created_at<${t.until}`),t.since&&n.push(`created_at>${t.since}`);let r=n.join("&");if(r==="")throw new Error("refusing to create a delegation without any conditions");let o=Lo(Cr.encode(`nostr:delegation:${t.pubkey}:${r}`)),i=z.bytesToHex(Io.signSync(o,e));return{from:nl(e),to:t.pubkey,cond:r,sig:i}}function mv(e){let t=e.tags.find(s=>s[0]==="delegation"&&s.length>=4);if(!t)return null;let n=t[1],r=t[2],o=t[3],i=r.split("&");for(let s=0;s"&&e.created_at>parseInt(f))continue;return null}}let l=Lo(Cr.encode(`nostr:delegation:${e.pubkey}:${r}`));return Io.verifySync(o,l,n)?n:null}z.hmacSha256Sync=(e,...t)=>tl(Lo,e,z.concatBytes(...t));z.sha256Sync=(...e)=>Lo(z.concatBytes(...e));const zo=e=>e.map(n=>G1(n)),jh=(e,t,n)=>new Promise((r,o)=>{const{relays:i}=e,l=zo(i);let s=[],u=0,a={};localStorage.getItem(`e:${t.id}`)&&(a=JSON.parse(localStorage.getItem(`e:${t.id}`)),s=a.comments,s&&!n&&r(s),u=n?0:a.updated_at);let f=!1;l.map(async c=>{try{await c.connect();const d=c.sub([{limit:100,kinds:[1],since:u,"#e":[t.id]}]);d.on("event",h=>{s.push(h),localStorage.getItem(`e:${h.id}`)||localStorage.setItem(`e:${h.id}`,JSON.stringify(h))}),d.on("eose",()=>{const h=s.filter((v,k,m)=>k===m.findIndex(p=>p.id===v.id)),w=Math.floor(new Date().getTime()/1e3);(!(a!=null&&a.updated_at)||(a==null?void 0:a.updated_at)new Promise((n,r)=>{let o={pubkey:e,created_at:0};if(localStorage.getItem(`p:${e}`)&&(o=JSON.parse(localStorage.getItem(`p:${e}`)),o.created_at>0)){n(o);return}zo(t).map(async l=>{await l.connect();const s=l.sub([{kinds:[0],authors:[e]}]);s.on("event",u=>{(!o.created_at||u.created_at>o.created_at)&&(o={...o,...JSON.parse(u.content),created_at:u.created_at},localStorage.setItem(`p:${e}`,JSON.stringify(o)),n(o))}),s.on("eose",()=>{s.unsub(),l.close()})})}),yv=(e,t)=>new Promise((n,r)=>{const{pubkey:o,title:i,description:l,canonical:s,relays:u}=e,a=[];let f=i;o&&(a.push(["p",o]),f+=` by #[${a.length-1}]`),l&&(f+=` -${l}`),f+=` -More: ${s} - -Comments powered by Disgus`,a.push(["r",s]),a.push(["client","Disgus"]);const c={content:f,tags:a},d=Hh(),h=nl(d);c.pubkey=h,Dh(c,{pubkey:h,privateKey:d},u).then(w=>{localStorage.setItem(`r:${s}`,JSON.stringify(w)),n(w)})}),gv=e=>new Promise(async(t,n)=>{const{pubkey:r,canonical:o,relays:i}=e,l=zo(i);if(localStorage.getItem(`r:${o}`)){t(JSON.parse(localStorage.getItem(`r:${o}`)));return}const s={"#r":[o]};r&&(s["#p"]=[r]),l.map(async(u,a)=>{await u.connect();const f=u.sub([{limit:1,kinds:[1],...s}]);f.on("event",c=>{localStorage.setItem(`r:${o}`,JSON.stringify(c)),t(c)}),f.on("eose",()=>{f.unsub(),u.close()})})}),Dh=(e,t,n)=>new Promise(async(r,o)=>{const i=zo(n);if(e.kind=1,e.created_at=Math.floor(Date.now()/1e3),e.id=kl(e),t&&t.privateKey)e.sig=yu(e,t.privateKey);else if(window.nostr){const{sig:s}=await window.nostr.signEvent(e);e.sig=s}else prompt("Enter your private key",""),e.sig=yu(e,t.privateKey);let l=!1;i.map(async s=>{await s.connect();const u=s.publish(e);u.on("seen",a=>{l||(r(e),l=!0)}),u.on("failed",a=>{alert(a.message)})})});function vv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 01.75.75v5.25a.75.75 0 01-1.5 0V4.81L8.03 17.03a.75.75 0 01-1.06-1.06L19.19 3.75h-3.44a.75.75 0 010-1.5zm-10.5 4.5a1.5 1.5 0 00-1.5 1.5v10.5a1.5 1.5 0 001.5 1.5h10.5a1.5 1.5 0 001.5-1.5V10.5a.75.75 0 011.5 0v8.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V8.25a3 3 0 013-3h8.25a.75.75 0 010 1.5H5.25z",clipRule:"evenodd"}))}const wv=E.forwardRef(vv),xv=wv;function Ev({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M15 3.75A5.25 5.25 0 009.75 9v10.19l4.72-4.72a.75.75 0 111.06 1.06l-6 6a.75.75 0 01-1.06 0l-6-6a.75.75 0 111.06-1.06l4.72 4.72V9a6.75 6.75 0 0113.5 0v3a.75.75 0 01-1.5 0V9c0-2.9-2.35-5.25-5.25-5.25z",clipRule:"evenodd"}))}const kv=E.forwardRef(Ev),Sv=kv;function bv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0112 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 013.498 1.307 4.491 4.491 0 011.307 3.497A4.49 4.49 0 0121.75 12a4.49 4.49 0 01-1.549 3.397 4.491 4.491 0 01-1.307 3.497 4.491 4.491 0 01-3.497 1.307A4.49 4.49 0 0112 21.75a4.49 4.49 0 01-3.397-1.549 4.49 4.49 0 01-3.498-1.306 4.491 4.491 0 01-1.307-3.498A4.49 4.49 0 012.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 011.307-3.497 4.49 4.49 0 013.497-1.307zm7.007 6.387a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"}))}const Cv=E.forwardRef(bv),_v=Cv;function Tv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z",clipRule:"evenodd"}))}const Av=E.forwardRef(Tv),Nv=Av;function Iv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M4.5 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm6 0a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z",clipRule:"evenodd"}))}const Lv=E.forwardRef(Iv),$v=Lv;function Pv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const Rv=E.forwardRef(Pv),Ov=Rv;function zv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{fillRule:"evenodd",d:"M11.484 2.17a.75.75 0 011.032 0 11.209 11.209 0 007.877 3.08.75.75 0 01.722.515 12.74 12.74 0 01.635 3.985c0 5.942-4.064 10.933-9.563 12.348a.749.749 0 01-.374 0C6.314 20.683 2.25 15.692 2.25 9.75c0-1.39.223-2.73.635-3.985a.75.75 0 01.722-.516l.143.001c2.996 0 5.718-1.17 7.734-3.08zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zM12 15a.75.75 0 00-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 00.75-.75v-.008a.75.75 0 00-.75-.75H12z",clipRule:"evenodd"}))}const Hv=E.forwardRef(zv),Bv=Hv;function Uv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const jv=E.forwardRef(Uv),Dv=jv;function Fv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const Mv=E.forwardRef(Fv),Vv=Mv;function Kv({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"}))}const Wv=E.forwardRef(Kv),Qv=Wv,Ho=ue.createContext({}),Gv=({config:e,children:t})=>{const[n,r]=E.useState(!1),[o,i]=E.useState(!1);return E.useEffect(()=>{n?jh(e,n).then(l=>{i(l)}):gv(e).then(l=>{r(l)})},[n]),I(Ho.Provider,{value:{config:e,rootEvent:n,setRootEvent:r,comments:o,setComments:i},children:t})},Yv=Ho.Consumer;function Na(){const{config:e,rootEvent:t,setRootEvent:n,comments:r,setComments:o}=E.useContext(Ho);return{config:e,rootEvent:t,createRoot:()=>new Promise((s,u)=>{yv(e).then(a=>{n(a),s(a)})}),comments:r,refreshComments:()=>{jh(e,t,!0).then(s=>{o(s)})}}}function Xv({comment:e}){const{id:t,pubkey:n,content:r,tags:o,created_at:i}=e,{config:l,rootEvent:s}=Na(),[u,a]=E.useState(!1),f=new Date(i*1e3);E.useState();const[c,d]=E.useState();return E.useEffect(()=>{(!u||u.pubkey!==n)&&rl(n,l.relays).then(h=>{a(h)})},[u,n]),E.useEffect(()=>{if(!c){const h=[],w=[];let v=r;o.forEach((k,m)=>{switch(v=v.replace(`#[${m}]`,`@${k[1]}`),k[0]){case"e":h.push(k[1]);break;case"p":w.push(k[1]);break}}),d(h[h.length-1])}},[c]),I("div",{className:"p-2 mx-auto",children:de("div",{className:`flex items-top justify-between ${c!==s.id?"ml-14 sm:ml-20":""}`,children:[I("figure",{className:"w-12 sm:w-16 avatar flex-basis",style:{flexGrow:0,flexShrink:0},children:u&&u.picture?I("img",{className:`${c!==s.id?"w-10 h-10 sm:w-10 sm:h-10":"w-12 h-12 sm:w-12 sm:h-12"} object-cover rounded-full ring-2 ring-black`,src:u.picture,style:{backgroundColor:`#${n.substr(0,6)}`,lineHeight:0}}):I("div",{className:`${c!==s.id?"w-10 h-10 sm:w-10 sm:h-10":"w-12 h-12 sm:w-12 sm:h-12"} flex items-center justify-center ring-2 ring-black rounded-full uppercase text-black`,style:{backgroundColor:`#${n.substr(0,6)}`,lineHeight:0,verticalAlign:"center"},children:I("span",{className:"text-3xl",children:n.substr(0,2)})})}),de("div",{className:"flex-grow flex-shrink overflow-hidden",children:[de("div",{className:"flex items-top justify-between",children:[de("div",{className:"flex-shrink flex-grow overflow-hidden",children:[de("a",{href:`https://snort.social/p/${n}`,target:"_blank",title:n,className:"text-lg block truncate",children:[c!==s.id?I(Sv,{className:"inline w-4 h-4 -mt-1 mr-1 rotate-180"}):"",I("b",{children:u.display_name||u.name||n}),u.nip05?I("abbr",{title:u.nip05.replace("_@","@"),children:I(_v,{color:"purple",className:"-mt-1 mx-1 w-4 h-4 inline-block"})}):I("abbr",{className:"opacity-70",title:`No-NIP05 ${n}`,children:I(Bv,{className:"-mt-1 mx-1 w-4 h-4 inline-block"})})]}),I("a",{href:`https://snort.social/e/${t}`,tit:!0,target:"_blank",le:t,className:"text-xs block whitespace-nowrap truncate opacity-70",children:de("time",{dateTime:f.toISOString(),children:[I(Dv,{className:"w-3 h-3 inline"})," ",Ny(f)]})})]}),de("div",{className:"flex-basis ml-2 text-right",children:[I(Ov,{className:"w-6 h-6 hidden inline-block"}),I($v,{className:"w-6 h-6 inline-block hidden"})]})]}),I("div",{className:"mt-2 text-md",children:I("p",{children:r})}),I("div",{className:"mt-2 text-md",children:de("a",{href:`https://snort.social/e/${t}`,tit:!0,target:"_blank",le:t,className:"text-xs block whitespace-nowrap truncate opacity-70",children:["Reply on nostr",I(xv,{className:"w-3 h-3 inline-block ml-1"})]})})]})]})})}const qn="disgusUser",Ia=ue.createContext(),Zv=({children:e})=>{const{config:t}=E.useContext(Ho),[n,r]=E.useState(!1);return E.useEffect(()=>{if(!n&&localStorage.getItem(qn)){const o=JSON.parse(localStorage.getItem(qn));r(o),rl(o.pubkey,t.relays).then(i=>r({...o,...i}))}},[!n]),I(Ia.Provider,{value:{user:n,setUser:r},children:e})};Ia.Consumer;function Fh(){const{config:e}=E.useContext(Ho),{relays:t}=e,{user:n,setUser:r}=E.useContext(Ia);return{user:n,signIn:()=>{if(!n)if(window.nostr)window.nostr.getPublicKey().then(s=>{rl(s,t).then(u=>{localStorage.setItem(qn,JSON.stringify(u)),r(u)})});else{let s=prompt("Enter your private key","");nl(s)?rl(publicKey,t).then(a=>{localStorage.setItem(qn,JSON.stringify(a)),r({...s,_user:a})}):alert("Incorrect key.")}},signOut:()=>{localStorage.removeItem(qn),r(!1)},signInRandom:s=>{if(n)return;let u=s||prompt("What's your name?","Randy Rando");if(!u||u.length<=0)return;const a=Hh(),f=nl(a),c={name:u,about:"Random Guest"},d=F1();d.kind=0,d.pubkey=f,d.content=JSON.stringify(c),d.tags=[["client","Disgus"]],d.created_at=Math.floor(Date.now()/1e3),d.id=kl(d),d.sig=yu(d,a),zo(t).map(async w=>{await w.connect();const v=w.publish(d);v.on("seen",()=>{n||(localStorage.setItem(qn,JSON.stringify({pubkey:f,privateKey:a,created_at:d.created_at,...c})),r({pubkey:f,privateKey:a,created_at:d.created_at,...c})),w.close()}),v.on("failed",()=>{w.close()})})}}}function ff({children:e,Component:t="button",variant:n,className:r,...o}){let i=["rounded"];switch(n){case"primary":i.push("py-2","px-4","whitespace-nowrap","bg-black","text-white","font-bold");break;case"secondary":i.push("py-1","px-2","hover:ring","hover:ring-gray-300");break;default:i.push("");break}return r&&i.push(r),I(t,{className:i.join(" "),...o,children:e})}function qv(){const{config:e,rootEvent:t,createRoot:n,refreshComments:r}=Na(),{pubkey:o,relays:i}=e,[l,s]=E.useState(""),[u,a]=E.useState(!1),{user:f,signIn:c,signInRandom:d}=Fh(),h=async v=>{const k=[["e",v,i[0],"root"]];o&&k.push(["p",o]),k.push(["client","Disgus"]),l.length>0&&Dh({pubkey:f.pubkey,content:l,tags:k},f,i).then(()=>{s(""),r()})};let w=setTimeout(()=>{},0);return I($f,{children:de("form",{className:"relative appearance-none bg-gray-300/10 bg-opacity-65 backdrop-blur-md font-mono rounded","aria-disabled":!f,onSubmit:async v=>{v.preventDefault(),t?await h(t.id):n().then(async k=>{await h(k.id)})},onFocus:v=>{clearTimeout(w),a(!0)},onBlur:v=>{w=setTimeout(()=>a(!1),100)},children:[I("textarea",{className:"w-full p-2 m-0 bg-gray-300/10 bg-opacity-65 backdrop-blur-md focus:outline-none rounded-lg",id:"comment",placeholder:"Add a comment...",value:l,rows:u||l.length>0?3:1,onChange:v=>{s(v.target.value)}}),(u||l.length>0)&&de("div",{className:"bg-none text-white/75 m-0 px-2 py-1 flex items-center justify-between",children:[t?de("a",{className:"block whitespace-nowrap truncate",rel:"nostr:event",href:`nostr:e:${t.id}`,title:`re: ${t.id}`,children:[I(Qv,{className:"inline-block",width:18})," ",t.id]}):I(Vv,{width:18}),f?I(ff,{type:"submit",variant:"primary",children:"Comment"}):I("div",{className:"whitespace-nowrap",children:I(ff,{type:"button",variant:"primary",className:"mr-2 bg-lime-600 text-black",onClick:v=>{v.preventDefault(),c()},children:"Sign In"},"plugin")})]})]})})}const Mh=typeof window>"u"||typeof document>"u";let Ke=Mh?E.useEffect:E.useLayoutEffect;function Cn(e){let t=E.useRef(e);return Ke(()=>{t.current=e},[e]),t}function Jv(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ln(){let e=[],t=[],n={enqueue(r){t.push(r)},addEventListener(r,o,i,l){return r.addEventListener(o,i,l),n.add(()=>r.removeEventListener(o,i,l))},requestAnimationFrame(...r){let o=requestAnimationFrame(...r);return n.add(()=>cancelAnimationFrame(o))},nextFrame(...r){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...r))},setTimeout(...r){let o=setTimeout(...r);return n.add(()=>clearTimeout(o))},microTask(...r){let o={current:!0};return Jv(()=>{o.current&&r[0]()}),n.add(()=>{o.current=!1})},add(r){return e.push(r),()=>{let o=e.indexOf(r);if(o>=0){let[i]=e.splice(o,1);i()}}},dispose(){for(let r of e.splice(0))r()},async workQueue(){for(let r of t.splice(0))await r()}};return n}function bl(){let[e]=E.useState(ln);return E.useEffect(()=>()=>e.dispose(),[e]),e}let oe=function(e){let t=Cn(e);return ue.useCallback((...n)=>t.current(...n),[t])},us={serverHandoffComplete:!1};function La(){let[e,t]=E.useState(us.serverHandoffComplete);return E.useEffect(()=>{e!==!0&&t(!0)},[e]),E.useEffect(()=>{us.serverHandoffComplete===!1&&(us.serverHandoffComplete=!0)},[]),e}var df;let ew=0;function pf(){return++ew}let $a=(df=ue.useId)!=null?df:function(){let e=La(),[t,n]=ue.useState(e?pf:null);return Ke(()=>{t===null&&n(pf())},[t]),t!=null?""+t:void 0};function Te(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}function Cl(e){return Mh?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let gu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var vu=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(vu||{}),tw=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(tw||{}),nw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(nw||{});function Vh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(gu)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Pa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Pa||{});function Ra(e,t=0){var n;return e===((n=Cl(e))==null?void 0:n.body)?!1:Te(t,{[0](){return e.matches(gu)},[1](){let r=e;for(;r!==null;){if(r.matches(gu))return!0;r=r.parentElement}return!1}})}function Kh(e){let t=Cl(e);ln().nextFrame(()=>{t&&!Ra(t.activeElement,0)&&rw(e)})}function rw(e){e==null||e.focus({preventScroll:!0})}let ow=["textarea","input"].join(",");function iw(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,ow))!=null?n:!1}function Wh(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function lw(e,t){return sw(Vh(),t,{relativeTo:e})}function sw(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?Wh(e):e:Vh(e);o.length>0&&(l=l.filter(h=>!o.includes(h))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=t&32?{preventScroll:!0}:{},f=0,c=l.length,d;do{if(f>=c||f+c<=0)return 0;let h=u+f;if(t&16)h=(h+c)%c;else{if(h<0)return 3;if(h>=c)return 1}d=l[h],d==null||d.focus(a),f+=s}while(d!==i.activeElement);return t&6&&iw(d)&&d.select(),d.hasAttribute("tabindex")||d.setAttribute("tabindex","0"),2}function as(e,t,n){let r=Cn(t);E.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function uw(e,t,n=!0){let r=E.useRef(!1);E.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=function f(c){return typeof c=="function"?f(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e),a=s(l);if(a!==null&&a.getRootNode().contains(a)){for(let f of u){if(f===null)continue;let c=f instanceof HTMLElement?f:f.current;if(c!=null&&c.contains(a)||l.composed&&l.composedPath().includes(c))return}return!Ra(a,Pa.Loose)&&a.tabIndex!==-1&&l.preventDefault(),t(l,a)}}let i=E.useRef(null);as("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),as("click",l=>{!i.current||(o(l,()=>i.current),i.current=null)},!0),as("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function hf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function aw(e,t){let[n,r]=E.useState(()=>hf(e));return Ke(()=>{r(hf(e))},[e.type,e.as]),Ke(()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let cw=Symbol();function _r(...e){let t=E.useRef(e);E.useEffect(()=>{t.current=e},[e]);let n=oe(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[cw]))?void 0:n}function fw({container:e,accept:t,walk:n,enabled:r=!0}){let o=E.useRef(t),i=E.useRef(n);E.useEffect(()=>{o.current=t,i.current=n},[t,n]),Ke(()=>{if(!e||!r)return;let l=Cl(e);if(!l)return;let s=o.current,u=i.current,a=Object.assign(c=>s(c),{acceptNode:s}),f=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a,!1);for(;f.nextNode();)u(f.currentNode)},[e,r,o,i])}function dw(e){throw new Error("Unexpected object: "+e)}var et=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(et||{});function pw(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1,i=(()=>{switch(e.focus){case 0:return n.findIndex(l=>!t.resolveDisabled(l));case 1:{let l=n.slice().reverse().findIndex((s,u,a)=>o!==-1&&a.length-u-1>=o?!1:!t.resolveDisabled(s));return l===-1?l:n.length-1-l}case 2:return n.findIndex((l,s)=>s<=o?!1:!t.resolveDisabled(l));case 3:{let l=n.slice().reverse().findIndex(s=>!t.resolveDisabled(s));return l===-1?l:n.length-1-l}case 4:return n.findIndex(l=>t.resolveId(l)===e.id);case 5:return null;default:dw(e)}})();return i===-1?r:i}var ol=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ol||{}),wt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(wt||{});function Tr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=Qh(t,e);if(i)return fi(s,n,r,l);let u=o??0;if(u&2){let{static:a=!1,...f}=s;if(a)return fi(f,n,r,l)}if(u&1){let{unmount:a=!0,...f}=s;return Te(a?0:1,{[0](){return null},[1](){return fi({...f,hidden:!0,style:{display:"none"}},n,r,l)}})}return fi(s,n,r,l)}function fi(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=cs(e,["unmount","static"]),u=e.ref!==void 0?{[l]:e.ref}:{},a=typeof i=="function"?i(t):i;s.className&&typeof s.className=="function"&&(s.className=s.className(t));let f={};if(t){let c=!1,d=[];for(let[h,w]of Object.entries(t))typeof w=="boolean"&&(c=!0),w===!0&&d.push(h);c&&(f["data-headlessui-state"]=d.join(" "))}if(o===E.Fragment&&Object.keys(mf(s)).length>0){if(!E.isValidElement(a)||Array.isArray(a)&&a.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(c=>` - ${c}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(c=>` - ${c}`).join(` -`)].join(` -`));return E.cloneElement(a,Object.assign({},Qh(a.props,mf(cs(s,["ref"]))),f,u,hw(a.ref,u.ref)))}return E.createElement(o,Object.assign({},cs(s,["ref"]),o!==E.Fragment&&u,o!==E.Fragment&&f),a)}function hw(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function Qh(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function Rn(e){var t;return Object.assign(E.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function mf(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function cs(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function mw(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&yw(n)?!1:r}function yw(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Oa=E.createContext(null);Oa.displayName="OpenClosedContext";var sn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(sn||{});function za(){return E.useContext(Oa)}function Gh({value:e,children:t}){return ue.createElement(Oa.Provider,{value:e},t)}var fe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(fe||{});function yf(e){return[e.screenX,e.screenY]}function gw(){let e=E.useRef([-1,-1]);return{wasMoved(t){let n=yf(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=yf(t)}}}function Yh(){let e=E.useRef(!1);return Ke(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vw(...e){return E.useMemo(()=>Cl(...e),[...e])}var ww=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ww||{}),xw=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(xw||{}),Ew=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Ew||{});function fs(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Wh(t(e.items.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let kw={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,menuState:0}},[2]:(e,t)=>{var n;let r=fs(e),o=pw(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(n=t.trigger)!=null?n:1}},[3]:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,t)=>{let n=fs(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},[6]:(e,t)=>{let n=fs(e,r=>{let o=r.findIndex(i=>i.id===t.id);return o!==-1&&r.splice(o,1),r});return{...e,...n,activationTrigger:1}}},Ha=E.createContext(null);Ha.displayName="MenuContext";function _l(e){let t=E.useContext(Ha);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,_l),n}return t}function Sw(e,t){return Te(t.type,kw,e,t)}let bw=E.Fragment,Cw=Rn(function(e,t){let n=E.useReducer(Sw,{menuState:1,buttonRef:E.createRef(),itemsRef:E.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:r,itemsRef:o,buttonRef:i},l]=n,s=_r(t);uw([i,o],(d,h)=>{var w;l({type:1}),Ra(h,Pa.Loose)||(d.preventDefault(),(w=i.current)==null||w.focus())},r===0);let u=oe(()=>{l({type:1})}),a=E.useMemo(()=>({open:r===0,close:u}),[r,u]),f=e,c={ref:s};return ue.createElement(Ha.Provider,{value:n},ue.createElement(Gh,{value:Te(r,{[0]:sn.Open,[1]:sn.Closed})},Tr({ourProps:c,theirProps:f,slot:a,defaultTag:bw,name:"Menu"})))}),_w="button",Tw=Rn(function(e,t){var n;let r=$a(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=_l("Menu.Button"),u=_r(l.buttonRef,t),a=bl(),f=oe(v=>{switch(v.key){case fe.Space:case fe.Enter:case fe.ArrowDown:v.preventDefault(),v.stopPropagation(),s({type:0}),a.nextFrame(()=>s({type:2,focus:et.First}));break;case fe.ArrowUp:v.preventDefault(),v.stopPropagation(),s({type:0}),a.nextFrame(()=>s({type:2,focus:et.Last}));break}}),c=oe(v=>{switch(v.key){case fe.Space:v.preventDefault();break}}),d=oe(v=>{if(mw(v.currentTarget))return v.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),a.nextFrame(()=>{var k;return(k=l.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})})):(v.preventDefault(),s({type:0})))}),h=E.useMemo(()=>({open:l.menuState===0}),[l]),w={ref:u,id:o,type:aw(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(n=l.itemsRef.current)==null?void 0:n.id,"aria-expanded":e.disabled?void 0:l.menuState===0,onKeyDown:f,onKeyUp:c,onClick:d};return Tr({ourProps:w,theirProps:i,slot:h,defaultTag:_w,name:"Menu.Button"})}),Aw="div",Nw=ol.RenderStrategy|ol.Static,Iw=Rn(function(e,t){var n,r;let o=$a(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=_l("Menu.Items"),a=_r(s.itemsRef,t),f=vw(s.itemsRef),c=bl(),d=za(),h=(()=>d!==null?d===sn.Open:s.menuState===0)();E.useEffect(()=>{let p=s.itemsRef.current;!p||s.menuState===0&&p!==(f==null?void 0:f.activeElement)&&p.focus({preventScroll:!0})},[s.menuState,s.itemsRef,f]),fw({container:s.itemsRef.current,enabled:s.menuState===0,accept(p){return p.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let w=oe(p=>{var y,g;switch(c.dispose(),p.key){case fe.Space:if(s.searchQuery!=="")return p.preventDefault(),p.stopPropagation(),u({type:3,value:p.key});case fe.Enter:if(p.preventDefault(),p.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:x}=s.items[s.activeItemIndex];(g=(y=x.current)==null?void 0:y.domRef.current)==null||g.click()}Kh(s.buttonRef.current);break;case fe.ArrowDown:return p.preventDefault(),p.stopPropagation(),u({type:2,focus:et.Next});case fe.ArrowUp:return p.preventDefault(),p.stopPropagation(),u({type:2,focus:et.Previous});case fe.Home:case fe.PageUp:return p.preventDefault(),p.stopPropagation(),u({type:2,focus:et.First});case fe.End:case fe.PageDown:return p.preventDefault(),p.stopPropagation(),u({type:2,focus:et.Last});case fe.Escape:p.preventDefault(),p.stopPropagation(),u({type:1}),ln().nextFrame(()=>{var x;return(x=s.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})});break;case fe.Tab:p.preventDefault(),p.stopPropagation(),u({type:1}),ln().nextFrame(()=>{lw(s.buttonRef.current,p.shiftKey?vu.Previous:vu.Next)});break;default:p.key.length===1&&(u({type:3,value:p.key}),c.setTimeout(()=>u({type:4}),350));break}}),v=oe(p=>{switch(p.key){case fe.Space:p.preventDefault();break}}),k=E.useMemo(()=>({open:s.menuState===0}),[s]),m={"aria-activedescendant":s.activeItemIndex===null||(n=s.items[s.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:w,onKeyUp:v,role:"menu",tabIndex:0,ref:a};return Tr({ourProps:m,theirProps:l,slot:k,defaultTag:Aw,features:Nw,visible:h,name:"Menu.Items"})}),Lw=E.Fragment,$w=Rn(function(e,t){let n=$a(),{id:r=`headlessui-menu-item-${n}`,disabled:o=!1,...i}=e,[l,s]=_l("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,a=E.useRef(null),f=_r(t,a);Ke(()=>{if(l.menuState!==0||!u||l.activationTrigger===0)return;let g=ln();return g.requestAnimationFrame(()=>{var x,b;(b=(x=a.current)==null?void 0:x.scrollIntoView)==null||b.call(x,{block:"nearest"})}),g.dispose},[a,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let c=E.useRef({disabled:o,domRef:a});Ke(()=>{c.current.disabled=o},[c,o]),Ke(()=>{var g,x;c.current.textValue=(x=(g=a.current)==null?void 0:g.textContent)==null?void 0:x.toLowerCase()},[c,a]),Ke(()=>(s({type:5,id:r,dataRef:c}),()=>s({type:6,id:r})),[c,r]);let d=oe(()=>{s({type:1})}),h=oe(g=>{if(o)return g.preventDefault();s({type:1}),Kh(l.buttonRef.current)}),w=oe(()=>{if(o)return s({type:2,focus:et.Nothing});s({type:2,focus:et.Specific,id:r})}),v=gw(),k=oe(g=>v.update(g)),m=oe(g=>{!v.wasMoved(g)||o||u||s({type:2,focus:et.Specific,id:r,trigger:0})}),p=oe(g=>{!v.wasMoved(g)||o||!u||s({type:2,focus:et.Nothing})}),y=E.useMemo(()=>({active:u,disabled:o,close:d}),[u,o,d]);return Tr({ourProps:{id:r,ref:f,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:h,onFocus:w,onPointerEnter:k,onMouseEnter:k,onPointerMove:m,onMouseMove:m,onPointerLeave:p,onMouseLeave:p},theirProps:i,slot:y,defaultTag:Lw,name:"Menu.Item"})}),Bn=Object.assign(Cw,{Button:Tw,Items:Iw,Item:$w});function Pw(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function ds(e,...t){e&&t.length>0&&e.classList.add(...t)}function ps(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Rw(e,t){let n=ln();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(a=>a.includes("ms")?parseFloat(a):parseFloat(a)*1e3).sort((a,f)=>f-a);return u});if(i+l!==0){let s=n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function Ow(e,t,n,r){let o=n?"enter":"leave",i=ln(),l=r!==void 0?Pw(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=Te(o,{enter:()=>t.enter,leave:()=>t.leave}),u=Te(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),a=Te(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ps(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),ds(e,...s,...a),i.nextFrame(()=>{ps(e,...a),ds(e,...u),Rw(e,()=>(ps(e,...s),ds(e,...t.entered),l()))}),i.dispose}function zw({container:e,direction:t,classes:n,onStart:r,onStop:o}){let i=Yh(),l=bl(),s=Cn(t);Ke(()=>{let u=ln();l.add(u.dispose);let a=e.current;if(a&&s.current!=="idle"&&i.current)return u.dispose(),r.current(s.current),u.add(Ow(a,n.current,s.current==="enter",()=>{u.dispose(),o.current(s.current)})),u.dispose},[t])}function Hw(...e){return e.filter(Boolean).join(" ")}function mn(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Tl=E.createContext(null);Tl.displayName="TransitionContext";var Bw=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Bw||{});function Uw(){let e=E.useContext(Tl);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function jw(){let e=E.useContext(Al);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let Al=E.createContext(null);Al.displayName="NestingContext";function Nl(e){return"children"in e?Nl(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Xh(e,t){let n=Cn(e),r=E.useRef([]),o=Yh(),i=bl(),l=oe((h,w=wt.Hidden)=>{let v=r.current.findIndex(({el:k})=>k===h);v!==-1&&(Te(w,{[wt.Unmount](){r.current.splice(v,1)},[wt.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var k;!Nl(r)&&o.current&&((k=n.current)==null||k.call(n))}))}),s=oe(h=>{let w=r.current.find(({el:v})=>v===h);return w?w.state!=="visible"&&(w.state="visible"):r.current.push({el:h,state:"visible"}),()=>l(h,wt.Unmount)}),u=E.useRef([]),a=E.useRef(Promise.resolve()),f=E.useRef({enter:[],leave:[],idle:[]}),c=oe((h,w,v)=>{u.current.splice(0),t&&(t.chains.current[w]=t.chains.current[w].filter(([k])=>k!==h)),t==null||t.chains.current[w].push([h,new Promise(k=>{u.current.push(k)})]),t==null||t.chains.current[w].push([h,new Promise(k=>{Promise.all(f.current[w].map(([m,p])=>p)).then(()=>k())})]),w==="enter"?a.current=a.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(w)):v(w)}),d=oe((h,w,v)=>{Promise.all(f.current[w].splice(0).map(([k,m])=>m)).then(()=>{var k;(k=u.current.shift())==null||k()}).then(()=>v(w))});return E.useMemo(()=>({children:r,register:s,unregister:l,onStart:c,onStop:d,wait:a,chains:f}),[s,l,r,c,d,f,a])}function Dw(){}let Fw=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function gf(e){var t;let n={};for(let r of Fw)n[r]=(t=e[r])!=null?t:Dw;return n}function Mw(e){let t=E.useRef(gf(e));return E.useEffect(()=>{t.current=gf(e)},[e]),t}let Vw="div",Zh=ol.RenderStrategy,qh=Rn(function(e,t){let{beforeEnter:n,afterEnter:r,beforeLeave:o,afterLeave:i,enter:l,enterFrom:s,enterTo:u,entered:a,leave:f,leaveFrom:c,leaveTo:d,...h}=e,w=E.useRef(null),v=_r(w,t),k=h.unmount?wt.Unmount:wt.Hidden,{show:m,appear:p,initial:y}=Uw(),[g,x]=E.useState(m?"visible":"hidden"),b=jw(),{register:S,unregister:_}=b,L=E.useRef(null);E.useEffect(()=>S(w),[S,w]),E.useEffect(()=>{if(k===wt.Hidden&&w.current){if(m&&g!=="visible"){x("visible");return}return Te(g,{hidden:()=>_(w),visible:()=>S(w)})}},[g,w,S,_,m,k]);let $=Cn({enter:mn(l),enterFrom:mn(s),enterTo:mn(u),entered:mn(a),leave:mn(f),leaveFrom:mn(c),leaveTo:mn(d)}),te=Mw({beforeEnter:n,afterEnter:r,beforeLeave:o,afterLeave:i}),be=La();E.useEffect(()=>{if(be&&g==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,g,be]);let $e=y&&!p,On=(()=>!be||$e||L.current===m?"idle":m?"enter":"leave")(),zn=oe(P=>Te(P,{enter:()=>te.current.beforeEnter(),leave:()=>te.current.beforeLeave(),idle:()=>{}})),Ar=oe(P=>Te(P,{enter:()=>te.current.afterEnter(),leave:()=>te.current.afterLeave(),idle:()=>{}})),Nt=Xh(()=>{x("hidden"),_(w)},b);zw({container:w,classes:$,direction:On,onStart:Cn(P=>{Nt.onStart(w,P,zn)}),onStop:Cn(P=>{Nt.onStop(w,P,Ar),P==="leave"&&!Nl(Nt)&&(x("hidden"),_(w))})}),E.useEffect(()=>{!$e||(k===wt.Hidden?L.current=null:L.current=m)},[m,$e,g]);let A=h,R={ref:v};return p&&m&&(typeof window>"u"||typeof document>"u")&&(A={...A,className:Hw(h.className,...$.current.enter,...$.current.enterFrom)}),ue.createElement(Al.Provider,{value:Nt},ue.createElement(Gh,{value:Te(g,{visible:sn.Open,hidden:sn.Closed})},Tr({ourProps:R,theirProps:A,defaultTag:Vw,features:Zh,visible:g==="visible",name:"Transition.Child"})))}),wu=Rn(function(e,t){let{show:n,appear:r=!1,unmount:o,...i}=e,l=E.useRef(null),s=_r(l,t);La();let u=za();if(n===void 0&&u!==null&&(n=Te(u,{[sn.Open]:!0,[sn.Closed]:!1})),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[a,f]=E.useState(n?"visible":"hidden"),c=Xh(()=>{f("hidden")}),[d,h]=E.useState(!0),w=E.useRef([n]);Ke(()=>{d!==!1&&w.current[w.current.length-1]!==n&&(w.current.push(n),h(!1))},[w,n]);let v=E.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);E.useEffect(()=>{if(n)f("visible");else if(!Nl(c))f("hidden");else{let m=l.current;if(!m)return;let p=m.getBoundingClientRect();p.x===0&&p.y===0&&p.width===0&&p.height===0&&f("hidden")}},[n,c]);let k={unmount:o};return ue.createElement(Al.Provider,{value:c},ue.createElement(Tl.Provider,{value:v},Tr({ourProps:{...k,as:E.Fragment,children:ue.createElement(qh,{ref:s,...k,...i})},theirProps:{},defaultTag:E.Fragment,features:Zh,visible:a==="visible",name:"Transition"})))}),Kw=Rn(function(e,t){let n=E.useContext(Tl)!==null,r=za()!==null;return ue.createElement(ue.Fragment,null,!n&&r?ue.createElement(wu,{ref:t,...e}):ue.createElement(qh,{ref:t,...e}))}),Ww=Object.assign(wu,{Child:Kw,Root:wu});function Qw(){const{comments:e}=Na(),{user:t,signInRandom:n,signIn:r,signOut:o}=Fh();return de("div",{className:"flex items-center justify-between",children:[I("div",{className:"whitespace-nowrap truncate",children:de("b",{children:[e.length," Comments"]})}),de(Bn,{as:"div",className:"relative block text-right",children:[I("div",{children:de(Bn.Button,{className:"inline-flex align-center justify-center px-4 py-2",children:[I("figure",{className:"avatar placeholder mr-2",children:t&&t.picture?I("img",{className:"object-cover rounded-full w-6 h-6 ring ring-1 ring-black",src:t.picture,style:{backgroundColor:`#${t.pubkey.substr(0,6)}`,lineHeight:0}}):I("div",{className:"flex items-center justify-center w-6 h-6 ring ring-1 ring-black rounded-full uppercase text-black",style:{backgroundColor:`#${t.pubkey?t.pubkey.substr(0,6):"ffffff"}`,lineHeight:0,verticalAlign:"center"},children:I("span",{className:"text-md",children:t.pubkey?t.pubkey.substr(0,2):"?"})})}),t?I("b",{className:"inline-block whitespace-nowrap w-auto truncate",style:{maxWidth:"250px"},children:t.display_name||t.name||t.pubkey}):I("b",{children:"Login"}),I(Nv,{className:"-mr-1 ml-1 w-4","aria-hidden":"true"})]})}),I(Ww,{as:E.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:de(Bn.Items,{className:"absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",children:[t?I("div",{className:"py-1",children:I(Bn.Item,{children:({active:i})=>I("a",{onClick:l=>{l.preventDefault(),o()},className:rs(i?"bg-gray-100 text-gray-900":"text-gray-700","block px-4 py-2 text-sm cursor-pointer"),children:"Sign Out"})})}):I("div",{className:"py-1",children:I(Bn.Item,{children:({active:i})=>I("a",{onClick:l=>{l.preventDefault(),r()},className:rs(i?"bg-gray-100 text-gray-900":"text-gray-700","block px-4 py-2 text-sm cursor-pointer"),children:"Sign In"})})}),I("div",{className:"py-1",children:I(Bn.Item,{children:I("a",{href:"/nostr",className:rs("bg-blue-100 text-gray-900 hover:bg-blue-200","block px-4 py-2 text-sm"),children:"ℹ️ What is this?"})})})]})})]})]})}function Gw({config:e}){return I(Gv,{config:e,children:I(Zv,{children:de("div",{className:"relative text-left mx-auto px-2 sm:px-4",children:[I(Qw,{}),I(qv,{}),I("div",{children:I(Yv,{children:({comments:t})=>{if(t&&t.length>0){const n={},r=t.filter((s,u,a)=>(n[s.id]=s.created_at,u===a.findIndex(f=>f.id===s.id))),o=r.filter(s=>s.tags.filter(u=>u[0]==="e").length<=1),i=r.filter(s=>s.tags.filter(u=>u[0]==="e").length>1);o.sort((s,u)=>u.created_at-s.created_at),i.sort((s,u)=>{const a=s.tags.filter(c=>c[0]==="e").map(c=>c[1]),f=a[a.length-1];return u.created_at-(n[f]-1)});const l=[];return o.forEach(s=>{l.push(s);const u=i.filter(a=>a.tags.filter(c=>c[0]==="e").map(c=>c[1]).includes(s.id));l.push(...u)}),l.map((s,u)=>I(Xv,{comment:s},u))}return I($f,{})}})})]})})})}const Jh=window.top||window,ht=Jh.document;var wf,xf,Ef,kf,Sf;const Yw={domRoot:ht.getElementById("disgus"),relays:Array.from(ht.querySelectorAll('meta[property="nostr:relay"]')).map(e=>e.getAttribute("content"))||["wss://brb.io","wss://relay.nosphr.com"],pubkey:((wf=ht.querySelector('meta[property="nostr:pubkey"]'))==null?void 0:wf.getAttribute("content"))||!1,event_id:((xf=ht.querySelector('meta[property="nostr:event_id"]'))==null?void 0:xf.getAttribute("content"))||!1,canonical:((Ef=ht.querySelector('meta[property="og:url"]'))==null?void 0:Ef.getAttribute("content"))||((kf=ht.querySelector('link[rel="canonical"]'))==null?void 0:kf.href)||ht.location.href,title:((Sf=ht.querySelector('meta[property="og:title"]'))==null?void 0:Sf.getAttribute("content"))||ht.title},vf={...Yw,...Jh.disgusConfig};hs.createRoot(vf.domRoot).render(I(ue.StrictMode,{children:I(Gw,{config:vf})}))});export default Xw(); diff --git a/src/frontend/templates/layouts/main.html b/src/frontend/templates/layouts/main.html index a5d66c5..90d4a09 100644 --- a/src/frontend/templates/layouts/main.html +++ b/src/frontend/templates/layouts/main.html @@ -19,19 +19,8 @@ - - - - - - - - - - - + - diff --git a/src/frontend/templates/service.html b/src/frontend/templates/service.html index d259008..5a41c9f 100644 --- a/src/frontend/templates/service.html +++ b/src/frontend/templates/service.html @@ -243,7 +243,7 @@

Beware of fake reviews and accounts. Verify user profiles and conduct your own research.

- +