9 lines
93 KiB
JavaScript

var $r=Object.defineProperty;var Mr=(e,t,n)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Mr(e,typeof t!="symbol"?t+"":t,n);(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 s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var Ne,N,Tn,se,Ft,Ln,Dn,$n,Ct,ft,pt,Mn,Pe={},On=[],Or=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ae=Array.isArray;function J(e,t){for(var n in t)e[n]=t[n];return e}function It(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function H(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Ne.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Se(e,i,r,o,null)}function Se(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Tn,__i:-1,__u:0};return o==null&&N.vnode!=null&&N.vnode(s),s}function zr(){return{current:null}}function te(e){return e.children}function K(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ae(e):null}function zn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return zn(e)}}function ht(e){(!e.__d&&(e.__d=!0)&&se.push(e)&&!Ge.__r++||Ft!==N.debounceRendering)&&((Ft=N.debounceRendering)||Ln)(Ge)}function Ge(){for(var e,t,n,r,o,s,i,c=1;se.length;)se.length>c&&se.sort(Dn),e=se.shift(),c=se.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=J({},r)).__v=r.__v+1,N.vnode&&N.vnode(n),Pt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,Un(s,n,i),n.__e!=o&&zn(n)));Ge.__r=0}function jn(e,t,n,r,o,s,i,c,a,l,d){var u,h,f,v,C,m,p=r&&r.__k||On,k=t.length;for(a=jr(n,t,p,a,k),u=0;u<k;u++)(f=n.__k[u])!=null&&(h=f.__i===-1?Pe:p[f.__i]||Pe,f.__i=u,m=Pt(e,f,h,o,s,i,c,a,l,d),v=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Et(h.ref,null,f),d.push(f.ref,f.__c||v,f)),C==null&&v!=null&&(C=v),4&f.__u||h.__k===f.__k?a=Wn(f,a,e):typeof f.type=="function"&&m!==void 0?a=m:v&&(a=v.nextSibling),f.__u&=-7);return n.__e=C,a}function jr(e,t,n,r,o){var s,i,c,a,l,d=n.length,u=d,h=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(a=s+h,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Se(null,i,null,null,null):Ae(i)?Se(te,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Se(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,c=null,(l=i.__i=Wr(i,n,a,u))!==-1&&(u--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&(o>d?h--:o<d&&h++),typeof i.type!="function"&&(i.__u|=4)):l!=a&&(l==a-1?h--:l==a+1?h++:(l>a?h--:h++,i.__u|=4))):e.__k[s]=null;if(u)for(s=0;s<d;s++)(c=n[s])!=null&&!(2&c.__u)&&(c.__e==r&&(r=ae(c)),Gn(c,c));return r}function Wn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Wn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ee(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ae(e)?e.some(function(n){ee(n,t)}):t.push(e)),t}function Wr(e,t,n,r){var o,s,i=e.key,c=e.type,a=t[n];if(a===null&&e.key==null||a&&i==a.key&&c===a.type&&!(2&a.__u))return n;if(r>(a!=null&&!(2&a.__u)?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((a=t[o])&&!(2&a.__u)&&i==a.key&&c===a.type)return o;o--}if(s<t.length){if((a=t[s])&&!(2&a.__u)&&i==a.key&&c===a.type)return s;s++}}return-1}function Gt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Or.test(t)?n:n+"px"}function Le(e,t,n,r,o){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Gt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Gt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace($n,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.t=r.t:(n.t=Ct,e.addEventListener(t,s?pt:ft,s)):e.removeEventListener(t,s?pt:ft,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Vt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=Ct++;else if(t.u<n.t)return;return n(N.event?N.event(t):t)}}}function Pt(e,t,n,r,o,s,i,c,a,l){var d,u,h,f,v,C,m,p,k,P,b,A,x,_,I,S,y,w=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),s=[c=t.__e=n.__e]),(d=N.__b)&&d(t);e:if(typeof w=="function")try{if(p=t.props,k="prototype"in w&&w.prototype.render,P=(d=w.contextType)&&r[d.__c],b=d?P?P.props.value:d.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:(k?t.__c=u=new w(p,b):(t.__c=u=new K(p,b),u.constructor=w,u.render=Fr),P&&P.sub(u),u.props=p,u.state||(u.state={}),u.context=b,u.__n=r,h=u.__d=!0,u.__h=[],u._sb=[]),k&&u.__s==null&&(u.__s=u.state),k&&w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=J({},u.__s)),J(u.__s,w.getDerivedStateFromProps(p,u.__s))),f=u.props,v=u.state,u.__v=t,h)k&&w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),k&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k&&w.getDerivedStateFromProps==null&&p!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(p,b),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(p,u.__s,b)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(u.props=p,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(g){g&&(g.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(p,u.__s,b),k&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,v,C)})}if(u.context=b,u.props=p,u.__P=e,u.__e=!1,x=N.__r,_=0,k){for(u.state=u.__s,u.__d=!1,x&&x(t),d=u.render(u.props,u.state,u.context),I=0;I<u._sb.length;I++)u.__h.push(u._sb[I]);u._sb=[]}else do u.__d=!1,x&&x(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++_<25);u.state=u.__s,u.getChildContext!=null&&(r=J(J({},r),u.getChildContext())),k&&!h&&u.getSnapshotBeforeUpdate!=null&&(C=u.getSnapshotBeforeUpdate(f,v)),S=d,d!=null&&d.type===te&&d.key==null&&(S=Fn(d.props.children)),c=jn(e,Ae(S)?S:[S],t,n,r,o,s,i,c,a,l),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),m&&(u.__E=u.__=null)}catch(g){if(t.__v=null,a||s!=null)if(g.then){for(t.__u|=a?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;s[s.indexOf(c)]=null,t.__e=c}else for(y=s.length;y--;)It(s[y]);else t.__e=n.__e,t.__k=n.__k;N.__e(g,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=Ur(n.__e,t,n,r,o,s,i,a,l);return(d=N.diffed)&&d(t),128&t.__u?void 0:c}function Un(e,t,n){for(var r=0;r<n.length;r++)Et(n[r],n[++r],n[++r]);N.__c&&N.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){N.__e(s,o.__v)}})}function Fn(e){return typeof e!="object"||e==null?e:Ae(e)?e.map(Fn):J({},e)}function Ur(e,t,n,r,o,s,i,c,a){var l,d,u,h,f,v,C,m=n.props,p=t.props,k=t.type;if(k=="svg"?o="http://www.w3.org/2000/svg":k=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((f=s[l])&&"setAttribute"in f==!!k&&(k?f.localName==k:f.nodeType==3)){e=f,s[l]=null;break}}if(e==null){if(k==null)return document.createTextNode(p);e=document.createElementNS(o,k,p.is&&p),c&&(N.__m&&N.__m(t,s),c=!1),s=null}if(k===null)m===p||c&&e.data===p||(e.data=p);else{if(s=s&&Ne.call(e.childNodes),m=n.props||Pe,!c&&s!=null)for(m={},l=0;l<e.attributes.length;l++)m[(f=e.attributes[l]).name]=f.value;for(l in m)if(f=m[l],l!="children"){if(l=="dangerouslySetInnerHTML")u=f;else if(!(l in p)){if(l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p)continue;Le(e,l,null,f,o)}}for(l in p)f=p[l],l=="children"?h=f:l=="dangerouslySetInnerHTML"?d=f:l=="value"?v=f:l=="checked"?C=f:c&&typeof f!="function"||m[l]===f||Le(e,l,f,m[l],o);if(d)c||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),jn(t.type==="template"?e.content:e,Ae(h)?h:[h],t,n,r,k=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&ae(n,0),c,a),s!=null)for(l=s.length;l--;)It(s[l]);c||(l="value",k=="progress"&&v==null?e.removeAttribute("value"):v!==void 0&&(v!==e[l]||k=="progress"&&!v||k=="option"&&v!==m[l])&&Le(e,l,v,m[l],o),l="checked",C!==void 0&&C!==e[l]&&Le(e,l,C,m[l],o))}return e}function Et(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){N.__e(o,n)}}function Gn(e,t,n){var r,o;if(N.unmount&&N.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Et(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){N.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Gn(r[o],t,n||typeof e.type!="function");n||It(e.__e),e.__c=e.__=e.__e=void 0}function Fr(e,t,n){return this.constructor(e,n)}function ue(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),N.__&&N.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Pt(t,e=(!r&&n||t).__k=H(te,null,[e]),o||Pe,Pe,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Ne.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Un(s,e,i)}function Vn(e,t){ue(e,t,Vn)}function Gr(e,t,n){var r,o,s,i,c=J({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:c[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(c.children=arguments.length>3?Ne.call(arguments,2):n),Se(e.type,c,r||e.key,o||e.ref,null)}function Hn(e){function t(n){var r,o;return this.getChildContext||(r=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&r.forEach(function(i){i.__e=!0,ht(i)})},this.sub=function(s){r.add(s);var i=s.componentWillUnmount;s.componentWillUnmount=function(){r&&r.delete(s),i&&i.call(s)}}),n.children}return t.__c="__cC"+Mn++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Ne=On.slice,N={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(c){e=c}throw e}},Tn=0,K.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},n),this.props)),e&&J(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ht(this))},K.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ht(this))},K.prototype.render=te,se=[],Ln=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Dn=function(e,t){return e.__v.__b-t.__v.__b},Ge.__r=0,$n=/(PointerCapture)$|Capture$/i,Ct=0,ft=Vt(!1),pt=Vt(!0),Mn=0;var Vr=0;function L(e,t,n,r,o,s){t||(t={});var i,c,a=t;if("ref"in a)for(c in a={},t)c=="ref"?i=t[c]:a[c]=t[c];var l={type:e,props:a,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vr,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(c in i)a[c]===void 0&&(a[c]=i[c]);return N.vnode&&N.vnode(l),l}var oe,j,et,Ht,de=0,qn=[],W=N,qt=W.__b,Qt=W.__r,Jt=W.diffed,Zt=W.__c,Kt=W.unmount,Yt=W.__;function pe(e,t){W.__h&&W.__h(j,e,de||t),de=0;var n=j.__H||(j.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function q(e){return de=1,Qe(Zn,e)}function Qe(e,t,n){var r=pe(oe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Zn(void 0,t),function(c){var a=r.__N?r.__N[0]:r.__[0],l=r.t(a,c);a!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=j,!j.__f)){var o=function(c,a,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!s||s.call(this,c,a,l);var u=r.__c.props!==c;return d.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),s&&s.call(this,c,a,l)||u};j.__f=!0;var s=j.shouldComponentUpdate,i=j.componentWillUpdate;j.componentWillUpdate=function(c,a,l){if(this.__e){var d=s;s=void 0,o(c,a,l),s=d}i&&i.call(this,c,a,l)},j.shouldComponentUpdate=o}return r.__N||r.__}function Z(e,t){var n=pe(oe++,3);!W.__s&&Tt(n.__H,t)&&(n.__=e,n.u=t,j.__H.__h.push(n))}function Re(e,t){var n=pe(oe++,4);!W.__s&&Tt(n.__H,t)&&(n.__=e,n.u=t,j.__h.push(n))}function Ce(e){return de=5,Je(function(){return{current:e}},[])}function Qn(e,t,n){de=6,Re(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Je(e,t){var n=pe(oe++,7);return Tt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Nt(e,t){return de=8,Je(function(){return e},t)}function At(e){var t=j.context[e.__c],n=pe(oe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(j)),t.props.value):e.__}function Rt(e,t){W.useDebugValue&&W.useDebugValue(t?t(e):e)}function Jn(){var e=pe(oe++,11);if(!e.__){for(var t=j.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Hr(){for(var e;e=qn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(je),e.__H.__h.forEach(_t),e.__H.__h=[]}catch(t){e.__H.__h=[],W.__e(t,e.__v)}}W.__b=function(e){j=null,qt&&qt(e)},W.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Yt&&Yt(e,t)},W.__r=function(e){Qt&&Qt(e),oe=0;var t=(j=e.__c).__H;t&&(et===j?(t.__h=[],j.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(je),t.__h.forEach(_t),t.__h=[],oe=0)),et=j},W.diffed=function(e){Jt&&Jt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(qn.push(t)!==1&&Ht===W.requestAnimationFrame||((Ht=W.requestAnimationFrame)||qr)(Hr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),et=j=null},W.__c=function(e,t){t.some(function(n){try{n.__h.forEach(je),n.__h=n.__h.filter(function(r){return!r.__||_t(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],W.__e(r,n.__v)}}),Zt&&Zt(e,t)},W.unmount=function(e){Kt&&Kt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{je(r)}catch(o){t=o}}),n.__H=void 0,t&&W.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function qr(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Bt&&(t=requestAnimationFrame(n))}function je(e){var t=j,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),j=t}function _t(e){var t=j;e.__c=e.__(),j=t}function Tt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Zn(e,t){return typeof t=="function"?t(e):t}function Qr(e,t){return t instanceof Uint8Array?{type:"Uint8Array",data:Array.from(t)}:t}function Jr(e,t){return t&&t.type==="Uint8Array"&&Array.isArray(t.data)?new Uint8Array(t.data):t}function De(e){return JSON.stringify(e,Qr)+`
`}function Zr(e){return new Promise((t,n)=>{try{const r=JSON.parse(e,Jr);t(r)}catch(r){console.error("failed to parse message",typeof e,e,r),n(r)}})}function tt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var gt=class{constructor(e,t){V(this,"pendingRequests",{});V(this,"callbacks",{});V(this,"callbackCache",new Map);V(this,"count",0);V(this,"messageStr","");V(this,"apiImplementation");this.io=e,this.apiImplementation=t==null?void 0:t.expose,this.listen()}expose(e){this.apiImplementation=e}getIO(){return this.io}async listen(){for(;;){const e=await this.io.read();if(!e)continue;const t=e.toString("utf-8");if(t.trim().length===0)continue;this.messageStr+=t;const n=this.messageStr[this.messageStr.length-1],r=this.messageStr.split(`
`),o=n===`
`?r:r.slice(0,-1);this.messageStr=n===`
`?"":r.at(-1)??"";for(const s of o.map(i=>i.trim()).filter(Boolean))s.startsWith("{")?this.handleMessageStr(s):console.log("(kkrpc stdout passthrough):",s)}}async handleMessageStr(e){return this.count++,Zr(e).then(t=>{t.type==="response"?this.handleResponse(t):t.type==="request"?this.handleRequest(t):t.type==="callback"?this.handleCallback(t):console.error("received unknown message type",t,typeof t)}).catch(t=>{console.log("(kkrpc stdout passthrough):",e)})}callMethod(e,t){return new Promise((n,r)=>{const o=tt();this.pendingRequests[o]={resolve:n,reject:r};const s=[],i=t.map(a=>{if(typeof a=="function"){let l=this.callbackCache.get(a);return l||(l=tt(),this.callbacks[l]=a,this.callbackCache.set(a,l)),s.push(l),`__callback__${l}`}return a}),c={id:o,method:e,args:i,type:"request",callbackIds:s.length>0?s:void 0};this.io.write(De(c))})}handleResponse(e){const{id:t}=e,{result:n,error:r}=e.args;this.pendingRequests[t]&&(r?this.pendingRequests[t].reject(new Error(r)):this.pendingRequests[t].resolve(n),delete this.pendingRequests[t])}handleRequest(e){const{id:t,method:n,args:r}=e,o=n.split(".");if(!this.apiImplementation)return;let s=this.apiImplementation;for(let l=0;l<o.length-1;l++)if(s=s[o[l]],!s){this.sendError(t,`Method path ${n} not found at ${o[l]}`);return}const i=o[o.length-1],c=s[i];if(typeof c!="function"){this.sendError(t,`Method ${n} is not a function`);return}const a=r.map(l=>{if(typeof l=="string"&&l.startsWith("__callback__")){const d=l.slice(12);return(...u)=>{this.invokeCallback(d,u)}}return l});try{const l=c.apply(s,a);Promise.resolve(l).then(d=>this.sendResponse(t,d)).catch(d=>this.sendError(t,d.message))}catch(l){this.sendError(t,l.message??l.toString())}}invokeCallback(e,t){const n={id:tt(),method:e,args:t,type:"callback"};this.io.write(De(n))}handleCallback(e){const{method:t,args:n}=e,r=this.callbacks[t];r?r(...n):console.error(`Callback with id ${t} not found`)}sendResponse(e,t){const n={id:e,method:"",args:{result:t},type:"response"};this.io.write(De(n))}sendError(e,t){const n={id:e,method:"",args:{error:t},type:"response"};this.io.write(De(n))}createNestedProxy(e=[]){return new Proxy(()=>{},{get:(t,n)=>{if(typeof n=="string"&&n!=="then")return this.createNestedProxy([...e,n])},apply:(t,n,r)=>{const o=e.join(".");return this.callMethod(o,r)}})}getAPI(){return this.createNestedProxy()}freeCallbacks(){this.callbacks={},this.callbackCache.clear()}},$e="__DESTROY__",Kr="__PORT_INIT__",Yr=class{constructor(){V(this,"name","iframe-child-io");V(this,"messageQueue",[]);V(this,"resolveRead",null);V(this,"port",null);V(this,"pendingMessages",[]);V(this,"initialized");V(this,"channel");V(this,"handleMessage",e=>{const t=e.data;if(t===$e){this.destroy();return}this.resolveRead?(this.resolveRead(t),this.resolveRead=null):this.messageQueue.push(t)});this.channel=new MessageChannel,this.port=this.channel.port1,this.port.onmessage=this.handleMessage,window.parent.postMessage(Kr,"*",[this.channel.port2]),this.initialized=Promise.resolve()}async read(){return await this.initialized,this.messageQueue.length>0?this.messageQueue.shift()??null:new Promise(e=>{this.resolveRead=e})}async write(e){await this.initialized,this.port?this.port.postMessage(e):this.pendingMessages.push(e)}destroy(){this.port&&(this.port.postMessage($e),this.port.close())}signalDestroy(){this.port?this.port.postMessage($e):this.pendingMessages.push($e)}};var Xt;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(Xt||(Xt={}));var mt;(function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"})(mt||(mt={}));var en;(function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"})(en||(en={}));function Br(e){return async function(n,r){console.log("fetch",n,r);const o=r==null?void 0:r.maxRedirections,s=r==null?void 0:r.connectTimeout,i=r==null?void 0:r.proxy;r!=null&&(delete r.maxRedirections,delete r.connectTimeout,delete r.proxy);const c=r==null?void 0:r.signal,l=((r==null?void 0:r.headers)==null?[]:r.headers instanceof Headers?Array.from(r.headers.entries()):Array.isArray(r.headers)?r.headers:Object.entries(r.headers)).map(([A,x])=>[A,typeof x=="string"?x:x.toString()]),d=new Request(n,r),u=await d.arrayBuffer(),h=u.byteLength!==0?Array.from(new Uint8Array(u)):null,f=await e.rawFetch({clientConfig:{method:d.method,url:d.url,headers:l,data:h,maxRedirections:o,connectTimeout:s,proxy:i}});c==null||c.addEventListener("abort",()=>{e.fetchCancel(f)});const{status:v,statusText:C,url:m,headers:p,rid:k}=await e.fetchSend(f),P=await e.fetchReadBody(k),b=new Response(P instanceof ArrayBuffer&&P.byteLength!==0?P:P instanceof Array&&P.length>0?new Uint8Array(P):null,{headers:p,status:v,statusText:C});return Object.defineProperty(b,"url",{value:m}),b}}class nt{constructor(){this.eventListeners=Object.create(null)}addListener(t,n){return this.on(t,n)}removeListener(t,n){return this.off(t,n)}on(t,n){return t in this.eventListeners?this.eventListeners[t].push(n):this.eventListeners[t]=[n],this}once(t,n){const r=o=>{this.removeListener(t,r),n(o)};return this.addListener(t,r)}off(t,n){return t in this.eventListeners&&(this.eventListeners[t]=this.eventListeners[t].filter(r=>r!==n)),this}removeAllListeners(t){return t?delete this.eventListeners[t]:this.eventListeners=Object.create(null),this}emit(t,n){if(t in this.eventListeners){const r=this.eventListeners[t];for(const o of r)o(n);return!0}return!1}listenerCount(t){return t in this.eventListeners?this.eventListeners[t].length:0}prependListener(t,n){return t in this.eventListeners?this.eventListeners[t].unshift(n):this.eventListeners[t]=[n],this}prependOnceListener(t,n){const r=o=>{this.removeListener(t,r),n(o)};return this.prependListener(t,r)}}function Xr(e){return{upload:(t,n,r,o)=>e.upload(t,n,r||void 0,o),download:(t,n,r,o)=>e.download(t,n,r||void 0,o)}}function eo(e){return{onDragDrop:t=>e.onDragDrop(t),onDragEnter:t=>e.onDragEnter(t),onDragLeave:t=>e.onDragLeave(t),onDragOver:t=>e.onDragOver(t),onWindowBlur:t=>e.onWindowBlur(t),onWindowCloseRequested:t=>e.onWindowCloseRequested(t),onWindowFocus:t=>e.onWindowFocus(t)}}const Me="data-kunkun-drag-region";function to(e){return{goBack:e.iframeUi.goBack,hideBackButton:e.iframeUi.hideBackButton,hideMoveButton:e.iframeUi.hideMoveButton,hideRefreshButton:e.iframeUi.hideRefreshButton,showBackButton:e.iframeUi.showBackButton,showMoveButton:e.iframeUi.showMoveButton,showRefreshButton:e.iframeUi.showRefreshButton,getTheme:e.iframeUi.getTheme,reloadPage:e.iframeUi.reloadPage,toggleMaximize:e.iframeUi.toggleMaximize,startDragging:e.iframeUi.startDragging,internalToggleMaximize:e.iframeUi.internalToggleMaximize,setTransparentWindowBackground:e.iframeUi.setTransparentWindowBackground,registerDragRegion:async()=>{const t=await e.os.platform();let n=0,r=0;document.addEventListener("mousedown",o=>{const s=o.target;if((s.classList.contains(Me)||s.hasAttribute(Me))&&o.button===0&&(o.detail===1||o.detail===2)){if(t==="macos"&&o.detail==2){n=o.clientX,r=o.clientY;return}o.preventDefault(),o.stopImmediatePropagation(),o.detail===2?e.iframeUi.internalToggleMaximize():e.iframeUi.startDragging()}}),t==="macos"&&document.addEventListener("mouseup",o=>{const s=o.target;(s.classList.contains(Me)||s.hasAttribute(Me))&&o.button===0&&o.detail===2&&o.clientX===n&&o.clientY===r&&e.iframeUi.internalToggleMaximize()})}}}function no(e){return{BaseDirectory:mt,appCacheDir:e.appCacheDir,appConfigDir:e.appConfigDir,appDataDir:e.appDataDir,appLocalDataDir:e.appLocalDataDir,appLogDir:e.appLogDir,audioDir:e.audioDir,basename:e.basename,cacheDir:e.cacheDir,configDir:e.configDir,dataDir:e.dataDir,delimiter:e.delimiter,desktopDir:e.desktopDir,dirname:e.dirname,documentDir:e.documentDir,downloadDir:e.downloadDir,executableDir:e.executableDir,extname:e.extname,fontDir:e.fontDir,homeDir:e.homeDir,isAbsolute:e.isAbsolute,join:e.join,localDataDir:e.localDataDir,normalize:e.normalize,pictureDir:e.pictureDir,publicDir:e.publicDir,resolve:e.resolve,resolveResource:e.resolveResource,resourceDir:e.resourceDir,runtimeDir:e.runtimeDir,sep:e.sep,tempDir:e.tempDir,templateDir:e.templateDir,videoDir:e.videoDir,extensionDir:e.extensionDir,extensionSupportDir:e.extensionSupportDir}}class Lt{constructor(t,n){this.pid=t,this.api=n}async write(t){this.api.stdinWrite(t.toString(),this.pid)}kill(){return this.api.kill(this.pid)}}class Kn extends nt{constructor(t,n=[],r){super(),this.stdout=new nt,this.stderr=new nt,this.program=t,this.args=typeof n=="string"?[n]:n,this.options=r??{}}}class ro extends Kn{constructor(t,n=[],r,o){super(t,n,o),this.api=r}async spawn(){const t=this.args;return typeof t=="object"&&Object.freeze(t),this.api.rawSpawn(this.program,t,this.options,n=>{switch(n.event){case"Error":this.emit("error",n.payload);break;case"Terminated":this.emit("close",n.payload);break;case"Stdout":this.stdout.emit("data",n.payload);break;case"Stderr":this.stderr.emit("data",n.payload);break}}).then(async n=>(await this.api.recordSpawnedProcess(n),new Lt(n,this.api)))}async execute(){const t=this.args;return typeof t=="object"&&Object.freeze(t),this.api.execute(this.program,this.args,this.options)}}class oo extends Kn{constructor(t,n,r,o){super("deno",n),this.config=r,this.scriptPath=t,this.api=o}execute(){return this.api.denoExecute(this.scriptPath,this.config,this.args)}spawn(){return this.api.denoRawSpawn(this.scriptPath,this.config,this.args,t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}}).then(async t=>(console.log("spawned deno process",t),await this.api.recordSpawnedProcess(t),new Lt(t,this.api)))}}class tn{constructor(t,n){this.readStream=t,this.childProcess=n,this.name="tauri-shell-stdio"}read(){return new Promise((t,n)=>{this.readStream.on("data",r=>{t(r)})})}async write(t){return this.childProcess.write(t+`
`)}}function so(e){function t(p,k=[],P){return new ro(p,k,e,P)}function n(p,k,P){return new oo(p,k,P,e)}async function r(p,k,P,b){const A=n(p,k,P),x=await A.spawn(),_=new tn(A.stdout,x);return{rpcChannel:new gt(_,{expose:b}),process:x,command:A}}function o(p){return t("bash",["-c",p])}function s(p){return t("powershell",["-Command",p])}function i(p){return t("osascript",["-e",p])}function c(p){return t("python",["-c",p])}function a(p){return t("zsh",["-c",p])}function l(p){return t("node",["-e",p])}async function d(p){return o(p).execute()}async function u(p){return s(p).execute()}async function h(p){return i(p).execute()}async function f(p){return c(p).execute()}async function v(p){return a(p).execute()}async function C(p){return l(p).execute()}function m(){return e.likelyOnWindows()}return{open:e.open,killPid:e.killPid,makeBashScript:o,makePowershellScript:s,makeAppleScript:i,makePythonScript:c,makeZshScript:a,makeNodeScript:l,executeBashScript:d,executePowershellScript:u,executeAppleScript:h,executePythonScript:f,executeZshScript:v,executeNodeScript:C,hasCommand:e.hasCommand,likelyOnWindows:m,createCommand:t,createDenoCommand:n,Child:Lt,TauriShellStdio:tn,createDenoRpcChannel:r,RPCChannel:gt,whereIsCommand:e.whereIsCommand}}const io=new Yr,co=new gt(io,{}),ie=co.getAPI();eo(ie.event);Br(ie.fetch);no(ie.path);so(ie.shell);Xr(ie.updownload);const nn=to(ie),{db:rt,os:ec,clipboard:tc,kv:nc,dialog:rc,fs:oc,log:sc,notification:ic,sysInfo:cc,network:lc,system:ac,toast:uc,utils:dc,open:lo,app:fc,helper:pc}=ie;function Yn(e,t){for(var n in t)e[n]=t[n];return e}function bt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Bn(e,t){var n=t(),r=q({t:{__:n,u:t}}),o=r[0].t,s=r[1];return Re(function(){o.__=n,o.u=t,ot(o)&&s({t:o})},[e,n,t]),Z(function(){return ot(o)&&s({t:o}),e(function(){ot(o)&&s({t:o})})},[e]),n}function ot(e){var t,n,r=e.u,o=e.__;try{var s=r();return!((t=o)===(n=s)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Xn(e){e()}function er(e){return e}function tr(){return[!1,Xn]}var nr=Re;function vt(e,t){this.props=e,this.context=t}function ao(e,t){function n(o){var s=this.props.ref,i=s==o.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,o)||!i:bt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,H(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(vt.prototype=new K).isPureReactComponent=!0,vt.prototype.shouldComponentUpdate=function(e,t){return bt(this.props,e)||bt(this.state,t)};var rn=N.__b;N.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),rn&&rn(e)};var uo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ze(e){function t(n){var r=Yn({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=uo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var on=function(e,t){return e==null?null:ee(ee(e).map(t))},fo={map:on,forEach:on,count:function(e){return e?ee(e).length:0},only:function(e){var t=ee(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ee},po=N.__e;N.__e=function(e,t,n,r){if(e.then){for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}po(e,t,n,r)};var sn=N.unmount;function rr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Yn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return rr(r,t,n)})),e}function or(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return or(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function We(){this.__u=0,this.o=null,this.__b=null}function sr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ho(e){var t,n,r;function o(s){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return H(n,s)}return o.displayName="Lazy",o.__f=!0,o}function xe(){this.i=null,this.l=null}N.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),sn&&sn(e)},(We.prototype=new K).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=sr(r.__v),s=!1,i=function(){s||(s=!0,n.__R=null,o?o(c):c())};n.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var a=r.state.__a;r.__v.__k[0]=or(a,a.__c.__P,a.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},We.prototype.componentWillUnmount=function(){this.o=[]},We.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=rr(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&H(te,null,e.fallback);return o&&(o.__u&=-33),[H(te,null,t.__a?null:e.children),o]};var cn=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function _o(e){return this.getChildContext=function(){return e.context},e.children}function go(e){var t=this,n=e.h;t.componentWillUnmount=function(){ue(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.h.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.h.insertBefore(r,o)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}),ue(H(_o,{context:t.context},e.__v),t.v)}function mo(e,t){var n=H(go,{__v:e,h:t});return n.containerInfo=t,n}(xe.prototype=new K).__a=function(e){var t=this,n=sr(t.__v),r=t.l.get(e);return r[0]++,function(o){var s=function(){t.props.revealOrder?(r.push(o),cn(t,e,r)):o()};n?n(s):s()}},xe.prototype.render=function(e){this.i=null,this.l=new Map;var t=ee(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},xe.prototype.componentDidUpdate=xe.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){cn(e,n,t)})};var ir=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,bo=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,vo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yo=/[A-Z0-9]/g,wo=typeof document<"u",xo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ko(e,t,n){return t.__k==null&&(t.textContent=""),ue(e,t),typeof n=="function"&&n(),e?e.__c:null}function So(e,t,n){return Vn(e,t),typeof n=="function"&&n(),e?e.__c:null}K.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(K.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ln=N.event;function Co(){}function Io(){return this.cancelBubble}function Po(){return this.defaultPrevented}N.event=function(e){return ln&&(e=ln(e)),e.persist=Co,e.isPropagationStopped=Io,e.isDefaultPrevented=Po,e.nativeEvent=e};var Dt,Eo={enumerable:!1,configurable:!0,get:function(){return this.class}},an=N.vnode;N.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},s=r.indexOf("-")===-1;for(var i in n){var c=n[i];if(!(i==="value"&&"defaultValue"in n&&c==null||wo&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&c===!0?c="":a==="translate"&&c==="no"?c=!1:a[0]==="o"&&a[1]==="n"?a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||xo(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":vo.test(i)&&(i=a):a=i="oninput":s&&bo.test(i)?i=i.replace(yo,"-$&").toLowerCase():c===null&&(c=void 0),a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=c}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ee(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=ee(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Eo)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=ir,an&&an(e)};var un=N.__r;N.__r=function(e){un&&un(e),Dt=e.__c};var dn=N.diffed;N.diffed=function(e){dn&&dn(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Dt=null};var No={ReactCurrentDispatcher:{current:{readContext:function(e){return Dt.__n[e.__c].props.value},useCallback:Nt,useContext:At,useDebugValue:Rt,useDeferredValue:er,useEffect:Z,useId:Jn,useImperativeHandle:Qn,useInsertionEffect:nr,useLayoutEffect:Re,useMemo:Je,useReducer:Qe,useRef:Ce,useState:q,useSyncExternalStore:Bn,useTransition:tr}}};function Ao(e){return H.bind(null,e)}function Ke(e){return!!e&&e.$$typeof===ir}function Ro(e){return Ke(e)&&e.type===te}function To(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Lo(e){return Ke(e)?Gr.apply(null,arguments):e}function Do(e){return!!e.__k&&(ue(null,e),!0)}function $o(e){return e&&(e.base||e.nodeType===1&&e)||null}var Mo=function(e,t){return e(t)},Oo=function(e,t){return e(t)},zo=te,jo=Ke,ce={useState:q,useId:Jn,useReducer:Qe,useEffect:Z,useLayoutEffect:Re,useInsertionEffect:nr,useTransition:tr,useDeferredValue:er,useSyncExternalStore:Bn,startTransition:Xn,useRef:Ce,useImperativeHandle:Qn,useMemo:Je,useCallback:Nt,useContext:At,useDebugValue:Rt,version:"18.3.1",Children:fo,render:ko,hydrate:So,unmountComponentAtNode:Do,createPortal:mo,createElement:H,createContext:Hn,createFactory:Ao,cloneElement:Lo,createRef:zr,Fragment:te,isValidElement:Ke,isElement:jo,isFragment:Ro,isMemo:To,findDOMNode:$o,Component:K,PureComponent:vt,memo:ao,forwardRef:Ze,flushSync:Oo,unstable_batchedUpdates:Mo,StrictMode:zo,Suspense:We,SuspenseList:xe,lazy:ho,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:No};function cr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=cr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=cr(e))&&(r&&(r+=" "),r+=t);return r}const $t="-",Uo=e=>{const t=Go(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const c=i.split($t);return c[0]===""&&c.length!==1&&c.shift(),lr(c,t)||Fo(i)},getConflictingClassGroupIds:(i,c)=>{const a=n[i]||[];return c&&r[i]?[...a,...r[i]]:a}}},lr=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?lr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($t);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},fn=/^\[(.+)\]$/,Fo=e=>{if(fn.test(e)){const t=fn.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Go=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ho(Object.entries(e.classGroups),n).forEach(([s,i])=>{yt(i,r,s,t)}),r},yt=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:pn(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Vo(o)){yt(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{yt(i,pn(t,s),n,r)})})},pn=(e,t)=>{let n=e;return t.split($t).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Vo=e=>e.isThemeGetter,Ho=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,c])=>[t+i,c])):s);return[n,o]}):e,qo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},ar="!",Qo=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=c=>{const a=[];let l=0,d=0,u;for(let m=0;m<c.length;m++){let p=c[m];if(l===0){if(p===o&&(r||c.slice(m,m+s)===t)){a.push(c.slice(d,m)),d=m+s;continue}if(p==="/"){u=m;continue}}p==="["?l++:p==="]"&&l--}const h=a.length===0?c:c.substring(d),f=h.startsWith(ar),v=f?h.substring(1):h,C=u&&u>d?u-d:void 0;return{modifiers:a,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:C}};return n?c=>n({className:c,parseClassName:i}):i},Jo=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Zo=e=>({cache:qo(e.cacheSize),parseClassName:Qo(e),...Uo(e)}),Ko=/\s+/,Yo=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(Ko);let c="";for(let a=i.length-1;a>=0;a-=1){const l=i[a],{modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:f}=n(l);let v=!!f,C=r(v?h.substring(0,f):h);if(!C){if(!v){c=l+(c.length>0?" "+c:c);continue}if(C=r(h),!C){c=l+(c.length>0?" "+c:c);continue}v=!1}const m=Jo(d).join(":"),p=u?m+ar:m,k=p+C;if(s.includes(k))continue;s.push(k);const P=o(C,v);for(let b=0;b<P.length;++b){const A=P[b];s.push(p+A)}c=l+(c.length>0?" "+c:c)}return c};function Bo(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ur(t))&&(r&&(r+=" "),r+=n);return r}const ur=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ur(e[r]))&&(n&&(n+=" "),n+=t);return n};function Xo(e,...t){let n,r,o,s=i;function i(a){const l=t.reduce((d,u)=>u(d),e());return n=Zo(l),r=n.cache.get,o=n.cache.set,s=c,c(a)}function c(a){const l=r(a);if(l)return l;const d=Yo(a,n);return o(a,d),d}return function(){return s(Bo.apply(null,arguments))}}const z=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},dr=/^\[(?:([a-z-]+):)?(.+)\]$/i,es=/^\d+\/\d+$/,ts=new Set(["px","full","screen"]),ns=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rs=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,os=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ss=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,is=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>le(e)||ts.has(e)||es.test(e),ne=e=>he(e,"length",hs),le=e=>!!e&&!Number.isNaN(Number(e)),st=e=>he(e,"number",le),me=e=>!!e&&Number.isInteger(Number(e)),cs=e=>e.endsWith("%")&&le(e.slice(0,-1)),E=e=>dr.test(e),re=e=>ns.test(e),ls=new Set(["length","size","percentage"]),as=e=>he(e,ls,fr),us=e=>he(e,"position",fr),ds=new Set(["image","url"]),fs=e=>he(e,ds,gs),ps=e=>he(e,"",_s),be=()=>!0,he=(e,t,n)=>{const r=dr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hs=e=>rs.test(e)&&!os.test(e),fr=()=>!1,_s=e=>ss.test(e),gs=e=>is.test(e),ms=()=>{const e=z("colors"),t=z("spacing"),n=z("blur"),r=z("brightness"),o=z("borderColor"),s=z("borderRadius"),i=z("borderSpacing"),c=z("borderWidth"),a=z("contrast"),l=z("grayscale"),d=z("hueRotate"),u=z("invert"),h=z("gap"),f=z("gradientColorStops"),v=z("gradientColorStopPositions"),C=z("inset"),m=z("margin"),p=z("opacity"),k=z("padding"),P=z("saturate"),b=z("scale"),A=z("sepia"),x=z("skew"),_=z("space"),I=z("translate"),S=()=>["auto","contain","none"],y=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto",E,t],g=()=>[E,t],O=()=>["",X,ne],M=()=>["auto",le,E],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",E],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[le,E];return{cacheSize:500,separator:":",theme:{colors:[be],spacing:[X,ne],blur:["none","",re,E],brightness:F(),borderColor:[e],borderRadius:["none","","full",re,E],borderSpacing:g(),borderWidth:O(),contrast:F(),grayscale:$(),hueRotate:F(),invert:$(),gap:g(),gradientColorStops:[e],gradientColorStopPositions:[cs,ne],inset:w(),margin:w(),opacity:F(),padding:g(),saturate:F(),scale:F(),sepia:$(),skew:F(),space:g(),translate:g()},classGroups:{aspect:[{aspect:["auto","square","video",E]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),E]}],overflow:[{overflow:y()}],"overflow-x":[{"overflow-x":y()}],"overflow-y":[{"overflow-y":y()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",me,E]}],basis:[{basis:w()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",E]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",me,E]}],"grid-cols":[{"grid-cols":[be]}],"col-start-end":[{col:["auto",{span:["full",me,E]},E]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[be]}],"row-start-end":[{row:["auto",{span:[me,E]},E]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",E]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",E]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",E,t]}],"min-w":[{"min-w":[E,t,"min","max","fit"]}],"max-w":[{"max-w":[E,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[E,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[E,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[E,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",st]}],"font-family":[{font:[be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",E]}],"line-clamp":[{"line-clamp":["none",le,st]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X,E]}],"list-image":[{"list-image":["none",E]}],"list-style-type":[{list:["none","disc","decimal",E]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X,ne]}],"underline-offset":[{"underline-offset":["auto",X,E]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),us]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",as]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fs]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:G()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[X,E]}],"outline-w":[{outline:[X,ne]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[X,ne]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,ps]}],"shadow-color":[{shadow:[be]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",re,E]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[P]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",E]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",E]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",E]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[me,E]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X,ne,st]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},bs=Xo(ms);function pr(...e){return bs(Wo(e))}const vs={theme:"system",setTheme:()=>null},ys=ce.createContext(vs);function ws({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,s]=ce.useState(()=>localStorage.getItem(n)||t);ce.useEffect(()=>{const c=window.document.documentElement;if(c.classList.remove("light","dark"),o==="system"){const a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";c.classList.add(a);return}c.classList.add(o)},[o]);const i={theme:o,setTheme:c=>{localStorage.setItem(n,c),s(c)}};return ce.createElement(ys.Provider,{...r,value:i},e)}const ke={},hn=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,_n=e=>"init"in e,it=e=>!!e.write,gn=e=>"v"in e||"e"in e,Oe=e=>{if("e"in e)throw e.e;if((ke?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},Ve=new WeakMap,mn=e=>{var t;return He(e)&&!!((t=Ve.get(e))!=null&&t[0])},xs=e=>{const t=Ve.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(n=>n()))},hr=(e,t)=>{let n=Ve.get(e);if(!n){n=[!0,new Set],Ve.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)},He=e=>typeof(e==null?void 0:e.then)=="function",_r=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},ct=(e,t,n)=>{const r=n(e),o="v"in r,s=r.v;if(He(t))for(const i of r.d.keys())_r(e,t,n(i));r.v=t,delete r.e,(!o||!Object.is(s,r.v))&&(++r.n,He(s)&&xs(s))},bn=(e,t,n)=>{var r;const o=new Set;for(const s of((r=n.get(e))==null?void 0:r.t)||[])n.has(s)&&o.add(s);for(const s of t.p)o.add(s);return o},ks=()=>{const e=new Set,t=()=>{e.forEach(n=>n())};return t.add=n=>(e.add(n),()=>{e.delete(n)}),t},lt=()=>{const e={},t=new WeakMap,n=r=>{var o,s;(o=t.get(e))==null||o.forEach(i=>i(r)),(s=t.get(r))==null||s.forEach(i=>i())};return n.add=(r,o)=>{const s=r||e,i=(t.has(s)?t:t.set(s,new Set)).get(s);return i.add(o),()=>{i==null||i.delete(o),i.size||t.delete(s)}},n},Ss=e=>(e.c||(e.c=lt()),e.m||(e.m=lt()),e.u||(e.u=lt()),e.f||(e.f=ks()),e),Cs=Symbol(),Is=(e=new WeakMap,t=new WeakMap,n=new WeakMap,r=new Set,o=new Set,s=new Set,i={},c=(h,...f)=>h.read(...f),a=(h,...f)=>h.write(...f),l=(h,f)=>{var v;return(v=h.unstable_onInit)==null?void 0:v.call(h,f)},d=(h,f)=>{var v;return(v=h.onMount)==null?void 0:v.call(h,f)},...u)=>{const h=u[0]||(_=>{if((ke?"production":void 0)!=="production"&&!_)throw new Error("Atom is undefined or null");let I=e.get(_);return I||(I={d:new Map,p:new Set,n:0},e.set(_,I),l==null||l(_,x)),I}),f=u[1]||(()=>{const _=[],I=S=>{try{S()}catch(y){_.push(y)}};do{i.f&&I(i.f);const S=new Set,y=S.add.bind(S);r.forEach(w=>{var g;return(g=t.get(w))==null?void 0:g.l.forEach(y)}),r.clear(),s.forEach(y),s.clear(),o.forEach(y),o.clear(),S.forEach(I),r.size&&v()}while(r.size||s.size||o.size);if(_.length)throw new AggregateError(_)}),v=u[2]||(()=>{const _=[],I=new WeakSet,S=new WeakSet,y=Array.from(r);for(;y.length;){const w=y[y.length-1],g=h(w);if(S.has(w)){y.pop();continue}if(I.has(w)){if(n.get(w)===g.n)_.push([w,g]);else if((ke?"production":void 0)!=="production"&&n.has(w))throw new Error("[Bug] invalidated atom exists");S.add(w),y.pop();continue}I.add(w);for(const O of bn(w,g,t))I.has(O)||y.push(O)}for(let w=_.length-1;w>=0;--w){const[g,O]=_[w];let M=!1;for(const D of O.d.keys())if(D!==g&&r.has(D)){M=!0;break}M&&(C(g),k(g)),n.delete(g)}}),C=u[3]||(_=>{var I;const S=h(_);if(gn(S)&&(t.has(_)&&n.get(_)!==S.n||Array.from(S.d).every(([R,T])=>C(R).n===T)))return S;S.d.clear();let y=!0;const w=()=>{t.has(_)&&(k(_),v(),f())},g=R=>{var T;if(hn(_,R)){const U=h(R);if(!gn(U))if(_n(R))ct(R,R.init,h);else throw new Error("no atom init");return Oe(U)}const $=C(R);try{return Oe($)}finally{S.d.set(R,$.n),mn(S.v)&&_r(_,S.v,$),(T=t.get(R))==null||T.t.add(_),y||w()}};let O,M;const D={get signal(){return O||(O=new AbortController),O.signal},get setSelf(){return(ke?"production":void 0)!=="production"&&!it(_)&&console.warn("setSelf function cannot be used with read-only atom"),!M&&it(_)&&(M=(...R)=>{if((ke?"production":void 0)!=="production"&&y&&console.warn("setSelf function cannot be called in sync"),!y)try{return p(_,...R)}finally{v(),f()}}),M}},G=S.n;try{const R=c(_,g,D);return ct(_,R,h),He(R)&&(hr(R,()=>O==null?void 0:O.abort()),R.then(w,w)),S}catch(R){return delete S.v,S.e=R,++S.n,S}finally{y=!1,G!==S.n&&n.get(_)===G&&(n.set(_,S.n),r.add(_),(I=i.c)==null||I.call(i,_))}}),m=u[4]||(_=>{const I=[_];for(;I.length;){const S=I.pop(),y=h(S);for(const w of bn(S,y,t)){const g=h(w);n.set(w,g.n),I.push(w)}}}),p=u[5]||((_,...I)=>{let S=!0;const y=g=>Oe(C(g)),w=(g,...O)=>{var M;const D=h(g);try{if(hn(_,g)){if(!_n(g))throw new Error("atom not writable");const G=D.n,R=O[0];ct(g,R,h),k(g),G!==D.n&&(r.add(g),(M=i.c)==null||M.call(i,g),m(g));return}else return p(g,...O)}finally{S||(v(),f())}};try{return a(_,y,w,...I)}finally{S=!1}}),k=u[6]||(_=>{var I;const S=h(_),y=t.get(_);if(y&&!mn(S.v)){for(const[w,g]of S.d)if(!y.d.has(w)){const O=h(w);P(w).t.add(_),y.d.add(w),g!==O.n&&(r.add(w),(I=i.c)==null||I.call(i,w),m(w))}for(const w of y.d||[])if(!S.d.has(w)){y.d.delete(w);const g=b(w);g==null||g.t.delete(_)}}}),P=u[7]||(_=>{var I;const S=h(_);let y=t.get(_);if(!y){C(_);for(const w of S.d.keys())P(w).t.add(_);if(y={l:new Set,d:new Set(S.d.keys()),t:new Set},t.set(_,y),(I=i.m)==null||I.call(i,_),it(_)){const w=()=>{let g=!0;const O=(...M)=>{try{return p(_,...M)}finally{g||(v(),f())}};try{const M=d(_,O);M&&(y.u=()=>{g=!0;try{M()}finally{g=!1}})}finally{g=!1}};o.add(w)}}return y}),b=u[8]||(_=>{var I;const S=h(_);let y=t.get(_);if(y&&!y.l.size&&!Array.from(y.t).some(w=>{var g;return(g=t.get(w))==null?void 0:g.d.has(_)})){y.u&&s.add(y.u),y=void 0,t.delete(_),(I=i.u)==null||I.call(i,_);for(const w of S.d.keys()){const g=b(w);g==null||g.t.delete(_)}return}return y}),A=[e,t,n,r,o,s,i,c,a,l,d,h,f,v,C,m,p,k,P,b],x={get:_=>Oe(C(_)),set:(_,...I)=>{try{return p(_,...I)}finally{v(),f()}},sub:(_,I)=>{const y=P(_).l;return y.add(I),f(),()=>{y.delete(I),b(_),f()}}};return Object.defineProperty(x,Cs,{value:A}),x},gr=Is,Ps=Ss,vn=hr,mr={},Es=()=>{let e=0;const t=Ps({}),n=new WeakMap,r=new WeakMap,o=gr(n,r,void 0,void 0,void 0,void 0,t,void 0,(c,a,l,...d)=>e?l(c,...d):c.write(a,l,...d)),s=new Set;return t.m.add(void 0,c=>{s.add(c);const a=n.get(c);a.m=r.get(c)}),t.u.add(void 0,c=>{s.delete(c);const a=n.get(c);delete a.m}),Object.assign(o,{dev4_get_internal_weak_map:()=>n,dev4_get_mounted_atoms:()=>s,dev4_restore_atoms:c=>{const a={read:()=>null,write:(l,d)=>{++e;try{for(const[u,h]of c)"init"in u&&d(u,h)}finally{--e}}};o.set(a)}})};function Ns(){return(mr?"production":void 0)!=="production"?Es():gr()}let ve;function As(){return ve||(ve=Ns(),(mr?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=ve),globalThis.__JOTAI_DEFAULT_STORE__!==ve&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),ve}const Rs={},Ts=Hn(void 0);function br(e){return At(Ts)||As()}const vr=e=>typeof(e==null?void 0:e.then)=="function",Ls=e=>{e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})},Ds=ce.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Ls(e),e)}),at=new WeakMap,$s=(e,t)=>{let n=at.get(e);return n||(n=new Promise((r,o)=>{let s=e;const i=l=>d=>{s===l&&r(d)},c=l=>d=>{s===l&&o(d)},a=()=>{try{const l=t();vr(l)?(at.set(l,n),s=l,l.then(i(l),c(l)),vn(l,a)):r(l)}catch(l){o(l)}};e.then(i(e),c(e)),vn(e,a)}),at.set(e,n)),n};function Ms(e,t){const n=br(),[[r,o,s],i]=Qe(l=>{const d=n.get(e);return Object.is(l[0],d)&&l[1]===n&&l[2]===e?l:[d,n,e]},void 0,()=>[n.get(e),n,e]);let c=r;if((o!==n||s!==e)&&(i(),c=n.get(e)),Z(()=>{const l=n.sub(e,()=>{i()});return i(),l},[n,e,void 0]),Rt(c),vr(c)){const l=$s(c,()=>n.get(e));return Ds(l)}return c}function Os(e,t){const n=br();return Nt((...o)=>{if((Rs?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function zs(e,t){return[Ms(e),Os(e)]}var js={};let Ws=0;function yn(e,t){const n=`atom${++Ws}`,r={toString(){return(js?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=Us,r.write=Fs),t&&(r.write=t),r}function Us(e){return e(this)}function Fs(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}var Mt={};const Gs=Symbol((Mt?"production":void 0)!=="production"?"RESET":""),Vs=e=>typeof(e==null?void 0:e.then)=="function";function Hs(e=()=>{try{return window.localStorage}catch(n){(Mt?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,o;const s={getItem:(a,l)=>{var d,u;const h=v=>{if(v=v||"",r!==v){try{o=JSON.parse(v,t==null?void 0:t.reviver)}catch{return l}r=v}return o},f=(u=(d=e())==null?void 0:d.getItem(a))!=null?u:null;return Vs(f)?f.then(h):h(f)},setItem:(a,l)=>{var d;return(d=e())==null?void 0:d.setItem(a,JSON.stringify(l,void 0))},removeItem:a=>{var l;return(l=e())==null?void 0:l.removeItem(a)}},i=a=>(l,d,u)=>a(l,h=>{let f;try{f=JSON.parse(h||"")}catch{f=u}d(f)});let c;try{c=(n=e())==null?void 0:n.subscribe}catch{}return!c&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(c=(a,l)=>{if(!(e()instanceof window.Storage))return()=>{};const d=u=>{u.storageArea===e()&&u.key===a&&l(u.newValue)};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),c&&(s.subscribe=i(c)),s}const qs=Hs();function Qs(e,t,n=qs,r){const o=yn(t);return(Mt?"production":void 0)!=="production"&&(o.debugPrivate=!0),o.onMount=s=>{s(n.getItem(e,t));let i;return n.subscribe&&(i=n.subscribe(e,s,t)),i},yn(s=>s(o),(s,i,c)=>{const a=typeof c=="function"?c(s(o)):c;return a===Gs?(i(o,t),n.removeItem(e)):a instanceof Promise?a.then(l=>(i(o,l),n.setItem(e,l))):(i(o,a),n.setItem(e,a))})}const Js=Qs("config",{style:"default",theme:"zinc",radius:.5});function Zs(){return zs(Js)}function Ks({defaultTheme:e,children:t,className:n}){const[r]=Zs();return ce.createElement("div",{className:pr(`theme-${e||r.theme}`,"w-full",n),style:{"--radius":`${e?.5:r.radius}rem`}},t)}const yr=Ze(({className:e,type:t,...n},r)=>H("input",{type:t,className:pr("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));yr.displayName="Input";const wr=Object.freeze({left:0,top:0,width:16,height:16}),qe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ot=Object.freeze({...wr,...qe}),wt=Object.freeze({...Ot,body:"",hidden:!1});function Ys(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function wn(e,t){const n=Ys(e,t);for(const r in wt)r in qe?r in e&&!(r in n)&&(n[r]=qe[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Bs(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,a=c&&s(c);a&&(o[i]=[c].concat(a))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function Xs(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=wn(r[c]||o[c],s)}return i(t),n.forEach(i),wn(e,s)}function xr(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=Bs(e);for(const o in r){const s=r[o];s&&(t(o,Xs(e,o,s)),n.push(o))}return n}const ei={provider:"",aliases:{},not_found:{},...wr};function ut(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function kr(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ut(e,ei))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o||typeof s.body!="string"||!ut(s,wt))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o||typeof i!="string"||!n[i]&&!r[i]||!ut(s,wt))return null}return t}const Sr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ye=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),a=o.pop(),l={provider:o.length>0?o[0]:r,prefix:a,name:c};return t&&!Ue(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!Ue(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Ue(c,n)?null:c}return null},Ue=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,xn=Object.create(null);function ti(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function fe(e,t){const n=xn[e]||(xn[e]=Object.create(null));return n[t]||(n[t]=ti(e,t))}function Cr(e,t){return kr(t)?xr(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ni(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ee=!1;function Ir(e){return typeof e=="boolean"&&(Ee=e),Ee}function kn(e){const t=typeof e=="string"?Ye(e,!0,Ee):e;if(t){const n=fe(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function ri(e,t){const n=Ye(e,!0,Ee);if(!n)return!1;const r=fe(n.provider,n.prefix);return t?ni(r,n.name,t):(r.missing.add(n.name),!0)}function oi(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ee&&!t&&!e.prefix){let o=!1;return kr(e)&&(e.prefix="",xr(e,(s,i)=>{ri(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Ue({prefix:n,name:"a"}))return!1;const r=fe(t,n);return!!Cr(r,e)}const Pr=Object.freeze({width:null,height:null}),Er=Object.freeze({...Pr,...qe}),si=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ii=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Sn(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(si);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=ii.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}function ci(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const o=e.indexOf(">",r),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const i=e.indexOf(">",s);if(i===-1)break;n+=e.slice(o+1,s).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:n,content:e}}function li(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ai(e,t,n){const r=ci(e);return li(r.defs,t+r.content+n)}const ui=e=>e==="unset"||e==="undefined"||e==="none";function di(e,t){const n={...Ot,...e},r={...Er,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(C=>{const m=[],p=C.hFlip,k=C.vFlip;let P=C.rotate;p?k?P+=2:(m.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),m.push("scale(-1 1)"),o.top=o.left=0):k&&(m.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),m.push("scale(1 -1)"),o.top=o.left=0);let b;switch(P<0&&(P-=Math.floor(P/4)*4),P=P%4,P){case 1:b=o.height/2+o.top,m.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:m.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,m.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}P%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),m.length&&(s=ai(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const i=r.width,c=r.height,a=o.width,l=o.height;let d,u;i===null?(u=c===null?"1em":c==="auto"?l:c,d=Sn(u,a/l)):(d=i==="auto"?a:i,u=c===null?Sn(d,l/a):c==="auto"?l:c);const h={},f=(C,m)=>{ui(m)||(h[C]=m.toString())};f("width",d),f("height",u);const v=[o.left,o.top,a,l];return h.viewBox=v.join(" "),{attributes:h,viewBox:v,body:s}}const fi=/\sid="(\S+)"/g,pi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let hi=0;function _i(e,t=pi){const n=[];let r;for(;r=fi.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(hi++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const xt=Object.create(null);function gi(e,t){xt[e]=t}function kt(e){return xt[e]||xt[""]}function zt(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const jt=Object.create(null),ye=["https://api.simplesvg.com","https://api.unisvg.com"],Fe=[];for(;ye.length>0;)ye.length===1||Math.random()>.5?Fe.push(ye.shift()):Fe.push(ye.pop());jt[""]=zt({resources:["https://api.iconify.design"].concat(Fe)});function mi(e,t){const n=zt(t);return n===null?!1:(jt[e]=n,!0)}function Wt(e){return jt[e]}const bi=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Cn=bi();function vi(e,t){const n=Wt(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function yi(e){return e===404}const wi=(e,t,n)=>{const r=[],o=vi(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((a,l)=>{c+=a.length+1,c>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=a.length),i.icons.push(a)}),r.push(i),r};function xi(e){if(typeof e=="string"){const t=Wt(e);if(t)return t.path}return"/"}const ki=(e,t,n)=>{if(!Cn){n("abort",424);return}let r=xi(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=s+".json?"+a.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Cn(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(yi(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Si={prepare:wi,send:ki};function Ci(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,a=n[s]||(n[s]=Object.create(null)),l=a[i]||(a[i]=fe(s,i));let d;c in l.icons?d=t.loaded:i===""||l.missing.has(c)?d=t.missing:d=t.pending;const u={provider:s,prefix:i,name:c};d.push(u)}),t}function Nr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Ii(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(a=>{if(a.prefix!==o)return!0;const l=a.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||Nr([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Pi=0;function Ei(e,t,n){const r=Pi++,o=Nr.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Ni(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?Ye(o,t,n):o;s&&r.push(s)}),r}var Ai={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ri(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let x=e.resources.slice(0);for(i=[];x.length>1;){const _=Math.floor(Math.random()*x.length);i.push(x[_]),x=x.slice(0,_).concat(x.slice(_+1))}i=i.concat(x)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let a="pending",l=0,d,u=null,h=[],f=[];typeof r=="function"&&f.push(r);function v(){u&&(clearTimeout(u),u=null)}function C(){a==="pending"&&(a="aborted"),v(),h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function m(x,_){_&&(f=[]),typeof x=="function"&&f.push(x)}function p(){return{startTime:c,payload:t,status:a,queriesSent:l,queriesPending:h.length,subscribe:m,abort:C}}function k(){a="failed",f.forEach(x=>{x(void 0,d)})}function P(){h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function b(x,_,I){const S=_!=="success";switch(h=h.filter(y=>y!==x),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){d=I,k();return}if(S){d=I,h.length||(i.length?A():k());return}if(v(),P(),!e.random){const y=e.resources.indexOf(x.resource);y!==-1&&y!==e.index&&(e.index=y)}a="completed",f.forEach(y=>{y(I)})}function A(){if(a!=="pending")return;v();const x=i.shift();if(x===void 0){if(h.length){u=setTimeout(()=>{v(),a==="pending"&&(P(),k())},e.timeout);return}k();return}const _={status:"pending",resource:x,callback:(I,S)=>{b(_,I,S)}};h.push(_),l++,u=setTimeout(A,e.rotate),n(x,t,_.callback)}return setTimeout(A),p}function Ar(e){const t={...Ai,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,a,l){const d=Ri(t,c,a,(u,h)=>{r(),l&&l(u,h)});return n.push(d),d}function s(c){return n.find(a=>c(a))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function In(){}const dt=Object.create(null);function Ti(e){if(!dt[e]){const t=Wt(e);if(!t)return;const n=Ar(t),r={config:t,redundancy:n};dt[e]=r}return dt[e]}function Li(e,t,n){let r,o;if(typeof e=="string"){const s=kt(e);if(!s)return n(void 0,424),In;o=s.send;const i=Ti(e);i&&(r=i.redundancy)}else{const s=zt(e);if(s){r=Ar(s);const i=e.resources?e.resources[0]:"",c=kt(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),In):r.query(t,o,n)().abort}function Pn(){}function Di(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ii(e)}))}function $i(e){const t=[],n=[];return e.forEach(r=>{(r.match(Sr)?t:n).push(r)}),{valid:t,invalid:n}}function we(e,t,n){function r(){const o=e.pendingIcons;t.forEach(s=>{o&&o.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!Cr(e,n).length){r();return}}catch(o){console.error(o)}r(),Di(e)}function En(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Mi(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const s=e.loadIcon;if(e.loadIcons&&(o.length>1||!s)){En(e.loadIcons(o,r,n),d=>{we(e,o,d)});return}if(s){o.forEach(d=>{const u=s(d,r,n);En(u,h=>{const f=h?{prefix:r,icons:{[d]:h}}:null;we(e,[d],f)})});return}const{valid:i,invalid:c}=$i(o);if(c.length&&we(e,c,null),!i.length)return;const a=r.match(Sr)?kt(n):null;if(!a){we(e,i,null);return}a.prepare(n,r,i).forEach(d=>{Li(n,d,u=>{we(e,d.icons,u)})})}))}const Oi=(e,t)=>{const n=Ni(e,!0,Ir()),r=Ci(n);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,Pn)}),()=>{a=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(a=>{const{provider:l,prefix:d}=a;if(d===c&&l===i)return;i=l,c=d,s.push(fe(l,d));const u=o[l]||(o[l]=Object.create(null));u[d]||(u[d]=[])}),r.pending.forEach(a=>{const{provider:l,prefix:d,name:u}=a,h=fe(l,d),f=h.pendingIcons||(h.pendingIcons=new Set);f.has(u)||(f.add(u),o[l][d].push(u))}),s.forEach(a=>{const l=o[a.provider][a.prefix];l.length&&Mi(a,l)}),t?Ei(t,r,s):Pn};function zi(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Pr?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ji=/[\s,]+/;function Wi(e,t){t.split(ji).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ui(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}function Fi(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Gi(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Vi(e){return"data:image/svg+xml,"+Gi(e)}function Hi(e){return'url("'+Vi(e)+'")'}let Ie;function qi(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function Qi(e){return Ie===void 0&&qi(),Ie?Ie.createHTML(e):e}const Rr={...Er,inline:!1},Ji={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Zi={display:"inline-block"},St={backgroundColor:"currentColor"},Tr={backgroundColor:"transparent"},Nn={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},An={WebkitMask:St,mask:St,background:Tr};for(const e in An){const t=An[e];for(const n in Nn)t[e+n]=Nn[n]}const Ki={...Rr,inline:!0};function Rn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Yi=(e,t,n)=>{const r=t.inline?Ki:Rr,o=zi(r,t),s=t.mode||"svg",i={},c=t.style||{},a={...s==="svg"?Ji:{}};if(n){const m=Ye(n,!1,!0);if(m){const p=["iconify"],k=["provider","prefix"];for(const P of k)m[P]&&p.push("iconify--"+m[P]);a.className=p.join(" ")}}for(let m in t){const p=t[m];if(p!==void 0)switch(m){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":a.ref=p;break;case"className":a[m]=(a[m]?a[m]+" ":"")+p;break;case"inline":case"hFlip":case"vFlip":o[m]=p===!0||p==="true"||p===1;break;case"flip":typeof p=="string"&&Wi(o,p);break;case"color":i.color=p;break;case"rotate":typeof p=="string"?o[m]=Ui(p):typeof p=="number"&&(o[m]=p);break;case"ariaHidden":case"aria-hidden":p!==!0&&p!=="true"&&delete a["aria-hidden"];break;default:r[m]===void 0&&(a[m]=p)}}const l=di(e,o),d=l.attributes;if(o.inline&&(i.verticalAlign="-0.125em"),s==="svg"){a.style={...i,...c},Object.assign(a,d);let m=0,p=t.id;return typeof p=="string"&&(p=p.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Qi(_i(l.body,p?()=>p+"ID"+m++:"iconifyReact"))},H("svg",a)}const{body:u,width:h,height:f}=e,v=s==="mask"||(s==="bg"?!1:u.indexOf("currentColor")!==-1),C=Fi(u,{...d,width:h+"",height:f+""});return a.style={...i,"--svg":Hi(C),width:Rn(d.width),height:Rn(d.height),...Zi,...v?St:Tr,...c},H("span",a)};Ir(!0);gi("",Si);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!oi(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;mi(n,o)||console.error(r)}catch{console.error(r)}}}}function Lr(e){const[t,n]=q(!!e.ssr),[r,o]=q({});function s(f){if(f){const v=e.icon;if(typeof v=="object")return{name:"",data:v};const C=kn(v);if(C)return{name:v,data:C}}return{name:""}}const[i,c]=q(s(!!e.ssr));function a(){const f=r.callback;f&&(f(),o({}))}function l(f){if(JSON.stringify(i)!==JSON.stringify(f))return a(),c(f),!0}function d(){var f;const v=e.icon;if(typeof v=="object"){l({name:"",data:v});return}const C=kn(v);if(l({name:v,data:C}))if(C===void 0){const m=Oi([v],d);o({callback:m})}else C&&((f=e.onLoad)===null||f===void 0||f.call(e,v))}Z(()=>(n(!0),a),[]),Z(()=>{t&&d()},[e.icon,t]);const{name:u,data:h}=i;return h?Yi({...Ot,...h},e,u):e.children?e.children:H("span",{})}const ze=Ze((e,t)=>Lr({...e,_ref:t}));Ze((e,t)=>Lr({inline:!0,...e,_ref:t}));const Bi=()=>{const[e,t]=q(""),[n,r]=q([]),[o,s]=q([]),[i,c]=q(!1),[a,l]=q("nostr"),[d,u]=q(!1),h=Ce(null),f=Ce(null),v=Ce(null);Z(()=>{const b=A=>{f.current&&!f.current.contains(A.target)&&v.current&&!v.current.contains(A.target)&&u(!1)};return d&&setTimeout(()=>{document.addEventListener("mousedown",b)},0),()=>{document.removeEventListener("mousedown",b)}},[d]);const C=b=>b.sort((A,x)=>{const _=/^\d+$/.test(A.nip.replace(/^0+/,"")),I=/^\d+$/.test(x.nip.replace(/^0+/,""));return _&&I?parseInt(A.nip)-parseInt(x.nip):_?-1:I?1:A.nip.localeCompare(x.nip)}),m=async()=>{try{const A=await(await fetch("https://api.github.com/repos/nostr-protocol/nips/contents/README.md")).json(),x=atob(A.content),_=/\- \[NIP-([0-9A-Za-z]+)\: (.*?)\]\(([0-9A-Za-z]+\.md)\)/g,I=[];let S;for(;(S=_.exec(x))!==null;){const g=S[1],O=S[2],D=`https://github.com/nostr-protocol/nips/blob/master/${S[3]}`,G=/^\d+$/.test(g),T=`https://nips.nostr.com/${G?parseInt(g):g}`,$=G?g.padStart(2,"0"):g,U=F=>F.includes("`")?F.split(/(`[^`]+`)/).map((B,Q)=>B.startsWith("`")&&B.endsWith("`")?H("code",{key:Q,className:"bg-gray-100 dark:bg-gray-800 py-1 px-1.5 rounded text-sm"},B.slice(1,-1)):B):F;I.push({nip:$,title:U(O),rawTitle:O,urlGithub:D,urlNostrCom:T,content:`NIP-${$}: ${O}`,kinds:[],tags:[]})}const y=x.match(/## Event Kinds\s+([\s\S]+?)(?=##|$)/);if(y&&y[1]){const g=[],M=y[1].trim().split(`
`).filter(D=>D.trim()!=="");for(let D=2;D<M.length;D++){const R=M[D].split("|").map(T=>T.trim()).filter(T=>T!=="");if(R.length>=3){const T=R[0],$=R[1];let U=[];const F=T.match(/`(\d+)`/g);F&&F.forEach(Te=>{const ge=parseInt(Te.replace(/`/g,""));isNaN(ge)||U.push(ge)});const Y=T.match(/`(\d+)`\s*-\s*`(\d+)`/);if(Y&&Y[1]&&Y[2]){const Te=parseInt(Y[1]),ge=parseInt(Y[2]);if(!isNaN(Te)&&!isNaN(ge))for(let Xe=Te;Xe<=ge;Xe++)U.push(Xe)}let B=R[2],Q=[];const Be=/\[([0-9A-Za-z]+)\]\([0-9A-Za-z]+\.md\)/g;let _e;for(;(_e=Be.exec(B))!==null;)Q.push(_e[1]);const Dr=/([0-9A-Za-z]+)\s+\(deprecated\)/g;let Ut;for(;(Ut=Dr.exec(B))!==null;)Q.push(Ut[1]);U.length>0&&Q.length>0&&g.push([U,$,Q])}}g.forEach(D=>{const G=D[0];D[2].forEach(T=>{const $=I.find(U=>U.nip===T||T.startsWith("0")&&U.nip===T.replace(/^0+/,""));$&&($.kinds=[...$.kinds,...G],$.kinds=[...new Set($.kinds)])})})}const w=x.match(/## Standardized Tags\s+([\s\S]+?)(?=##|$)/);if(w&&w[1]){const g=[],M=w[1].trim().split(`
`).filter(D=>D.trim()!=="");for(let D=2;D<M.length;D++){const R=M[D].split("|").map(T=>T.trim()).filter(T=>T!=="");if(R.length>=3){const T=R[0],$=R[1],U=R[2];let F=!1;const Y=T.match(/`(.*?)`/g);Y&&(F=Y[0].replace(/`/g,""));let B=R[3],Q=[];const Be=/\[([0-9A-Za-z]+)\]\([0-9A-Za-z]+\.md\)/g;let _e;for(;(_e=Be.exec(B))!==null;)Q.push(_e[1]);F.length>0&&Q.length>0&&g.push([F,$,U,Q])}}console.log("tagTableRows",g),g.forEach(D=>{const G=D[0];D[3].forEach(T=>{const $=I.find(U=>U.nip===T||T.startsWith("0")&&U.nip===T.replace(/^0+/,""));$&&($.tags=[...$.tags,G],$.tags=[...new Set($.tags)])})})}return C(I)}catch(b){return console.error("Error fetching NIPs:",b),[]}},p=b=>{if(!b)return n;const x=b.toLowerCase().match(/k=(\d+)/),I=b.match(/t=([a-zA-Z0-9_-]+)/);let S=n.filter(y=>{x&&y.kinds&&y.kinds.includes(parseInt(x[1]))&&console.log("kindMatch",x,y);const w=I&&y.tags&&y.tags.includes(I[1]);return w&&console.log("tagMatch",I,y),y.rawTitle.toLowerCase().includes(b.toLowerCase())||y.nip.toLowerCase().includes(b.toLowerCase())||y.content.toLowerCase().includes(b.toLowerCase())||x&&y.kinds&&y.kinds.includes(parseInt(x[1]))||w});return C(S)};Z(()=>{s(p(e))},[e,n]),Z(()=>{(async()=>{c(!0);try{const A=await m();r(A),s(A);try{const x=await rt.retrieveAll({fields:["data","search_text"]});if(x.length>0&&x[0].data){const _=JSON.parse(x[0].data)||"nostr";l(_)}}catch(x){console.error("Failed to load preferences:",x)}}catch(A){console.error("Failed to load NIPs:",A)}finally{c(!1)}})()},[]);const k=b=>{const A=a==="nostr"?b.urlNostrCom:b.urlGithub;lo.url(A)},P=async b=>{await rt.deleteAll(),await rt.add({data:JSON.stringify(b),dataType:"preference",searchText:"open_with"}),l(b)};return Z(()=>{nn.registerDragRegion(),nn.showMoveButton({bottom:.2,left:.2})},[]),console.log("searchTerm",e),console.log("filteredNips",o),L(ws,{storageKey:"kk-ui-theme",children:L(Ks,{children:L("main",{className:"h-screen flex flex-col",children:[L(yr,{autoFocus:!0,ref:h,type:"text",placeholder:"Number, Title, k(ind)=x, t(ag)=x …",value:e,onChange:b=>t(b.target.value),style:{height:"3.25rem",paddingLeft:"3.25rem"},className:"w-full rounded-none border-l-0 border-r-0 border-t-0 focus:outline-none focus:ring-0"}),L("div",{className:"flex-1 overflow-y-auto",children:[o.length>0&&L("div",{className:"px-4 pt-4 text-xs flex justify-between items-center",children:[L("p",{children:["Nostr Implementation Possibilities (",o.length,")"]}),L("div",{ref:v,role:"button",tabIndex:0,"aria-label":d?"Close settings":"Open settings","aria-expanded":d,className:`p-1.5 rounded-full cursor-pointer ${d?"text-blue-500 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30":"hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,onClick:b=>{b.stopPropagation(),u(!d)},onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),u(!d))},children:L(ze,{icon:d?"mage:settings-fill":"carbon:settings",width:"16",height:"16"})})]}),d&&L("div",{ref:f,className:"mx-2 mt-3 p-3 bg-gray-100 dark:bg-gray-800 rounded-md border border-gray-200 dark:border-gray-700 shadow-md",onClick:b=>{b.stopPropagation()},children:[L("div",{className:"flex justify-between items-center mb-2",children:[L("p",{className:"text-xs font-medium",children:"Open links with:"}),L("div",{className:"cursor-pointer p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",onClick:()=>u(!1),children:L(ze,{icon:"mdi:close",width:"14",height:"14"})})]}),L("div",{className:"space-y-2",children:[L("label",{className:"flex items-center",children:[L("input",{type:"radio",name:"linkPreference",value:"nostr",checked:a==="nostr",onChange:b=>{b.stopPropagation(),P("nostr")},onClick:b=>b.stopPropagation(),className:"mr-2"}),L("span",{className:"text-sm",children:"Nostr.com"})]}),L("label",{className:"flex items-center",children:[L("input",{type:"radio",name:"linkPreference",value:"github",checked:a==="github",onChange:b=>{b.stopPropagation(),P("github")},onClick:b=>b.stopPropagation(),className:"mr-2"}),L("span",{className:"text-sm",children:"GitHub.com"})]})]})]}),i&&L("div",{className:"px-2 py-10 text-center text-lg",children:"Loading..."}),o.length>0&&L("ul",{className:"px-2 pt-2 pb-10 cursor-pointer",children:o.map(b=>L("li",{className:"flex justify-between items-center p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded",onClick:()=>k(b),children:[L("div",{className:"flex-shrink-0 pr-2",children:a==="nostr"?L(ze,{icon:"game-icons:ostrich",width:"20",height:"20"}):L(ze,{icon:"mdi:github",width:"20",height:"20"})}),L("span",{className:"flex-1 overflow-hidden whitespace-nowrap text-ellipsis mr-2",children:[L("strong",{className:"pr-1",children:["NIP-",b.nip]})," ",b.title]})]},b.nip))}),o.length===0&&!i&&L("div",{className:"px-2 py-10 text-center text-lg",children:"No results found 🥲"})]})]})})})};ue(L(Bi,{}),document.getElementById("root"));