diff --git a/assets/index-7fcd2a4c.js b/assets/index-0c0fcb4b.js similarity index 69% rename from assets/index-7fcd2a4c.js rename to assets/index-0c0fcb4b.js index af155b3..f57233c 100644 --- a/assets/index-7fcd2a4c.js +++ b/assets/index-0c0fcb4b.js @@ -1,4 +1,4 @@ -function av(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function ol(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jd={exports:{}},sl={},Zd={exports:{}},ee={};/** +function av(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jd={exports:{}},ol={},Zd={exports:{}},ee={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function av(e,t){for(var n=0;n>>1,_e=L[Y];if(0>>1;Yi(ct,V))ft<_e&&0>i(Kt,ct)?(L[Y]=Kt,L[ft]=V,Y=ft):(L[Y]=ct,L[ie]=V,Y=ie);else if(ft<_e&&0>i(Kt,V))L[Y]=Kt,L[ft]=V,Y=ft;else break e}}return F}function i(L,F){var V=L.sortIndex-F.sortIndex;return V!==0?V:L.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,h=null,d=3,g=!1,y=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(L){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=L)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function v(L){if(S=!1,_(L),!y)if(n(a)!==null)y=!0,at(R);else{var F=n(u);F!==null&&ut(v,F.startTime-L)}}function R(L,F){y=!1,S&&(S=!1,m(O),O=-1),g=!0;var V=d;try{for(_(F),h=n(a);h!==null&&(!(h.expirationTime>F)||L&&!he());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,d=h.priorityLevel;var _e=Y(h.expirationTime<=F);F=e.unstable_now(),typeof _e=="function"?h.callback=_e:h===n(a)&&r(a),_(F)}else r(a);h=n(a)}if(h!==null)var le=!0;else{var ie=n(u);ie!==null&&ut(v,ie.startTime-F),le=!1}return le}finally{h=null,d=V,g=!1}}var D=!1,T=null,O=-1,j=5,q=-1;function he(){return!(e.unstable_now()-qL||125Y?(L.sortIndex=V,t(u,L),n(a)===null&&L===n(u)&&(S?(m(O),O=-1):S=!0,ut(v,V-Y))):(L.sortIndex=_e,t(a,L),y||g||(y=!0,at(R))),L},e.unstable_shouldYield=he,e.unstable_wrapCallback=function(L){var F=d;return function(){var V=d;d=F;try{return L.apply(this,arguments)}finally{d=V}}}})(fh);ch.exports=fh;var Nv=ch.exports;/** + */(function(e){function t(L,F){var V=L.length;L.push(F);e:for(;0>>1,_e=L[Y];if(0>>1;Yi(ct,V))ft<_e&&0>i(Kt,ct)?(L[Y]=Kt,L[ft]=V,Y=ft):(L[Y]=ct,L[ie]=V,Y=ie);else if(ft<_e&&0>i(Kt,V))L[Y]=Kt,L[ft]=V,Y=ft;else break e}}return F}function i(L,F){var V=L.sortIndex-F.sortIndex;return V!==0?V:L.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,h=null,d=3,g=!1,y=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(L){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=L)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function v(L){if(w=!1,_(L),!y)if(n(a)!==null)y=!0,at(R);else{var F=n(u);F!==null&&ut(v,F.startTime-L)}}function R(L,F){y=!1,w&&(w=!1,m(P),P=-1),g=!0;var V=d;try{for(_(F),h=n(a);h!==null&&(!(h.expirationTime>F)||L&&!he());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,d=h.priorityLevel;var _e=Y(h.expirationTime<=F);F=e.unstable_now(),typeof _e=="function"?h.callback=_e:h===n(a)&&r(a),_(F)}else r(a);h=n(a)}if(h!==null)var le=!0;else{var ie=n(u);ie!==null&&ut(v,ie.startTime-F),le=!1}return le}finally{h=null,d=V,g=!1}}var D=!1,T=null,P=-1,b=5,q=-1;function he(){return!(e.unstable_now()-qL||125Y?(L.sortIndex=V,t(u,L),n(a)===null&&L===n(u)&&(w?(m(P),P=-1):w=!0,ut(v,V-Y))):(L.sortIndex=_e,t(a,L),y||g||(y=!0,at(R))),L},e.unstable_shouldYield=he,e.unstable_wrapCallback=function(L){var F=d;return function(){var V=d;d=F;try{return L.apply(this,arguments)}finally{d=V}}}})(fh);ch.exports=fh;var Nv=ch.exports;/** * @license React * react-dom.production.min.js * @@ -30,18 +30,18 @@ function av(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sa=Object.prototype.hasOwnProperty,Av=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gc={},Yc={};function Mv(e){return Sa.call(Yc,e)?!0:Sa.call(Gc,e)?!1:Av.test(e)?Yc[e]=!0:(Gc[e]=!0,!1)}function Iv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lv(e,t,n,r){if(t===null||typeof t>"u"||Iv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var $e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$e[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$e[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$e[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$e[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){$e[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$e[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$e[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$e[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$e[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Du=/[\-:]([a-z])/g;function Nu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Du,Nu);$e[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Du,Nu);$e[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Du,Nu);$e[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$e[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});$e.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$e[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Au(e,t,n,r){var i=$e.hasOwnProperty(t)?$e[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sa=Object.prototype.hasOwnProperty,Av=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gc={},Yc={};function Mv(e){return Sa.call(Yc,e)?!0:Sa.call(Gc,e)?!1:Av.test(e)?Yc[e]=!0:(Gc[e]=!0,!1)}function Iv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lv(e,t,n,r){if(t===null||typeof t>"u"||Iv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var $e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$e[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$e[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$e[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$e[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){$e[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$e[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$e[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$e[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$e[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nu=/[\-:]([a-z])/g;function Au(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nu,Au);$e[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nu,Au);$e[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nu,Au);$e[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$e[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});$e.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$e[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mu(e,t,n,r){var i=$e.hasOwnProperty(t)?$e[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var a=` -`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Fl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hi(e):""}function Uv(e){switch(e.tag){case 5:return Hi(e.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 2:case 15:return e=bl(e.type,!1),e;case 11:return e=bl(e.type.render,!1),e;case 1:return e=bl(e.type,!0),e;default:return""}}function ka(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case Fr:return"Portal";case wa:return"Profiler";case Mu:return"StrictMode";case Ea:return"Suspense";case xa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mh:return(e.displayName||"Context")+".Consumer";case ph:return(e._context.displayName||"Context")+".Provider";case Iu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lu:return t=e.displayName||null,t!==null?t:ka(e.type)||"Memo";case Nn:t=e._payload,e=e._init;try{return ka(e(t))}catch{}}return null}function Fv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ka(t);case 8:return t===Mu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bv(e){var t=gh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qo(e){e._valueTracker||(e._valueTracker=bv(e))}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ca(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _h(e,t){t=t.checked,t!=null&&Au(e,"checked",t,!1)}function Ta(e,t){_h(e,t);var n=Yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ra(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ra(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ra(e,t,n){(t!=="number"||xs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qi=Array.isArray;function Jr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ho.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ao(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jv=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach(function(e){jv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]})});function xh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"}function kh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var zv=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Da(e,t){if(t){if(zv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Na(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Aa=null;function Uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,Zr=null,ei=null;function nf(e){if(e=Mo(e)){if(typeof Ma!="function")throw Error(M(280));var t=e.stateNode;t&&(t=fl(t),Ma(e.stateNode,e.type,t))}}function Ch(e){Zr?ei?ei.push(e):ei=[e]:Zr=e}function Th(){if(Zr){var e=Zr,t=ei;if(ei=Zr=null,nf(e),t)for(e=0;e>>=0,e===0?32:31-(Xv(e)/Jv|0)|0}var Qo=64,Wo=4194304;function Wi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Wi(l):(o&=s,o!==0&&(r=Wi(o)))}else s=n&~i,s!==0?r=Wi(s):o!==0&&(r=Wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function No(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qt(t),e[t]=n}function ng(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xi),df=String.fromCharCode(32),hf=!1;function Wh(e,t){switch(e){case"keyup":return Dg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Ag(e,t){switch(e){case"compositionend":return Vh(t);case"keypress":return t.which!==32?null:(hf=!0,df);case"textInput":return e=t.data,e===df&&hf?null:e;default:return null}}function Mg(e,t){if(jr)return e==="compositionend"||!Hu&&Wh(e,t)?(e=Hh(),fs=Bu=Un=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gf(n)}}function Xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(){for(var e=window,t=xs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xs(e.document)}return t}function Qu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $g(e){var t=Jh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xh(n.ownerDocument.documentElement,n)){if(r!==null&&Qu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=yf(n,o);var s=yf(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zr=null,ja=null,Zi=null,za=!1;function _f(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;za||zr==null||zr!==xs(r)||(r=zr,"selectionStart"in r&&Qu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zi&&mo(Zi,r)||(Zi=r,r=Ds(ja,"onSelect"),0qr||(e.current=Wa[qr],Wa[qr]=null,qr--)}function de(e,t){qr++,Wa[qr]=e.current,e.current=t}var Xn={},Ke=tr(Xn),ot=tr(!1),wr=Xn;function ai(e,t){var n=e.type.contextTypes;if(!n)return Xn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function st(e){return e=e.childContextTypes,e!=null}function As(){me(ot),me(Ke)}function Tf(e,t,n){if(Ke.current!==Xn)throw Error(M(168));de(Ke,t),de(ot,n)}function lp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(M(108,Fv(e)||"Unknown",i));return ke({},n,r)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xn,wr=Ke.current,de(Ke,e),de(ot,ot.current),!0}function Rf(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=lp(e,t,wr),r.__reactInternalMemoizedMergedChildContext=e,me(ot),me(Ke),de(Ke,e)):me(ot),de(ot,n)}var dn=null,dl=!1,Jl=!1;function ap(e){dn===null?dn=[e]:dn.push(e)}function ey(e){dl=!0,ap(e)}function nr(){if(!Jl&&dn!==null){Jl=!0;var e=0,t=se;try{var n=dn;for(se=1;e>=s,i-=s,hn=1<<32-qt(t)+i|n<O?(j=T,T=null):j=T.sibling;var q=d(m,T,_[O],v);if(q===null){T===null&&(T=j);break}e&&T&&q.alternate===null&&t(m,T),p=o(q,p,O),D===null?R=q:D.sibling=q,D=q,T=j}if(O===_.length)return n(m,T),ye&&dr(m,O),R;if(T===null){for(;O<_.length;O++)T=h(m,_[O],v),T!==null&&(p=o(T,p,O),D===null?R=T:D.sibling=T,D=T);return ye&&dr(m,O),R}for(T=r(m,T);O<_.length;O++)j=g(T,m,O,_[O],v),j!==null&&(e&&j.alternate!==null&&T.delete(j.key===null?O:j.key),p=o(j,p,O),D===null?R=j:D.sibling=j,D=j);return e&&T.forEach(function(he){return t(m,he)}),ye&&dr(m,O),R}function S(m,p,_,v){var R=Di(_);if(typeof R!="function")throw Error(M(150));if(_=R.call(_),_==null)throw Error(M(151));for(var D=R=null,T=p,O=p=0,j=null,q=_.next();T!==null&&!q.done;O++,q=_.next()){T.index>O?(j=T,T=null):j=T.sibling;var he=d(m,T,q.value,v);if(he===null){T===null&&(T=j);break}e&&T&&he.alternate===null&&t(m,T),p=o(he,p,O),D===null?R=he:D.sibling=he,D=he,T=j}if(q.done)return n(m,T),ye&&dr(m,O),R;if(T===null){for(;!q.done;O++,q=_.next())q=h(m,q.value,v),q!==null&&(p=o(q,p,O),D===null?R=q:D.sibling=q,D=q);return ye&&dr(m,O),R}for(T=r(m,T);!q.done;O++,q=_.next())q=g(T,m,O,q.value,v),q!==null&&(e&&q.alternate!==null&&T.delete(q.key===null?O:q.key),p=o(q,p,O),D===null?R=q:D.sibling=q,D=q);return e&&T.forEach(function(ne){return t(m,ne)}),ye&&dr(m,O),R}function E(m,p,_,v){if(typeof _=="object"&&_!==null&&_.type===br&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case $o:e:{for(var R=_.key,D=p;D!==null;){if(D.key===R){if(R=_.type,R===br){if(D.tag===7){n(m,D.sibling),p=i(D,_.props.children),p.return=m,m=p;break e}}else if(D.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Nn&&If(R)===D.type){n(m,D.sibling),p=i(D,_.props),p.ref=Li(m,D,_),p.return=m,m=p;break e}n(m,D);break}else t(m,D);D=D.sibling}_.type===br?(p=Sr(_.props.children,m.mode,v,_.key),p.return=m,m=p):(v=_s(_.type,_.key,_.props,null,m.mode,v),v.ref=Li(m,p,_),v.return=m,m=v)}return s(m);case Fr:e:{for(D=_.key;p!==null;){if(p.key===D)if(p.tag===4&&p.stateNode.containerInfo===_.containerInfo&&p.stateNode.implementation===_.implementation){n(m,p.sibling),p=i(p,_.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=sa(_,m.mode,v),p.return=m,m=p}return s(m);case Nn:return D=_._init,E(m,p,D(_._payload),v)}if(Qi(_))return y(m,p,_,v);if(Di(_))return S(m,p,_,v);Zo(m,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,_),p.return=m,m=p):(n(m,p),p=oa(_,m.mode,v),p.return=m,m=p),s(m)):n(m,p)}return E}var ci=vp(!0),gp=vp(!1),Io={},rn=tr(Io),_o=tr(Io),So=tr(Io);function vr(e){if(e===Io)throw Error(M(174));return e}function ec(e,t){switch(de(So,t),de(_o,e),de(rn,Io),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Oa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Oa(t,e)}me(rn),de(rn,t)}function fi(){me(rn),me(_o),me(So)}function yp(e){vr(So.current);var t=vr(rn.current),n=Oa(t,e.type);t!==n&&(de(_o,e),de(rn,n))}function tc(e){_o.current===e&&(me(rn),me(_o))}var we=tr(0);function js(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zl=[];function nc(){for(var e=0;en?n:4,e(!0);var r=ea.transition;ea.transition={};try{e(!1),t()}finally{se=n,ea.transition=r}}function Ip(){return Nt().memoizedState}function iy(e,t,n){var r=Wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lp(e))Up(t,n);else if(n=dp(e,t,n,r),n!==null){var i=Xe();Ht(n,e,r,i),Fp(n,t,r)}}function oy(e,t,n){var r=Wn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lp(e))Up(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Qt(l,s)){var a=t.interleaved;a===null?(i.next=i,Ju(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=dp(e,t,i,r),n!==null&&(i=Xe(),Ht(n,e,r,i),Fp(n,t,r))}}function Lp(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Up(e,t){eo=zs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bu(e,n)}}var Bs={readContext:Dt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},sy={readContext:Dt,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Uf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ms(4194308,4,Op.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return ms(4,2,e,t)},useMemo:function(e,t){var n=Zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iy.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:lc,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=ry.bind(null,e[1]),Zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,i=Zt();if(ye){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),je===null)throw Error(M(349));xr&30||wp(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Uf(xp.bind(null,r,o,e),[e]),r.flags|=2048,xo(9,Ep.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Zt(),t=je.identifierPrefix;if(ye){var n=pn,r=hn;n=(r&~(1<<32-qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wo++,0")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Fl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hi(e):""}function Uv(e){switch(e.tag){case 5:return Hi(e.type);case 16:return Hi("Lazy");case 13:return Hi("Suspense");case 19:return Hi("SuspenseList");case 0:case 2:case 15:return e=jl(e.type,!1),e;case 11:return e=jl(e.type.render,!1),e;case 1:return e=jl(e.type,!0),e;default:return""}}function ka(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case jr:return"Fragment";case Fr:return"Portal";case wa:return"Profiler";case Iu:return"StrictMode";case Ea:return"Suspense";case xa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mh:return(e.displayName||"Context")+".Consumer";case ph:return(e._context.displayName||"Context")+".Provider";case Lu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uu:return t=e.displayName||null,t!==null?t:ka(e.type)||"Memo";case Nn:t=e._payload,e=e._init;try{return ka(e(t))}catch{}}return null}function Fv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ka(t);case 8:return t===Iu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jv(e){var t=gh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qo(e){e._valueTracker||(e._valueTracker=jv(e))}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ca(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _h(e,t){t=t.checked,t!=null&&Mu(e,"checked",t,!1)}function Ta(e,t){_h(e,t);var n=Yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ra(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ra(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ra(e,t,n){(t!=="number"||xs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qi=Array.isArray;function Jr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ho.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ao(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bv=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach(function(e){bv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]})});function xh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"}function kh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=xh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var zv=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Da(e,t){if(t){if(zv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Na(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Aa=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,Zr=null,ei=null;function nf(e){if(e=Mo(e)){if(typeof Ma!="function")throw Error(M(280));var t=e.stateNode;t&&(t=cl(t),Ma(e.stateNode,e.type,t))}}function Ch(e){Zr?ei?ei.push(e):ei=[e]:Zr=e}function Th(){if(Zr){var e=Zr,t=ei;if(ei=Zr=null,nf(e),t)for(e=0;e>>=0,e===0?32:31-(Xv(e)/Jv|0)|0}var Qo=64,Wo=4194304;function Wi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Wi(l):(o&=s,o!==0&&(r=Wi(o)))}else s=n&~i,s!==0?r=Wi(s):o!==0&&(r=Wi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function No(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qt(t),e[t]=n}function ng(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xi),df=String.fromCharCode(32),hf=!1;function Wh(e,t){switch(e){case"keyup":return Dg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var br=!1;function Ag(e,t){switch(e){case"compositionend":return Vh(t);case"keypress":return t.which!==32?null:(hf=!0,df);case"textInput":return e=t.data,e===df&&hf?null:e;default:return null}}function Mg(e,t){if(br)return e==="compositionend"||!Qu&&Wh(e,t)?(e=Hh(),fs=$u=Un=null,br=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gf(n)}}function Xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(){for(var e=window,t=xs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xs(e.document)}return t}function Wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $g(e){var t=Jh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xh(n.ownerDocument.documentElement,n)){if(r!==null&&Wu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=yf(n,o);var s=yf(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zr=null,ba=null,Zi=null,za=!1;function _f(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;za||zr==null||zr!==xs(r)||(r=zr,"selectionStart"in r&&Wu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zi&&mo(Zi,r)||(Zi=r,r=Ds(ba,"onSelect"),0qr||(e.current=Wa[qr],Wa[qr]=null,qr--)}function de(e,t){qr++,Wa[qr]=e.current,e.current=t}var Xn={},Ke=tr(Xn),ot=tr(!1),wr=Xn;function ai(e,t){var n=e.type.contextTypes;if(!n)return Xn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function st(e){return e=e.childContextTypes,e!=null}function As(){me(ot),me(Ke)}function Tf(e,t,n){if(Ke.current!==Xn)throw Error(M(168));de(Ke,t),de(ot,n)}function lp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(M(108,Fv(e)||"Unknown",i));return ke({},n,r)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xn,wr=Ke.current,de(Ke,e),de(ot,ot.current),!0}function Rf(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=lp(e,t,wr),r.__reactInternalMemoizedMergedChildContext=e,me(ot),me(Ke),de(Ke,e)):me(ot),de(ot,n)}var dn=null,fl=!1,Jl=!1;function ap(e){dn===null?dn=[e]:dn.push(e)}function ey(e){fl=!0,ap(e)}function nr(){if(!Jl&&dn!==null){Jl=!0;var e=0,t=se;try{var n=dn;for(se=1;e>=s,i-=s,hn=1<<32-qt(t)+i|n<P?(b=T,T=null):b=T.sibling;var q=d(m,T,_[P],v);if(q===null){T===null&&(T=b);break}e&&T&&q.alternate===null&&t(m,T),p=o(q,p,P),D===null?R=q:D.sibling=q,D=q,T=b}if(P===_.length)return n(m,T),ye&&dr(m,P),R;if(T===null){for(;P<_.length;P++)T=h(m,_[P],v),T!==null&&(p=o(T,p,P),D===null?R=T:D.sibling=T,D=T);return ye&&dr(m,P),R}for(T=r(m,T);P<_.length;P++)b=g(T,m,P,_[P],v),b!==null&&(e&&b.alternate!==null&&T.delete(b.key===null?P:b.key),p=o(b,p,P),D===null?R=b:D.sibling=b,D=b);return e&&T.forEach(function(he){return t(m,he)}),ye&&dr(m,P),R}function w(m,p,_,v){var R=Di(_);if(typeof R!="function")throw Error(M(150));if(_=R.call(_),_==null)throw Error(M(151));for(var D=R=null,T=p,P=p=0,b=null,q=_.next();T!==null&&!q.done;P++,q=_.next()){T.index>P?(b=T,T=null):b=T.sibling;var he=d(m,T,q.value,v);if(he===null){T===null&&(T=b);break}e&&T&&he.alternate===null&&t(m,T),p=o(he,p,P),D===null?R=he:D.sibling=he,D=he,T=b}if(q.done)return n(m,T),ye&&dr(m,P),R;if(T===null){for(;!q.done;P++,q=_.next())q=h(m,q.value,v),q!==null&&(p=o(q,p,P),D===null?R=q:D.sibling=q,D=q);return ye&&dr(m,P),R}for(T=r(m,T);!q.done;P++,q=_.next())q=g(T,m,P,q.value,v),q!==null&&(e&&q.alternate!==null&&T.delete(q.key===null?P:q.key),p=o(q,p,P),D===null?R=q:D.sibling=q,D=q);return e&&T.forEach(function(ne){return t(m,ne)}),ye&&dr(m,P),R}function S(m,p,_,v){if(typeof _=="object"&&_!==null&&_.type===jr&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case $o:e:{for(var R=_.key,D=p;D!==null;){if(D.key===R){if(R=_.type,R===jr){if(D.tag===7){n(m,D.sibling),p=i(D,_.props.children),p.return=m,m=p;break e}}else if(D.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Nn&&If(R)===D.type){n(m,D.sibling),p=i(D,_.props),p.ref=Li(m,D,_),p.return=m,m=p;break e}n(m,D);break}else t(m,D);D=D.sibling}_.type===jr?(p=Sr(_.props.children,m.mode,v,_.key),p.return=m,m=p):(v=_s(_.type,_.key,_.props,null,m.mode,v),v.ref=Li(m,p,_),v.return=m,m=v)}return s(m);case Fr:e:{for(D=_.key;p!==null;){if(p.key===D)if(p.tag===4&&p.stateNode.containerInfo===_.containerInfo&&p.stateNode.implementation===_.implementation){n(m,p.sibling),p=i(p,_.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=sa(_,m.mode,v),p.return=m,m=p}return s(m);case Nn:return D=_._init,S(m,p,D(_._payload),v)}if(Qi(_))return y(m,p,_,v);if(Di(_))return w(m,p,_,v);Zo(m,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,_),p.return=m,m=p):(n(m,p),p=oa(_,m.mode,v),p.return=m,m=p),s(m)):n(m,p)}return S}var ci=vp(!0),gp=vp(!1),Io={},rn=tr(Io),_o=tr(Io),So=tr(Io);function vr(e){if(e===Io)throw Error(M(174));return e}function tc(e,t){switch(de(So,t),de(_o,e),de(rn,Io),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pa(t,e)}me(rn),de(rn,t)}function fi(){me(rn),me(_o),me(So)}function yp(e){vr(So.current);var t=vr(rn.current),n=Pa(t,e.type);t!==n&&(de(_o,e),de(rn,n))}function nc(e){_o.current===e&&(me(rn),me(_o))}var we=tr(0);function bs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zl=[];function rc(){for(var e=0;en?n:4,e(!0);var r=ea.transition;ea.transition={};try{e(!1),t()}finally{se=n,ea.transition=r}}function Ip(){return Nt().memoizedState}function iy(e,t,n){var r=Wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Lp(e))Up(t,n);else if(n=dp(e,t,n,r),n!==null){var i=Xe();Ht(n,e,r,i),Fp(n,t,r)}}function oy(e,t,n){var r=Wn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Lp(e))Up(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Qt(l,s)){var a=t.interleaved;a===null?(i.next=i,Zu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=dp(e,t,i,r),n!==null&&(i=Xe(),Ht(n,e,r,i),Fp(n,t,r))}}function Lp(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Up(e,t){eo=zs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bu(e,n)}}var Bs={readContext:Dt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},sy={readContext:Dt,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Uf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ms(4194308,4,Pp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return ms(4,2,e,t)},useMemo:function(e,t){var n=Zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iy.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:ac,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=ry.bind(null,e[1]),Zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,i=Zt();if(ye){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),be===null)throw Error(M(349));xr&30||wp(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Uf(xp.bind(null,r,o,e),[e]),r.flags|=2048,xo(9,Ep.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Zt(),t=be.identifierPrefix;if(ye){var n=pn,r=hn;n=(r&~(1<<32-qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[tn]=t,e[yo]=r,Wp(e,t,!1,!1),t.stateNode=e;e:{switch(s=Na(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;ihi&&(t.flags|=128,r=!0,Ui(o,!1),t.lanes=4194304)}else{if(!r)if(e=js(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ui(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!ye)return Qe(t),null}else 2*Te()-o.renderingStartTime>hi&&n!==1073741824&&(t.flags|=128,r=!0,Ui(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Te(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return hc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function py(e,t){switch(Vu(t),t.tag){case 1:return st(t.type)&&As(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fi(),me(ot),me(Ke),nc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tc(t),null;case 13:if(me(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(we),null;case 4:return fi(),null;case 10:return Xu(t.type._context),null;case 22:case 23:return hc(),null;case 24:return null;default:return null}}var ts=!1,Ve=!1,my=typeof WeakSet=="function"?WeakSet:Set,b=null;function Vr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function iu(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var Qf=!1;function vy(e,t){if(Ba=Ps,e=Jh(),Qu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,f=0,h=e,d=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(a=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)d=h,h=g;for(;;){if(h===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++f===r&&(a=s),(g=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for($a={focusedElem:e,selectionRange:n},Ps=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var S=y.memoizedProps,E=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:bt(t.type,S),E);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(v){Ce(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return y=Qf,Qf=!1,y}function to(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&iu(t,n,o)}i=i.next}while(i!==r)}}function ml(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tn],delete t[yo],delete t[Qa],delete t[Jg],delete t[Zg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yp(e){return e.tag===5||e.tag===3||e.tag===4}function Wf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function su(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ns));else if(r!==4&&(e=e.child,e!==null))for(su(e,t,n),e=e.sibling;e!==null;)su(e,t,n),e=e.sibling}function lu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(lu(e,t,n),e=e.sibling;e!==null;)lu(e,t,n),e=e.sibling}var ze=null,jt=!1;function Dn(e,t,n){for(n=n.child;n!==null;)Xp(e,t,n),n=n.sibling}function Xp(e,t,n){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(ll,n)}catch{}switch(n.tag){case 5:Ve||Vr(n,t);case 6:var r=ze,i=jt;ze=null,Dn(e,t,n),ze=r,jt=i,ze!==null&&(jt?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(jt?(e=ze,n=n.stateNode,e.nodeType===8?Xl(e.parentNode,n):e.nodeType===1&&Xl(e,n),ho(e)):Xl(ze,n.stateNode));break;case 4:r=ze,i=jt,ze=n.stateNode.containerInfo,jt=!0,Dn(e,t,n),ze=r,jt=i;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&iu(n,t,s),i=i.next}while(i!==r)}Dn(e,t,n);break;case 1:if(!Ve&&(Vr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ce(n,t,l)}Dn(e,t,n);break;case 21:Dn(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,Dn(e,t,n),Ve=r):Dn(e,t,n);break;default:Dn(e,t,n)}}function Vf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new my),t.forEach(function(r){var i=Cy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yy(r/1960))-r,10e?16:e,Fn===null)var r=!1;else{if(e=Fn,Fn=null,Hs=0,re&6)throw Error(M(331));var i=re;for(re|=4,b=e.current;b!==null;){var o=b,s=o.child;if(b.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aTe()-fc?_r(e,0):cc|=n),lt(e,t)}function om(e,t){t===0&&(e.mode&1?(t=Wo,Wo<<=1,!(Wo&130023424)&&(Wo=4194304)):t=1);var n=Xe();e=_n(e,t),e!==null&&(No(e,t,n),lt(e,n))}function ky(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),om(e,n)}function Cy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),om(e,n)}var sm;sm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)it=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return it=!1,dy(e,t,n);it=!!(e.flags&131072)}else it=!1,ye&&t.flags&1048576&&up(t,Ls,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vs(e,t),e=t.pendingProps;var i=ai(t,Ke.current);ni(t,n),i=ic(null,t,r,e,i,n);var o=oc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)?(o=!0,Ms(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zu(t),i.updater=hl,t.stateNode=i,i._reactInternals=t,Xa(t,r,e,n),t=eu(null,t,r,!0,o,n)):(t.tag=0,ye&&o&&Wu(t),Ye(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ry(r),e=bt(r,e),i){case 0:t=Za(null,t,r,e,n);break e;case 1:t=$f(null,t,r,e,n);break e;case 11:t=zf(null,t,r,e,n);break e;case 14:t=Bf(null,t,r,bt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),Za(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),$f(e,t,r,i,n);case 3:e:{if(qp(t),e===null)throw Error(M(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hp(e,t),bs(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=di(Error(M(423)),t),t=qf(e,t,r,n,i);break e}else if(r!==i){i=di(Error(M(424)),t),t=qf(e,t,r,n,i);break e}else for(mt=qn(t.stateNode.containerInfo.firstChild),vt=t,ye=!0,Bt=null,n=gp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ui(),r===i){t=Sn(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return yp(t),e===null&&Ka(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,qa(r,i)?s=null:o!==null&&qa(r,o)&&(t.flags|=32),$p(e,t),Ye(e,t,s,n),t.child;case 6:return e===null&&Ka(t),null;case 13:return Hp(e,t,n);case 4:return ec(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ci(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),zf(e,t,r,i,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,de(Us,r._currentValue),r._currentValue=s,o!==null)if(Qt(o.value,s)){if(o.children===i.children&&!ot.current){t=Sn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=mn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ga(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(M(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ga(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ye(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ni(t,n),i=Dt(i),r=r(i),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,i=bt(r,t.pendingProps),i=bt(r.type,i),Bf(e,t,r,i,n);case 15:return zp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),vs(e,t),t.tag=1,st(r)?(e=!0,Ms(t)):e=!1,ni(t,n),mp(t,r,i),Xa(t,r,i,n),eu(null,t,r,!0,e,n);case 19:return Qp(e,t,n);case 22:return Bp(e,t,n)}throw Error(M(156,t.tag))};function lm(e,t){return Mh(e,t)}function Ty(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,n,r){return new Ty(e,t,n,r)}function mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ry(e){if(typeof e=="function")return mc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Iu)return 11;if(e===Lu)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=Pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _s(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")mc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case br:return Sr(n.children,i,o,t);case Mu:s=8,i|=8;break;case wa:return e=Pt(12,n,t,i|2),e.elementType=wa,e.lanes=o,e;case Ea:return e=Pt(13,n,t,i),e.elementType=Ea,e.lanes=o,e;case xa:return e=Pt(19,n,t,i),e.elementType=xa,e.lanes=o,e;case vh:return gl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ph:s=10;break e;case mh:s=9;break e;case Iu:s=11;break e;case Lu:s=14;break e;case Nn:s=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=Pt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Sr(e,t,n,r){return e=Pt(7,e,r,t),e.lanes=n,e}function gl(e,t,n,r){return e=Pt(22,e,r,t),e.elementType=vh,e.lanes=n,e.stateNode={isHidden:!1},e}function oa(e,t,n){return e=Pt(6,e,null,t),e.lanes=n,e}function sa(e,t,n){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Py(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vc(e,t,n,r,i,o,s,l,a){return e=new Py(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Pt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zu(o),e}function Oy(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fm)}catch(e){console.error(e)}}fm(),uh.exports=yt;var Iy=uh.exports,td=Iy;_a.createRoot=td.createRoot,_a.hydrateRoot=td.hydrateRoot;var dm={exports:{}};/*! +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function ra(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ja(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uy=typeof WeakMap=="function"?WeakMap:Map;function jp(e,t,n){n=mn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qs||(qs=!0,au=r),Ja(e,t)},n}function bp(e,t,n){n=mn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ja(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ja(e,t),typeof r!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ff(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uy;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=xy.bind(null,e,t,n),t.then(e,e))}function jf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mn(-1,1),t.tag=2,Hn(n,t,1))),n.lanes|=1),e)}var cy=En.ReactCurrentOwner,it=!1;function Ye(e,t,n,r){t.child=e===null?gp(t,null,n,r):ci(t,e.child,n,r)}function zf(e,t,n,r,i){n=n.render;var o=t.ref;return ni(t,i),r=oc(e,t,n,r,o,i),n=sc(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sn(e,t,i)):(ye&&n&&Vu(t),t.flags|=1,Ye(e,t,r,i),t.child)}function Bf(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!vc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,zp(e,t,o,r,i)):(e=_s(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:mo,n(s,r)&&e.ref===t.ref)return Sn(e,t,i)}return t.flags|=1,e=Vn(o,r),e.ref=t.ref,e.return=t,t.child=e}function zp(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(mo(o,r)&&e.ref===t.ref)if(it=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(it=!0);else return t.lanes=e.lanes,Sn(e,t,i)}return Za(e,t,n,r,i)}function Bp(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(Kr,pt),pt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(Kr,pt),pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,de(Kr,pt),pt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,de(Kr,pt),pt|=r;return Ye(e,t,i,n),t.child}function $p(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Za(e,t,n,r,i){var o=st(n)?wr:Ke.current;return o=ai(t,o),ni(t,i),n=oc(e,t,n,r,o,i),r=sc(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sn(e,t,i)):(ye&&r&&Vu(t),t.flags|=1,Ye(e,t,n,i),t.child)}function $f(e,t,n,r,i){if(st(n)){var o=!0;Ms(t)}else o=!1;if(ni(t,i),t.stateNode===null)vs(e,t),mp(t,n,r),Xa(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Dt(u):(u=st(n)?wr:Ke.current,u=ai(t,u));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Mf(t,s,r,u),An=!1;var d=t.memoizedState;s.state=d,js(t,r,s,i),a=t.memoizedState,l!==r||d!==a||ot.current||An?(typeof f=="function"&&(Ya(t,n,f,r),a=t.memoizedState),(l=An||Af(t,n,l,r,d,a,u))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,hp(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:jt(t.type,l),s.props=u,h=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Dt(a):(a=st(n)?wr:Ke.current,a=ai(t,a));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==h||d!==a)&&Mf(t,s,r,a),An=!1,d=t.memoizedState,s.state=d,js(t,r,s,i);var y=t.memoizedState;l!==h||d!==y||ot.current||An?(typeof g=="function"&&(Ya(t,n,g,r),y=t.memoizedState),(u=An||Af(t,n,u,r,d,y,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return eu(e,t,n,r,o,i)}function eu(e,t,n,r,i,o){$p(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Rf(t,n,!1),Sn(e,t,o);r=t.stateNode,cy.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ci(t,e.child,null,o),t.child=ci(t,null,l,o)):Ye(e,t,l,o),t.memoizedState=r.state,i&&Rf(t,n,!0),t.child}function qp(e){var t=e.stateNode;t.pendingContext?Tf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Tf(e,t.context,!1),tc(e,t.containerInfo)}function qf(e,t,n,r,i){return ui(),Gu(i),t.flags|=256,Ye(e,t,n,r),t.child}var tu={dehydrated:null,treeContext:null,retryLane:0};function nu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hp(e,t,n){var r=t.pendingProps,i=we.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return Ka(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=vl(s,r,0,null),e=Sr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=nu(n),t.memoizedState=tu,e):uc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return fy(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Vn(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Vn(l,o):(o=Sr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?nu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=tu,r}return o=e.child,e=o.sibling,r=Vn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function uc(e,t){return t=vl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function es(e,t,n,r){return r!==null&&Gu(r),ci(t,e.child,null,n),e=uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fy(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=ra(Error(M(422))),es(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=vl({mode:"visible",children:r.children},i,0,null),o=Sr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ci(t,e.child,null,s),t.child.memoizedState=nu(s),t.memoizedState=tu,o);if(!(t.mode&1))return es(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(M(419)),r=ra(o,r,void 0),es(e,t,s,r)}if(l=(s&e.childLanes)!==0,it||l){if(r=be,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,_n(e,i),Ht(r,e,i,-1))}return mc(),r=ra(Error(M(421))),es(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ky.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,mt=qn(i.nextSibling),vt=t,ye=!0,Bt=null,e!==null&&(Ct[Tt++]=hn,Ct[Tt++]=pn,Ct[Tt++]=Er,hn=e.id,pn=e.overflow,Er=t),t=uc(t,r.children),t.flags|=4096,t)}function Hf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ga(e.return,t,n)}function ia(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Qp(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ye(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hf(e,n,t);else if(e.tag===19)Hf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&bs(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ia(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&bs(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ia(t,!0,n,null,o);break;case"together":ia(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=Vn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dy(e,t,n){switch(t.tag){case 3:qp(t),ui();break;case 5:yp(t);break;case 1:st(t.type)&&Ms(t);break;case 4:tc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(Us,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Hp(e,t,n):(de(we,we.current&1),e=Sn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qp(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Bp(e,t,n)}return Sn(e,t,n)}var Wp,ru,Vp,Kp;Wp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ru=function(){};Vp=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vr(rn.current);var o=null;switch(n){case"input":i=Ca(e,i),r=Ca(e,r),o=[];break;case"select":i=ke({},i,{value:void 0}),r=ke({},r,{value:void 0}),o=[];break;case"textarea":i=Oa(e,i),r=Oa(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ns)}Da(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(lo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(lo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&pe("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Kp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ui(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hy(e,t,n){var r=t.pendingProps;switch(Ku(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return st(t.type)&&As(),Qe(t),null;case 3:return r=t.stateNode,fi(),me(ot),me(Ke),rc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bt!==null&&(fu(Bt),Bt=null))),ru(e,t),Qe(t),null;case 5:nc(t);var i=vr(So.current);if(n=t.type,e!==null&&t.stateNode!=null)Vp(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return Qe(t),null}if(e=vr(rn.current),Jo(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[tn]=t,r[yo]=o,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[tn]=t,e[yo]=r,Wp(e,t,!1,!1),t.stateNode=e;e:{switch(s=Na(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;ihi&&(t.flags|=128,r=!0,Ui(o,!1),t.lanes=4194304)}else{if(!r)if(e=bs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ui(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!ye)return Qe(t),null}else 2*Te()-o.renderingStartTime>hi&&n!==1073741824&&(t.flags|=128,r=!0,Ui(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Te(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return pc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function py(e,t){switch(Ku(t),t.tag){case 1:return st(t.type)&&As(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fi(),me(ot),me(Ke),rc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nc(t),null;case 13:if(me(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(we),null;case 4:return fi(),null;case 10:return Ju(t.type._context),null;case 22:case 23:return pc(),null;case 24:return null;default:return null}}var ts=!1,Ve=!1,my=typeof WeakSet=="function"?WeakSet:Set,j=null;function Vr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function iu(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var Qf=!1;function vy(e,t){if(Ba=Os,e=Jh(),Wu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,f=0,h=e,d=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(l=s+i),h!==o||r!==0&&h.nodeType!==3||(a=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(g=h.firstChild)!==null;)d=h,h=g;for(;;){if(h===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++f===r&&(a=s),(g=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for($a={focusedElem:e,selectionRange:n},Os=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,S=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:jt(t.type,w),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(v){Ce(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return y=Qf,Qf=!1,y}function to(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&iu(t,n,o)}i=i.next}while(i!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tn],delete t[yo],delete t[Qa],delete t[Jg],delete t[Zg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yp(e){return e.tag===5||e.tag===3||e.tag===4}function Wf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function su(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ns));else if(r!==4&&(e=e.child,e!==null))for(su(e,t,n),e=e.sibling;e!==null;)su(e,t,n),e=e.sibling}function lu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(lu(e,t,n),e=e.sibling;e!==null;)lu(e,t,n),e=e.sibling}var ze=null,bt=!1;function Dn(e,t,n){for(n=n.child;n!==null;)Xp(e,t,n),n=n.sibling}function Xp(e,t,n){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(sl,n)}catch{}switch(n.tag){case 5:Ve||Vr(n,t);case 6:var r=ze,i=bt;ze=null,Dn(e,t,n),ze=r,bt=i,ze!==null&&(bt?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(bt?(e=ze,n=n.stateNode,e.nodeType===8?Xl(e.parentNode,n):e.nodeType===1&&Xl(e,n),ho(e)):Xl(ze,n.stateNode));break;case 4:r=ze,i=bt,ze=n.stateNode.containerInfo,bt=!0,Dn(e,t,n),ze=r,bt=i;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&iu(n,t,s),i=i.next}while(i!==r)}Dn(e,t,n);break;case 1:if(!Ve&&(Vr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ce(n,t,l)}Dn(e,t,n);break;case 21:Dn(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,Dn(e,t,n),Ve=r):Dn(e,t,n);break;default:Dn(e,t,n)}}function Vf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new my),t.forEach(function(r){var i=Cy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yy(r/1960))-r,10e?16:e,Fn===null)var r=!1;else{if(e=Fn,Fn=null,Hs=0,re&6)throw Error(M(331));var i=re;for(re|=4,j=e.current;j!==null;){var o=j,s=o.child;if(j.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aTe()-dc?_r(e,0):fc|=n),lt(e,t)}function om(e,t){t===0&&(e.mode&1?(t=Wo,Wo<<=1,!(Wo&130023424)&&(Wo=4194304)):t=1);var n=Xe();e=_n(e,t),e!==null&&(No(e,t,n),lt(e,n))}function ky(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),om(e,n)}function Cy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),om(e,n)}var sm;sm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)it=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return it=!1,dy(e,t,n);it=!!(e.flags&131072)}else it=!1,ye&&t.flags&1048576&&up(t,Ls,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vs(e,t),e=t.pendingProps;var i=ai(t,Ke.current);ni(t,n),i=oc(null,t,r,e,i,n);var o=sc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)?(o=!0,Ms(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ec(t),i.updater=dl,t.stateNode=i,i._reactInternals=t,Xa(t,r,e,n),t=eu(null,t,r,!0,o,n)):(t.tag=0,ye&&o&&Vu(t),Ye(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ry(r),e=jt(r,e),i){case 0:t=Za(null,t,r,e,n);break e;case 1:t=$f(null,t,r,e,n);break e;case 11:t=zf(null,t,r,e,n);break e;case 14:t=Bf(null,t,r,jt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),Za(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),$f(e,t,r,i,n);case 3:e:{if(qp(t),e===null)throw Error(M(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hp(e,t),js(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=di(Error(M(423)),t),t=qf(e,t,r,n,i);break e}else if(r!==i){i=di(Error(M(424)),t),t=qf(e,t,r,n,i);break e}else for(mt=qn(t.stateNode.containerInfo.firstChild),vt=t,ye=!0,Bt=null,n=gp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ui(),r===i){t=Sn(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return yp(t),e===null&&Ka(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,qa(r,i)?s=null:o!==null&&qa(r,o)&&(t.flags|=32),$p(e,t),Ye(e,t,s,n),t.child;case 6:return e===null&&Ka(t),null;case 13:return Hp(e,t,n);case 4:return tc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ci(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),zf(e,t,r,i,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,de(Us,r._currentValue),r._currentValue=s,o!==null)if(Qt(o.value,s)){if(o.children===i.children&&!ot.current){t=Sn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=mn(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ga(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(M(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ga(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ye(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ni(t,n),i=Dt(i),r=r(i),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,i=jt(r,t.pendingProps),i=jt(r.type,i),Bf(e,t,r,i,n);case 15:return zp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jt(r,i),vs(e,t),t.tag=1,st(r)?(e=!0,Ms(t)):e=!1,ni(t,n),mp(t,r,i),Xa(t,r,i,n),eu(null,t,r,!0,e,n);case 19:return Qp(e,t,n);case 22:return Bp(e,t,n)}throw Error(M(156,t.tag))};function lm(e,t){return Mh(e,t)}function Ty(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,n,r){return new Ty(e,t,n,r)}function vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ry(e){if(typeof e=="function")return vc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lu)return 11;if(e===Uu)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=Ot(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _s(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")vc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case jr:return Sr(n.children,i,o,t);case Iu:s=8,i|=8;break;case wa:return e=Ot(12,n,t,i|2),e.elementType=wa,e.lanes=o,e;case Ea:return e=Ot(13,n,t,i),e.elementType=Ea,e.lanes=o,e;case xa:return e=Ot(19,n,t,i),e.elementType=xa,e.lanes=o,e;case vh:return vl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ph:s=10;break e;case mh:s=9;break e;case Lu:s=11;break e;case Uu:s=14;break e;case Nn:s=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=Ot(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Sr(e,t,n,r){return e=Ot(7,e,r,t),e.lanes=n,e}function vl(e,t,n,r){return e=Ot(22,e,r,t),e.elementType=vh,e.lanes=n,e.stateNode={isHidden:!1},e}function oa(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function sa(e,t,n){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Oy(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gc(e,t,n,r,i,o,s,l,a){return e=new Oy(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ot(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ec(o),e}function Py(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fm)}catch(e){console.error(e)}}fm(),uh.exports=yt;var Iy=uh.exports,td=Iy;_a.createRoot=td.createRoot,_a.hydrateRoot=td.hydrateRoot;var dm={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i"u")throw new Error(t)}function Tr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fy(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,n,r){return n===void 0&&(n=null),ge({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?on(t):t,{state:n,key:t&&t.key||r||Fy()})}function Lo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function on(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function by(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=Oe.Pop,a=null,u=f();u==null&&(u=0,s.replaceState(ge({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function h(){l=Oe.Pop;let E=f(),m=E==null?null:E-u;u=E,a&&a({action:l,location:S.location,delta:m})}function d(E,m){l=Oe.Push;let p=Co(S.location,E,m);n&&n(p,E),u=f()+1;let _=rd(p,u),v=S.createHref(p);try{s.pushState(_,"",v)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(v)}o&&a&&a({action:l,location:S.location,delta:1})}function g(E,m){l=Oe.Replace;let p=Co(S.location,E,m);n&&n(p,E),u=f();let _=rd(p,u),v=S.createHref(p);s.replaceState(_,"",v),o&&a&&a({action:l,location:S.location,delta:0})}function y(E){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof E=="string"?E:Lo(E);return Z(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let S={get action(){return l},get location(){return e(i,s)},listen(E){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(nd,h),a=E,()=>{i.removeEventListener(nd,h),a=null}},createHref(E){return t(i,E)},createURL:y,encodeLocation(E){let m=y(E);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:g,go(E){return s.go(E)}};return S}var Ie;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ie||(Ie={}));const jy=new Set(["lazy","caseSensitive","path","id","index","children"]);function zy(e){return e.index===!0}function du(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,o],l=typeof i.id=="string"?i.id:s.join("-");if(Z(i.index!==!0||!i.children,"Cannot specify children on an index route"),Z(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),zy(i)){let a=ge({},i,t(i),{id:l});return r[l]=a,a}else{let a=ge({},i,t(i),{id:l,children:void 0});return r[l]=a,i.children&&(a.children=du(i.children,t,s,r)),a}})}function Gr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?on(t):t,i=Uo(r.pathname||"/",n);if(i==null)return null;let o=hm(e);By(o);let s=null;for(let l=0;s==null&&l{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(Z(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Gn([r,a.relativePath]),f=n.concat(a);o.children&&o.children.length>0&&(Z(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hm(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ky(u,o.index),routesMeta:f})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of pm(o.path))i(o,s,a)}),t}function pm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=pm(r.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function By(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Gy(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const $y=/^:\w+$/,qy=3,Hy=2,Qy=1,Wy=10,Vy=-2,id=e=>e==="*";function Ky(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Vy),t&&(r+=Hy),n.filter(i=>!id(i)).reduce((i,o)=>i+($y.test(o)?qy:o===""?Qy:Wy),r)}function Gy(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Yy(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let d=l[h]||"";s=o.slice(0,o.length-d.length).replace(/(.)\/+$/,"$1")}return u[f]=e_(l[h]||"",f),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Jy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Tr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Zy(e){try{return decodeURI(e)}catch(t){return Tr(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function e_(e,t){try{return decodeURIComponent(e)}catch(n){return Tr(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Uo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function t_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?on(e):e;return{pathname:n?n.startsWith("/")?n:n_(n,t):t,search:i_(r),hash:o_(i)}}function n_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function la(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Sc(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mm(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=on(e):(i=ge({},e),Z(!i.pathname||!i.pathname.includes("?"),la("?","pathname","search",i)),Z(!i.pathname||!i.pathname.includes("#"),la("#","pathname","hash",i)),Z(!i.search||!i.search.includes("#"),la("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(r||s==null)l=n;else{let h=t.length-1;if(s.startsWith("..")){let d=s.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}l=h>=0?t[h]:"/"}let a=t_(i,l),u=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}const Gn=e=>e.join("/").replace(/\/\/+/g,"/"),r_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),i_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,o_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wc{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function vm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gm=["post","put","patch","delete"],s_=new Set(gm),l_=["get",...gm],a_=new Set(l_),u_=new Set([301,302,303,307,308]),c_=new Set([307,308]),aa={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},f_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ym=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,d_=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function h_(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let x=e.detectErrorBoundary;i=C=>({hasErrorBoundary:x(C)})}else i=d_;let o={},s=du(e.routes,i,void 0,o),l,a=e.basename||"/",u=ge({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),f=null,h=new Set,d=null,g=null,y=null,S=e.hydrationData!=null,E=Gr(s,e.history.location,a),m=null;if(E==null){let x=xt(404,{pathname:e.history.location.pathname}),{matches:C,route:N}=dd(s);E=C,m={[N.id]:x}}let p=!E.some(x=>x.route.lazy)&&(!E.some(x=>x.route.loader)||e.hydrationData!=null),_,v={historyAction:e.history.action,location:e.history.location,matches:E,initialized:p,navigation:aa,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},R=Oe.Pop,D=!1,T,O=!1,j=!1,q=[],he=[],ne=new Map,tt=0,kn=-1,Vt=new Map,at=new Set,ut=new Map,L=new Map,F=new Map,V=!1;function Y(){return f=e.history.listen(x=>{let{action:C,location:N,delta:z}=x;if(V){V=!1;return}Tr(F.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let K=Ar({currentLocation:v.location,nextLocation:N,historyAction:C});if(K&&z!=null){V=!0,e.history.go(z*-1),lr(K,{state:"blocked",location:N,proceed(){lr(K,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),e.history.go(z)},reset(){let B=new Map(v.blockers);B.set(K,bi),ie({blockers:B})}});return}return Mt(C,N)}),v.initialized||Mt(Oe.Pop,v.location),_}function _e(){f&&f(),h.clear(),T&&T.abort(),v.fetchers.forEach((x,C)=>Ti(C)),v.blockers.forEach((x,C)=>Ri(C))}function le(x){return h.add(x),()=>h.delete(x)}function ie(x){v=ge({},v,x),h.forEach(C=>C(v))}function ct(x,C){var N,z;let K=v.actionData!=null&&v.navigation.formMethod!=null&&zt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((N=x.state)==null?void 0:N._isRedirect)!==!0,B;C.actionData?Object.keys(C.actionData).length>0?B=C.actionData:B=null:K?B=v.actionData:B=null;let W=C.loaderData?fd(v.loaderData,C.loaderData,C.matches||[],C.errors):v.loaderData,Q=v.blockers;Q.size>0&&(Q=new Map(Q),Q.forEach((oe,te)=>Q.set(te,bi)));let H=D===!0||v.navigation.formMethod!=null&&zt(v.navigation.formMethod)&&((z=x.state)==null?void 0:z._isRedirect)!==!0;l&&(s=l,l=void 0),O||R===Oe.Pop||(R===Oe.Push?e.history.push(x,x.state):R===Oe.Replace&&e.history.replace(x,x.state)),ie(ge({},C,{actionData:B,loaderData:W,historyAction:R,location:x,initialized:!0,navigation:aa,revalidation:"idle",restoreScrollPosition:un(x,C.matches||v.matches),preventScrollReset:H,blockers:Q})),R=Oe.Pop,D=!1,O=!1,j=!1,q=[],he=[]}async function ft(x,C){if(typeof x=="number"){e.history.go(x);return}let N=hu(v.location,v.matches,a,u.v7_prependBasename,x,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:z,submission:K,error:B}=od(u.v7_normalizeFormMethod,!1,N,C),W=v.location,Q=Co(v.location,z,C&&C.state);Q=ge({},Q,e.history.encodeLocation(Q));let H=C&&C.replace!=null?C.replace:void 0,oe=Oe.Push;H===!0?oe=Oe.Replace:H===!1||K!=null&&zt(K.formMethod)&&K.formAction===v.location.pathname+v.location.search&&(oe=Oe.Replace);let te=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,qe=Ar({currentLocation:W,nextLocation:Q,historyAction:oe});if(qe){lr(qe,{state:"blocked",location:Q,proceed(){lr(qe,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),ft(x,C)},reset(){let Re=new Map(v.blockers);Re.set(qe,bi),ie({blockers:Re})}});return}return await Mt(oe,Q,{submission:K,pendingError:B,preventScrollReset:te,replace:C&&C.replace})}function Kt(){if(Nr(),ie({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){Mt(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}Mt(R||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function Mt(x,C,N){T&&T.abort(),T=null,R=x,O=(N&&N.startUninterruptedRevalidation)===!0,It(v.location,v.matches),D=(N&&N.preventScrollReset)===!0;let z=l||s,K=N&&N.overrideNavigation,B=Gr(z,C,a);if(!B){let Re=xt(404,{pathname:C.pathname}),{matches:Ae,route:nt}=dd(z);Mr(),ct(C,{matches:Ae,loaderData:{},errors:{[nt.id]:Re}});return}if(v.initialized&&!j&&y_(v.location,C)&&!(N&&N.submission&&zt(N.submission.formMethod))){ct(C,{matches:B});return}T=new AbortController;let W=zi(e.history,C,T.signal,N&&N.submission),Q,H;if(N&&N.pendingError)H={[Yr(B).route.id]:N.pendingError};else if(N&&N.submission&&zt(N.submission.formMethod)){let Re=await jo(W,C,N.submission,B,{replace:N.replace});if(Re.shortCircuited)return;Q=Re.pendingActionData,H=Re.pendingActionError,K=is(C,N.submission),W=new Request(W.url,{signal:W.signal})}let{shortCircuited:oe,loaderData:te,errors:qe}=await Cn(W,C,B,K,N&&N.submission,N&&N.fetcherSubmission,N&&N.replace,Q,H);oe||(T=null,ct(C,ge({matches:B},Q?{actionData:Q}:{},{loaderData:te,errors:qe})))}async function jo(x,C,N,z,K){K===void 0&&(K={}),Nr();let B=x_(C,N);ie({navigation:B});let W,Q=mu(z,C);if(!Q.route.action&&!Q.route.lazy)W={type:Ie.error,error:xt(405,{method:x.method,pathname:C.pathname,routeId:Q.route.id})};else if(W=await ji("action",x,Q,z,o,i,a),x.signal.aborted)return{shortCircuited:!0};if(ii(W)){let H;return K&&K.replace!=null?H=K.replace:H=W.location===v.location.pathname+v.location.search,await Yt(v,W,{submission:N,replace:H}),{shortCircuited:!0}}if(io(W)){let H=Yr(z,Q.route.id);return(K&&K.replace)!==!0&&(R=Oe.Push),{pendingActionData:{},pendingActionError:{[H.route.id]:W.error}}}if(gr(W))throw xt(400,{type:"defer-action"});return{pendingActionData:{[Q.route.id]:W.data}}}async function Cn(x,C,N,z,K,B,W,Q,H){let oe=z||is(C,K),te=K||B||md(oe),qe=l||s,[Re,Ae]=sd(e.history,v,N,te,C,j,q,he,ut,at,qe,a,Q,H);if(Mr(ce=>!(N&&N.some(Ge=>Ge.route.id===ce))||Re&&Re.some(Ge=>Ge.route.id===ce)),Re.length===0&&Ae.length===0){let ce=ln();return ct(C,ge({matches:N,loaderData:{},errors:H||null},Q?{actionData:Q}:{},ce?{fetchers:new Map(v.fetchers)}:{})),{shortCircuited:!0}}if(!O){Ae.forEach(Ge=>{let cn=v.fetchers.get(Ge.key),Me=Bi(void 0,cn?cn.data:void 0);v.fetchers.set(Ge.key,Me)});let ce=Q||v.actionData;ie(ge({navigation:oe},ce?Object.keys(ce).length===0?{actionData:null}:{actionData:ce}:{},Ae.length>0?{fetchers:new Map(v.fetchers)}:{}))}kn=++tt,Ae.forEach(ce=>{ne.has(ce.key)&&St(ce.key),ce.controller&&ne.set(ce.key,ce.controller)});let nt=()=>Ae.forEach(ce=>St(ce.key));T&&T.signal.addEventListener("abort",nt);let{results:ur,loaderResults:Lt,fetcherResults:Pn}=await or(v.matches,N,Re,Ae,x);if(x.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",nt),Ae.forEach(ce=>ne.delete(ce.key));let wt=hd(ur);if(wt)return await Yt(v,wt,{replace:W}),{shortCircuited:!0};let{loaderData:cr,errors:Oi}=cd(v,N,Re,Lt,H,Ae,Pn,L);L.forEach((ce,Ge)=>{ce.subscribe(cn=>{(cn||ce.done)&&L.delete(Ge)})});let On=ln(),dt=an(kn),fr=On||dt||Ae.length>0;return ge({loaderData:cr,errors:Oi},fr?{fetchers:new Map(v.fetchers)}:{})}function Gt(x){return v.fetchers.get(x)||f_}function ki(x,C,N,z){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ne.has(x)&&St(x);let K=l||s,B=hu(v.location,v.matches,a,u.v7_prependBasename,N,C,z==null?void 0:z.relative),W=Gr(K,B,a);if(!W){sr(x,C,xt(404,{pathname:B}));return}let{path:Q,submission:H,error:oe}=od(u.v7_normalizeFormMethod,!0,B,z);if(oe){sr(x,C,oe);return}let te=mu(W,Q);if(D=(z&&z.preventScrollReset)===!0,H&&zt(H.formMethod)){Ci(x,C,Q,te,W,H);return}ut.set(x,{routeId:C,path:Q}),Tn(x,C,Q,te,W,H)}async function Ci(x,C,N,z,K,B){if(Nr(),ut.delete(x),!z.route.action&&!z.route.lazy){let Me=xt(405,{method:B.formMethod,pathname:N,routeId:C});sr(x,C,Me);return}let W=v.fetchers.get(x),Q=k_(B,W);v.fetchers.set(x,Q),ie({fetchers:new Map(v.fetchers)});let H=new AbortController,oe=zi(e.history,N,H.signal,B);ne.set(x,H);let te=await ji("action",oe,z,K,o,i,a);if(oe.signal.aborted){ne.get(x)===H&&ne.delete(x);return}if(ii(te)){ne.delete(x),at.add(x);let Me=Bi(B);return v.fetchers.set(x,Me),ie({fetchers:new Map(v.fetchers)}),Yt(v,te,{submission:B,isFetchActionRedirect:!0})}if(io(te)){sr(x,C,te.error);return}if(gr(te))throw xt(400,{type:"defer-action"});let qe=v.navigation.location||v.location,Re=zi(e.history,qe,H.signal),Ae=l||s,nt=v.navigation.state!=="idle"?Gr(Ae,v.navigation.location,a):v.matches;Z(nt,"Didn't find any matches after fetcher action");let ur=++tt;Vt.set(x,ur);let Lt=Bi(B,te.data);v.fetchers.set(x,Lt);let[Pn,wt]=sd(e.history,v,nt,B,qe,j,q,he,ut,at,Ae,a,{[z.route.id]:te.data},void 0);wt.filter(Me=>Me.key!==x).forEach(Me=>{let $=Me.key,w=v.fetchers.get($),A=Bi(void 0,w?w.data:void 0);v.fetchers.set($,A),ne.has($)&&St($),Me.controller&&ne.set($,Me.controller)}),ie({fetchers:new Map(v.fetchers)});let cr=()=>wt.forEach(Me=>St(Me.key));H.signal.addEventListener("abort",cr);let{results:Oi,loaderResults:On,fetcherResults:dt}=await or(v.matches,nt,Pn,wt,Re);if(H.signal.aborted)return;H.signal.removeEventListener("abort",cr),Vt.delete(x),ne.delete(x),wt.forEach(Me=>ne.delete(Me.key));let fr=hd(Oi);if(fr)return Yt(v,fr);let{loaderData:ce,errors:Ge}=cd(v,v.matches,Pn,On,void 0,wt,dt,L);if(v.fetchers.has(x)){let Me=Ss(te.data);v.fetchers.set(x,Me)}let cn=an(ur);v.navigation.state==="loading"&&ur>kn?(Z(R,"Expected pending action"),T&&T.abort(),ct(v.navigation.location,{matches:nt,loaderData:ce,errors:Ge,fetchers:new Map(v.fetchers)})):(ie(ge({errors:Ge,loaderData:fd(v.loaderData,ce,nt,Ge)},cn||wt.length>0?{fetchers:new Map(v.fetchers)}:{})),j=!1)}async function Tn(x,C,N,z,K,B){let W=v.fetchers.get(x),Q=Bi(B,W?W.data:void 0);v.fetchers.set(x,Q),ie({fetchers:new Map(v.fetchers)});let H=new AbortController,oe=zi(e.history,N,H.signal);ne.set(x,H);let te=await ji("loader",oe,z,K,o,i,a);if(gr(te)&&(te=await wm(te,oe.signal,!0)||te),ne.get(x)===H&&ne.delete(x),oe.signal.aborted)return;if(ii(te)){at.add(x),await Yt(v,te);return}if(io(te)){let Re=Yr(v.matches,C);v.fetchers.delete(x),ie({fetchers:new Map(v.fetchers),errors:{[Re.route.id]:te.error}});return}Z(!gr(te),"Unhandled fetcher deferred data");let qe=Ss(te.data);v.fetchers.set(x,qe),ie({fetchers:new Map(v.fetchers)})}async function Yt(x,C,N){let{submission:z,replace:K,isFetchActionRedirect:B}=N===void 0?{}:N;C.revalidate&&(j=!0);let W=Co(x.location,C.location,ge({_isRedirect:!0},B?{_isFetchActionRedirect:!0}:{}));if(Z(W,"Expected a location on the redirect navigation"),ym.test(C.location)&&n){let oe=e.history.createURL(C.location),te=Uo(oe.pathname,a)==null;if(t.location.origin!==oe.origin||te){K?t.location.replace(C.location):t.location.assign(C.location);return}}T=null;let Q=K===!0?Oe.Replace:Oe.Push,H=z||md(x.navigation);if(c_.has(C.status)&&H&&zt(H.formMethod))await Mt(Q,W,{submission:ge({},H,{formAction:C.location}),preventScrollReset:D});else if(B)await Mt(Q,W,{overrideNavigation:is(W),fetcherSubmission:H,preventScrollReset:D});else{let oe=is(W,H);await Mt(Q,W,{overrideNavigation:oe,preventScrollReset:D})}}async function or(x,C,N,z,K){let B=await Promise.all([...N.map(H=>ji("loader",K,H,C,o,i,a)),...z.map(H=>H.matches&&H.match&&H.controller?ji("loader",zi(e.history,H.path,H.controller.signal),H.match,H.matches,o,i,a):{type:Ie.error,error:xt(404,{pathname:H.path})})]),W=B.slice(0,N.length),Q=B.slice(N.length);return await Promise.all([pd(x,N,W,W.map(()=>K.signal),!1,v.loaderData),pd(x,z.map(H=>H.match),Q,z.map(H=>H.controller?H.controller.signal:null),!0)]),{results:B,loaderResults:W,fetcherResults:Q}}function Nr(){j=!0,q.push(...Mr()),ut.forEach((x,C)=>{ne.has(C)&&(he.push(C),St(C))})}function sr(x,C,N){let z=Yr(v.matches,C);Ti(x),ie({errors:{[z.route.id]:N},fetchers:new Map(v.fetchers)})}function Ti(x){let C=v.fetchers.get(x);ne.has(x)&&!(C&&C.state==="loading"&&Vt.has(x))&&St(x),ut.delete(x),Vt.delete(x),at.delete(x),v.fetchers.delete(x)}function St(x){let C=ne.get(x);Z(C,"Expected fetch controller: "+x),C.abort(),ne.delete(x)}function Rn(x){for(let C of x){let N=Gt(C),z=Ss(N.data);v.fetchers.set(C,z)}}function ln(){let x=[],C=!1;for(let N of at){let z=v.fetchers.get(N);Z(z,"Expected fetcher: "+N),z.state==="loading"&&(at.delete(N),x.push(N),C=!0)}return Rn(x),C}function an(x){let C=[];for(let[N,z]of Vt)if(z0}function zo(x,C){let N=v.blockers.get(x)||bi;return F.get(x)!==C&&F.set(x,C),N}function Ri(x){v.blockers.delete(x),F.delete(x)}function lr(x,C){let N=v.blockers.get(x)||bi;Z(N.state==="unblocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="proceeding"||N.state==="blocked"&&C.state==="unblocked"||N.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+N.state+" -> "+C.state);let z=new Map(v.blockers);z.set(x,C),ie({blockers:z})}function Ar(x){let{currentLocation:C,nextLocation:N,historyAction:z}=x;if(F.size===0)return;F.size>1&&Tr(!1,"A router only supports one blocker at a time");let K=Array.from(F.entries()),[B,W]=K[K.length-1],Q=v.blockers.get(B);if(!(Q&&Q.state==="proceeding")&&W({currentLocation:C,nextLocation:N,historyAction:z}))return B}function Mr(x){let C=[];return L.forEach((N,z)=>{(!x||x(z))&&(N.cancel(),C.push(z),L.delete(z))}),C}function Ir(x,C,N){if(d=x,y=C,g=N||null,!S&&v.navigation===aa){S=!0;let z=un(v.location,v.matches);z!=null&&ie({restoreScrollPosition:z})}return()=>{d=null,y=null,g=null}}function ar(x,C){return g&&g(x,C.map(z=>E_(z,v.loaderData)))||x.key}function It(x,C){if(d&&y){let N=ar(x,C);d[N]=y()}}function un(x,C){if(d){let N=ar(x,C),z=d[N];if(typeof z=="number")return z}return null}function Pi(x){o={},l=du(x,i,void 0,o)}return _={get basename(){return a},get state(){return v},get routes(){return s},initialize:Y,subscribe:le,enableScrollRestoration:Ir,navigate:ft,fetch:ki,revalidate:Kt,createHref:x=>e.history.createHref(x),encodeLocation:x=>e.history.encodeLocation(x),getFetcher:Gt,deleteFetcher:Ti,dispose:_e,getBlocker:zo,deleteBlocker:Ri,_internalFetchControllers:ne,_internalActiveDeferreds:L,_internalSetRoutes:Pi},_}function p_(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hu(e,t,n,r,i,o,s){let l,a;if(o!=null&&s!=="path"){l=[];for(let f of t)if(l.push(f),f.route.id===o){a=f;break}}else l=t,a=t[t.length-1];let u=mm(i||".",Sc(l).map(f=>f.pathnameBase),Uo(e.pathname,n)||e.pathname,s==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!Ec(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Gn([n,u.pathname])),Lo(u)}function od(e,t,n,r){if(!r||!p_(r))return{path:n};if(r.formMethod&&!w_(r.formMethod))return{path:n,error:xt(405,{method:r.formMethod})};let i=()=>({path:n,error:xt(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),l=Sm(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!zt(s))return i();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,y)=>{let[S,E]=y;return""+g+S+"="+E+` -`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!zt(s))return i();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}Z(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=pu(r.formData),u=r.formData;else if(r.body instanceof FormData)a=pu(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=ud(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=ud(a)}catch{return i()}let f={formMethod:s,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(zt(f.formMethod))return{path:n,submission:f};let h=on(n);return t&&h.search&&Ec(h.search)&&a.append("index",""),h.search="?"+a,{path:Lo(h),submission:f}}function m_(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function sd(e,t,n,r,i,o,s,l,a,u,f,h,d,g){let y=g?Object.values(g)[0]:d?Object.values(d)[0]:void 0,S=e.createURL(t.location),E=e.createURL(i),m=g?Object.keys(g)[0]:void 0,_=m_(n,m).filter((R,D)=>{if(R.route.lazy)return!0;if(R.route.loader==null)return!1;if(v_(t.loaderData,t.matches[D],R)||s.some(j=>j===R.route.id))return!0;let T=t.matches[D],O=R;return ld(R,ge({currentUrl:S,currentParams:T.params,nextUrl:E,nextParams:O.params},r,{actionResult:y,defaultShouldRevalidate:o||S.pathname+S.search===E.pathname+E.search||S.search!==E.search||_m(T,O)}))}),v=[];return a.forEach((R,D)=>{if(!n.some(ne=>ne.route.id===R.routeId))return;let T=Gr(f,R.path,h);if(!T){v.push({key:D,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let O=t.fetchers.get(D),j=O&&O.state!=="idle"&&O.data===void 0&&!u.has(D),q=mu(T,R.path);(l.includes(D)||j||ld(q,ge({currentUrl:S,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})))&&v.push({key:D,routeId:R.routeId,path:R.path,matches:T,match:q,controller:new AbortController})}),[_,v]}function v_(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function _m(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ld(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function ad(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Z(i,"No route found in manifest");let o={};for(let s in r){let a=i[s]!==void 0&&s!=="hasErrorBoundary";Tr(!a,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!a&&!jy.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,ge({},t(i),{lazy:void 0}))}async function ji(e,t,n,r,i,o,s,l){l===void 0&&(l={});let a,u,f,h=y=>{let S,E=new Promise((m,p)=>S=p);return f=()=>S(),t.signal.addEventListener("abort",f),Promise.race([y({request:t,params:n.params,context:l.requestContext}),E])};try{let y=n.route[e];if(n.route.lazy)if(y)u=(await Promise.all([h(y),ad(n.route,o,i)]))[0];else if(await ad(n.route,o,i),y=n.route[e],y)u=await h(y);else if(e==="action"){let S=new URL(t.url),E=S.pathname+S.search;throw xt(405,{method:t.method,pathname:E,routeId:n.route.id})}else return{type:Ie.data,data:void 0};else if(y)u=await h(y);else{let S=new URL(t.url),E=S.pathname+S.search;throw xt(404,{pathname:E})}Z(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){a=Ie.error,u=y}finally{f&&t.signal.removeEventListener("abort",f)}if(S_(u)){let y=u.status;if(u_.has(y)){let m=u.headers.get("Location");if(Z(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!ym.test(m))m=hu(new URL(t.url),r.slice(0,r.indexOf(n)+1),s,!0,m);else if(!l.isStaticRequest){let p=new URL(t.url),_=m.startsWith("//")?new URL(p.protocol+m):new URL(m),v=Uo(_.pathname,s)!=null;_.origin===p.origin&&v&&(m=_.pathname+_.search+_.hash)}if(l.isStaticRequest)throw u.headers.set("Location",m),u;return{type:Ie.redirect,status:y,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:a||Ie.data,response:u};let S,E=u.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?S=await u.json():S=await u.text(),a===Ie.error?{type:a,error:new wc(y,u.statusText,S),headers:u.headers}:{type:Ie.data,data:S,statusCode:u.status,headers:u.headers}}if(a===Ie.error)return{type:a,error:u};if(__(u)){var d,g;return{type:Ie.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:Ie.data,data:u}}function zi(e,t,n,r){let i=e.createURL(Sm(t)).toString(),o={signal:n};if(r&&zt(r.formMethod)){let{formMethod:s,formEncType:l}=r;o.method=s.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=pu(r.formData):o.body=r.formData}return new Request(i,o)}function pu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ud(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function g_(e,t,n,r,i){let o={},s=null,l,a=!1,u={};return n.forEach((f,h)=>{let d=t[h].route.id;if(Z(!ii(f),"Cannot handle redirect results in processLoaderData"),io(f)){let g=Yr(e,d),y=f.error;r&&(y=Object.values(r)[0],r=void 0),s=s||{},s[g.route.id]==null&&(s[g.route.id]=y),o[d]=void 0,a||(a=!0,l=vm(f.error)?f.error.status:500),f.headers&&(u[d]=f.headers)}else gr(f)?(i.set(d,f.deferredData),o[d]=f.deferredData.data):o[d]=f.data,f.statusCode!=null&&f.statusCode!==200&&!a&&(l=f.statusCode),f.headers&&(u[d]=f.headers)}),r&&(s=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:s,statusCode:l||200,loaderHeaders:u}}function cd(e,t,n,r,i,o,s,l){let{loaderData:a,errors:u}=g_(t,n,r,i,l);for(let f=0;fr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function dd(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xt(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",l='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new wc(e||500,s,new Error(l),!0)}function hd(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ii(n))return n}}function Sm(e){let t=typeof e=="string"?on(e):e;return Lo(ge({},t,{hash:""}))}function y_(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function gr(e){return e.type===Ie.deferred}function io(e){return e.type===Ie.error}function ii(e){return(e&&e.type)===Ie.redirect}function __(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function S_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function w_(e){return a_.has(e.toLowerCase())}function zt(e){return s_.has(e.toLowerCase())}async function pd(e,t,n,r,i,o){for(let s=0;sh.route.id===a.route.id),f=u!=null&&!_m(u,a)&&(o&&o[a.route.id])!==void 0;if(gr(l)&&(i||f)){let h=r[s];Z(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await wm(l,h,i).then(d=>{d&&(n[s]=d||n[s])})}}}async function wm(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Ie.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Ie.error,error:i}}return{type:Ie.data,data:e.deferredData.data}}}function Ec(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function E_(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function mu(e,t){let n=typeof t=="string"?on(t).search:t.search;if(e[e.length-1].route.index&&Ec(n||""))return e[e.length-1];let r=Sc(e);return r[r.length-1]}function md(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function is(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function x_(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bi(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function k_(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Ss(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** + */function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Tr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fy(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Co(e,t,n,r){return n===void 0&&(n=null),ge({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?on(t):t,{state:n,key:t&&t.key||r||Fy()})}function Lo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function on(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function jy(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=Pe.Pop,a=null,u=f();u==null&&(u=0,s.replaceState(ge({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function h(){l=Pe.Pop;let S=f(),m=S==null?null:S-u;u=S,a&&a({action:l,location:w.location,delta:m})}function d(S,m){l=Pe.Push;let p=Co(w.location,S,m);n&&n(p,S),u=f()+1;let _=rd(p,u),v=w.createHref(p);try{s.pushState(_,"",v)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(v)}o&&a&&a({action:l,location:w.location,delta:1})}function g(S,m){l=Pe.Replace;let p=Co(w.location,S,m);n&&n(p,S),u=f();let _=rd(p,u),v=w.createHref(p);s.replaceState(_,"",v),o&&a&&a({action:l,location:w.location,delta:0})}function y(S){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof S=="string"?S:Lo(S);return Z(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let w={get action(){return l},get location(){return e(i,s)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(nd,h),a=S,()=>{i.removeEventListener(nd,h),a=null}},createHref(S){return t(i,S)},createURL:y,encodeLocation(S){let m=y(S);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:g,go(S){return s.go(S)}};return w}var Ie;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ie||(Ie={}));const by=new Set(["lazy","caseSensitive","path","id","index","children"]);function zy(e){return e.index===!0}function du(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,o],l=typeof i.id=="string"?i.id:s.join("-");if(Z(i.index!==!0||!i.children,"Cannot specify children on an index route"),Z(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),zy(i)){let a=ge({},i,t(i),{id:l});return r[l]=a,a}else{let a=ge({},i,t(i),{id:l,children:void 0});return r[l]=a,i.children&&(a.children=du(i.children,t,s,r)),a}})}function Gr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?on(t):t,i=Uo(r.pathname||"/",n);if(i==null)return null;let o=hm(e);By(o);let s=null;for(let l=0;s==null&&l{let a={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};a.relativePath.startsWith("/")&&(Z(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Gn([r,a.relativePath]),f=n.concat(a);o.children&&o.children.length>0&&(Z(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hm(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ky(u,o.index),routesMeta:f})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let a of pm(o.path))i(o,s,a)}),t}function pm(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=pm(r.join("/")),l=[];return l.push(...s.map(a=>a===""?o:[o,a].join("/"))),i&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function By(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Gy(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const $y=/^:\w+$/,qy=3,Hy=2,Qy=1,Wy=10,Vy=-2,id=e=>e==="*";function Ky(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Vy),t&&(r+=Hy),n.filter(i=>!id(i)).reduce((i,o)=>i+($y.test(o)?qy:o===""?Qy:Wy),r)}function Gy(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Yy(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let d=l[h]||"";s=o.slice(0,o.length-d.length).replace(/(.)\/+$/,"$1")}return u[f]=e_(l[h]||"",f),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Jy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Tr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Zy(e){try{return decodeURI(e)}catch(t){return Tr(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function e_(e,t){try{return decodeURIComponent(e)}catch(n){return Tr(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Uo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function t_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?on(e):e;return{pathname:n?n.startsWith("/")?n:n_(n,t):t,search:i_(r),hash:o_(i)}}function n_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function la(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function wc(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mm(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=on(e):(i=ge({},e),Z(!i.pathname||!i.pathname.includes("?"),la("?","pathname","search",i)),Z(!i.pathname||!i.pathname.includes("#"),la("#","pathname","hash",i)),Z(!i.search||!i.search.includes("#"),la("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(r||s==null)l=n;else{let h=t.length-1;if(s.startsWith("..")){let d=s.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}l=h>=0?t[h]:"/"}let a=t_(i,l),u=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}const Gn=e=>e.join("/").replace(/\/\/+/g,"/"),r_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),i_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,o_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ec{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function vm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gm=["post","put","patch","delete"],s_=new Set(gm),l_=["get",...gm],a_=new Set(l_),u_=new Set([301,302,303,307,308]),c_=new Set([307,308]),aa={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},f_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ji={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ym=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,d_=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function h_(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let x=e.detectErrorBoundary;i=C=>({hasErrorBoundary:x(C)})}else i=d_;let o={},s=du(e.routes,i,void 0,o),l,a=e.basename||"/",u=ge({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),f=null,h=new Set,d=null,g=null,y=null,w=e.hydrationData!=null,S=Gr(s,e.history.location,a),m=null;if(S==null){let x=xt(404,{pathname:e.history.location.pathname}),{matches:C,route:N}=dd(s);S=C,m={[N.id]:x}}let p=!S.some(x=>x.route.lazy)&&(!S.some(x=>x.route.loader)||e.hydrationData!=null),_,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:p,navigation:aa,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},R=Pe.Pop,D=!1,T,P=!1,b=!1,q=[],he=[],ne=new Map,tt=0,kn=-1,Vt=new Map,at=new Set,ut=new Map,L=new Map,F=new Map,V=!1;function Y(){return f=e.history.listen(x=>{let{action:C,location:N,delta:z}=x;if(V){V=!1;return}Tr(F.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let K=Ar({currentLocation:v.location,nextLocation:N,historyAction:C});if(K&&z!=null){V=!0,e.history.go(z*-1),lr(K,{state:"blocked",location:N,proceed(){lr(K,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),e.history.go(z)},reset(){let B=new Map(v.blockers);B.set(K,ji),ie({blockers:B})}});return}return Mt(C,N)}),v.initialized||Mt(Pe.Pop,v.location),_}function _e(){f&&f(),h.clear(),T&&T.abort(),v.fetchers.forEach((x,C)=>Ti(C)),v.blockers.forEach((x,C)=>Ri(C))}function le(x){return h.add(x),()=>h.delete(x)}function ie(x){v=ge({},v,x),h.forEach(C=>C(v))}function ct(x,C){var N,z;let K=v.actionData!=null&&v.navigation.formMethod!=null&&zt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((N=x.state)==null?void 0:N._isRedirect)!==!0,B;C.actionData?Object.keys(C.actionData).length>0?B=C.actionData:B=null:K?B=v.actionData:B=null;let W=C.loaderData?fd(v.loaderData,C.loaderData,C.matches||[],C.errors):v.loaderData,Q=v.blockers;Q.size>0&&(Q=new Map(Q),Q.forEach((oe,te)=>Q.set(te,ji)));let H=D===!0||v.navigation.formMethod!=null&&zt(v.navigation.formMethod)&&((z=x.state)==null?void 0:z._isRedirect)!==!0;l&&(s=l,l=void 0),P||R===Pe.Pop||(R===Pe.Push?e.history.push(x,x.state):R===Pe.Replace&&e.history.replace(x,x.state)),ie(ge({},C,{actionData:B,loaderData:W,historyAction:R,location:x,initialized:!0,navigation:aa,revalidation:"idle",restoreScrollPosition:un(x,C.matches||v.matches),preventScrollReset:H,blockers:Q})),R=Pe.Pop,D=!1,P=!1,b=!1,q=[],he=[]}async function ft(x,C){if(typeof x=="number"){e.history.go(x);return}let N=hu(v.location,v.matches,a,u.v7_prependBasename,x,C==null?void 0:C.fromRouteId,C==null?void 0:C.relative),{path:z,submission:K,error:B}=od(u.v7_normalizeFormMethod,!1,N,C),W=v.location,Q=Co(v.location,z,C&&C.state);Q=ge({},Q,e.history.encodeLocation(Q));let H=C&&C.replace!=null?C.replace:void 0,oe=Pe.Push;H===!0?oe=Pe.Replace:H===!1||K!=null&&zt(K.formMethod)&&K.formAction===v.location.pathname+v.location.search&&(oe=Pe.Replace);let te=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,qe=Ar({currentLocation:W,nextLocation:Q,historyAction:oe});if(qe){lr(qe,{state:"blocked",location:Q,proceed(){lr(qe,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),ft(x,C)},reset(){let Re=new Map(v.blockers);Re.set(qe,ji),ie({blockers:Re})}});return}return await Mt(oe,Q,{submission:K,pendingError:B,preventScrollReset:te,replace:C&&C.replace})}function Kt(){if(Nr(),ie({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){Mt(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}Mt(R||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function Mt(x,C,N){T&&T.abort(),T=null,R=x,P=(N&&N.startUninterruptedRevalidation)===!0,It(v.location,v.matches),D=(N&&N.preventScrollReset)===!0;let z=l||s,K=N&&N.overrideNavigation,B=Gr(z,C,a);if(!B){let Re=xt(404,{pathname:C.pathname}),{matches:Ae,route:nt}=dd(z);Mr(),ct(C,{matches:Ae,loaderData:{},errors:{[nt.id]:Re}});return}if(v.initialized&&!b&&y_(v.location,C)&&!(N&&N.submission&&zt(N.submission.formMethod))){ct(C,{matches:B});return}T=new AbortController;let W=zi(e.history,C,T.signal,N&&N.submission),Q,H;if(N&&N.pendingError)H={[Yr(B).route.id]:N.pendingError};else if(N&&N.submission&&zt(N.submission.formMethod)){let Re=await bo(W,C,N.submission,B,{replace:N.replace});if(Re.shortCircuited)return;Q=Re.pendingActionData,H=Re.pendingActionError,K=is(C,N.submission),W=new Request(W.url,{signal:W.signal})}let{shortCircuited:oe,loaderData:te,errors:qe}=await Cn(W,C,B,K,N&&N.submission,N&&N.fetcherSubmission,N&&N.replace,Q,H);oe||(T=null,ct(C,ge({matches:B},Q?{actionData:Q}:{},{loaderData:te,errors:qe})))}async function bo(x,C,N,z,K){K===void 0&&(K={}),Nr();let B=x_(C,N);ie({navigation:B});let W,Q=mu(z,C);if(!Q.route.action&&!Q.route.lazy)W={type:Ie.error,error:xt(405,{method:x.method,pathname:C.pathname,routeId:Q.route.id})};else if(W=await bi("action",x,Q,z,o,i,a),x.signal.aborted)return{shortCircuited:!0};if(ii(W)){let H;return K&&K.replace!=null?H=K.replace:H=W.location===v.location.pathname+v.location.search,await Yt(v,W,{submission:N,replace:H}),{shortCircuited:!0}}if(io(W)){let H=Yr(z,Q.route.id);return(K&&K.replace)!==!0&&(R=Pe.Push),{pendingActionData:{},pendingActionError:{[H.route.id]:W.error}}}if(gr(W))throw xt(400,{type:"defer-action"});return{pendingActionData:{[Q.route.id]:W.data}}}async function Cn(x,C,N,z,K,B,W,Q,H){let oe=z||is(C,K),te=K||B||md(oe),qe=l||s,[Re,Ae]=sd(e.history,v,N,te,C,b,q,he,ut,at,qe,a,Q,H);if(Mr(ce=>!(N&&N.some(Ge=>Ge.route.id===ce))||Re&&Re.some(Ge=>Ge.route.id===ce)),Re.length===0&&Ae.length===0){let ce=ln();return ct(C,ge({matches:N,loaderData:{},errors:H||null},Q?{actionData:Q}:{},ce?{fetchers:new Map(v.fetchers)}:{})),{shortCircuited:!0}}if(!P){Ae.forEach(Ge=>{let cn=v.fetchers.get(Ge.key),Me=Bi(void 0,cn?cn.data:void 0);v.fetchers.set(Ge.key,Me)});let ce=Q||v.actionData;ie(ge({navigation:oe},ce?Object.keys(ce).length===0?{actionData:null}:{actionData:ce}:{},Ae.length>0?{fetchers:new Map(v.fetchers)}:{}))}kn=++tt,Ae.forEach(ce=>{ne.has(ce.key)&&St(ce.key),ce.controller&&ne.set(ce.key,ce.controller)});let nt=()=>Ae.forEach(ce=>St(ce.key));T&&T.signal.addEventListener("abort",nt);let{results:ur,loaderResults:Lt,fetcherResults:On}=await or(v.matches,N,Re,Ae,x);if(x.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",nt),Ae.forEach(ce=>ne.delete(ce.key));let wt=hd(ur);if(wt)return await Yt(v,wt,{replace:W}),{shortCircuited:!0};let{loaderData:cr,errors:Pi}=cd(v,N,Re,Lt,H,Ae,On,L);L.forEach((ce,Ge)=>{ce.subscribe(cn=>{(cn||ce.done)&&L.delete(Ge)})});let Pn=ln(),dt=an(kn),fr=Pn||dt||Ae.length>0;return ge({loaderData:cr,errors:Pi},fr?{fetchers:new Map(v.fetchers)}:{})}function Gt(x){return v.fetchers.get(x)||f_}function ki(x,C,N,z){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ne.has(x)&&St(x);let K=l||s,B=hu(v.location,v.matches,a,u.v7_prependBasename,N,C,z==null?void 0:z.relative),W=Gr(K,B,a);if(!W){sr(x,C,xt(404,{pathname:B}));return}let{path:Q,submission:H,error:oe}=od(u.v7_normalizeFormMethod,!0,B,z);if(oe){sr(x,C,oe);return}let te=mu(W,Q);if(D=(z&&z.preventScrollReset)===!0,H&&zt(H.formMethod)){Ci(x,C,Q,te,W,H);return}ut.set(x,{routeId:C,path:Q}),Tn(x,C,Q,te,W,H)}async function Ci(x,C,N,z,K,B){if(Nr(),ut.delete(x),!z.route.action&&!z.route.lazy){let Me=xt(405,{method:B.formMethod,pathname:N,routeId:C});sr(x,C,Me);return}let W=v.fetchers.get(x),Q=k_(B,W);v.fetchers.set(x,Q),ie({fetchers:new Map(v.fetchers)});let H=new AbortController,oe=zi(e.history,N,H.signal,B);ne.set(x,H);let te=await bi("action",oe,z,K,o,i,a);if(oe.signal.aborted){ne.get(x)===H&&ne.delete(x);return}if(ii(te)){ne.delete(x),at.add(x);let Me=Bi(B);return v.fetchers.set(x,Me),ie({fetchers:new Map(v.fetchers)}),Yt(v,te,{submission:B,isFetchActionRedirect:!0})}if(io(te)){sr(x,C,te.error);return}if(gr(te))throw xt(400,{type:"defer-action"});let qe=v.navigation.location||v.location,Re=zi(e.history,qe,H.signal),Ae=l||s,nt=v.navigation.state!=="idle"?Gr(Ae,v.navigation.location,a):v.matches;Z(nt,"Didn't find any matches after fetcher action");let ur=++tt;Vt.set(x,ur);let Lt=Bi(B,te.data);v.fetchers.set(x,Lt);let[On,wt]=sd(e.history,v,nt,B,qe,b,q,he,ut,at,Ae,a,{[z.route.id]:te.data},void 0);wt.filter(Me=>Me.key!==x).forEach(Me=>{let $=Me.key,E=v.fetchers.get($),A=Bi(void 0,E?E.data:void 0);v.fetchers.set($,A),ne.has($)&&St($),Me.controller&&ne.set($,Me.controller)}),ie({fetchers:new Map(v.fetchers)});let cr=()=>wt.forEach(Me=>St(Me.key));H.signal.addEventListener("abort",cr);let{results:Pi,loaderResults:Pn,fetcherResults:dt}=await or(v.matches,nt,On,wt,Re);if(H.signal.aborted)return;H.signal.removeEventListener("abort",cr),Vt.delete(x),ne.delete(x),wt.forEach(Me=>ne.delete(Me.key));let fr=hd(Pi);if(fr)return Yt(v,fr);let{loaderData:ce,errors:Ge}=cd(v,v.matches,On,Pn,void 0,wt,dt,L);if(v.fetchers.has(x)){let Me=Ss(te.data);v.fetchers.set(x,Me)}let cn=an(ur);v.navigation.state==="loading"&&ur>kn?(Z(R,"Expected pending action"),T&&T.abort(),ct(v.navigation.location,{matches:nt,loaderData:ce,errors:Ge,fetchers:new Map(v.fetchers)})):(ie(ge({errors:Ge,loaderData:fd(v.loaderData,ce,nt,Ge)},cn||wt.length>0?{fetchers:new Map(v.fetchers)}:{})),b=!1)}async function Tn(x,C,N,z,K,B){let W=v.fetchers.get(x),Q=Bi(B,W?W.data:void 0);v.fetchers.set(x,Q),ie({fetchers:new Map(v.fetchers)});let H=new AbortController,oe=zi(e.history,N,H.signal);ne.set(x,H);let te=await bi("loader",oe,z,K,o,i,a);if(gr(te)&&(te=await wm(te,oe.signal,!0)||te),ne.get(x)===H&&ne.delete(x),oe.signal.aborted)return;if(ii(te)){at.add(x),await Yt(v,te);return}if(io(te)){let Re=Yr(v.matches,C);v.fetchers.delete(x),ie({fetchers:new Map(v.fetchers),errors:{[Re.route.id]:te.error}});return}Z(!gr(te),"Unhandled fetcher deferred data");let qe=Ss(te.data);v.fetchers.set(x,qe),ie({fetchers:new Map(v.fetchers)})}async function Yt(x,C,N){let{submission:z,replace:K,isFetchActionRedirect:B}=N===void 0?{}:N;C.revalidate&&(b=!0);let W=Co(x.location,C.location,ge({_isRedirect:!0},B?{_isFetchActionRedirect:!0}:{}));if(Z(W,"Expected a location on the redirect navigation"),ym.test(C.location)&&n){let oe=e.history.createURL(C.location),te=Uo(oe.pathname,a)==null;if(t.location.origin!==oe.origin||te){K?t.location.replace(C.location):t.location.assign(C.location);return}}T=null;let Q=K===!0?Pe.Replace:Pe.Push,H=z||md(x.navigation);if(c_.has(C.status)&&H&&zt(H.formMethod))await Mt(Q,W,{submission:ge({},H,{formAction:C.location}),preventScrollReset:D});else if(B)await Mt(Q,W,{overrideNavigation:is(W),fetcherSubmission:H,preventScrollReset:D});else{let oe=is(W,H);await Mt(Q,W,{overrideNavigation:oe,preventScrollReset:D})}}async function or(x,C,N,z,K){let B=await Promise.all([...N.map(H=>bi("loader",K,H,C,o,i,a)),...z.map(H=>H.matches&&H.match&&H.controller?bi("loader",zi(e.history,H.path,H.controller.signal),H.match,H.matches,o,i,a):{type:Ie.error,error:xt(404,{pathname:H.path})})]),W=B.slice(0,N.length),Q=B.slice(N.length);return await Promise.all([pd(x,N,W,W.map(()=>K.signal),!1,v.loaderData),pd(x,z.map(H=>H.match),Q,z.map(H=>H.controller?H.controller.signal:null),!0)]),{results:B,loaderResults:W,fetcherResults:Q}}function Nr(){b=!0,q.push(...Mr()),ut.forEach((x,C)=>{ne.has(C)&&(he.push(C),St(C))})}function sr(x,C,N){let z=Yr(v.matches,C);Ti(x),ie({errors:{[z.route.id]:N},fetchers:new Map(v.fetchers)})}function Ti(x){let C=v.fetchers.get(x);ne.has(x)&&!(C&&C.state==="loading"&&Vt.has(x))&&St(x),ut.delete(x),Vt.delete(x),at.delete(x),v.fetchers.delete(x)}function St(x){let C=ne.get(x);Z(C,"Expected fetch controller: "+x),C.abort(),ne.delete(x)}function Rn(x){for(let C of x){let N=Gt(C),z=Ss(N.data);v.fetchers.set(C,z)}}function ln(){let x=[],C=!1;for(let N of at){let z=v.fetchers.get(N);Z(z,"Expected fetcher: "+N),z.state==="loading"&&(at.delete(N),x.push(N),C=!0)}return Rn(x),C}function an(x){let C=[];for(let[N,z]of Vt)if(z0}function zo(x,C){let N=v.blockers.get(x)||ji;return F.get(x)!==C&&F.set(x,C),N}function Ri(x){v.blockers.delete(x),F.delete(x)}function lr(x,C){let N=v.blockers.get(x)||ji;Z(N.state==="unblocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="proceeding"||N.state==="blocked"&&C.state==="unblocked"||N.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+N.state+" -> "+C.state);let z=new Map(v.blockers);z.set(x,C),ie({blockers:z})}function Ar(x){let{currentLocation:C,nextLocation:N,historyAction:z}=x;if(F.size===0)return;F.size>1&&Tr(!1,"A router only supports one blocker at a time");let K=Array.from(F.entries()),[B,W]=K[K.length-1],Q=v.blockers.get(B);if(!(Q&&Q.state==="proceeding")&&W({currentLocation:C,nextLocation:N,historyAction:z}))return B}function Mr(x){let C=[];return L.forEach((N,z)=>{(!x||x(z))&&(N.cancel(),C.push(z),L.delete(z))}),C}function Ir(x,C,N){if(d=x,y=C,g=N||null,!w&&v.navigation===aa){w=!0;let z=un(v.location,v.matches);z!=null&&ie({restoreScrollPosition:z})}return()=>{d=null,y=null,g=null}}function ar(x,C){return g&&g(x,C.map(z=>E_(z,v.loaderData)))||x.key}function It(x,C){if(d&&y){let N=ar(x,C);d[N]=y()}}function un(x,C){if(d){let N=ar(x,C),z=d[N];if(typeof z=="number")return z}return null}function Oi(x){o={},l=du(x,i,void 0,o)}return _={get basename(){return a},get state(){return v},get routes(){return s},initialize:Y,subscribe:le,enableScrollRestoration:Ir,navigate:ft,fetch:ki,revalidate:Kt,createHref:x=>e.history.createHref(x),encodeLocation:x=>e.history.encodeLocation(x),getFetcher:Gt,deleteFetcher:Ti,dispose:_e,getBlocker:zo,deleteBlocker:Ri,_internalFetchControllers:ne,_internalActiveDeferreds:L,_internalSetRoutes:Oi},_}function p_(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hu(e,t,n,r,i,o,s){let l,a;if(o!=null&&s!=="path"){l=[];for(let f of t)if(l.push(f),f.route.id===o){a=f;break}}else l=t,a=t[t.length-1];let u=mm(i||".",wc(l).map(f=>f.pathnameBase),Uo(e.pathname,n)||e.pathname,s==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!xc(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Gn([n,u.pathname])),Lo(u)}function od(e,t,n,r){if(!r||!p_(r))return{path:n};if(r.formMethod&&!w_(r.formMethod))return{path:n,error:xt(405,{method:r.formMethod})};let i=()=>({path:n,error:xt(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),l=Sm(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!zt(s))return i();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,y)=>{let[w,S]=y;return""+g+w+"="+S+` +`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!zt(s))return i();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:l,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}Z(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=pu(r.formData),u=r.formData;else if(r.body instanceof FormData)a=pu(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=ud(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=ud(a)}catch{return i()}let f={formMethod:s,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(zt(f.formMethod))return{path:n,submission:f};let h=on(n);return t&&h.search&&xc(h.search)&&a.append("index",""),h.search="?"+a,{path:Lo(h),submission:f}}function m_(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function sd(e,t,n,r,i,o,s,l,a,u,f,h,d,g){let y=g?Object.values(g)[0]:d?Object.values(d)[0]:void 0,w=e.createURL(t.location),S=e.createURL(i),m=g?Object.keys(g)[0]:void 0,_=m_(n,m).filter((R,D)=>{if(R.route.lazy)return!0;if(R.route.loader==null)return!1;if(v_(t.loaderData,t.matches[D],R)||s.some(b=>b===R.route.id))return!0;let T=t.matches[D],P=R;return ld(R,ge({currentUrl:w,currentParams:T.params,nextUrl:S,nextParams:P.params},r,{actionResult:y,defaultShouldRevalidate:o||w.pathname+w.search===S.pathname+S.search||w.search!==S.search||_m(T,P)}))}),v=[];return a.forEach((R,D)=>{if(!n.some(ne=>ne.route.id===R.routeId))return;let T=Gr(f,R.path,h);if(!T){v.push({key:D,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let P=t.fetchers.get(D),b=P&&P.state!=="idle"&&P.data===void 0&&!u.has(D),q=mu(T,R.path);(l.includes(D)||b||ld(q,ge({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:o})))&&v.push({key:D,routeId:R.routeId,path:R.path,matches:T,match:q,controller:new AbortController})}),[_,v]}function v_(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function _m(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ld(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function ad(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Z(i,"No route found in manifest");let o={};for(let s in r){let a=i[s]!==void 0&&s!=="hasErrorBoundary";Tr(!a,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!a&&!by.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,ge({},t(i),{lazy:void 0}))}async function bi(e,t,n,r,i,o,s,l){l===void 0&&(l={});let a,u,f,h=y=>{let w,S=new Promise((m,p)=>w=p);return f=()=>w(),t.signal.addEventListener("abort",f),Promise.race([y({request:t,params:n.params,context:l.requestContext}),S])};try{let y=n.route[e];if(n.route.lazy)if(y)u=(await Promise.all([h(y),ad(n.route,o,i)]))[0];else if(await ad(n.route,o,i),y=n.route[e],y)u=await h(y);else if(e==="action"){let w=new URL(t.url),S=w.pathname+w.search;throw xt(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:Ie.data,data:void 0};else if(y)u=await h(y);else{let w=new URL(t.url),S=w.pathname+w.search;throw xt(404,{pathname:S})}Z(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){a=Ie.error,u=y}finally{f&&t.signal.removeEventListener("abort",f)}if(S_(u)){let y=u.status;if(u_.has(y)){let m=u.headers.get("Location");if(Z(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!ym.test(m))m=hu(new URL(t.url),r.slice(0,r.indexOf(n)+1),s,!0,m);else if(!l.isStaticRequest){let p=new URL(t.url),_=m.startsWith("//")?new URL(p.protocol+m):new URL(m),v=Uo(_.pathname,s)!=null;_.origin===p.origin&&v&&(m=_.pathname+_.search+_.hash)}if(l.isStaticRequest)throw u.headers.set("Location",m),u;return{type:Ie.redirect,status:y,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:a||Ie.data,response:u};let w,S=u.headers.get("Content-Type");return S&&/\bapplication\/json\b/.test(S)?w=await u.json():w=await u.text(),a===Ie.error?{type:a,error:new Ec(y,u.statusText,w),headers:u.headers}:{type:Ie.data,data:w,statusCode:u.status,headers:u.headers}}if(a===Ie.error)return{type:a,error:u};if(__(u)){var d,g;return{type:Ie.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:Ie.data,data:u}}function zi(e,t,n,r){let i=e.createURL(Sm(t)).toString(),o={signal:n};if(r&&zt(r.formMethod)){let{formMethod:s,formEncType:l}=r;o.method=s.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=pu(r.formData):o.body=r.formData}return new Request(i,o)}function pu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ud(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function g_(e,t,n,r,i){let o={},s=null,l,a=!1,u={};return n.forEach((f,h)=>{let d=t[h].route.id;if(Z(!ii(f),"Cannot handle redirect results in processLoaderData"),io(f)){let g=Yr(e,d),y=f.error;r&&(y=Object.values(r)[0],r=void 0),s=s||{},s[g.route.id]==null&&(s[g.route.id]=y),o[d]=void 0,a||(a=!0,l=vm(f.error)?f.error.status:500),f.headers&&(u[d]=f.headers)}else gr(f)?(i.set(d,f.deferredData),o[d]=f.deferredData.data):o[d]=f.data,f.statusCode!=null&&f.statusCode!==200&&!a&&(l=f.statusCode),f.headers&&(u[d]=f.headers)}),r&&(s=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:s,statusCode:l||200,loaderHeaders:u}}function cd(e,t,n,r,i,o,s,l){let{loaderData:a,errors:u}=g_(t,n,r,i,l);for(let f=0;fr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function dd(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xt(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?l="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",l='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?l="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new Ec(e||500,s,new Error(l),!0)}function hd(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ii(n))return n}}function Sm(e){let t=typeof e=="string"?on(e):e;return Lo(ge({},t,{hash:""}))}function y_(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function gr(e){return e.type===Ie.deferred}function io(e){return e.type===Ie.error}function ii(e){return(e&&e.type)===Ie.redirect}function __(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function S_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function w_(e){return a_.has(e.toLowerCase())}function zt(e){return s_.has(e.toLowerCase())}async function pd(e,t,n,r,i,o){for(let s=0;sh.route.id===a.route.id),f=u!=null&&!_m(u,a)&&(o&&o[a.route.id])!==void 0;if(gr(l)&&(i||f)){let h=r[s];Z(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await wm(l,h,i).then(d=>{d&&(n[s]=d||n[s])})}}}async function wm(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Ie.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Ie.error,error:i}}return{type:Ie.data,data:e.deferredData.data}}}function xc(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function E_(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function mu(e,t){let n=typeof t=="string"?on(t).search:t.search;if(e[e.length-1].route.index&&xc(n||""))return e[e.length-1];let r=wc(e);return r[r.length-1]}function md(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function is(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function x_(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bi(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function k_(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Ss(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/** * React Router v6.14.1 * * Copyright (c) Remix Software Inc. @@ -60,7 +60,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Vs(){return Vs=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),s=I.useRef(!1);return Cm(()=>{s.current=!0}),I.useCallback(function(a,u){if(u===void 0&&(u={}),!s.current)return;if(typeof a=="number"){n.go(a);return}let f=mm(a,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,o,i,e])}function T_(e,t,n){Cl()||Z(!1);let{navigator:r}=I.useContext(xl),{matches:i}=I.useContext(Si),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let a=km(),u;if(t){var f;let S=typeof t=="string"?on(t):t;l==="/"||(f=S.pathname)!=null&&f.startsWith(l)||Z(!1),u=S}else u=a;let h=u.pathname||"/",d=l==="/"?h:h.slice(l.length)||"/",g=Gr(e,{pathname:d}),y=N_(g&&g.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:Gn([l,r.encodeLocation?r.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:Gn([l,r.encodeLocation?r.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n);return t&&y?I.createElement(kl.Provider,{value:{location:Vs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Oe.Pop}},y):y}function R_(){let e=L_(),t=vm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,o)}const P_=I.createElement(R_,null);class O_ extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?I.createElement(Si.Provider,{value:this.props.routeContext},I.createElement(xm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function D_(e){let{routeContext:t,match:n,children:r}=e,i=I.useContext(El);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(Si.Provider,{value:t},r)}function N_(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let l=o.findIndex(a=>a.route.id&&(s==null?void 0:s[a.route.id]));l>=0||Z(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,a,u)=>{let f=a.route.id?s==null?void 0:s[a.route.id]:null,h=null;n&&(h=a.route.errorElement||P_);let d=t.concat(o.slice(0,u+1)),g=()=>{let y;return f?y=h:a.route.Component?y=I.createElement(a.route.Component,null):a.route.element?y=a.route.element:y=l,I.createElement(D_,{match:a,routeContext:{outlet:l,matches:d,isDataRoute:n!=null},children:y})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?I.createElement(O_,{location:n.location,revalidation:n.revalidation,component:h,error:f,children:g(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):g()},null)}var vu;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(vu||(vu={}));var To;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(To||(To={}));function A_(e){let t=I.useContext(El);return t||Z(!1),t}function M_(e){let t=I.useContext(Em);return t||Z(!1),t}function I_(e){let t=I.useContext(Si);return t||Z(!1),t}function Tm(e){let t=I_(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function L_(){var e;let t=I.useContext(xm),n=M_(To.UseRouteError),r=Tm(To.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function U_(){let{router:e}=A_(vu.UseNavigateStable),t=Tm(To.UseNavigateStable),n=I.useRef(!1);return Cm(()=>{n.current=!0}),I.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Vs({fromRouteId:t},o)))},[e,t])}const F_="startTransition",vd=kv[F_];function b_(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=I.useState(n.state),{v7_startTransition:s}=r||{},l=I.useCallback(h=>{s&&vd?vd(()=>o(h)):o(h)},[o,s]);I.useLayoutEffect(()=>n.subscribe(l),[n,l]);let a=I.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:h=>n.navigate(h),push:(h,d,g)=>n.navigate(h,{state:d,preventScrollReset:g==null?void 0:g.preventScrollReset}),replace:(h,d,g)=>n.navigate(h,{replace:!0,state:d,preventScrollReset:g==null?void 0:g.preventScrollReset})}),[n]),u=n.basename||"/",f=I.useMemo(()=>({router:n,navigator:a,static:!1,basename:u}),[n,a,u]);return I.createElement(I.Fragment,null,I.createElement(El.Provider,{value:f},I.createElement(Em.Provider,{value:i},I.createElement(z_,{basename:u,location:i.location,navigationType:i.historyAction,navigator:a},i.initialized?I.createElement(j_,{routes:n.routes,state:i}):t))),null)}function j_(e){let{routes:t,state:n}=e;return T_(t,void 0,n)}function z_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Oe.Pop,navigator:o,static:s=!1}=e;Cl()&&Z(!1);let l=t.replace(/^\/*/,"/"),a=I.useMemo(()=>({basename:l,navigator:o,static:s}),[l,o,s]);typeof r=="string"&&(r=on(r));let{pathname:u="/",search:f="",hash:h="",state:d=null,key:g="default"}=r,y=I.useMemo(()=>{let S=Uo(u,l);return S==null?null:{location:{pathname:S,search:f,hash:h,state:d,key:g},navigationType:i}},[l,u,f,h,d,g,i]);return y==null?null:I.createElement(xl.Provider,{value:a},I.createElement(kl.Provider,{children:n,value:y}))}var gd;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(gd||(gd={}));new Promise(()=>{});function B_(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:I.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:I.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Vs(){return Vs=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),s=I.useRef(!1);return Cm(()=>{s.current=!0}),I.useCallback(function(a,u){if(u===void 0&&(u={}),!s.current)return;if(typeof a=="number"){n.go(a);return}let f=mm(a,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,o,i,e])}function T_(e,t,n){kl()||Z(!1);let{navigator:r}=I.useContext(El),{matches:i}=I.useContext(Si),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let a=km(),u;if(t){var f;let w=typeof t=="string"?on(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||Z(!1),u=w}else u=a;let h=u.pathname||"/",d=l==="/"?h:h.slice(l.length)||"/",g=Gr(e,{pathname:d}),y=N_(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:Gn([l,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Gn([l,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n);return t&&y?I.createElement(xl.Provider,{value:{location:Vs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Pe.Pop}},y):y}function R_(){let e=L_(),t=vm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,o)}const O_=I.createElement(R_,null);class P_ extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?I.createElement(Si.Provider,{value:this.props.routeContext},I.createElement(xm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function D_(e){let{routeContext:t,match:n,children:r}=e,i=I.useContext(wl);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(Si.Provider,{value:t},r)}function N_(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let l=o.findIndex(a=>a.route.id&&(s==null?void 0:s[a.route.id]));l>=0||Z(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,a,u)=>{let f=a.route.id?s==null?void 0:s[a.route.id]:null,h=null;n&&(h=a.route.errorElement||O_);let d=t.concat(o.slice(0,u+1)),g=()=>{let y;return f?y=h:a.route.Component?y=I.createElement(a.route.Component,null):a.route.element?y=a.route.element:y=l,I.createElement(D_,{match:a,routeContext:{outlet:l,matches:d,isDataRoute:n!=null},children:y})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?I.createElement(P_,{location:n.location,revalidation:n.revalidation,component:h,error:f,children:g(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):g()},null)}var vu;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(vu||(vu={}));var To;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(To||(To={}));function A_(e){let t=I.useContext(wl);return t||Z(!1),t}function M_(e){let t=I.useContext(Em);return t||Z(!1),t}function I_(e){let t=I.useContext(Si);return t||Z(!1),t}function Tm(e){let t=I_(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function L_(){var e;let t=I.useContext(xm),n=M_(To.UseRouteError),r=Tm(To.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function U_(){let{router:e}=A_(vu.UseNavigateStable),t=Tm(To.UseNavigateStable),n=I.useRef(!1);return Cm(()=>{n.current=!0}),I.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Vs({fromRouteId:t},o)))},[e,t])}const F_="startTransition",vd=kv[F_];function j_(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=I.useState(n.state),{v7_startTransition:s}=r||{},l=I.useCallback(h=>{s&&vd?vd(()=>o(h)):o(h)},[o,s]);I.useLayoutEffect(()=>n.subscribe(l),[n,l]);let a=I.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:h=>n.navigate(h),push:(h,d,g)=>n.navigate(h,{state:d,preventScrollReset:g==null?void 0:g.preventScrollReset}),replace:(h,d,g)=>n.navigate(h,{replace:!0,state:d,preventScrollReset:g==null?void 0:g.preventScrollReset})}),[n]),u=n.basename||"/",f=I.useMemo(()=>({router:n,navigator:a,static:!1,basename:u}),[n,a,u]);return I.createElement(I.Fragment,null,I.createElement(wl.Provider,{value:f},I.createElement(Em.Provider,{value:i},I.createElement(z_,{basename:u,location:i.location,navigationType:i.historyAction,navigator:a},i.initialized?I.createElement(b_,{routes:n.routes,state:i}):t))),null)}function b_(e){let{routes:t,state:n}=e;return T_(t,void 0,n)}function z_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Pe.Pop,navigator:o,static:s=!1}=e;kl()&&Z(!1);let l=t.replace(/^\/*/,"/"),a=I.useMemo(()=>({basename:l,navigator:o,static:s}),[l,o,s]);typeof r=="string"&&(r=on(r));let{pathname:u="/",search:f="",hash:h="",state:d=null,key:g="default"}=r,y=I.useMemo(()=>{let w=Uo(u,l);return w==null?null:{location:{pathname:w,search:f,hash:h,state:d,key:g},navigationType:i}},[l,u,f,h,d,g,i]);return y==null?null:I.createElement(El.Provider,{value:a},I.createElement(xl.Provider,{children:n,value:y}))}var gd;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(gd||(gd={}));new Promise(()=>{});function B_(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:I.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:I.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.14.1 * * Copyright (c) Remix Software Inc. @@ -69,7 +69,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Ro=typeof window>"u"||"Deno"in window;function kt(){}function Q_(e,t){return typeof e=="function"?e(t):e}function gu(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ki(e,t,n){return Tl(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Mn(e,t,n){return Tl(e)?[{...t,queryKey:e},n]:[e||{},t]}function Sd(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(Tl(s)){if(r){if(t.queryHash!==kc(s,t.options))return!1}else if(!Gs(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function wd(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(Tl(o)){if(!t.options.mutationKey)return!1;if(n){if(yr(t.options.mutationKey)!==yr(o))return!1}else if(!Gs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function kc(e,t){return((t==null?void 0:t.queryKeyHashFn)||yr)(e)}function yr(e){return JSON.stringify(e,(t,n)=>_u(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Gs(e,t){return Pm(e,t)}function Pm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Pm(e[n],t[n])):!1}function Om(e,t){if(e===t)return e;const n=Ed(e)&&Ed(t);if(n||_u(e)&&_u(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let l=0;for(let a=0;a"u")return!0;const n=t.prototype;return!(!xd(n)||!n.hasOwnProperty("isPrototypeOf"))}function xd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Tl(e){return Array.isArray(e)}function Dm(e){return new Promise(t=>{setTimeout(t,e)})}function kd(e){Dm(0).then(e)}function W_(){if(typeof AbortController=="function")return new AbortController}function Su(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Om(e,t):t}class V_ extends Fo{constructor(){super(),this.setup=t=>{if(!Ro&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ys=new V_,Cd=["online","offline"];class K_ extends Fo{constructor(){super(),this.setup=t=>{if(!Ro&&window.addEventListener){const n=()=>t();return Cd.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{Cd.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Xs=new K_;function G_(e){return Math.min(1e3*2**e,3e4)}function Rl(e){return(e??"online")==="online"?Xs.isOnline():!0}class Nm{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function ws(e){return e instanceof Nm}function Am(e){let t=!1,n=0,r=!1,i,o,s;const l=new Promise((E,m)=>{o=E,s=m}),a=E=>{r||(g(new Nm(E)),e.abort==null||e.abort())},u=()=>{t=!0},f=()=>{t=!1},h=()=>!Ys.isFocused()||e.networkMode!=="always"&&!Xs.isOnline(),d=E=>{r||(r=!0,e.onSuccess==null||e.onSuccess(E),i==null||i(),o(E))},g=E=>{r||(r=!0,e.onError==null||e.onError(E),i==null||i(),s(E))},y=()=>new Promise(E=>{i=m=>{const p=r||!h();return p&&E(m),p},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),S=()=>{if(r)return;let E;try{E=e.fn()}catch(m){E=Promise.reject(m)}Promise.resolve(E).then(d).catch(m=>{var p,_;if(r)return;const v=(p=e.retry)!=null?p:3,R=(_=e.retryDelay)!=null?_:G_,D=typeof R=="function"?R(n,m):R,T=v===!0||typeof v=="number"&&n{if(h())return y()}).then(()=>{t?g(m):S()})})};return Rl(e.networkMode)?S():y().then(S),{promise:l,cancel:a,continue:()=>(i==null?void 0:i())?l:Promise.resolve(),cancelRetry:u,continueRetry:f}}const Cc=console;function Y_(){let e=[],t=0,n=f=>{f()},r=f=>{f()};const i=f=>{let h;t++;try{h=f()}finally{t--,t||l()}return h},o=f=>{t?e.push(f):kd(()=>{n(f)})},s=f=>(...h)=>{o(()=>{f(...h)})},l=()=>{const f=e;e=[],f.length&&kd(()=>{r(()=>{f.forEach(h=>{n(h)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f}}}const De=Y_();class Mm{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gu(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Ro?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class X_ extends Mm{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Cc,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||J_(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Su(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Rm(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}Array.isArray(this.options.queryKey);const s=W_(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};a(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(a(f),(r=this.options.behavior)==null||r.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=f.fetchOptions)==null?void 0:i.meta)){var h;this.dispatch({type:"fetch",meta:(h=f.fetchOptions)==null?void 0:h.meta})}const d=g=>{if(ws(g)&&g.silent||this.dispatch({type:"error",error:g}),!ws(g)){var y,S,E,m;(y=(S=this.cache.config).onError)==null||y.call(S,g,this),(E=(m=this.cache.config).onSettled)==null||E.call(m,this.state.data,g,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Am({fn:f.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:g=>{var y,S,E,m;if(typeof g>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(g),(y=(S=this.cache.config).onSuccess)==null||y.call(S,g,this),(E=(m=this.cache.config).onSettled)==null||E.call(m,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(g,y)=>{this.dispatch({type:"failed",failureCount:g,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Rl(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ws(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function J_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Z_ extends Fo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:kc(o,n);let l=this.get(s);return l||(l=new X_({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Mn(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>Sd(r,i))}findAll(t,n){const[r]=Mn(t,n);return Object.keys(r).length>0?this.queries.filter(i=>Sd(r,i)):this.queries}notify(t){De.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){De.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class e0 extends Mm{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Cc,this.observers=[],this.state=t.state||t0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var T;return this.retryer=Am({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(O,j)=>{this.dispatch({type:"failed",failureCount:O,error:j})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(T=this.options.retry)!=null?T:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,l,a,u,f;if(!n){var h,d,g,y;this.dispatch({type:"loading",variables:this.options.variables}),await((h=(d=this.mutationCache.config).onMutate)==null?void 0:h.call(d,this.state.variables,this));const O=await((g=(y=this.options).onMutate)==null?void 0:g.call(y,this.state.variables));O!==this.state.context&&this.dispatch({type:"loading",context:O,variables:this.state.variables})}const T=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,T,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,T,this.state.variables,this.state.context)),await((l=(a=this.mutationCache.config).onSettled)==null?void 0:l.call(a,T,null,this.state.variables,this.state.context,this)),await((u=(f=this.options).onSettled)==null?void 0:u.call(f,T,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:T}),T}catch(T){try{var S,E,m,p,_,v,R,D;throw await((S=(E=this.mutationCache.config).onError)==null?void 0:S.call(E,T,this.state.variables,this.state.context,this)),await((m=(p=this.options).onError)==null?void 0:m.call(p,T,this.state.variables,this.state.context)),await((_=(v=this.mutationCache.config).onSettled)==null?void 0:_.call(v,void 0,T,this.state.variables,this.state.context,this)),await((R=(D=this.options).onSettled)==null?void 0:R.call(D,void 0,T,this.state.variables,this.state.context)),T}finally{this.dispatch({type:"error",error:T})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Rl(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function t0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class n0 extends Fo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new e0({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){De.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>wd(t,n))}findAll(t){return this.mutations.filter(n=>wd(t,n))}notify(t){De.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return De.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(kt)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function r0(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,a=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,u=a==null?void 0:a.pageParam,f=(a==null?void 0:a.direction)==="forward",h=(a==null?void 0:a.direction)==="backward",d=((o=e.state.data)==null?void 0:o.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[];let y=g,S=!1;const E=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>{var T;if((T=e.signal)!=null&&T.aborted)S=!0;else{var O;(O=e.signal)==null||O.addEventListener("abort",()=>{S=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),p=(D,T,O,j)=>(y=j?[T,...y]:[...y,T],j?[O,...D]:[...D,O]),_=(D,T,O,j)=>{if(S)return Promise.reject("Cancelled");if(typeof O>"u"&&!T&&D.length)return Promise.resolve(D);const q={queryKey:e.queryKey,pageParam:O,meta:e.options.meta};E(q);const he=m(q);return Promise.resolve(he).then(tt=>p(D,O,tt,j))};let v;if(!d.length)v=_([]);else if(f){const D=typeof u<"u",T=D?u:Td(e.options,d);v=_(d,D,T)}else if(h){const D=typeof u<"u",T=D?u:i0(e.options,d);v=_(d,D,T,!0)}else{y=[];const D=typeof e.options.getNextPageParam>"u";v=(l&&d[0]?l(d[0],0,d):!0)?_([],D,g[0]):Promise.resolve(p([],g[0],d[0]));for(let O=1;O{if(l&&d[O]?l(d[O],O,d):!0){const he=D?g[O]:Td(e.options,j);return _(j,D,he)}return Promise.resolve(p(j,g[O],d[O]))})}return v.then(D=>({pages:D,pageParams:y}))}}}}function Td(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function i0(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class o0{constructor(t={}){this.queryCache=t.queryCache||new Z_,this.mutationCache=t.mutationCache||new n0,this.logger=t.logger||Cc,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ys.subscribe(()=>{Ys.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Xs.subscribe(()=>{Xs.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Mn(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Ki(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=Q_(n,o);if(typeof s>"u")return;const l=Ki(t),a=this.defaultQueryOptions(l);return this.queryCache.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return De.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Mn(t,n),i=this.queryCache;De.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Mn(t,n,r),s=this.queryCache,l={type:"active",...i};return De.batch(()=>(s.findAll(i).forEach(a=>{a.reset()}),this.refetchQueries(l,o)))}cancelQueries(t,n,r){const[i,o={}]=Mn(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=De.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(o)));return Promise.all(s).then(kt).catch(kt)}invalidateQueries(t,n,r){const[i,o]=Mn(t,n,r);return De.batch(()=>{var s,l;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const a={...i,type:(s=(l=i.refetchType)!=null?l:i.type)!=null?s:"active"};return this.refetchQueries(a,o)})}refetchQueries(t,n,r){const[i,o]=Mn(t,n,r),s=De.batch(()=>this.queryCache.findAll(i).filter(a=>!a.isDisabled()).map(a=>{var u;return a.fetch(void 0,{...o,cancelRefetch:(u=o==null?void 0:o.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let l=Promise.all(s).then(kt);return o!=null&&o.throwOnError||(l=l.catch(kt)),l}fetchQuery(t,n,r){const i=Ki(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(kt).catch(kt)}fetchInfiniteQuery(t,n,r){const i=Ki(t,n,r);return i.behavior=r0(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(kt).catch(kt)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>yr(t)===yr(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Gs(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>yr(t)===yr(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Gs(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=kc(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class s0 extends Fo{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Rd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wu(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wu(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),yu(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&Pd(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return a0(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kt)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ro||this.currentResult.isStale||!gu(this.options.staleTime))return;const n=Rm(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ro||this.options.enabled===!1||!gu(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ys.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,a=t!==r,u=a?t.state:this.currentQueryInitialState,f=a?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:d,error:g,errorUpdatedAt:y,fetchStatus:S,status:E}=h,m=!1,p=!1,_;if(n._optimisticResults){const O=this.hasListeners(),j=!O&&Rd(t,n),q=O&&Pd(t,r,n,i);(j||q)&&(S=Rl(t.options.networkMode)?"fetching":"paused",d||(E="loading")),n._optimisticResults==="isRestoring"&&(S="idle")}if(n.keepPreviousData&&!h.dataUpdatedAt&&f!=null&&f.isSuccess&&E!=="error")_=f.data,d=f.dataUpdatedAt,E=f.status,m=!0;else if(n.select&&typeof h.data<"u")if(o&&h.data===(s==null?void 0:s.data)&&n.select===this.selectFn)_=this.selectResult;else try{this.selectFn=n.select,_=n.select(h.data),_=Su(o==null?void 0:o.data,_,n),this.selectResult=_,this.selectError=null}catch(O){this.selectError=O}else _=h.data;if(typeof n.placeholderData<"u"&&typeof _>"u"&&E==="loading"){let O;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))O=o.data;else if(O=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof O<"u")try{O=n.select(O),this.selectError=null}catch(j){this.selectError=j}typeof O<"u"&&(E="success",_=Su(o==null?void 0:o.data,O,n),p=!0)}this.selectError&&(g=this.selectError,_=this.selectResult,y=Date.now(),E="error");const v=S==="fetching",R=E==="loading",D=E==="error";return{status:E,fetchStatus:S,isLoading:R,isSuccess:E==="success",isError:D,isInitialLoading:R&&v,data:_,dataUpdatedAt:d,error:g,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!R,isLoadingError:D&&h.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:D&&h.dataUpdatedAt!==0,isStale:Tc(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,yu(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!this.trackedProps.size)return!0;const a=new Set(l??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const f=u;return this.currentResult[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!ws(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){De.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,l,a,u;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(a=(u=this.options).onSettled)==null||a.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function l0(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rd(e,t){return l0(e,t)||e.state.dataUpdatedAt>0&&wu(e,t,t.refetchOnMount)}function wu(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tc(e,t)}return!1}function Pd(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Tc(e,n)}function Tc(e,t){return e.isStaleByTime(t.staleTime)}function a0(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!yu(e.getCurrentResult(),t)}var Im={exports:{}},Lm={};/** + */function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Ro=typeof window>"u"||"Deno"in window;function kt(){}function Q_(e,t){return typeof e=="function"?e(t):e}function gu(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ki(e,t,n){return Cl(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Mn(e,t,n){return Cl(e)?[{...t,queryKey:e},n]:[e||{},t]}function Sd(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(Cl(s)){if(r){if(t.queryHash!==Cc(s,t.options))return!1}else if(!Gs(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function wd(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(Cl(o)){if(!t.options.mutationKey)return!1;if(n){if(yr(t.options.mutationKey)!==yr(o))return!1}else if(!Gs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function Cc(e,t){return((t==null?void 0:t.queryKeyHashFn)||yr)(e)}function yr(e){return JSON.stringify(e,(t,n)=>_u(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Gs(e,t){return Om(e,t)}function Om(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Om(e[n],t[n])):!1}function Pm(e,t){if(e===t)return e;const n=Ed(e)&&Ed(t);if(n||_u(e)&&_u(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let l=0;for(let a=0;a"u")return!0;const n=t.prototype;return!(!xd(n)||!n.hasOwnProperty("isPrototypeOf"))}function xd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Cl(e){return Array.isArray(e)}function Dm(e){return new Promise(t=>{setTimeout(t,e)})}function kd(e){Dm(0).then(e)}function W_(){if(typeof AbortController=="function")return new AbortController}function Su(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Pm(e,t):t}class V_ extends Fo{constructor(){super(),this.setup=t=>{if(!Ro&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ys=new V_,Cd=["online","offline"];class K_ extends Fo{constructor(){super(),this.setup=t=>{if(!Ro&&window.addEventListener){const n=()=>t();return Cd.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{Cd.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Xs=new K_;function G_(e){return Math.min(1e3*2**e,3e4)}function Tl(e){return(e??"online")==="online"?Xs.isOnline():!0}class Nm{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function ws(e){return e instanceof Nm}function Am(e){let t=!1,n=0,r=!1,i,o,s;const l=new Promise((S,m)=>{o=S,s=m}),a=S=>{r||(g(new Nm(S)),e.abort==null||e.abort())},u=()=>{t=!0},f=()=>{t=!1},h=()=>!Ys.isFocused()||e.networkMode!=="always"&&!Xs.isOnline(),d=S=>{r||(r=!0,e.onSuccess==null||e.onSuccess(S),i==null||i(),o(S))},g=S=>{r||(r=!0,e.onError==null||e.onError(S),i==null||i(),s(S))},y=()=>new Promise(S=>{i=m=>{const p=r||!h();return p&&S(m),p},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),w=()=>{if(r)return;let S;try{S=e.fn()}catch(m){S=Promise.reject(m)}Promise.resolve(S).then(d).catch(m=>{var p,_;if(r)return;const v=(p=e.retry)!=null?p:3,R=(_=e.retryDelay)!=null?_:G_,D=typeof R=="function"?R(n,m):R,T=v===!0||typeof v=="number"&&n{if(h())return y()}).then(()=>{t?g(m):w()})})};return Tl(e.networkMode)?w():y().then(w),{promise:l,cancel:a,continue:()=>(i==null?void 0:i())?l:Promise.resolve(),cancelRetry:u,continueRetry:f}}const Tc=console;function Y_(){let e=[],t=0,n=f=>{f()},r=f=>{f()};const i=f=>{let h;t++;try{h=f()}finally{t--,t||l()}return h},o=f=>{t?e.push(f):kd(()=>{n(f)})},s=f=>(...h)=>{o(()=>{f(...h)})},l=()=>{const f=e;e=[],f.length&&kd(()=>{r(()=>{f.forEach(h=>{n(h)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f}}}const De=Y_();class Mm{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gu(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Ro?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class X_ extends Mm{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Tc,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||J_(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Su(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Rm(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}Array.isArray(this.options.queryKey);const s=W_(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};a(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(a(f),(r=this.options.behavior)==null||r.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=f.fetchOptions)==null?void 0:i.meta)){var h;this.dispatch({type:"fetch",meta:(h=f.fetchOptions)==null?void 0:h.meta})}const d=g=>{if(ws(g)&&g.silent||this.dispatch({type:"error",error:g}),!ws(g)){var y,w,S,m;(y=(w=this.cache.config).onError)==null||y.call(w,g,this),(S=(m=this.cache.config).onSettled)==null||S.call(m,this.state.data,g,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Am({fn:f.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:g=>{var y,w,S,m;if(typeof g>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(g),(y=(w=this.cache.config).onSuccess)==null||y.call(w,g,this),(S=(m=this.cache.config).onSettled)==null||S.call(m,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(g,y)=>{this.dispatch({type:"failed",failureCount:g,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Tl(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ws(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function J_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Z_ extends Fo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:Cc(o,n);let l=this.get(s);return l||(l=new X_({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Mn(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>Sd(r,i))}findAll(t,n){const[r]=Mn(t,n);return Object.keys(r).length>0?this.queries.filter(i=>Sd(r,i)):this.queries}notify(t){De.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){De.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class e0 extends Mm{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Tc,this.observers=[],this.state=t.state||t0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var T;return this.retryer=Am({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(P,b)=>{this.dispatch({type:"failed",failureCount:P,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(T=this.options.retry)!=null?T:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,l,a,u,f;if(!n){var h,d,g,y;this.dispatch({type:"loading",variables:this.options.variables}),await((h=(d=this.mutationCache.config).onMutate)==null?void 0:h.call(d,this.state.variables,this));const P=await((g=(y=this.options).onMutate)==null?void 0:g.call(y,this.state.variables));P!==this.state.context&&this.dispatch({type:"loading",context:P,variables:this.state.variables})}const T=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,T,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,T,this.state.variables,this.state.context)),await((l=(a=this.mutationCache.config).onSettled)==null?void 0:l.call(a,T,null,this.state.variables,this.state.context,this)),await((u=(f=this.options).onSettled)==null?void 0:u.call(f,T,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:T}),T}catch(T){try{var w,S,m,p,_,v,R,D;throw await((w=(S=this.mutationCache.config).onError)==null?void 0:w.call(S,T,this.state.variables,this.state.context,this)),await((m=(p=this.options).onError)==null?void 0:m.call(p,T,this.state.variables,this.state.context)),await((_=(v=this.mutationCache.config).onSettled)==null?void 0:_.call(v,void 0,T,this.state.variables,this.state.context,this)),await((R=(D=this.options).onSettled)==null?void 0:R.call(D,void 0,T,this.state.variables,this.state.context)),T}finally{this.dispatch({type:"error",error:T})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Tl(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function t0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class n0 extends Fo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new e0({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){De.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>wd(t,n))}findAll(t){return this.mutations.filter(n=>wd(t,n))}notify(t){De.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return De.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(kt)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function r0(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,a=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,u=a==null?void 0:a.pageParam,f=(a==null?void 0:a.direction)==="forward",h=(a==null?void 0:a.direction)==="backward",d=((o=e.state.data)==null?void 0:o.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[];let y=g,w=!1;const S=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>{var T;if((T=e.signal)!=null&&T.aborted)w=!0;else{var P;(P=e.signal)==null||P.addEventListener("abort",()=>{w=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),p=(D,T,P,b)=>(y=b?[T,...y]:[...y,T],b?[P,...D]:[...D,P]),_=(D,T,P,b)=>{if(w)return Promise.reject("Cancelled");if(typeof P>"u"&&!T&&D.length)return Promise.resolve(D);const q={queryKey:e.queryKey,pageParam:P,meta:e.options.meta};S(q);const he=m(q);return Promise.resolve(he).then(tt=>p(D,P,tt,b))};let v;if(!d.length)v=_([]);else if(f){const D=typeof u<"u",T=D?u:Td(e.options,d);v=_(d,D,T)}else if(h){const D=typeof u<"u",T=D?u:i0(e.options,d);v=_(d,D,T,!0)}else{y=[];const D=typeof e.options.getNextPageParam>"u";v=(l&&d[0]?l(d[0],0,d):!0)?_([],D,g[0]):Promise.resolve(p([],g[0],d[0]));for(let P=1;P{if(l&&d[P]?l(d[P],P,d):!0){const he=D?g[P]:Td(e.options,b);return _(b,D,he)}return Promise.resolve(p(b,g[P],d[P]))})}return v.then(D=>({pages:D,pageParams:y}))}}}}function Td(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function i0(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class o0{constructor(t={}){this.queryCache=t.queryCache||new Z_,this.mutationCache=t.mutationCache||new n0,this.logger=t.logger||Tc,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ys.subscribe(()=>{Ys.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Xs.subscribe(()=>{Xs.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Mn(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Ki(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=Q_(n,o);if(typeof s>"u")return;const l=Ki(t),a=this.defaultQueryOptions(l);return this.queryCache.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return De.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Mn(t,n),i=this.queryCache;De.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Mn(t,n,r),s=this.queryCache,l={type:"active",...i};return De.batch(()=>(s.findAll(i).forEach(a=>{a.reset()}),this.refetchQueries(l,o)))}cancelQueries(t,n,r){const[i,o={}]=Mn(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=De.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(o)));return Promise.all(s).then(kt).catch(kt)}invalidateQueries(t,n,r){const[i,o]=Mn(t,n,r);return De.batch(()=>{var s,l;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const a={...i,type:(s=(l=i.refetchType)!=null?l:i.type)!=null?s:"active"};return this.refetchQueries(a,o)})}refetchQueries(t,n,r){const[i,o]=Mn(t,n,r),s=De.batch(()=>this.queryCache.findAll(i).filter(a=>!a.isDisabled()).map(a=>{var u;return a.fetch(void 0,{...o,cancelRefetch:(u=o==null?void 0:o.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let l=Promise.all(s).then(kt);return o!=null&&o.throwOnError||(l=l.catch(kt)),l}fetchQuery(t,n,r){const i=Ki(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(kt).catch(kt)}fetchInfiniteQuery(t,n,r){const i=Ki(t,n,r);return i.behavior=r0(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(kt).catch(kt)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>yr(t)===yr(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Gs(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>yr(t)===yr(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Gs(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Cc(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class s0 extends Fo{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Rd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wu(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wu(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),yu(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&Od(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return a0(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kt)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ro||this.currentResult.isStale||!gu(this.options.staleTime))return;const n=Rm(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ro||this.options.enabled===!1||!gu(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ys.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,a=t!==r,u=a?t.state:this.currentQueryInitialState,f=a?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:d,error:g,errorUpdatedAt:y,fetchStatus:w,status:S}=h,m=!1,p=!1,_;if(n._optimisticResults){const P=this.hasListeners(),b=!P&&Rd(t,n),q=P&&Od(t,r,n,i);(b||q)&&(w=Tl(t.options.networkMode)?"fetching":"paused",d||(S="loading")),n._optimisticResults==="isRestoring"&&(w="idle")}if(n.keepPreviousData&&!h.dataUpdatedAt&&f!=null&&f.isSuccess&&S!=="error")_=f.data,d=f.dataUpdatedAt,S=f.status,m=!0;else if(n.select&&typeof h.data<"u")if(o&&h.data===(s==null?void 0:s.data)&&n.select===this.selectFn)_=this.selectResult;else try{this.selectFn=n.select,_=n.select(h.data),_=Su(o==null?void 0:o.data,_,n),this.selectResult=_,this.selectError=null}catch(P){this.selectError=P}else _=h.data;if(typeof n.placeholderData<"u"&&typeof _>"u"&&S==="loading"){let P;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))P=o.data;else if(P=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof P<"u")try{P=n.select(P),this.selectError=null}catch(b){this.selectError=b}typeof P<"u"&&(S="success",_=Su(o==null?void 0:o.data,P,n),p=!0)}this.selectError&&(g=this.selectError,_=this.selectResult,y=Date.now(),S="error");const v=w==="fetching",R=S==="loading",D=S==="error";return{status:S,fetchStatus:w,isLoading:R,isSuccess:S==="success",isError:D,isInitialLoading:R&&v,data:_,dataUpdatedAt:d,error:g,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!R,isLoadingError:D&&h.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:D&&h.dataUpdatedAt!==0,isStale:Rc(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,yu(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!this.trackedProps.size)return!0;const a=new Set(l??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const f=u;return this.currentResult[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!ws(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){De.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,l,a,u;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(a=(u=this.options).onSettled)==null||a.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function l0(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rd(e,t){return l0(e,t)||e.state.dataUpdatedAt>0&&wu(e,t,t.refetchOnMount)}function wu(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Rc(e,t)}return!1}function Od(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Rc(e,n)}function Rc(e,t){return e.isStaleByTime(t.staleTime)}function a0(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!yu(e.getCurrentResult(),t)}var Im={exports:{}},Lm={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -77,7 +77,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var pi=I;function u0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var c0=typeof Object.is=="function"?Object.is:u0,f0=pi.useState,d0=pi.useEffect,h0=pi.useLayoutEffect,p0=pi.useDebugValue;function m0(e,t){var n=t(),r=f0({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return h0(function(){i.value=n,i.getSnapshot=t,ua(i)&&o({inst:i})},[e,n,t]),d0(function(){return ua(i)&&o({inst:i}),e(function(){ua(i)&&o({inst:i})})},[e]),p0(n),n}function ua(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!c0(e,n)}catch{return!0}}function v0(e,t){return t()}var g0=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v0:m0;Lm.useSyncExternalStore=pi.useSyncExternalStore!==void 0?pi.useSyncExternalStore:g0;Im.exports=Lm;var Um=Im.exports;const y0=Um.useSyncExternalStore,Od=I.createContext(void 0),Fm=I.createContext(!1);function bm(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Od),window.ReactQueryClientContext):Od)}const _0=({context:e}={})=>{const t=I.useContext(bm(e,I.useContext(Fm)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},S0=({client:e,children:t,context:n,contextSharing:r=!1})=>{I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=bm(n,r);return I.createElement(Fm.Provider,{value:!n&&r},I.createElement(i.Provider,{value:e},t))},jm=I.createContext(!1),w0=()=>I.useContext(jm);jm.Provider;function E0(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const x0=I.createContext(E0()),k0=()=>I.useContext(x0);function C0(e,t){return typeof e=="function"?e(...t):!!e}const T0=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},R0=e=>{I.useEffect(()=>{e.clearReset()},[e])},P0=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&C0(n,[e.error,r]),O0=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},D0=(e,t)=>e.isLoading&&e.isFetching&&!t,N0=(e,t,n)=>(e==null?void 0:e.suspense)&&D0(t,n),A0=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function M0(e,t){const n=_0({context:e.context}),r=w0(),i=k0(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=De.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=De.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=De.batchCalls(o.onSettled)),O0(o),T0(o,i),R0(i);const[s]=I.useState(()=>new t(n,o)),l=s.getOptimisticResult(o);if(y0(I.useCallback(a=>{const u=r?()=>{}:s.subscribe(De.batchCalls(a));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),I.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),N0(o,l,r))throw A0(o,s,i);if(P0({result:l,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function I0(e,t,n){const r=Ki(e,t,n);return M0(r,s0)}const zm=()=>{const e=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,[t,n]=I.useState(e()),r=()=>{n(e())};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),{isDarkTheme:t}};function oo({children:e,theme:t="default",disabled:n,onClick:r}){const i={default:"mx-auto w-full max-w-[500px] md:max-w-[300px] block h-10 bg-button text-buttonText rounded-md text-[14px] leading-[20px] font-semibold enabled:hover:brightness-110 enabled:active:brightness-[1.2] disabled:opacity-40 transition-all",text:"h-6 text-[14px] leading-[24px] text-button hover:brightness-[1.2] active:brightness-[1.4] transition-all"}[t];return k.jsx("button",{className:i,disabled:n,onClick:r,children:e})}const L0=({onClick:e})=>{var t,n,r;const i=typeof window<"u"?(t=window)==null||(n=t.Telegram)==null||(r=n.WebApp)==null?void 0:r.BackButton:null;return i&&(I.useEffect(()=>(i.show(),()=>{i.hide()}),[]),I.useEffect(()=>{if(e)return i.onClick(e),()=>{i.offClick(e)}},[e])),null},U0=e=>I.createElement("svg",{width:12,height:20,viewBox:"0 0 12 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.53714 19.5928L0.292152 10.6788C-0.097384 10.3036 -0.097384 9.69738 0.292152 9.32117L9.53714 0.407154C10.0995 -0.135718 11.0144 -0.135718 11.5777 0.407154C12.14 0.950026 12.14 1.8311 11.5777 2.37397L3.66913 10.0005L11.5777 17.6251C12.14 18.1689 12.14 19.05 11.5777 19.5928C11.0144 20.1357 10.0995 20.1357 9.53714 19.5928Z",fill:"currentColor"}));function Pl({onBack:e,onCancel:t}){var n,r;return((r=(n=window==null?void 0:window.Telegram)==null?void 0:n.WebApp)==null?void 0:r.platform)!=="unknown"?k.jsx("div",{className:"h-3",children:k.jsx(L0,{onClick:e})}):k.jsxs("header",{className:"relative flex items-center justify-center h-[64px]",children:[t&&k.jsx("button",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-link hover:brightness-[1.2] active:brightness-[1.4] transition-all",onClick:t,children:"Отмена"}),e&&k.jsxs("button",{className:"flex items-center gap-[5px] absolute left-4 top-1/2 -translate-y-1/2 text-link hover:brightness-[1.2] active:brightness-[1.4] transition-all",onClick:e,children:[k.jsx(U0,{}),k.jsx("span",{children:"Назад"})]}),k.jsxs("div",{className:"flex flex-col items-center justify-center gap-0.5",children:[k.jsx("div",{className:"text-[17px] leading-[22px] font-semibold",children:"Split"}),k.jsx("div",{className:"text-hint text-[13px] leading-[18px] font-semibold opacity-70",children:"бот"})]})]})}const F0=e=>{const t=e?e.split(" "):[];return`${t[0]?t[0][0]:""}${t[1]?t[1][0]:""}`},b0=e=>{};function Rc({url:e,fullName:t,size:n=40}){const r=b0(t),{isDarkTheme:i}=zm(),s=!e&&t?r+"22":i?"#9AA6AC":"#EEF0F2",l=!e&&t?F0(t):null;return k.jsx("div",{className:"flex items-center justify-center rounded-full bg-cover bg-center",style:{width:n,height:n,backgroundColor:s,backgroundImage:`url(${e})`},children:l&&k.jsx("div",{className:"uppercase font-semibold text-main",style:{fontSize:.35*n+"px",lineHeight:.6*n+"px",color:r},children:l})})}const j0=(e,t)=>{const i=/[^0-9.]/,o=t.replace(/,/g,".").replace(i,"");if(!/^\d*.?\d*$/.test(o)||o.length>10)return e;const[l,a]=e.split("."),[u,f]=o.split(".");return l==="0"&&u==="00"||a==="0".repeat(2-1)&&f==="0".repeat(2)||f&&f.length>2?e:e===""&&o==="."?"0.":e==="0."&&o==="0"?"":e!=="0."&&o==="0"?"0.":o},Dd=e=>parseFloat(e)||0,z0=e=>e.toFixed(2);function B0({amount:e,onChange:t}){const[n,r]=I.useState(String(e)||"");I.useEffect(()=>{const o=Dd(n);e!==o&&r(z0(e))},[e,n]);const i=o=>{const s=o.target.value,l=j0(n,s);r(l);const a=Dd(l);t(a)};return k.jsx("input",{type:"text",className:"w-[117px] h-10 p-2 rounded-md border border-[#DDE2E4] dark:border-[#6E7C87] dark:bg-[#D5DADD] text-right text-[16px] text-text dark:text-[#48535B] leading-[24px] focus:ring-2 focus:ring-button focus:outline-none appearance-none transition-all selection:bg-button selection:text-buttonText",inputMode:"decimal",placeholder:"0",value:n,onFocus:o=>{o.target.select()},onChange:i})}function Nd({user:e,amount:t,onChange:n}){return e?k.jsxs("div",{className:"flex gap-3",children:[k.jsx(Rc,{url:e.url,size:48,fullName:e.fullName}),k.jsxs("div",{className:"flex flex-col -gap-0.5 flex-1 truncate",children:[k.jsx("div",{className:"truncate",children:e.fullName}),e.username&&k.jsxs("div",{className:"text-[14px] leading-[20px] text-hint truncate",children:["@",e.username]})]}),k.jsx(B0,{amount:t,onChange:n})]}):null}function oi({children:e,className:t}){return k.jsx("div",{className:Kn("panel p-4 pb-6 rounded-3xl bg-bg",t),children:e})}const Ad=e=>{let t;const n=new Set,r=(a,u)=>{const f=typeof a=="function"?a(t):a;if(!Object.is(f,t)){const h=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(d=>d(t,h))}},i=()=>t,l={setState:r,getState:i,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{n.clear()}};return t=e(r,i,l),l},$0=e=>e?Ad(e):Ad;var Bm={exports:{}},$m={};/** + */var pi=I;function u0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var c0=typeof Object.is=="function"?Object.is:u0,f0=pi.useState,d0=pi.useEffect,h0=pi.useLayoutEffect,p0=pi.useDebugValue;function m0(e,t){var n=t(),r=f0({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return h0(function(){i.value=n,i.getSnapshot=t,ua(i)&&o({inst:i})},[e,n,t]),d0(function(){return ua(i)&&o({inst:i}),e(function(){ua(i)&&o({inst:i})})},[e]),p0(n),n}function ua(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!c0(e,n)}catch{return!0}}function v0(e,t){return t()}var g0=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v0:m0;Lm.useSyncExternalStore=pi.useSyncExternalStore!==void 0?pi.useSyncExternalStore:g0;Im.exports=Lm;var Um=Im.exports;const y0=Um.useSyncExternalStore,Pd=I.createContext(void 0),Fm=I.createContext(!1);function jm(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Pd),window.ReactQueryClientContext):Pd)}const _0=({context:e}={})=>{const t=I.useContext(jm(e,I.useContext(Fm)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},S0=({client:e,children:t,context:n,contextSharing:r=!1})=>{I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=jm(n,r);return I.createElement(Fm.Provider,{value:!n&&r},I.createElement(i.Provider,{value:e},t))},bm=I.createContext(!1),w0=()=>I.useContext(bm);bm.Provider;function E0(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const x0=I.createContext(E0()),k0=()=>I.useContext(x0);function C0(e,t){return typeof e=="function"?e(...t):!!e}const T0=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},R0=e=>{I.useEffect(()=>{e.clearReset()},[e])},O0=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&C0(n,[e.error,r]),P0=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},D0=(e,t)=>e.isLoading&&e.isFetching&&!t,N0=(e,t,n)=>(e==null?void 0:e.suspense)&&D0(t,n),A0=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function M0(e,t){const n=_0({context:e.context}),r=w0(),i=k0(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=De.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=De.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=De.batchCalls(o.onSettled)),P0(o),T0(o,i),R0(i);const[s]=I.useState(()=>new t(n,o)),l=s.getOptimisticResult(o);if(y0(I.useCallback(a=>{const u=r?()=>{}:s.subscribe(De.batchCalls(a));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),I.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),N0(o,l,r))throw A0(o,s,i);if(O0({result:l,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function I0(e,t,n){const r=Ki(e,t,n);return M0(r,s0)}const zm=()=>{const e=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,[t,n]=I.useState(e()),r=()=>{n(e())};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),{isDarkTheme:t}};function oo({children:e,theme:t="default",disabled:n,onClick:r}){const i={default:"mx-auto w-full max-w-[500px] md:max-w-[300px] block h-10 bg-button text-buttonText rounded-md text-[14px] leading-[20px] font-semibold enabled:hover:brightness-110 enabled:active:brightness-[1.2] disabled:opacity-40 transition-all",text:"h-6 text-[14px] leading-[24px] text-button hover:brightness-[1.2] active:brightness-[1.4] transition-all"}[t];return k.jsx("button",{className:i,disabled:n,onClick:r,children:e})}const L0=({onClick:e})=>{var t,n,r;const i=typeof window<"u"?(t=window)==null||(n=t.Telegram)==null||(r=n.WebApp)==null?void 0:r.BackButton:null;return i&&(I.useEffect(()=>(i.show(),()=>{i.hide()}),[]),I.useEffect(()=>{if(e)return i.onClick(e),()=>{i.offClick(e)}},[e])),null},U0=e=>I.createElement("svg",{width:12,height:20,viewBox:"0 0 12 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.53714 19.5928L0.292152 10.6788C-0.097384 10.3036 -0.097384 9.69738 0.292152 9.32117L9.53714 0.407154C10.0995 -0.135718 11.0144 -0.135718 11.5777 0.407154C12.14 0.950026 12.14 1.8311 11.5777 2.37397L3.66913 10.0005L11.5777 17.6251C12.14 18.1689 12.14 19.05 11.5777 19.5928C11.0144 20.1357 10.0995 20.1357 9.53714 19.5928Z",fill:"currentColor"}));function Rl({onBack:e,onCancel:t}){var n,r;return((r=(n=window==null?void 0:window.Telegram)==null?void 0:n.WebApp)==null?void 0:r.platform)!=="unknown"?k.jsx("div",{className:"h-3",children:k.jsx(L0,{onClick:e})}):k.jsxs("header",{className:"relative flex items-center justify-center h-[64px]",children:[t&&k.jsx("button",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-link hover:brightness-[1.2] active:brightness-[1.4] transition-all",onClick:t,children:"Отмена"}),e&&k.jsxs("button",{className:"flex items-center gap-[5px] absolute left-4 top-1/2 -translate-y-1/2 text-link hover:brightness-[1.2] active:brightness-[1.4] transition-all",onClick:e,children:[k.jsx(U0,{}),k.jsx("span",{children:"Назад"})]}),k.jsxs("div",{className:"flex flex-col items-center justify-center gap-0.5",children:[k.jsx("div",{className:"text-[17px] leading-[22px] font-semibold",children:"Split"}),k.jsx("div",{className:"text-hint text-[13px] leading-[18px] font-semibold opacity-70",children:"бот"})]})]})}const F0=e=>{const t=e?e.split(" "):[];return`${t[0]?t[0][0]:""}${t[1]?t[1][0]:""}`},j0=e=>{};function b0({url:e,fullName:t,size:n=40}){const r=j0(t),{isDarkTheme:i}=zm(),s=!e&&t?r+"22":i?"#9AA6AC":"#EEF0F2",l=!e&&t?F0(t):null;return k.jsx("div",{className:"flex items-center justify-center rounded-full bg-cover bg-center",style:{width:n,height:n,backgroundColor:s,backgroundImage:`url(${e})`},children:l&&k.jsx("div",{className:"uppercase font-semibold text-main",style:{fontSize:.35*n+"px",lineHeight:.6*n+"px",color:r},children:l})})}function Oc({user:e,size:t=40}){const n=[...e!=null&&e.first_name?[e.first_name]:[],...e!=null&&e.last_name?[e.last_name]:[]].join(" ");return k.jsxs("div",{className:"w-full flex gap-2 items-center truncate",children:[k.jsx(b0,{url:e==null?void 0:e.profile_photo,size:t,fullName:n}),k.jsx("div",{className:"flex flex-col -gap-0.5 flex-1 text-left truncate text-[16px] leading-[20px]",children:e?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"truncate",children:[e.first_name," ",e.last_name]}),e.username&&k.jsxs("div",{className:"text-[14px] leading-[18px] text-hint truncate",children:["@",e.username]})]}):k.jsx("div",{className:"text-hint truncate",children:"(выберите)"})})]})}const z0=(e,t)=>{const i=/[^0-9.]/,o=t.replace(/,/g,".").replace(i,"");if(!/^\d*.?\d*$/.test(o)||o.length>10)return e;const[l,a]=e.split("."),[u,f]=o.split(".");return l==="0"&&u==="00"||a==="0".repeat(2-1)&&f==="0".repeat(2)||f&&f.length>2?e:e===""&&o==="."?"0.":e==="0."&&o==="0"?"":e!=="0."&&o==="0"?"0.":o},Dd=e=>parseFloat(e)||0,B0=e=>e.toFixed(2);function $0({amount:e,onChange:t}){const[n,r]=I.useState(String(e)||"");I.useEffect(()=>{const o=Dd(n);e!==o&&r(B0(e))},[e,n]);const i=o=>{const s=o.target.value,l=z0(n,s);r(l);const a=Dd(l);t(a)};return k.jsx("input",{type:"text",className:"w-[117px] h-10 p-2 rounded-md border border-[#DDE2E4] dark:border-[#6E7C87] dark:bg-[#D5DADD] text-right text-[16px] text-text dark:text-[#48535B] leading-[24px] focus:ring-2 focus:ring-button focus:outline-none appearance-none transition-all selection:bg-button selection:text-buttonText",inputMode:"decimal",placeholder:"0",value:n,onFocus:o=>{o.target.select()},onChange:i})}const Nd=e=>{let t;const n=new Set,r=(a,u)=>{const f=typeof a=="function"?a(t):a;if(!Object.is(f,t)){const h=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(d=>d(t,h))}},i=()=>t,l={setState:r,getState:i,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{n.clear()}};return t=e(r,i,l),l},q0=e=>e?Nd(e):Nd;var Bm={exports:{}},$m={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -85,11 +85,11 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ol=I,q0=Um;function H0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Q0=typeof Object.is=="function"?Object.is:H0,W0=q0.useSyncExternalStore,V0=Ol.useRef,K0=Ol.useEffect,G0=Ol.useMemo,Y0=Ol.useDebugValue;$m.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=V0(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=G0(function(){function a(g){if(!u){if(u=!0,f=g,g=r(g),i!==void 0&&s.hasValue){var y=s.value;if(i(y,g))return h=y}return h=g}if(y=h,Q0(f,g))return y;var S=r(g);return i!==void 0&&i(y,S)?y:(f=g,h=S)}var u=!1,f,h,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,i]);var l=W0(e,o[0],o[1]);return K0(function(){s.hasValue=!0,s.value=l},[l]),Y0(l),l};Bm.exports=$m;var X0=Bm.exports;const J0=ol(X0),{useSyncExternalStoreWithSelector:Z0}=J0;function e1(e,t=e.getState,n){const r=Z0(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return I.useDebugValue(r),r}const Md=e=>{const t=typeof e=="function"?$0(e):e,n=(r,i)=>e1(t,r,i);return Object.assign(n,t),n},t1=e=>e?Md(e):Md,n1=e=>{const t={Ё:"YO",Й:"I",Ц:"TS",У:"U",К:"K",Е:"E",Н:"N",Г:"G",Ш:"SH",Щ:"SCH",З:"Z",Х:"H",Ъ:"",ё:"yo",й:"i",ц:"ts",у:"u",к:"k",е:"e",н:"n",г:"g",ш:"sh",щ:"sch",з:"z",х:"h",ъ:"",Ф:"F",Ы:"I",В:"V",А:"A",П:"P",Р:"R",О:"O",Л:"L",Д:"D",Ж:"ZH",Э:"E",ф:"f",ы:"i",в:"v",а:"a",п:"p",р:"r",о:"o",л:"l",д:"d",ж:"zh",э:"e",Я:"Ya",Ч:"CH",С:"S",М:"M",И:"I",Т:"T",Ь:"",Б:"B",Ю:"YU",я:"ya",ч:"ch",с:"s",м:"m",и:"i",т:"t",ь:"",б:"b",ю:"yu"};return e.split("").map(n=>t[n]||"").join("")},r1=e=>({_name:e,id:Math.round(Math.random()*1e10),fullName:(e+" ").repeat(2),username:n1(e),url:`https://i.pravatar.cc/48/${Math.round(Math.random()*1e10)}`}),i1=()=>{const e=["Александр","Дмитрий","Максим","Сергей","Андрей","Алексей","Артём","Илья","Кирилл","Михаил","Никита","Матвей","Роман","Егор","Арсений","Иван","Денис","Евгений","Тимофей","Владислав","Игорь","Владимир","Павел","Руслан","Марк","Константин","Тимур","Олег","Ярослав","Антон","Николай","Данил","Анастасия","Мария","Анна","Виктория","Екатерина","Наталья","Марина","Полина","София","Дарья","Алиса","Ксения","Александра","Елена"];return e[Math.floor(Math.random()*e.length)]},o1=e=>{const t=[];do{const n=i1();t.includes(n)||t.push(n)}while(t.length!==e);return t},s1=o1(6),Pc=s1.map(e=>r1(e)),Id=Pc.slice(0,4).map((e,t)=>({spokenName:e._name,user:Math.random()>.3?e:void 0,isPayed:t<2,amount:Math.round(Math.random()*100)})),Js=[{id:"RUB",title:"Рубль",symbol:"₽",in:"В рублях",decimals:4,visibleDecimals:2},{id:"GEL",title:"Лари",symbol:"₾",in:"В лари",decimals:4,visibleDecimals:2},{id:"TRY",title:"Лира",symbol:"₺",in:"В лирах",decimals:4,visibleDecimals:2},{id:"EUR",title:"Евро",symbol:"€",in:"В евро",decimals:4,visibleDecimals:2}],l1={users:Pc,currencies:Js,text:Id.map(e=>`${e.spokenName} ${e.isPayed?"заплатил":"должен"} ${e.amount}`).join(", "),shares:Id,currency:Js[0]},wi=t1((e,t)=>({users:Pc,setUsers:n=>e({users:n}),selectUserIndex:null,setSelectUserIndex:n=>e({selectUserIndex:n}),currencies:Js,currency:Js[0],setCurrency:n=>{e({currency:n}),e({transaction:{...t().transaction,currency:n}})},transaction:l1,setTransaction:n=>e({transaction:n})}));function a1(){var t;const{transaction:e}=wi();return k.jsxs(oi,{className:"mt-10 text-[12px] break-words opacity-25",children:[k.jsx("h2",{children:"Debug"}),k.jsx("strong",{children:"href = "}),location.href,k.jsx("br",{}),k.jsx("br",{}),k.jsx("strong",{children:"window.Telegram.Webapp = "}),JSON.stringify((t=window.Telegram)==null?void 0:t.WebApp),k.jsx("br",{}),k.jsx("br",{}),k.jsx("strong",{children:"transaction = "}),JSON.stringify(e)]})}function Dl({children:e,className:t}){return k.jsx("div",{className:Kn("fixed top-0 left-0 w-full h-full overflow-y-auto text-text bg-bg2",t),children:k.jsxs("div",{className:"limiter",children:[e,k.jsx(a1,{})]})})}var vn={DEBUG:!1,LIB_VERSION:"2.47.0"},Ee;if(typeof window>"u"){var Ld={hostname:""};Ee={navigator:{userAgent:""},document:{location:Ld,referrer:""},screen:{width:0,height:0},location:Ld}}else Ee=window;var Nl=Array.prototype,u1=Function.prototype,qm=Object.prototype,bn=Nl.slice,bo=qm.toString,Al=qm.hasOwnProperty,Pe=Ee.console,jn=Ee.navigator,fe=Ee.document,os=Ee.opera,Zs=Ee.screen,en=jn.userAgent,ca=u1.bind,Ud=Nl.forEach,Fd=Nl.indexOf,bd=Nl.map,c1=Array.isArray,Eu={},c={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},ue={log:function(){if(vn.DEBUG&&!c.isUndefined(Pe)&&Pe)try{Pe.log.apply(Pe,arguments)}catch{c.each(arguments,function(t){Pe.log(t)})}},warn:function(){if(vn.DEBUG&&!c.isUndefined(Pe)&&Pe){var e=["Mixpanel warning:"].concat(c.toArray(arguments));try{Pe.warn.apply(Pe,e)}catch{c.each(e,function(n){Pe.warn(n)})}}},error:function(){if(vn.DEBUG&&!c.isUndefined(Pe)&&Pe){var e=["Mixpanel error:"].concat(c.toArray(arguments));try{Pe.error.apply(Pe,e)}catch{c.each(e,function(n){Pe.error(n)})}}},critical:function(){if(!c.isUndefined(Pe)&&Pe){var e=["Mixpanel error:"].concat(c.toArray(arguments));try{Pe.error.apply(Pe,e)}catch{c.each(e,function(n){Pe.error(n)})}}}},fa=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(ue,arguments)}},Oc=function(e){return{log:fa(ue.log,e),error:fa(ue.error,e),critical:fa(ue.critical,e)}};c.bind=function(e,t){var n,r;if(ca&&e.bind===ca)return ca.apply(e,bn.call(arguments,1));if(!c.isFunction(e))throw new TypeError;return n=bn.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(bn.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var s=e.apply(o,n.concat(bn.call(arguments)));return Object(s)===s?s:o},r};c.each=function(e,t,n){if(e!=null){if(Ud&&e.forEach===Ud)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r0&&(t[r]=n)}),t};c.truncate=function(e,t){var n;return typeof e=="string"?n=e.slice(0,t):c.isArray(e)?(n=[],c.each(e,function(r){n.push(c.truncate(r,t))})):c.isObject(e)?(n={},c.each(e,function(r,i){n[i]=c.truncate(r,t)})):n=e,n};c.JSONEncode=function(){return function(e){var t=e,n=function(i){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(i)?'"'+i.replace(o,function(l){var a=s[l];return typeof a=="string"?a:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},r=function(i,o){var s="",l=" ",a=0,u="",f="",h=0,d=s,g=[],y=o[i];switch(y&&typeof y=="object"&&typeof y.toJSON=="function"&&(y=y.toJSON(i)),typeof y){case"string":return n(y);case"number":return isFinite(y)?String(y):"null";case"boolean":case"null":return String(y);case"object":if(!y)return"null";if(s+=l,g=[],bo.apply(y)==="[object Array]"){for(h=y.length,a=0;a{const t=typeof e=="function"?q0(e):e,n=(r,i)=>t1(t,r,i);return Object.assign(n,t),n},n1=e=>e?Ad(e):Ad,Eu=[{id:"RUB",title:"Рубль",symbol:"₽",in:"В рублях",decimals:4,visible_decimals:2},{id:"GEL",title:"Лари",symbol:"₾",in:"В лари",decimals:4,visible_decimals:2},{id:"TRY",title:"Лира",symbol:"₺",in:"В лирах",decimals:4,visible_decimals:2},{id:"EUR",title:"Евро",symbol:"€",in:"В евро",decimals:4,visible_decimals:2}],r1=e=>{const t={Ё:"YO",Й:"I",Ц:"TS",У:"U",К:"K",Е:"E",Н:"N",Г:"G",Ш:"SH",Щ:"SCH",З:"Z",Х:"H",Ъ:"",ё:"yo",й:"i",ц:"ts",у:"u",к:"k",е:"e",н:"n",г:"g",ш:"sh",щ:"sch",з:"z",х:"h",ъ:"",Ф:"F",Ы:"I",В:"V",А:"A",П:"P",Р:"R",О:"O",Л:"L",Д:"D",Ж:"ZH",Э:"E",ф:"f",ы:"i",в:"v",а:"a",п:"p",р:"r",о:"o",л:"l",д:"d",ж:"zh",э:"e",Я:"Ya",Ч:"CH",С:"S",М:"M",И:"I",Т:"T",Ь:"",Б:"B",Ю:"YU",я:"ya",ч:"ch",с:"s",м:"m",и:"i",т:"t",ь:"",б:"b",ю:"yu"};return e.split("").map(n=>t[n]||"").join("")},i1=e=>({id:Math.round(Math.random()*1e10),first_name:e,last_name:e,username:Math.random()>.2?r1(e):void 0,profile_photo:`https://i.pravatar.cc/48/${Math.round(Math.random()*1e10)}`,_name:e}),o1=()=>{const e=["Александр","Дмитрий","Максим","Сергей","Андрей","Алексей","Артём","Илья","Кирилл","Михаил","Никита","Матвей","Роман","Егор","Арсений","Иван","Денис","Евгений","Тимофей","Владислав","Игорь","Владимир","Павел","Руслан","Марк","Константин","Тимур","Олег","Ярослав","Антон","Николай","Данил","Анастасия","Мария","Анна","Виктория","Екатерина","Наталья","Марина","Полина","София","Дарья","Алиса","Ксения","Александра","Елена"];return e[Math.floor(Math.random()*e.length)]},s1=e=>{const t=[];do{const n=o1();t.includes(n)||t.push(n)}while(t.length!==e);return t},l1=s1(6),qm=l1.map(e=>i1(e)),Md=qm.slice(0,4).map((e,t)=>({normalized_name:e._name,related_user_id:Math.random()>.3?e.id:void 0,is_payer:t<2,amount:Math.round(Math.random()*100)})),a1={id:"1",is_voice:!0,raw_text:Md.map(e=>`${e.normalized_name} ${e.is_payer?"заплатил":"должен"} ${e.amount}`).join(", "),shares:Md,is_confirmed:!1,currency_id:Eu[0].id},wi=n1((e,t)=>({users:qm,setUsers:n=>e({users:n}),selectUserIndex:null,setSelectUserIndex:n=>e({selectUserIndex:n}),currencies:Eu,currency:Eu[0],setCurrency:n=>{e({transaction:{...t().transaction,currency_id:n}})},transaction:a1,setTransaction:n=>e({transaction:n})})),Pl=()=>{const{users:e,transaction:t,setTransaction:n,selectUserIndex:r}=wi(),i=t.shares.map(f=>f.related_user_id),o=e.filter(f=>!i.includes(f.id)),s=t.shares.every(f=>f.related_user_id);return{users:e,unrelatedUsers:o,isRelationsComplete:s,getUserById:f=>e.find(h=>h.id===f),selectUser:f=>()=>{if(r!==null){const h=[...t.shares],d=h.findIndex(g=>g.related_user_id===f.id);h[r].related_user_id=f.id,~d&&(h[d].normalized_name?delete h[d].related_user_id:h.splice(d,1)),n({...t,shares:h})}else{const h=[...t.shares,{is_payer:!1,amount:0,related_user_id:f.id}];n({...t,shares:h})}history.back()},deleteUser:f=>()=>{const h=[...t.shares];h.splice(f,1),n({...t,shares:h}),history.back()}}};function Id({related_user_id:e,amount:t,onChange:n}){const{getUserById:r}=Pl(),i=e?r(e):void 0;return i?k.jsxs("div",{className:"flex gap-3",children:[k.jsx(Oc,{user:i,size:48}),k.jsx($0,{amount:t,onChange:n})]}):null}function oi({children:e,className:t}){return k.jsx("div",{className:Kn("panel p-4 pb-6 rounded-3xl bg-bg",t),children:e})}function u1(){var n;const{transaction:e,users:t}=wi();return k.jsxs(oi,{className:"mt-10 text-[12px] break-words opacity-40",children:[k.jsx("h2",{children:"Debug"}),k.jsx("strong",{children:"href = "}),location.href,k.jsx("br",{}),k.jsx("br",{}),k.jsx("strong",{children:"transaction = "}),k.jsx("pre",{children:JSON.stringify(e,null,2)}),k.jsx("br",{}),k.jsx("br",{}),k.jsx("strong",{children:"users = "}),k.jsx("pre",{children:JSON.stringify(t,null,2)}),k.jsx("br",{}),k.jsx("br",{}),k.jsx("strong",{children:"window.Telegram.Webapp = "}),k.jsx("pre",{children:JSON.stringify((n=window.Telegram)==null?void 0:n.WebApp,null,2)})]})}function Dl({children:e,className:t}){return k.jsx("div",{className:Kn("fixed top-0 left-0 w-full h-full overflow-y-auto text-text bg-bg2",t),children:k.jsxs("div",{className:"limiter",children:[e,k.jsx(u1,{})]})})}var vn={DEBUG:!1,LIB_VERSION:"2.47.0"},Ee;if(typeof window>"u"){var Ld={hostname:""};Ee={navigator:{userAgent:""},document:{location:Ld,referrer:""},screen:{width:0,height:0},location:Ld}}else Ee=window;var Nl=Array.prototype,c1=Function.prototype,Hm=Object.prototype,jn=Nl.slice,jo=Hm.toString,Al=Hm.hasOwnProperty,Oe=Ee.console,bn=Ee.navigator,fe=Ee.document,os=Ee.opera,Js=Ee.screen,en=bn.userAgent,ca=c1.bind,Ud=Nl.forEach,Fd=Nl.indexOf,jd=Nl.map,f1=Array.isArray,xu={},c={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},ue={log:function(){if(vn.DEBUG&&!c.isUndefined(Oe)&&Oe)try{Oe.log.apply(Oe,arguments)}catch{c.each(arguments,function(t){Oe.log(t)})}},warn:function(){if(vn.DEBUG&&!c.isUndefined(Oe)&&Oe){var e=["Mixpanel warning:"].concat(c.toArray(arguments));try{Oe.warn.apply(Oe,e)}catch{c.each(e,function(n){Oe.warn(n)})}}},error:function(){if(vn.DEBUG&&!c.isUndefined(Oe)&&Oe){var e=["Mixpanel error:"].concat(c.toArray(arguments));try{Oe.error.apply(Oe,e)}catch{c.each(e,function(n){Oe.error(n)})}}},critical:function(){if(!c.isUndefined(Oe)&&Oe){var e=["Mixpanel error:"].concat(c.toArray(arguments));try{Oe.error.apply(Oe,e)}catch{c.each(e,function(n){Oe.error(n)})}}}},fa=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(ue,arguments)}},Pc=function(e){return{log:fa(ue.log,e),error:fa(ue.error,e),critical:fa(ue.critical,e)}};c.bind=function(e,t){var n,r;if(ca&&e.bind===ca)return ca.apply(e,jn.call(arguments,1));if(!c.isFunction(e))throw new TypeError;return n=jn.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(jn.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var s=e.apply(o,n.concat(jn.call(arguments)));return Object(s)===s?s:o},r};c.each=function(e,t,n){if(e!=null){if(Ud&&e.forEach===Ud)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r0&&(t[r]=n)}),t};c.truncate=function(e,t){var n;return typeof e=="string"?n=e.slice(0,t):c.isArray(e)?(n=[],c.each(e,function(r){n.push(c.truncate(r,t))})):c.isObject(e)?(n={},c.each(e,function(r,i){n[i]=c.truncate(r,t)})):n=e,n};c.JSONEncode=function(){return function(e){var t=e,n=function(i){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(i)?'"'+i.replace(o,function(l){var a=s[l];return typeof a=="string"?a:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},r=function(i,o){var s="",l=" ",a=0,u="",f="",h=0,d=s,g=[],y=o[i];switch(y&&typeof y=="object"&&typeof y.toJSON=="function"&&(y=y.toJSON(i)),typeof y){case"string":return n(y);case"number":return isFinite(y)?String(y):"null";case"boolean":case"null":return String(y);case"object":if(!y)return"null";if(s+=l,g=[],jo.apply(y)==="[object Array]"){for(h=y.length,a=0;a="0"&&t<="9";)y+=t,o();if(t===".")for(y+=".";o()&&t>="0"&&t<="9";)y+=t;if(t==="e"||t==="E")for(y+=t,o(),(t==="-"||t==="+")&&(y+=t,o());t>="0"&&t<="9";)y+=t,o();if(g=+y,!isFinite(g))i("Bad number");else return g},l=function(){var g,y,S="",E;if(t==='"')for(;o();){if(t==='"')return o(),S;if(t==="\\")if(o(),t==="u"){for(E=0,y=0;y<4&&(g=parseInt(o(),16),!!isFinite(g));y+=1)E=E*16+g;S+=String.fromCharCode(E)}else if(typeof n[t]=="string")S+=n[t];else break;else S+=t}i("Bad string")},a=function(){for(;t&&t<=" ";)o()},u=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}i('Unexpected "'+t+'"')},f,h=function(){var g=[];if(t==="["){if(o("["),a(),t==="]")return o("]"),g;for(;t;){if(g.push(f()),a(),t==="]")return o("]"),g;o(","),a()}}i("Bad array")},d=function(){var g,y={};if(t==="{"){if(o("{"),a(),t==="}")return o("}"),y;for(;t;){if(g=l(),a(),o(":"),Object.hasOwnProperty.call(y,g)&&i('Duplicate key "'+g+'"'),y[g]=f(),a(),t==="}")return o("}"),y;o(","),a()}}i("Bad object")};return f=function(){switch(a(),t){case"{":return d();case"[":return h();case'"':return l();case"-":return s();default:return t>="0"&&t<="9"?s():u()}},function(g){var y;return r=g,e=0,t=" ",y=f(),a(),t&&i("Syntax error"),y}}();c.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n,r,i,o,s,l,a,u,f=0,h=0,d="",g=[];if(!e)return e;e=c.utf8Encode(e);do n=e.charCodeAt(f++),r=e.charCodeAt(f++),i=e.charCodeAt(f++),u=n<<16|r<<8|i,o=u>>18&63,s=u>>12&63,l=u>>6&63,a=u&63,g[h++]=t.charAt(o)+t.charAt(s)+t.charAt(l)+t.charAt(a);while(f="0"&&t<="9";)y+=t,o();if(t===".")for(y+=".";o()&&t>="0"&&t<="9";)y+=t;if(t==="e"||t==="E")for(y+=t,o(),(t==="-"||t==="+")&&(y+=t,o());t>="0"&&t<="9";)y+=t,o();if(g=+y,!isFinite(g))i("Bad number");else return g},l=function(){var g,y,w="",S;if(t==='"')for(;o();){if(t==='"')return o(),w;if(t==="\\")if(o(),t==="u"){for(S=0,y=0;y<4&&(g=parseInt(o(),16),!!isFinite(g));y+=1)S=S*16+g;w+=String.fromCharCode(S)}else if(typeof n[t]=="string")w+=n[t];else break;else w+=t}i("Bad string")},a=function(){for(;t&&t<=" ";)o()},u=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}i('Unexpected "'+t+'"')},f,h=function(){var g=[];if(t==="["){if(o("["),a(),t==="]")return o("]"),g;for(;t;){if(g.push(f()),a(),t==="]")return o("]"),g;o(","),a()}}i("Bad array")},d=function(){var g,y={};if(t==="{"){if(o("{"),a(),t==="}")return o("}"),y;for(;t;){if(g=l(),a(),o(":"),Object.hasOwnProperty.call(y,g)&&i('Duplicate key "'+g+'"'),y[g]=f(),a(),t==="}")return o("}"),y;o(","),a()}}i("Bad object")};return f=function(){switch(a(),t){case"{":return d();case"[":return h();case'"':return l();case"-":return s();default:return t>="0"&&t<="9"?s():u()}},function(g){var y;return r=g,e=0,t=" ",y=f(),a(),t&&i("Syntax error"),y}}();c.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n,r,i,o,s,l,a,u,f=0,h=0,d="",g=[];if(!e)return e;e=c.utf8Encode(e);do n=e.charCodeAt(f++),r=e.charCodeAt(f++),i=e.charCodeAt(f++),u=n<<16|r<<8|i,o=u>>18&63,s=u>>12&63,l=u>>6&63,a=u&63,g[h++]=t.charAt(o)+t.charAt(s)+t.charAt(l)+t.charAt(a);while(f127&&s<2048?l=String.fromCharCode(s>>6|192,s&63|128):l=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),l!==null&&(r>n&&(t+=e.substring(n,r)),t+=l,n=r=o+1)}return r>n&&(t+=e.substring(n,e.length)),t};c.UUID=function(){var e=function(){var r=1*new Date,i;if(Ee.performance&&Ee.performance.now)i=Ee.performance.now();else for(i=0;r==1*new Date;)i++;return r.toString(16)+Math.floor(i).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},n=function(){var r=en,i,o,s=[],l=0;function a(u,f){var h,d=0;for(h=0;h=4&&(l=a(l,s),s=[]);return s.length>0&&(l=a(l,s)),l.toString(16)};return function(){var r=(Zs.height*Zs.width).toString(16);return e()+"-"+t()+"-"+n()+"-"+r+"-"+e()}}();var jd=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];c.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(i){if(!fe.getElementsByTagName)return[];var o=i.split(" "),s,l,a,u,f,h,d,g,y,S,E=[fe];for(h=0;h-1){l=s.split("#"),a=l[0];var m=l[1],p=fe.getElementById(m);if(!p||a&&p.nodeName.toLowerCase()!=a)return[];E=[p];continue}if(s.indexOf(".")>-1){l=s.split("."),a=l[0];var _=l[1];for(a||(a="*"),u=[],f=0,d=0;d-1};break;default:O=function(j){return j.getAttribute(R)}}for(E=[],S=0,d=0;d=3?t[2]:""},properties:function(){return c.extend(c.strip_empty_properties({$os:c.info.os(),$browser:c.info.browser(en,jn.vendor,os),$referrer:fe.referrer,$referring_domain:c.info.referringDomain(fe.referrer),$device:c.info.device(en)}),{$current_url:Ee.location.href,$browser_version:c.info.browserVersion(en,jn.vendor,os),$screen_height:Zs.height,$screen_width:Zs.width,mp_lib:"web",$lib_version:vn.LIB_VERSION,$insert_id:Dc(),time:c.timestamp()/1e3})},people_properties:function(){return c.extend(c.strip_empty_properties({$os:c.info.os(),$browser:c.info.browser(en,jn.vendor,os)}),{$browser_version:c.info.browserVersion(en,jn.vendor,os)})},mpPageViewProperties:function(){return c.strip_empty_properties({current_page_title:fe.title,current_domain:Ee.location.hostname,current_url_path:Ee.location.pathname,current_url_protocol:Ee.location.protocol,current_url_search:Ee.location.search})}};var Dc=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},p1=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,m1=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,zd=function(e){var t=m1,n=e.split("."),r=n[n.length-1];(r.length>4||r==="com"||r==="org")&&(t=p1);var i=e.match(t);return i?i[0]:""},tl=null,nl=null;typeof JSON<"u"&&(tl=JSON.stringify,nl=JSON.parse);tl=tl||c.JSONEncode;nl=nl||c.JSONDecode;c.toArray=c.toArray;c.isObject=c.isObject;c.JSONEncode=c.JSONEncode;c.JSONDecode=c.JSONDecode;c.isBlockedUA=c.isBlockedUA;c.isEmptyObject=c.isEmptyObject;c.info=c.info;c.info.device=c.info.device;c.info.browser=c.info.browser;c.info.browserVersion=c.info.browserVersion;c.info.properties=c.info.properties;var xn=function(){};xn.prototype.create_properties=function(){};xn.prototype.event_handler=function(){};xn.prototype.after_track_handler=function(){};xn.prototype.init=function(e){return this.mp=e,this};xn.prototype.track=function(e,t,n,r){var i=this,o=c.dom_query(e);if(o.length===0){ue.error("The DOM query ("+e+") returned 0 elements");return}return c.each(o,function(s){c.register_event(s,this.override_event,function(l){var a={},u=i.create_properties(n,this),f=i.mp.get_config("track_links_timeout");i.event_handler(l,this,a),window.setTimeout(i.track_callback(r,u,a,!0),f),i.mp.track(t,u,i.track_callback(r,u,a))})},this),!0};xn.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,!(e&&e(r,t)===!1)&&i.after_track_handler(t,n,r))}};xn.prototype.create_properties=function(e,t){var n;return typeof e=="function"?n=e(t):n=c.extend({},e),n};var mi=function(){this.override_event="click"};c.inherit(mi,xn);mi.prototype.create_properties=function(e,t){var n=mi.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n};mi.prototype.event_handler=function(e,t,n){n.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",n.href=t.href,n.new_tab||e.preventDefault()};mi.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var Ml=function(){this.override_event="submit"};c.inherit(Ml,xn);Ml.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()};Ml.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var v1=Oc("lock"),Hm=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Hm.prototype.withLock=function(e,t,n){!n&&typeof t!="function"&&(n=t,t=null);var r=n||new Date().getTime()+"|"+Math.random(),i=new Date().getTime(),o=this.storageKey,s=this.pollIntervalMS,l=this.timeoutMS,a=this.storage,u=o+":X",f=o+":Y",h=o+":Z",d=function(p){t&&t(p)},g=function(p){if(new Date().getTime()-i>l){v1.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+r+"]"),a.removeItem(h),a.removeItem(f),E();return}setTimeout(function(){try{p()}catch(_){d(_)}},s*(Math.random()+.1))},y=function(p,_){p()?_():g(function(){y(p,_)})},S=function(){var p=a.getItem(f);if(p&&p!==r)return!1;if(a.setItem(f,r),a.getItem(f)===r)return!0;if(!el(a,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},E=function(){a.setItem(u,r),y(S,function(){if(a.getItem(u)===r){m();return}g(function(){if(a.getItem(f)!==r){E();return}y(function(){return!a.getItem(h)},m)})})},m=function(){a.setItem(h,"1");try{e()}finally{a.removeItem(h),a.getItem(f)===r&&a.removeItem(f),a.getItem(u)===r&&a.removeItem(u)}};try{if(el(a,!0))E();else throw new Error("localStorage support check failed")}catch(p){d(p)}};var Bd=Oc("batch"),rr=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||c.bind(Bd.error,Bd),this.lock=new Hm(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};rr.prototype.enqueue=function(e,t,n){var r={id:Dc(),flushAfter:new Date().getTime()+t*2,payload:e};this.lock.withLock(c.bind(function(){var o;try{var s=this.readFromStorage();s.push(r),o=this.saveToStorage(s),o&&this.memQueue.push(r)}catch{this.reportError("Error enqueueing item",e),o=!1}n&&n(o)},this),c.bind(function(o){this.reportError("Error acquiring storage lock",o),n&&n(!1)},this),this.pid)};rr.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengtho.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var $d=function(e,t){var n=[];return c.each(e,function(r){r.id&&!t[r.id]&&n.push(r)}),n};rr.prototype.removeItemsByID=function(e,t){var n={};c.each(e,function(i){n[i]=!0}),this.memQueue=$d(this.memQueue,n);var r=c.bind(function(){var i;try{var o=this.readFromStorage();if(o=$d(o,n),i=this.saveToStorage(o),i){o=this.readFromStorage();for(var s=0;s5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:u,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[d]}),h=!1):this.reportError("[dupe] found item with no ID",{item:u}),h&&o.push(f)}s[u.id]=f},this),o.length<1){this.resetFlush();return}this.requestInProgress=!0;var l=c.bind(function(u){this.requestInProgress=!1;try{var f=!1;if(e.unloading)this.queue.updatePayloads(s);else if(c.isObject(u)&&u.error==="timeout"&&new Date().getTime()-n>=t)this.reportError("Network timeout; retrying"),this.flush();else if(c.isObject(u)&&u.xhr_req&&(u.xhr_req.status>=500||u.xhr_req.status===429||u.error==="timeout")){var h=this.flushInterval*2,d=u.xhr_req.responseHeaders;if(d){var g=d["Retry-After"];g&&(h=parseInt(g,10)*1e3||h)}h=Math.min(g1,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h)}else if(c.isObject(u)&&u.xhr_req&&u.xhr_req.status===413)if(i.length>1){var y=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,y,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),f=!0;else f=!0;f&&(this.queue.removeItemsByID(c.map(i,function(S){return S.id}),c.bind(function(S){S?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),c.each(i,c.bind(function(S){var E=S.id;E?(this.itemIdsSentSuccessfully[E]=this.itemIdsSentSuccessfully[E]||0,this.itemIdsSentSuccessfully[E]++,this.itemIdsSentSuccessfully[E]>5&&this.reportError("[dupe] item ID sent too many times",{item:S,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[E]})):this.reportError("[dupe] found item with no ID while removing",{item:S})},this)))}catch(S){this.reportError("Error handling API response",S),this.resetFlush()}},this),a={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(a.transport="sendBeacon"),so.log("MIXPANEL REQUEST:",o),this.sendRequest(o,a,l)}catch(u){this.reportError("Error flushing request queue",u),this.resetFlush()}};sn.prototype.reportError=function(e,t){if(so.error.apply(so.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(n){so.error(n)}};var y1="__mp_opt_in_out_";function _1(e,t){Vm(!0,e,t)}function S1(e,t){Vm(!1,e,t)}function w1(e,t){return Wm(e,t)==="1"}function Qm(e,t){if(x1(t))return ue.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n=Wm(e,t)==="0";return n&&ue.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function Ei(e){return Mc(e,function(t){return this.get_config(t)})}function ir(e){return Mc(e,function(t){return this._get_config(t)})}function xi(e){return Mc(e,function(t){return this._get_config(t)})}function E1(e,t){t=t||{},Nc(t).remove(Ac(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function Nc(e){return e=e||{},e.persistenceType==="localStorage"?c.localStorage:c.cookie}function Ac(e,t){return t=t||{},(t.persistencePrefix||y1)+e}function Wm(e,t){return Nc(t).get(Ac(e,t))}function x1(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||Ee,n=t.navigator||{},r=!1;return c.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(i){c.includes([!0,1,"1","yes"],i)&&(r=!0)}),r}function Vm(e,t,n){if(!c.isString(t)||!t.length){ue.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}n=n||{},Nc(n).set(Ac(t,n),e?1:0,c.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})}function Mc(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),l=t.call(this,"window");r&&(n=Qm(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:l}))}catch(u){ue.error("Unexpected error when checking tracking opt-out status: "+u)}if(!n)return e.apply(this,arguments);var a=arguments[arguments.length-1];typeof a=="function"&&a(0)}}var Jn="$set",vi="$set_once",$t="$unset",Rr="$add",wn="$append",Pr="$union",Zn="$remove",k1="$delete",Km={set_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[Jn]=r,n},unset_action:function(e){var t={},n=[];return c.isArray(e)||(e=[e]),c.each(e,function(r){this._is_reserved_property(r)||n.push(r)},this),t[$t]=n,t},set_once_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[vi]=r,n},union_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=c.isArray(i)?i:[i])},this):r[e]=c.isArray(t)?t:[t],n[Pr]=r,n},append_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[wn]=r,n},remove_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[Zn]=r,n},delete_action:function(){var e={};return e[k1]="",e}},ve=function(){};c.extend(ve.prototype,Km);ve.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n};ve.prototype.set=xi(function(e,t,n){var r=this.set_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});ve.prototype.set_once=xi(function(e,t,n){var r=this.set_once_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});ve.prototype.unset=xi(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});ve.prototype.union=xi(function(e,t,n){c.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});ve.prototype.delete=xi(function(e){var t=this.delete_action();return this._send_request(t,e)});ve.prototype.remove=xi(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)});ve.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=c.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)};ve.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};ve.prototype._get_config=function(e){return this._mixpanel.get_config(e)};ve.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};ve.prototype.remove=ve.prototype.remove;ve.prototype.set=ve.prototype.set;ve.prototype.set_once=ve.prototype.set_once;ve.prototype.union=ve.prototype.union;ve.prototype.unset=ve.prototype.unset;ve.prototype.toString=ve.prototype.toString;var G=function(){};c.extend(G.prototype,Km);G.prototype._init=function(e){this._mixpanel=e};G.prototype.set=ir(function(e,t,n){var r=this.set_action(e,t);return c.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[Jn]=c.extend({},c.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r[Jn]),this._send_request(r,n)});G.prototype.set_once=ir(function(e,t,n){var r=this.set_once_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});G.prototype.unset=ir(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});G.prototype.increment=ir(function(e,t,n){var r={},i={};return c.isObject(e)?(c.each(e,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){ue.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else i[s]=o},this),n=t):(c.isUndefined(t)&&(t=1),i[e]=t),r[Rr]=i,this._send_request(r,n)});G.prototype.append=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)});G.prototype.remove=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)});G.prototype.union=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});G.prototype.track_charge=ir(function(e,t,n){if(!c.isNumber(e)&&(e=parseFloat(e),isNaN(e))){ue.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",c.extend({$amount:e},t),n)});G.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};G.prototype.delete_user=function(){if(!this._identify_called()){ue.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};G.prototype.toString=function(){return this._mixpanel.toString()+".people"};G.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=c.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),c.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),c.truncate(o,255))};G.prototype._get_config=function(e){return this._mixpanel.get_config(e)};G.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};G.prototype._enqueue=function(e){Jn in e?this._mixpanel.persistence._add_to_people_queue(Jn,e):vi in e?this._mixpanel.persistence._add_to_people_queue(vi,e):$t in e?this._mixpanel.persistence._add_to_people_queue($t,e):Rr in e?this._mixpanel.persistence._add_to_people_queue(Rr,e):wn in e?this._mixpanel.persistence._add_to_people_queue(wn,e):Zn in e?this._mixpanel.persistence._add_to_people_queue(Zn,e):Pr in e?this._mixpanel.persistence._add_to_people_queue(Pr,e):ue.error("Invalid call to _enqueue():",e)};G.prototype._flush_one_queue=function(e,t,n,r){var i=this,o=c.extend({},this._mixpanel.persistence._get_queue(e)),s=o;!c.isUndefined(o)&&c.isObject(o)&&!c.isEmptyObject(o)&&(i._mixpanel.persistence._pop_from_people_queue(e,o),r&&(s=r(o)),t.call(i,s,function(l,a){l===0&&i._mixpanel.persistence._add_to_people_queue(e,o),c.isUndefined(n)||n(l,a)}))};G.prototype._flush=function(e,t,n,r,i,o,s){var l=this,a=this._mixpanel.persistence._get_queue(wn),u=this._mixpanel.persistence._get_queue(Zn);if(this._flush_one_queue(Jn,this.set,e),this._flush_one_queue(vi,this.set_once,r),this._flush_one_queue($t,this.unset,o,function(E){return c.keys(E)}),this._flush_one_queue(Rr,this.increment,t),this._flush_one_queue(Pr,this.union,i),!c.isUndefined(a)&&c.isArray(a)&&a.length){for(var f,h=function(E,m){E===0&&l._mixpanel.persistence._add_to_people_queue(wn,f),c.isUndefined(n)||n(E,m)},d=a.length-1;d>=0;d--)f=a.pop(),c.isEmptyObject(f)||l.append(f,h);l._mixpanel.persistence.save()}if(!c.isUndefined(u)&&c.isArray(u)&&u.length){for(var g,y=function(E,m){E===0&&l._mixpanel.persistence._add_to_people_queue(Zn,g),c.isUndefined(s)||s(E,m)},S=u.length-1;S>=0;S--)g=u.pop(),c.isEmptyObject(g)||l.remove(g,y);l._mixpanel.persistence.save()}};G.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};G.prototype.set=G.prototype.set;G.prototype.set_once=G.prototype.set_once;G.prototype.unset=G.prototype.unset;G.prototype.increment=G.prototype.increment;G.prototype.append=G.prototype.append;G.prototype.remove=G.prototype.remove;G.prototype.union=G.prototype.union;G.prototype.track_charge=G.prototype.track_charge;G.prototype.clear_charges=G.prototype.clear_charges;G.prototype.delete_user=G.prototype.delete_user;G.prototype.toString=G.prototype.toString;var Ic="__mps",Lc="__mpso",Uc="__mpus",Fc="__mpa",bc="__mpap",jc="__mpr",zc="__mpu",Gm="$people_distinct_id",rl="__alias",Po="__timers",C1=[Ic,Lc,Uc,Fc,bc,jc,zc,Gm,rl,Po],J=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(ue.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&c.localStorage.is_supported()?this.storage=c.localStorage:this.storage=c.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};J.prototype.properties=function(){var e={};return c.each(this.props,function(t,n){c.include(C1,n)||(e[n]=t)}),e};J.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=c.extend({},e))}};J.prototype.upgrade=function(e){var t=e.upgrade,n,r;t&&(n="mp_super_properties",typeof t=="string"&&(n=t),r=this.storage.parse(n),this.storage.remove(n),this.storage.remove(n,!0),r&&(this.props=c.extend(this.props,r.all,r.events))),!e.cookie_name&&e.name!=="mixpanel"&&(n="mp_"+e.token+"_"+e.name,r=this.storage.parse(n),r&&(this.storage.remove(n),this.storage.remove(n,!0),this.register_once(r))),this.storage===c.localStorage&&(r=c.cookie.parse(this.name),c.cookie.remove(this.name),c.cookie.remove(this.name,!0),r&&this.register_once(r))};J.prototype.save=function(){this.disabled||this.storage.set(this.name,c.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};J.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};J.prototype.clear=function(){this.remove(),this.props={}};J.prototype.register_once=function(e,t,n){return c.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof n>"u"?this.default_expiry:n,c.each(e,function(r,i){(!this.props.hasOwnProperty(i)||this.props[i]===t)&&(this.props[i]=r)},this),this.save(),!0):!1};J.prototype.register=function(e,t){return c.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,c.extend(this.props,e),this.save(),!0):!1};J.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())};J.prototype.update_search_keyword=function(e){this.register(c.info.searchInfo(e))};J.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:c.info.referringDomain(e)||"$direct"},"")};J.prototype.get_referrer_info=function(){return c.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};J.prototype.safe_merge=function(e){return c.each(this.props,function(t,n){n in e||(e[n]=t)}),e};J.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};J.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};J.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};J.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};J.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};J.prototype.get_cross_subdomain=function(){return this.cross_subdomain};J.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};J.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(Jn),o=this._get_or_create_queue(vi),s=this._get_or_create_queue($t),l=this._get_or_create_queue(Rr),a=this._get_or_create_queue(Pr),u=this._get_or_create_queue(Zn,[]),f=this._get_or_create_queue(wn,[]);n===Ic?(c.extend(i,r),this._pop_from_people_queue(Rr,r),this._pop_from_people_queue(Pr,r),this._pop_from_people_queue($t,r)):n===Lc?(c.each(r,function(h,d){d in o||(o[d]=h)}),this._pop_from_people_queue($t,r)):n===Uc?c.each(r,function(h){c.each([i,o,l,a],function(d){h in d&&delete d[h]}),c.each(f,function(d){h in d&&delete d[h]}),s[h]=!0}):n===Fc?(c.each(r,function(h,d){d in i?i[d]+=h:(d in l||(l[d]=0),l[d]+=h)},this),this._pop_from_people_queue($t,r)):n===zc?(c.each(r,function(h,d){c.isArray(h)&&(d in a||(a[d]=[]),a[d]=a[d].concat(h))}),this._pop_from_people_queue($t,r)):n===jc?(u.push(r),this._pop_from_people_queue(wn,r)):n===bc&&(f.push(r),this._pop_from_people_queue($t,r)),ue.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),ue.log(t),this.save()};J.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);c.isUndefined(n)||(c.each(t,function(r,i){e===wn||e===Zn?c.each(n,function(o){o[i]===r&&delete o[i]}):delete n[i]},this),this.save())};J.prototype._get_queue_key=function(e){if(e===Jn)return Ic;if(e===vi)return Lc;if(e===$t)return Uc;if(e===Rr)return Fc;if(e===wn)return bc;if(e===Zn)return jc;if(e===Pr)return zc;ue.error("Invalid queue:",e)};J.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]};J.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=c.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)};J.prototype.set_event_timer=function(e,t){var n=this.props[Po]||{};n[e]=t,this.props[Po]=n,this.save()};J.prototype.remove_event_timer=function(e){var t=this.props[Po]||{},n=t[e];return c.isUndefined(n)||(delete this.props[Po][e],this.save()),n};var Bc,We,Ym=0,T1=1,R1=function(e){return e},Oo=function(){},Rt="mixpanel",Xm="base64",P1="json",$c="$device:",si=Ee.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Jm=!si&&en.indexOf("MSIE")===-1&&en.indexOf("Mozilla")===-1,il=null;jn.sendBeacon&&(il=function(){return jn.sendBeacon.apply(jn,arguments)});var Hd={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:Xm,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Oo,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Oo,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Zm=!1,P=function(){},xu=function(e,t,n){var r,i=n===Rt?We:We[n];if(i&&Bc===Ym)r=i;else{if(i&&!c.isArray(i)){ue.error("You have already initialized "+n);return}r=new P}if(r._cached_groups={},r._init(e,t,n),r.people=new G,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=c.info.campaignParams(null),s={},l=!1;c.each(o,function(a,u){s["initial_"+u]=a,a&&(l=!0)}),l&&r.people.set_once(s)}return vn.DEBUG=vn.DEBUG||r.get_config("debug"),!c.isUndefined(i)&&c.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};P.prototype.init=function(e,t,n){if(c.isUndefined(n)){this.report_error("You must name your new library: init(token, config, name)");return}if(n===Rt){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var r=xu(e,t,n);return We[n]=r,r._loaded(),r};P.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var r={};if(!("api_payload_format"in t)){var i=t.api_host||Hd.api_host;i.match(/\.mixpanel\.com/)&&(r.api_payload_format=P1)}if(this.set_config(c.extend({},Hd,r,t,{name:n,token:e,callback_fn:(n===Rt?n:Rt+"."+n)+"._jsc"})),this._jsc=Oo,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!c.localStorage.is_supported(!0)||!si)this._batch_requests=!1,ue.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");else if(this.init_batchers(),il&&Ee.addEventListener){var o=c.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);Ee.addEventListener("pagehide",function(l){l.persisted&&o()}),Ee.addEventListener("visibilitychange",function(){fe.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new J(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=c.UUID();this.get_distinct_id()||this.register_once({distinct_id:$c+s,$device_id:s},""),this.get_config("track_pageview")&&this.track_pageview()};P.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()};P.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(fe.referrer),this.get_config("store_google")&&this.register(c.info.campaignParams(),{persistent:!1}),this.get_config("save_referrer")&&this.persistence.update_referrer_info(fe.referrer)};P.prototype._dom_loaded=function(){c.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||c.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};P.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Zm)return this.__dom_loaded_queue.push([e,t]),!1;var n=new e().init(this);return n.track.apply(n,t)};P.prototype._prepare_callback=function(e,t){if(c.isUndefined(e))return null;if(si){var n=function(s){e(s,t)};return n}else{var r=this._jsc,i=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+i+"]";return r[i]=function(s){delete r[i],e(s,t)},o}};P.prototype._send_request=function(e,t,n,r){var i=!0;if(Jm)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!r&&(c.isFunction(n)||typeof n=="string")&&(r=n,n=null),n=c.extend(o,n||{}),si||(n.method="GET");var l=n.method==="POST",a=il&&l&&n.transport.toLowerCase()==="sendbeacon",u=n.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),si||(r?t.callback=r:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),l&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+c.HTTPBuildQuery(t);var f=this;if("img"in t){var h=fe.createElement("img");h.src=e,fe.body.appendChild(h)}else if(a){try{i=il(e,s)}catch(m){f.report_error(m),i=!1}try{r&&r(i?1:0)}catch(m){f.report_error(m)}}else if(si)try{var d=new XMLHttpRequest;d.open(n.method,e,!0);var g=this.get_config("xhr_headers");if(l&&(g["Content-Type"]="application/x-www-form-urlencoded"),c.each(g,function(m,p){d.setRequestHeader(p,m)}),n.timeout_ms&&typeof d.timeout<"u"){d.timeout=n.timeout_ms;var y=new Date().getTime()}d.withCredentials=!0,d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200){if(r)if(u){var m;try{m=c.JSONDecode(d.responseText)}catch(_){if(f.report_error(_),n.ignore_json_errors)m=d.responseText;else return}r(m)}else r(Number(d.responseText))}else{var p;d.timeout&&!d.status&&new Date().getTime()-y>=d.timeout?p="timeout":p="Bad HTTP status: "+d.status+" "+d.statusText,f.report_error(p),r&&r(u?{status:0,error:p,xhr_req:d}:0)}},d.send(s)}catch(m){f.report_error(m),i=!1}else{var S=fe.createElement("script");S.type="text/javascript",S.async=!0,S.defer=!0,S.src=e;var E=fe.getElementsByTagName("script")[0];E.parentNode.insertBefore(S,E)}return i};P.prototype._execute_array=function(e){var t,n=[],r=[],i=[];c.each(e,function(s){s&&(t=s[0],c.isArray(t)?i.push(s):typeof s=="function"?s.call(this):c.isArray(s)&&t==="alias"?n.push(s):c.isArray(s)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?i.push(s):r.push(s))},this);var o=function(s,l){c.each(s,function(a){if(c.isArray(a[0])){var u=l;c.each(a,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[a[0]].apply(this,a.slice(1))},l)};o(n,this),o(r,this),o(i,this)};P.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};P.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=c.bind(function(n){return new sn("__mpq_"+e+n.queue_suffix,{libConfig:this.config,sendRequestFunc:c.bind(function(r,i,o){this._send_request(this.get_config("api_host")+n.endpoint,this._encode_data_for_request(r),i,this._prepare_callback(o,r))},this),beforeSendHook:c.bind(function(r){return this._run_hook("before_send_"+n.type,r)},this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:c.bind(this.stop_batch_senders,this)})},this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()};P.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,c.each(this.request_batchers,function(e){e.start()}))};P.prototype.stop_batch_senders=function(){this._batch_requests=!1,c.each(this.request_batchers,function(e){e.stop(),e.clear()})};P.prototype.push=function(e){this._execute_array([e])};P.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};P.prototype._encode_data_for_request=function(e){var t=c.JSONEncode(e);return this.get_config("api_payload_format")===Xm&&(t=c.base64Encode(t)),{data:t}};P.prototype._track_or_batch=function(e,t){var n=c.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||Oo;var l=!0,a=c.bind(function(){return s.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(ue.log("MIXPANEL REQUEST:"),ue.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n,function(u){u?t(1,n):a()}):l=a(),l&&n};P.prototype.track=Ei(function(e,t,n,r){!r&&typeof n=="function"&&(r=n,n=null),n=n||{};var i=n.transport;i&&(n.transport=i);var o=n.send_immediately;if(typeof r!="function"&&(r=Oo),c.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){r(0);return}t=t||{},t.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!c.isUndefined(s)){var l=new Date().getTime()-s;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var a=this.get_config("track_marketing")?c.info.marketingParams():{};t=c.extend({},c.info.properties(),a,this.persistence.properties(),this.unpersisted_superprops,t);var u=this.get_config("property_blacklist");c.isArray(u)?c.each(u,function(d){delete t[d]}):this.report_error("Invalid value for property_blacklist config: "+u);var f={event:e,properties:t},h=this._track_or_batch({type:"events",data:f,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r);return h});P.prototype.set_group=Ei(function(e,t,n){c.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)});P.prototype.add_group=Ei(function(e,t,n){var r=this.get_property(e);if(r===void 0){var i={};i[e]=[t],this.register(i)}else r.indexOf(t)===-1&&(r.push(t),this.register(i));return this.people.union(e,t,n)});P.prototype.remove_group=Ei(function(e,t,n){var r=this.get_property(e);if(r!==void 0){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),r.length===0&&this.unregister(e)}return this.people.remove(e,t,n)});P.prototype.track_with_groups=Ei(function(e,t,n,r){var i=c.extend({},t||{});return c.each(n,function(o,s){o!=null&&(i[s]=o)}),this.track(e,i,r)});P.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};P.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};P.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return(r===void 0||r._group_key!==e||r._group_id!==t)&&(r=new ve,r._init(this,e,t),this._cached_groups[n]=r),r};P.prototype.track_pageview=Ei(function(e,t){typeof e!="object"&&(e={}),t=t||{};var n=t.event_name||"$mp_web_page_view",r=c.extend(c.info.mpPageViewProperties(),c.info.campaignParams(),c.info.clickParams()),i=c.extend({},r,e);return this.track(n,i)});P.prototype.track_links=function(){return this._track_dom.call(this,mi,arguments)};P.prototype.track_forms=function(){return this._track_dom.call(this,Ml,arguments)};P.prototype.time_event=function(e){if(c.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var O1={persistent:!0},qc=function(e){var t;return c.isObject(e)?t=e:c.isUndefined(e)?t={}:t={days:e},c.extend({},O1,t)};P.prototype.register=function(e,t){var n=qc(t);n.persistent?this.persistence.register(e,n.days):c.extend(this.unpersisted_superprops,e)};P.prototype.register_once=function(e,t,n){var r=qc(n);r.persistent?this.persistence.register_once(e,t,r.days):(typeof t>"u"&&(t="None"),c.each(e,function(i,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=i)},this))};P.prototype.unregister=function(e,t){t=qc(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};P.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)};P.prototype.identify=function(e,t,n,r,i,o,s,l){var a=this.get_distinct_id();if(e&&a!==e){if(typeof e=="string"&&e.indexOf($c)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=a;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==a&&e!==this.get_property(rl)&&(this.unregister(rl),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,s,l),e!==a&&this.track("$identify",{distinct_id:e,$anon_distinct_id:a},{skip_hooks:!0})};P.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=c.UUID();this.register_once({distinct_id:$c+e,$device_id:e},"")};P.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};P.prototype.alias=function(e,t){if(e===this.get_property(Gm))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return c.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(rl,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};P.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};P.prototype.set_config=function(e){if(c.isObject(e)){c.extend(this.config,e);var t=e.batch_size;t&&c.each(this.request_batchers,function(n){n.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),vn.DEBUG=vn.DEBUG||this.get_config("debug")}};P.prototype.get_config=function(e){return this.config[e]};P.prototype._run_hook=function(e){var t=(this.config.hooks[e]||R1).apply(this,bn.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};P.prototype.get_property=function(e){return this.persistence.props[e]};P.prototype.toString=function(){var e=this.get_config("name");return e!==Rt&&(e=Rt+"."+e),e};P.prototype._event_is_disabled=function(e){return c.isBlockedUA(en)||this._flags.disable_all_events||c.include(this.__disabled_events,e)};P.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&c.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||c.cookie.get("mp_optout"))&&(c.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};P.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t&&c.each(this.request_batchers,function(n){n.clear()})};P.prototype._gdpr_call_func=function(e,t){return t=c.extend({track:c.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),c.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};P.prototype.opt_in_tracking=function(e){e=c.extend({enable_persistence:!0},e),this._gdpr_call_func(_1,e),this._gdpr_update_persistence(e)};P.prototype.opt_out_tracking=function(e){e=c.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(S1,e),this._gdpr_update_persistence(e)};P.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(w1,e)};P.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(Qm,e)};P.prototype.clear_opt_in_out_tracking=function(e){e=c.extend({enable_persistence:!0},e),this._gdpr_call_func(E1,e),this._gdpr_update_persistence(e)};P.prototype.report_error=function(e,t){ue.error.apply(ue.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(n){ue.error(n)}};P.prototype.init=P.prototype.init;P.prototype.reset=P.prototype.reset;P.prototype.disable=P.prototype.disable;P.prototype.time_event=P.prototype.time_event;P.prototype.track=P.prototype.track;P.prototype.track_links=P.prototype.track_links;P.prototype.track_forms=P.prototype.track_forms;P.prototype.track_pageview=P.prototype.track_pageview;P.prototype.register=P.prototype.register;P.prototype.register_once=P.prototype.register_once;P.prototype.unregister=P.prototype.unregister;P.prototype.identify=P.prototype.identify;P.prototype.alias=P.prototype.alias;P.prototype.name_tag=P.prototype.name_tag;P.prototype.set_config=P.prototype.set_config;P.prototype.get_config=P.prototype.get_config;P.prototype.get_property=P.prototype.get_property;P.prototype.get_distinct_id=P.prototype.get_distinct_id;P.prototype.toString=P.prototype.toString;P.prototype.opt_out_tracking=P.prototype.opt_out_tracking;P.prototype.opt_in_tracking=P.prototype.opt_in_tracking;P.prototype.has_opted_out_tracking=P.prototype.has_opted_out_tracking;P.prototype.has_opted_in_tracking=P.prototype.has_opted_in_tracking;P.prototype.clear_opt_in_out_tracking=P.prototype.clear_opt_in_out_tracking;P.prototype.get_group=P.prototype.get_group;P.prototype.set_group=P.prototype.set_group;P.prototype.add_group=P.prototype.add_group;P.prototype.remove_group=P.prototype.remove_group;P.prototype.track_with_groups=P.prototype.track_with_groups;P.prototype.start_batch_senders=P.prototype.start_batch_senders;P.prototype.stop_batch_senders=P.prototype.stop_batch_senders;J.prototype.properties=J.prototype.properties;J.prototype.update_search_keyword=J.prototype.update_search_keyword;J.prototype.update_referrer_info=J.prototype.update_referrer_info;J.prototype.get_cross_subdomain=J.prototype.get_cross_subdomain;J.prototype.clear=J.prototype.clear;var Xr={},D1=function(){c.each(Xr,function(e,t){t!==Rt&&(We[t]=e)}),We._=c},N1=function(){We.init=function(e,t,n){if(n)return We[n]||(We[n]=Xr[n]=xu(e,t,n),We[n]._loaded()),We[n];var r=We;Xr[Rt]?r=Xr[Rt]:e&&(r=xu(e,t,Rt),r._loaded(),Xr[Rt]=r),We=r,Bc===T1&&(Ee[Rt]=We),D1()}},A1=function(){function e(){e.done||(e.done=!0,Zm=!0,Jm=!1,c.each(Xr,function(r){r._dom_loaded()}))}function t(){try{fe.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(fe.addEventListener)fe.readyState==="complete"?e():fe.addEventListener("DOMContentLoaded",e,!1);else if(fe.attachEvent){fe.attachEvent("onreadystatechange",e);var n=!1;try{n=Ee.frameElement===null}catch{}fe.documentElement.doScroll&&n&&t()}c.register_event(Ee,"load",e,!0)};function M1(){return Bc=Ym,We=new P,N1(),We.init(),A1(),We}var I1=M1(),L1=I1;const ev=ol(L1),U1="9b5c61bf2bf4c48916655fe862e8fcbd",F1=U1,tv={OPEN_WEBAPP:"open_webapp",SEND_TRANSACTION:"send_transaction"},nv=async e=>{console.info("[mixpanel]",e),await ev.track(e)};ev.init(F1,{loaded:()=>{nv(tv.OPEN_WEBAPP)}});function b1(){const e=xc(),{currency:t,transaction:n,setTransaction:r}=wi(),i=(S,E)=>{const m=[...n.shares],p=m.findIndex(_=>{var v;return((v=_.user)==null?void 0:v.id)===S});m[p].amount=E,r({...n,shares:m})},o=n.shares.filter(S=>S.isPayed).reduce((S,E)=>S+E.amount,0),s=n.shares.filter(S=>!S.isPayed).reduce((S,E)=>S+E.amount,0),l=o>s,a=o==s,u=oS.user&&S.isPayed),h=n.shares.filter(S=>S.user&&!S.isPayed),d=h.every(S=>S.amount===h[0].amount),g=()=>{const S=o/h.length,E=[...n.shares];r({...n,shares:E.map(m=>m.isPayed?m:{...m,amount:S})})},y=async()=>{await nv(tv.SEND_TRANSACTION),alert("save & close webapp...")};return k.jsxs(Dl,{children:[k.jsx(Pl,{onBack:()=>{e("/")}}),k.jsxs("div",{className:"mb-2 px-4 flex items-center justify-between",children:[k.jsx("h2",{className:"pt-[2px] pb-[6px]",children:"Проверить траты"}),k.jsx(oo,{theme:"text",onClick:()=>{e("/select-currency")},children:t==null?void 0:t.in})]}),k.jsxs(oi,{className:"!pb-4",children:[k.jsxs("h3",{className:Kn(!a&&"text-error"),children:[l&&"Не хватает",a&&"Всё верно",u&&"Перебор"]}),k.jsxs("div",{className:"mt-1 text-[14px] leading-[20px] text-hint",children:["Заплатили ",o," ",t==null?void 0:t.symbol,", должны ",s," ",t==null?void 0:t.symbol]})]}),k.jsxs(oi,{children:[k.jsx("h3",{children:"Заплатили"}),k.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[!f.length&&k.jsx("span",{className:"opacity-40",children:"(Пусто)"}),f.map(S=>k.jsx(Nd,{...S,onChange:E=>{i(S.user.id,E)}},S.user.id))]})]}),k.jsxs(oi,{children:[k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("h3",{children:"Должны"}),!!h.length&&(!d||!a)&&k.jsx(oo,{theme:"text",onClick:g,children:"Поровну"})]}),k.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[!h.length&&k.jsx("span",{className:"opacity-40",children:"(Пусто)"}),h.map(S=>k.jsx(Nd,{...S,onChange:E=>{i(S.user.id,E)}},S.user.id))]}),k.jsx("div",{className:"mt-8 py-2",children:k.jsx(oo,{onClick:y,disabled:!a,children:"Сохранить"})})]})]})}function Hc(){return k.jsx("div",{className:"h-[1px] -my-[0.5px] mx-4 bg-[#E5E9EB] dark:bg-[#84919A]"})}function j1({url:e,fullName:t,username:n,onClick:r}){return k.jsxs("button",{className:"w-full flex gap-2 px-4 py-2 items-center hover:bg-text/5 active:bg-text/10 transition-all",onClick:r,children:[k.jsx(Rc,{url:e,size:40,fullName:t}),k.jsxs("div",{className:"flex-1 truncate text-left",children:["@",n]})]})}const rv=()=>{const{users:e,transaction:t,setTransaction:n,selectUserIndex:r}=wi(),i=t.shares.map(u=>{var f;return(f=u.user)==null?void 0:f.id}),o=e.filter(u=>!i.includes(u.id)),s=t.shares.every(u=>u.user);return{users:e,unrelatedUsers:o,isRelationsComplete:s,selectUser:u=>()=>{if(r!==null){const f=[...t.shares],h=f.findIndex(d=>{var g;return((g=d.user)==null?void 0:g.id)===u.id});f[r].user=u,~h&&(f[h].spokenName?delete f[h].user:f.splice(h,1)),n({...t,shares:f})}else{const f=[...t.shares,{isPayed:!1,amount:0,user:u}];n({...t,shares:f})}history.back()},deleteUser:u=>()=>{const f=[...t.shares];f.splice(u,1),n({...t,shares:f}),history.back()}}};function z1(){const{users:e,unrelatedUsers:t,selectUser:n,deleteUser:r}=rv(),{selectUserIndex:i}=wi(),o=i!==null?e:t;return k.jsxs(Dl,{className:"!bg-bg",children:[k.jsx(Pl,{onBack:()=>{history.back()}}),k.jsxs("div",{className:"mb-2 px-4 flex items-center justify-between",children:[k.jsx("h2",{className:"pt-[2px] pb-[6px]",children:"Выберите человека"}),i!==null&&k.jsx(oo,{theme:"text",onClick:r(i),children:"Удалить"})]}),k.jsx("div",{className:"mt-4 overflow-y-auto",children:o.map((s,l,a)=>k.jsxs(k.Fragment,{children:[k.jsx(j1,{...s,onClick:n(s)},`User-${l}`),li(n),children:[k.jsx("input",{className:"hidden",id:`${e}-${n}`,name:e,checked:r}),k.jsx("div",{className:"p-1.5",children:k.jsx("div",{className:Kn("flex items-center justify-center w-5 h-5 border-2 rounded-full text-hint",r&&"!text-link"),children:k.jsx("div",{className:Kn("w-[10px] h-[10px] rounded-full bg-link opacity-0 transition-all",r&&"!opacity-100")})})}),k.jsx("div",{className:"flex-1",children:t})]})}function $1(){const e=xc(),{currencies:t,currency:n,setCurrency:r}=wi(),i=o=>{r(o),e("/check")};return k.jsxs(Dl,{className:"!bg-bg",children:[k.jsx(Pl,{onBack:()=>{history.back()}}),k.jsx("div",{className:"px-4",children:k.jsx("h2",{children:"Выберите валюту"})}),k.jsx("div",{className:"mt-4 overflow-y-auto",children:t.map((o,s)=>k.jsxs(k.Fragment,{children:[k.jsx(B1,{group:"currencies",label:`${o.symbol} ${o.title}`,value:o,checked:(n==null?void 0:n.id)===o.id,onChange:i},`currencies-${o.id}`),sI.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M8 1C8 0.447715 7.55228 0 7 0C6.44772 0 6 0.447715 6 1V6H1C0.447715 6 0 6.44771 0 7C0 7.55228 0.447715 8 1 8H6V13C6 13.5523 6.44772 14 7 14C7.55228 14 8 13.5523 8 13V8H13C13.5523 8 14 7.55228 14 7C14 6.44772 13.5523 6 13 6H8V1Z",fill:"currentColor"}));/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:iv,setPrototypeOf:Qd,isFrozen:H1,getPrototypeOf:Q1,getOwnPropertyDescriptor:W1}=Object;let{freeze:Je,seal:Wt,create:V1}=Object,{apply:ku,construct:Cu}=typeof Reflect<"u"&&Reflect;ku||(ku=function(t,n,r){return t.apply(n,r)});Je||(Je=function(t){return t});Wt||(Wt=function(t){return t});Cu||(Cu=function(t,n){return new t(...n)});const K1=At(Array.prototype.forEach),Wd=At(Array.prototype.pop),$i=At(Array.prototype.push),Es=At(String.prototype.toLowerCase),ha=At(String.prototype.toString),G1=At(String.prototype.match),Ft=At(String.prototype.replace),Y1=At(String.prototype.indexOf),X1=At(String.prototype.trim),ht=At(RegExp.prototype.test),qi=J1(TypeError);function At(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i/gm),rS=Wt(/\${[\w\W]*}/gm),iS=Wt(/^data-[\-\w.\u00B7-\uFFFF]/),oS=Wt(/^aria-[\-\w]+$/),ov=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sS=Wt(/^(?:\w+script|data):/i),lS=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sv=Wt(/^html$/i);var Xd=Object.freeze({__proto__:null,MUSTACHE_EXPR:tS,ERB_EXPR:nS,TMPLIT_EXPR:rS,DATA_ATTR:iS,ARIA_ATTR:oS,IS_ALLOWED_URI:ov,IS_SCRIPT_OR_DATA:sS,ATTR_WHITESPACE:lS,DOCTYPE_NAME:sv});const aS=()=>typeof window>"u"?null:window,uS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function lv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:aS();const t=$=>lv($);if(t.version="3.0.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;const n=e.document,r=n.currentScript;let{document:i}=e;const{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:a,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:g}=e,y=a.prototype,S=ss(y,"cloneNode"),E=ss(y,"nextSibling"),m=ss(y,"childNodes"),p=ss(y,"parentNode");if(typeof s=="function"){const $=i.createElement("template");$.content&&$.content.ownerDocument&&(i=$.content.ownerDocument)}let _,v="";const{implementation:R,createNodeIterator:D,createDocumentFragment:T,getElementsByTagName:O}=i,{importNode:j}=n;let q={};t.isSupported=typeof iv=="function"&&typeof p=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:he,ERB_EXPR:ne,TMPLIT_EXPR:tt,DATA_ATTR:kn,ARIA_ATTR:Vt,IS_SCRIPT_OR_DATA:at,ATTR_WHITESPACE:ut}=Xd;let{IS_ALLOWED_URI:L}=Xd,F=null;const V=X({},[...Vd,...pa,...ma,...va,...Kd]);let Y=null;const _e=X({},[...Gd,...ga,...Yd,...ls]);let le=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ct=null,ft=!0,Kt=!0,Mt=!1,jo=!0,Cn=!1,Gt=!1,ki=!1,Ci=!1,Tn=!1,Yt=!1,or=!1,Nr=!0,sr=!1;const Ti="user-content-";let St=!0,Rn=!1,ln={},an=null;const zo=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ri=null;const lr=X({},["audio","video","img","source","image","track"]);let Ar=null;const Mr=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ir="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let un=It,Pi=!1,x=null;const C=X({},[Ir,ar,It],ha);let N;const z=["application/xhtml+xml","text/html"],K="text/html";let B,W=null;const Q=i.createElement("form"),H=function(w){return w instanceof RegExp||w instanceof Function},oe=function(w){if(!(W&&W===w)){if((!w||typeof w!="object")&&(w={}),w=Ur(w),N=z.indexOf(w.PARSER_MEDIA_TYPE)===-1?N=K:N=w.PARSER_MEDIA_TYPE,B=N==="application/xhtml+xml"?ha:Es,F="ALLOWED_TAGS"in w?X({},w.ALLOWED_TAGS,B):V,Y="ALLOWED_ATTR"in w?X({},w.ALLOWED_ATTR,B):_e,x="ALLOWED_NAMESPACES"in w?X({},w.ALLOWED_NAMESPACES,ha):C,Ar="ADD_URI_SAFE_ATTR"in w?X(Ur(Mr),w.ADD_URI_SAFE_ATTR,B):Mr,Ri="ADD_DATA_URI_TAGS"in w?X(Ur(lr),w.ADD_DATA_URI_TAGS,B):lr,an="FORBID_CONTENTS"in w?X({},w.FORBID_CONTENTS,B):zo,ie="FORBID_TAGS"in w?X({},w.FORBID_TAGS,B):{},ct="FORBID_ATTR"in w?X({},w.FORBID_ATTR,B):{},ln="USE_PROFILES"in w?w.USE_PROFILES:!1,ft=w.ALLOW_ARIA_ATTR!==!1,Kt=w.ALLOW_DATA_ATTR!==!1,Mt=w.ALLOW_UNKNOWN_PROTOCOLS||!1,jo=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Cn=w.SAFE_FOR_TEMPLATES||!1,Gt=w.WHOLE_DOCUMENT||!1,Tn=w.RETURN_DOM||!1,Yt=w.RETURN_DOM_FRAGMENT||!1,or=w.RETURN_TRUSTED_TYPE||!1,Ci=w.FORCE_BODY||!1,Nr=w.SANITIZE_DOM!==!1,sr=w.SANITIZE_NAMED_PROPS||!1,St=w.KEEP_CONTENT!==!1,Rn=w.IN_PLACE||!1,L=w.ALLOWED_URI_REGEXP||ov,un=w.NAMESPACE||It,le=w.CUSTOM_ELEMENT_HANDLING||{},w.CUSTOM_ELEMENT_HANDLING&&H(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&H(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Cn&&(Kt=!1),Yt&&(Tn=!0),ln&&(F=X({},[...Kd]),Y=[],ln.html===!0&&(X(F,Vd),X(Y,Gd)),ln.svg===!0&&(X(F,pa),X(Y,ga),X(Y,ls)),ln.svgFilters===!0&&(X(F,ma),X(Y,ga),X(Y,ls)),ln.mathMl===!0&&(X(F,va),X(Y,Yd),X(Y,ls))),w.ADD_TAGS&&(F===V&&(F=Ur(F)),X(F,w.ADD_TAGS,B)),w.ADD_ATTR&&(Y===_e&&(Y=Ur(Y)),X(Y,w.ADD_ATTR,B)),w.ADD_URI_SAFE_ATTR&&X(Ar,w.ADD_URI_SAFE_ATTR,B),w.FORBID_CONTENTS&&(an===zo&&(an=Ur(an)),X(an,w.FORBID_CONTENTS,B)),St&&(F["#text"]=!0),Gt&&X(F,["html","head","body"]),F.table&&(X(F,["tbody"]),delete ie.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw qi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=w.TRUSTED_TYPES_POLICY,v=_.createHTML("")}else _===void 0&&(_=uS(g,r)),_!==null&&typeof v=="string"&&(v=_.createHTML(""));Je&&Je(w),W=w}},te=X({},["mi","mo","mn","ms","mtext"]),qe=X({},["foreignobject","desc","title","annotation-xml"]),Re=X({},["title","style","font","a","script"]),Ae=X({},pa);X(Ae,ma),X(Ae,Z1);const nt=X({},va);X(nt,eS);const ur=function(w){let A=p(w);(!A||!A.tagName)&&(A={namespaceURI:un,tagName:"template"});const U=Es(w.tagName),ae=Es(A.tagName);return x[w.namespaceURI]?w.namespaceURI===ar?A.namespaceURI===It?U==="svg":A.namespaceURI===Ir?U==="svg"&&(ae==="annotation-xml"||te[ae]):!!Ae[U]:w.namespaceURI===Ir?A.namespaceURI===It?U==="math":A.namespaceURI===ar?U==="math"&&qe[ae]:!!nt[U]:w.namespaceURI===It?A.namespaceURI===ar&&!qe[ae]||A.namespaceURI===Ir&&!te[ae]?!1:!nt[U]&&(Re[U]||!Ae[U]):!!(N==="application/xhtml+xml"&&x[w.namespaceURI]):!1},Lt=function(w){$i(t.removed,{element:w});try{w.parentNode.removeChild(w)}catch{w.remove()}},Pn=function(w,A){try{$i(t.removed,{attribute:A.getAttributeNode(w),from:A})}catch{$i(t.removed,{attribute:null,from:A})}if(A.removeAttribute(w),w==="is"&&!Y[w])if(Tn||Yt)try{Lt(A)}catch{}else try{A.setAttribute(w,"")}catch{}},wt=function(w){let A,U;if(Ci)w=""+w;else{const Et=G1(w,/^[\r\n\t ]+/);U=Et&&Et[0]}N==="application/xhtml+xml"&&un===It&&(w=''+w+"");const ae=_?_.createHTML(w):w;if(un===It)try{A=new d().parseFromString(ae,N)}catch{}if(!A||!A.documentElement){A=R.createDocument(un,"template",null);try{A.documentElement.innerHTML=Pi?v:ae}catch{}}const Fe=A.body||A.documentElement;return w&&U&&Fe.insertBefore(i.createTextNode(U),Fe.childNodes[0]||null),un===It?O.call(A,Gt?"html":"body")[0]:Gt?A.documentElement:Fe},cr=function(w){return D.call(w.ownerDocument||w,w,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},Oi=function(w){return w instanceof h&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof f)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},On=function(w){return typeof l=="object"?w instanceof l:w&&typeof w=="object"&&typeof w.nodeType=="number"&&typeof w.nodeName=="string"},dt=function(w,A,U){q[w]&&K1(q[w],ae=>{ae.call(t,A,U,W)})},fr=function(w){let A;if(dt("beforeSanitizeElements",w,null),Oi(w))return Lt(w),!0;const U=B(w.nodeName);if(dt("uponSanitizeElement",w,{tagName:U,allowedTags:F}),w.hasChildNodes()&&!On(w.firstElementChild)&&(!On(w.content)||!On(w.content.firstElementChild))&&ht(/<[/\w]/g,w.innerHTML)&&ht(/<[/\w]/g,w.textContent))return Lt(w),!0;if(!F[U]||ie[U]){if(!ie[U]&&Ge(U)&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,U)||le.tagNameCheck instanceof Function&&le.tagNameCheck(U)))return!1;if(St&&!an[U]){const ae=p(w)||w.parentNode,Fe=m(w)||w.childNodes;if(Fe&&ae){const Et=Fe.length;for(let Se=Et-1;Se>=0;--Se)ae.insertBefore(S(Fe[Se],!0),E(w))}}return Lt(w),!0}return w instanceof a&&!ur(w)||(U==="noscript"||U==="noembed"||U==="noframes")&&ht(/<\/no(script|embed|frames)/i,w.innerHTML)?(Lt(w),!0):(Cn&&w.nodeType===3&&(A=w.textContent,A=Ft(A,he," "),A=Ft(A,ne," "),A=Ft(A,tt," "),w.textContent!==A&&($i(t.removed,{element:w.cloneNode()}),w.textContent=A)),dt("afterSanitizeElements",w,null),!1)},ce=function(w,A,U){if(Nr&&(A==="id"||A==="name")&&(U in i||U in Q))return!1;if(!(Kt&&!ct[A]&&ht(kn,A))){if(!(ft&&ht(Vt,A))){if(!Y[A]||ct[A]){if(!(Ge(w)&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,w)||le.tagNameCheck instanceof Function&&le.tagNameCheck(w))&&(le.attributeNameCheck instanceof RegExp&&ht(le.attributeNameCheck,A)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(A))||A==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,U)||le.tagNameCheck instanceof Function&&le.tagNameCheck(U))))return!1}else if(!Ar[A]){if(!ht(L,Ft(U,ut,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&w!=="script"&&Y1(U,"data:")===0&&Ri[w])){if(!(Mt&&!ht(at,Ft(U,ut,"")))){if(U)return!1}}}}}}return!0},Ge=function(w){return w.indexOf("-")>0},cn=function(w){let A,U,ae,Fe;dt("beforeSanitizeAttributes",w,null);const{attributes:Et}=w;if(!Et)return;const Se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};for(Fe=Et.length;Fe--;){A=Et[Fe];const{name:Xt,namespaceURI:Il}=A;if(U=Xt==="value"?A.value:X1(A.value),ae=B(Xt),Se.attrName=ae,Se.attrValue=U,Se.keepAttr=!0,Se.forceKeepAttr=void 0,dt("uponSanitizeAttribute",w,Se),U=Se.attrValue,Se.forceKeepAttr||(Pn(Xt,w),!Se.keepAttr))continue;if(!jo&&ht(/\/>/i,U)){Pn(Xt,w);continue}Cn&&(U=Ft(U,he," "),U=Ft(U,ne," "),U=Ft(U,tt," "));const Qc=B(w.nodeName);if(ce(Qc,ae,U)){if(sr&&(ae==="id"||ae==="name")&&(Pn(Xt,w),U=Ti+U),_&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Il)switch(g.getAttributeType(Qc,ae)){case"TrustedHTML":{U=_.createHTML(U);break}case"TrustedScriptURL":{U=_.createScriptURL(U);break}}try{Il?w.setAttributeNS(Il,Xt,U):w.setAttribute(Xt,U),Wd(t.removed)}catch{}}}dt("afterSanitizeAttributes",w,null)},Me=function $(w){let A;const U=cr(w);for(dt("beforeSanitizeShadowDOM",w,null);A=U.nextNode();)dt("uponSanitizeShadowNode",A,null),!fr(A)&&(A.content instanceof o&&$(A.content),cn(A));dt("afterSanitizeShadowDOM",w,null)};return t.sanitize=function($){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A,U,ae,Fe;if(Pi=!$,Pi&&($=""),typeof $!="string"&&!On($))if(typeof $.toString=="function"){if($=$.toString(),typeof $!="string")throw qi("dirty is not a string, aborting")}else throw qi("toString is not a function");if(!t.isSupported)return $;if(ki||oe(w),t.removed=[],typeof $=="string"&&(Rn=!1),Rn){if($.nodeName){const Xt=B($.nodeName);if(!F[Xt]||ie[Xt])throw qi("root node is forbidden and cannot be sanitized in-place")}}else if($ instanceof l)A=wt(""),U=A.ownerDocument.importNode($,!0),U.nodeType===1&&U.nodeName==="BODY"||U.nodeName==="HTML"?A=U:A.appendChild(U);else{if(!Tn&&!Cn&&!Gt&&$.indexOf("<")===-1)return _&&or?_.createHTML($):$;if(A=wt($),!A)return Tn?null:or?v:""}A&&Ci&&Lt(A.firstChild);const Et=cr(Rn?$:A);for(;ae=Et.nextNode();)fr(ae)||(ae.content instanceof o&&Me(ae.content),cn(ae));if(Rn)return $;if(Tn){if(Yt)for(Fe=T.call(A.ownerDocument);A.firstChild;)Fe.appendChild(A.firstChild);else Fe=A;return(Y.shadowroot||Y.shadowrootmode)&&(Fe=j.call(n,Fe,!0)),Fe}let Se=Gt?A.outerHTML:A.innerHTML;return Gt&&F["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&ht(sv,A.ownerDocument.doctype.name)&&(Se=" -`+Se),Cn&&(Se=Ft(Se,he," "),Se=Ft(Se,ne," "),Se=Ft(Se,tt," ")),_&&or?_.createHTML(Se):Se},t.setConfig=function($){oe($),ki=!0},t.clearConfig=function(){W=null,ki=!1},t.isValidAttribute=function($,w,A){W||oe({});const U=B($),ae=B(w);return ce(U,ae,A)},t.addHook=function($,w){typeof w=="function"&&(q[$]=q[$]||[],$i(q[$],w))},t.removeHook=function($){if(q[$])return Wd(q[$])},t.removeHooks=function($){q[$]&&(q[$]=[])},t.removeAllHooks=function(){q={}},t}var cS=lv();const fS=({string:e,allowedTags:t})=>{const n=cS.sanitize(e,{ALLOWED_TAGS:t});return k.jsx("span",{dangerouslySetInnerHTML:{__html:n}})},dS=e=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 6.29289C9.68342 5.90237 10.3166 5.90237 10.7071 6.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L10.7071 17.7071C10.3166 18.0976 9.68342 18.0976 9.29289 17.7071C8.90237 17.3166 8.90237 16.6834 9.29289 16.2929L13.5858 12L9.29289 7.70711C8.90237 7.31658 8.90237 6.68342 9.29289 6.29289Z",fill:"currentColor"}));function hS({spokenName:e,user:t,onClick:n}){return k.jsxs("button",{className:"w-full flex gap-3 text-left items-center px-4 py-2.5 truncate hover:bg-text/5 active:bg-text/10 transition-all",onClick:n,children:[k.jsx("div",{className:"flex w-[45%] truncate",children:e?k.jsx("div",{className:"truncate",children:e}):k.jsx("div",{className:"truncate opacity-30",children:"(доп.)"})}),k.jsxs("div",{className:"flex gap-3 w-[45%] items-center truncate",children:[k.jsx("div",{className:"w-8 h-8",children:k.jsx(Rc,{url:t==null?void 0:t.url,size:32,fullName:t==null?void 0:t.fullName})}),k.jsx("div",{className:"text-hint truncate",children:t!=null&&t.username?`@${t.username}`:"(выберите)"})]}),k.jsx("div",{className:"h-6 w-6 text-hint opacity-50",children:k.jsx(dS,{})})]})}function ya(){const e=xc(),{transaction:t,setSelectUserIndex:n}=wi(),{unrelatedUsers:r,isRelationsComplete:i}=rv(),o=a=>{n(a),e("/select-user")},s=()=>{n(null),e("/select-user")},l=()=>{alert("close webapp...")};return k.jsxs(Dl,{children:[k.jsx(Pl,{onCancel:l}),k.jsxs(oi,{children:[k.jsx("div",{className:"text-[12px] leading-[1.33em] font-medium text-hint",children:"Сообщение"}),k.jsxs("div",{className:"mt-1",children:["🎙 ",k.jsx(fS,{allowedTags:["b","strong"],string:t.text})]})]}),k.jsxs(oi,{children:[k.jsxs("div",{children:[k.jsx("h2",{children:"Соотнесите людей"}),k.jsx("div",{className:"mt-1 text-[14px] leading-[20px] text-hint",children:"Со временем мы запомним соотношения"}),k.jsx("div",{className:"mt-2 -mx-4 overflow-y-auto",children:t.shares.map((a,u)=>k.jsxs("div",{children:[k.jsx(hS,{...a,onClick:()=>o(u)},`UserRelation-${u}`),u{e("/check")},children:"Далее"})})]})]})}const pS="https://jsonplaceholder.typicode.com",mS=()=>I0({queryKey:["currencies"],queryFn:()=>fetch(`${pS}/users`).then(e=>e.json())});function vS(){const{isLoading:e,error:t}=mS();return k.jsxs("div",{className:Kn("fixed top-0 left-0 w-full h-full bg-bg2 transition-all",e||t?"opacity-100":"pointer-events-none opacity-0"),children:[e&&k.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 w-[50px] h-[50px]",children:k.jsx("div",{className:"w-full h-full rounded-full border-[3px] border-button border-l-button/10 border-t-button/10 animate-[spin_0.6s_linear_infinite]"})}),!!t&&k.jsxs("div",{className:"p-4 text-[#f00]",children:["Error: ",t.message]})]})}const gS=new o0;function yS(){const{isDarkTheme:e}=zm(),t=$_([{path:"/",element:k.jsx(ya,{}),errorElement:k.jsx(ya,{})},{path:"*",element:k.jsx(ya,{})},{path:"/select-user",element:k.jsx(z1,{})},{path:"/check",element:k.jsx(b1,{})},{path:"/select-currency",element:k.jsx($1,{})}]);return k.jsx(S0,{client:gS,children:k.jsxs("div",{className:Kn(e?"theme-dark":"theme-light"),children:[k.jsx(b_,{router:t}),k.jsx(vS,{})]})})}_a.createRoot(document.getElementById("root")).render(k.jsx(lh.StrictMode,{children:k.jsx(yS,{})})); +`);var t="",n,r,i=0,o;for(n=r=0,i=e.length,o=0;o127&&s<2048?l=String.fromCharCode(s>>6|192,s&63|128):l=String.fromCharCode(s>>12|224,s>>6&63|128,s&63|128),l!==null&&(r>n&&(t+=e.substring(n,r)),t+=l,n=r=o+1)}return r>n&&(t+=e.substring(n,e.length)),t};c.UUID=function(){var e=function(){var r=1*new Date,i;if(Ee.performance&&Ee.performance.now)i=Ee.performance.now();else for(i=0;r==1*new Date;)i++;return r.toString(16)+Math.floor(i).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},n=function(){var r=en,i,o,s=[],l=0;function a(u,f){var h,d=0;for(h=0;h=4&&(l=a(l,s),s=[]);return s.length>0&&(l=a(l,s)),l.toString(16)};return function(){var r=(Js.height*Js.width).toString(16);return e()+"-"+t()+"-"+n()+"-"+r+"-"+e()}}();var bd=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];c.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(i){if(!fe.getElementsByTagName)return[];var o=i.split(" "),s,l,a,u,f,h,d,g,y,w,S=[fe];for(h=0;h-1){l=s.split("#"),a=l[0];var m=l[1],p=fe.getElementById(m);if(!p||a&&p.nodeName.toLowerCase()!=a)return[];S=[p];continue}if(s.indexOf(".")>-1){l=s.split("."),a=l[0];var _=l[1];for(a||(a="*"),u=[],f=0,d=0;d-1};break;default:P=function(b){return b.getAttribute(R)}}for(S=[],w=0,d=0;d=3?t[2]:""},properties:function(){return c.extend(c.strip_empty_properties({$os:c.info.os(),$browser:c.info.browser(en,bn.vendor,os),$referrer:fe.referrer,$referring_domain:c.info.referringDomain(fe.referrer),$device:c.info.device(en)}),{$current_url:Ee.location.href,$browser_version:c.info.browserVersion(en,bn.vendor,os),$screen_height:Js.height,$screen_width:Js.width,mp_lib:"web",$lib_version:vn.LIB_VERSION,$insert_id:Dc(),time:c.timestamp()/1e3})},people_properties:function(){return c.extend(c.strip_empty_properties({$os:c.info.os(),$browser:c.info.browser(en,bn.vendor,os)}),{$browser_version:c.info.browserVersion(en,bn.vendor,os)})},mpPageViewProperties:function(){return c.strip_empty_properties({current_page_title:fe.title,current_domain:Ee.location.hostname,current_url_path:Ee.location.pathname,current_url_protocol:Ee.location.protocol,current_url_search:Ee.location.search})}};var Dc=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},m1=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,v1=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,zd=function(e){var t=v1,n=e.split("."),r=n[n.length-1];(r.length>4||r==="com"||r==="org")&&(t=m1);var i=e.match(t);return i?i[0]:""},el=null,tl=null;typeof JSON<"u"&&(el=JSON.stringify,tl=JSON.parse);el=el||c.JSONEncode;tl=tl||c.JSONDecode;c.toArray=c.toArray;c.isObject=c.isObject;c.JSONEncode=c.JSONEncode;c.JSONDecode=c.JSONDecode;c.isBlockedUA=c.isBlockedUA;c.isEmptyObject=c.isEmptyObject;c.info=c.info;c.info.device=c.info.device;c.info.browser=c.info.browser;c.info.browserVersion=c.info.browserVersion;c.info.properties=c.info.properties;var xn=function(){};xn.prototype.create_properties=function(){};xn.prototype.event_handler=function(){};xn.prototype.after_track_handler=function(){};xn.prototype.init=function(e){return this.mp=e,this};xn.prototype.track=function(e,t,n,r){var i=this,o=c.dom_query(e);if(o.length===0){ue.error("The DOM query ("+e+") returned 0 elements");return}return c.each(o,function(s){c.register_event(s,this.override_event,function(l){var a={},u=i.create_properties(n,this),f=i.mp.get_config("track_links_timeout");i.event_handler(l,this,a),window.setTimeout(i.track_callback(r,u,a,!0),f),i.mp.track(t,u,i.track_callback(r,u,a))})},this),!0};xn.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,!(e&&e(r,t)===!1)&&i.after_track_handler(t,n,r))}};xn.prototype.create_properties=function(e,t){var n;return typeof e=="function"?n=e(t):n=c.extend({},e),n};var mi=function(){this.override_event="click"};c.inherit(mi,xn);mi.prototype.create_properties=function(e,t){var n=mi.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n};mi.prototype.event_handler=function(e,t,n){n.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",n.href=t.href,n.new_tab||e.preventDefault()};mi.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var Ml=function(){this.override_event="submit"};c.inherit(Ml,xn);Ml.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()};Ml.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var g1=Pc("lock"),Qm=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Qm.prototype.withLock=function(e,t,n){!n&&typeof t!="function"&&(n=t,t=null);var r=n||new Date().getTime()+"|"+Math.random(),i=new Date().getTime(),o=this.storageKey,s=this.pollIntervalMS,l=this.timeoutMS,a=this.storage,u=o+":X",f=o+":Y",h=o+":Z",d=function(p){t&&t(p)},g=function(p){if(new Date().getTime()-i>l){g1.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+r+"]"),a.removeItem(h),a.removeItem(f),S();return}setTimeout(function(){try{p()}catch(_){d(_)}},s*(Math.random()+.1))},y=function(p,_){p()?_():g(function(){y(p,_)})},w=function(){var p=a.getItem(f);if(p&&p!==r)return!1;if(a.setItem(f,r),a.getItem(f)===r)return!0;if(!Zs(a,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},S=function(){a.setItem(u,r),y(w,function(){if(a.getItem(u)===r){m();return}g(function(){if(a.getItem(f)!==r){S();return}y(function(){return!a.getItem(h)},m)})})},m=function(){a.setItem(h,"1");try{e()}finally{a.removeItem(h),a.getItem(f)===r&&a.removeItem(f),a.getItem(u)===r&&a.removeItem(u)}};try{if(Zs(a,!0))S();else throw new Error("localStorage support check failed")}catch(p){d(p)}};var Bd=Pc("batch"),rr=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||c.bind(Bd.error,Bd),this.lock=new Qm(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};rr.prototype.enqueue=function(e,t,n){var r={id:Dc(),flushAfter:new Date().getTime()+t*2,payload:e};this.lock.withLock(c.bind(function(){var o;try{var s=this.readFromStorage();s.push(r),o=this.saveToStorage(s),o&&this.memQueue.push(r)}catch{this.reportError("Error enqueueing item",e),o=!1}n&&n(o)},this),c.bind(function(o){this.reportError("Error acquiring storage lock",o),n&&n(!1)},this),this.pid)};rr.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengtho.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var $d=function(e,t){var n=[];return c.each(e,function(r){r.id&&!t[r.id]&&n.push(r)}),n};rr.prototype.removeItemsByID=function(e,t){var n={};c.each(e,function(i){n[i]=!0}),this.memQueue=$d(this.memQueue,n);var r=c.bind(function(){var i;try{var o=this.readFromStorage();if(o=$d(o,n),i=this.saveToStorage(o),i){o=this.readFromStorage();for(var s=0;s5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:u,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[d]}),h=!1):this.reportError("[dupe] found item with no ID",{item:u}),h&&o.push(f)}s[u.id]=f},this),o.length<1){this.resetFlush();return}this.requestInProgress=!0;var l=c.bind(function(u){this.requestInProgress=!1;try{var f=!1;if(e.unloading)this.queue.updatePayloads(s);else if(c.isObject(u)&&u.error==="timeout"&&new Date().getTime()-n>=t)this.reportError("Network timeout; retrying"),this.flush();else if(c.isObject(u)&&u.xhr_req&&(u.xhr_req.status>=500||u.xhr_req.status===429||u.error==="timeout")){var h=this.flushInterval*2,d=u.xhr_req.responseHeaders;if(d){var g=d["Retry-After"];g&&(h=parseInt(g,10)*1e3||h)}h=Math.min(y1,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h)}else if(c.isObject(u)&&u.xhr_req&&u.xhr_req.status===413)if(i.length>1){var y=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,y,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),f=!0;else f=!0;f&&(this.queue.removeItemsByID(c.map(i,function(w){return w.id}),c.bind(function(w){w?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),c.each(i,c.bind(function(w){var S=w.id;S?(this.itemIdsSentSuccessfully[S]=this.itemIdsSentSuccessfully[S]||0,this.itemIdsSentSuccessfully[S]++,this.itemIdsSentSuccessfully[S]>5&&this.reportError("[dupe] item ID sent too many times",{item:w,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[S]})):this.reportError("[dupe] found item with no ID while removing",{item:w})},this)))}catch(w){this.reportError("Error handling API response",w),this.resetFlush()}},this),a={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(a.transport="sendBeacon"),so.log("MIXPANEL REQUEST:",o),this.sendRequest(o,a,l)}catch(u){this.reportError("Error flushing request queue",u),this.resetFlush()}};sn.prototype.reportError=function(e,t){if(so.error.apply(so.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(n){so.error(n)}};var _1="__mp_opt_in_out_";function S1(e,t){Km(!0,e,t)}function w1(e,t){Km(!1,e,t)}function E1(e,t){return Vm(e,t)==="1"}function Wm(e,t){if(k1(t))return ue.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n=Vm(e,t)==="0";return n&&ue.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function Ei(e){return Mc(e,function(t){return this.get_config(t)})}function ir(e){return Mc(e,function(t){return this._get_config(t)})}function xi(e){return Mc(e,function(t){return this._get_config(t)})}function x1(e,t){t=t||{},Nc(t).remove(Ac(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function Nc(e){return e=e||{},e.persistenceType==="localStorage"?c.localStorage:c.cookie}function Ac(e,t){return t=t||{},(t.persistencePrefix||_1)+e}function Vm(e,t){return Nc(t).get(Ac(e,t))}function k1(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||Ee,n=t.navigator||{},r=!1;return c.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(i){c.includes([!0,1,"1","yes"],i)&&(r=!0)}),r}function Km(e,t,n){if(!c.isString(t)||!t.length){ue.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}n=n||{},Nc(n).set(Ac(t,n),e?1:0,c.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})}function Mc(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),l=t.call(this,"window");r&&(n=Wm(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:l}))}catch(u){ue.error("Unexpected error when checking tracking opt-out status: "+u)}if(!n)return e.apply(this,arguments);var a=arguments[arguments.length-1];typeof a=="function"&&a(0)}}var Jn="$set",vi="$set_once",$t="$unset",Rr="$add",wn="$append",Or="$union",Zn="$remove",C1="$delete",Gm={set_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[Jn]=r,n},unset_action:function(e){var t={},n=[];return c.isArray(e)||(e=[e]),c.each(e,function(r){this._is_reserved_property(r)||n.push(r)},this),t[$t]=n,t},set_once_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[vi]=r,n},union_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=c.isArray(i)?i:[i])},this):r[e]=c.isArray(t)?t:[t],n[Or]=r,n},append_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[wn]=r,n},remove_action:function(e,t){var n={},r={};return c.isObject(e)?c.each(e,function(i,o){this._is_reserved_property(o)||(r[o]=i)},this):r[e]=t,n[Zn]=r,n},delete_action:function(){var e={};return e[C1]="",e}},ve=function(){};c.extend(ve.prototype,Gm);ve.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n};ve.prototype.set=xi(function(e,t,n){var r=this.set_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});ve.prototype.set_once=xi(function(e,t,n){var r=this.set_once_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});ve.prototype.unset=xi(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});ve.prototype.union=xi(function(e,t,n){c.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});ve.prototype.delete=xi(function(e){var t=this.delete_action();return this._send_request(t,e)});ve.prototype.remove=xi(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)});ve.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=c.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)};ve.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};ve.prototype._get_config=function(e){return this._mixpanel.get_config(e)};ve.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};ve.prototype.remove=ve.prototype.remove;ve.prototype.set=ve.prototype.set;ve.prototype.set_once=ve.prototype.set_once;ve.prototype.union=ve.prototype.union;ve.prototype.unset=ve.prototype.unset;ve.prototype.toString=ve.prototype.toString;var G=function(){};c.extend(G.prototype,Gm);G.prototype._init=function(e){this._mixpanel=e};G.prototype.set=ir(function(e,t,n){var r=this.set_action(e,t);return c.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[Jn]=c.extend({},c.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r[Jn]),this._send_request(r,n)});G.prototype.set_once=ir(function(e,t,n){var r=this.set_once_action(e,t);return c.isObject(e)&&(n=t),this._send_request(r,n)});G.prototype.unset=ir(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});G.prototype.increment=ir(function(e,t,n){var r={},i={};return c.isObject(e)?(c.each(e,function(o,s){if(!this._is_reserved_property(s))if(isNaN(parseFloat(o))){ue.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else i[s]=o},this),n=t):(c.isUndefined(t)&&(t=1),i[e]=t),r[Rr]=i,this._send_request(r,n)});G.prototype.append=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)});G.prototype.remove=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)});G.prototype.union=ir(function(e,t,n){c.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});G.prototype.track_charge=ir(function(e,t,n){if(!c.isNumber(e)&&(e=parseFloat(e),isNaN(e))){ue.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",c.extend({$amount:e},t),n)});G.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};G.prototype.delete_user=function(){if(!this._identify_called()){ue.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};G.prototype.toString=function(){return this._mixpanel.toString()+".people"};G.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=c.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),c.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),c.truncate(o,255))};G.prototype._get_config=function(e){return this._mixpanel.get_config(e)};G.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};G.prototype._enqueue=function(e){Jn in e?this._mixpanel.persistence._add_to_people_queue(Jn,e):vi in e?this._mixpanel.persistence._add_to_people_queue(vi,e):$t in e?this._mixpanel.persistence._add_to_people_queue($t,e):Rr in e?this._mixpanel.persistence._add_to_people_queue(Rr,e):wn in e?this._mixpanel.persistence._add_to_people_queue(wn,e):Zn in e?this._mixpanel.persistence._add_to_people_queue(Zn,e):Or in e?this._mixpanel.persistence._add_to_people_queue(Or,e):ue.error("Invalid call to _enqueue():",e)};G.prototype._flush_one_queue=function(e,t,n,r){var i=this,o=c.extend({},this._mixpanel.persistence._get_queue(e)),s=o;!c.isUndefined(o)&&c.isObject(o)&&!c.isEmptyObject(o)&&(i._mixpanel.persistence._pop_from_people_queue(e,o),r&&(s=r(o)),t.call(i,s,function(l,a){l===0&&i._mixpanel.persistence._add_to_people_queue(e,o),c.isUndefined(n)||n(l,a)}))};G.prototype._flush=function(e,t,n,r,i,o,s){var l=this,a=this._mixpanel.persistence._get_queue(wn),u=this._mixpanel.persistence._get_queue(Zn);if(this._flush_one_queue(Jn,this.set,e),this._flush_one_queue(vi,this.set_once,r),this._flush_one_queue($t,this.unset,o,function(S){return c.keys(S)}),this._flush_one_queue(Rr,this.increment,t),this._flush_one_queue(Or,this.union,i),!c.isUndefined(a)&&c.isArray(a)&&a.length){for(var f,h=function(S,m){S===0&&l._mixpanel.persistence._add_to_people_queue(wn,f),c.isUndefined(n)||n(S,m)},d=a.length-1;d>=0;d--)f=a.pop(),c.isEmptyObject(f)||l.append(f,h);l._mixpanel.persistence.save()}if(!c.isUndefined(u)&&c.isArray(u)&&u.length){for(var g,y=function(S,m){S===0&&l._mixpanel.persistence._add_to_people_queue(Zn,g),c.isUndefined(s)||s(S,m)},w=u.length-1;w>=0;w--)g=u.pop(),c.isEmptyObject(g)||l.remove(g,y);l._mixpanel.persistence.save()}};G.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};G.prototype.set=G.prototype.set;G.prototype.set_once=G.prototype.set_once;G.prototype.unset=G.prototype.unset;G.prototype.increment=G.prototype.increment;G.prototype.append=G.prototype.append;G.prototype.remove=G.prototype.remove;G.prototype.union=G.prototype.union;G.prototype.track_charge=G.prototype.track_charge;G.prototype.clear_charges=G.prototype.clear_charges;G.prototype.delete_user=G.prototype.delete_user;G.prototype.toString=G.prototype.toString;var Ic="__mps",Lc="__mpso",Uc="__mpus",Fc="__mpa",jc="__mpap",bc="__mpr",zc="__mpu",Ym="$people_distinct_id",nl="__alias",Oo="__timers",T1=[Ic,Lc,Uc,Fc,jc,bc,zc,Ym,nl,Oo],J=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(ue.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&c.localStorage.is_supported()?this.storage=c.localStorage:this.storage=c.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};J.prototype.properties=function(){var e={};return c.each(this.props,function(t,n){c.include(T1,n)||(e[n]=t)}),e};J.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=c.extend({},e))}};J.prototype.upgrade=function(e){var t=e.upgrade,n,r;t&&(n="mp_super_properties",typeof t=="string"&&(n=t),r=this.storage.parse(n),this.storage.remove(n),this.storage.remove(n,!0),r&&(this.props=c.extend(this.props,r.all,r.events))),!e.cookie_name&&e.name!=="mixpanel"&&(n="mp_"+e.token+"_"+e.name,r=this.storage.parse(n),r&&(this.storage.remove(n),this.storage.remove(n,!0),this.register_once(r))),this.storage===c.localStorage&&(r=c.cookie.parse(this.name),c.cookie.remove(this.name),c.cookie.remove(this.name,!0),r&&this.register_once(r))};J.prototype.save=function(){this.disabled||this.storage.set(this.name,c.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};J.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};J.prototype.clear=function(){this.remove(),this.props={}};J.prototype.register_once=function(e,t,n){return c.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof n>"u"?this.default_expiry:n,c.each(e,function(r,i){(!this.props.hasOwnProperty(i)||this.props[i]===t)&&(this.props[i]=r)},this),this.save(),!0):!1};J.prototype.register=function(e,t){return c.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,c.extend(this.props,e),this.save(),!0):!1};J.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())};J.prototype.update_search_keyword=function(e){this.register(c.info.searchInfo(e))};J.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:c.info.referringDomain(e)||"$direct"},"")};J.prototype.get_referrer_info=function(){return c.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};J.prototype.safe_merge=function(e){return c.each(this.props,function(t,n){n in e||(e[n]=t)}),e};J.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};J.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};J.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};J.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};J.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};J.prototype.get_cross_subdomain=function(){return this.cross_subdomain};J.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};J.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(Jn),o=this._get_or_create_queue(vi),s=this._get_or_create_queue($t),l=this._get_or_create_queue(Rr),a=this._get_or_create_queue(Or),u=this._get_or_create_queue(Zn,[]),f=this._get_or_create_queue(wn,[]);n===Ic?(c.extend(i,r),this._pop_from_people_queue(Rr,r),this._pop_from_people_queue(Or,r),this._pop_from_people_queue($t,r)):n===Lc?(c.each(r,function(h,d){d in o||(o[d]=h)}),this._pop_from_people_queue($t,r)):n===Uc?c.each(r,function(h){c.each([i,o,l,a],function(d){h in d&&delete d[h]}),c.each(f,function(d){h in d&&delete d[h]}),s[h]=!0}):n===Fc?(c.each(r,function(h,d){d in i?i[d]+=h:(d in l||(l[d]=0),l[d]+=h)},this),this._pop_from_people_queue($t,r)):n===zc?(c.each(r,function(h,d){c.isArray(h)&&(d in a||(a[d]=[]),a[d]=a[d].concat(h))}),this._pop_from_people_queue($t,r)):n===bc?(u.push(r),this._pop_from_people_queue(wn,r)):n===jc&&(f.push(r),this._pop_from_people_queue($t,r)),ue.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),ue.log(t),this.save()};J.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);c.isUndefined(n)||(c.each(t,function(r,i){e===wn||e===Zn?c.each(n,function(o){o[i]===r&&delete o[i]}):delete n[i]},this),this.save())};J.prototype._get_queue_key=function(e){if(e===Jn)return Ic;if(e===vi)return Lc;if(e===$t)return Uc;if(e===Rr)return Fc;if(e===wn)return jc;if(e===Zn)return bc;if(e===Or)return zc;ue.error("Invalid queue:",e)};J.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]};J.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=c.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)};J.prototype.set_event_timer=function(e,t){var n=this.props[Oo]||{};n[e]=t,this.props[Oo]=n,this.save()};J.prototype.remove_event_timer=function(e){var t=this.props[Oo]||{},n=t[e];return c.isUndefined(n)||(delete this.props[Oo][e],this.save()),n};var Bc,We,Xm=0,R1=1,O1=function(e){return e},Po=function(){},Rt="mixpanel",Jm="base64",P1="json",$c="$device:",si=Ee.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Zm=!si&&en.indexOf("MSIE")===-1&&en.indexOf("Mozilla")===-1,rl=null;bn.sendBeacon&&(rl=function(){return bn.sendBeacon.apply(bn,arguments)});var Hd={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:Jm,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Po,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Po,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},ev=!1,O=function(){},ku=function(e,t,n){var r,i=n===Rt?We:We[n];if(i&&Bc===Xm)r=i;else{if(i&&!c.isArray(i)){ue.error("You have already initialized "+n);return}r=new O}if(r._cached_groups={},r._init(e,t,n),r.people=new G,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=c.info.campaignParams(null),s={},l=!1;c.each(o,function(a,u){s["initial_"+u]=a,a&&(l=!0)}),l&&r.people.set_once(s)}return vn.DEBUG=vn.DEBUG||r.get_config("debug"),!c.isUndefined(i)&&c.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};O.prototype.init=function(e,t,n){if(c.isUndefined(n)){this.report_error("You must name your new library: init(token, config, name)");return}if(n===Rt){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var r=ku(e,t,n);return We[n]=r,r._loaded(),r};O.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var r={};if(!("api_payload_format"in t)){var i=t.api_host||Hd.api_host;i.match(/\.mixpanel\.com/)&&(r.api_payload_format=P1)}if(this.set_config(c.extend({},Hd,r,t,{name:n,token:e,callback_fn:(n===Rt?n:Rt+"."+n)+"._jsc"})),this._jsc=Po,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!c.localStorage.is_supported(!0)||!si)this._batch_requests=!1,ue.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");else if(this.init_batchers(),rl&&Ee.addEventListener){var o=c.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);Ee.addEventListener("pagehide",function(l){l.persisted&&o()}),Ee.addEventListener("visibilitychange",function(){fe.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new J(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=c.UUID();this.get_distinct_id()||this.register_once({distinct_id:$c+s,$device_id:s},""),this.get_config("track_pageview")&&this.track_pageview()};O.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()};O.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(fe.referrer),this.get_config("store_google")&&this.register(c.info.campaignParams(),{persistent:!1}),this.get_config("save_referrer")&&this.persistence.update_referrer_info(fe.referrer)};O.prototype._dom_loaded=function(){c.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||c.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};O.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!ev)return this.__dom_loaded_queue.push([e,t]),!1;var n=new e().init(this);return n.track.apply(n,t)};O.prototype._prepare_callback=function(e,t){if(c.isUndefined(e))return null;if(si){var n=function(s){e(s,t)};return n}else{var r=this._jsc,i=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+i+"]";return r[i]=function(s){delete r[i],e(s,t)},o}};O.prototype._send_request=function(e,t,n,r){var i=!0;if(Zm)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;!r&&(c.isFunction(n)||typeof n=="string")&&(r=n,n=null),n=c.extend(o,n||{}),si||(n.method="GET");var l=n.method==="POST",a=rl&&l&&n.transport.toLowerCase()==="sendbeacon",u=n.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),si||(r?t.callback=r:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),l&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+c.HTTPBuildQuery(t);var f=this;if("img"in t){var h=fe.createElement("img");h.src=e,fe.body.appendChild(h)}else if(a){try{i=rl(e,s)}catch(m){f.report_error(m),i=!1}try{r&&r(i?1:0)}catch(m){f.report_error(m)}}else if(si)try{var d=new XMLHttpRequest;d.open(n.method,e,!0);var g=this.get_config("xhr_headers");if(l&&(g["Content-Type"]="application/x-www-form-urlencoded"),c.each(g,function(m,p){d.setRequestHeader(p,m)}),n.timeout_ms&&typeof d.timeout<"u"){d.timeout=n.timeout_ms;var y=new Date().getTime()}d.withCredentials=!0,d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200){if(r)if(u){var m;try{m=c.JSONDecode(d.responseText)}catch(_){if(f.report_error(_),n.ignore_json_errors)m=d.responseText;else return}r(m)}else r(Number(d.responseText))}else{var p;d.timeout&&!d.status&&new Date().getTime()-y>=d.timeout?p="timeout":p="Bad HTTP status: "+d.status+" "+d.statusText,f.report_error(p),r&&r(u?{status:0,error:p,xhr_req:d}:0)}},d.send(s)}catch(m){f.report_error(m),i=!1}else{var w=fe.createElement("script");w.type="text/javascript",w.async=!0,w.defer=!0,w.src=e;var S=fe.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S)}return i};O.prototype._execute_array=function(e){var t,n=[],r=[],i=[];c.each(e,function(s){s&&(t=s[0],c.isArray(t)?i.push(s):typeof s=="function"?s.call(this):c.isArray(s)&&t==="alias"?n.push(s):c.isArray(s)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?i.push(s):r.push(s))},this);var o=function(s,l){c.each(s,function(a){if(c.isArray(a[0])){var u=l;c.each(a,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[a[0]].apply(this,a.slice(1))},l)};o(n,this),o(r,this),o(i,this)};O.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};O.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=c.bind(function(n){return new sn("__mpq_"+e+n.queue_suffix,{libConfig:this.config,sendRequestFunc:c.bind(function(r,i,o){this._send_request(this.get_config("api_host")+n.endpoint,this._encode_data_for_request(r),i,this._prepare_callback(o,r))},this),beforeSendHook:c.bind(function(r){return this._run_hook("before_send_"+n.type,r)},this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:c.bind(this.stop_batch_senders,this)})},this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()};O.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,c.each(this.request_batchers,function(e){e.start()}))};O.prototype.stop_batch_senders=function(){this._batch_requests=!1,c.each(this.request_batchers,function(e){e.stop(),e.clear()})};O.prototype.push=function(e){this._execute_array([e])};O.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};O.prototype._encode_data_for_request=function(e){var t=c.JSONEncode(e);return this.get_config("api_payload_format")===Jm&&(t=c.base64Encode(t)),{data:t}};O.prototype._track_or_batch=function(e,t){var n=c.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||Po;var l=!0,a=c.bind(function(){return s.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(ue.log("MIXPANEL REQUEST:"),ue.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n,function(u){u?t(1,n):a()}):l=a(),l&&n};O.prototype.track=Ei(function(e,t,n,r){!r&&typeof n=="function"&&(r=n,n=null),n=n||{};var i=n.transport;i&&(n.transport=i);var o=n.send_immediately;if(typeof r!="function"&&(r=Po),c.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){r(0);return}t=t||{},t.token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!c.isUndefined(s)){var l=new Date().getTime()-s;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var a=this.get_config("track_marketing")?c.info.marketingParams():{};t=c.extend({},c.info.properties(),a,this.persistence.properties(),this.unpersisted_superprops,t);var u=this.get_config("property_blacklist");c.isArray(u)?c.each(u,function(d){delete t[d]}):this.report_error("Invalid value for property_blacklist config: "+u);var f={event:e,properties:t},h=this._track_or_batch({type:"events",data:f,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r);return h});O.prototype.set_group=Ei(function(e,t,n){c.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)});O.prototype.add_group=Ei(function(e,t,n){var r=this.get_property(e);if(r===void 0){var i={};i[e]=[t],this.register(i)}else r.indexOf(t)===-1&&(r.push(t),this.register(i));return this.people.union(e,t,n)});O.prototype.remove_group=Ei(function(e,t,n){var r=this.get_property(e);if(r!==void 0){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),r.length===0&&this.unregister(e)}return this.people.remove(e,t,n)});O.prototype.track_with_groups=Ei(function(e,t,n,r){var i=c.extend({},t||{});return c.each(n,function(o,s){o!=null&&(i[s]=o)}),this.track(e,i,r)});O.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};O.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};O.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return(r===void 0||r._group_key!==e||r._group_id!==t)&&(r=new ve,r._init(this,e,t),this._cached_groups[n]=r),r};O.prototype.track_pageview=Ei(function(e,t){typeof e!="object"&&(e={}),t=t||{};var n=t.event_name||"$mp_web_page_view",r=c.extend(c.info.mpPageViewProperties(),c.info.campaignParams(),c.info.clickParams()),i=c.extend({},r,e);return this.track(n,i)});O.prototype.track_links=function(){return this._track_dom.call(this,mi,arguments)};O.prototype.track_forms=function(){return this._track_dom.call(this,Ml,arguments)};O.prototype.time_event=function(e){if(c.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var D1={persistent:!0},qc=function(e){var t;return c.isObject(e)?t=e:c.isUndefined(e)?t={}:t={days:e},c.extend({},D1,t)};O.prototype.register=function(e,t){var n=qc(t);n.persistent?this.persistence.register(e,n.days):c.extend(this.unpersisted_superprops,e)};O.prototype.register_once=function(e,t,n){var r=qc(n);r.persistent?this.persistence.register_once(e,t,r.days):(typeof t>"u"&&(t="None"),c.each(e,function(i,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=i)},this))};O.prototype.unregister=function(e,t){t=qc(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};O.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)};O.prototype.identify=function(e,t,n,r,i,o,s,l){var a=this.get_distinct_id();if(e&&a!==e){if(typeof e=="string"&&e.indexOf($c)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=a;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==a&&e!==this.get_property(nl)&&(this.unregister(nl),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,s,l),e!==a&&this.track("$identify",{distinct_id:e,$anon_distinct_id:a},{skip_hooks:!0})};O.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=c.UUID();this.register_once({distinct_id:$c+e,$device_id:e},"")};O.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};O.prototype.alias=function(e,t){if(e===this.get_property(Ym))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return c.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(nl,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};O.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};O.prototype.set_config=function(e){if(c.isObject(e)){c.extend(this.config,e);var t=e.batch_size;t&&c.each(this.request_batchers,function(n){n.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),vn.DEBUG=vn.DEBUG||this.get_config("debug")}};O.prototype.get_config=function(e){return this.config[e]};O.prototype._run_hook=function(e){var t=(this.config.hooks[e]||O1).apply(this,jn.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};O.prototype.get_property=function(e){return this.persistence.props[e]};O.prototype.toString=function(){var e=this.get_config("name");return e!==Rt&&(e=Rt+"."+e),e};O.prototype._event_is_disabled=function(e){return c.isBlockedUA(en)||this._flags.disable_all_events||c.include(this.__disabled_events,e)};O.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&c.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||c.cookie.get("mp_optout"))&&(c.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};O.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t&&c.each(this.request_batchers,function(n){n.clear()})};O.prototype._gdpr_call_func=function(e,t){return t=c.extend({track:c.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),c.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};O.prototype.opt_in_tracking=function(e){e=c.extend({enable_persistence:!0},e),this._gdpr_call_func(S1,e),this._gdpr_update_persistence(e)};O.prototype.opt_out_tracking=function(e){e=c.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(w1,e),this._gdpr_update_persistence(e)};O.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(E1,e)};O.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(Wm,e)};O.prototype.clear_opt_in_out_tracking=function(e){e=c.extend({enable_persistence:!0},e),this._gdpr_call_func(x1,e),this._gdpr_update_persistence(e)};O.prototype.report_error=function(e,t){ue.error.apply(ue.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(n){ue.error(n)}};O.prototype.init=O.prototype.init;O.prototype.reset=O.prototype.reset;O.prototype.disable=O.prototype.disable;O.prototype.time_event=O.prototype.time_event;O.prototype.track=O.prototype.track;O.prototype.track_links=O.prototype.track_links;O.prototype.track_forms=O.prototype.track_forms;O.prototype.track_pageview=O.prototype.track_pageview;O.prototype.register=O.prototype.register;O.prototype.register_once=O.prototype.register_once;O.prototype.unregister=O.prototype.unregister;O.prototype.identify=O.prototype.identify;O.prototype.alias=O.prototype.alias;O.prototype.name_tag=O.prototype.name_tag;O.prototype.set_config=O.prototype.set_config;O.prototype.get_config=O.prototype.get_config;O.prototype.get_property=O.prototype.get_property;O.prototype.get_distinct_id=O.prototype.get_distinct_id;O.prototype.toString=O.prototype.toString;O.prototype.opt_out_tracking=O.prototype.opt_out_tracking;O.prototype.opt_in_tracking=O.prototype.opt_in_tracking;O.prototype.has_opted_out_tracking=O.prototype.has_opted_out_tracking;O.prototype.has_opted_in_tracking=O.prototype.has_opted_in_tracking;O.prototype.clear_opt_in_out_tracking=O.prototype.clear_opt_in_out_tracking;O.prototype.get_group=O.prototype.get_group;O.prototype.set_group=O.prototype.set_group;O.prototype.add_group=O.prototype.add_group;O.prototype.remove_group=O.prototype.remove_group;O.prototype.track_with_groups=O.prototype.track_with_groups;O.prototype.start_batch_senders=O.prototype.start_batch_senders;O.prototype.stop_batch_senders=O.prototype.stop_batch_senders;J.prototype.properties=J.prototype.properties;J.prototype.update_search_keyword=J.prototype.update_search_keyword;J.prototype.update_referrer_info=J.prototype.update_referrer_info;J.prototype.get_cross_subdomain=J.prototype.get_cross_subdomain;J.prototype.clear=J.prototype.clear;var Xr={},N1=function(){c.each(Xr,function(e,t){t!==Rt&&(We[t]=e)}),We._=c},A1=function(){We.init=function(e,t,n){if(n)return We[n]||(We[n]=Xr[n]=ku(e,t,n),We[n]._loaded()),We[n];var r=We;Xr[Rt]?r=Xr[Rt]:e&&(r=ku(e,t,Rt),r._loaded(),Xr[Rt]=r),We=r,Bc===R1&&(Ee[Rt]=We),N1()}},M1=function(){function e(){e.done||(e.done=!0,ev=!0,Zm=!1,c.each(Xr,function(r){r._dom_loaded()}))}function t(){try{fe.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(fe.addEventListener)fe.readyState==="complete"?e():fe.addEventListener("DOMContentLoaded",e,!1);else if(fe.attachEvent){fe.attachEvent("onreadystatechange",e);var n=!1;try{n=Ee.frameElement===null}catch{}fe.documentElement.doScroll&&n&&t()}c.register_event(Ee,"load",e,!0)};function I1(){return Bc=Xm,We=new O,A1(),We.init(),M1(),We}var L1=I1(),U1=L1;const tv=il(U1),F1="9b5c61bf2bf4c48916655fe862e8fcbd",j1=F1,nv={OPEN_WEBAPP:"open_webapp",SEND_TRANSACTION:"send_transaction"},rv=async e=>{console.info("[mixpanel]",e),await tv.track(e)};tv.init(j1,{loaded:()=>{rv(nv.OPEN_WEBAPP)}});function b1(){const e=kc(),{currencies:t,transaction:n,setTransaction:r}=wi(),i=t.find(S=>S.id===n.currency_id),o=(S,m)=>{const p=[...n.shares],_=p.findIndex(v=>v.related_user_id===S);p[_].amount=m,r({...n,shares:p})},s=n.shares.filter(S=>S.is_payer).reduce((S,m)=>S+m.amount,0),l=n.shares.filter(S=>!S.is_payer).reduce((S,m)=>S+m.amount,0),a=sl,h=n.shares.filter(S=>S.related_user_id&&S.is_payer),d=n.shares.filter(S=>S.related_user_id&&!S.is_payer),g=d.every(S=>S.amount===d[0].amount),y=()=>{const S=s/d.length,m=[...n.shares];r({...n,shares:m.map(p=>p.is_payer?p:{...p,amount:S})})},w=async()=>{const S={...n,is_confirmed:!0};await rv(nv.SEND_TRANSACTION),alert("patch transaction (see console), close webapp"),console.log(JSON.stringify(S,null,2))};return k.jsxs(Dl,{children:[k.jsx(Rl,{onBack:()=>{e("/")}}),k.jsxs("div",{className:"mb-2 px-4 flex items-center justify-between",children:[k.jsx("h2",{className:"pt-[2px] pb-[6px]",children:"Проверить траты"}),k.jsx(oo,{theme:"text",onClick:()=>{e("/select-currency")},children:i?i.in:"Выберите валюту"})]}),k.jsxs(oi,{className:"!pb-4",children:[k.jsxs("h3",{className:Kn(!u&&"text-error"),children:[a&&"Не хватает",u&&"Всё верно",f&&"Перебор"]}),k.jsxs("div",{className:"mt-1 text-[14px] leading-[20px] text-hint",children:["Заплатили ",s," ",i==null?void 0:i.symbol,", должны ",l," ",i==null?void 0:i.symbol]})]}),k.jsxs(oi,{children:[k.jsx("h3",{children:"Заплатили"}),k.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[!h.length&&k.jsx("span",{className:"opacity-40",children:"(Пусто)"}),h.map(S=>k.jsx(Id,{...S,onChange:m=>{o(S.related_user_id,m)}},S.related_user_id))]})]}),k.jsxs(oi,{children:[k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("h3",{children:"Должны"}),!!d.length&&(!g||!u)&&k.jsx(oo,{theme:"text",onClick:y,children:"Поровну"})]}),k.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[!d.length&&k.jsx("span",{className:"opacity-40",children:"(Пусто)"}),d.map(S=>k.jsx(Id,{...S,onChange:m=>{o(S.related_user_id,m)}},S.related_user_id))]}),k.jsx("div",{className:"mt-8 py-2",children:k.jsx(oo,{onClick:w,disabled:!u,children:"Сохранить"})})]})]})}function Hc(){return k.jsx("div",{className:"h-[1px] -my-[0.5px] mx-4 bg-[#E5E9EB] dark:bg-[#84919A]"})}function z1(){const{users:e,unrelatedUsers:t,selectUser:n,deleteUser:r}=Pl(),{selectUserIndex:i}=wi(),o=i!==null?e:t;return k.jsxs(Dl,{className:"!bg-bg",children:[k.jsx(Rl,{onBack:()=>{history.back()}}),k.jsxs("div",{className:"mb-2 px-4 flex items-center justify-between",children:[k.jsx("h2",{className:"pt-[2px] pb-[6px]",children:"Выберите человека"}),i!==null&&k.jsx(oo,{theme:"text",onClick:r(i),children:"Удалить"})]}),k.jsx("div",{className:"mt-4 overflow-y-auto",children:o.map((s,l,a)=>k.jsxs(k.Fragment,{children:[k.jsx("button",{className:"w-full px-4 py-2 hover:bg-text/5 active:bg-text/10 transition-all",onClick:n(s),children:k.jsx(Oc,{user:s})}),li(n),children:[k.jsx("input",{className:"hidden",id:`${e}-${n}`,name:e,checked:r}),k.jsx("div",{className:"p-1.5",children:k.jsx("div",{className:Kn("flex items-center justify-center w-5 h-5 border-2 rounded-full text-hint",r&&"!text-link"),children:k.jsx("div",{className:Kn("w-[10px] h-[10px] rounded-full bg-link opacity-0 transition-all",r&&"!opacity-100")})})}),k.jsx("div",{className:"flex-1",children:t})]})}function $1(){const e=kc(),{currencies:t,transaction:n,setCurrency:r}=wi(),i=o=>{r(o),e("/check")};return k.jsxs(Dl,{className:"!bg-bg",children:[k.jsx(Rl,{onBack:()=>{history.back()}}),k.jsx("div",{className:"px-4",children:k.jsx("h2",{children:"Выберите валюту"})}),k.jsx("div",{className:"mt-4 overflow-y-auto",children:t.map((o,s)=>k.jsxs("div",{children:[k.jsx(B1,{group:"currencies",label:`${o.symbol} ${o.title}`,value:o.id,checked:(n==null?void 0:n.currency_id)===o.id,onChange:i},`currencies-${o.id}`),sI.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M8 1C8 0.447715 7.55228 0 7 0C6.44772 0 6 0.447715 6 1V6H1C0.447715 6 0 6.44771 0 7C0 7.55228 0.447715 8 1 8H6V13C6 13.5523 6.44772 14 7 14C7.55228 14 8 13.5523 8 13V8H13C13.5523 8 14 7.55228 14 7C14 6.44772 13.5523 6 13 6H8V1Z",fill:"currentColor"}));/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:iv,setPrototypeOf:Qd,isFrozen:H1,getPrototypeOf:Q1,getOwnPropertyDescriptor:W1}=Object;let{freeze:Je,seal:Wt,create:V1}=Object,{apply:Cu,construct:Tu}=typeof Reflect<"u"&&Reflect;Cu||(Cu=function(t,n,r){return t.apply(n,r)});Je||(Je=function(t){return t});Wt||(Wt=function(t){return t});Tu||(Tu=function(t,n){return new t(...n)});const K1=At(Array.prototype.forEach),Wd=At(Array.prototype.pop),$i=At(Array.prototype.push),Es=At(String.prototype.toLowerCase),ha=At(String.prototype.toString),G1=At(String.prototype.match),Ft=At(String.prototype.replace),Y1=At(String.prototype.indexOf),X1=At(String.prototype.trim),ht=At(RegExp.prototype.test),qi=J1(TypeError);function At(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i/gm),rS=Wt(/\${[\w\W]*}/gm),iS=Wt(/^data-[\-\w.\u00B7-\uFFFF]/),oS=Wt(/^aria-[\-\w]+$/),ov=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sS=Wt(/^(?:\w+script|data):/i),lS=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sv=Wt(/^html$/i);var Xd=Object.freeze({__proto__:null,MUSTACHE_EXPR:tS,ERB_EXPR:nS,TMPLIT_EXPR:rS,DATA_ATTR:iS,ARIA_ATTR:oS,IS_ALLOWED_URI:ov,IS_SCRIPT_OR_DATA:sS,ATTR_WHITESPACE:lS,DOCTYPE_NAME:sv});const aS=()=>typeof window>"u"?null:window,uS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function lv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:aS();const t=$=>lv($);if(t.version="3.0.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;const n=e.document,r=n.currentScript;let{document:i}=e;const{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:a,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:g}=e,y=a.prototype,w=ss(y,"cloneNode"),S=ss(y,"nextSibling"),m=ss(y,"childNodes"),p=ss(y,"parentNode");if(typeof s=="function"){const $=i.createElement("template");$.content&&$.content.ownerDocument&&(i=$.content.ownerDocument)}let _,v="";const{implementation:R,createNodeIterator:D,createDocumentFragment:T,getElementsByTagName:P}=i,{importNode:b}=n;let q={};t.isSupported=typeof iv=="function"&&typeof p=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:he,ERB_EXPR:ne,TMPLIT_EXPR:tt,DATA_ATTR:kn,ARIA_ATTR:Vt,IS_SCRIPT_OR_DATA:at,ATTR_WHITESPACE:ut}=Xd;let{IS_ALLOWED_URI:L}=Xd,F=null;const V=X({},[...Vd,...pa,...ma,...va,...Kd]);let Y=null;const _e=X({},[...Gd,...ga,...Yd,...ls]);let le=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ct=null,ft=!0,Kt=!0,Mt=!1,bo=!0,Cn=!1,Gt=!1,ki=!1,Ci=!1,Tn=!1,Yt=!1,or=!1,Nr=!0,sr=!1;const Ti="user-content-";let St=!0,Rn=!1,ln={},an=null;const zo=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ri=null;const lr=X({},["audio","video","img","source","image","track"]);let Ar=null;const Mr=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ir="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let un=It,Oi=!1,x=null;const C=X({},[Ir,ar,It],ha);let N;const z=["application/xhtml+xml","text/html"],K="text/html";let B,W=null;const Q=i.createElement("form"),H=function(E){return E instanceof RegExp||E instanceof Function},oe=function(E){if(!(W&&W===E)){if((!E||typeof E!="object")&&(E={}),E=Ur(E),N=z.indexOf(E.PARSER_MEDIA_TYPE)===-1?N=K:N=E.PARSER_MEDIA_TYPE,B=N==="application/xhtml+xml"?ha:Es,F="ALLOWED_TAGS"in E?X({},E.ALLOWED_TAGS,B):V,Y="ALLOWED_ATTR"in E?X({},E.ALLOWED_ATTR,B):_e,x="ALLOWED_NAMESPACES"in E?X({},E.ALLOWED_NAMESPACES,ha):C,Ar="ADD_URI_SAFE_ATTR"in E?X(Ur(Mr),E.ADD_URI_SAFE_ATTR,B):Mr,Ri="ADD_DATA_URI_TAGS"in E?X(Ur(lr),E.ADD_DATA_URI_TAGS,B):lr,an="FORBID_CONTENTS"in E?X({},E.FORBID_CONTENTS,B):zo,ie="FORBID_TAGS"in E?X({},E.FORBID_TAGS,B):{},ct="FORBID_ATTR"in E?X({},E.FORBID_ATTR,B):{},ln="USE_PROFILES"in E?E.USE_PROFILES:!1,ft=E.ALLOW_ARIA_ATTR!==!1,Kt=E.ALLOW_DATA_ATTR!==!1,Mt=E.ALLOW_UNKNOWN_PROTOCOLS||!1,bo=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Cn=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,Tn=E.RETURN_DOM||!1,Yt=E.RETURN_DOM_FRAGMENT||!1,or=E.RETURN_TRUSTED_TYPE||!1,Ci=E.FORCE_BODY||!1,Nr=E.SANITIZE_DOM!==!1,sr=E.SANITIZE_NAMED_PROPS||!1,St=E.KEEP_CONTENT!==!1,Rn=E.IN_PLACE||!1,L=E.ALLOWED_URI_REGEXP||ov,un=E.NAMESPACE||It,le=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&H(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&H(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Cn&&(Kt=!1),Yt&&(Tn=!0),ln&&(F=X({},[...Kd]),Y=[],ln.html===!0&&(X(F,Vd),X(Y,Gd)),ln.svg===!0&&(X(F,pa),X(Y,ga),X(Y,ls)),ln.svgFilters===!0&&(X(F,ma),X(Y,ga),X(Y,ls)),ln.mathMl===!0&&(X(F,va),X(Y,Yd),X(Y,ls))),E.ADD_TAGS&&(F===V&&(F=Ur(F)),X(F,E.ADD_TAGS,B)),E.ADD_ATTR&&(Y===_e&&(Y=Ur(Y)),X(Y,E.ADD_ATTR,B)),E.ADD_URI_SAFE_ATTR&&X(Ar,E.ADD_URI_SAFE_ATTR,B),E.FORBID_CONTENTS&&(an===zo&&(an=Ur(an)),X(an,E.FORBID_CONTENTS,B)),St&&(F["#text"]=!0),Gt&&X(F,["html","head","body"]),F.table&&(X(F,["tbody"]),delete ie.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw qi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=E.TRUSTED_TYPES_POLICY,v=_.createHTML("")}else _===void 0&&(_=uS(g,r)),_!==null&&typeof v=="string"&&(v=_.createHTML(""));Je&&Je(E),W=E}},te=X({},["mi","mo","mn","ms","mtext"]),qe=X({},["foreignobject","desc","title","annotation-xml"]),Re=X({},["title","style","font","a","script"]),Ae=X({},pa);X(Ae,ma),X(Ae,Z1);const nt=X({},va);X(nt,eS);const ur=function(E){let A=p(E);(!A||!A.tagName)&&(A={namespaceURI:un,tagName:"template"});const U=Es(E.tagName),ae=Es(A.tagName);return x[E.namespaceURI]?E.namespaceURI===ar?A.namespaceURI===It?U==="svg":A.namespaceURI===Ir?U==="svg"&&(ae==="annotation-xml"||te[ae]):!!Ae[U]:E.namespaceURI===Ir?A.namespaceURI===It?U==="math":A.namespaceURI===ar?U==="math"&&qe[ae]:!!nt[U]:E.namespaceURI===It?A.namespaceURI===ar&&!qe[ae]||A.namespaceURI===Ir&&!te[ae]?!1:!nt[U]&&(Re[U]||!Ae[U]):!!(N==="application/xhtml+xml"&&x[E.namespaceURI]):!1},Lt=function(E){$i(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},On=function(E,A){try{$i(t.removed,{attribute:A.getAttributeNode(E),from:A})}catch{$i(t.removed,{attribute:null,from:A})}if(A.removeAttribute(E),E==="is"&&!Y[E])if(Tn||Yt)try{Lt(A)}catch{}else try{A.setAttribute(E,"")}catch{}},wt=function(E){let A,U;if(Ci)E=""+E;else{const Et=G1(E,/^[\r\n\t ]+/);U=Et&&Et[0]}N==="application/xhtml+xml"&&un===It&&(E=''+E+"");const ae=_?_.createHTML(E):E;if(un===It)try{A=new d().parseFromString(ae,N)}catch{}if(!A||!A.documentElement){A=R.createDocument(un,"template",null);try{A.documentElement.innerHTML=Oi?v:ae}catch{}}const Fe=A.body||A.documentElement;return E&&U&&Fe.insertBefore(i.createTextNode(U),Fe.childNodes[0]||null),un===It?P.call(A,Gt?"html":"body")[0]:Gt?A.documentElement:Fe},cr=function(E){return D.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},Pi=function(E){return E instanceof h&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof f)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Pn=function(E){return typeof l=="object"?E instanceof l:E&&typeof E=="object"&&typeof E.nodeType=="number"&&typeof E.nodeName=="string"},dt=function(E,A,U){q[E]&&K1(q[E],ae=>{ae.call(t,A,U,W)})},fr=function(E){let A;if(dt("beforeSanitizeElements",E,null),Pi(E))return Lt(E),!0;const U=B(E.nodeName);if(dt("uponSanitizeElement",E,{tagName:U,allowedTags:F}),E.hasChildNodes()&&!Pn(E.firstElementChild)&&(!Pn(E.content)||!Pn(E.content.firstElementChild))&&ht(/<[/\w]/g,E.innerHTML)&&ht(/<[/\w]/g,E.textContent))return Lt(E),!0;if(!F[U]||ie[U]){if(!ie[U]&&Ge(U)&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,U)||le.tagNameCheck instanceof Function&&le.tagNameCheck(U)))return!1;if(St&&!an[U]){const ae=p(E)||E.parentNode,Fe=m(E)||E.childNodes;if(Fe&&ae){const Et=Fe.length;for(let Se=Et-1;Se>=0;--Se)ae.insertBefore(w(Fe[Se],!0),S(E))}}return Lt(E),!0}return E instanceof a&&!ur(E)||(U==="noscript"||U==="noembed"||U==="noframes")&&ht(/<\/no(script|embed|frames)/i,E.innerHTML)?(Lt(E),!0):(Cn&&E.nodeType===3&&(A=E.textContent,A=Ft(A,he," "),A=Ft(A,ne," "),A=Ft(A,tt," "),E.textContent!==A&&($i(t.removed,{element:E.cloneNode()}),E.textContent=A)),dt("afterSanitizeElements",E,null),!1)},ce=function(E,A,U){if(Nr&&(A==="id"||A==="name")&&(U in i||U in Q))return!1;if(!(Kt&&!ct[A]&&ht(kn,A))){if(!(ft&&ht(Vt,A))){if(!Y[A]||ct[A]){if(!(Ge(E)&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,E)||le.tagNameCheck instanceof Function&&le.tagNameCheck(E))&&(le.attributeNameCheck instanceof RegExp&&ht(le.attributeNameCheck,A)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(A))||A==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&ht(le.tagNameCheck,U)||le.tagNameCheck instanceof Function&&le.tagNameCheck(U))))return!1}else if(!Ar[A]){if(!ht(L,Ft(U,ut,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&E!=="script"&&Y1(U,"data:")===0&&Ri[E])){if(!(Mt&&!ht(at,Ft(U,ut,"")))){if(U)return!1}}}}}}return!0},Ge=function(E){return E.indexOf("-")>0},cn=function(E){let A,U,ae,Fe;dt("beforeSanitizeAttributes",E,null);const{attributes:Et}=E;if(!Et)return;const Se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};for(Fe=Et.length;Fe--;){A=Et[Fe];const{name:Xt,namespaceURI:Il}=A;if(U=Xt==="value"?A.value:X1(A.value),ae=B(Xt),Se.attrName=ae,Se.attrValue=U,Se.keepAttr=!0,Se.forceKeepAttr=void 0,dt("uponSanitizeAttribute",E,Se),U=Se.attrValue,Se.forceKeepAttr||(On(Xt,E),!Se.keepAttr))continue;if(!bo&&ht(/\/>/i,U)){On(Xt,E);continue}Cn&&(U=Ft(U,he," "),U=Ft(U,ne," "),U=Ft(U,tt," "));const Qc=B(E.nodeName);if(ce(Qc,ae,U)){if(sr&&(ae==="id"||ae==="name")&&(On(Xt,E),U=Ti+U),_&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Il)switch(g.getAttributeType(Qc,ae)){case"TrustedHTML":{U=_.createHTML(U);break}case"TrustedScriptURL":{U=_.createScriptURL(U);break}}try{Il?E.setAttributeNS(Il,Xt,U):E.setAttribute(Xt,U),Wd(t.removed)}catch{}}}dt("afterSanitizeAttributes",E,null)},Me=function $(E){let A;const U=cr(E);for(dt("beforeSanitizeShadowDOM",E,null);A=U.nextNode();)dt("uponSanitizeShadowNode",A,null),!fr(A)&&(A.content instanceof o&&$(A.content),cn(A));dt("afterSanitizeShadowDOM",E,null)};return t.sanitize=function($){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A,U,ae,Fe;if(Oi=!$,Oi&&($=""),typeof $!="string"&&!Pn($))if(typeof $.toString=="function"){if($=$.toString(),typeof $!="string")throw qi("dirty is not a string, aborting")}else throw qi("toString is not a function");if(!t.isSupported)return $;if(ki||oe(E),t.removed=[],typeof $=="string"&&(Rn=!1),Rn){if($.nodeName){const Xt=B($.nodeName);if(!F[Xt]||ie[Xt])throw qi("root node is forbidden and cannot be sanitized in-place")}}else if($ instanceof l)A=wt(""),U=A.ownerDocument.importNode($,!0),U.nodeType===1&&U.nodeName==="BODY"||U.nodeName==="HTML"?A=U:A.appendChild(U);else{if(!Tn&&!Cn&&!Gt&&$.indexOf("<")===-1)return _&&or?_.createHTML($):$;if(A=wt($),!A)return Tn?null:or?v:""}A&&Ci&&Lt(A.firstChild);const Et=cr(Rn?$:A);for(;ae=Et.nextNode();)fr(ae)||(ae.content instanceof o&&Me(ae.content),cn(ae));if(Rn)return $;if(Tn){if(Yt)for(Fe=T.call(A.ownerDocument);A.firstChild;)Fe.appendChild(A.firstChild);else Fe=A;return(Y.shadowroot||Y.shadowrootmode)&&(Fe=b.call(n,Fe,!0)),Fe}let Se=Gt?A.outerHTML:A.innerHTML;return Gt&&F["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&ht(sv,A.ownerDocument.doctype.name)&&(Se=" +`+Se),Cn&&(Se=Ft(Se,he," "),Se=Ft(Se,ne," "),Se=Ft(Se,tt," ")),_&&or?_.createHTML(Se):Se},t.setConfig=function($){oe($),ki=!0},t.clearConfig=function(){W=null,ki=!1},t.isValidAttribute=function($,E,A){W||oe({});const U=B($),ae=B(E);return ce(U,ae,A)},t.addHook=function($,E){typeof E=="function"&&(q[$]=q[$]||[],$i(q[$],E))},t.removeHook=function($){if(q[$])return Wd(q[$])},t.removeHooks=function($){q[$]&&(q[$]=[])},t.removeAllHooks=function(){q={}},t}var cS=lv();const fS=({string:e,allowedTags:t})=>{const n=cS.sanitize(e,{ALLOWED_TAGS:t});return k.jsx("span",{dangerouslySetInnerHTML:{__html:n}})},dS=e=>I.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 6.29289C9.68342 5.90237 10.3166 5.90237 10.7071 6.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L10.7071 17.7071C10.3166 18.0976 9.68342 18.0976 9.29289 17.7071C8.90237 17.3166 8.90237 16.6834 9.29289 16.2929L13.5858 12L9.29289 7.70711C8.90237 7.31658 8.90237 6.68342 9.29289 6.29289Z",fill:"currentColor"}));function hS({normalized_name:e,related_user_id:t,onClick:n}){const{getUserById:r}=Pl(),i=t?r(t):void 0;return k.jsxs("button",{className:"w-full flex gap-3 text-left items-center px-4 py-2.5 truncate hover:bg-text/5 active:bg-text/10 transition-all",onClick:n,children:[k.jsx("div",{className:"flex w-[35%] truncate",children:e?k.jsx("div",{className:"truncate",children:e}):k.jsx("div",{className:"truncate opacity-30",children:"(доп.)"})}),k.jsx("div",{className:"flex w-[55%] truncate",children:k.jsx(Oc,{user:i})}),k.jsx("div",{className:"h-6 w-6 text-hint opacity-50",children:k.jsx(dS,{})})]})}function ya(){const e=kc(),{transaction:t,setSelectUserIndex:n}=wi(),{unrelatedUsers:r,isRelationsComplete:i}=Pl(),o=a=>{n(a),e("/select-user")},s=()=>{n(null),e("/select-user")},l=()=>{alert("close webapp...")};return k.jsxs(Dl,{children:[k.jsx(Rl,{onCancel:l}),k.jsxs(oi,{children:[k.jsx("div",{className:"text-[12px] leading-[1.33em] font-medium text-hint",children:"Сообщение"}),k.jsxs("div",{className:"mt-1",children:[!!t.is_voice&&k.jsx("span",{children:"🎙 "}),t.formatted_text?k.jsx(fS,{allowedTags:["b","strong"],string:t.formatted_text}):k.jsx("strong",{children:t.raw_text})]})]}),k.jsxs(oi,{children:[k.jsxs("div",{children:[k.jsx("h2",{children:"Соотнесите людей"}),k.jsx("div",{className:"mt-1 text-[14px] leading-[20px] text-hint",children:"Со временем мы запомним соотношения"}),k.jsx("div",{className:"mt-2 -mx-4 overflow-y-auto",children:t.shares.map((a,u)=>k.jsxs("div",{children:[k.jsx(hS,{...a,onClick:()=>o(u)},`UserRelation-${u}`),u{e("/check")},children:"Далее"})})]})]})}const pS="https://jsonplaceholder.typicode.com",mS=()=>I0({queryKey:["currencies"],queryFn:()=>fetch(`${pS}/users`).then(e=>e.json()),onSuccess:e=>{console.log("data",e)},staleTime:60*1e3});function vS(){const{isLoading:e,error:t}=mS();return k.jsxs("div",{className:Kn("fixed top-0 left-0 w-full h-full bg-bg2 transition-all",e||t?"opacity-100":"pointer-events-none opacity-0"),children:[e&&k.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 w-[50px] h-[50px]",children:k.jsx("div",{className:"w-full h-full rounded-full border-[3px] border-button border-l-button/10 border-t-button/10 animate-[spin_0.6s_linear_infinite]"})}),!!t&&k.jsxs("div",{className:"p-4 text-[#f00]",children:["Error: ",t.message]})]})}const gS=new o0;function yS(){const{isDarkTheme:e}=zm(),t=$_([{path:"/",element:k.jsx(ya,{}),errorElement:k.jsx(ya,{})},{path:"*",element:k.jsx(ya,{})},{path:"/select-user",element:k.jsx(z1,{})},{path:"/check",element:k.jsx(b1,{})},{path:"/select-currency",element:k.jsx($1,{})}]);return k.jsx(S0,{client:gS,children:k.jsxs("div",{className:Kn(e?"theme-dark":"theme-light"),children:[k.jsx(j_,{router:t}),k.jsx(vS,{})]})})}_a.createRoot(document.getElementById("root")).render(k.jsx(lh.StrictMode,{children:k.jsx(yS,{})})); diff --git a/assets/index-233ec9b5.css b/assets/index-233ec9b5.css deleted file mode 100644 index e4ee94e..0000000 --- a/assets/index-233ec9b5.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0px}.left-1\/2{left:50%}.left-4{left:1rem}.top-0{top:0px}.top-1\/2{top:50%}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-my-\[0\.5px\]{margin-top:-.5px;margin-bottom:-.5px}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[10px\]{height:10px}.h-\[1px\]{height:1px}.h-\[50px\]{height:50px}.h-\[64px\]{height:64px}.h-full{height:100%}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[10px\]{width:10px}.w-\[117px\]{width:117px}.w-\[45\%\]{width:45%}.w-\[50px\]{width:50px}.w-full{width:100%}.max-w-\[500px\]{max-width:500px}.flex-1{flex:1 1 0%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-\[spin_0\.6s_linear_infinite\]{animation:spin .6s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-\[5px\]{gap:5px}.gap-\[9px\]{gap:9px}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-\[3px\]{border-width:3px}.border-\[\#DDE2E4\]{--tw-border-opacity: 1;border-color:rgb(221 226 228 / var(--tw-border-opacity))}.border-button{--tw-border-opacity: 1;border-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-border-opacity)))}.border-l-button\/10{border-left-color:hsl(var(--twc-button) / .1)}.border-t-button\/10{border-top-color:hsl(var(--twc-button) / .1)}.\!bg-bg{--tw-bg-opacity: 1 !important;background-color:hsl(var(--twc-bg) / var(--twc-bg-opacity, var(--tw-bg-opacity)))!important}.bg-\[\#E5E9EB\]{--tw-bg-opacity: 1;background-color:rgb(229 233 235 / var(--tw-bg-opacity))}.bg-bg{--tw-bg-opacity: 1;background-color:hsl(var(--twc-bg) / var(--twc-bg-opacity, var(--tw-bg-opacity)))}.bg-bg2{--tw-bg-opacity: 1;background-color:hsl(var(--twc-bg2) / var(--twc-bg2-opacity, var(--tw-bg-opacity)))}.bg-button{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.bg-link{--tw-bg-opacity: 1;background-color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-bg-opacity)))}.bg-cover{background-size:cover}.bg-center{background-position:center}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.\!pb-4{padding-bottom:1rem!important}.pb-6{padding-bottom:1.5rem}.pb-\[6px\]{padding-bottom:6px}.pt-\[2px\]{padding-top:2px}.text-left{text-align:left}.text-right{text-align:right}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[1\.33em\]{line-height:1.33em}.leading-\[18px\]{line-height:18px}.leading-\[20px\]{line-height:20px}.leading-\[22px\]{line-height:22px}.leading-\[24px\]{line-height:24px}.\!text-link{--tw-text-opacity: 1 !important;color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-text-opacity)))!important}.text-\[\#f00\]{--tw-text-opacity: 1;color:rgb(255 0 0 / var(--tw-text-opacity))}.text-button{--tw-text-opacity: 1;color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-text-opacity)))}.text-buttonText{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.text-error{--tw-text-opacity: 1;color:hsl(var(--twc-error) / var(--twc-error-opacity, var(--tw-text-opacity)))}.text-hint{--tw-text-opacity: 1;color:hsl(var(--twc-hint) / var(--twc-hint-opacity, var(--tw-text-opacity)))}.text-link{--tw-text-opacity: 1;color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-text-opacity)))}.text-text{--tw-text-opacity: 1;color:hsl(var(--twc-text) / var(--twc-text-opacity, var(--tw-text-opacity)))}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.theme-light,[data-theme=light]{--twc-text: 204 16.1% 12.2%;--twc-bg: 0 0% 100%;--twc-bg2: 180 6.7% 97.1%;--twc-hint: 205.29999999999995 11.7% 32%;--twc-link: 212.29999999999995 88.2% 50%;--twc-button: 212.5 92% 61%;--twc-buttonText: 200 20% 97.1%;--twc-error: 1.1999999999999886 95.2% 41%}.theme-dark,[data-theme=dark]{--twc-text: 200 20% 97.1%;--twc-bg: 207.70000000000005 14.9% 17.1%;--twc-bg2: 204 16.1% 12.2%;--twc-hint: 200 10.5% 72%;--twc-link: 212.5 92% 61%;--twc-button: 212.5 92% 61%;--twc-buttonText: 200 20% 97.1%;--twc-error: 4.899999999999977 90.8% 65.9%}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;min-width:320px;min-height:100vh}.limiter{max-width:1000px;margin:0 auto}h2{font-size:18px;line-height:24px;font-weight:600}h3{font-size:16px;line-height:24px;font-weight:600}button{font-family:inherit;cursor:pointer}.panel+.panel{margin-top:8px}strong{font-weight:500}.selection\:bg-button *::-moz-selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:bg-button *::selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:text-buttonText *::-moz-selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:text-buttonText *::selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:bg-button::-moz-selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:bg-button::selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:text-buttonText::-moz-selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:text-buttonText::selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.hover\:bg-text\/5:hover{background-color:hsl(var(--twc-text) / .05)}.hover\:brightness-\[1\.2\]:hover{--tw-brightness: brightness(1.2);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-button:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-ring-opacity)))}.active\:bg-text\/10:active{background-color:hsl(var(--twc-text) / .1)}.active\:brightness-\[1\.4\]:active{--tw-brightness: brightness(1.4);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:active\:brightness-\[1\.2\]:active:enabled{--tw-brightness: brightness(1.2);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:opacity-40:disabled{opacity:.4}@media (prefers-color-scheme: dark){.dark\:border-\[\#6E7C87\]{--tw-border-opacity: 1;border-color:rgb(110 124 135 / var(--tw-border-opacity))}.dark\:bg-\[\#84919A\]{--tw-bg-opacity: 1;background-color:rgb(132 145 154 / var(--tw-bg-opacity))}.dark\:bg-\[\#D5DADD\]{--tw-bg-opacity: 1;background-color:rgb(213 218 221 / var(--tw-bg-opacity))}.dark\:text-\[\#48535B\]{--tw-text-opacity: 1;color:rgb(72 83 91 / var(--tw-text-opacity))}}@media (min-width: 768px){.md\:max-w-\[300px\]{max-width:300px}} diff --git a/assets/index-85e27589.css b/assets/index-85e27589.css new file mode 100644 index 0000000..86de722 --- /dev/null +++ b/assets/index-85e27589.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0px}.left-1\/2{left:50%}.left-4{left:1rem}.top-0{top:0px}.top-1\/2{top:50%}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-my-\[0\.5px\]{margin-top:-.5px;margin-bottom:-.5px}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-3{height:.75rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[10px\]{height:10px}.h-\[1px\]{height:1px}.h-\[50px\]{height:50px}.h-\[64px\]{height:64px}.h-full{height:100%}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\[10px\]{width:10px}.w-\[117px\]{width:117px}.w-\[35\%\]{width:35%}.w-\[50px\]{width:50px}.w-\[55\%\]{width:55%}.w-full{width:100%}.max-w-\[500px\]{max-width:500px}.flex-1{flex:1 1 0%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-\[spin_0\.6s_linear_infinite\]{animation:spin .6s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-\[5px\]{gap:5px}.gap-\[9px\]{gap:9px}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-\[3px\]{border-width:3px}.border-\[\#DDE2E4\]{--tw-border-opacity: 1;border-color:rgb(221 226 228 / var(--tw-border-opacity))}.border-button{--tw-border-opacity: 1;border-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-border-opacity)))}.border-l-button\/10{border-left-color:hsl(var(--twc-button) / .1)}.border-t-button\/10{border-top-color:hsl(var(--twc-button) / .1)}.\!bg-bg{--tw-bg-opacity: 1 !important;background-color:hsl(var(--twc-bg) / var(--twc-bg-opacity, var(--tw-bg-opacity)))!important}.bg-\[\#E5E9EB\]{--tw-bg-opacity: 1;background-color:rgb(229 233 235 / var(--tw-bg-opacity))}.bg-bg{--tw-bg-opacity: 1;background-color:hsl(var(--twc-bg) / var(--twc-bg-opacity, var(--tw-bg-opacity)))}.bg-bg2{--tw-bg-opacity: 1;background-color:hsl(var(--twc-bg2) / var(--twc-bg2-opacity, var(--tw-bg-opacity)))}.bg-button{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.bg-link{--tw-bg-opacity: 1;background-color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-bg-opacity)))}.bg-cover{background-size:cover}.bg-center{background-position:center}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.\!pb-4{padding-bottom:1rem!important}.pb-6{padding-bottom:1.5rem}.pb-\[6px\]{padding-bottom:6px}.pt-\[2px\]{padding-top:2px}.text-left{text-align:left}.text-right{text-align:right}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[1\.33em\]{line-height:1.33em}.leading-\[18px\]{line-height:18px}.leading-\[20px\]{line-height:20px}.leading-\[22px\]{line-height:22px}.leading-\[24px\]{line-height:24px}.\!text-link{--tw-text-opacity: 1 !important;color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-text-opacity)))!important}.text-\[\#f00\]{--tw-text-opacity: 1;color:rgb(255 0 0 / var(--tw-text-opacity))}.text-button{--tw-text-opacity: 1;color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-text-opacity)))}.text-buttonText{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.text-error{--tw-text-opacity: 1;color:hsl(var(--twc-error) / var(--twc-error-opacity, var(--tw-text-opacity)))}.text-hint{--tw-text-opacity: 1;color:hsl(var(--twc-hint) / var(--twc-hint-opacity, var(--tw-text-opacity)))}.text-link{--tw-text-opacity: 1;color:hsl(var(--twc-link) / var(--twc-link-opacity, var(--tw-text-opacity)))}.text-text{--tw-text-opacity: 1;color:hsl(var(--twc-text) / var(--twc-text-opacity, var(--tw-text-opacity)))}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.theme-light,[data-theme=light]{--twc-text: 204 16.1% 12.2%;--twc-bg: 0 0% 100%;--twc-bg2: 180 6.7% 97.1%;--twc-hint: 205.29999999999995 11.7% 32%;--twc-link: 212.29999999999995 88.2% 50%;--twc-button: 212.5 92% 61%;--twc-buttonText: 200 20% 97.1%;--twc-error: 1.1999999999999886 95.2% 41%}.theme-dark,[data-theme=dark]{--twc-text: 200 20% 97.1%;--twc-bg: 207.70000000000005 14.9% 17.1%;--twc-bg2: 204 16.1% 12.2%;--twc-hint: 200 10.5% 72%;--twc-link: 212.5 92% 61%;--twc-button: 212.5 92% 61%;--twc-buttonText: 200 20% 97.1%;--twc-error: 4.899999999999977 90.8% 65.9%}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}body{margin:0;min-width:320px;min-height:100vh}.limiter{max-width:1000px;margin:0 auto}h2{font-size:18px;line-height:24px;font-weight:600}h3{font-size:16px;line-height:24px;font-weight:600}button{font-family:inherit;cursor:pointer}.panel+.panel{margin-top:8px}strong{font-weight:500}.selection\:bg-button *::-moz-selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:bg-button *::selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:text-buttonText *::-moz-selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:text-buttonText *::selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:bg-button::-moz-selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:bg-button::selection{--tw-bg-opacity: 1;background-color:hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-bg-opacity)))}.selection\:text-buttonText::-moz-selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.selection\:text-buttonText::selection{--tw-text-opacity: 1;color:hsl(var(--twc-buttonText) / var(--twc-buttonText-opacity, var(--tw-text-opacity)))}.hover\:bg-text\/5:hover{background-color:hsl(var(--twc-text) / .05)}.hover\:brightness-\[1\.2\]:hover{--tw-brightness: brightness(1.2);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-button:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-button) / var(--twc-button-opacity, var(--tw-ring-opacity)))}.active\:bg-text\/10:active{background-color:hsl(var(--twc-text) / .1)}.active\:brightness-\[1\.4\]:active{--tw-brightness: brightness(1.4);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:active\:brightness-\[1\.2\]:active:enabled{--tw-brightness: brightness(1.2);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:opacity-40:disabled{opacity:.4}@media (prefers-color-scheme: dark){.dark\:border-\[\#6E7C87\]{--tw-border-opacity: 1;border-color:rgb(110 124 135 / var(--tw-border-opacity))}.dark\:bg-\[\#84919A\]{--tw-bg-opacity: 1;background-color:rgb(132 145 154 / var(--tw-bg-opacity))}.dark\:bg-\[\#D5DADD\]{--tw-bg-opacity: 1;background-color:rgb(213 218 221 / var(--tw-bg-opacity))}.dark\:text-\[\#48535B\]{--tw-text-opacity: 1;color:rgb(72 83 91 / var(--tw-text-opacity))}}@media (min-width: 768px){.md\:max-w-\[300px\]{max-width:300px}} diff --git a/index.html b/index.html index b240812..1bf5e8a 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@ - - + +