@atproto/oauth-provider 0.1.2-rc.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +27 -0
- package/dist/assets/app/bundle-manifest.json +2 -2
- package/dist/assets/app/main.js +3 -3
- package/dist/assets/app/main.js.map +1 -1
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +31 -40
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client.d.ts +2 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +5 -9
- package/dist/client/client.js.map +1 -1
- package/dist/dpop/dpop-manager.d.ts +0 -1
- package/dist/dpop/dpop-manager.d.ts.map +1 -1
- package/dist/dpop/dpop-manager.js +1 -4
- package/dist/dpop/dpop-manager.js.map +1 -1
- package/dist/lib/http/parser.d.ts +13 -7
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/parser.js +29 -9
- package/dist/lib/http/parser.js.map +1 -1
- package/dist/lib/http/request.d.ts +5 -5
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/http/stream.js +3 -2
- package/dist/lib/http/stream.js.map +1 -1
- package/dist/metadata/build-metadata.d.ts.map +1 -1
- package/dist/metadata/build-metadata.js +0 -14
- package/dist/metadata/build-metadata.js.map +1 -1
- package/dist/oauth-provider.d.ts +2 -2
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +7 -5
- package/dist/oauth-provider.js.map +1 -1
- package/dist/request/types.d.ts +4 -4
- package/dist/signer/signed-token-payload.d.ts +3 -3
- package/dist/signer/signer.d.ts +1 -1
- package/dist/token/token-claims.d.ts +3 -3
- package/package.json +5 -4
- package/src/client/client-manager.ts +46 -60
- package/src/client/client.ts +4 -13
- package/src/dpop/dpop-manager.ts +1 -6
- package/src/lib/http/parser.ts +37 -13
- package/src/lib/http/stream.ts +5 -2
- package/src/metadata/build-metadata.ts +0 -14
- package/src/oauth-provider.ts +6 -18
- package/dist/output/send-authorize-page.d.ts +0 -43
- package/dist/output/send-authorize-page.d.ts.map +0 -1
- package/dist/output/send-authorize-page.js +0 -49
- package/dist/output/send-authorize-page.js.map +0 -1
- package/dist/output/send-error-page.d.ts +0 -5
- package/dist/output/send-error-page.d.ts.map +0 -1
- package/dist/output/send-error-page.js +0 -31
- package/dist/output/send-error-page.js.map +0 -1
package/dist/assets/app/main.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var n,r={exports:{}},a={},o={exports:{}},i={};o.exports=function(){if(n)return i;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,
|
1
|
+
!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var n,r={exports:{}},a={},o={exports:{}},i={};o.exports=function(){if(n)return i;n=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,y={};function g(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||h}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var _=b.prototype=new v;_.constructor=b,m(_,g.prototype),_.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,x={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function C(t,n,r){var a,o={},i=null,s=null;if(null!=n)for(a in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(i=""+n.key),n)k.call(n,a)&&!S.hasOwnProperty(a)&&(o[a]=n[a]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(t&&t.defaultProps)for(a in l=t.defaultProps)void 0===o[a]&&(o[a]=l[a]);return{$$typeof:e,type:t,key:i,ref:s,props:o,_owner:x.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var T=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function z(n,r,a,o,i){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return i=i(l=n),n=""===o?"."+I(l,0):o,w(i)?(a="",null!=n&&(a=n.replace(T,"$&/")+"/"),z(i,r,a,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(i,a+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(T,"$&/")+"/")+n)),r.push(i)),1;if(l=0,o=""===o?".":o+":",w(n))for(var u=0;u<n.length;u++){var c=o+I(s=n[u],u);l+=z(s,r,a,c,i)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(n),"function"==typeof c)for(n=c.call(n),u=0;!(s=n.next()).done;)l+=z(s=s.value,r,a,c=o+I(s,u++),i);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],a=0;return z(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function j(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},O={transition:null},R={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:O,ReactCurrentOwner:x};function Z(){throw Error("act(...) is not supported in production builds of React.")}return i.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},i.Component=g,i.Fragment=r,i.Profiler=o,i.PureComponent=b,i.StrictMode=a,i.Suspense=c,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,i.act=Z,i.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var a=m({},t.props),o=t.key,i=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,s=x.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in n)k.call(n,u)&&!S.hasOwnProperty(u)&&(a[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}return{$$typeof:e,type:t.type,key:o,ref:i,props:a,_owner:s}},i.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},i.createElement=C,i.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:u,render:e}},i.isValidElement=E,i.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:j}},i.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},i.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},i.unstable_act=Z,i.useCallback=function(e,t){return N.current.useCallback(e,t)},i.useContext=function(e){return N.current.useContext(e)},i.useDebugValue=function(){},i.useDeferredValue=function(e){return N.current.useDeferredValue(e)},i.useEffect=function(e,t){return N.current.useEffect(e,t)},i.useId=function(){return N.current.useId()},i.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},i.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},i.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},i.useMemo=function(e,t){return N.current.useMemo(e,t)},i.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},i.useRef=function(e){return N.current.useRef(e)},i.useState=function(e){return N.current.useState(e)},i.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},i.useTransition=function(){return N.current.useTransition()},i.version="18.3.1",i}();var s,l=o.exports;
|
2
2
|
/**
|
3
3
|
* @license React
|
4
4
|
* react-jsx-runtime.production.min.js
|
@@ -7,7 +7,7 @@
|
|
7
7
|
*
|
8
8
|
* This source code is licensed under the MIT license found in the
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
10
|
-
*/r.exports=function(){if(s)return a;s=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function u(e,n,a){var s,l={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:o.current}}return a.Fragment=n,a.jsx=u,a.jsxs=u,a}();var u=r.exports;const c=e=>{const t=window[e];return delete window[e],t},d=c("__customizationData"),f=c("__errorData"),p=c("__authorizeData");var h,m,g
|
10
|
+
*/r.exports=function(){if(s)return a;s=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function u(e,n,a){var s,l={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:o.current}}return a.Fragment=n,a.jsx=u,a.jsxs=u,a}();var u=r.exports;const c=e=>{const t=window[e];return delete window[e],t},d=c("__customizationData"),f=c("__errorData"),p=c("__authorizeData");var h,m,y,g=Object.freeze({__proto__:null,authorizeData:p,customizationData:d,errorData:f}),v={exports:{}},b={},_={exports:{}},w={};function k(){return m||(m=1,_.exports=(h||(h=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>a(l,n))u<o&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<o&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var a=n(u);null!==a;){if(null===a.callback)r(u);else{if(!(a.startTime<=e))break;r(u),a.sortIndex=a.expirationTime,t(l,a)}a=n(u)}}function _(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,N(w);else{var t=n(u);null!==t&&O(_,t.startTime-e)}}function w(t,a){h=!1,m&&(m=!1,g(C),C=-1),p=!0;var o=f;try{for(b(a),d=n(l);null!==d&&(!(d.expirationTime>a)||t&&!I());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var s=i(d.expirationTime<=a);a=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(a)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var y=n(u);null!==y&&O(_,y.startTime-a),c=!1}return c}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,x=!1,S=null,C=-1,E=5,T=-1;function I(){return!(e.unstable_now()-T<E)}function z(){if(null!==S){var t=e.unstable_now();T=t;var n=!0;try{n=S(!0,t)}finally{n?k():(x=!1,S=null)}}else x=!1}if("function"==typeof v)k=function(){v(z)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,j=P.port2;P.port1.onmessage=z,k=function(){j.postMessage(null)}}else k=function(){y(z,0)};function N(e){S=e,x||(x=!0,k())}function O(t,n){C=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,a,o){var i=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?i+o:i,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:a,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>i?(r.sortIndex=o,t(u,r),null===n(l)&&r===n(u)&&(m?(g(C),C=-1):m=!0,O(_,o-i))):(r.sortIndex=s,t(l,r),h||p||(h=!0,N(w))),r},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(w)),w)),_.exports}
|
11
11
|
/**
|
12
12
|
* @license React
|
13
13
|
* react-dom.production.min.js
|
@@ -16,5 +16,5 @@
|
|
16
16
|
*
|
17
17
|
* This source code is licensed under the MIT license found in the
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
19
|
-
*/!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),v.exports=function(){if(g)return b;g=1;var e=l,t=k();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function o(e,t){i(e,t),i(e+"Capture",t)}function i(e,t){for(a[e]=t,e=0;e<t.length;e++)r.add(t[e])}var s=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,d={},f={};function p(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){h[e]=new p(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];h[t]=new p(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){h[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){h[e]=new p(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){h[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){h[e]=new p(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){h[e]=new p(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){h[e]=new p(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){h[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var a=h.hasOwnProperty(t)?h[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!u.call(f,e)||!u.call(d,e)&&(c.test(e)?f[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(m,y);h[t]=new p(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(m,y);h[t]=new p(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(m,y);h[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),z=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),Z=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Z&&e[Z]||e["@@iterator"])?e:null}var L,D=Object.assign;function M(e){if(void 0===L)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var U=!1;function F(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(1!==i||1!==s)do{if(i--,0>--s||a[i]!==o[s]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?M(e):""}function $(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case E:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case z:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return V(e(t))}catch(e){}}return null}function B(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=(e=t.render).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 V(t);case 8:return t===C?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function H(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ae(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ie(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return de(e,t)}))}:de);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={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},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ye(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(he).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ve=D({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 be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ce=null;function Ee(e){if(e=ya(e)){if("function"!=typeof xe)throw Error(n(280));var t=e.stateNode;t&&(t=ba(t),xe(e.stateNode,e.type,t))}}function Te(e){Se?Ce?Ce.push(e):Ce=[e]:Se=e}function ze(){if(Se){var e=Se,t=Ce;if(Ce=Se=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ie(e,t){return e(t)}function Pe(){}var je=!1;function Ne(e,t,n){if(je)return e(t,n);je=!0;try{return Ie(e,t,n)}finally{je=!1,(null!==Se||null!==Ce)&&(Pe(),ze())}}function Oe(e,t){var r=e.stateNode;if(null===r)return null;var a=ba(r);if(null===a)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Re=!1;if(s)try{var Ze={};Object.defineProperty(Ze,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Ze,Ze),window.removeEventListener("test",Ze,Ze)}catch(de){Re=!1}function Ae(e,t,n,r,a,o,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Le=!1,De=null,Me=!1,Ue=null,Fe={onError:function(e){Le=!0,De=e}};function $e(e,t,n,r,a,o,i,s,l){Le=!1,De=null,Ae.apply(Fe,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Be(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(Ve(e)!==e)throw Error(n(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,a=t;;){var o=r.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(a=o.return)){r=a;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return We(o),e;if(i===a)return We(o),t;i=i.sibling}throw Error(n(188))}if(r.return!==a.return)r=o,a=i;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,a=i;break}if(l===a){s=!0,a=o,r=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===r){s=!0,r=i,a=o;break}if(l===a){s=!0,a=i,r=o;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==a)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var He=t.unstable_scheduleCallback,Je=t.unstable_cancelCallback,Qe=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Ge=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,at=t.unstable_IdlePriority,ot=null,it=null,st=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(lt(e)/ut|0)|0},lt=Math.log,ut=Math.LN2,ct=64,dt=4194304;function ft(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~a;0!==s?r=ft(s):0!=(o&=i)&&(r=ft(o))}else 0!=(i=n&~a)?r=ft(i):0!==o&&(r=ft(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-st(t)),r|=e[n],t&=~a;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;default:return-1}}function mt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var _t=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var kt,xt,St,Ct,Et,Tt=!1,zt=[],It=null,Pt=null,jt=null,Nt=new Map,Ot=new Map,Rt=[],Zt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function At(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Lt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&null!==(t=ya(t))&&xt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function Dt(e){var t=ga(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Be(n)))return e.blockedOn=t,void Et(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ya(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Ut(e,t,n){Mt(e)&&n.delete(t)}function Ft(){Tt=!1,null!==It&&Mt(It)&&(It=null),null!==Pt&&Mt(Pt)&&(Pt=null),null!==jt&&Mt(jt)&&(jt=null),Nt.forEach(Ut),Ot.forEach(Ut)}function $t(e,n){e.blockedOn===n&&(e.blockedOn=null,Tt||(Tt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ft)))}function Vt(e){function t(t){return $t(t,e)}if(0<zt.length){$t(zt[0],e);for(var n=1;n<zt.length;n++){var r=zt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&$t(It,e),null!==Pt&&$t(Pt,e),null!==jt&&$t(jt,e),Nt.forEach(t),Ot.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)Dt(n),null===n.blockedOn&&Rt.shift()}var Bt=_.ReactCurrentBatchConfig,Wt=!0;function Kt(e,t,n,r){var a=_t,o=Bt.transition;Bt.transition=null;try{_t=1,Ht(e,t,n,r)}finally{_t=a,Bt.transition=o}}function qt(e,t,n,r){var a=_t,o=Bt.transition;Bt.transition=null;try{_t=4,Ht(e,t,n,r)}finally{_t=a,Bt.transition=o}}function Ht(e,t,n,r){if(Wt){var a=Qt(e,t,n,r);if(null===a)$r(e,t,r,Jt,n),At(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return It=Lt(It,e,t,n,r,a),!0;case"dragenter":return Pt=Lt(Pt,e,t,n,r,a),!0;case"mouseover":return jt=Lt(jt,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Nt.set(o,Lt(Nt.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Ot.set(o,Lt(Ot.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(At(e,r),4&t&&-1<Zt.indexOf(e)){for(;null!==a;){var o=ya(a);if(null!==o&&kt(o),null===(o=Qt(e,t,n,r))&&$r(e,t,r,Jt,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Jt=null;function Qt(e,t,n,r){if(Jt=null,null!==(e=ga(e=ke(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Be(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case at:return 536870912;default:return 16}default:return 16}}var Gt=null,Xt=null,en=null;function tn(){if(en)return en;var e,t,n=Xt,r=n.length,a="value"in Gt?Gt.value:Gt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return en=a.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function an(){return!1}function on(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?rn:an,this.isPropagationStopped=an,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn,ln,un,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(cn),fn=D({},cn,{view:0,detail:0}),pn=on(fn),hn=D({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(sn=e.screenX-un.screenX,ln=e.screenY-un.screenY):ln=sn=0,un=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=on(hn),gn=on(D({},hn,{dataTransfer:0})),yn=on(D({},fn,{relatedTarget:0})),vn=on(D({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=on(D({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=on(D({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Cn(){return Sn}var En=on(D({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tn=on(D({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=on(D({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),In=on(D({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=on(D({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),jn=[9,13,27,32],Nn=s&&"CompositionEvent"in window,On=null;s&&"documentMode"in document&&(On=document.documentMode);var Rn=s&&"TextEvent"in window&&!On,Zn=s&&(!Nn||On&&8<On&&11>=On),An=String.fromCharCode(32),Ln=!1;function Dn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Fn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function Vn(e,t,n,r){Te(r),0<(t=Br(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bn=null,Wn=null;function Kn(e){Ar(e,0)}function qn(e){if(H(va(e)))return e}function Hn(e,t){if("change"===e)return t}var Jn=!1;if(s){var Qn;if(s){var Yn="oninput"in document;if(!Yn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),Yn="function"==typeof Gn.oninput}Qn=Yn}else Qn=!1;Jn=Qn&&(!document.documentMode||9<document.documentMode)}function Xn(){Bn&&(Bn.detachEvent("onpropertychange",er),Wn=Bn=null)}function er(e){if("value"===e.propertyName&&qn(Wn)){var t=[];Vn(t,Wn,e,ke(e)),Ne(Kn,t)}}function tr(e,t,n){"focusin"===e?(Xn(),Wn=n,(Bn=t).attachEvent("onpropertychange",er)):"focusout"===e&&Xn()}function nr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(Wn)}function rr(e,t){if("click"===e)return qn(t)}function ar(e,t){if("input"===e||"change"===e)return qn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ir(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!u.call(t,a)||!or(e[a],t[a]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function cr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=cr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&dr(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=lr(n,o);var i=lr(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pr=s&&"documentMode"in document&&11>=document.documentMode,hr=null,mr=null,gr=null,yr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==hr||hr!==J(r)||(r="selectionStart"in(r=hr)&&dr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&ir(gr,r)||(gr=r,0<(r=Br(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},wr={},kr={};function xr(e){if(wr[e])return wr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return wr[e]=n[t];return e}s&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Sr=xr("animationend"),Cr=xr("animationiteration"),Er=xr("animationstart"),Tr=xr("transitionend"),zr=new Map,Ir="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){zr.set(e,t),o(t,[e])}for(var jr=0;jr<Ir.length;jr++){var Nr=Ir[jr];Pr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Pr(Sr,"onAnimationEnd"),Pr(Cr,"onAnimationIteration"),Pr(Er,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Tr,"onTransitionEnd"),i("onMouseEnter",["mouseout","mouseover"]),i("onMouseLeave",["mouseout","mouseover"]),i("onPointerEnter",["pointerout","pointerover"]),i("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Zr(e,t,r){var a=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,a,o,i,s,l,u){if($e.apply(this,arguments),Le){if(!Le)throw Error(n(198));var c=De;Le=!1,De=null,Me||(Me=!0,Ue=c)}}(a,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&a.isPropagationStopped())break e;Zr(a,s,u),o=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==o&&a.isPropagationStopped())break e;Zr(a,s,u),o=l}}}if(Me)throw e=Ue,Me=!1,Ue=null,e}function Lr(e,t){var n=t[pa];void 0===n&&(n=t[pa]=new Set);var r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}function Dr(e,t,n){var r=0;t&&(r|=4),Fr(n,e,r,t)}var Mr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Mr]){e[Mr]=!0,r.forEach((function(t){"selectionchange"!==t&&(Rr.has(t)||Dr(t,!1,e),Dr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Mr]||(t[Mr]=!0,Dr("selectionchange",!1,t))}}function Fr(e,t,n,r){switch(Yt(t)){case 1:var a=Kt;break;case 4:a=qt;break;default:a=Ht}n=a.bind(null,t,n,e),a=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,a){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===a||8===s.nodeType&&s.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===a||8===l.nodeType&&l.parentNode===a))return;i=i.return}for(;null!==s;){if(null===(i=ga(s)))return;if(5===(l=i.tag)||6===l){r=o=i;continue e}s=s.parentNode}}r=r.return}Ne((function(){var r=o,a=ke(n),i=[];e:{var s=zr.get(e);if(void 0!==s){var l=dn,u=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":u="focus",l=yn;break;case"focusout":u="blur",l=yn;break;case"beforeblur":case"afterblur":l=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=zn;break;case Sr:case Cr:case Er:l=vn;break;case Tr:l=In;break;case"scroll":l=pn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&null!=(m=Oe(h,f))&&c.push(Vr(h,m,p))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,a),i.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!ga(u)&&!u[fa])&&(l||s)&&(s=a.window===a?a:(s=a.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?ga(u):null)&&(u!==(d=Ve(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=mn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:va(l),p=null==u?s:va(u),(s=new c(m,h+"leave",l,n,a)).target=d,s.relatedTarget=p,m=null,ga(a)===r&&((c=new c(f,h+"enter",u,n,a)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Wr(p))h++;for(p=0,m=f;m;m=Wr(m))p++;for(;0<h-p;)c=Wr(c),h--;for(;0<p-h;)f=Wr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Wr(c),f=Wr(f)}c=null}else c=null;null!==l&&Kr(i,s,l,c,!1),null!==u&&null!==d&&Kr(i,d,u,c,!0)}if("select"===(l=(s=r?va(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Hn;else if($n(s))if(Jn)g=ar;else{g=nr;var y=tr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=rr);switch(g&&(g=g(e,r))?Vn(i,g,n,a):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&te(s,"number",s.value)),y=r?va(r):window,e){case"focusin":($n(y)||"true"===y.contentEditable)&&(hr=y,mr=r,gr=null);break;case"focusout":gr=mr=hr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,vr(i,n,a);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":vr(i,n,a)}var v;if(Nn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Dn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Zn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(v=tn()):(Xt="value"in(Gt=a)?Gt.value:Gt.textContent,Un=!0)),0<(y=Br(r,b)).length&&(b=new _n(b,e,null,n,a),i.push({event:b,listeners:y}),(v||null!==(v=Mn(n)))&&(b.data=v))),(v=Rn?function(e,t){switch(e){case"compositionend":return Mn(t);case"keypress":return 32!==t.which?null:(Ln=!0,An);case"textInput":return(e=t.data)===An&&Ln?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Nn&&Dn(e,t)?(e=tn(),en=Xt=Gt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Br(r,"onBeforeInput")).length&&(a=new _n("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v)}Ar(i,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Oe(e,n))&&r.unshift(Vr(e,o,a)),null!=(o=Oe(e,t))&&r.push(Vr(e,o,a))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,a?null!=(l=Oe(n,o))&&i.unshift(Vr(n,l,s)):a||null!=(l=Oe(n,o))&&i.push(Vr(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var qr=/\r\n?/g,Hr=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(qr,"\n").replace(Hr,"")}function Qr(e,t,r){if(t=Jr(t),Jr(e)!==t&&r)throw Error(n(425))}function Yr(){}var Gr=null,Xr=null;function ea(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ta="function"==typeof setTimeout?setTimeout:void 0,na="function"==typeof clearTimeout?clearTimeout:void 0,ra="function"==typeof Promise?Promise:void 0,aa="function"==typeof queueMicrotask?queueMicrotask:void 0!==ra?function(e){return ra.resolve(null).then(e).catch(oa)}:ta;function oa(e){setTimeout((function(){throw e}))}function ia(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);Vt(t)}function sa(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function la(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ua=Math.random().toString(36).slice(2),ca="__reactFiber$"+ua,da="__reactProps$"+ua,fa="__reactContainer$"+ua,pa="__reactEvents$"+ua,ha="__reactListeners$"+ua,ma="__reactHandles$"+ua;function ga(e){var t=e[ca];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fa]||n[ca]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=la(e);null!==e;){if(n=e[ca])return n;e=la(e)}return t}n=(e=n).parentNode}return null}function ya(e){return!(e=e[ca]||e[fa])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function va(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function ba(e){return e[da]||null}var _a=[],wa=-1;function ka(e){return{current:e}}function xa(e){0>wa||(e.current=_a[wa],_a[wa]=null,wa--)}function Sa(e,t){wa++,_a[wa]=e.current,e.current=t}var Ca={},Ea=ka(Ca),Ta=ka(!1),za=Ca;function Ia(e,t){var n=e.type.contextTypes;if(!n)return Ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pa(e){return null!=e.childContextTypes}function ja(){xa(Ta),xa(Ea)}function Na(e,t,r){if(Ea.current!==Ca)throw Error(n(168));Sa(Ea,t),Sa(Ta,r)}function Oa(e,t,r){var a=e.stateNode;if(t=t.childContextTypes,"function"!=typeof a.getChildContext)return r;for(var o in a=a.getChildContext())if(!(o in t))throw Error(n(108,B(e)||"Unknown",o));return D({},r,a)}function Ra(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ca,za=Ea.current,Sa(Ea,e),Sa(Ta,Ta.current),!0}function Za(e,t,r){var a=e.stateNode;if(!a)throw Error(n(169));r?(e=Oa(e,t,za),a.__reactInternalMemoizedMergedChildContext=e,xa(Ta),xa(Ea),Sa(Ea,e)):xa(Ta),Sa(Ta,r)}var Aa=null,La=!1,Da=!1;function Ma(e){null===Aa?Aa=[e]:Aa.push(e)}function Ua(){if(!Da&&null!==Aa){Da=!0;var e=0,t=_t;try{var n=Aa;for(_t=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Aa=null,La=!1}catch(t){throw null!==Aa&&(Aa=Aa.slice(e+1)),He(et,Ua),t}finally{_t=t,Da=!1}}return null}var Fa=[],$a=0,Va=null,Ba=0,Wa=[],Ka=0,qa=null,Ha=1,Ja="";function Qa(e,t){Fa[$a++]=Ba,Fa[$a++]=Va,Va=e,Ba=t}function Ya(e,t,n){Wa[Ka++]=Ha,Wa[Ka++]=Ja,Wa[Ka++]=qa,qa=e;var r=Ha;e=Ja;var a=32-st(r)-1;r&=~(1<<a),n+=1;var o=32-st(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Ha=1<<32-st(t)+a|n<<a|r,Ja=o+e}else Ha=1<<o|n<<a|r,Ja=e}function Ga(e){null!==e.return&&(Qa(e,1),Ya(e,1,0))}function Xa(e){for(;e===Va;)Va=Fa[--$a],Fa[$a]=null,Ba=Fa[--$a],Fa[$a]=null;for(;e===qa;)qa=Wa[--Ka],Wa[Ka]=null,Ja=Wa[--Ka],Wa[Ka]=null,Ha=Wa[--Ka],Wa[Ka]=null}var eo=null,to=null,no=!1,ro=null;function ao(e,t){var n=Iu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,eo=e,to=sa(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,eo=e,to=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qa?{id:Ha,overflow:Ja}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Iu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,eo=e,to=null,!0);default:return!1}}function io(e){return!(!(1&e.mode)||128&e.flags)}function so(e){if(no){var t=to;if(t){var r=t;if(!oo(e,t)){if(io(e))throw Error(n(418));t=sa(r.nextSibling);var a=eo;t&&oo(e,t)?ao(a,r):(e.flags=-4097&e.flags|2,no=!1,eo=e)}}else{if(io(e))throw Error(n(418));e.flags=-4097&e.flags|2,no=!1,eo=e}}}function lo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;eo=e}function uo(e){if(e!==eo)return!1;if(!no)return lo(e),no=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ea(e.type,e.memoizedProps)),t&&(t=to)){if(io(e))throw co(),Error(n(418));for(;t;)ao(e,t),t=sa(t.nextSibling)}if(lo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){to=sa(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}to=null}}else to=eo?sa(e.stateNode.nextSibling):null;return!0}function co(){for(var e=to;e;)e=sa(e.nextSibling)}function fo(){to=eo=null,no=!1}function po(e){null===ro?ro=[e]:ro.push(e)}var ho=_.ReactCurrentBatchConfig;function mo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var a=r.stateNode}if(!a)throw Error(n(147,e));var o=a,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function go(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yo(e){return(0,e._init)(e._payload)}function vo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function a(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=ju(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Zu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===O&&yo(a)===t.type)?((r=o(t,n.props)).ref=mo(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=mo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Au(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Ou(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Zu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=mo(e,null,t),n.return=e,n;case x:return(t=Au(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||A(t))return(t=Ou(t,e.mode,n,null)).return=e,t;go(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===a?u(e,t,n,r):null;case x:return n.key===a?c(e,t,n,r):null;case O:return p(e,t,(a=n._init)(n._payload),r)}if(ne(n)||A(n))return null!==a?null:d(e,t,n,r,null);go(e,n)}return null}function h(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case O:return h(e,t,n,(0,r._init)(r._payload),a)}if(ne(r)||A(r))return d(t,e=e.get(n)||null,r,a,null);go(t,r)}return null}function m(n,o,s,l){for(var u=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(n,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(n,d),o=i(y,o,m),null===c?u=y:c.sibling=y,c=y,d=g}if(m===s.length)return r(n,d),no&&Qa(n,m),u;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(o=i(d,o,m),null===c?u=d:c.sibling=d,c=d);return no&&Qa(n,m),u}for(d=a(n,d);m<s.length;m++)null!==(g=h(d,n,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=i(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(n,e)})),no&&Qa(n,m),u}function g(o,s,l,u){var c=A(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(151));for(var d=c=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(o,m,v.value,u);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),s=i(b,s,g),null===d?c=b:d.sibling=b,d=b,m=y}if(v.done)return r(o,m),no&&Qa(o,g),c;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,u))&&(s=i(v,s,g),null===d?c=v:d.sibling=v,d=v);return no&&Qa(o,g),c}for(m=a(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=i(v,s,g),null===d?c=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(o,e)})),no&&Qa(o,g),c}return function e(n,a,i,l){if("object"==typeof i&&null!==i&&i.type===S&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case w:e:{for(var u=i.key,c=a;null!==c;){if(c.key===u){if((u=i.type)===S){if(7===c.tag){r(n,c.sibling),(a=o(c,i.props.children)).return=n,n=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===O&&yo(u)===c.type){r(n,c.sibling),(a=o(c,i.props)).ref=mo(n,c,i),a.return=n,n=a;break e}r(n,c);break}t(n,c),c=c.sibling}i.type===S?((a=Ou(i.props.children,n.mode,l,i.key)).return=n,n=a):((l=Nu(i.type,i.key,i.props,null,n.mode,l)).ref=mo(n,a,i),l.return=n,n=l)}return s(n);case x:e:{for(c=i.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){r(n,a.sibling),(a=o(a,i.children||[])).return=n,n=a;break e}r(n,a);break}t(n,a),a=a.sibling}(a=Au(i,n.mode,l)).return=n,n=a}return s(n);case O:return e(n,a,(c=i._init)(i._payload),l)}if(ne(i))return m(n,a,i,l);if(A(i))return g(n,a,i,l);go(n,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(r(n,a.sibling),(a=o(a,i)).return=n,n=a):(r(n,a),(a=Zu(i,n.mode,l)).return=n,n=a),s(n)):r(n,a)}}var bo=vo(!0),_o=vo(!1),wo=ka(null),ko=null,xo=null,So=null;function Co(){So=xo=ko=null}function Eo(e){var t=wo.current;xa(wo),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zo(e,t){ko=e,So=xo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(ys=!0),e.firstContext=null)}function Io(e){var t=e._currentValue;if(So!==e)if(e={context:e,memoizedValue:t,next:null},null===xo){if(null===ko)throw Error(n(308));xo=e,ko.dependencies={lanes:0,firstContext:e}}else xo=xo.next=e;return t}var Po=null;function jo(e){null===Po?Po=[e]:Po.push(e)}function No(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,jo(t)):(n.next=a.next,a.next=n),t.interleaved=n,Oo(e,r)}function Oo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ro=!1;function Zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Do(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&El){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Oo(e,n)}return null===(a=r.interleaved)?(t.next=t,jo(r)):(t.next=a.next,a.next=t),r.interleaved=t,Oo(e,n)}function Mo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var a=e.updateQueue;Ro=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?o=u:i.next=u,i=l;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l)}if(null!==o){var d=a.baseState;for(i=0,c=u=l=null,s=o;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=D({},d,f);break e;case 2:Ro=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=a.shared.pending))break;s=(f=s).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(l=d),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);Rl|=i,e.lanes=i,e.memoizedState=d}}function $o(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var a=e[t],o=a.callback;if(null!==o){if(a.callback=null,a=r,"function"!=typeof o)throw Error(n(191,o));o.call(a)}}}var Vo={},Bo=ka(Vo),Wo=ka(Vo),Ko=ka(Vo);function qo(e){if(e===Vo)throw Error(n(174));return e}function Ho(e,t){switch(Sa(Ko,t),Sa(Wo,e),Sa(Bo,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}xa(Bo),Sa(Bo,t)}function Jo(){xa(Bo),xa(Wo),xa(Ko)}function Qo(e){qo(Ko.current);var t=qo(Bo.current),n=ue(t,e.type);t!==n&&(Sa(Wo,e),Sa(Bo,n))}function Yo(e){Wo.current===e&&(xa(Bo),xa(Wo))}var Go=ka(0);function Xo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ei=[];function ti(){for(var e=0;e<ei.length;e++)ei[e]._workInProgressVersionPrimary=null;ei.length=0}var ni=_.ReactCurrentDispatcher,ri=_.ReactCurrentBatchConfig,ai=0,oi=null,ii=null,si=null,li=!1,ui=!1,ci=0,di=0;function fi(){throw Error(n(321))}function pi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function hi(e,t,r,a,o,i){if(ai=i,oi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ni.current=null===e||null===e.memoizedState?Yi:Gi,e=r(a,o),ui){i=0;do{if(ui=!1,ci=0,25<=i)throw Error(n(301));i+=1,si=ii=null,t.updateQueue=null,ni.current=Xi,e=r(a,o)}while(ui)}if(ni.current=Qi,t=null!==ii&&null!==ii.next,ai=0,si=ii=oi=null,li=!1,t)throw Error(n(300));return e}function mi(){var e=0!==ci;return ci=0,e}function gi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===si?oi.memoizedState=si=e:si=si.next=e,si}function yi(){if(null===ii){var e=oi.alternate;e=null!==e?e.memoizedState:null}else e=ii.next;var t=null===si?oi.memoizedState:si.next;if(null!==t)si=t,ii=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ii=e).memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},null===si?oi.memoizedState=si=e:si=si.next=e}return si}function vi(e,t){return"function"==typeof t?t(e):t}function bi(e){var t=yi(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var a=ii,o=a.baseQueue,i=r.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}a.baseQueue=o=i,r.pending=null}if(null!==o){i=o.next,a=a.baseState;var l=s=null,u=null,c=i;do{var d=c.lane;if((ai&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),a=c.hasEagerState?c.eagerState:e(a,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=a):u=u.next=f,oi.lanes|=d,Rl|=d}c=c.next}while(null!==c&&c!==i);null===u?s=a:u.next=l,or(a,t.memoizedState)||(ys=!0),t.memoizedState=a,t.baseState=s,t.baseQueue=u,r.lastRenderedState=a}if(null!==(e=r.interleaved)){o=e;do{i=o.lane,oi.lanes|=i,Rl|=i,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function _i(e){var t=yi(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var a=r.dispatch,o=r.pending,i=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);or(i,t.memoizedState)||(ys=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),r.lastRenderedState=i}return[i,a]}function wi(){}function ki(e,t){var r=oi,a=yi(),o=t(),i=!or(a.memoizedState,o);if(i&&(a.memoizedState=o,ys=!0),a=a.queue,Ri(Ci.bind(null,r,a,e),[e]),a.getSnapshot!==t||i||null!==si&&1&si.memoizedState.tag){if(r.flags|=2048,Ii(9,Si.bind(null,r,a,o,t),void 0,null),null===Tl)throw Error(n(349));30&ai||xi(r,t,o)}return o}function xi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oi.updateQueue)?(t={lastEffect:null,stores:null},oi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Si(e,t,n,r){t.value=n,t.getSnapshot=r,Ei(t)&&Ti(e)}function Ci(e,t,n){return n((function(){Ei(t)&&Ti(e)}))}function Ei(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Ti(e){var t=Oo(e,1);null!==t&&eu(t,e,1,-1)}function zi(e){var t=gi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Ki.bind(null,oi,e),[t.memoizedState,e]}function Ii(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=oi.updateQueue)?(t={lastEffect:null,stores:null},oi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Pi(){return yi().memoizedState}function ji(e,t,n,r){var a=gi();oi.flags|=e,a.memoizedState=Ii(1|t,n,void 0,void 0===r?null:r)}function Ni(e,t,n,r){var a=yi();r=void 0===r?null:r;var o=void 0;if(null!==ii){var i=ii.memoizedState;if(o=i.destroy,null!==r&&pi(r,i.deps))return void(a.memoizedState=Ii(t,n,o,r))}oi.flags|=e,a.memoizedState=Ii(1|t,n,o,r)}function Oi(e,t){return ji(8390656,8,e,t)}function Ri(e,t){return Ni(2048,8,e,t)}function Zi(e,t){return Ni(4,2,e,t)}function Ai(e,t){return Ni(4,4,e,t)}function Li(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Di(e,t,n){return n=null!=n?n.concat([e]):null,Ni(4,4,Li.bind(null,t,e),n)}function Mi(){}function Ui(e,t){var n=yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fi(e,t){var n=yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $i(e,t,n){return 21&ai?(or(n,t)||(n=gt(),oi.lanes|=n,Rl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ys=!0),e.memoizedState=n)}function Vi(e,t){var n=_t;_t=0!==n&&4>n?n:4,e(!0);var r=ri.transition;ri.transition={};try{e(!1),t()}finally{_t=n,ri.transition=r}}function Bi(){return yi().memoizedState}function Wi(e,t,n){var r=Xl(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qi(e)?Hi(t,n):null!==(n=No(e,t,n,r))&&(eu(n,e,r,Gl()),Ji(n,t,r))}function Ki(e,t,n){var r=Xl(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qi(e))Hi(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,or(s,i)){var l=t.interleaved;return null===l?(a.next=a,jo(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(e){}null!==(n=No(e,t,a,r))&&(eu(n,e,r,a=Gl()),Ji(n,t,r))}}function qi(e){var t=e.alternate;return e===oi||null!==t&&t===oi}function Hi(e,t){ui=li=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ji(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Qi={readContext:Io,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useInsertionEffect:fi,useLayoutEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useMutableSource:fi,useSyncExternalStore:fi,useId:fi,unstable_isNewReconciler:!1},Yi={readContext:Io,useCallback:function(e,t){return gi().memoizedState=[e,void 0===t?null:t],e},useContext:Io,useEffect:Oi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ji(4194308,4,Li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ji(4194308,4,e,t)},useInsertionEffect:function(e,t){return ji(4,2,e,t)},useMemo:function(e,t){var n=gi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();return t=void 0!==n?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=Wi.bind(null,oi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},gi().memoizedState=e},useState:zi,useDebugValue:Mi,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=zi(!1),t=e[0];return e=Vi.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var a=oi,o=gi();if(no){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tl)throw Error(n(349));30&ai||xi(a,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,Oi(Ci.bind(null,a,i,e),[e]),a.flags|=2048,Ii(9,Si.bind(null,a,i,r,t),void 0,null),r},useId:function(){var e=gi(),t=Tl.identifierPrefix;if(no){var n=Ja;t=":"+t+"R"+(n=(Ha&~(1<<32-st(Ha)-1)).toString(32)+n),0<(n=ci++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=di++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gi={readContext:Io,useCallback:Ui,useContext:Io,useEffect:Ri,useImperativeHandle:Di,useInsertionEffect:Zi,useLayoutEffect:Ai,useMemo:Fi,useReducer:bi,useRef:Pi,useState:function(){return bi(vi)},useDebugValue:Mi,useDeferredValue:function(e){return $i(yi(),ii.memoizedState,e)},useTransition:function(){return[bi(vi)[0],yi().memoizedState]},useMutableSource:wi,useSyncExternalStore:ki,useId:Bi,unstable_isNewReconciler:!1},Xi={readContext:Io,useCallback:Ui,useContext:Io,useEffect:Ri,useImperativeHandle:Di,useInsertionEffect:Zi,useLayoutEffect:Ai,useMemo:Fi,useReducer:_i,useRef:Pi,useState:function(){return _i(vi)},useDebugValue:Mi,useDeferredValue:function(e){var t=yi();return null===ii?t.memoizedState=e:$i(t,ii.memoizedState,e)},useTransition:function(){return[_i(vi)[0],yi().memoizedState]},useMutableSource:wi,useSyncExternalStore:ki,useId:Bi,unstable_isNewReconciler:!1};function es(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ts(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ns={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gl(),a=Xl(e),o=Lo(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,a))&&(eu(t,e,a,r),Mo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gl(),a=Xl(e),o=Lo(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,a))&&(eu(t,e,a,r),Mo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gl(),r=Xl(e),a=Lo(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Do(e,a,r))&&(eu(t,e,r,n),Mo(t,e,r))}};function rs(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!(t.prototype&&t.prototype.isPureReactComponent&&ir(n,r)&&ir(a,o))}function as(e,t,n){var r=!1,a=Ca,o=t.contextType;return"object"==typeof o&&null!==o?o=Io(o):(a=Pa(t)?za:Ea.current,o=(r=null!=(r=t.contextTypes))?Ia(e,a):Ca),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ns,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function os(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ns.enqueueReplaceState(t,t.state,null)}function is(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Zo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=Io(o):(o=Pa(t)?za:Ea.current,a.context=Ia(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(ts(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&ns.enqueueReplaceState(a,a.state,null),Fo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function ss(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,digest:null}}function ls(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var cs="function"==typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$l||($l=!0,Vl=r),us(0,t)},n}function fs(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){us(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){us(0,t),"function"!=typeof r&&(null===Bl?Bl=new Set([this]):Bl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ps(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new cs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=xu.bind(null,e,t,n),t.then(e,e))}function hs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,r,a){return 1&e.mode?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Do(n,t,1))),n.lanes|=1),e)}var gs=_.ReactCurrentOwner,ys=!1;function vs(e,t,n,r){t.child=null===e?_o(t,null,n,r):bo(t,e.child,n,r)}function bs(e,t,n,r,a){n=n.render;var o=t.ref;return zo(t,a),r=hi(e,t,n,r,o,a),n=mi(),null===e||ys?(no&&n&&Ga(t),t.flags|=1,vs(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$s(e,t,a))}function _s(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||Pu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ws(e,t,o,r,a))}if(o=e.child,!(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:ir)(i,r)&&e.ref===t.ref)return $s(e,t,a)}return t.flags|=1,(e=ju(o,r)).ref=t.ref,e.return=t,t.child=e}function ws(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(ir(o,r)&&e.ref===t.ref){if(ys=!1,t.pendingProps=r=o,!(e.lanes&a))return t.lanes=e.lanes,$s(e,t,a);131072&e.flags&&(ys=!0)}}return Ss(e,t,n,r,a)}function ks(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Sa(jl,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Sa(jl,Pl),Pl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Sa(jl,Pl),Pl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Sa(jl,Pl),Pl|=r;return vs(e,t,a,n),t.child}function xs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,a){var o=Pa(n)?za:Ea.current;return o=Ia(t,o),zo(t,a),n=hi(e,t,n,r,o,a),r=mi(),null===e||ys?(no&&r&&Ga(t),t.flags|=1,vs(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$s(e,t,a))}function Cs(e,t,n,r,a){if(Pa(n)){var o=!0;Ra(t)}else o=!1;if(zo(t,a),null===t.stateNode)Fs(e,t),as(t,n,r),is(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;u="object"==typeof u&&null!==u?Io(u):Ia(t,u=Pa(n)?za:Ea.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&os(t,i,r,u),Ro=!1;var f=t.memoizedState;i.state=f,Fo(t,r,i,a),l=t.memoizedState,s!==r||f!==l||Ta.current||Ro?("function"==typeof c&&(ts(t,n,c,r),l=t.memoizedState),(s=Ro||rs(t,n,s,r,f,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ao(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:es(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l="object"==typeof(l=n.contextType)&&null!==l?Io(l):Ia(t,l=Pa(n)?za:Ea.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&os(t,i,r,l),Ro=!1,f=t.memoizedState,i.state=f,Fo(t,r,i,a);var h=t.memoizedState;s!==d||f!==h||Ta.current||Ro?("function"==typeof p&&(ts(t,n,p,r),h=t.memoizedState),(u=Ro||rs(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Es(e,t,n,r,o,a)}function Es(e,t,n,r,a,o){xs(e,t);var i=!!(128&t.flags);if(!r&&!i)return a&&Za(t,n,!1),$s(e,t,o);r=t.stateNode,gs.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=bo(t,e.child,null,o),t.child=bo(t,null,s,o)):vs(e,t,s,o),t.memoizedState=r.state,a&&Za(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Na(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Na(0,t.context,!1),Ho(e,t.containerInfo)}function zs(e,t,n,r,a){return fo(),po(a),t.flags|=256,vs(e,t,n,r),t.child}var Is,Ps,js,Ns,Os={dehydrated:null,treeContext:null,retryLane:0};function Rs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zs(e,t,r){var a,o=t.pendingProps,i=Go.current,s=!1,l=!!(128&t.flags);if((a=l)||(a=(null===e||null!==e.memoizedState)&&!!(2&i)),a?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Sa(Go,1&i),null===e)return so(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Ru(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Ou(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Rs(r),t.memoizedState=Os,e):As(t,l));if(null!==(i=e.memoizedState)&&null!==(a=i.dehydrated))return function(e,t,r,a,o,i,s){if(r)return 256&t.flags?(t.flags&=-257,Ls(e,t,s,a=ls(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=a.fallback,o=t.mode,a=Ru({mode:"visible",children:a.children},o,0,null),(i=Ou(i,o,s,null)).flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,1&t.mode&&bo(t,e.child,null,s),t.child.memoizedState=Rs(s),t.memoizedState=Os,i);if(!(1&t.mode))return Ls(e,t,s,null);if("$!"===o.data){if(a=o.nextSibling&&o.nextSibling.dataset)var l=a.dgst;return a=l,Ls(e,t,s,a=ls(i=Error(n(419)),a,void 0))}if(l=!!(s&e.childLanes),ys||l){if(null!==(a=Tl)){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(a.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Oo(e,o),eu(a,e,o,-1))}return pu(),Ls(e,t,s,a=ls(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,to=sa(o.nextSibling),eo=t,no=!0,ro=null,null!==e&&(Wa[Ka++]=Ha,Wa[Ka++]=Ja,Wa[Ka++]=qa,Ha=e.id,Ja=e.overflow,qa=t),(t=As(t,a.children)).flags|=4096,t)}(e,t,l,o,a,i,r);if(s){s=o.fallback,l=t.mode,a=(i=e.child).sibling;var u={mode:"hidden",children:o.children};return 1&l||t.child===i?(o=ju(i,u)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null),null!==a?s=ju(a,s):(s=Ou(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Rs(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Os,o}return e=(s=e.child).sibling,o=ju(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function As(e,t){return(t=Ru({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ls(e,t,n,r){return null!==r&&po(r),bo(t,e.child,null,n),(e=As(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ds(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function Ms(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Us(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(vs(e,t,r.children,n),2&(r=Go.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ds(e,n,t);else if(19===e.tag)Ds(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Sa(Go,r),1&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Xo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ms(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Xo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ms(t,!0,n,null,o);break;case"together":Ms(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Fs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $s(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Rl|=t.lanes,!(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=ju(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=ju(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Vs(e,t){if(!no)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ws(e,t,r){var o=t.pendingProps;switch(Xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bs(t),null;case 1:case 17:return Pa(t.type)&&ja(),Bs(t),null;case 3:return o=t.stateNode,Jo(),xa(Ta),xa(Ea),ti(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(uo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ro&&(au(ro),ro=null))),Ps(e,t),Bs(t),null;case 5:Yo(t);var i=qo(Ko.current);if(r=t.type,null!==e&&null!=t.stateNode)js(e,t,r,o,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Bs(t),null}if(e=qo(Bo.current),uo(t)){o=t.stateNode,r=t.type;var s=t.memoizedProps;switch(o[ca]=t,o[da]=s,e=!!(1&t.mode),r){case"dialog":Lr("cancel",o),Lr("close",o);break;case"iframe":case"object":case"embed":Lr("load",o);break;case"video":case"audio":for(i=0;i<Or.length;i++)Lr(Or[i],o);break;case"source":Lr("error",o);break;case"img":case"image":case"link":Lr("error",o),Lr("load",o);break;case"details":Lr("toggle",o);break;case"input":Y(o,s),Lr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",o);break;case"textarea":oe(o,s),Lr("invalid",o)}for(var l in be(r,s),i=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?o.textContent!==u&&(!0!==s.suppressHydrationWarning&&Qr(o.textContent,u,e),i=["children",u]):"number"==typeof u&&o.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Qr(o.textContent,u,e),i=["children",""+u]):a.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Lr("scroll",o)}switch(r){case"input":q(o),ee(o,s,!0);break;case"textarea":q(o),se(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=Yr)}o=i,t.updateQueue=o,null!==o&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(r,{is:o.is}):(e=l.createElement(r),"select"===r&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,r),e[ca]=t,e[da]=o,Is(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(r,o),r){case"dialog":Lr("cancel",e),Lr("close",e),i=o;break;case"iframe":case"object":case"embed":Lr("load",e),i=o;break;case"video":case"audio":for(i=0;i<Or.length;i++)Lr(Or[i],e);i=o;break;case"source":Lr("error",e),i=o;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),i=o;break;case"details":Lr("toggle",e),i=o;break;case"input":Y(e,o),i=Q(e,o),Lr("invalid",e);break;case"option":default:i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=D({},o,{value:void 0}),Lr("invalid",e);break;case"textarea":oe(e,o),i=ae(e,o),Lr("invalid",e)}for(s in be(r,i),u=i)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ye(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===s?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Lr("scroll",e):null!=c&&v(e,s,c,l))}switch(r){case"input":q(e),ee(e,o,!1);break;case"textarea":q(e),se(e);break;case"option":null!=o.value&&e.setAttribute("value",""+W(o.value));break;case"select":e.multiple=!!o.multiple,null!=(s=o.value)?re(e,!!o.multiple,s,!1):null!=o.defaultValue&&re(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Yr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Bs(t),null;case 6:if(e&&null!=t.stateNode)Ns(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=qo(Ko.current),qo(Bo.current),uo(t)){if(o=t.stateNode,r=t.memoizedProps,o[ca]=t,(s=o.nodeValue!==r)&&null!==(e=eo))switch(e.tag){case 3:Qr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(o.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[ca]=t,t.stateNode=o}return Bs(t),null;case 13:if(xa(Go),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(no&&null!==to&&1&t.mode&&!(128&t.flags))co(),fo(),t.flags|=98560,s=!1;else if(s=uo(t),null!==o&&null!==o.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[ca]=t}else fo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Bs(t),s=!1}else null!==ro&&(au(ro),ro=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Go.current?0===Nl&&(Nl=3):pu())),null!==t.updateQueue&&(t.flags|=4),Bs(t),null);case 4:return Jo(),Ps(e,t),null===e&&Ur(t.stateNode.containerInfo),Bs(t),null;case 10:return Eo(t.type._context),Bs(t),null;case 19:if(xa(Go),null===(s=t.memoizedState))return Bs(t),null;if(o=!!(128&t.flags),null===(l=s.rendering))if(o)Vs(s,!1);else{if(0!==Nl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=Xo(e))){for(t.flags|=128,Vs(s,!1),null!==(o=l.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Sa(Go,1&Go.current|2),t.child}e=e.sibling}null!==s.tail&&Ge()>Ul&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Xo(l))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Vs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!no)return Bs(t),null}else 2*Ge()-s.renderingStartTime>Ul&&1073741824!==r&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ge(),t.sibling=null,r=Go.current,Sa(Go,o?1&r|2:1&r),t):(Bs(t),null);case 22:case 23:return uu(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Pl)&&(Bs(t),6&t.subtreeFlags&&(t.flags|=8192)):Bs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Ks(e,t){switch(Xa(t),t.tag){case 1:return Pa(t.type)&&ja(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),xa(Ta),xa(Ea),ti(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Yo(t),null;case 13:if(xa(Go),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return xa(Go),null;case 4:return Jo(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return uu(),null;default:return null}}Is=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},js=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,qo(Bo.current);var i,s=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),s=[];break;case"select":o=D({},o,{value:void 0}),r=D({},r,{value:void 0}),s=[];break;case"textarea":o=ae(e,o),r=ae(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Yr)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var l=o[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(i in l)!l.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&l[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Lr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Ns=function(e,t,n,r){n!==r&&(t.flags|=4)};var qs=!1,Hs=!1,Js="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Ys(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){ku(e,t,n)}else n.current=null}function Gs(e,t,n){try{n()}catch(n){ku(e,t,n)}}var Xs=!1;function el(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&Gs(t,n,o)}a=a.next}while(a!==r)}}function tl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 nl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ca],delete t[da],delete t[pa],delete t[ha],delete t[ma]),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 al(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function il(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Yr));else if(4!==r&&null!==(e=e.child))for(il(e,t,n),e=e.sibling;null!==e;)il(e,t,n),e=e.sibling}function sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(sl(e,t,n),e=e.sibling;null!==e;)sl(e,t,n),e=e.sibling}var ll=null,ul=!1;function cl(e,t,n){for(n=n.child;null!==n;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Hs||Ys(n,t);case 6:var r=ll,a=ul;ll=null,cl(e,t,n),ul=a,null!==(ll=r)&&(ul?(e=ll,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ll.removeChild(n.stateNode));break;case 18:null!==ll&&(ul?(e=ll,n=n.stateNode,8===e.nodeType?ia(e.parentNode,n):1===e.nodeType&&ia(e,n),Vt(e)):ia(ll,n.stateNode));break;case 4:r=ll,a=ul,ll=n.stateNode.containerInfo,ul=!0,cl(e,t,n),ll=r,ul=a;break;case 0:case 11:case 14:case 15:if(!Hs&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(2&o||4&o)&&Gs(n,t,i),a=a.next}while(a!==r)}cl(e,t,n);break;case 1:if(!Hs&&(Ys(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ku(n,t,e)}cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:1&n.mode?(Hs=(r=Hs)||null!==n.memoizedState,cl(e,t,n),Hs=r):cl(e,t,n);break;default:cl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach((function(t){var r=Eu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function pl(e,t){var r=t.deletions;if(null!==r)for(var a=0;a<r.length;a++){var o=r[a];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ll=l.stateNode,ul=!1;break e;case 3:case 4:ll=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===ll)throw Error(n(160));dl(i,s,o),ll=null,ul=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){ku(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)hl(t,e),t=t.sibling}function hl(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pl(t,e),ml(e),4&a){try{el(3,e,e.return),tl(3,e)}catch(t){ku(e,e.return,t)}try{el(5,e,e.return)}catch(t){ku(e,e.return,t)}}break;case 1:pl(t,e),ml(e),512&a&&null!==r&&Ys(r,r.return);break;case 5:if(pl(t,e),ml(e),512&a&&null!==r&&Ys(r,r.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(t){ku(e,e.return,t)}}if(4&a&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==r?r.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===i.type&&null!=i.name&&G(o,i),_e(l,s);var c=_e(l,i);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ye(o,f):"dangerouslySetInnerHTML"===d?fe(o,f):"children"===d?pe(o,f):v(o,d,f,c)}switch(l){case"input":X(o,i);break;case"textarea":ie(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?re(o,!!i.multiple,h,!1):p!==!!i.multiple&&(null!=i.defaultValue?re(o,!!i.multiple,i.defaultValue,!0):re(o,!!i.multiple,i.multiple?[]:"",!1))}o[da]=i}catch(t){ku(e,e.return,t)}}break;case 6:if(pl(t,e),ml(e),4&a){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(t){ku(e,e.return,t)}}break;case 3:if(pl(t,e),ml(e),4&a&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(t){ku(e,e.return,t)}break;case 4:default:pl(t,e),ml(e);break;case 13:pl(t,e),ml(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ml=Ge())),4&a&&fl(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Hs=(c=Hs)||d,pl(t,e),Hs=c):pl(t,e),ml(e),8192&a){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(Qs=e,d=e.child;null!==d;){for(f=Qs=d;null!==Qs;){switch(h=(p=Qs).child,p.tag){case 0:case 11:case 14:case 15:el(4,p,p.return);break;case 1:Ys(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){a=p,r=p.return;try{t=a,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){ku(a,r,e)}}break;case 5:Ys(p,p.return);break;case 22:if(null!==p.memoizedState){bl(f);continue}}null!==h?(h.return=p,Qs=h):bl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ge("display",s))}catch(t){ku(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(t){ku(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:pl(t,e),ml(e),4&a&&fl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(al(r)){var a=r;break e}r=r.return}throw Error(n(160))}switch(a.tag){case 5:var o=a.stateNode;32&a.flags&&(pe(o,""),a.flags&=-33),sl(e,ol(e),o);break;case 3:case 4:var i=a.stateNode.containerInfo;il(e,ol(e),i);break;default:throw Error(n(161))}}catch(t){ku(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gl(e,t,n){Qs=e,yl(e)}function yl(e,t,n){for(var r=!!(1&e.mode);null!==Qs;){var a=Qs,o=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||qs;if(!i){var s=a.alternate,l=null!==s&&null!==s.memoizedState||Hs;s=qs;var u=Hs;if(qs=i,(Hs=l)&&!u)for(Qs=a;null!==Qs;)l=(i=Qs).child,22===i.tag&&null!==i.memoizedState?_l(a):null!==l?(l.return=i,Qs=l):_l(a);for(;null!==o;)Qs=o,yl(o),o=o.sibling;Qs=a,qs=s,Hs=u}vl(e)}else 8772&a.subtreeFlags&&null!==o?(o.return=a,Qs=o):vl(e)}}function vl(e){for(;null!==Qs;){var t=Qs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Hs||tl(5,t);break;case 1:var a=t.stateNode;if(4&t.flags&&!Hs)if(null===r)a.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:es(t.type,r.memoizedProps);a.componentDidUpdate(o,r.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&$o(t,i,a);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}$o(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Vt(f)}}}break;default:throw Error(n(163))}Hs||512&t.flags&&nl(t)}catch(e){ku(t,t.return,e)}}if(t===e){Qs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Qs=r;break}Qs=t.return}}function bl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function _l(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{tl(4,t)}catch(e){ku(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(e){ku(t,a,e)}}var o=t.return;try{nl(t)}catch(e){ku(t,o,e)}break;case 5:var i=t.return;try{nl(t)}catch(e){ku(t,i,e)}}}catch(e){ku(t,t.return,e)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var wl,kl=Math.ceil,xl=_.ReactCurrentDispatcher,Sl=_.ReactCurrentOwner,Cl=_.ReactCurrentBatchConfig,El=0,Tl=null,zl=null,Il=0,Pl=0,jl=ka(0),Nl=0,Ol=null,Rl=0,Zl=0,Al=0,Ll=null,Dl=null,Ml=0,Ul=1/0,Fl=null,$l=!1,Vl=null,Bl=null,Wl=!1,Kl=null,ql=0,Hl=0,Jl=null,Ql=-1,Yl=0;function Gl(){return 6&El?Ge():-1!==Ql?Ql:Ql=Ge()}function Xl(e){return 1&e.mode?2&El&&0!==Il?Il&-Il:null!==ho.transition?(0===Yl&&(Yl=gt()),Yl):0!==(e=_t)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function eu(e,t,r,a){if(50<Hl)throw Hl=0,Jl=null,Error(n(185));vt(e,r,a),2&El&&e===Tl||(e===Tl&&(!(2&El)&&(Zl|=r),4===Nl&&ou(e,Il)),tu(e,a),1===r&&0===El&&!(1&t.mode)&&(Ul=Ge()+500,La&&Ua()))}function tu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-st(o),s=1<<i,l=a[i];-1===l?s&n&&!(s&r)||(a[i]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=pt(e,e===Tl?Il:0);if(0===r)null!==n&&Je(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Je(n),1===t)0===e.tag?function(e){La=!0,Ma(e)}(iu.bind(null,e)):Ma(iu.bind(null,e)),aa((function(){!(6&El)&&Ua()})),n=null;else{switch(wt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=at}n=Tu(n,nu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nu(e,t){if(Ql=-1,Yl=0,6&El)throw Error(n(327));var r=e.callbackNode;if(_u()&&e.callbackNode!==r)return null;var a=pt(e,e===Tl?Il:0);if(0===a)return null;if(30&a||a&e.expiredLanes||t)t=hu(e,a);else{t=a;var o=El;El|=2;var i=fu();for(Tl===e&&Il===t||(Fl=null,Ul=Ge()+500,cu(e,t));;)try{gu();break}catch(t){du(e,t)}Co(),xl.current=i,El=o,null!==zl?t=0:(Tl=null,Il=0,t=Nl)}if(0!==t){if(2===t&&0!==(o=mt(e))&&(a=o,t=ru(e,o)),1===t)throw r=Ol,cu(e,0),ou(e,a),tu(e,Ge()),r;if(6===t)ou(e,a);else{if(o=e.current.alternate,!(30&a||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!or(o(),a))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=hu(e,a),2===t&&(i=mt(e),0!==i&&(a=i,t=ru(e,i))),1!==t)))throw r=Ol,cu(e,0),ou(e,a),tu(e,Ge()),r;switch(e.finishedWork=o,e.finishedLanes=a,t){case 0:case 1:throw Error(n(345));case 2:case 5:bu(e,Dl,Fl);break;case 3:if(ou(e,a),(130023424&a)===a&&10<(t=Ml+500-Ge())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&a)!==a){Gl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ta(bu.bind(null,e,Dl,Fl),t);break}bu(e,Dl,Fl);break;case 4:if(ou(e,a),(4194240&a)===a)break;for(t=e.eventTimes,o=-1;0<a;){var s=31-st(a);i=1<<s,(s=t[s])>o&&(o=s),a&=~i}if(a=o,10<(a=(120>(a=Ge()-a)?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*kl(a/1960))-a)){e.timeoutHandle=ta(bu.bind(null,e,Dl,Fl),a);break}bu(e,Dl,Fl);break;default:throw Error(n(329))}}}return tu(e,Ge()),e.callbackNode===r?nu.bind(null,e):null}function ru(e,t){var n=Ll;return e.current.memoizedState.isDehydrated&&(cu(e,t).flags|=256),2!==(e=hu(e,t))&&(t=Dl,Dl=n,null!==t&&au(t)),e}function au(e){null===Dl?Dl=e:Dl.push.apply(Dl,e)}function ou(e,t){for(t&=~Al,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function iu(e){if(6&El)throw Error(n(327));_u();var t=pt(e,0);if(!(1&t))return tu(e,Ge()),null;var r=hu(e,t);if(0!==e.tag&&2===r){var a=mt(e);0!==a&&(t=a,r=ru(e,a))}if(1===r)throw r=Ol,cu(e,0),ou(e,t),tu(e,Ge()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bu(e,Dl,Fl),tu(e,Ge()),null}function su(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Ul=Ge()+500,La&&Ua())}}function lu(e){null!==Kl&&0===Kl.tag&&!(6&El)&&_u();var t=El;El|=1;var n=Cl.transition,r=_t;try{if(Cl.transition=null,_t=1,e)return e()}finally{_t=r,Cl.transition=n,!(6&(El=t))&&Ua()}}function uu(){Pl=jl.current,xa(jl)}function cu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,na(n)),null!==zl)for(n=zl.return;null!==n;){var r=n;switch(Xa(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&ja();break;case 3:Jo(),xa(Ta),xa(Ea),ti();break;case 5:Yo(r);break;case 4:Jo();break;case 13:case 19:xa(Go);break;case 10:Eo(r.type._context);break;case 22:case 23:uu()}n=n.return}if(Tl=e,zl=e=ju(e.current,null),Il=Pl=t,Nl=0,Ol=null,Al=Zl=Rl=0,Dl=Ll=null,null!==Po){for(t=0;t<Po.length;t++)if(null!==(r=(n=Po[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var i=o.next;o.next=a,r.next=i}n.pending=r}Po=null}return e}function du(e,t){for(;;){var r=zl;try{if(Co(),ni.current=Qi,li){for(var a=oi.memoizedState;null!==a;){var o=a.queue;null!==o&&(o.pending=null),a=a.next}li=!1}if(ai=0,si=ii=oi=null,ui=!1,ci=0,Sl.current=null,null===r||null===r.return){Nl=1,Ol=t,zl=null;break}e:{var i=e,s=r.return,l=r,u=t;if(t=Il,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=hs(s);if(null!==h){h.flags&=-257,ms(h,s,l,0,t),1&h.mode&&ps(i,c,t),u=c;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(!(1&t)){ps(i,c,t),pu();break e}u=Error(n(426))}else if(no&&1&l.mode){var y=hs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ms(y,s,l,0,t),po(ss(u,l));break e}}i=u=ss(u,l),4!==Nl&&(Nl=2),null===Ll?Ll=[i]:Ll.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Uo(i,ds(0,u,t));break e;case 1:l=u;var v=i.type,b=i.stateNode;if(!(128&i.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Bl&&Bl.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t,Uo(i,fs(i,l,t));break e}}i=i.return}while(null!==i)}vu(r)}catch(e){t=e,zl===r&&null!==r&&(zl=r=r.return);continue}break}}function fu(){var e=xl.current;return xl.current=Qi,null===e?Qi:e}function pu(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Tl||!(268435455&Rl)&&!(268435455&Zl)||ou(Tl,Il)}function hu(e,t){var r=El;El|=2;var a=fu();for(Tl===e&&Il===t||(Fl=null,cu(e,t));;)try{mu();break}catch(t){du(e,t)}if(Co(),El=r,xl.current=a,null!==zl)throw Error(n(261));return Tl=null,Il=0,Nl}function mu(){for(;null!==zl;)yu(zl)}function gu(){for(;null!==zl&&!Qe();)yu(zl)}function yu(e){var t=wl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?vu(e):zl=t,Sl.current=null}function vu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(zl=n);if(null===e)return Nl=6,void(zl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ws(n,t,Pl)))return void(zl=n);if(null!==(t=t.sibling))return void(zl=t);zl=t=e}while(null!==t);0===Nl&&(Nl=5)}function bu(e,t,r){var a=_t,o=Cl.transition;try{Cl.transition=null,_t=1,function(e,t,r,a){do{_u()}while(null!==Kl);if(6&El)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(function(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<n;){var a=31-st(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,i),e===Tl&&(zl=Tl=null,Il=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Wl||(Wl=!0,Tu(nt,(function(){return _u(),null}))),i=!!(15990&r.flags),15990&r.subtreeFlags||i){i=Cl.transition,Cl.transition=null;var s=_t;_t=1;var l=El;El|=4,Sl.current=null,function(e,t){if(Gr=Wt,dr(e=cr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(a&&0!==a.rangeCount){r=a.anchorNode;var o=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{r.nodeType,i.nodeType}catch(e){r=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||0!==o&&3!==f.nodeType||(l=s+o),f!==i||0!==a&&3!==f.nodeType||(u=s+a),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++c===o&&(l=s),p===i&&++d===a&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===u?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xr={focusedElem:e,selectionRange:r},Wt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:es(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(n(163))}}catch(e){ku(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}m=Xs,Xs=!1}(e,r),hl(r,e),fr(Xr),Wt=!!Gr,Xr=Gr=null,e.current=r,gl(r),Ye(),El=l,_t=s,Cl.transition=i}else e.current=r;if(Wl&&(Wl=!1,Kl=e,ql=o),0===(i=e.pendingLanes)&&(Bl=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),tu(e,Ge()),null!==t)for(a=e.onRecoverableError,r=0;r<t.length;r++)a((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if($l)throw $l=!1,e=Vl,Vl=null,e;!!(1&ql)&&0!==e.tag&&_u(),1&(i=e.pendingLanes)?e===Jl?Hl++:(Hl=0,Jl=e):Hl=0,Ua()}(e,t,r,a)}finally{Cl.transition=o,_t=a}return null}function _u(){if(null!==Kl){var e=wt(ql),t=Cl.transition,r=_t;try{if(Cl.transition=null,_t=16>e?16:e,null===Kl)var a=!1;else{if(e=Kl,Kl=null,ql=0,6&El)throw Error(n(331));var o=El;for(El|=4,Qs=e.current;null!==Qs;){var i=Qs,s=i.child;if(16&Qs.flags){var l=i.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Qs=c;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:el(8,d,i)}var f=d.child;if(null!==f)f.return=d,Qs=f;else for(;null!==Qs;){var p=(d=Qs).sibling,h=d.return;if(rl(d),d===c){Qs=null;break}if(null!==p){p.return=h,Qs=p;break}Qs=h}}}var m=i.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Qs=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,Qs=s;else e:for(;null!==Qs;){if(2048&(i=Qs).flags)switch(i.tag){case 0:case 11:case 15:el(9,i,i.return)}var v=i.sibling;if(null!==v){v.return=i.return,Qs=v;break e}Qs=i.return}}var b=e.current;for(Qs=b;null!==Qs;){var _=(s=Qs).child;if(2064&s.subtreeFlags&&null!==_)_.return=s,Qs=_;else e:for(s=b;null!==Qs;){if(2048&(l=Qs).flags)try{switch(l.tag){case 0:case 11:case 15:tl(9,l)}}catch(e){ku(l,l.return,e)}if(l===s){Qs=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qs=w;break e}Qs=l.return}}if(El=o,Ua(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}a=!0}return a}finally{_t=r,Cl.transition=t}}return!1}function wu(e,t,n){e=Do(e,t=ds(0,t=ss(n,t),1),1),t=Gl(),null!==e&&(vt(e,1,t),tu(e,t))}function ku(e,t,n){if(3===e.tag)wu(e,e,n);else for(;null!==t;){if(3===t.tag){wu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Bl||!Bl.has(r))){t=Do(t,e=fs(t,e=ss(n,e),1),1),e=Gl(),null!==t&&(vt(t,1,e),tu(t,e));break}}t=t.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Gl(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Il&n)===n&&(4===Nl||3===Nl&&(130023424&Il)===Il&&500>Ge()-Ml?cu(e,0):Al|=n),tu(e,t)}function Su(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=Gl();null!==(e=Oo(e,t))&&(vt(e,t,n),tu(e,n))}function Cu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Su(e,n)}function Eu(e,t){var r=0;switch(e.tag){case 13:var a=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(n(314))}null!==a&&a.delete(t),Su(e,r)}function Tu(e,t){return He(e,t)}function zu(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 Iu(e,t,n,r){return new zu(e,t,n,r)}function Pu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=Iu(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,r,a,o,i){var s=2;if(a=e,"function"==typeof e)Pu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Ou(r.children,o,i,t);case C:s=8,o|=8;break;case E:return(e=Iu(12,r,t,2|o)).elementType=E,e.lanes=i,e;case P:return(e=Iu(13,r,t,o)).elementType=P,e.lanes=i,e;case j:return(e=Iu(19,r,t,o)).elementType=j,e.lanes=i,e;case R:return Ru(r,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case z:s=9;break e;case I:s=11;break e;case N:s=14;break e;case O:s=16,a=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Iu(s,r,t,o)).elementType=e,t.type=a,t.lanes=i,t}function Ou(e,t,n,r){return(e=Iu(7,e,r,t)).lanes=n,e}function Ru(e,t,n,r){return(e=Iu(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Zu(e,t,n){return(e=Iu(6,e,null,t)).lanes=n,e}function Au(e,t,n){return(t=Iu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lu(e,t,n,r,a){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=yt(0),this.expirationTimes=yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Du(e,t,n,r,a,o,i,s,l){return e=new Lu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Iu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zo(o),e}function Mu(e){if(!e)return Ca;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Pa(r))return Oa(e,r,t)}return t}function Uu(e,t,n,r,a,o,i,s,l){return(e=Du(n,r,!0,e,0,o,0,s,l)).context=Mu(null),n=e.current,(o=Lo(r=Gl(),a=Xl(n))).callback=null!=t?t:null,Do(n,o,a),e.current.lanes=a,vt(e,a,r),tu(e,r),e}function Fu(e,t,n,r){var a=t.current,o=Gl(),i=Xl(a);return n=Mu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Do(a,t,i))&&(eu(e,a,i,o),Mo(e,a,i)),i}function $u(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Bu(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}wl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ta.current)ys=!0;else{if(!(e.lanes&r||128&t.flags))return ys=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),fo();break;case 5:Qo(t);break;case 1:Pa(t.type)&&Ra(t);break;case 4:Ho(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Sa(wo,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Sa(Go,1&Go.current),t.flags|=128,null):n&t.child.childLanes?Zs(e,t,n):(Sa(Go,1&Go.current),null!==(e=$s(e,t,n))?e.sibling:null);Sa(Go,1&Go.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Us(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),Sa(Go,Go.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return $s(e,t,n)}(e,t,r);ys=!!(131072&e.flags)}else ys=!1,no&&1048576&t.flags&&Ya(t,Ba,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;Fs(e,t),e=t.pendingProps;var o=Ia(t,Ea.current);zo(t,r),o=hi(null,t,a,e,o,r);var i=mi();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pa(a)?(i=!0,Ra(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Zo(t),o.updater=ns,t.stateNode=o,o._reactInternals=t,is(t,a,e,r),t=Es(null,t,a,!0,i,r)):(t.tag=0,no&&i&&Ga(t),vs(null,t,o,r),t=t.child),t;case 16:a=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Pu(e)?1:0;if(null!=e){if((e=e.$$typeof)===I)return 11;if(e===N)return 14}return 2}(a),e=es(a,e),o){case 0:t=Ss(null,t,a,e,r);break e;case 1:t=Cs(null,t,a,e,r);break e;case 11:t=bs(null,t,a,e,r);break e;case 14:t=_s(null,t,a,es(a.type,e),r);break e}throw Error(n(306,a,""))}return t;case 0:return a=t.type,o=t.pendingProps,Ss(e,t,a,o=t.elementType===a?o:es(a,o),r);case 1:return a=t.type,o=t.pendingProps,Cs(e,t,a,o=t.elementType===a?o:es(a,o),r);case 3:e:{if(Ts(t),null===e)throw Error(n(387));a=t.pendingProps,o=(i=t.memoizedState).element,Ao(e,t),Fo(t,a,null,r);var s=t.memoizedState;if(a=s.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=zs(e,t,a,r,o=ss(Error(n(423)),t));break e}if(a!==o){t=zs(e,t,a,r,o=ss(Error(n(424)),t));break e}for(to=sa(t.stateNode.containerInfo.firstChild),eo=t,no=!0,ro=null,r=_o(t,null,a,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(fo(),a===o){t=$s(e,t,r);break e}vs(e,t,a,r)}t=t.child}return t;case 5:return Qo(t),null===e&&so(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,ea(a,o)?s=null:null!==i&&ea(a,i)&&(t.flags|=32),xs(e,t),vs(e,t,s,r),t.child;case 6:return null===e&&so(t),null;case 13:return Zs(e,t,r);case 4:return Ho(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=bo(t,null,a,r):vs(e,t,a,r),t.child;case 11:return a=t.type,o=t.pendingProps,bs(e,t,a,o=t.elementType===a?o:es(a,o),r);case 7:return vs(e,t,t.pendingProps,r),t.child;case 8:case 12:return vs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(a=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Sa(wo,a._currentValue),a._currentValue=s,null!==i)if(or(i.value,s)){if(i.children===o.children&&!Ta.current){t=$s(e,t,r);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var u=l.firstContext;null!==u;){if(u.context===a){if(1===i.tag){(u=Lo(-1,r&-r)).tag=2;var c=i.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=r,null!==(u=i.alternate)&&(u.lanes|=r),To(i.return,r,t),l.lanes|=r;break}u=u.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),To(s,r,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}vs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,a=t.pendingProps.children,zo(t,r),a=a(o=Io(o)),t.flags|=1,vs(e,t,a,r),t.child;case 14:return o=es(a=t.type,t.pendingProps),_s(e,t,a,o=es(a.type,o),r);case 15:return ws(e,t,t.type,t.pendingProps,r);case 17:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:es(a,o),Fs(e,t),t.tag=1,Pa(a)?(e=!0,Ra(t)):e=!1,zo(t,r),as(t,a,o),is(t,a,o,r),Es(null,t,a,!0,e,r);case 19:return Us(e,t,r);case 22:return ks(e,t,r)}throw Error(n(156,t.tag))};var Wu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Hu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function Yu(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if("function"==typeof a){var s=a;a=function(){var e=$u(i);s.call(e)}}Fu(t,i,e,a)}else i=function(e,t,n,r,a){if(a){if("function"==typeof r){var o=r;r=function(){var e=$u(i);o.call(e)}}var i=Uu(t,r,e,0,null,!1,0,"",Qu);return e._reactRootContainer=i,e[fa]=i.current,Ur(8===e.nodeType?e.parentNode:e),lu(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var s=r;r=function(){var e=$u(l);s.call(e)}}var l=Du(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[fa]=l.current,Ur(8===e.nodeType?e.parentNode:e),lu((function(){Fu(t,l,n,r)})),l}(n,t,e,a,r);return $u(i)}qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Fu(e,t,null,null)},qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;lu((function(){Fu(null,e,null,null)})),t[fa]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&Dt(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(bt(t,1|n),tu(t,Ge()),!(6&El)&&(Ul=Ge()+500,Ua()))}break;case 13:lu((function(){var t=Oo(e,1);if(null!==t){var n=Gl();eu(t,e,1,n)}})),Bu(e,1)}},xt=function(e){if(13===e.tag){var t=Oo(e,134217728);null!==t&&eu(t,e,134217728,Gl()),Bu(e,134217728)}},St=function(e){if(13===e.tag){var t=Xl(e),n=Oo(e,t);null!==n&&eu(n,e,t,Gl()),Bu(e,t)}},Ct=function(){return _t},Et=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},xe=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var o=ba(a);if(!o)throw Error(n(90));H(a),X(a,o)}}}break;case"textarea":ie(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ie=su,Pe=lu;var Gu={usingClientEntryPoint:!1,Events:[ya,va,ba,Te,ze,su]},Xu={findFiberByHostInstance:ga,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ec={bundleType:Xu.bundleType,version:Xu.version,rendererPackageName:Xu.rendererPackageName,rendererConfig:Xu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:Xu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{ot=tc.inject(ec),it=tc}catch(de){}}return b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gu,b.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Hu(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},b.createRoot=function(e,t){if(!Hu(e))throw Error(n(299));var r=!1,a="",o=Wu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Du(e,1,!1,null,0,r,0,a,o),e[fa]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Ku(t)},b.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=Ke(t))?null:e.stateNode},b.flushSync=function(e){return lu(e)},b.hydrate=function(e,t,r){if(!Ju(t))throw Error(n(200));return Yu(null,e,t,!0,r)},b.hydrateRoot=function(e,t,r){if(!Hu(e))throw Error(n(405));var a=null!=r&&r.hydratedSources||null,o=!1,i="",s=Wu;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(i=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Uu(t,null,e,1,null!=r?r:null,o,0,i,s),e[fa]=t.current,Ur(e),a)for(e=0;e<a.length;e++)o=(o=(r=a[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new qu(t)},b.render=function(e,t,r){if(!Ju(t))throw Error(n(200));return Yu(null,e,t,!1,r)},b.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(n(40));return!!e._reactRootContainer&&(lu((function(){Yu(null,null,e,!1,(function(){e._reactRootContainer=null,e[fa]=null}))})),!0)},b.unstable_batchedUpdates=su,b.unstable_renderSubtreeIntoContainer=function(e,t,r,a){if(!Ju(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Yu(e,t,r,!1,a)},b.version="18.3.1-next-f1338f8080-20240426",b}();var x,S=v.exports;function C(e,...t){if(0===t.length)return e;const n=C(...t);return e&&n?`${e} ${n}`:e||n}function E({children:e,title:t,subtitle:n,className:r,...a}){return u.jsxs("div",{...a,className:C(r,"flex flex-col items-center","md:flex md:flex-row md:justify-stretch md:items-center","min-h-screen min-w-screen","bg-white text-slate-900","dark:bg-slate-900 dark:text-slate-100"),children:[u.jsxs("div",{className:C("px-6 pt-4","md:max-w-lg","md:grid md:content-center md:justify-items-end","md:self-stretch","md:w-1/2 md:max-w-fix md:p-4","md:text-right","md:dark:border-r md:dark:border-slate-700","md:bg-slate-100 md:dark:bg-slate-800"),children:[t&&u.jsx("h1",{className:"text-xl md:text-2xl lg:text-5xl md:mt-4 mb-4 font-semibold text-brand",children:t}),n&&u.jsx("p",{className:"hidden md:block max-w-xs text-slate-500 dark:text-slate-500",children:n})]}),u.jsx("div",{className:"w-full px-6 md:max-w-3xl md:px-12",children:e})]})}x=S.createRoot,S.hydrateRoot;var T={},z={};Object.defineProperty(z,"__esModule",{value:!0}),z.FetchError=void 0;class I extends Error{constructor(e,t,n){if(null==e||!t){const r=function(e){if("string"==typeof e&&e.length>0)return[500,e];if(!(e instanceof Error))return[500,"Failed to fetch"];const t=e.code;if("string"==typeof t)switch(!0){case"ENOTFOUND"===t:return[400,"Invalid hostname"];case"ECONNREFUSED"===t:return[502,"Connection refused"];case"DEPTH_ZERO_SELF_SIGNED_CERT"===t:return[502,"Self-signed certificate"];case t.startsWith("ERR_TLS"):return[502,"TLS error"];case t.startsWith("ECONN"):return[502,"Connection error"];default:return[500,`${t} error`]}return[500,e.message]}(function(e){if(e instanceof TypeError&&"fetch failed"===e.message&&void 0!==e.cause)return e.cause;return e}(n?.cause));e=e??r[0],t=t||r[1]}super(t,n),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.statusCode=e}}z.FetchError=I;var P={},j={};function N(e,t){return!t&&e instanceof Request?e:new Request(e,t)}Object.defineProperty(j,"__esModule",{value:!0}),j.asRequest=j.toRequestTransformer=void 0,j.toRequestTransformer=function(e){return function(t,n){return e.call(this,N(t,n))}},j.asRequest=N;var O={};Object.defineProperty(O,"__esModule",{value:!0}),O.stringifyMessage=O.logCancellationError=O.cancelBody=O.padLines=O.MaxBytesTransformStream=O.ifString=O.ifObject=O.isIp=void 0,O.isIp=function(e){return!!e.match(/^\d+\.\d+\.\d+\.\d+$/)||!(!e.startsWith("[")||!e.endsWith("]"))};const R=Object.prototype;O.ifObject=e=>{if("object"==typeof e&&null!=e&&!Array.isArray(e)){const t=Object.getPrototypeOf(e);if(null===t||t===R)return e}};O.ifString=e=>"string"==typeof e?e:void 0;class Z extends TransformStream{constructor(e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");let t=0;super({transform:(n,r)=>{(t+=n.length)<=e?r.enqueue(n):r.error(new Error("Response too large"))}})}}O.MaxBytesTransformStream=Z;const A=/\r?\n/g;async function L(e,t){!e.body||e.bodyUsed||e.body.locked||"function"!=typeof e.body.cancel||("function"==typeof t?e.body.cancel().catch(t):"log"===t?e.body.cancel().catch(D):await e.body.cancel())}function D(e){console.warn("Failed to cancel response body",e)}O.padLines=function(e,t){return e?t+e.replace(A,`$&${t}`):e},O.cancelBody=L,O.logCancellationError=D,O.stringifyMessage=async function(e){try{const t=function(e){return Array.from(e).map((([e,t])=>`${e}: ${t}`)).join("\n")}(e.headers),n=await async function(e){try{const t=await e.blob();if(t.type?.startsWith("text/")){const e=await t.text();return JSON.stringify(e)}if(/application\/(?:\w+\+)?json/.test(t.type)){const e=await t.text();return e.includes("\n")?JSON.stringify(JSON.parse(e)):e}return`[Body size: ${t.size}, type: ${JSON.stringify(t.type)} ]`}catch{return"[Body could not be read]"}}(e);return t&&n?`${t}\n${n}`:t||n}finally{L(e,"log")}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.forbiddenDomainNameRequestTransform=e.DEFAULT_FORBIDDEN_DOMAIN_NAMES=e.requireHostHeaderTranform=e.protocolCheckRequestTransform=e.FetchRequestError=void 0;const t=z,n=j,r=O;class a extends t.FetchError{constructor(e,t,n,r){super(t,n,r),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:e})}static from(e,t){return t instanceof a?t:new a(e,void 0,void 0,{cause:t})}}e.FetchRequestError=a;const o=e=>"string"==typeof e?new URL(e):e instanceof URL?e:new URL(e.url);e.protocolCheckRequestTransform=function(e){const t=new Set(e);return(e,r)=>{const{protocol:i}=o(e),s=(0,n.asRequest)(e,r);if(!t.has(i))throw new a(s,400,`"${i}" protocol is not allowed`);return s}},e.requireHostHeaderTranform=function(){return(e,t)=>{const{protocol:i,hostname:s}=o(e),l=(0,n.asRequest)(e,t);if("http:"!==i&&"https:"!==i)throw new a(l,400,`"${i}" requests are not allowed`);if(!s||(0,r.isIp)(s))throw new a(l,400,"Invalid hostname");return l}},e.DEFAULT_FORBIDDEN_DOMAIN_NAMES=["example.com","*.example.com","example.org","*.example.org","example.net","*.example.net","googleusercontent.com","*.googleusercontent.com"],e.forbiddenDomainNameRequestTransform=function(t=e.DEFAULT_FORBIDDEN_DOMAIN_NAMES){const r=new Set(t);return 0===r.size?async e=>e:async(e,t)=>{const{hostname:i}=o(e),s=(0,n.asRequest)(e,t);if(r.has(i))throw new a(s,403,"Forbidden hostname");let l=i.indexOf(".");for(;-1!==l;){const e=i.slice(l+1);if(r.has(`*.${e}`))throw new a(s,403,"Forbidden hostname");l=i.indexOf(".",l+1)}return s}}}(P);var M={},U={},F={};function $(e,t){return async n=>t(await e(n))}Object.defineProperty(F,"__esModule",{value:!0}),F.pipeTwo=F.pipe=void 0,F.pipe=function(...e){return e.reduce($)},F.pipeTwo=$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeTwo=e.pipe=void 0;var t=F;Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),Object.defineProperty(e,"pipeTwo",{enumerable:!0,get:function(){return t.pipeTwo}})}(U);var V,B={},W=e&&e.__classPrivateFieldSet||function(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n},K=e&&e.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(B,"__esModule",{value:!0}),B.TransformedResponse=void 0;class q extends Response{constructor(e,t){if(!e.body)throw new TypeError("Response body is not available");if(e.bodyUsed)throw new TypeError("Response body is already used");super(e.body.pipeThrough(t),{status:e.status,statusText:e.statusText,headers:e.headers}),V.set(this,void 0),W(this,V,e,"f")}get url(){return K(this,V,"f").url}get redirected(){return K(this,V,"f").redirected}get type(){return K(this,V,"f").type}get statusText(){return K(this,V,"f").statusText}}B.TransformedResponse=q,V=new WeakMap,Object.defineProperty(M,"__esModule",{value:!0}),M.fetchJsonZodProcessor=M.fetchJsonProcessor=M.fetchResponseJsonTranformer=M.fetchResponseTypeChecker=M.fetchTypeProcessor=M.fetchResponseMaxSizeChecker=M.fetchMaxSizeProcessor=M.fetchOkTransformer=M.fetchOkProcessor=M.cancelBodyOnError=M.extractMime=M.extractLength=M.checkLength=M.peekJson=M.FetchResponseError=void 0;const H=U,J=z,Q=B,Y=O;class G extends J.FetchError{constructor(e,t=e.status,n=e.statusText,r){super(t,n,r),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e})}static async from(e,t=X,n=e.status,r){const a="string"==typeof t?t:"function"==typeof t?await t(e):void 0;return new G(e,n,a,r)}}M.FetchResponseError=G;const X=async e=>{const t=ne(e);if(t)try{if("text/plain"===t)return await e.text();if(/^application\/(?:[^+]+\+)?json$/i.test(t)){const t=await e.json();if("string"==typeof t)return t;const n=(0,Y.ifString)((0,Y.ifObject)(t)?.error_description);if(n)return n;const r=(0,Y.ifString)((0,Y.ifObject)(t)?.error);if(r)return r;const a=(0,Y.ifString)((0,Y.ifObject)(t)?.message);if(a)return a}}catch{}};function ee(e,t){if(!(t>=0))throw new TypeError("maxBytes must be a non-negative number");const n=te(e);if(null!=n&&n>t)throw new G(e,502,"Response too large");return n}function te(e){const t=e.headers.get("Content-Length");if(null==t)return;if(!/^\d+$/.test(t))throw new G(e,502,"Invalid Content-Length");const n=Number(t);if(!Number.isSafeInteger(n))throw new G(e,502,"Content-Length too large");return n}function ne(e){const t=e.headers.get("Content-Type");if(null!=t)return t.split(";",1)[0].trim()}function re(e,t=Y.logCancellationError){return async n=>{try{return await e(n)}catch(e){throw await(0,Y.cancelBody)(n,t??void 0),e}}}async function ae(e,t){if(e.ok)return e;throw await G.from(e,t)}function oe(e,t){if(t===1/0)return e;if(ee(e,t),!e.body)return e;const n=new Y.MaxBytesTransformStream(t);return new Q.TransformedResponse(e,n)}function ie(e,t=!0){const n="string"==typeof e?t=>t===e:e instanceof RegExp?t=>e.test(t):e;return re((e=>se(e,n,t)))}async function se(e,t,n=!0){const r=ne(e);if(r){if(!t(r))throw await G.from(e,`Unexpected response Content-Type (${r})`,502)}else if(n)throw await G.from(e,"Missing response Content-Type header",502);return e}async function le(e){try{const t=await e.json();return{response:e,json:t}}catch(t){throw new G(e,502,"Unable to parse response as JSON",{cause:t})}}M.peekJson=async function(e,t=1/0){if("application/json"!==ne(e))return;ee(e,t);const n=e.clone();return(e.body&&t<1/0?new Q.TransformedResponse(n,new Y.MaxBytesTransformStream(t)):n).json()},M.checkLength=ee,M.extractLength=te,M.extractMime=ne,M.cancelBodyOnError=re,M.fetchOkProcessor=function(e){return re((t=>ae(t,e)))},M.fetchOkTransformer=ae,M.fetchMaxSizeProcessor=function(e){if(e===1/0)return e=>e;if(!Number.isFinite(e)||e<0)throw new TypeError("maxBytes must be a 0, Infinity or a positive number");return re((t=>oe(t,e)))},M.fetchResponseMaxSizeChecker=oe,M.fetchTypeProcessor=ie,M.fetchResponseTypeChecker=se,M.fetchResponseJsonTranformer=le,M.fetchJsonProcessor=function(e=/^application\/(?:[^+]+\+)?json$/,t=!0){return(0,H.pipe)(ie(e,t),re(le))},M.fetchJsonZodProcessor=function(e,t){return async n=>e.parseAsync(n.json,t)};var ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.bindFetch=ue.timedFetch=ue.loggedFetch=void 0;const ce=P,de=j,fe=B,pe=O;ue.loggedFetch=function(e=globalThis.fetch){return(0,de.toRequestTransformer)((async function(t){const n=await(0,pe.stringifyMessage)(t);console.info(`> ${t.method} ${t.url}\n${(0,pe.padLines)(n," ")}`);try{const n=await e.call(this,t),r=await(0,pe.stringifyMessage)(n.clone());return console.info(`< HTTP/1.1 ${n.status} ${n.statusText}\n${(0,pe.padLines)(r," ")}`),n}catch(e){throw console.error("< Error:",e),e}}))};var he,me,ge;ue.timedFetch=(e=6e4,t=globalThis.fetch)=>{if(e===1/0)return t;if(!Number.isFinite(e)||e<=0)throw new TypeError("Timeout must be positive");return(0,de.toRequestTransformer)((async function(n){const r=new AbortController,a=r.signal,o=()=>{r.abort()},i=()=>{clearTimeout(s),n.signal?.removeEventListener("abort",o)},s=setTimeout(o,e);"object"==typeof s&&s.unref?.(),n.signal?.addEventListener("abort",o),a.addEventListener("abort",i);const l=await t.call(this,n,{signal:a});if(l.body){const e=new TransformStream({flush:i});return new fe.TransformedResponse(l,e)}return i(),l}))},ue.bindFetch=function(e=globalThis.fetch,t=globalThis){return(0,de.toRequestTransformer)((async n=>{try{return await e.call(t,n)}catch(e){throw ce.FetchRequestError.from(n,e)}}))},he=T,me=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),ge=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||me(t,e,n)},Object.defineProperty(he,"__esModule",{value:!0}),ge(z,he),ge(P,he),ge(M,he),ge(ue,he),ge(j,he),ge(O,he);class ye{constructor(e,t,n,r){Object.defineProperty(this,"requestUri",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"clientId",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"csrfToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"newSessionsRequireConsent",{enumerable:!0,configurable:!0,writable:!0,value:r})}async signIn(e){const t=await fetch("/oauth/authorize/sign-in",{method:"POST",headers:{"Content-Type":"application/json"},mode:"same-origin",body:JSON.stringify({csrf_token:this.csrfToken,request_uri:this.requestUri,client_id:this.clientId,credentials:e})}),n=await t.json();if(t.ok){const e=n;return{account:e.account,selected:!0,loginRequired:!1,consentRequired:this.newSessionsRequireConsent||e.consentRequired}}if(400===t.status&&"invalid_request"===n?.error&&"Invalid credentials"===n?.error_description)throw new ve;if(401===t.status&&"second_authentication_factor_required"===n?.error){const e=n;throw new be(e.type,e.hint)}throw new T.FetchResponseError(t)}async accept(e){const t=new URL("/oauth/authorize/accept",window.origin);return t.searchParams.set("request_uri",this.requestUri),t.searchParams.set("account_sub",e.sub),t.searchParams.set("client_id",this.clientId),t.searchParams.set("csrf_token",this.csrfToken),t}async reject(){const e=new URL("/oauth/authorize/reject",window.origin);return e.searchParams.set("request_uri",this.requestUri),e.searchParams.set("client_id",this.clientId),e.searchParams.set("csrf_token",this.csrfToken),e}}class ve extends Error{constructor(){super("Invalid credentials")}}class be extends Error{constructor(e,t){super(`${e} authentication factor required (hint: ${t})`),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"hint",{enumerable:!0,configurable:!0,writable:!0,value:t})}}const _e=(we=document.cookie,Object.fromEntries(we.split(";").filter(Boolean).map((e=>e.split("=",2).map((e=>decodeURIComponent(e.trim())))))));var we;function ke({clientId:e,requestUri:t,csrfCookie:n,sessions:r,newSessionsRequireConsent:a},{onRedirected:o}={}){const i=_e[n]??"<csrf-token-missing>";const[s,u]=l.useState(r),c=l.useCallback((e=>{u((t=>e===(t.find((e=>e.selected))?.account.sub||null)?t:t.map((t=>({...t,selected:t.account.sub===e})))))}),[u]),d=l.useMemo((()=>new ye(t,e,i,a)),[t,e,i,a]),f=l.useCallback((e=>{window.location.href=String(e),o&&setTimeout(o)}),[o]),p=l.useCallback((async e=>{const t=await d.signIn(e),{sub:n}=t.account;u((e=>function(e,t,n){const r=e.findIndex(n);return-1===r?[...e,t]:[...e.slice(0,r),t,...e.slice(r+1)]}(e,t,(e=>e.account.sub===n)).map((e=>e!==t&&e.selected?{...e,selected:!1}:e))))}),[d,f,e,u]);return{sessions:s,setSession:c,doSignIn:p,doSignUp:l.useCallback((e=>{throw new Error("Not implemented")}),[d]),doAccept:l.useCallback((async e=>{f(await d.accept(e))}),[d,f]),doReject:l.useCallback((async()=>{f(await d.reject())}),[d,f])}}function xe(e,t){return l.useCallback((()=>e(t)),[e,t])}function Se({account:e,...t}){return u.jsx("b",{...t,children:e.preferred_username||e.email||e.sub})}function Ce({children:e,className:t,type:n="button",role:r="Button",color:a="grey",disabled:o=!1,loading:i,...s}){return u.jsx("button",{role:r,type:n,disabled:o||!0===i,...s,className:C("py-2 px-6 rounded-lg truncate cursor-pointer touch-manipulation tracking-wide overflow-hidden","brand"===a?"bg-brand text-white":"bg-slate-100 hover:bg-slate-200 text-slate-600 dark:bg-slate-800 dark:hover:bg-slate-700 dark:text-slate-300",t),children:e})}var Ee={},Te={};Object.defineProperty(Te,"__esModule",{value:!0}),Te.OAUTH_AUTHENTICATED_ENDPOINT_NAMES=Te.CLIENT_ASSERTION_TYPE_JWT_BEARER=Te.ALLOW_UNSECURE_ORIGINS=void 0,Te.ALLOW_UNSECURE_ORIGINS=(()=>{try{const e="production";return"development"===e||"test"===e}catch{return!1}})(),Te.CLIENT_ASSERTION_TYPE_JWT_BEARER="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",Te.OAUTH_AUTHENTICATED_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"];var ze={};function Ie(e){return"localhost"===e||"127.0.0.1"===e||"[::1]"===e}Object.defineProperty(ze,"__esModule",{value:!0}),ze.safeUrl=ze.isLoopbackUrl=ze.isLoopbackHost=ze.isIP=void 0,ze.isIP=function(e){return!!e.match(/^\d+\.\d+\.\d+\.\d+$/)||!(!e.startsWith("[")||!e.endsWith("]"))},ze.isLoopbackHost=Ie,ze.isLoopbackUrl=function(e){return Ie(("string"==typeof e?new URL(e):e).hostname)},ze.safeUrl=function(e){try{return new URL(e)}catch{return null}};var Pe={},je={},Ne={},Oe={},Re={},Ze={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(t=e.util||(e.util={})),(e.objectUtil||(e.objectUtil={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(Ze);var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.ZodError=Ae.quotelessJson=Ae.ZodIssueCode=void 0;const Le=Ze;Ae.ZodIssueCode=Le.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);Ae.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class De extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof De))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ae.ZodError=De,De.create=e=>new De(e),Object.defineProperty(Re,"__esModule",{value:!0});const Me=Ze,Ue=Ae;Re.default=(e,t)=>{let n;switch(e.code){case Ue.ZodIssueCode.invalid_type:n=e.received===Me.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ue.ZodIssueCode.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.util.jsonStringifyReplacer)}`;break;case Ue.ZodIssueCode.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.util.joinValues(e.keys,", ")}`;break;case Ue.ZodIssueCode.invalid_union:n="Invalid input";break;case Ue.ZodIssueCode.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.util.joinValues(e.options)}`;break;case Ue.ZodIssueCode.invalid_enum_value:n=`Invalid enum value. Expected ${Me.util.joinValues(e.options)}, received '${e.received}'`;break;case Ue.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case Ue.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case Ue.ZodIssueCode.invalid_date:n="Invalid date";break;case Ue.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Me.util.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ue.ZodIssueCode.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ue.ZodIssueCode.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ue.ZodIssueCode.custom:n="Invalid input";break;case Ue.ZodIssueCode.invalid_intersection_types:n="Intersection results could not be merged";break;case Ue.ZodIssueCode.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ue.ZodIssueCode.not_finite:n="Number must be finite";break;default:n=t.defaultError,Me.util.assertNever(e)}return{message:n}};var Fe=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.getErrorMap=Oe.setErrorMap=Oe.defaultErrorMap=void 0;const $e=Fe(Re);Oe.defaultErrorMap=$e.default;let Ve=$e.default;Oe.setErrorMap=function(e){Ve=e},Oe.getErrorMap=function(){return Ve};var Be={};!function(t){var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const r=Oe,a=n(Re);t.makeIssue=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,o=[...n,...a.path||[]],i={...a,path:o};if(void 0!==a.message)return{...a,path:o,message:a.message};let s="";const l=r.filter((e=>!!e)).slice().reverse();for(const e of l)s=e(i,{data:t,defaultError:s}).message;return{...a,path:o,message:s}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,n){const o=(0,r.getErrorMap)(),i=(0,t.makeIssue)({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,o,o===a.default?void 0:a.default].filter((e=>!!e))});e.common.issues.push(i)};class o{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const a of n){if("aborted"===a.status)return t.INVALID;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return o.mergeObjectSync(e,n)}static mergeObjectSync(e,n){const r={};for(const a of n){const{key:n,value:o}=a;if("aborted"===n.status)return t.INVALID;if("aborted"===o.status)return t.INVALID;"dirty"===n.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===n.value||void 0===o.value&&!a.alwaysSet||(r[n.value]=o.value)}return{status:e.value,value:r}}}t.ParseStatus=o,t.INVALID=Object.freeze({status:"aborted"});t.DIRTY=e=>({status:"dirty",value:e});t.OK=e=>({status:"valid",value:e});t.isAborted=e=>"aborted"===e.status;t.isDirty=e=>"dirty"===e.status;t.isValid=e=>"valid"===e.status;t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}(Be);var We={};Object.defineProperty(We,"__esModule",{value:!0});var Ke={},qe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(e.errorUtil||(e.errorUtil={}))}(qe),function(t){var n,r,a=e&&e.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=e&&e.__classPrivateFieldSet||function(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;const i=Oe,s=qe,l=Be,u=Ze,c=Ae;class d{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const f=(e,t)=>{if((0,l.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c.ZodError(e.common.issues);return this._error=t,this._error}}};function p(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var o,i;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(o=null!=s?s:r)&&void 0!==o?o:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=s?s:n)&&void 0!==i?i:a.defaultError}},description:a}}class h{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,u.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new l.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,l.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},a=this._parseSync({data:e,path:r.path,parent:r});return f(r,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await((0,l.isAsync)(r)?r:Promise.resolve(r));return f(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),o=()=>r.addIssue({code:c.ZodIssueCode.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(o(),!1))):!!a||(o(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new le({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ue.create(this,this._def)}nullable(){return ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this,this._def)}promise(){return se.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new le({...p(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new de({...p(this._def),innerType:this,defaultValue:t,typeName:ve.ZodDefault})}brand(){return new he({typeName:ve.ZodBranded,type:this,...p(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new fe({...p(this._def),innerType:this,catchValue:t,typeName:ve.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return me.create(this,e)}readonly(){return ge.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=h,t.Schema=h,t.ZodSchema=h;const m=/^c[^\s-]{8,}$/i,g=/^[0-9a-z]+$/,y=/^[0-9A-HJKMNP-TV-Z]{26}$/,v=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let k;const x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,S=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,C=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,E="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",T=new RegExp(`^${E}$`);function z(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function I(e){let t=`${E}T${z(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}t.datetimeRegex=I;class P extends h{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==u.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.string,received:t.parsedType}),l.INVALID}const t=new l.ParseStatus;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const r=e.data.length>o.value,a=e.data.length<o.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)w.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"email",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)k||(k=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),k.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"emoji",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)v.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"uuid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)b.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"nanoid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)m.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"cuid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)g.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"cuid2",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)y.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"ulid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"url",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"regex",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){I(o).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){T.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){new RegExp(`^${z(o)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?_.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"duration",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(r=e.data,("v4"!==(a=o.version)&&a||!x.test(r))&&("v6"!==a&&a||!S.test(r))&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"ip",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty())):"base64"===o.kind?C.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"base64",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):u.util.assertNever(o);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:c.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(n)})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...s.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...s.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...s.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...s.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errorUtil.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...s.errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...s.errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...s.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...s.errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,s.errorUtil.errToObj(e))}trim(){return new P({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new P({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new P({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function j(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}t.ZodString=P,P.create=e=>{var t;return new P({checks:[],typeName:ve.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...p(e)})};class N extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==u.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.number,received:t.parsedType}),l.INVALID}let t;const n=new l.ParseStatus;for(const r of this._def.checks)if("int"===r.kind)u.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==j(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_finite,message:r.message}),n.dirty()):u.util.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,n,r){return new N({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:s.errorUtil.toString(r)}]})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&u.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=N,N.create=e=>new N({checks:[],typeName:ve.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...p(e)});class O extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==u.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.bigint,received:t.parsedType}),l.INVALID}let t;const n=new l.ParseStatus;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):u.util.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,n,r){return new O({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:s.errorUtil.toString(r)}]})}_addCheck(e){return new O({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}t.ZodBigInt=O,O.create=e=>{var t;return new O({checks:[],typeName:ve.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...p(e)})};class R extends h{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==u.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.boolean,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodBoolean=R,R.create=e=>new R({typeName:ve.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...p(e)});class Z extends h{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==u.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.date,received:t.parsedType}),l.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_date}),l.INVALID}const t=new l.ParseStatus;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):u.util.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}t.ZodDate=Z,Z.create=e=>new Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ve.ZodDate,...p(e)});class A extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.symbol,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodSymbol=A,A.create=e=>new A({typeName:ve.ZodSymbol,...p(e)});class L extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.undefined,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodUndefined=L,L.create=e=>new L({typeName:ve.ZodUndefined,...p(e)});class D extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.null,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodNull=D,D.create=e=>new D({typeName:ve.ZodNull,...p(e)});class M extends h{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,l.OK)(e.data)}}t.ZodAny=M,M.create=e=>new M({typeName:ve.ZodAny,...p(e)});class U extends h{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,l.OK)(e.data)}}t.ZodUnknown=U,U.create=e=>new U({typeName:ve.ZodUnknown,...p(e)});class F extends h{_parse(e){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.never,received:t.parsedType}),l.INVALID}}t.ZodNever=F,F.create=e=>new F({typeName:ve.ZodNever,...p(e)});class $ extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.void,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodVoid=$,$.create=e=>new $({typeName:ve.ZodVoid,...p(e)});class V extends h{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.ZodParsedType.array)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:t.parsedType}),l.INVALID;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&((0,l.addIssueToContext)(t,{code:e?c.ZodIssueCode.too_big:c.ZodIssueCode.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new d(t,e,t.path,n))))).then((e=>l.ParseStatus.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new d(t,e,t.path,n))));return l.ParseStatus.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new V({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new V({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new V({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function B(e){if(e instanceof W){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ue.create(B(r))}return new W({...e._def,shape:()=>t})}return e instanceof V?new V({...e._def,type:B(e.element)}):e instanceof ue?ue.create(B(e.unwrap())):e instanceof ce?ce.create(B(e.unwrap())):e instanceof Y?Y.create(e.items.map((e=>B(e)))):e}t.ZodArray=V,V.create=(e,t)=>new V({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...p(t)});class W extends h{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=u.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),l.INVALID}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof F&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||o.push(e);const i=[];for(const e of a){const t=r[e],a=n.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new d(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof F){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)i.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new d(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>l.ParseStatus.mergeObjectSync(t,e))):l.ParseStatus.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return s.errorUtil.errToObj,new W({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,o,i;const l=null!==(o=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=s.errorUtil.errToObj(e).message)&&void 0!==i?i:l}:{message:l}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){const t={};return u.util.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new W({...this._def,shape:()=>t})}omit(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new W({...this._def,shape:()=>t})}deepPartial(){return B(this)}partial(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new W({...this._def,shape:()=>t})}required(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ue;)e=e._def.innerType;t[n]=e}})),new W({...this._def,shape:()=>t})}keyof(){return ae(u.util.objectKeys(this.shape))}}t.ZodObject=W,W.create=(e,t)=>new W({shape:()=>e,unknownKeys:"strip",catchall:F.create(),typeName:ve.ZodObject,...p(t)}),W.strictCreate=(e,t)=>new W({shape:()=>e,unknownKeys:"strict",catchall:F.create(),typeName:ve.ZodObject,...p(t)}),W.lazycreate=(e,t)=>new W({shape:e,unknownKeys:"strip",catchall:F.create(),typeName:ve.ZodObject,...p(t)});class K extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new c.ZodError(e.ctx.common.issues)));return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:n}),l.INVALID}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},o=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new c.ZodError(e)));return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:a}),l.INVALID}}get options(){return this._def.options}}t.ZodUnion=K,K.create=(e,t)=>new K({options:e,typeName:ve.ZodUnion,...p(t)});const q=e=>e instanceof ne?q(e.schema):e instanceof le?q(e.innerType()):e instanceof re?[e.value]:e instanceof oe?e.options:e instanceof ie?u.util.objectValues(e.enum):e instanceof de?q(e._def.innerType):e instanceof L?[void 0]:e instanceof D?[null]:e instanceof ue?[void 0,...q(e.unwrap())]:e instanceof ce?[null,...q(e.unwrap())]:e instanceof he||e instanceof ge?q(e.unwrap()):e instanceof fe?q(e._def.innerType):[];class H extends h{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.object)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),l.INVALID;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),l.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=q(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,n)}}return new H({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...p(n)})}}function J(e,t){const n=(0,u.getParsedType)(e),r=(0,u.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===u.ZodParsedType.object&&r===u.ZodParsedType.object){const n=u.util.objectKeys(t),r=u.util.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=J(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}if(n===u.ZodParsedType.array&&r===u.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=J(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===u.ZodParsedType.date&&r===u.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=H;class Q extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if((0,l.isAborted)(e)||(0,l.isAborted)(r))return l.INVALID;const a=J(e.value,r.value);return a.valid?(((0,l.isDirty)(e)||(0,l.isDirty)(r))&&t.dirty(),{status:t.value,value:a.data}):((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_intersection_types}),l.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}t.ZodIntersection=Q,Q.create=(e,t,n)=>new Q({left:e,right:t,typeName:ve.ZodIntersection,...p(n)});class Y extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.array)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:n.parsedType}),l.INVALID;if(n.data.length<this._def.items.length)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),l.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new d(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>l.ParseStatus.mergeArray(t,e))):l.ParseStatus.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Y({...this._def,rest:e})}}t.ZodTuple=Y,Y.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y({items:e,typeName:ve.ZodTuple,rest:null,...p(t)})};class G extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.object)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:n.parsedType}),l.INVALID;const r=[],a=this._def.keyType,o=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new d(n,e,n.path,e)),value:o._parse(new d(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?l.ParseStatus.mergeObjectAsync(t,r):l.ParseStatus.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new G(t instanceof h?{keyType:e,valueType:t,typeName:ve.ZodRecord,...p(n)}:{keyType:P.create(),valueType:e,typeName:ve.ZodRecord,...p(t)})}}t.ZodRecord=G;class X extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.map)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.map,received:n.parsedType}),l.INVALID;const r=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map((([e,t],o)=>({key:r._parse(new d(n,e,n.path,[o,"key"])),value:a._parse(new d(n,t,n.path,[o,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of o){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return l.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of o){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return l.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}t.ZodMap=X,X.create=(e,t,n)=>new X({valueType:t,keyType:e,typeName:ve.ZodMap,...p(n)});class ee extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.set)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.set,received:n.parsedType}),l.INVALID;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function o(e){const n=new Set;for(const r of e){if("aborted"===r.status)return l.INVALID;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new d(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>o(e))):o(i)}min(e,t){return new ee({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new ee({...this._def,maxSize:{value:e,message:s.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=ee,ee.create=(e,t)=>new ee({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...p(t)});class te extends h{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.function)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.function,received:t.parsedType}),l.INVALID;function n(e,n){return(0,l.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:c.ZodIssueCode.invalid_arguments,argumentsError:n}})}function r(e,n){return(0,l.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:c.ZodIssueCode.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof se){const e=this;return(0,l.OK)((async function(...t){const i=new c.ZodError([]),s=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),l=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(l,a).catch((e=>{throw i.addIssue(r(l,e)),i}))}))}{const e=this;return(0,l.OK)((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new c.ZodError([n(t,i.error)]);const s=Reflect.apply(o,this,i.data),l=e._def.returns.safeParse(s,a);if(!l.success)throw new c.ZodError([r(s,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new te({...this._def,args:Y.create(e).rest(U.create())})}returns(e){return new te({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new te({args:e||Y.create([]).rest(U.create()),returns:t||U.create(),typeName:ve.ZodFunction,...p(n)})}}t.ZodFunction=te;class ne extends h{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=ne,ne.create=(e,t)=>new ne({getter:e,typeName:ve.ZodLazy,...p(t)});class re extends h{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_literal,expected:this._def.value}),l.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ae(e,t){return new oe({values:e,typeName:ve.ZodEnum,...p(t)})}t.ZodLiteral=re,re.create=(e,t)=>new re({value:e,typeName:ve.ZodLiteral,...p(t)});class oe extends h{constructor(){super(...arguments),n.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,l.addIssueToContext)(t,{expected:u.util.joinValues(n),received:t.parsedType,code:c.ZodIssueCode.invalid_type}),l.INVALID}if(a(this,n,"f")||o(this,n,new Set(this._def.values),"f"),!a(this,n,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,l.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_enum_value,options:n}),l.INVALID}return(0,l.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return oe.create(e,{...this._def,...t})}exclude(e,t=this._def){return oe.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}t.ZodEnum=oe,n=new WeakMap,oe.create=ae;class ie extends h{constructor(){super(...arguments),r.set(this,void 0)}_parse(e){const t=u.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.ZodParsedType.string&&n.parsedType!==u.ZodParsedType.number){const e=u.util.objectValues(t);return(0,l.addIssueToContext)(n,{expected:u.util.joinValues(e),received:n.parsedType,code:c.ZodIssueCode.invalid_type}),l.INVALID}if(a(this,r,"f")||o(this,r,new Set(u.util.getValidEnumValues(this._def.values)),"f"),!a(this,r,"f").has(e.data)){const e=u.util.objectValues(t);return(0,l.addIssueToContext)(n,{received:n.data,code:c.ZodIssueCode.invalid_enum_value,options:e}),l.INVALID}return(0,l.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=ie,r=new WeakMap,ie.create=(e,t)=>new ie({values:e,typeName:ve.ZodNativeEnum,...p(t)});class se extends h{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.promise&&!1===t.common.async)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.promise,received:t.parsedType}),l.INVALID;const n=t.parsedType===u.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,l.OK)(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=se,se.create=(e,t)=>new se({type:e,typeName:ve.ZodPromise,...p(t)});class le extends h{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{(0,l.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return l.INVALID;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:"dirty"===r.status||"dirty"===t.value?(0,l.DIRTY)(r.value):r}));{if("aborted"===t.value)return l.INVALID;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:"dirty"===r.status||"dirty"===t.value?(0,l.DIRTY)(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?l.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,l.isValid)(e))return e;const o=r.transform(e.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>(0,l.isValid)(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}u.util.assertNever(r)}}t.ZodEffects=le,t.ZodTransformer=le,le.create=(e,t,n)=>new le({schema:e,typeName:ve.ZodEffects,effect:t,...p(n)}),le.createWithPreprocess=(e,t,n)=>new le({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...p(n)});class ue extends h{_parse(e){return this._getType(e)===u.ZodParsedType.undefined?(0,l.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=ue,ue.create=(e,t)=>new ue({innerType:e,typeName:ve.ZodOptional,...p(t)});class ce extends h{_parse(e){return this._getType(e)===u.ZodParsedType.null?(0,l.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=ce,ce.create=(e,t)=>new ce({innerType:e,typeName:ve.ZodNullable,...p(t)});class de extends h{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===u.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=de,de.create=(e,t)=>new de({innerType:e,typeName:ve.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...p(t)});class fe extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,l.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new c.ZodError(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new c.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=fe,fe.create=(e,t)=>new fe({innerType:e,typeName:ve.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...p(t)});class pe extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.nan,received:t.parsedType}),l.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=pe,pe.create=e=>new pe({typeName:ve.ZodNaN,...p(e)}),t.BRAND=Symbol("zod_brand");class he extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=he;class me extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?l.INVALID:"dirty"===e.status?(t.dirty(),(0,l.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?l.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new me({in:e,out:t,typeName:ve.ZodPipeline})}}t.ZodPipeline=me;class ge extends h{_parse(e){const t=this._def.innerType._parse(e),n=e=>((0,l.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,l.isAsync)(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function ye(e,t={},n){return e?M.create().superRefine(((r,a)=>{var o,i;if(!e(r)){const e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(i=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===i||i,l="string"==typeof e?{message:e}:e;a.addIssue({code:"custom",...l,fatal:s})}})):M.create()}var ve;t.ZodReadonly=ge,ge.create=(e,t)=>new ge({innerType:e,typeName:ve.ZodReadonly,...p(t)}),t.custom=ye,t.late={object:W.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ve=t.ZodFirstPartyTypeKind||(t.ZodFirstPartyTypeKind={}));t.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>ye((t=>t instanceof e),t);const be=P.create;t.string=be;const _e=N.create;t.number=_e;const we=pe.create;t.nan=we;const ke=O.create;t.bigint=ke;const xe=R.create;t.boolean=xe;const Se=Z.create;t.date=Se;const Ce=A.create;t.symbol=Ce;const Ee=L.create;t.undefined=Ee;const Te=D.create;t.null=Te;const ze=M.create;t.any=ze;const Ie=U.create;t.unknown=Ie;const Pe=F.create;t.never=Pe;const je=$.create;t.void=je;const Ne=V.create;t.array=Ne;const Re=W.create;t.object=Re;const Le=W.strictCreate;t.strictObject=Le;const De=K.create;t.union=De;const Me=H.create;t.discriminatedUnion=Me;const Ue=Q.create;t.intersection=Ue;const Fe=Y.create;t.tuple=Fe;const $e=G.create;t.record=$e;const Ve=X.create;t.map=Ve;const We=ee.create;t.set=We;const Ke=te.create;t.function=Ke;const He=ne.create;t.lazy=He;const Je=re.create;t.literal=Je;const Qe=oe.create;t.enum=Qe;const Ye=ie.create;t.nativeEnum=Ye;const Ge=se.create;t.promise=Ge;const Xe=le.create;t.effect=Xe,t.transformer=Xe;const et=ue.create;t.optional=et;const tt=ce.create;t.nullable=tt;const nt=le.createWithPreprocess;t.preprocess=nt;const rt=me.create;t.pipeline=rt;t.ostring=()=>be().optional();t.onumber=()=>_e().optional();t.oboolean=()=>xe().optional(),t.coerce={string:e=>P.create({...e,coerce:!0}),number:e=>N.create({...e,coerce:!0}),boolean:e=>R.create({...e,coerce:!0}),bigint:e=>O.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},t.NEVER=l.INVALID}(Ke),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(Oe,t),r(Be,t),r(We,t),r(Ze,t),r(Ke,t),r(Ae,t)}(Ne),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t},o=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const i=a(Ne);t.z=i,o(Ne,t),t.default=i}(je),Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.accessTokenSchema=void 0;const He=je;Pe.accessTokenSchema=He.z.string().min(1);var Je={},Qe={},Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.parseOAuthClientIdUrl=void 0,Ye.parseOAuthClientIdUrl=function(e){if(e.endsWith("/"))throw new TypeError("ClientID must not end with a trailing slash");const t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)throw new TypeError('ClientID must use the "https:" or "http:" protocol');t.searchParams.sort();const n="/"===t.pathname?t.origin+t.search:t.href;if(n!==e)throw new TypeError(`ClientID must be in canonical form ("${n}", got "${e}")`);return t},Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.parseOAuthLoopbackClientId=Qe.isOAuthClientIdLoopback=void 0;const Ge=Ye;function Xe(e){const t=(0,Ge.parseOAuthClientIdUrl)(e);if("http:"!==t.protocol)throw new TypeError('Loopback ClientID must use the "http:" protocol');if("localhost"!==t.hostname)throw new TypeError('Loopback ClientID must use the "localhost" hostname');if(t.hash)throw new TypeError("Loopback ClientID must not contain a fragment");if(t.username||t.password)throw new TypeError("Loopback ClientID must not contain credentials");if(t.port)throw new TypeError("Loopback ClientID must not contain a port");if("/"!==t.pathname&&t.pathname.endsWith("/"))throw new TypeError("Loopback ClientID must not end with a trailing slash");if(t.pathname.includes("//"))throw new TypeError("Loopback ClientID must not contain any double slashes in its path");return t}Qe.isOAuthClientIdLoopback=function(e){try{return Xe(e),!0}catch{return!1}},Qe.parseOAuthLoopbackClientId=Xe,Object.defineProperty(Je,"__esModule",{value:!0}),Je.atprotoLoopbackClientMetadata=void 0;const et=Qe,tt=Ye;Je.atprotoLoopbackClientMetadata=function(e){if(!(0,et.isOAuthClientIdLoopback)(e))throw new TypeError(`Invalid loopback client ID ${e}`);const{origin:t,pathname:n,searchParams:r}=(0,tt.parseOAuthClientIdUrl)(e);for(const e of r.keys())if("redirect_uri"!==e)throw new TypeError(`Invalid query parameter ${e} in client ID`);const a=r.getAll("redirect_uri");return{client_id:e,client_name:"Loopback client",response_types:["code id_token","code"],grant_types:["authorization_code","implicit","refresh_token"],scope:"openid profile offline_access",redirect_uris:a.length?a:["127.0.0.1","[::1]"].map((e=>Object.assign(new URL(n,t),{hostname:e}).href)),token_endpoint_auth_method:"none",application_type:"native",dpop_bound_access_tokens:!0}};var nt={};Object.defineProperty(nt,"__esModule",{value:!0}),nt.parseOAuthDiscoverableClientId=nt.isOAuthClientIdDiscoverable=void 0;const rt=Ye,at=ze;function ot(e){const t=(0,rt.parseOAuthClientIdUrl)(e);if("localhost"===t.hostname)throw new TypeError("ClientID must not be a loopback hostname");if("https:"!==t.protocol)throw new TypeError('ClientID must use the "https:" protocol');if(t.hash)throw new TypeError("ClientID must not contain a fragment");if(t.username||t.password)throw new TypeError("ClientID must not contain credentials");if("/"===t.pathname)throw new TypeError('ClientID must contain a path (e.g. "/client-metadata")');if("/"!==t.pathname&&t.pathname.endsWith("/"))throw new TypeError("ClientID must not end with a trailing slash");if(t.pathname.includes("//"))throw new TypeError("ClientID must not contain any double slashes in its path");if((0,at.isIP)(t.hostname))throw new TypeError("ClientID must not be an IP address");return t}nt.isOAuthClientIdDiscoverable=function(e){try{return ot(e),!0}catch{return!1}},nt.parseOAuthDiscoverableClientId=ot;var it={},st={},lt={},ut={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.JwtVerifyError=e.JwtCreateError=e.JwkError=e.ERR_JWT_VERIFY=e.ERR_JWT_CREATE=e.ERR_JWT_INVALID=e.ERR_JWK_NOT_FOUND=e.ERR_JWK_INVALID=e.ERR_JWKS_NO_MATCHING_KEY=void 0,e.ERR_JWKS_NO_MATCHING_KEY="ERR_JWKS_NO_MATCHING_KEY",e.ERR_JWK_INVALID="ERR_JWK_INVALID",e.ERR_JWK_NOT_FOUND="ERR_JWK_NOT_FOUND",e.ERR_JWT_INVALID="ERR_JWT_INVALID",e.ERR_JWT_CREATE="ERR_JWT_CREATE",e.ERR_JWT_VERIFY="ERR_JWT_VERIFY";class t extends TypeError{constructor(t="JWK error",n=e.ERR_JWK_INVALID,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}}e.JwkError=t;class n extends Error{constructor(t="Unable to create JWT",n=e.ERR_JWT_CREATE,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}static from(e,r,a){return e instanceof n?e:new n(a,e instanceof t?e.code:r,{cause:e})}}e.JwtCreateError=n;class r extends Error{constructor(t="Invalid JWT",n=e.ERR_JWT_VERIFY,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}static from(e,n,a){return e instanceof r?e:new r(a,e instanceof t?e.code:n,{cause:e})}}e.JwtVerifyError=r}(ut),Object.defineProperty(lt,"__esModule",{value:!0}),lt.jwkAlgorithms=void 0;const ct=ut,{process:dt}=globalThis,ft=void 0!==dt&&"string"==typeof dt?.versions?.node;lt.jwkAlgorithms=function*(e){if(e.alg)yield e.alg;else switch(e.kty){case"EC":if("enc"!==e.use&&void 0!==e.use||(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),"sig"===e.use||void 0===e.use){const t="crv"in e?e.crv:void 0;switch(t){case"P-256":case"P-384":yield`ES${t.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":ft&&(yield"ES256K");break;default:throw new ct.JwkError(`Unsupported crv "${t}"`)}}return;case"OKP":if(!e.use)throw new ct.JwkError('Missing "use" Parameter value');return yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",void(yield"ECDH-ES+A256KW");case"RSA":return"enc"!==e.use&&void 0!==e.use||(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",ft&&(yield"RSA1_5")),void("sig"!==e.use&&void 0!==e.use||(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512"));case"oct":return"enc"!==e.use&&void 0!==e.use||(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),void("sig"!==e.use&&void 0!==e.use||(yield"HS256",yield"HS384",yield"HS512"));default:throw new ct.JwkError(`Unsupported kty "${e.kty}"`)}};var pt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwkPubSchema=e.jwkValidator=e.jwkSchema=e.jwkUnknownKeySchema=e.jwkSymKeySchema=e.jwkOkpKeySchema=e.jwkEcSecp256k1KeySchema=e.jwkEcKeySchema=e.jwkRsaKeySchema=e.jwkBaseSchema=e.keyUsageSchema=void 0;const t=je;e.keyUsageSchema=t.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]),e.jwkBaseSchema=t.z.object({kty:t.z.string().min(1),alg:t.z.string().min(1).optional(),kid:t.z.string().min(1).optional(),ext:t.z.boolean().optional(),use:t.z.enum(["sig","enc"]).optional(),key_ops:t.z.array(e.keyUsageSchema).optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().min(1).optional(),"x5t#S256":t.z.string().min(1).optional(),x5u:t.z.string().url().optional()}),e.jwkRsaKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("RSA"),alg:t.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:t.z.string().min(1),e:t.z.string().min(1),d:t.z.string().min(1).optional(),p:t.z.string().min(1).optional(),q:t.z.string().min(1).optional(),dp:t.z.string().min(1).optional(),dq:t.z.string().min(1).optional(),qi:t.z.string().min(1).optional(),oth:t.z.array(t.z.object({r:t.z.string().optional(),d:t.z.string().optional(),t:t.z.string().optional()})).nonempty().optional()}),e.jwkEcKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256","ES384","ES512"]).optional(),crv:t.z.enum(["P-256","P-384","P-521"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkEcSecp256k1KeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256K"]).optional(),crv:t.z.enum(["secp256k1"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkOkpKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("OKP"),alg:t.z.enum(["EdDSA"]).optional(),crv:t.z.enum(["Ed25519","Ed448"]),x:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkSymKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("oct"),alg:t.z.enum(["HS256","HS384","HS512"]).optional(),k:t.z.string()}),e.jwkUnknownKeySchema=e.jwkBaseSchema.extend({kty:t.z.string().refine((e=>"RSA"!==e&&"EC"!==e&&"OKP"!==e&&"oct"!==e))}),e.jwkSchema=t.z.union([e.jwkUnknownKeySchema,e.jwkRsaKeySchema,e.jwkEcKeySchema,e.jwkEcSecp256k1KeySchema,e.jwkOkpKeySchema,e.jwkSymKeySchema]),e.jwkValidator=e.jwkSchema.refine((e=>null!=e.use||null!=e.key_ops),"use or key_ops required").refine((e=>!e.use||!e.key_ops||e.key_ops.every((t=>"sig"===e.use?"sign"===t||"verify"===t:"encrypt"===t||"decrypt"===t))),"use and key_ops must be consistent"),e.jwkPubSchema=e.jwkValidator.refine((e=>null!=e.kid),"kid is required").refine((e=>!("k"in e)&&!("d"in e)),"private key not allowed")}(pt);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.jwksPubSchema=ht.jwksSchema=void 0;const mt=je,gt=pt;ht.jwksSchema=mt.z.object({keys:mt.z.array(gt.jwkSchema)}),ht.jwksPubSchema=mt.z.object({keys:mt.z.array(gt.jwkPubSchema)});var yt={},vt={},bt={};class _t{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class wt{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return xt(this,e)}}class kt{constructor(e){this.decoders=e}or(e){return xt(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const xt=(e,t)=>new kt({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class St{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new _t(e,t,n),this.decoder=new wt(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ct=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>(({name:e,prefix:t,encode:n,decode:r})=>new St(e,t,n,r))({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],a=(1<<n)-1;let o="",i=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],i+=8;i>n;)i-=n,o+=t[a&s>>i];if(i&&(o+=t[a&s<<n-i]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const a={};for(let e=0;e<t.length;++e)a[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const i=new Uint8Array(o*n/8|0);let s=0,l=0,u=0;for(let t=0;t<o;++t){const o=a[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);l=l<<n|o,s+=n,s>=8&&(s-=8,i[u++]=255&l>>s)}if(s>=n||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return i})(t,r,n,e)}),Et=Ct({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Tt=Ct({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),zt=Ct({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),It=Ct({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Pt=t(Object.freeze({__proto__:null,base64:Et,base64pad:Tt,base64url:zt,base64urlpad:It}));Object.defineProperty(bt,"__esModule",{value:!0}),bt.segmentedStringRefinementFactory=bt.jwtCharsRefinement=bt.parseB64uJson=bt.cachedGetter=bt.matchesAny=bt.preferredOrderCmp=bt.isDefined=void 0;const jt=Pt,Nt=je;bt.isDefined=e=>void 0!==e;bt.preferredOrderCmp=e=>(t,n)=>{const r=e.indexOf(t),a=e.indexOf(n);return r===a?0:-1===r?1:-1===a?-1:r-a},bt.matchesAny=function(e){return null==e?e=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e};bt.cachedGetter=(e,t)=>function(){const t=e.call(this);return Object.defineProperty(this,e.name,{get:()=>t,enumerable:!0,configurable:!0}),t};const Ot=new TextDecoder;bt.parseB64uJson=function(e){const t=jt.base64url.baseDecode(e),n=Ot.decode(t);return JSON.parse(n)};bt.jwtCharsRefinement=(e,t)=>{let n;for(let r=0;r<e.length;r++)if(n=e.charCodeAt(r),!(65<=n&&n<=90||97<=n&&n<=122||48<=n&&n<=57||45===n||95===n||46===n)){const n=String.fromCodePoint(e.codePointAt(r));return t.addIssue({code:Nt.ZodIssueCode.custom,message:`Invalid character "${n}" in JWT at position ${r}`})}};bt.segmentedStringRefinementFactory=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(0|e)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const n=e*t+(e-1),r="Invalid JWT format";return(a,o)=>{if(a.length<n)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: too short`}),!1;let i=0;for(let n=0;n<e-1;n++){const s=a.indexOf(".",i);if(-1===s)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: expected ${e} segments, got ${n+1}`}),!1;if(s-i<t)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: segment ${n+1} is too short`}),!1;i=s+1}return-1!==a.indexOf(".",i)?(o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: too many segments`}),!1):!(a.length-i<t)||(o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: last segment is too short`}),!1)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwtPayloadSchema=e.jwtHeaderSchema=e.isUnsignedJwt=e.unsignedJwtSchema=e.isSignedJwt=e.signedJwtSchema=void 0;const t=je,n=pt,r=bt;e.signedJwtSchema=t.z.string().superRefine(r.jwtCharsRefinement).superRefine((0,r.segmentedStringRefinementFactory)(3));e.isSignedJwt=t=>e.signedJwtSchema.safeParse(t).success,e.unsignedJwtSchema=t.z.string().superRefine(r.jwtCharsRefinement).superRefine((0,r.segmentedStringRefinementFactory)(2));e.isUnsignedJwt=t=>e.unsignedJwtSchema.safeParse(t).success,e.jwtHeaderSchema=t.z.object({alg:t.z.string(),jku:t.z.string().url().optional(),jwk:t.z.object({kty:t.z.string(),crv:t.z.string().optional(),x:t.z.string().optional(),y:t.z.string().optional(),e:t.z.string().optional(),n:t.z.string().optional()}).optional(),kid:t.z.string().optional(),x5u:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().optional(),"x5t#S256":t.z.string().optional(),typ:t.z.string().optional(),cty:t.z.string().optional(),crit:t.z.array(t.z.string()).optional()}),e.jwtPayloadSchema=t.z.object({iss:t.z.string().optional(),aud:t.z.union([t.z.string(),t.z.array(t.z.string()).nonempty()]).optional(),sub:t.z.string().optional(),exp:t.z.number().int().optional(),nbf:t.z.number().int().optional(),iat:t.z.number().int().optional(),jti:t.z.string().optional(),htm:t.z.string().optional(),htu:t.z.string().optional(),ath:t.z.string().optional(),acr:t.z.string().optional(),azp:t.z.string().optional(),amr:t.z.array(t.z.string()).optional(),cnf:t.z.object({kid:t.z.string().optional(),jwk:n.jwkPubSchema.optional(),jwe:t.z.string().optional(),jku:t.z.string().url().optional(),jkt:t.z.string().optional(),"x5t#S256":t.z.string().optional(),osc:t.z.string().optional()}).optional(),client_id:t.z.string().optional(),scope:t.z.string().optional(),nonce:t.z.string().optional(),at_hash:t.z.string().optional(),c_hash:t.z.string().optional(),s_hash:t.z.string().optional(),auth_time:t.z.number().int().optional(),name:t.z.string().optional(),family_name:t.z.string().optional(),given_name:t.z.string().optional(),middle_name:t.z.string().optional(),nickname:t.z.string().optional(),preferred_username:t.z.string().optional(),gender:t.z.string().optional(),picture:t.z.string().url().optional(),profile:t.z.string().url().optional(),website:t.z.string().url().optional(),birthdate:t.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:t.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:t.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/).optional(),updated_at:t.z.number().int().optional(),email:t.z.string().optional(),email_verified:t.z.boolean().optional(),phone_number:t.z.string().optional(),phone_number_verified:t.z.boolean().optional(),address:t.z.object({formatted:t.z.string().optional(),street_address:t.z.string().optional(),locality:t.z.string().optional(),region:t.z.string().optional(),postal_code:t.z.string().optional(),country:t.z.string().optional()}).optional(),authorization_details:t.z.array(t.z.object({type:t.z.string(),locations:t.z.array(t.z.string()).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}).passthrough()).optional()})}(vt),Object.defineProperty(yt,"__esModule",{value:!0}),yt.unsafeDecodeJwt=void 0;const Rt=ut,Zt=vt,At=bt;yt.unsafeDecodeJwt=function(e){const{0:t,1:n,length:r}=e.split(".");if(r>3||r<2)throw new Rt.JwtVerifyError(void 0,Rt.ERR_JWT_INVALID);const a=Zt.jwtHeaderSchema.parse((0,At.parseB64uJson)(t));if(2===r&&"none"!==a?.alg)throw new Rt.JwtVerifyError(void 0,Rt.ERR_JWT_INVALID);return{header:a,payload:Zt.jwtPayloadSchema.parse((0,At.parseB64uJson)(n))}};var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});var Dt={},Mt=e&&e.__runInitializers||function(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0},Ut=e&&e.__esDecorate||function(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var g=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=i(g.get))&&(d.get=s),(s=i(g.set))&&(d.set=s),(s=i(g.init))&&a.unshift(s)}else(s=i(g))&&("field"===l?a.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.Key=void 0;const Ft=lt,$t=ut,Vt=pt,Bt=bt;let Wt=(()=>{var e;let t,n,r,a=[];return e=class{constructor(e){if(Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(Mt(this,a),e)}),!e.use)throw new $t.JwkError('Missing "use" Parameter value')}get isPrivate(){const{jwk:e}=this;return"d"in e&&void 0!==e.d||"k"in e&&void 0!==e.k}get isSymetric(){const{jwk:e}=this;return"k"in e&&void 0!==e.k}get privateJwk(){return this.isPrivate?this.jwk:void 0}get publicJwk(){if(!this.isSymetric){if(this.isPrivate){const{d:e,...t}=this.jwk;return t}return this.jwk}}get bareJwk(){if(this.isSymetric)return;const{kty:e,crv:t,e:n,n:r,x:a,y:o}=this.jwk;return Vt.jwkSchema.parse({crv:t,e:n,kty:e,n:r,x:a,y:o})}get use(){return this.jwk.use}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Array.from((0,Ft.jwkAlgorithms)(this.jwk))}},(()=>{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[Bt.cachedGetter],n=[Bt.cachedGetter],r=[Bt.cachedGetter],Ut(e,null,t,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:e=>"publicJwk"in e,get:e=>e.publicJwk},metadata:o},null,a),Ut(e,null,n,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:e=>"bareJwk"in e,get:e=>e.bareJwk},metadata:o},null,a),Ut(e,null,r,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:e=>"algorithms"in e,get:e=>e.algorithms},metadata:o},null,a),o&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),e})();Dt.Key=Wt;var Kt={},qt=e&&e.__runInitializers||function(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0},Ht=e&&e.__esDecorate||function(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var g=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=i(g.get))&&(d.get=s),(s=i(g.set))&&(d.set=s),(s=i(g.init))&&a.unshift(s)}else(s=i(g))&&("field"===l?a.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.Keyset=void 0;const Jt=ut,Qt=yt,Yt=bt,Gt=e=>e.privateJwk,Xt=e=>e.publicJwk;let en=(()=>{var e;let t,n,r,a=[];return e=class{constructor(t,n=(t instanceof e?[...t.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"])){Object.defineProperty(this,"preferredSigningAlgorithms",{enumerable:!0,configurable:!0,writable:!0,value:(qt(this,a),n)}),Object.defineProperty(this,"keys",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=[],o=new Set;for(const e of t)if(e&&(r.push(e),e.kid)){if(o.has(e.kid))throw new Jt.JwkError(`Duplicate key: ${e.kid}`);o.add(e.kid)}this.keys=Object.freeze(r)}get size(){return this.keys.length}get signAlgorithms(){const e=new Set;for(const t of this)if("sig"===t.use)for(const n of t.algorithms)e.add(n);return Object.freeze([...e].sort((0,Yt.preferredOrderCmp)(this.preferredSigningAlgorithms)))}get publicJwks(){return{keys:Array.from(this,Xt).filter(Yt.isDefined)}}get privateJwks(){return{keys:Array.from(this,Gt).filter(Yt.isDefined)}}has(e){return this.keys.some((t=>t.kid===e))}get(e){for(const t of this.list(e))return t;throw new Jt.JwkError(`Key not found ${e.kid||e.alg||"<unknown>"}`,Jt.ERR_JWK_NOT_FOUND)}*list(e){if(0!==e.kid?.length&&0!==e.alg?.length)for(const t of this)if(!e.use||t.use===e.use){if(Array.isArray(e.kid)){if(!t.kid||!e.kid.includes(t.kid))continue}else if(e.kid&&t.kid!==e.kid)continue;if(Array.isArray(e.alg)){if(!e.alg.some((e=>t.algorithms.includes(e))))continue}else if("string"==typeof e.alg&&!t.algorithms.includes(e.alg))continue;yield t}}findKey({kid:e,alg:t,use:n}){const r=[];for(const a of this.list({kid:e,alg:t,use:n}))if(a.isPrivate){if("string"==typeof t)return[a,t];r.push(a)}const a=(0,Yt.matchesAny)(t),o=r.map((e=>[e,e.algorithms.filter(a)]));for(const e of this.preferredSigningAlgorithms)for(const[t,n]of o)if(n.includes(e))return[t,e];for(const[e,t]of o)for(const n of t)return[e,n];throw new Jt.JwkError(`No singing key found for ${e||t||n||"<unknown>"}`,Jt.ERR_JWK_NOT_FOUND)}[(t=[Yt.cachedGetter],n=[Yt.cachedGetter],r=[Yt.cachedGetter],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:e,kid:t,...n},r){try{const[a,o]=this.findKey({alg:e,kid:t,use:"sig"}),i={...n,alg:o,kid:a.kid};return"function"==typeof r&&(r=await r(i,a)),await a.createJwt(i,r)}catch(e){throw Jt.JwtCreateError.from(e)}}async verifyJwt(e,t){const{header:n}=(0,Qt.unsafeDecodeJwt)(e),{kid:r,alg:a}=n,o=[];for(const n of this.list({kid:r,alg:a}))try{return{...await n.verifyJwt(e,t),key:n}}catch(e){o.push(e)}switch(o.length){case 0:throw new Jt.JwtVerifyError("No key matched",Jt.ERR_JWKS_NO_MATCHING_KEY);case 1:throw Jt.JwtVerifyError.from(o[0],Jt.ERR_JWT_INVALID);default:throw Jt.JwtVerifyError.from(o,Jt.ERR_JWT_INVALID)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Ht(e,null,t,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:e=>"signAlgorithms"in e,get:e=>e.signAlgorithms},metadata:o},null,a),Ht(e,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:e=>"publicJwks"in e,get:e=>e.publicJwks},metadata:o},null,a),Ht(e,null,r,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:e=>"privateJwks"in e,get:e=>e.privateJwks},metadata:o},null,a),o&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),e})();Kt.Keyset=en,function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(lt,t),r(ut,t),r(pt,t),r(ht,t),r(yt,t),r(Lt,t),r(vt,t),r(Dt,t),r(Kt,t),r(bt,t)}(st);var tn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationDetailsSchema=e.oauthAuthorizationDetailSchema=void 0;const t=je;e.oauthAuthorizationDetailSchema=t.z.object({type:t.z.string(),locations:t.z.array(t.z.string().url()).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}),e.oauthAuthorizationDetailsSchema=t.z.array(e.oauthAuthorizationDetailSchema)}(tn);var nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.oauthClientIdSchema=void 0;const rn=je;nn.oauthClientIdSchema=rn.z.string().min(1);var an={};Object.defineProperty(an,"__esModule",{value:!0}),an.oidcClaimsParameterSchema=void 0;const on=je;an.oidcClaimsParameterSchema=on.z.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]);var sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.oidcClaimsPropertiesSchema=void 0;const ln=je,un=ln.z.union([ln.z.string(),ln.z.number(),ln.z.boolean()]);sn.oidcClaimsPropertiesSchema=ln.z.object({essential:ln.z.boolean().optional(),value:un.optional(),values:ln.z.array(un).optional()});var cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.oidcEntityTypeSchema=void 0;const dn=je;cn.oidcEntityTypeSchema=dn.z.enum(["userinfo","id_token"]),Object.defineProperty(it,"__esModule",{value:!0}),it.oauthAuthenticationRequestParametersSchema=void 0;const fn=st,pn=je,hn=tn,mn=nn,gn=an,yn=sn,vn=cn;it.oauthAuthenticationRequestParametersSchema=pn.z.object({client_id:mn.oauthClientIdSchema,state:pn.z.string().optional(),nonce:pn.z.string().optional(),dpop_jkt:pn.z.string().optional(),response_type:pn.z.enum(["code","token","id_token","none","code token","code id_token","id_token token","code id_token token"]),response_mode:pn.z.enum(["query","fragment","form_post"]).optional(),code_challenge:pn.z.string().optional(),code_challenge_method:pn.z.enum(["S256","plain"]).default("S256").optional(),redirect_uri:pn.z.string().url().optional(),scope:pn.z.string().regex(/^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+)*$/).optional(),max_age:pn.z.number().int().min(0).optional(),claims:pn.z.record(vn.oidcEntityTypeSchema,pn.z.record(gn.oidcClaimsParameterSchema,pn.z.union([pn.z.literal(null),yn.oidcClaimsPropertiesSchema]))).optional(),login_hint:pn.z.string().min(1).optional(),ui_locales:pn.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?( [a-z]{2}(-[A-Z]{2})?)*$/).optional(),id_token_hint:fn.signedJwtSchema.optional(),display:pn.z.enum(["page","popup","touch"]).optional(),prompt:pn.z.enum(["none","login","consent","select_account"]).optional(),authorization_details:hn.oauthAuthorizationDetailsSchema.optional()});var bn={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.oauthIssuerIdentifierSchema=void 0;const wn=je,kn=Te,xn=ze;_n.oauthIssuerIdentifierSchema=wn.z.string().superRefine(((e,t)=>{e.endsWith("/")&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"});const n=(0,xn.safeUrl)(e);if(!n)return t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Invalid url"});"https:"!==n.protocol&&(kn.ALLOW_UNSECURE_ORIGINS&&"http:"===n.protocol||t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer must be an HTTPS URL"})),(n.username||n.password)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),(n.hash||n.search)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"});e!==("/"===n.pathname?n.origin:n.href)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"})})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema=void 0;const t=je,n=_n;e.oauthAuthorizationServerMetadataSchema=t.z.object({issuer:n.oauthIssuerIdentifierSchema,claims_supported:t.z.array(t.z.string()).optional(),claims_locales_supported:t.z.array(t.z.string()).optional(),claims_parameter_supported:t.z.boolean().optional(),request_parameter_supported:t.z.boolean().optional(),request_uri_parameter_supported:t.z.boolean().optional(),require_request_uri_registration:t.z.boolean().optional(),scopes_supported:t.z.array(t.z.string()).optional(),subject_types_supported:t.z.array(t.z.string()).optional(),response_types_supported:t.z.array(t.z.string()).optional(),response_modes_supported:t.z.array(t.z.string()).optional(),grant_types_supported:t.z.array(t.z.string()).optional(),code_challenge_methods_supported:t.z.array(t.z.string()).min(1).optional(),ui_locales_supported:t.z.array(t.z.string()).optional(),id_token_signing_alg_values_supported:t.z.array(t.z.string()).optional(),display_values_supported:t.z.array(t.z.string()).optional(),request_object_signing_alg_values_supported:t.z.array(t.z.string()).optional(),authorization_response_iss_parameter_supported:t.z.boolean().optional(),authorization_details_types_supported:t.z.array(t.z.string()).optional(),request_object_encryption_alg_values_supported:t.z.array(t.z.string()).optional(),request_object_encryption_enc_values_supported:t.z.array(t.z.string()).optional(),jwks_uri:t.z.string().url().optional(),authorization_endpoint:t.z.string().url(),token_endpoint:t.z.string().url(),token_endpoint_auth_methods_supported:t.z.array(t.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),revocation_endpoint:t.z.string().url().optional(),revocation_endpoint_auth_methods_supported:t.z.array(t.z.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),introspection_endpoint:t.z.string().url().optional(),introspection_endpoint_auth_methods_supported:t.z.array(t.z.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),pushed_authorization_request_endpoint:t.z.string().url().optional(),pushed_authorization_request_endpoint_auth_methods_supported:t.z.array(t.z.string()).optional(),pushed_authorization_request_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),require_pushed_authorization_requests:t.z.boolean().optional(),userinfo_endpoint:t.z.string().url().optional(),end_session_endpoint:t.z.string().url().optional(),registration_endpoint:t.z.string().url().optional(),dpop_signing_alg_values_supported:t.z.array(t.z.string()).optional(),protected_resources:t.z.array(t.z.string().url()).optional(),client_id_metadata_document_supported:t.z.boolean().optional()}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema.superRefine(((e,n)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&n.addIssue({code:t.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})})).superRefine(((e,n)=>{e.response_types_supported&&(e.response_types_supported.includes("code")||n.addIssue({code:t.z.ZodIssueCode.custom,message:'Response type "code" is required'}))}))}(bn);var Sn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthClientCredentialsSchema=e.oauthClientCredentialsSecretPostSchema=e.oauthClientCredentialsJwtBearerSchema=void 0;const t=je,n=st,r=nn,a=Te;e.oauthClientCredentialsJwtBearerSchema=t.z.object({client_id:r.oauthClientIdSchema,client_assertion_type:t.z.literal(a.CLIENT_ASSERTION_TYPE_JWT_BEARER),client_assertion:n.signedJwtSchema}),e.oauthClientCredentialsSecretPostSchema=t.z.object({client_id:r.oauthClientIdSchema,client_secret:t.z.string()}),e.oauthClientCredentialsSchema=t.z.union([e.oauthClientCredentialsJwtBearerSchema,e.oauthClientCredentialsSecretPostSchema])}(Sn);var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.oauthClientIdentificationSchema=void 0;const En=je,Tn=nn,zn=Sn;Cn.oauthClientIdentificationSchema=En.z.union([zn.oauthClientCredentialsSchema,En.z.object({client_id:Tn.oauthClientIdSchema})]);var In={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.oauthEndpointAuthMethod=void 0;const jn=je;Pn.oauthEndpointAuthMethod=jn.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]);var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.oauthGrantTypeSchema=void 0;const On=je;Nn.oauthGrantTypeSchema=On.z.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]);var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.oauthResponseTypeSchema=void 0;const Zn=je;Rn.oauthResponseTypeSchema=Zn.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),Object.defineProperty(In,"__esModule",{value:!0}),In.oauthClientMetadataSchema=void 0;const An=st,Ln=je,Dn=nn,Mn=Pn,Un=Nn,Fn=Rn;In.oauthClientMetadataSchema=Ln.z.object({redirect_uris:Ln.z.array(Ln.z.string().url()).nonempty(),response_types:Ln.z.array(Fn.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:Ln.z.array(Un.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:Ln.z.string().optional(),token_endpoint_auth_method:Mn.oauthEndpointAuthMethod.default("none").optional(),token_endpoint_auth_signing_alg:Ln.z.string().optional(),introspection_endpoint_auth_method:Mn.oauthEndpointAuthMethod.optional(),introspection_endpoint_auth_signing_alg:Ln.z.string().optional(),revocation_endpoint_auth_method:Mn.oauthEndpointAuthMethod.optional(),revocation_endpoint_auth_signing_alg:Ln.z.string().optional(),pushed_authorization_request_endpoint_auth_method:Mn.oauthEndpointAuthMethod.optional(),pushed_authorization_request_endpoint_auth_signing_alg:Ln.z.string().optional(),userinfo_signed_response_alg:Ln.z.string().optional(),userinfo_encrypted_response_alg:Ln.z.string().optional(),jwks_uri:Ln.z.string().url().optional(),jwks:An.jwksPubSchema.optional(),application_type:Ln.z.enum(["web","native"]).default("web").optional(),subject_type:Ln.z.enum(["public","pairwise"]).default("public").optional(),request_object_signing_alg:Ln.z.string().optional(),id_token_signed_response_alg:Ln.z.string().optional(),authorization_signed_response_alg:Ln.z.string().default("RS256").optional(),authorization_encrypted_response_enc:Ln.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:Ln.z.string().optional(),client_id:Dn.oauthClientIdSchema.optional(),client_name:Ln.z.string().optional(),client_uri:Ln.z.string().url().optional(),policy_uri:Ln.z.string().url().optional(),tos_uri:Ln.z.string().url().optional(),logo_uri:Ln.z.string().url().optional(),default_max_age:Ln.z.number().optional(),require_auth_time:Ln.z.boolean().optional(),contacts:Ln.z.array(Ln.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:Ln.z.boolean().optional(),dpop_bound_access_tokens:Ln.z.boolean().optional(),authorization_details_types:Ln.z.array(Ln.z.string()).optional()});var $n={};Object.defineProperty($n,"__esModule",{value:!0});var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.oauthParResponseSchema=void 0;const Bn=je;Vn.oauthParResponseSchema=Bn.z.object({request_uri:Bn.z.string()});var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.oauthProtectedResourceMetadataSchema=void 0;const Kn=je,qn=_n;Wn.oauthProtectedResourceMetadataSchema=Kn.z.object({resource:Kn.z.string().url(),authorization_servers:Kn.z.array(qn.oauthIssuerIdentifierSchema).optional(),jwks_uri:Kn.z.string().url().optional(),scopes_supported:Kn.z.array(Kn.z.string()).optional(),bearer_methods_supported:Kn.z.array(Kn.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:Kn.z.array(Kn.z.string()).optional(),resource_documentation:Kn.z.string().url().optional(),resource_policy_uri:Kn.z.string().url().optional(),resource_tos_uri:Kn.z.string().url().optional()});var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.oauthResponseModeSchema=void 0;const Jn=je;Hn.oauthResponseModeSchema=Jn.z.enum(["query","fragment","form_post"]);var Qn={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.oauthTokenTypeSchema=void 0;const Gn=je;Yn.oauthTokenTypeSchema=Gn.z.union([Gn.z.string().regex(/^DPoP$/i).transform((()=>"DPoP")),Gn.z.string().regex(/^Bearer$/i).transform((()=>"Bearer"))]),Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.oauthTokenResponseSchema=void 0;const Xn=st,er=je,tr=tn,nr=Yn;function rr({url:e,proto:t=!1,host:n=!0,path:r=!1,query:a=!1,hash:o=!1,as:i="span",...s}){const c=l.useMemo((()=>new URL(e)),[e]);return u.jsxs(i,{...s,children:[t&&u.jsx(ar,{value:`${c.protocol}//`,...!0===t?null:t}),n&&u.jsx(ar,{value:c.host,...!0===n?{faded:!1,bold:!0}:n}),r&&u.jsx(ar,{value:c.pathname,...!0===r?null:r}),a&&u.jsx(ar,{value:c.search,...!0===a?null:a}),o&&u.jsx(ar,{value:c.hash,...!0===o?null:o})]})}function ar({value:e,faded:t=!0,bold:n=!1}){const r=n?"b":"span";return u.jsx(r,{className:t?"opacity-50":"",children:e})}function or({clientId:e,clientMetadata:t,as:n="span",...r}){return Ee.isOAuthClientIdLoopback(e)?u.jsx(n,{...r,children:"An application on your device"}):Ee.isOAuthClientIdDiscoverable(e)?u.jsx(rr,{as:n,...r,url:e,proto:!0,path:!0}):u.jsx(n,{...r,children:t.client_name||e})}function ir({clientId:e,clientMetadata:t,as:n="span",...r}){return t.client_name?u.jsx(n,{...r,children:t.client_name}):u.jsx(or,{clientId:e,clientMetadata:t,as:n,...r})}Qn.oauthTokenResponseSchema=er.z.object({access_token:er.z.string(),token_type:nr.oauthTokenTypeSchema,issuer:er.z.string().url().optional(),sub:er.z.string().optional(),scope:er.z.string().optional(),id_token:Xn.signedJwtSchema.optional(),refresh_token:er.z.string().optional(),expires_in:er.z.number().optional(),authorization_details:tr.oauthAuthorizationDetailsSchema.optional()}).passthrough(),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(Te,t),r(ze,t),r(Pe,t),r(Je,t),r(nt,t),r(Qe,t),r(it,t),r(tn,t),r(bn,t),r(Sn,t),r(nn,t),r(Cn,t),r(In,t),r(Pn,t),r($n,t),r(Nn,t),r(_n,t),r(Vn,t),r(Wn,t),r(Hn,t),r(Rn,t),r(Qn,t),r(Yn,t),r(an,t),r(sn,t),r(cn,t)}(Ee);const sr=e=>function(t){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t,children:u.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:e})})},lr=sr("M11.14 4.494a.995.995 0 0 1 1.72 0l7.001 12.008a.996.996 0 0 1-.86 1.498H4.999a.996.996 0 0 1-.86-1.498L11.14 4.494Zm3.447-1.007c-1.155-1.983-4.019-1.983-5.174 0L2.41 15.494C1.247 17.491 2.686 20 4.998 20h14.004c2.312 0 3.751-2.509 2.587-4.506L14.587 3.487ZM13 9.019a1 1 0 1 0-2 0v2.994a1 1 0 1 0 2 0V9.02Zm-1 4.731a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Z"),ur=l.forwardRef((({className:e,icon:t,append:n,children:r,...a},o)=>u.jsxs("div",{ref:o,className:C("pl-1 pr-2","min-h-12","flex items-center justify-stretch","rounded-lg","text-gray-700","dark:text-gray-100",e),...a,children:[u.jsx("div",{className:C("self-start shrink-0 grow-0","w-8 h-12","flex items-center justify-center","text-gray-500"),children:t}),u.jsx("div",{className:"flex-auto relative",children:r}),n&&u.jsx("div",{className:"grow-0 shrink-0",children:n})]})));function cr({children:e,className:t,role:n="alert",...r}){return u.jsx(ur,{className:C("alert"===n?"bg-error":"bg-gray-100 dark:bg-slate-800",t),icon:u.jsx(lr,{className:C("fill-current h-4 w-4","alert"===n?"text-white":"text-brand")}),...r,children:u.jsx("div",{className:C("py-2 overflow-hidden","alert"===n?"text-white":void 0),children:e})})}const dr=l.forwardRef((({actions:e,cancel:t,append:n,className:r,children:a,error:o,...i},s)=>u.jsxs("form",{ref:s,className:C("flex flex-col py-4 space-y-4",r),...i,children:[u.jsx("div",{className:"space-y-4",children:a}),n&&u.jsx("div",{children:n},"append"),o&&u.jsx(cr,{role:"alert",children:o},"error"),(e||t)&&u.jsxs("div",{className:"flex flex-wrap flex-row-reverse items-center justify-end space-x-reverse space-x-2",children:[e,u.jsx("div",{className:"flex-auto"}),t]},"buttons")]}))),fr=l.forwardRef((({title:e,children:t,...n},r)=>u.jsxs("fieldset",{ref:r,...n,children:[e&&u.jsx("p",{className:"mb-1 text-slate-600 dark:text-slate-400 text-sm font-medium",children:e},"title"),u.jsx("div",{className:"flex flex-col space-y-4",children:t})]})));function pr({account:e,clientId:t,clientMetadata:n,clientTrusted:r,onAccept:a,acceptLabel:o="Accept",onReject:i,rejectLabel:s="Deny access",onBack:l,backLabel:c="Back",...d}){return u.jsx(dr,{onSubmit:e=>{e.preventDefault(),a()},cancel:l&&u.jsx(Ce,{onClick:l,children:c}),actions:u.jsxs(u.Fragment,{children:[u.jsx(Ce,{type:"submit",color:"brand",children:o}),u.jsx(Ce,{onClick:i,children:s})]}),...d,children:u.jsxs(fr,{title:u.jsx(ir,{clientId:t,clientMetadata:n}),children:[r&&n.logo_uri&&u.jsx("div",{className:"flex items-center justify-center",children:u.jsx("img",{crossOrigin:"anonymous",src:n.logo_uri,alt:n.client_name,className:"w-16 h-16 rounded-full"})},"logo"),u.jsxs("p",{children:[u.jsx(or,{clientId:t,clientMetadata:n})," ","is asking for permission to access your"," ",u.jsx(Se,{account:e})," account."]}),u.jsxs("p",{children:["By clicking ",u.jsx("b",{children:o}),", you allow this application to access your information in accordance to their"," ",u.jsx("a",{href:n.tos_uri,rel:"nofollow noopener",target:"_blank",className:"text-brand underline",children:"terms of service"})," and ",u.jsx("a",{href:n.policy_uri,rel:"nofollow noopener",target:"_blank",className:"text-brand underline",children:"privacy policy"}),"."]})]})})}function hr({clientId:e,clientMetadata:t,clientTrusted:n,session:r,onAccept:a,onReject:o,onBack:i}){const{account:s}=r;return u.jsx(E,{title:"Authorize",subtitle:u.jsxs(u.Fragment,{children:["Grant access to your"," ",u.jsx("b",{className:"text-black dark:text-white",children:s.preferred_username||s.email||s.sub})," ","account"]}),children:u.jsx(pr,{clientId:e,clientMetadata:t,clientTrusted:n,account:s,onBack:i,onAccept:a,onReject:o})})}const mr=sr("M12 4a8 8 0 1 0 4.21 14.804 1 1 0 0 1 1.054 1.7A9.958 9.958 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 1.104-.27 2.31-.949 3.243-.716.984-1.849 1.6-3.331 1.465a4.207 4.207 0 0 1-2.93-1.585c-.94 1.21-2.388 1.94-3.985 1.715-2.53-.356-4.04-2.91-3.682-5.458.358-2.547 2.514-4.586 5.044-4.23.905.127 1.68.536 2.286 1.126a1 1 0 0 1 1.964.368l-.515 3.545v.002a2.222 2.222 0 0 0 1.999 2.526c.75.068 1.212-.21 1.533-.65.358-.493.566-1.245.566-2.067a8 8 0 0 0-8-8Zm-.112 5.13c-1.195-.168-2.544.819-2.784 2.529-.24 1.71.784 3.03 1.98 3.198 1.195.168 2.543-.819 2.784-2.529.24-1.71-.784-3.03-1.98-3.198Z"),gr=sr("M8.293 3.293a1 1 0 0 1 1.414 0l8 8a1 1 0 0 1 0 1.414l-8 8a1 1 0 0 1-1.414-1.414L15.586 12 8.293 4.707a1 1 0 0 1 0-1.414Z"),yr=l.forwardRef((({className:e,onFocus:t,icon:n,onBlur:r,...a},o)=>{const[i,s]=l.useState(!1);return u.jsx(ur,{ref:o,className:C("bg-gray-100 has-[:focus]:bg-slate-200","dark:bg-slate-800 dark:has-[:focus]:bg-slate-700","outline-none","border-solid border-2 border-transparent hover:border-gray-400 has-[:focus]:border-brand hover:has-[:focus]:border-brand","dark:hover:border-gray-500",e),onFocus:e=>{t?.(e),e.defaultPrevented||s(!0)},onBlur:e=>{r?.(e),e.defaultPrevented||s(!1)},icon:u.jsx("div",{className:i?"text-brand":void 0,children:n}),...a})}));function vr({accounts:e,onAccount:t,accountAria:n=(e=>`Sign in as ${e.name}`),onOther:r,otherLabel:a="Another account",otherAria:o="Login to account that is not listed",onBack:i,backAria:s,backLabel:l=s,...c}){return u.jsx(dr,{...c,cancel:i&&u.jsx(Ce,{onClick:i,"aria-label":s,children:l}),children:u.jsxs(fr,{title:"Sign in as...",children:[e.map((e=>{const[r,a]=[e.name,e.preferred_username,e.email,e.sub].filter(Boolean);return u.jsx(yr,{onClick:()=>t(e),role:"button","aria-label":n(e),icon:e.picture?u.jsx("img",{crossOrigin:"anonymous",src:e.picture,alt:r,className:"-ml-1 w-6 h-6 rounded-full"}):u.jsxs("svg",{className:"-ml-1 w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"none",children:[u.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#0070ff"}),u.jsx("circle",{cx:"12",cy:"9.5",r:"3.5",fill:"#fff"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",fill:"#fff",d:"M 12.058 22.784 C 9.422 22.784 7.007 21.836 5.137 20.262 C 5.667 17.988 8.534 16.25 11.99 16.25 C 15.494 16.25 18.391 18.036 18.864 20.357 C 17.01 21.874 14.64 22.784 12.058 22.784 Z"})]}),append:u.jsx(gr,{className:"h-4"}),children:u.jsxs("span",{className:"flex flex-wrap items-center",children:[u.jsx("span",{className:"font-medium truncate mr-2",children:r}),a&&u.jsx("span",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate",children:a})]})},e.sub)})),r&&u.jsx(yr,{onClick:r,"aria-label":o,role:"button",append:u.jsx(gr,{className:"h-4"}),icon:u.jsx(mr,{className:"h-4"}),children:u.jsx("span",{className:"truncate text-gray-700 dark:text-gray-400",children:a})})]})})}const br=sr("M7 7a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h1V7Zm-1 4v9h12v-9H6Zm9-2H9V7a3 3 0 1 1 6 0v2Zm-3 4a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z"),_r=()=>Math.random().toString(36).slice(2);function wr({id:e,children:t,className:n,...r}){const[a]=l.useState(_r),o=l.useRef(null),i=l.useRef(null);return u.jsx(yr,{id:e,ref:o,icon:u.jsx("input",{...r,ref:i,id:a,className:"text-brand outline-none",type:"checkbox"}),className:n,onClick:e=>{e.target!==o.current||e.defaultPrevented||(i.current?.click(),i.current?.focus())},children:u.jsx("label",{htmlFor:a,className:"block w-full leading-[1.6]",children:t})})}const kr=l.forwardRef((({className:e,icon:t,children:n,onFocus:r,onBlur:a,...o},i)=>{const[s,c]=l.useState(!1),d=l.useRef(null);l.useImperativeHandle(i,(()=>d.current),[]);const f=l.useCallback((e=>{d.current!==e.target&&(e.preventDefault(),e.stopPropagation(),d.current?.focus())}),[]),p=l.useCallback((e=>{s&&e.target!==d.current&&(e.preventDefault(),e.stopPropagation())}),[s]);return u.jsxs(yr,{icon:t,className:e,onClick:f,onMouseDown:p,children:[u.jsx("input",{ref:d,className:"w-full bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder-gray-500",onFocus:e=>{c(!0),r?.(e)},onBlur:e=>{c(!1),a?.(e)},...o}),n]})})),xr=sr("M4 5.5a.5.5 0 0 0-.5.5v2.535a.5.5 0 0 0 .25.433A3.498 3.498 0 0 1 5.5 12a3.498 3.498 0 0 1-1.75 3.032.5.5 0 0 0-.25.433V18a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5v-2.535a.5.5 0 0 0-.25-.433A3.498 3.498 0 0 1 18.5 12a3.5 3.5 0 0 1 1.75-3.032.5.5 0 0 0 .25-.433V6a.5.5 0 0 0-.5-.5H4ZM2.5 6A1.5 1.5 0 0 1 4 4.5h16A1.5 1.5 0 0 1 21.5 6v3.17a.5.5 0 0 1-.333.472 2.501 2.501 0 0 0 0 4.716.5.5 0 0 1 .333.471V18a1.5 1.5 0 0 1-1.5 1.5H4A1.5 1.5 0 0 1 2.5 18v-3.17a.5.5 0 0 1 .333-.472 2.501 2.501 0 0 0 0-4.716.5.5 0 0 1-.333-.471V6Zm12 2a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Zm0 4a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Zm0 4a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Z");function Sr({onSubmit:e,submitAria:t="Next",submitLabel:n=t,onCancel:r,cancelAria:a="Cancel",cancelLabel:o=a,accountSection:i="Account",sessionSection:s="Session",secondFactorSection:c="2FA Confirmation",usernameDefault:d="",usernameReadonly:f=!1,usernameLabel:p="Username or email address",usernameAria:h=p,usernamePlaceholder:m=p,usernamePattern:g,usernameFormat:y="valid email address or username",passwordLabel:v="Password",passwordAria:b=v,passwordPlaceholder:_=v,passwordPattern:w,passwordFormat:k="non empty string",passwordWarning:x=u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"font-bold text-brand leading-8",children:"Warning"}),u.jsx("p",{children:"Please verify the domain name of the website before entering your password. Never enter your password on a domain you do not trust."})]}),secondFactorLabel:S="Confirmation code",secondFactorAria:E=S,secondFactorPlaceholder:T=S,secondFactorPattern:z="^[A-Z0-9]{5}-[A-Z0-9]{5}$",secondFactorFormat:I="XXXXX-XXXXX",secondFactorHint:P="Check your $1 email for a login code and enter it here.",rememberVisible:j=!0,rememberDefault:N=!1,rememberLabel:O="Remember this account on this device",rememberAria:R=O,...Z}){const[A,L]=l.useState(!1),[D,M]=l.useState(!1),[U,F]=l.useState(null),[$,V]=l.useState(null),B=l.useCallback((()=>{F(null),V(null)}),[]),W=null!=U,K=l.useCallback((async t=>{t.preventDefault();const n={username:t.currentTarget.username.value,password:t.currentTarget.password.value,remember:t.currentTarget.remember?.checked};if(U){const e=t.currentTarget.secondFactor;if(!e)throw new Error("Second factor input not found");n[U.type]=e.value}M(!0),V(null);try{await e(n)}catch(e){e instanceof be?F({type:e.type,hint:e.hint}):V(function(e){if(e instanceof ve)return"Invalid username or password";return"An unknown error occurred"}(e))}finally{M(!1)}}),[U,e]);return u.jsxs(dr,{onSubmit:K,error:$,cancel:r&&u.jsx(Ce,{"aria-label":a,onClick:r,children:o}),actions:u.jsx(Ce,{color:"brand",type:"submit","aria-label":t,loading:D,children:n}),...Z,children:[u.jsxs(fr,{title:i,disabled:D,children:[u.jsx(kr,{icon:u.jsx(mr,{className:"w-5"}),name:"username",type:"text",onChange:B,placeholder:m,"aria-label":h,autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,defaultValue:d,readOnly:f,disabled:f,pattern:g,title:y}),u.jsx(kr,{icon:u.jsx(br,{className:"w-5"}),name:"password",type:"password",onChange:B,onFocus:()=>L(!0),onBlur:()=>setTimeout(L,100,!1),placeholder:_,"aria-label":b,autoCapitalize:"none",autoCorrect:"off",autoComplete:"current-password",dir:"auto",enterKeyHint:"done",spellCheck:"false",required:!0,readOnly:W,disabled:W,pattern:w,title:k}),x&&u.jsx("div",{className:C("transition-all delay-300 duration-300 overflow-hidden",A?"max-h-80":"max-h-0 -z-10 !mt-0"),children:u.jsx(cr,{role:"status",children:x})})]}),j&&u.jsx(fr,{title:s,disabled:D,children:u.jsx(wr,{name:"remember",defaultChecked:N,"aria-label":R,children:O})},"remember"),U&&u.jsx(fr,{title:c,disabled:D,children:u.jsxs("div",{children:[u.jsx(kr,{icon:u.jsx(xr,{className:"w-5"}),name:"secondFactor",type:"text",placeholder:T,"aria-label":E,autoCapitalize:"none",autoCorrect:"off",autoComplete:"off",spellCheck:"false",dir:"auto",enterKeyHint:"done",required:!0,pattern:z,title:I,autoFocus:!0}),u.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-sm",children:P.replaceAll("$1",U.hint)})]})},"2fa")]})}function Cr({loginHint:e,sessions:t,setSession:n,onSignIn:r,onBack:a}){const o=l.useMemo((()=>t.find((e=>e.selected))),[t]),i=l.useCallback((()=>n(null)),[n]),s=l.useMemo((()=>t.map((e=>e.account))),[t]),[c,d]=l.useState(0===t.length);return l.useEffect((()=>{o&&d(!1)}),[o]),o?o.loginRequired?u.jsx(E,{title:"Sign in",subtitle:"Confirm your password to continue",children:u.jsx(Sr,{onSubmit:r,onCancel:i,cancelAria:"Back",usernameDefault:o.account.preferred_username||o.account.sub,usernameReadonly:!0,rememberDefault:!0})}):null:e?u.jsx(E,{title:"Sign in",subtitle:"Enter your password",children:u.jsx(Sr,{onSubmit:r,onCancel:a,cancelAria:"Back",usernameDefault:e,usernameReadonly:!0})}):0===t.length?u.jsx(E,{title:"Sign in",subtitle:"Enter your username and password",children:u.jsx(Sr,{onSubmit:r,onCancel:a,cancelAria:"Back"})}):c?u.jsx(E,{title:"Sign in",subtitle:"Enter your username and password",children:u.jsx(Sr,{onSubmit:r,onCancel:()=>d(!1),cancelAria:"Back"})}):u.jsx(E,{title:"Sign in",subtitle:"Select from an existing account",children:u.jsx(vr,{accounts:s,onAccount:e=>n(e.sub),onOther:()=>d(!0),onBack:a,backAria:"Back"})})}function Er({links:e,className:t,...n}){const r=e?.find((e=>"help"===e.rel));return r?u.jsxs("p",{className:C("text-sm rounded-md bg-slate-100 text-slate-800 dark:bg-slate-800 dark:text-slate-400 p-3",t),...n,children:["Having trouble?"," ",u.jsxs("a",{href:r.href,rel:r.rel,target:"_blank",className:"text-brand",children:["Contact ",r.title]})]}):null}function Tr({onSubmit:e,submitAria:t="Next",submitLabel:n=t,onCancel:r,cancelAria:a="Cancel",cancelLabel:o=a,username:i="",usernameLabel:s="Username",usernameAria:c=s,usernamePlaceholder:d=s,usernamePattern:f,usernameTitle:p,passwordLabel:h="Password",passwordAria:m=h,passwordPlaceholder:g=h,passwordPattern:y,passwordTitle:v,children:b,..._}){const[w,k]=l.useState(!1),[x,S]=l.useState(null),C=l.useCallback((async t=>{t.preventDefault();const n={username:t.currentTarget.username.value,password:t.currentTarget.password.value};k(!0),S(null);try{await e(n)}catch(e){S(function(e){if("Invalid credentials"===e?.message)return"Invalid username or password";return console.error(e),"An unknown error occurred"}(e))}finally{k(!1)}}),[e,S,k]);return u.jsx(dr,{append:b,error:x,onSubmit:C,cancel:r&&u.jsx(Ce,{"aria-label":a,onClick:r,children:o}),actions:u.jsx(Ce,{color:"brand",type:"submit","aria-label":t,disabled:w,children:n}),..._,children:u.jsxs(fr,{disabled:w,children:[u.jsxs("label",{className:"text-sm font-medium block",children:[u.jsx("p",{children:s}),u.jsxs("div",{className:"relative flex flex-wrap items-center justify-stretch rounded-md border border-solid border-slate-200 dark:border-slate-700 text-neutral-700 dark:text-neutral-100",children:[u.jsx("span",{className:"w-6 ml-1 text-center text-base",children:"@"}),u.jsx("input",{name:"username",type:"text",onChange:()=>S(null),className:"relative m-1 block w-[1px] min-w-0 flex-auto leading-[1.6] bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder:text-neutral-100 disabled:text-gray-500",placeholder:d,"aria-label":c,autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,defaultValue:i,pattern:f,title:p})]})]}),u.jsxs("label",{className:"text-sm font-medium block",children:[u.jsx("p",{children:h}),u.jsxs("div",{className:"relative flex flex-wrap items-center justify-stretch rounded-md border border-solid border-slate-200 dark:border-slate-700 text-neutral-700 dark:text-neutral-100",children:[u.jsx("span",{className:"w-6 ml-1 text-center text-2xl font-light -mb-2",children:"*"}),u.jsx("input",{name:"password",type:"password",onChange:()=>S(null),className:"relative m-1 block w-[1px] min-w-0 flex-auto leading-[1.6] bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder:text-neutral-100",placeholder:g,"aria-label":m,autoCapitalize:"none",autoCorrect:"off",autoComplete:"new-password",dir:"auto",enterKeyHint:"done",spellCheck:"false",required:!0,pattern:y,title:v})]})]})]})})}function zr({links:e,className:t,...n}){const r=e?.filter((e=>"privacy-policy"===e.rel||"terms-of-service"===e.rel));return u.jsxs("p",{className:C("text-sm text-slate-500",t),...n,children:["By creating an account you agree to the"," ",r&&r.length?r.map(((e,t,n)=>u.jsxs("span",{children:[t>0&&(t<n.length-1?", ":" and "),u.jsx("a",{href:e.href,rel:e.rel,target:"_blank",className:"text-brand underline",children:e.title})]},t))):"Terms of Service and Privacy Policy","."]})}function Ir({stepName:e=((e,t)=>`Step ${e} of ${t}`),stepTitle:t=((e,t)=>1===e?"Your account":null),links:n,onSignUp:r,onBack:a}){const[o,i]=l.useState(null),[s,c]=l.useState(1),d=l.useCallback((e=>{i(e),c(2)}),[r,i,c]);return u.jsx(E,{title:"Create Account",subtitle:"We're so excited to have you join us!",children:u.jsxs("div",{className:"flex flex-col",children:[u.jsx("p",{className:"mt-4 text-slate-400 dark:text-slate-600",children:e(s,2)}),u.jsx("h2",{className:"font-medium text-xl mb-4",children:t(s,2)}),1===s&&u.jsx(Tr,{className:"flex-grow",onSubmit:d,onCancel:a,cancelLabel:"Back",children:u.jsx(zr,{links:n})}),2===s&&u.jsx(Ce,{onClick:()=>c(1),children:"Back"}),u.jsx(Er,{className:"mb-4",links:n})]})})}function Pr({name:e,logo:t,logoAlt:n=e||"Logo",links:r,children:a,className:o,...i}){return u.jsxs("div",{className:C("min-h-screen w-full","flex items-center justify-center flex-col","bg-white text-slate-900","dark:bg-slate-900 dark:text-slate-100",o),...i,children:[u.jsxs("div",{className:"w-full max-w-screen-sm overflow-hidden flex-grow flex flex-col items-center justify-center",children:[t&&u.jsx("img",{src:t,alt:n,className:"w-16 h-16 md:w-24 md:h-24 mb-8"}),e&&u.jsx("h1",{className:"text-2xl md:text-4xl mb-8 mx-4 text-center font-bold",children:e}),a]}),null!=r&&r.length>0&&u.jsx("nav",{className:"w-full max-w-screen-sm overflow-hidden mt-4 border-t border-t-slate-200 dark:border-t-slate-700 flex flex-wrap justify-center",children:r.map((e=>u.jsx("a",{href:e.href,rel:e.rel,target:"_blank",className:"m-2 md:m-4 text-xs md:text-sm text-brand hover:underline",children:e.title},e.href)))})]})}function jr({onSignUp:e,signUpLabel:t="Create a new account",onSignIn:n,signInLabel:r="Sign in",onCancel:a,cancelLabel:o="Cancel",...i}){return u.jsxs(Pr,{...i,children:[e&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",color:n?"brand":void 0,onClick:e,children:t}),n&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",color:e?void 0:"brand",onClick:n,children:r}),a&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",onClick:a,children:o})]})}function Nr({authorizeData:e,customizationData:t}){const n=null!=e?.loginHint,[r,a]=l.useState(n?"sign-in":"welcome"),o=xe(a,"done"),i=xe(a,"sign-in"),s=xe(a,"accept"),c=xe(a,"welcome"),{sessions:d,setSession:f,doAccept:p,doReject:h,doSignIn:m,doSignUp:g}=ke(e,{onRedirected:o}),y=d.find((e=>e.selected&&!e.loginRequired));return l.useEffect((()=>{y&&(y.consentRequired?s():p(y.account))}),[y,p,s]),"welcome"===r?u.jsx(jr,{name:t?.name,logo:t?.logo,links:t?.links,onSignIn:i,onCancel:h}):"sign-up"===r?u.jsx(Ir,{links:t?.links,onSignUp:g,onBack:c}):"sign-in"===r?u.jsx(Cr,{loginHint:e.loginHint,sessions:d,setSession:f,onSignIn:m,onBack:n?h:c}):"accept"===r&&y?u.jsx(hr,{session:y,clientId:e.clientId,clientMetadata:e.clientMetadata,clientTrusted:e.clientTrusted,onAccept:()=>p(y.account),onReject:h,onBack:n?void 0:()=>{f(null),a(d.length?"sign-in":"welcome")}}):u.jsx(E,{title:"Login complete",children:"You are being redirected..."})}function Or({errorData:e,customizationData:t,...n}){return u.jsx(Pr,{...t,...n,children:u.jsx(cr,{role:"alert",children:Rr(e)})})}function Rr(e){const t=e?.error_description;return"This request has expired"===t||t?.startsWith("Unknown request_uri")?"This sign-in session has expired":t||"An unknown error occurred"}const{authorizeData:Zr}=y;if(Zr){const e=new URL(window.location.href);"/oauth/authorize"!==e.pathname||e.searchParams.has("request_uri")||(e.search="",e.searchParams.set("client_id",Zr.clientId),e.searchParams.set("request_uri",Zr.requestUri),window.history.replaceState(history.state,"",e.pathname+e.search))}x(document.getElementById("root")).render(u.jsx((function({authorizeData:e,customizationData:t,errorData:n}){return e&&!n?u.jsx(Nr,{customizationData:t,authorizeData:e}):u.jsx(Or,{customizationData:t,errorData:n})}),{...y}))}();
|
19
|
+
*/!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),v.exports=function(){if(y)return b;y=1;var e=l,t=k();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function o(e,t){i(e,t),i(e+"Capture",t)}function i(e,t){for(a[e]=t,e=0;e<t.length;e++)r.add(t[e])}var s=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,c=/^[: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]*$/,d={},f={};function p(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){h[e]=new p(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];h[t]=new p(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){h[e]=new p(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){h[e]=new p(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){h[e]=new p(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){h[e]=new p(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){h[e]=new p(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){h[e]=new p(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){h[e]=new p(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function v(e,t,n,r){var a=h.hasOwnProperty(t)?h[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!u.call(f,e)||!u.call(d,e)&&(c.test(e)?f[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(m,g);h[t]=new p(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(m,g);h[t]=new p(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(m,g);h[t]=new p(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new p(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new p(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),I=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),Z=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Z&&e[Z]||e["@@iterator"])?e:null}var L,D=Object.assign;function M(e){if(void 0===L)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var U=!1;function F(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(1!==i||1!==s)do{if(i--,0>--s||a[i]!==o[s]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?M(e):""}function $(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case E:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case z:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return V(e(t))}catch(e){}}return null}function B(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=(e=t.render).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 V(t);case 8:return t===C?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function H(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&H(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ae(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ie(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,fe=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return de(e,t)}))}:de);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={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},me=["Webkit","ms","Moz","O"];function ye(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ye(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(he).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ve=D({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 be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ce=null;function Ee(e){if(e=ga(e)){if("function"!=typeof xe)throw Error(n(280));var t=e.stateNode;t&&(t=ba(t),xe(e.stateNode,e.type,t))}}function Te(e){Se?Ce?Ce.push(e):Ce=[e]:Se=e}function Ie(){if(Se){var e=Se,t=Ce;if(Ce=Se=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function ze(e,t){return e(t)}function Pe(){}var je=!1;function Ne(e,t,n){if(je)return e(t,n);je=!0;try{return ze(e,t,n)}finally{je=!1,(null!==Se||null!==Ce)&&(Pe(),Ie())}}function Oe(e,t){var r=e.stateNode;if(null===r)return null;var a=ba(r);if(null===a)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Re=!1;if(s)try{var Ze={};Object.defineProperty(Ze,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Ze,Ze),window.removeEventListener("test",Ze,Ze)}catch(de){Re=!1}function Ae(e,t,n,r,a,o,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Le=!1,De=null,Me=!1,Ue=null,Fe={onError:function(e){Le=!0,De=e}};function $e(e,t,n,r,a,o,i,s,l){Le=!1,De=null,Ae.apply(Fe,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Be(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(Ve(e)!==e)throw Error(n(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,a=t;;){var o=r.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(a=o.return)){r=a;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return We(o),e;if(i===a)return We(o),t;i=i.sibling}throw Error(n(188))}if(r.return!==a.return)r=o,a=i;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,a=i;break}if(l===a){s=!0,a=o,r=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===r){s=!0,r=i,a=o;break}if(l===a){s=!0,a=i,r=o;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==a)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Je=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Qe=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Ge=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,at=t.unstable_IdlePriority,ot=null,it=null,st=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(lt(e)/ut|0)|0},lt=Math.log,ut=Math.LN2,ct=64,dt=4194304;function ft(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~a;0!==s?r=ft(s):0!=(o&=i)&&(r=ft(o))}else 0!=(i=n&~a)?r=ft(i):0!==o&&(r=ft(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-st(t)),r|=e[n],t&=~a;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;default:return-1}}function mt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function yt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var _t=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var kt,xt,St,Ct,Et,Tt=!1,It=[],zt=null,Pt=null,jt=null,Nt=new Map,Ot=new Map,Rt=[],Zt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function At(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Lt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&null!==(t=ga(t))&&xt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function Dt(e){var t=ya(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Be(n)))return e.blockedOn=t,void Et(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ga(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Ut(e,t,n){Mt(e)&&n.delete(t)}function Ft(){Tt=!1,null!==zt&&Mt(zt)&&(zt=null),null!==Pt&&Mt(Pt)&&(Pt=null),null!==jt&&Mt(jt)&&(jt=null),Nt.forEach(Ut),Ot.forEach(Ut)}function $t(e,n){e.blockedOn===n&&(e.blockedOn=null,Tt||(Tt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ft)))}function Vt(e){function t(t){return $t(t,e)}if(0<It.length){$t(It[0],e);for(var n=1;n<It.length;n++){var r=It[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==zt&&$t(zt,e),null!==Pt&&$t(Pt,e),null!==jt&&$t(jt,e),Nt.forEach(t),Ot.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)Dt(n),null===n.blockedOn&&Rt.shift()}var Bt=_.ReactCurrentBatchConfig,Wt=!0;function Kt(e,t,n,r){var a=_t,o=Bt.transition;Bt.transition=null;try{_t=1,Jt(e,t,n,r)}finally{_t=a,Bt.transition=o}}function qt(e,t,n,r){var a=_t,o=Bt.transition;Bt.transition=null;try{_t=4,Jt(e,t,n,r)}finally{_t=a,Bt.transition=o}}function Jt(e,t,n,r){if(Wt){var a=Qt(e,t,n,r);if(null===a)$r(e,t,r,Ht,n),At(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return zt=Lt(zt,e,t,n,r,a),!0;case"dragenter":return Pt=Lt(Pt,e,t,n,r,a),!0;case"mouseover":return jt=Lt(jt,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Nt.set(o,Lt(Nt.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Ot.set(o,Lt(Ot.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(At(e,r),4&t&&-1<Zt.indexOf(e)){for(;null!==a;){var o=ga(a);if(null!==o&&kt(o),null===(o=Qt(e,t,n,r))&&$r(e,t,r,Ht,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Ht=null;function Qt(e,t,n,r){if(Ht=null,null!==(e=ya(e=ke(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Be(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ht=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case at:return 536870912;default:return 16}default:return 16}}var Gt=null,Xt=null,en=null;function tn(){if(en)return en;var e,t,n=Xt,r=n.length,a="value"in Gt?Gt.value:Gt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return en=a.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function an(){return!1}function on(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?rn:an,this.isPropagationStopped=an,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var sn,ln,un,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(cn),fn=D({},cn,{view:0,detail:0}),pn=on(fn),hn=D({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(sn=e.screenX-un.screenX,ln=e.screenY-un.screenY):ln=sn=0,un=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=on(hn),yn=on(D({},hn,{dataTransfer:0})),gn=on(D({},fn,{relatedTarget:0})),vn=on(D({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=on(D({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=on(D({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Cn(){return Sn}var En=on(D({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tn=on(D({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=on(D({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),zn=on(D({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=on(D({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),jn=[9,13,27,32],Nn=s&&"CompositionEvent"in window,On=null;s&&"documentMode"in document&&(On=document.documentMode);var Rn=s&&"TextEvent"in window&&!On,Zn=s&&(!Nn||On&&8<On&&11>=On),An=String.fromCharCode(32),Ln=!1;function Dn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Fn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function Vn(e,t,n,r){Te(r),0<(t=Br(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bn=null,Wn=null;function Kn(e){Ar(e,0)}function qn(e){if(J(va(e)))return e}function Jn(e,t){if("change"===e)return t}var Hn=!1;if(s){var Qn;if(s){var Yn="oninput"in document;if(!Yn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),Yn="function"==typeof Gn.oninput}Qn=Yn}else Qn=!1;Hn=Qn&&(!document.documentMode||9<document.documentMode)}function Xn(){Bn&&(Bn.detachEvent("onpropertychange",er),Wn=Bn=null)}function er(e){if("value"===e.propertyName&&qn(Wn)){var t=[];Vn(t,Wn,e,ke(e)),Ne(Kn,t)}}function tr(e,t,n){"focusin"===e?(Xn(),Wn=n,(Bn=t).attachEvent("onpropertychange",er)):"focusout"===e&&Xn()}function nr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(Wn)}function rr(e,t){if("click"===e)return qn(t)}function ar(e,t){if("input"===e||"change"===e)return qn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ir(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!u.call(t,a)||!or(e[a],t[a]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function cr(){for(var e=window,t=H();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=H((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=cr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&dr(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=lr(n,o);var i=lr(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pr=s&&"documentMode"in document&&11>=document.documentMode,hr=null,mr=null,yr=null,gr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==hr||hr!==H(r)||(r="selectionStart"in(r=hr)&&dr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&ir(yr,r)||(yr=r,0<(r=Br(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},wr={},kr={};function xr(e){if(wr[e])return wr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return wr[e]=n[t];return e}s&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Sr=xr("animationend"),Cr=xr("animationiteration"),Er=xr("animationstart"),Tr=xr("transitionend"),Ir=new Map,zr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Ir.set(e,t),o(t,[e])}for(var jr=0;jr<zr.length;jr++){var Nr=zr[jr];Pr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Pr(Sr,"onAnimationEnd"),Pr(Cr,"onAnimationIteration"),Pr(Er,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Tr,"onTransitionEnd"),i("onMouseEnter",["mouseout","mouseover"]),i("onMouseLeave",["mouseout","mouseover"]),i("onPointerEnter",["pointerout","pointerover"]),i("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Zr(e,t,r){var a=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,a,o,i,s,l,u){if($e.apply(this,arguments),Le){if(!Le)throw Error(n(198));var c=De;Le=!1,De=null,Me||(Me=!0,Ue=c)}}(a,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&a.isPropagationStopped())break e;Zr(a,s,u),o=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==o&&a.isPropagationStopped())break e;Zr(a,s,u),o=l}}}if(Me)throw e=Ue,Me=!1,Ue=null,e}function Lr(e,t){var n=t[pa];void 0===n&&(n=t[pa]=new Set);var r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}function Dr(e,t,n){var r=0;t&&(r|=4),Fr(n,e,r,t)}var Mr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Mr]){e[Mr]=!0,r.forEach((function(t){"selectionchange"!==t&&(Rr.has(t)||Dr(t,!1,e),Dr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Mr]||(t[Mr]=!0,Dr("selectionchange",!1,t))}}function Fr(e,t,n,r){switch(Yt(t)){case 1:var a=Kt;break;case 4:a=qt;break;default:a=Jt}n=a.bind(null,t,n,e),a=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,a){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===a||8===s.nodeType&&s.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===a||8===l.nodeType&&l.parentNode===a))return;i=i.return}for(;null!==s;){if(null===(i=ya(s)))return;if(5===(l=i.tag)||6===l){r=o=i;continue e}s=s.parentNode}}r=r.return}Ne((function(){var r=o,a=ke(n),i=[];e:{var s=Ir.get(e);if(void 0!==s){var l=dn,u=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Sr:case Cr:case Er:l=vn;break;case Tr:l=zn;break;case"scroll":l=pn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&null!=(m=Oe(h,f))&&c.push(Vr(h,m,p))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,a),i.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!ya(u)&&!u[fa])&&(l||s)&&(s=a.window===a?a:(s=a.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?ya(u):null)&&(u!==(d=Ve(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=mn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:va(l),p=null==u?s:va(u),(s=new c(m,h+"leave",l,n,a)).target=d,s.relatedTarget=p,m=null,ya(a)===r&&((c=new c(f,h+"enter",u,n,a)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Wr(p))h++;for(p=0,m=f;m;m=Wr(m))p++;for(;0<h-p;)c=Wr(c),h--;for(;0<p-h;)f=Wr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Wr(c),f=Wr(f)}c=null}else c=null;null!==l&&Kr(i,s,l,c,!1),null!==u&&null!==d&&Kr(i,d,u,c,!0)}if("select"===(l=(s=r?va(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var y=Jn;else if($n(s))if(Hn)y=ar;else{y=nr;var g=tr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=rr);switch(y&&(y=y(e,r))?Vn(i,y,n,a):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&te(s,"number",s.value)),g=r?va(r):window,e){case"focusin":($n(g)||"true"===g.contentEditable)&&(hr=g,mr=r,yr=null);break;case"focusout":yr=mr=hr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(i,n,a);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":vr(i,n,a)}var v;if(Nn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Dn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Zn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(v=tn()):(Xt="value"in(Gt=a)?Gt.value:Gt.textContent,Un=!0)),0<(g=Br(r,b)).length&&(b=new _n(b,e,null,n,a),i.push({event:b,listeners:g}),(v||null!==(v=Mn(n)))&&(b.data=v))),(v=Rn?function(e,t){switch(e){case"compositionend":return Mn(t);case"keypress":return 32!==t.which?null:(Ln=!0,An);case"textInput":return(e=t.data)===An&&Ln?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Nn&&Dn(e,t)?(e=tn(),en=Xt=Gt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Br(r,"onBeforeInput")).length&&(a=new _n("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v)}Ar(i,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Oe(e,n))&&r.unshift(Vr(e,o,a)),null!=(o=Oe(e,t))&&r.push(Vr(e,o,a))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,a?null!=(l=Oe(n,o))&&i.unshift(Vr(n,l,s)):a||null!=(l=Oe(n,o))&&i.push(Vr(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var qr=/\r\n?/g,Jr=/\u0000|\uFFFD/g;function Hr(e){return("string"==typeof e?e:""+e).replace(qr,"\n").replace(Jr,"")}function Qr(e,t,r){if(t=Hr(t),Hr(e)!==t&&r)throw Error(n(425))}function Yr(){}var Gr=null,Xr=null;function ea(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ta="function"==typeof setTimeout?setTimeout:void 0,na="function"==typeof clearTimeout?clearTimeout:void 0,ra="function"==typeof Promise?Promise:void 0,aa="function"==typeof queueMicrotask?queueMicrotask:void 0!==ra?function(e){return ra.resolve(null).then(e).catch(oa)}:ta;function oa(e){setTimeout((function(){throw e}))}function ia(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void Vt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);Vt(t)}function sa(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function la(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ua=Math.random().toString(36).slice(2),ca="__reactFiber$"+ua,da="__reactProps$"+ua,fa="__reactContainer$"+ua,pa="__reactEvents$"+ua,ha="__reactListeners$"+ua,ma="__reactHandles$"+ua;function ya(e){var t=e[ca];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fa]||n[ca]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=la(e);null!==e;){if(n=e[ca])return n;e=la(e)}return t}n=(e=n).parentNode}return null}function ga(e){return!(e=e[ca]||e[fa])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function va(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function ba(e){return e[da]||null}var _a=[],wa=-1;function ka(e){return{current:e}}function xa(e){0>wa||(e.current=_a[wa],_a[wa]=null,wa--)}function Sa(e,t){wa++,_a[wa]=e.current,e.current=t}var Ca={},Ea=ka(Ca),Ta=ka(!1),Ia=Ca;function za(e,t){var n=e.type.contextTypes;if(!n)return Ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pa(e){return null!=e.childContextTypes}function ja(){xa(Ta),xa(Ea)}function Na(e,t,r){if(Ea.current!==Ca)throw Error(n(168));Sa(Ea,t),Sa(Ta,r)}function Oa(e,t,r){var a=e.stateNode;if(t=t.childContextTypes,"function"!=typeof a.getChildContext)return r;for(var o in a=a.getChildContext())if(!(o in t))throw Error(n(108,B(e)||"Unknown",o));return D({},r,a)}function Ra(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ca,Ia=Ea.current,Sa(Ea,e),Sa(Ta,Ta.current),!0}function Za(e,t,r){var a=e.stateNode;if(!a)throw Error(n(169));r?(e=Oa(e,t,Ia),a.__reactInternalMemoizedMergedChildContext=e,xa(Ta),xa(Ea),Sa(Ea,e)):xa(Ta),Sa(Ta,r)}var Aa=null,La=!1,Da=!1;function Ma(e){null===Aa?Aa=[e]:Aa.push(e)}function Ua(){if(!Da&&null!==Aa){Da=!0;var e=0,t=_t;try{var n=Aa;for(_t=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Aa=null,La=!1}catch(t){throw null!==Aa&&(Aa=Aa.slice(e+1)),Je(et,Ua),t}finally{_t=t,Da=!1}}return null}var Fa=[],$a=0,Va=null,Ba=0,Wa=[],Ka=0,qa=null,Ja=1,Ha="";function Qa(e,t){Fa[$a++]=Ba,Fa[$a++]=Va,Va=e,Ba=t}function Ya(e,t,n){Wa[Ka++]=Ja,Wa[Ka++]=Ha,Wa[Ka++]=qa,qa=e;var r=Ja;e=Ha;var a=32-st(r)-1;r&=~(1<<a),n+=1;var o=32-st(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Ja=1<<32-st(t)+a|n<<a|r,Ha=o+e}else Ja=1<<o|n<<a|r,Ha=e}function Ga(e){null!==e.return&&(Qa(e,1),Ya(e,1,0))}function Xa(e){for(;e===Va;)Va=Fa[--$a],Fa[$a]=null,Ba=Fa[--$a],Fa[$a]=null;for(;e===qa;)qa=Wa[--Ka],Wa[Ka]=null,Ha=Wa[--Ka],Wa[Ka]=null,Ja=Wa[--Ka],Wa[Ka]=null}var eo=null,to=null,no=!1,ro=null;function ao(e,t){var n=zu(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,eo=e,to=sa(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,eo=e,to=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qa?{id:Ja,overflow:Ha}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=zu(18,null,null,0)).stateNode=t,n.return=e,e.child=n,eo=e,to=null,!0);default:return!1}}function io(e){return!(!(1&e.mode)||128&e.flags)}function so(e){if(no){var t=to;if(t){var r=t;if(!oo(e,t)){if(io(e))throw Error(n(418));t=sa(r.nextSibling);var a=eo;t&&oo(e,t)?ao(a,r):(e.flags=-4097&e.flags|2,no=!1,eo=e)}}else{if(io(e))throw Error(n(418));e.flags=-4097&e.flags|2,no=!1,eo=e}}}function lo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;eo=e}function uo(e){if(e!==eo)return!1;if(!no)return lo(e),no=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ea(e.type,e.memoizedProps)),t&&(t=to)){if(io(e))throw co(),Error(n(418));for(;t;)ao(e,t),t=sa(t.nextSibling)}if(lo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){to=sa(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}to=null}}else to=eo?sa(e.stateNode.nextSibling):null;return!0}function co(){for(var e=to;e;)e=sa(e.nextSibling)}function fo(){to=eo=null,no=!1}function po(e){null===ro?ro=[e]:ro.push(e)}var ho=_.ReactCurrentBatchConfig;function mo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var a=r.stateNode}if(!a)throw Error(n(147,e));var o=a,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function go(e){return(0,e._init)(e._payload)}function vo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function a(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=ju(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Zu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===O&&go(a)===t.type)?((r=o(t,n.props)).ref=mo(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=mo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Au(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Ou(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Zu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=mo(e,null,t),n.return=e,n;case x:return(t=Au(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(ne(t)||A(t))return(t=Ou(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===a?u(e,t,n,r):null;case x:return n.key===a?c(e,t,n,r):null;case O:return p(e,t,(a=n._init)(n._payload),r)}if(ne(n)||A(n))return null!==a?null:d(e,t,n,r,null);yo(e,n)}return null}function h(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case O:return h(e,t,n,(0,r._init)(r._payload),a)}if(ne(r)||A(r))return d(t,e=e.get(n)||null,r,a,null);yo(t,r)}return null}function m(n,o,s,l){for(var u=null,c=null,d=o,m=o=0,y=null;null!==d&&m<s.length;m++){d.index>m?(y=d,d=null):y=d.sibling;var g=p(n,d,s[m],l);if(null===g){null===d&&(d=y);break}e&&d&&null===g.alternate&&t(n,d),o=i(g,o,m),null===c?u=g:c.sibling=g,c=g,d=y}if(m===s.length)return r(n,d),no&&Qa(n,m),u;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(o=i(d,o,m),null===c?u=d:c.sibling=d,c=d);return no&&Qa(n,m),u}for(d=a(n,d);m<s.length;m++)null!==(y=h(d,n,m,s[m],l))&&(e&&null!==y.alternate&&d.delete(null===y.key?m:y.key),o=i(y,o,m),null===c?u=y:c.sibling=y,c=y);return e&&d.forEach((function(e){return t(n,e)})),no&&Qa(n,m),u}function y(o,s,l,u){var c=A(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(151));for(var d=c=null,m=s,y=s=0,g=null,v=l.next();null!==m&&!v.done;y++,v=l.next()){m.index>y?(g=m,m=null):g=m.sibling;var b=p(o,m,v.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=i(b,s,y),null===d?c=b:d.sibling=b,d=b,m=g}if(v.done)return r(o,m),no&&Qa(o,y),c;if(null===m){for(;!v.done;y++,v=l.next())null!==(v=f(o,v.value,u))&&(s=i(v,s,y),null===d?c=v:d.sibling=v,d=v);return no&&Qa(o,y),c}for(m=a(o,m);!v.done;y++,v=l.next())null!==(v=h(m,o,y,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?y:v.key),s=i(v,s,y),null===d?c=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(o,e)})),no&&Qa(o,y),c}return function e(n,a,i,l){if("object"==typeof i&&null!==i&&i.type===S&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case w:e:{for(var u=i.key,c=a;null!==c;){if(c.key===u){if((u=i.type)===S){if(7===c.tag){r(n,c.sibling),(a=o(c,i.props.children)).return=n,n=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===O&&go(u)===c.type){r(n,c.sibling),(a=o(c,i.props)).ref=mo(n,c,i),a.return=n,n=a;break e}r(n,c);break}t(n,c),c=c.sibling}i.type===S?((a=Ou(i.props.children,n.mode,l,i.key)).return=n,n=a):((l=Nu(i.type,i.key,i.props,null,n.mode,l)).ref=mo(n,a,i),l.return=n,n=l)}return s(n);case x:e:{for(c=i.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){r(n,a.sibling),(a=o(a,i.children||[])).return=n,n=a;break e}r(n,a);break}t(n,a),a=a.sibling}(a=Au(i,n.mode,l)).return=n,n=a}return s(n);case O:return e(n,a,(c=i._init)(i._payload),l)}if(ne(i))return m(n,a,i,l);if(A(i))return y(n,a,i,l);yo(n,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(r(n,a.sibling),(a=o(a,i)).return=n,n=a):(r(n,a),(a=Zu(i,n.mode,l)).return=n,n=a),s(n)):r(n,a)}}var bo=vo(!0),_o=vo(!1),wo=ka(null),ko=null,xo=null,So=null;function Co(){So=xo=ko=null}function Eo(e){var t=wo.current;xa(wo),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Io(e,t){ko=e,So=xo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(gs=!0),e.firstContext=null)}function zo(e){var t=e._currentValue;if(So!==e)if(e={context:e,memoizedValue:t,next:null},null===xo){if(null===ko)throw Error(n(308));xo=e,ko.dependencies={lanes:0,firstContext:e}}else xo=xo.next=e;return t}var Po=null;function jo(e){null===Po?Po=[e]:Po.push(e)}function No(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,jo(t)):(n.next=a.next,a.next=n),t.interleaved=n,Oo(e,r)}function Oo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ro=!1;function Zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Do(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&El){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Oo(e,n)}return null===(a=r.interleaved)?(t.next=t,jo(r)):(t.next=a.next,a.next=t),r.interleaved=t,Oo(e,n)}function Mo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var a=e.updateQueue;Ro=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?o=u:i.next=u,i=l;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l)}if(null!==o){var d=a.baseState;for(i=0,c=u=l=null,s=o;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=D({},d,f);break e;case 2:Ro=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=a.shared.pending))break;s=(f=s).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(l=d),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);Rl|=i,e.lanes=i,e.memoizedState=d}}function $o(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var a=e[t],o=a.callback;if(null!==o){if(a.callback=null,a=r,"function"!=typeof o)throw Error(n(191,o));o.call(a)}}}var Vo={},Bo=ka(Vo),Wo=ka(Vo),Ko=ka(Vo);function qo(e){if(e===Vo)throw Error(n(174));return e}function Jo(e,t){switch(Sa(Ko,t),Sa(Wo,e),Sa(Bo,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}xa(Bo),Sa(Bo,t)}function Ho(){xa(Bo),xa(Wo),xa(Ko)}function Qo(e){qo(Ko.current);var t=qo(Bo.current),n=ue(t,e.type);t!==n&&(Sa(Wo,e),Sa(Bo,n))}function Yo(e){Wo.current===e&&(xa(Bo),xa(Wo))}var Go=ka(0);function Xo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ei=[];function ti(){for(var e=0;e<ei.length;e++)ei[e]._workInProgressVersionPrimary=null;ei.length=0}var ni=_.ReactCurrentDispatcher,ri=_.ReactCurrentBatchConfig,ai=0,oi=null,ii=null,si=null,li=!1,ui=!1,ci=0,di=0;function fi(){throw Error(n(321))}function pi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function hi(e,t,r,a,o,i){if(ai=i,oi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ni.current=null===e||null===e.memoizedState?Yi:Gi,e=r(a,o),ui){i=0;do{if(ui=!1,ci=0,25<=i)throw Error(n(301));i+=1,si=ii=null,t.updateQueue=null,ni.current=Xi,e=r(a,o)}while(ui)}if(ni.current=Qi,t=null!==ii&&null!==ii.next,ai=0,si=ii=oi=null,li=!1,t)throw Error(n(300));return e}function mi(){var e=0!==ci;return ci=0,e}function yi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===si?oi.memoizedState=si=e:si=si.next=e,si}function gi(){if(null===ii){var e=oi.alternate;e=null!==e?e.memoizedState:null}else e=ii.next;var t=null===si?oi.memoizedState:si.next;if(null!==t)si=t,ii=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ii=e).memoizedState,baseState:ii.baseState,baseQueue:ii.baseQueue,queue:ii.queue,next:null},null===si?oi.memoizedState=si=e:si=si.next=e}return si}function vi(e,t){return"function"==typeof t?t(e):t}function bi(e){var t=gi(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var a=ii,o=a.baseQueue,i=r.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}a.baseQueue=o=i,r.pending=null}if(null!==o){i=o.next,a=a.baseState;var l=s=null,u=null,c=i;do{var d=c.lane;if((ai&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),a=c.hasEagerState?c.eagerState:e(a,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=a):u=u.next=f,oi.lanes|=d,Rl|=d}c=c.next}while(null!==c&&c!==i);null===u?s=a:u.next=l,or(a,t.memoizedState)||(gs=!0),t.memoizedState=a,t.baseState=s,t.baseQueue=u,r.lastRenderedState=a}if(null!==(e=r.interleaved)){o=e;do{i=o.lane,oi.lanes|=i,Rl|=i,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function _i(e){var t=gi(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var a=r.dispatch,o=r.pending,i=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);or(i,t.memoizedState)||(gs=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),r.lastRenderedState=i}return[i,a]}function wi(){}function ki(e,t){var r=oi,a=gi(),o=t(),i=!or(a.memoizedState,o);if(i&&(a.memoizedState=o,gs=!0),a=a.queue,Ri(Ci.bind(null,r,a,e),[e]),a.getSnapshot!==t||i||null!==si&&1&si.memoizedState.tag){if(r.flags|=2048,zi(9,Si.bind(null,r,a,o,t),void 0,null),null===Tl)throw Error(n(349));30&ai||xi(r,t,o)}return o}function xi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oi.updateQueue)?(t={lastEffect:null,stores:null},oi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Si(e,t,n,r){t.value=n,t.getSnapshot=r,Ei(t)&&Ti(e)}function Ci(e,t,n){return n((function(){Ei(t)&&Ti(e)}))}function Ei(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Ti(e){var t=Oo(e,1);null!==t&&eu(t,e,1,-1)}function Ii(e){var t=yi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Ki.bind(null,oi,e),[t.memoizedState,e]}function zi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=oi.updateQueue)?(t={lastEffect:null,stores:null},oi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Pi(){return gi().memoizedState}function ji(e,t,n,r){var a=yi();oi.flags|=e,a.memoizedState=zi(1|t,n,void 0,void 0===r?null:r)}function Ni(e,t,n,r){var a=gi();r=void 0===r?null:r;var o=void 0;if(null!==ii){var i=ii.memoizedState;if(o=i.destroy,null!==r&&pi(r,i.deps))return void(a.memoizedState=zi(t,n,o,r))}oi.flags|=e,a.memoizedState=zi(1|t,n,o,r)}function Oi(e,t){return ji(8390656,8,e,t)}function Ri(e,t){return Ni(2048,8,e,t)}function Zi(e,t){return Ni(4,2,e,t)}function Ai(e,t){return Ni(4,4,e,t)}function Li(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Di(e,t,n){return n=null!=n?n.concat([e]):null,Ni(4,4,Li.bind(null,t,e),n)}function Mi(){}function Ui(e,t){var n=gi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fi(e,t){var n=gi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&pi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $i(e,t,n){return 21&ai?(or(n,t)||(n=yt(),oi.lanes|=n,Rl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gs=!0),e.memoizedState=n)}function Vi(e,t){var n=_t;_t=0!==n&&4>n?n:4,e(!0);var r=ri.transition;ri.transition={};try{e(!1),t()}finally{_t=n,ri.transition=r}}function Bi(){return gi().memoizedState}function Wi(e,t,n){var r=Xl(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qi(e)?Ji(t,n):null!==(n=No(e,t,n,r))&&(eu(n,e,r,Gl()),Hi(n,t,r))}function Ki(e,t,n){var r=Xl(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qi(e))Ji(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,or(s,i)){var l=t.interleaved;return null===l?(a.next=a,jo(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(e){}null!==(n=No(e,t,a,r))&&(eu(n,e,r,a=Gl()),Hi(n,t,r))}}function qi(e){var t=e.alternate;return e===oi||null!==t&&t===oi}function Ji(e,t){ui=li=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hi(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Qi={readContext:zo,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useInsertionEffect:fi,useLayoutEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useMutableSource:fi,useSyncExternalStore:fi,useId:fi,unstable_isNewReconciler:!1},Yi={readContext:zo,useCallback:function(e,t){return yi().memoizedState=[e,void 0===t?null:t],e},useContext:zo,useEffect:Oi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ji(4194308,4,Li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ji(4194308,4,e,t)},useInsertionEffect:function(e,t){return ji(4,2,e,t)},useMemo:function(e,t){var n=yi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yi();return t=void 0!==n?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=Wi.bind(null,oi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},yi().memoizedState=e},useState:Ii,useDebugValue:Mi,useDeferredValue:function(e){return yi().memoizedState=e},useTransition:function(){var e=Ii(!1),t=e[0];return e=Vi.bind(null,e[1]),yi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var a=oi,o=yi();if(no){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Tl)throw Error(n(349));30&ai||xi(a,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,Oi(Ci.bind(null,a,i,e),[e]),a.flags|=2048,zi(9,Si.bind(null,a,i,r,t),void 0,null),r},useId:function(){var e=yi(),t=Tl.identifierPrefix;if(no){var n=Ha;t=":"+t+"R"+(n=(Ja&~(1<<32-st(Ja)-1)).toString(32)+n),0<(n=ci++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=di++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gi={readContext:zo,useCallback:Ui,useContext:zo,useEffect:Ri,useImperativeHandle:Di,useInsertionEffect:Zi,useLayoutEffect:Ai,useMemo:Fi,useReducer:bi,useRef:Pi,useState:function(){return bi(vi)},useDebugValue:Mi,useDeferredValue:function(e){return $i(gi(),ii.memoizedState,e)},useTransition:function(){return[bi(vi)[0],gi().memoizedState]},useMutableSource:wi,useSyncExternalStore:ki,useId:Bi,unstable_isNewReconciler:!1},Xi={readContext:zo,useCallback:Ui,useContext:zo,useEffect:Ri,useImperativeHandle:Di,useInsertionEffect:Zi,useLayoutEffect:Ai,useMemo:Fi,useReducer:_i,useRef:Pi,useState:function(){return _i(vi)},useDebugValue:Mi,useDeferredValue:function(e){var t=gi();return null===ii?t.memoizedState=e:$i(t,ii.memoizedState,e)},useTransition:function(){return[_i(vi)[0],gi().memoizedState]},useMutableSource:wi,useSyncExternalStore:ki,useId:Bi,unstable_isNewReconciler:!1};function es(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ts(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ns={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gl(),a=Xl(e),o=Lo(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,a))&&(eu(t,e,a,r),Mo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gl(),a=Xl(e),o=Lo(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,a))&&(eu(t,e,a,r),Mo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gl(),r=Xl(e),a=Lo(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Do(e,a,r))&&(eu(t,e,r,n),Mo(t,e,r))}};function rs(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!(t.prototype&&t.prototype.isPureReactComponent&&ir(n,r)&&ir(a,o))}function as(e,t,n){var r=!1,a=Ca,o=t.contextType;return"object"==typeof o&&null!==o?o=zo(o):(a=Pa(t)?Ia:Ea.current,o=(r=null!=(r=t.contextTypes))?za(e,a):Ca),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ns,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function os(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ns.enqueueReplaceState(t,t.state,null)}function is(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Zo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=zo(o):(o=Pa(t)?Ia:Ea.current,a.context=za(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(ts(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&ns.enqueueReplaceState(a,a.state,null),Fo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function ss(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,digest:null}}function ls(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var cs="function"==typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$l||($l=!0,Vl=r),us(0,t)},n}function fs(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){us(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){us(0,t),"function"!=typeof r&&(null===Bl?Bl=new Set([this]):Bl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ps(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new cs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=xu.bind(null,e,t,n),t.then(e,e))}function hs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,r,a){return 1&e.mode?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Do(n,t,1))),n.lanes|=1),e)}var ys=_.ReactCurrentOwner,gs=!1;function vs(e,t,n,r){t.child=null===e?_o(t,null,n,r):bo(t,e.child,n,r)}function bs(e,t,n,r,a){n=n.render;var o=t.ref;return Io(t,a),r=hi(e,t,n,r,o,a),n=mi(),null===e||gs?(no&&n&&Ga(t),t.flags|=1,vs(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$s(e,t,a))}function _s(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||Pu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ws(e,t,o,r,a))}if(o=e.child,!(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:ir)(i,r)&&e.ref===t.ref)return $s(e,t,a)}return t.flags|=1,(e=ju(o,r)).ref=t.ref,e.return=t,t.child=e}function ws(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(ir(o,r)&&e.ref===t.ref){if(gs=!1,t.pendingProps=r=o,!(e.lanes&a))return t.lanes=e.lanes,$s(e,t,a);131072&e.flags&&(gs=!0)}}return Ss(e,t,n,r,a)}function ks(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Sa(jl,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Sa(jl,Pl),Pl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Sa(jl,Pl),Pl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Sa(jl,Pl),Pl|=r;return vs(e,t,a,n),t.child}function xs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,a){var o=Pa(n)?Ia:Ea.current;return o=za(t,o),Io(t,a),n=hi(e,t,n,r,o,a),r=mi(),null===e||gs?(no&&r&&Ga(t),t.flags|=1,vs(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$s(e,t,a))}function Cs(e,t,n,r,a){if(Pa(n)){var o=!0;Ra(t)}else o=!1;if(Io(t,a),null===t.stateNode)Fs(e,t),as(t,n,r),is(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;u="object"==typeof u&&null!==u?zo(u):za(t,u=Pa(n)?Ia:Ea.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&os(t,i,r,u),Ro=!1;var f=t.memoizedState;i.state=f,Fo(t,r,i,a),l=t.memoizedState,s!==r||f!==l||Ta.current||Ro?("function"==typeof c&&(ts(t,n,c,r),l=t.memoizedState),(s=Ro||rs(t,n,s,r,f,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ao(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:es(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l="object"==typeof(l=n.contextType)&&null!==l?zo(l):za(t,l=Pa(n)?Ia:Ea.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&os(t,i,r,l),Ro=!1,f=t.memoizedState,i.state=f,Fo(t,r,i,a);var h=t.memoizedState;s!==d||f!==h||Ta.current||Ro?("function"==typeof p&&(ts(t,n,p,r),h=t.memoizedState),(u=Ro||rs(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Es(e,t,n,r,o,a)}function Es(e,t,n,r,a,o){xs(e,t);var i=!!(128&t.flags);if(!r&&!i)return a&&Za(t,n,!1),$s(e,t,o);r=t.stateNode,ys.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=bo(t,e.child,null,o),t.child=bo(t,null,s,o)):vs(e,t,s,o),t.memoizedState=r.state,a&&Za(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Na(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Na(0,t.context,!1),Jo(e,t.containerInfo)}function Is(e,t,n,r,a){return fo(),po(a),t.flags|=256,vs(e,t,n,r),t.child}var zs,Ps,js,Ns,Os={dehydrated:null,treeContext:null,retryLane:0};function Rs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zs(e,t,r){var a,o=t.pendingProps,i=Go.current,s=!1,l=!!(128&t.flags);if((a=l)||(a=(null===e||null!==e.memoizedState)&&!!(2&i)),a?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Sa(Go,1&i),null===e)return so(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Ru(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Ou(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Rs(r),t.memoizedState=Os,e):As(t,l));if(null!==(i=e.memoizedState)&&null!==(a=i.dehydrated))return function(e,t,r,a,o,i,s){if(r)return 256&t.flags?(t.flags&=-257,Ls(e,t,s,a=ls(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=a.fallback,o=t.mode,a=Ru({mode:"visible",children:a.children},o,0,null),(i=Ou(i,o,s,null)).flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,1&t.mode&&bo(t,e.child,null,s),t.child.memoizedState=Rs(s),t.memoizedState=Os,i);if(!(1&t.mode))return Ls(e,t,s,null);if("$!"===o.data){if(a=o.nextSibling&&o.nextSibling.dataset)var l=a.dgst;return a=l,Ls(e,t,s,a=ls(i=Error(n(419)),a,void 0))}if(l=!!(s&e.childLanes),gs||l){if(null!==(a=Tl)){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(a.suspendedLanes|s)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Oo(e,o),eu(a,e,o,-1))}return pu(),Ls(e,t,s,a=ls(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,to=sa(o.nextSibling),eo=t,no=!0,ro=null,null!==e&&(Wa[Ka++]=Ja,Wa[Ka++]=Ha,Wa[Ka++]=qa,Ja=e.id,Ha=e.overflow,qa=t),(t=As(t,a.children)).flags|=4096,t)}(e,t,l,o,a,i,r);if(s){s=o.fallback,l=t.mode,a=(i=e.child).sibling;var u={mode:"hidden",children:o.children};return 1&l||t.child===i?(o=ju(i,u)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null),null!==a?s=ju(a,s):(s=Ou(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Rs(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Os,o}return e=(s=e.child).sibling,o=ju(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function As(e,t){return(t=Ru({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ls(e,t,n,r){return null!==r&&po(r),bo(t,e.child,null,n),(e=As(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ds(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function Ms(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Us(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(vs(e,t,r.children,n),2&(r=Go.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ds(e,n,t);else if(19===e.tag)Ds(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Sa(Go,r),1&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Xo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ms(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Xo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ms(t,!0,n,null,o);break;case"together":Ms(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Fs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $s(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Rl|=t.lanes,!(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=ju(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=ju(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Vs(e,t){if(!no)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ws(e,t,r){var o=t.pendingProps;switch(Xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bs(t),null;case 1:case 17:return Pa(t.type)&&ja(),Bs(t),null;case 3:return o=t.stateNode,Ho(),xa(Ta),xa(Ea),ti(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(uo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ro&&(au(ro),ro=null))),Ps(e,t),Bs(t),null;case 5:Yo(t);var i=qo(Ko.current);if(r=t.type,null!==e&&null!=t.stateNode)js(e,t,r,o,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Bs(t),null}if(e=qo(Bo.current),uo(t)){o=t.stateNode,r=t.type;var s=t.memoizedProps;switch(o[ca]=t,o[da]=s,e=!!(1&t.mode),r){case"dialog":Lr("cancel",o),Lr("close",o);break;case"iframe":case"object":case"embed":Lr("load",o);break;case"video":case"audio":for(i=0;i<Or.length;i++)Lr(Or[i],o);break;case"source":Lr("error",o);break;case"img":case"image":case"link":Lr("error",o),Lr("load",o);break;case"details":Lr("toggle",o);break;case"input":Y(o,s),Lr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",o);break;case"textarea":oe(o,s),Lr("invalid",o)}for(var l in be(r,s),i=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?o.textContent!==u&&(!0!==s.suppressHydrationWarning&&Qr(o.textContent,u,e),i=["children",u]):"number"==typeof u&&o.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Qr(o.textContent,u,e),i=["children",""+u]):a.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Lr("scroll",o)}switch(r){case"input":q(o),ee(o,s,!0);break;case"textarea":q(o),se(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=Yr)}o=i,t.updateQueue=o,null!==o&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(r,{is:o.is}):(e=l.createElement(r),"select"===r&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,r),e[ca]=t,e[da]=o,zs(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(r,o),r){case"dialog":Lr("cancel",e),Lr("close",e),i=o;break;case"iframe":case"object":case"embed":Lr("load",e),i=o;break;case"video":case"audio":for(i=0;i<Or.length;i++)Lr(Or[i],e);i=o;break;case"source":Lr("error",e),i=o;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),i=o;break;case"details":Lr("toggle",e),i=o;break;case"input":Y(e,o),i=Q(e,o),Lr("invalid",e);break;case"option":default:i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=D({},o,{value:void 0}),Lr("invalid",e);break;case"textarea":oe(e,o),i=ae(e,o),Lr("invalid",e)}for(s in be(r,i),u=i)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ge(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===s?"string"==typeof c?("textarea"!==r||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=c&&"onScroll"===s&&Lr("scroll",e):null!=c&&v(e,s,c,l))}switch(r){case"input":q(e),ee(e,o,!1);break;case"textarea":q(e),se(e);break;case"option":null!=o.value&&e.setAttribute("value",""+W(o.value));break;case"select":e.multiple=!!o.multiple,null!=(s=o.value)?re(e,!!o.multiple,s,!1):null!=o.defaultValue&&re(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Yr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Bs(t),null;case 6:if(e&&null!=t.stateNode)Ns(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=qo(Ko.current),qo(Bo.current),uo(t)){if(o=t.stateNode,r=t.memoizedProps,o[ca]=t,(s=o.nodeValue!==r)&&null!==(e=eo))switch(e.tag){case 3:Qr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(o.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[ca]=t,t.stateNode=o}return Bs(t),null;case 13:if(xa(Go),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(no&&null!==to&&1&t.mode&&!(128&t.flags))co(),fo(),t.flags|=98560,s=!1;else if(s=uo(t),null!==o&&null!==o.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[ca]=t}else fo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Bs(t),s=!1}else null!==ro&&(au(ro),ro=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Go.current?0===Nl&&(Nl=3):pu())),null!==t.updateQueue&&(t.flags|=4),Bs(t),null);case 4:return Ho(),Ps(e,t),null===e&&Ur(t.stateNode.containerInfo),Bs(t),null;case 10:return Eo(t.type._context),Bs(t),null;case 19:if(xa(Go),null===(s=t.memoizedState))return Bs(t),null;if(o=!!(128&t.flags),null===(l=s.rendering))if(o)Vs(s,!1);else{if(0!==Nl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=Xo(e))){for(t.flags|=128,Vs(s,!1),null!==(o=l.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Sa(Go,1&Go.current|2),t.child}e=e.sibling}null!==s.tail&&Ge()>Ul&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Xo(l))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Vs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!no)return Bs(t),null}else 2*Ge()-s.renderingStartTime>Ul&&1073741824!==r&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ge(),t.sibling=null,r=Go.current,Sa(Go,o?1&r|2:1&r),t):(Bs(t),null);case 22:case 23:return uu(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Pl)&&(Bs(t),6&t.subtreeFlags&&(t.flags|=8192)):Bs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Ks(e,t){switch(Xa(t),t.tag){case 1:return Pa(t.type)&&ja(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ho(),xa(Ta),xa(Ea),ti(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Yo(t),null;case 13:if(xa(Go),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return xa(Go),null;case 4:return Ho(),null;case 10:return Eo(t.type._context),null;case 22:case 23:return uu(),null;default:return null}}zs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},js=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,qo(Bo.current);var i,s=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),s=[];break;case"select":o=D({},o,{value:void 0}),r=D({},r,{value:void 0}),s=[];break;case"textarea":o=ae(e,o),r=ae(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Yr)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var l=o[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(a.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(i in l)!l.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&l[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(a.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Lr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Ns=function(e,t,n,r){n!==r&&(t.flags|=4)};var qs=!1,Js=!1,Hs="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Ys(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){ku(e,t,n)}else n.current=null}function Gs(e,t,n){try{n()}catch(n){ku(e,t,n)}}var Xs=!1;function el(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&Gs(t,n,o)}a=a.next}while(a!==r)}}function tl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 nl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ca],delete t[da],delete t[pa],delete t[ha],delete t[ma]),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 al(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function il(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Yr));else if(4!==r&&null!==(e=e.child))for(il(e,t,n),e=e.sibling;null!==e;)il(e,t,n),e=e.sibling}function sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(sl(e,t,n),e=e.sibling;null!==e;)sl(e,t,n),e=e.sibling}var ll=null,ul=!1;function cl(e,t,n){for(n=n.child;null!==n;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Js||Ys(n,t);case 6:var r=ll,a=ul;ll=null,cl(e,t,n),ul=a,null!==(ll=r)&&(ul?(e=ll,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ll.removeChild(n.stateNode));break;case 18:null!==ll&&(ul?(e=ll,n=n.stateNode,8===e.nodeType?ia(e.parentNode,n):1===e.nodeType&&ia(e,n),Vt(e)):ia(ll,n.stateNode));break;case 4:r=ll,a=ul,ll=n.stateNode.containerInfo,ul=!0,cl(e,t,n),ll=r,ul=a;break;case 0:case 11:case 14:case 15:if(!Js&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(2&o||4&o)&&Gs(n,t,i),a=a.next}while(a!==r)}cl(e,t,n);break;case 1:if(!Js&&(Ys(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ku(n,t,e)}cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:1&n.mode?(Js=(r=Js)||null!==n.memoizedState,cl(e,t,n),Js=r):cl(e,t,n);break;default:cl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Hs),t.forEach((function(t){var r=Eu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function pl(e,t){var r=t.deletions;if(null!==r)for(var a=0;a<r.length;a++){var o=r[a];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ll=l.stateNode,ul=!1;break e;case 3:case 4:ll=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===ll)throw Error(n(160));dl(i,s,o),ll=null,ul=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){ku(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)hl(t,e),t=t.sibling}function hl(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pl(t,e),ml(e),4&a){try{el(3,e,e.return),tl(3,e)}catch(t){ku(e,e.return,t)}try{el(5,e,e.return)}catch(t){ku(e,e.return,t)}}break;case 1:pl(t,e),ml(e),512&a&&null!==r&&Ys(r,r.return);break;case 5:if(pl(t,e),ml(e),512&a&&null!==r&&Ys(r,r.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(t){ku(e,e.return,t)}}if(4&a&&null!=(o=e.stateNode)){var i=e.memoizedProps,s=null!==r?r.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===i.type&&null!=i.name&&G(o,i),_e(l,s);var c=_e(l,i);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ge(o,f):"dangerouslySetInnerHTML"===d?fe(o,f):"children"===d?pe(o,f):v(o,d,f,c)}switch(l){case"input":X(o,i);break;case"textarea":ie(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?re(o,!!i.multiple,h,!1):p!==!!i.multiple&&(null!=i.defaultValue?re(o,!!i.multiple,i.defaultValue,!0):re(o,!!i.multiple,i.multiple?[]:"",!1))}o[da]=i}catch(t){ku(e,e.return,t)}}break;case 6:if(pl(t,e),ml(e),4&a){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(t){ku(e,e.return,t)}}break;case 3:if(pl(t,e),ml(e),4&a&&null!==r&&r.memoizedState.isDehydrated)try{Vt(t.containerInfo)}catch(t){ku(e,e.return,t)}break;case 4:default:pl(t,e),ml(e);break;case 13:pl(t,e),ml(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Ml=Ge())),4&a&&fl(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Js=(c=Js)||d,pl(t,e),Js=c):pl(t,e),ml(e),8192&a){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(Qs=e,d=e.child;null!==d;){for(f=Qs=d;null!==Qs;){switch(h=(p=Qs).child,p.tag){case 0:case 11:case 14:case 15:el(4,p,p.return);break;case 1:Ys(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){a=p,r=p.return;try{t=a,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){ku(a,r,e)}}break;case 5:Ys(p,p.return);break;case 22:if(null!==p.memoizedState){bl(f);continue}}null!==h?(h.return=p,Qs=h):bl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ye("display",s))}catch(t){ku(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(t){ku(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:pl(t,e),ml(e),4&a&&fl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(al(r)){var a=r;break e}r=r.return}throw Error(n(160))}switch(a.tag){case 5:var o=a.stateNode;32&a.flags&&(pe(o,""),a.flags&=-33),sl(e,ol(e),o);break;case 3:case 4:var i=a.stateNode.containerInfo;il(e,ol(e),i);break;default:throw Error(n(161))}}catch(t){ku(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Qs=e,gl(e)}function gl(e,t,n){for(var r=!!(1&e.mode);null!==Qs;){var a=Qs,o=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||qs;if(!i){var s=a.alternate,l=null!==s&&null!==s.memoizedState||Js;s=qs;var u=Js;if(qs=i,(Js=l)&&!u)for(Qs=a;null!==Qs;)l=(i=Qs).child,22===i.tag&&null!==i.memoizedState?_l(a):null!==l?(l.return=i,Qs=l):_l(a);for(;null!==o;)Qs=o,gl(o),o=o.sibling;Qs=a,qs=s,Js=u}vl(e)}else 8772&a.subtreeFlags&&null!==o?(o.return=a,Qs=o):vl(e)}}function vl(e){for(;null!==Qs;){var t=Qs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Js||tl(5,t);break;case 1:var a=t.stateNode;if(4&t.flags&&!Js)if(null===r)a.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:es(t.type,r.memoizedProps);a.componentDidUpdate(o,r.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&$o(t,i,a);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}$o(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Vt(f)}}}break;default:throw Error(n(163))}Js||512&t.flags&&nl(t)}catch(e){ku(t,t.return,e)}}if(t===e){Qs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Qs=r;break}Qs=t.return}}function bl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function _l(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{tl(4,t)}catch(e){ku(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(e){ku(t,a,e)}}var o=t.return;try{nl(t)}catch(e){ku(t,o,e)}break;case 5:var i=t.return;try{nl(t)}catch(e){ku(t,i,e)}}}catch(e){ku(t,t.return,e)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var wl,kl=Math.ceil,xl=_.ReactCurrentDispatcher,Sl=_.ReactCurrentOwner,Cl=_.ReactCurrentBatchConfig,El=0,Tl=null,Il=null,zl=0,Pl=0,jl=ka(0),Nl=0,Ol=null,Rl=0,Zl=0,Al=0,Ll=null,Dl=null,Ml=0,Ul=1/0,Fl=null,$l=!1,Vl=null,Bl=null,Wl=!1,Kl=null,ql=0,Jl=0,Hl=null,Ql=-1,Yl=0;function Gl(){return 6&El?Ge():-1!==Ql?Ql:Ql=Ge()}function Xl(e){return 1&e.mode?2&El&&0!==zl?zl&-zl:null!==ho.transition?(0===Yl&&(Yl=yt()),Yl):0!==(e=_t)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function eu(e,t,r,a){if(50<Jl)throw Jl=0,Hl=null,Error(n(185));vt(e,r,a),2&El&&e===Tl||(e===Tl&&(!(2&El)&&(Zl|=r),4===Nl&&ou(e,zl)),tu(e,a),1===r&&0===El&&!(1&t.mode)&&(Ul=Ge()+500,La&&Ua()))}function tu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-st(o),s=1<<i,l=a[i];-1===l?s&n&&!(s&r)||(a[i]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=pt(e,e===Tl?zl:0);if(0===r)null!==n&&He(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&He(n),1===t)0===e.tag?function(e){La=!0,Ma(e)}(iu.bind(null,e)):Ma(iu.bind(null,e)),aa((function(){!(6&El)&&Ua()})),n=null;else{switch(wt(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=at}n=Tu(n,nu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nu(e,t){if(Ql=-1,Yl=0,6&El)throw Error(n(327));var r=e.callbackNode;if(_u()&&e.callbackNode!==r)return null;var a=pt(e,e===Tl?zl:0);if(0===a)return null;if(30&a||a&e.expiredLanes||t)t=hu(e,a);else{t=a;var o=El;El|=2;var i=fu();for(Tl===e&&zl===t||(Fl=null,Ul=Ge()+500,cu(e,t));;)try{yu();break}catch(t){du(e,t)}Co(),xl.current=i,El=o,null!==Il?t=0:(Tl=null,zl=0,t=Nl)}if(0!==t){if(2===t&&0!==(o=mt(e))&&(a=o,t=ru(e,o)),1===t)throw r=Ol,cu(e,0),ou(e,a),tu(e,Ge()),r;if(6===t)ou(e,a);else{if(o=e.current.alternate,!(30&a||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!or(o(),a))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=hu(e,a),2===t&&(i=mt(e),0!==i&&(a=i,t=ru(e,i))),1!==t)))throw r=Ol,cu(e,0),ou(e,a),tu(e,Ge()),r;switch(e.finishedWork=o,e.finishedLanes=a,t){case 0:case 1:throw Error(n(345));case 2:case 5:bu(e,Dl,Fl);break;case 3:if(ou(e,a),(130023424&a)===a&&10<(t=Ml+500-Ge())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&a)!==a){Gl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ta(bu.bind(null,e,Dl,Fl),t);break}bu(e,Dl,Fl);break;case 4:if(ou(e,a),(4194240&a)===a)break;for(t=e.eventTimes,o=-1;0<a;){var s=31-st(a);i=1<<s,(s=t[s])>o&&(o=s),a&=~i}if(a=o,10<(a=(120>(a=Ge()-a)?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*kl(a/1960))-a)){e.timeoutHandle=ta(bu.bind(null,e,Dl,Fl),a);break}bu(e,Dl,Fl);break;default:throw Error(n(329))}}}return tu(e,Ge()),e.callbackNode===r?nu.bind(null,e):null}function ru(e,t){var n=Ll;return e.current.memoizedState.isDehydrated&&(cu(e,t).flags|=256),2!==(e=hu(e,t))&&(t=Dl,Dl=n,null!==t&&au(t)),e}function au(e){null===Dl?Dl=e:Dl.push.apply(Dl,e)}function ou(e,t){for(t&=~Al,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function iu(e){if(6&El)throw Error(n(327));_u();var t=pt(e,0);if(!(1&t))return tu(e,Ge()),null;var r=hu(e,t);if(0!==e.tag&&2===r){var a=mt(e);0!==a&&(t=a,r=ru(e,a))}if(1===r)throw r=Ol,cu(e,0),ou(e,t),tu(e,Ge()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bu(e,Dl,Fl),tu(e,Ge()),null}function su(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Ul=Ge()+500,La&&Ua())}}function lu(e){null!==Kl&&0===Kl.tag&&!(6&El)&&_u();var t=El;El|=1;var n=Cl.transition,r=_t;try{if(Cl.transition=null,_t=1,e)return e()}finally{_t=r,Cl.transition=n,!(6&(El=t))&&Ua()}}function uu(){Pl=jl.current,xa(jl)}function cu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,na(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(Xa(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&ja();break;case 3:Ho(),xa(Ta),xa(Ea),ti();break;case 5:Yo(r);break;case 4:Ho();break;case 13:case 19:xa(Go);break;case 10:Eo(r.type._context);break;case 22:case 23:uu()}n=n.return}if(Tl=e,Il=e=ju(e.current,null),zl=Pl=t,Nl=0,Ol=null,Al=Zl=Rl=0,Dl=Ll=null,null!==Po){for(t=0;t<Po.length;t++)if(null!==(r=(n=Po[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var i=o.next;o.next=a,r.next=i}n.pending=r}Po=null}return e}function du(e,t){for(;;){var r=Il;try{if(Co(),ni.current=Qi,li){for(var a=oi.memoizedState;null!==a;){var o=a.queue;null!==o&&(o.pending=null),a=a.next}li=!1}if(ai=0,si=ii=oi=null,ui=!1,ci=0,Sl.current=null,null===r||null===r.return){Nl=1,Ol=t,Il=null;break}e:{var i=e,s=r.return,l=r,u=t;if(t=zl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=hs(s);if(null!==h){h.flags&=-257,ms(h,s,l,0,t),1&h.mode&&ps(i,c,t),u=c;var m=(t=h).updateQueue;if(null===m){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}if(!(1&t)){ps(i,c,t),pu();break e}u=Error(n(426))}else if(no&&1&l.mode){var g=hs(s);if(null!==g){!(65536&g.flags)&&(g.flags|=256),ms(g,s,l,0,t),po(ss(u,l));break e}}i=u=ss(u,l),4!==Nl&&(Nl=2),null===Ll?Ll=[i]:Ll.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Uo(i,ds(0,u,t));break e;case 1:l=u;var v=i.type,b=i.stateNode;if(!(128&i.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Bl&&Bl.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t,Uo(i,fs(i,l,t));break e}}i=i.return}while(null!==i)}vu(r)}catch(e){t=e,Il===r&&null!==r&&(Il=r=r.return);continue}break}}function fu(){var e=xl.current;return xl.current=Qi,null===e?Qi:e}function pu(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Tl||!(268435455&Rl)&&!(268435455&Zl)||ou(Tl,zl)}function hu(e,t){var r=El;El|=2;var a=fu();for(Tl===e&&zl===t||(Fl=null,cu(e,t));;)try{mu();break}catch(t){du(e,t)}if(Co(),El=r,xl.current=a,null!==Il)throw Error(n(261));return Tl=null,zl=0,Nl}function mu(){for(;null!==Il;)gu(Il)}function yu(){for(;null!==Il&&!Qe();)gu(Il)}function gu(e){var t=wl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?vu(e):Il=t,Sl.current=null}function vu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Nl=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ws(n,t,Pl)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Nl&&(Nl=5)}function bu(e,t,r){var a=_t,o=Cl.transition;try{Cl.transition=null,_t=1,function(e,t,r,a){do{_u()}while(null!==Kl);if(6&El)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(function(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<n;){var a=31-st(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,i),e===Tl&&(Il=Tl=null,zl=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Wl||(Wl=!0,Tu(nt,(function(){return _u(),null}))),i=!!(15990&r.flags),15990&r.subtreeFlags||i){i=Cl.transition,Cl.transition=null;var s=_t;_t=1;var l=El;El|=4,Sl.current=null,function(e,t){if(Gr=Wt,dr(e=cr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(a&&0!==a.rangeCount){r=a.anchorNode;var o=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{r.nodeType,i.nodeType}catch(e){r=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||0!==o&&3!==f.nodeType||(l=s+o),f!==i||0!==a&&3!==f.nodeType||(u=s+a),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++c===o&&(l=s),p===i&&++d===a&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===u?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xr={focusedElem:e,selectionRange:r},Wt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var y=m.memoizedProps,g=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:es(t.type,y),g);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(n(163))}}catch(e){ku(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}m=Xs,Xs=!1}(e,r),hl(r,e),fr(Xr),Wt=!!Gr,Xr=Gr=null,e.current=r,yl(r),Ye(),El=l,_t=s,Cl.transition=i}else e.current=r;if(Wl&&(Wl=!1,Kl=e,ql=o),0===(i=e.pendingLanes)&&(Bl=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),tu(e,Ge()),null!==t)for(a=e.onRecoverableError,r=0;r<t.length;r++)a((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if($l)throw $l=!1,e=Vl,Vl=null,e;!!(1&ql)&&0!==e.tag&&_u(),1&(i=e.pendingLanes)?e===Hl?Jl++:(Jl=0,Hl=e):Jl=0,Ua()}(e,t,r,a)}finally{Cl.transition=o,_t=a}return null}function _u(){if(null!==Kl){var e=wt(ql),t=Cl.transition,r=_t;try{if(Cl.transition=null,_t=16>e?16:e,null===Kl)var a=!1;else{if(e=Kl,Kl=null,ql=0,6&El)throw Error(n(331));var o=El;for(El|=4,Qs=e.current;null!==Qs;){var i=Qs,s=i.child;if(16&Qs.flags){var l=i.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Qs=c;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:el(8,d,i)}var f=d.child;if(null!==f)f.return=d,Qs=f;else for(;null!==Qs;){var p=(d=Qs).sibling,h=d.return;if(rl(d),d===c){Qs=null;break}if(null!==p){p.return=h,Qs=p;break}Qs=h}}}var m=i.alternate;if(null!==m){var y=m.child;if(null!==y){m.child=null;do{var g=y.sibling;y.sibling=null,y=g}while(null!==y)}}Qs=i}}if(2064&i.subtreeFlags&&null!==s)s.return=i,Qs=s;else e:for(;null!==Qs;){if(2048&(i=Qs).flags)switch(i.tag){case 0:case 11:case 15:el(9,i,i.return)}var v=i.sibling;if(null!==v){v.return=i.return,Qs=v;break e}Qs=i.return}}var b=e.current;for(Qs=b;null!==Qs;){var _=(s=Qs).child;if(2064&s.subtreeFlags&&null!==_)_.return=s,Qs=_;else e:for(s=b;null!==Qs;){if(2048&(l=Qs).flags)try{switch(l.tag){case 0:case 11:case 15:tl(9,l)}}catch(e){ku(l,l.return,e)}if(l===s){Qs=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qs=w;break e}Qs=l.return}}if(El=o,Ua(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}a=!0}return a}finally{_t=r,Cl.transition=t}}return!1}function wu(e,t,n){e=Do(e,t=ds(0,t=ss(n,t),1),1),t=Gl(),null!==e&&(vt(e,1,t),tu(e,t))}function ku(e,t,n){if(3===e.tag)wu(e,e,n);else for(;null!==t;){if(3===t.tag){wu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Bl||!Bl.has(r))){t=Do(t,e=fs(t,e=ss(n,e),1),1),e=Gl(),null!==t&&(vt(t,1,e),tu(t,e));break}}t=t.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Gl(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(zl&n)===n&&(4===Nl||3===Nl&&(130023424&zl)===zl&&500>Ge()-Ml?cu(e,0):Al|=n),tu(e,t)}function Su(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=Gl();null!==(e=Oo(e,t))&&(vt(e,t,n),tu(e,n))}function Cu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Su(e,n)}function Eu(e,t){var r=0;switch(e.tag){case 13:var a=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(n(314))}null!==a&&a.delete(t),Su(e,r)}function Tu(e,t){return Je(e,t)}function Iu(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 zu(e,t,n,r){return new Iu(e,t,n,r)}function Pu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=zu(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,r,a,o,i){var s=2;if(a=e,"function"==typeof e)Pu(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Ou(r.children,o,i,t);case C:s=8,o|=8;break;case E:return(e=zu(12,r,t,2|o)).elementType=E,e.lanes=i,e;case P:return(e=zu(13,r,t,o)).elementType=P,e.lanes=i,e;case j:return(e=zu(19,r,t,o)).elementType=j,e.lanes=i,e;case R:return Ru(r,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case I:s=9;break e;case z:s=11;break e;case N:s=14;break e;case O:s=16,a=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=zu(s,r,t,o)).elementType=e,t.type=a,t.lanes=i,t}function Ou(e,t,n,r){return(e=zu(7,e,r,t)).lanes=n,e}function Ru(e,t,n,r){return(e=zu(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Zu(e,t,n){return(e=zu(6,e,null,t)).lanes=n,e}function Au(e,t,n){return(t=zu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lu(e,t,n,r,a){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=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Du(e,t,n,r,a,o,i,s,l){return e=new Lu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=zu(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zo(o),e}function Mu(e){if(!e)return Ca;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Pa(r))return Oa(e,r,t)}return t}function Uu(e,t,n,r,a,o,i,s,l){return(e=Du(n,r,!0,e,0,o,0,s,l)).context=Mu(null),n=e.current,(o=Lo(r=Gl(),a=Xl(n))).callback=null!=t?t:null,Do(n,o,a),e.current.lanes=a,vt(e,a,r),tu(e,r),e}function Fu(e,t,n,r){var a=t.current,o=Gl(),i=Xl(a);return n=Mu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Do(a,t,i))&&(eu(e,a,i,o),Mo(e,a,i)),i}function $u(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Bu(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}wl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ta.current)gs=!0;else{if(!(e.lanes&r||128&t.flags))return gs=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),fo();break;case 5:Qo(t);break;case 1:Pa(t.type)&&Ra(t);break;case 4:Jo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Sa(wo,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Sa(Go,1&Go.current),t.flags|=128,null):n&t.child.childLanes?Zs(e,t,n):(Sa(Go,1&Go.current),null!==(e=$s(e,t,n))?e.sibling:null);Sa(Go,1&Go.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Us(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),Sa(Go,Go.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return $s(e,t,n)}(e,t,r);gs=!!(131072&e.flags)}else gs=!1,no&&1048576&t.flags&&Ya(t,Ba,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;Fs(e,t),e=t.pendingProps;var o=za(t,Ea.current);Io(t,r),o=hi(null,t,a,e,o,r);var i=mi();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pa(a)?(i=!0,Ra(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Zo(t),o.updater=ns,t.stateNode=o,o._reactInternals=t,is(t,a,e,r),t=Es(null,t,a,!0,i,r)):(t.tag=0,no&&i&&Ga(t),vs(null,t,o,r),t=t.child),t;case 16:a=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Pu(e)?1:0;if(null!=e){if((e=e.$$typeof)===z)return 11;if(e===N)return 14}return 2}(a),e=es(a,e),o){case 0:t=Ss(null,t,a,e,r);break e;case 1:t=Cs(null,t,a,e,r);break e;case 11:t=bs(null,t,a,e,r);break e;case 14:t=_s(null,t,a,es(a.type,e),r);break e}throw Error(n(306,a,""))}return t;case 0:return a=t.type,o=t.pendingProps,Ss(e,t,a,o=t.elementType===a?o:es(a,o),r);case 1:return a=t.type,o=t.pendingProps,Cs(e,t,a,o=t.elementType===a?o:es(a,o),r);case 3:e:{if(Ts(t),null===e)throw Error(n(387));a=t.pendingProps,o=(i=t.memoizedState).element,Ao(e,t),Fo(t,a,null,r);var s=t.memoizedState;if(a=s.element,i.isDehydrated){if(i={element:a,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Is(e,t,a,r,o=ss(Error(n(423)),t));break e}if(a!==o){t=Is(e,t,a,r,o=ss(Error(n(424)),t));break e}for(to=sa(t.stateNode.containerInfo.firstChild),eo=t,no=!0,ro=null,r=_o(t,null,a,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(fo(),a===o){t=$s(e,t,r);break e}vs(e,t,a,r)}t=t.child}return t;case 5:return Qo(t),null===e&&so(t),a=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,ea(a,o)?s=null:null!==i&&ea(a,i)&&(t.flags|=32),xs(e,t),vs(e,t,s,r),t.child;case 6:return null===e&&so(t),null;case 13:return Zs(e,t,r);case 4:return Jo(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=bo(t,null,a,r):vs(e,t,a,r),t.child;case 11:return a=t.type,o=t.pendingProps,bs(e,t,a,o=t.elementType===a?o:es(a,o),r);case 7:return vs(e,t,t.pendingProps,r),t.child;case 8:case 12:return vs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(a=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Sa(wo,a._currentValue),a._currentValue=s,null!==i)if(or(i.value,s)){if(i.children===o.children&&!Ta.current){t=$s(e,t,r);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var u=l.firstContext;null!==u;){if(u.context===a){if(1===i.tag){(u=Lo(-1,r&-r)).tag=2;var c=i.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=r,null!==(u=i.alternate)&&(u.lanes|=r),To(i.return,r,t),l.lanes|=r;break}u=u.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),To(s,r,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}vs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,a=t.pendingProps.children,Io(t,r),a=a(o=zo(o)),t.flags|=1,vs(e,t,a,r),t.child;case 14:return o=es(a=t.type,t.pendingProps),_s(e,t,a,o=es(a.type,o),r);case 15:return ws(e,t,t.type,t.pendingProps,r);case 17:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:es(a,o),Fs(e,t),t.tag=1,Pa(a)?(e=!0,Ra(t)):e=!1,Io(t,r),as(t,a,o),is(t,a,o,r),Es(null,t,a,!0,e,r);case 19:return Us(e,t,r);case 22:return ks(e,t,r)}throw Error(n(156,t.tag))};var Wu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Hu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function Yu(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if("function"==typeof a){var s=a;a=function(){var e=$u(i);s.call(e)}}Fu(t,i,e,a)}else i=function(e,t,n,r,a){if(a){if("function"==typeof r){var o=r;r=function(){var e=$u(i);o.call(e)}}var i=Uu(t,r,e,0,null,!1,0,"",Qu);return e._reactRootContainer=i,e[fa]=i.current,Ur(8===e.nodeType?e.parentNode:e),lu(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var s=r;r=function(){var e=$u(l);s.call(e)}}var l=Du(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[fa]=l.current,Ur(8===e.nodeType?e.parentNode:e),lu((function(){Fu(t,l,n,r)})),l}(n,t,e,a,r);return $u(i)}qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Fu(e,t,null,null)},qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;lu((function(){Fu(null,e,null,null)})),t[fa]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&Dt(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(bt(t,1|n),tu(t,Ge()),!(6&El)&&(Ul=Ge()+500,Ua()))}break;case 13:lu((function(){var t=Oo(e,1);if(null!==t){var n=Gl();eu(t,e,1,n)}})),Bu(e,1)}},xt=function(e){if(13===e.tag){var t=Oo(e,134217728);null!==t&&eu(t,e,134217728,Gl()),Bu(e,134217728)}},St=function(e){if(13===e.tag){var t=Xl(e),n=Oo(e,t);null!==n&&eu(n,e,t,Gl()),Bu(e,t)}},Ct=function(){return _t},Et=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},xe=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var o=ba(a);if(!o)throw Error(n(90));J(a),X(a,o)}}}break;case"textarea":ie(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},ze=su,Pe=lu;var Gu={usingClientEntryPoint:!1,Events:[ga,va,ba,Te,Ie,su]},Xu={findFiberByHostInstance:ya,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ec={bundleType:Xu.bundleType,version:Xu.version,rendererPackageName:Xu.rendererPackageName,rendererConfig:Xu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:Xu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{ot=tc.inject(ec),it=tc}catch(de){}}return b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gu,b.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ju(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},b.createRoot=function(e,t){if(!Ju(e))throw Error(n(299));var r=!1,a="",o=Wu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Du(e,1,!1,null,0,r,0,a,o),e[fa]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Ku(t)},b.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=Ke(t))?null:e.stateNode},b.flushSync=function(e){return lu(e)},b.hydrate=function(e,t,r){if(!Hu(t))throw Error(n(200));return Yu(null,e,t,!0,r)},b.hydrateRoot=function(e,t,r){if(!Ju(e))throw Error(n(405));var a=null!=r&&r.hydratedSources||null,o=!1,i="",s=Wu;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(i=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=Uu(t,null,e,1,null!=r?r:null,o,0,i,s),e[fa]=t.current,Ur(e),a)for(e=0;e<a.length;e++)o=(o=(r=a[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new qu(t)},b.render=function(e,t,r){if(!Hu(t))throw Error(n(200));return Yu(null,e,t,!1,r)},b.unmountComponentAtNode=function(e){if(!Hu(e))throw Error(n(40));return!!e._reactRootContainer&&(lu((function(){Yu(null,null,e,!1,(function(){e._reactRootContainer=null,e[fa]=null}))})),!0)},b.unstable_batchedUpdates=su,b.unstable_renderSubtreeIntoContainer=function(e,t,r,a){if(!Hu(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Yu(e,t,r,!1,a)},b.version="18.3.1-next-f1338f8080-20240426",b}();var x,S=v.exports;function C(e,...t){if(0===t.length)return e;const n=C(...t);return e&&n?`${e} ${n}`:e||n}function E({children:e,title:t,subtitle:n,className:r,...a}){return u.jsxs("div",{...a,className:C(r,"flex flex-col items-center","md:flex md:flex-row md:justify-stretch md:items-center","min-h-screen min-w-screen","bg-white text-slate-900","dark:bg-slate-900 dark:text-slate-100"),children:[u.jsxs("div",{className:C("px-6 pt-4","md:max-w-lg","md:grid md:content-center md:justify-items-end","md:self-stretch","md:w-1/2 md:max-w-fix md:p-4","md:text-right","md:dark:border-r md:dark:border-slate-700","md:bg-slate-100 md:dark:bg-slate-800"),children:[t&&u.jsx("h1",{className:"text-xl md:text-2xl lg:text-5xl md:mt-4 mb-4 font-semibold text-brand",children:t}),n&&u.jsx("p",{className:"hidden md:block max-w-xs text-slate-500 dark:text-slate-500",children:n})]}),u.jsx("div",{className:"w-full px-6 md:max-w-3xl md:px-12",children:e})]})}x=S.createRoot,S.hydrateRoot;var T={},I={};Object.defineProperty(I,"__esModule",{value:!0}),I.FetchError=void 0;class z extends Error{constructor(e,t,n){if(null==e||!t){const r=function(e){if("string"==typeof e&&e.length>0)return[500,e];if(!(e instanceof Error))return[500,"Failed to fetch"];const t=e.code;if("string"==typeof t)switch(!0){case"ENOTFOUND"===t:return[400,"Invalid hostname"];case"ECONNREFUSED"===t:return[502,"Connection refused"];case"DEPTH_ZERO_SELF_SIGNED_CERT"===t:return[502,"Self-signed certificate"];case t.startsWith("ERR_TLS"):return[502,"TLS error"];case t.startsWith("ECONN"):return[502,"Connection error"];default:return[500,`${t} error`]}return[500,e.message]}(function(e){if(e instanceof TypeError&&"fetch failed"===e.message&&void 0!==e.cause)return e.cause;return e}(n?.cause));e=e??r[0],t=t||r[1]}super(t,n),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.statusCode=e}}I.FetchError=z;var P={},j={};function N(e,t){return!t&&e instanceof Request?e:new Request(e,t)}Object.defineProperty(j,"__esModule",{value:!0}),j.asRequest=j.toRequestTransformer=void 0,j.toRequestTransformer=function(e){return function(t,n){return e.call(this,N(t,n))}},j.asRequest=N;var O={};Object.defineProperty(O,"__esModule",{value:!0}),O.stringifyMessage=O.logCancellationError=O.cancelBody=O.padLines=O.MaxBytesTransformStream=O.ifString=O.ifObject=O.isIp=void 0,O.isIp=function(e){return!!e.match(/^\d+\.\d+\.\d+\.\d+$/)||!(!e.startsWith("[")||!e.endsWith("]"))};const R=Object.prototype;O.ifObject=e=>{if("object"==typeof e&&null!=e&&!Array.isArray(e)){const t=Object.getPrototypeOf(e);if(null===t||t===R)return e}};O.ifString=e=>"string"==typeof e?e:void 0;class Z extends TransformStream{constructor(e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");let t=0;super({transform:(n,r)=>{(t+=n.length)<=e?r.enqueue(n):r.error(new Error("Response too large"))}})}}O.MaxBytesTransformStream=Z;const A=/\r?\n/g;async function L(e,t){!e.body||e.bodyUsed||e.body.locked||"function"!=typeof e.body.cancel||("function"==typeof t?e.body.cancel().catch(t):"log"===t?e.body.cancel().catch(D):await e.body.cancel())}function D(e){console.warn("Failed to cancel response body",e)}O.padLines=function(e,t){return e?t+e.replace(A,`$&${t}`):e},O.cancelBody=L,O.logCancellationError=D,O.stringifyMessage=async function(e){try{const t=function(e){return Array.from(e).map((([e,t])=>`${e}: ${t}`)).join("\n")}(e.headers),n=await async function(e){try{const t=await e.blob();if(t.type?.startsWith("text/")){const e=await t.text();return JSON.stringify(e)}if(/application\/(?:\w+\+)?json/.test(t.type)){const e=await t.text();return e.includes("\n")?JSON.stringify(JSON.parse(e)):e}return`[Body size: ${t.size}, type: ${JSON.stringify(t.type)} ]`}catch{return"[Body could not be read]"}}(e);return t&&n?`${t}\n${n}`:t||n}finally{L(e,"log")}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.forbiddenDomainNameRequestTransform=e.DEFAULT_FORBIDDEN_DOMAIN_NAMES=e.requireHostHeaderTranform=e.protocolCheckRequestTransform=e.FetchRequestError=void 0;const t=I,n=j,r=O;class a extends t.FetchError{constructor(e,t,n,r){super(t,n,r),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:e})}static from(e,t){return t instanceof a?t:new a(e,void 0,void 0,{cause:t})}}e.FetchRequestError=a;const o=e=>"string"==typeof e?new URL(e):e instanceof URL?e:new URL(e.url);e.protocolCheckRequestTransform=function(e){const t=new Set(e);return(e,r)=>{const{protocol:i}=o(e),s=(0,n.asRequest)(e,r);if(!t.has(i))throw new a(s,400,`"${i}" protocol is not allowed`);return s}},e.requireHostHeaderTranform=function(){return(e,t)=>{const{protocol:i,hostname:s}=o(e),l=(0,n.asRequest)(e,t);if("http:"!==i&&"https:"!==i)throw new a(l,400,`"${i}" requests are not allowed`);if(!s||(0,r.isIp)(s))throw new a(l,400,"Invalid hostname");return l}},e.DEFAULT_FORBIDDEN_DOMAIN_NAMES=["example.com","*.example.com","example.org","*.example.org","example.net","*.example.net","googleusercontent.com","*.googleusercontent.com"],e.forbiddenDomainNameRequestTransform=function(t=e.DEFAULT_FORBIDDEN_DOMAIN_NAMES){const r=new Set(t);return 0===r.size?async e=>e:async(e,t)=>{const{hostname:i}=o(e),s=(0,n.asRequest)(e,t);if(r.has(i))throw new a(s,403,"Forbidden hostname");let l=i.indexOf(".");for(;-1!==l;){const e=i.slice(l+1);if(r.has(`*.${e}`))throw new a(s,403,"Forbidden hostname");l=i.indexOf(".",l+1)}return s}}}(P);var M={},U={},F={};function $(e,t){return async n=>t(await e(n))}Object.defineProperty(F,"__esModule",{value:!0}),F.pipeTwo=F.pipe=void 0,F.pipe=function(...e){return e.reduce($)},F.pipeTwo=$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pipeTwo=e.pipe=void 0;var t=F;Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),Object.defineProperty(e,"pipeTwo",{enumerable:!0,get:function(){return t.pipeTwo}})}(U);var V,B={},W=e&&e.__classPrivateFieldSet||function(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n},K=e&&e.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(B,"__esModule",{value:!0}),B.TransformedResponse=void 0;class q extends Response{constructor(e,t){if(!e.body)throw new TypeError("Response body is not available");if(e.bodyUsed)throw new TypeError("Response body is already used");super(e.body.pipeThrough(t),{status:e.status,statusText:e.statusText,headers:e.headers}),V.set(this,void 0),W(this,V,e,"f")}get url(){return K(this,V,"f").url}get redirected(){return K(this,V,"f").redirected}get type(){return K(this,V,"f").type}get statusText(){return K(this,V,"f").statusText}}B.TransformedResponse=q,V=new WeakMap,Object.defineProperty(M,"__esModule",{value:!0}),M.fetchJsonZodProcessor=M.fetchJsonProcessor=M.fetchResponseJsonTranformer=M.fetchResponseTypeChecker=M.fetchTypeProcessor=M.fetchResponseMaxSizeChecker=M.fetchMaxSizeProcessor=M.fetchOkTransformer=M.fetchOkProcessor=M.cancelBodyOnError=M.extractMime=M.extractLength=M.checkLength=M.peekJson=M.FetchResponseError=void 0;const J=U,H=I,Q=B,Y=O;class G extends H.FetchError{constructor(e,t=e.status,n=e.statusText,r){super(t,n,r),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e})}static async from(e,t=X,n=e.status,r){const a="string"==typeof t?t:"function"==typeof t?await t(e):void 0;return new G(e,n,a,r)}}M.FetchResponseError=G;const X=async e=>{const t=ne(e);if(t)try{if("text/plain"===t)return await e.text();if(/^application\/(?:[^+]+\+)?json$/i.test(t)){const t=await e.json();if("string"==typeof t)return t;const n=(0,Y.ifString)((0,Y.ifObject)(t)?.error_description);if(n)return n;const r=(0,Y.ifString)((0,Y.ifObject)(t)?.error);if(r)return r;const a=(0,Y.ifString)((0,Y.ifObject)(t)?.message);if(a)return a}}catch{}};function ee(e,t){if(!(t>=0))throw new TypeError("maxBytes must be a non-negative number");const n=te(e);if(null!=n&&n>t)throw new G(e,502,"Response too large");return n}function te(e){const t=e.headers.get("Content-Length");if(null==t)return;if(!/^\d+$/.test(t))throw new G(e,502,"Invalid Content-Length");const n=Number(t);if(!Number.isSafeInteger(n))throw new G(e,502,"Content-Length too large");return n}function ne(e){const t=e.headers.get("Content-Type");if(null!=t)return t.split(";",1)[0].trim()}function re(e,t=Y.logCancellationError){return async n=>{try{return await e(n)}catch(e){throw await(0,Y.cancelBody)(n,t??void 0),e}}}async function ae(e,t){if(e.ok)return e;throw await G.from(e,t)}function oe(e,t){if(t===1/0)return e;if(ee(e,t),!e.body)return e;const n=new Y.MaxBytesTransformStream(t);return new Q.TransformedResponse(e,n)}function ie(e,t=!0){const n="string"==typeof e?t=>t===e:e instanceof RegExp?t=>e.test(t):e;return re((e=>se(e,n,t)))}async function se(e,t,n=!0){const r=ne(e);if(r){if(!t(r))throw await G.from(e,`Unexpected response Content-Type (${r})`,502)}else if(n)throw await G.from(e,"Missing response Content-Type header",502);return e}async function le(e){try{const t=await e.json();return{response:e,json:t}}catch(t){throw new G(e,502,"Unable to parse response as JSON",{cause:t})}}M.peekJson=async function(e,t=1/0){if("application/json"!==ne(e))return;ee(e,t);const n=e.clone();return(e.body&&t<1/0?new Q.TransformedResponse(n,new Y.MaxBytesTransformStream(t)):n).json()},M.checkLength=ee,M.extractLength=te,M.extractMime=ne,M.cancelBodyOnError=re,M.fetchOkProcessor=function(e){return re((t=>ae(t,e)))},M.fetchOkTransformer=ae,M.fetchMaxSizeProcessor=function(e){if(e===1/0)return e=>e;if(!Number.isFinite(e)||e<0)throw new TypeError("maxBytes must be a 0, Infinity or a positive number");return re((t=>oe(t,e)))},M.fetchResponseMaxSizeChecker=oe,M.fetchTypeProcessor=ie,M.fetchResponseTypeChecker=se,M.fetchResponseJsonTranformer=le,M.fetchJsonProcessor=function(e=/^application\/(?:[^+]+\+)?json$/,t=!0){return(0,J.pipe)(ie(e,t),re(le))},M.fetchJsonZodProcessor=function(e,t){return async n=>e.parseAsync(n.json,t)};var ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.bindFetch=ue.timedFetch=ue.loggedFetch=void 0;const ce=P,de=j,fe=B,pe=O;ue.loggedFetch=function(e=globalThis.fetch){return(0,de.toRequestTransformer)((async function(t){const n=await(0,pe.stringifyMessage)(t);console.info(`> ${t.method} ${t.url}\n${(0,pe.padLines)(n," ")}`);try{const n=await e.call(this,t),r=await(0,pe.stringifyMessage)(n.clone());return console.info(`< HTTP/1.1 ${n.status} ${n.statusText}\n${(0,pe.padLines)(r," ")}`),n}catch(e){throw console.error("< Error:",e),e}}))};var he,me,ye;ue.timedFetch=(e=6e4,t=globalThis.fetch)=>{if(e===1/0)return t;if(!Number.isFinite(e)||e<=0)throw new TypeError("Timeout must be positive");return(0,de.toRequestTransformer)((async function(n){const r=new AbortController,a=r.signal,o=()=>{r.abort()},i=()=>{clearTimeout(s),n.signal?.removeEventListener("abort",o)},s=setTimeout(o,e);"object"==typeof s&&s.unref?.(),n.signal?.addEventListener("abort",o),a.addEventListener("abort",i);const l=await t.call(this,n,{signal:a});if(l.body){const e=new TransformStream({flush:i});return new fe.TransformedResponse(l,e)}return i(),l}))},ue.bindFetch=function(e=globalThis.fetch,t=globalThis){return(0,de.toRequestTransformer)((async n=>{try{return await e.call(t,n)}catch(e){throw ce.FetchRequestError.from(n,e)}}))},he=T,me=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),ye=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||me(t,e,n)},Object.defineProperty(he,"__esModule",{value:!0}),ye(I,he),ye(P,he),ye(M,he),ye(ue,he),ye(j,he),ye(O,he);class ge{constructor(e,t,n,r){Object.defineProperty(this,"requestUri",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"clientId",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"csrfToken",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"newSessionsRequireConsent",{enumerable:!0,configurable:!0,writable:!0,value:r})}async signIn(e){const t=await fetch("/oauth/authorize/sign-in",{method:"POST",headers:{"Content-Type":"application/json"},mode:"same-origin",body:JSON.stringify({csrf_token:this.csrfToken,request_uri:this.requestUri,client_id:this.clientId,credentials:e})}),n=await t.json();if(t.ok){const e=n;return{account:e.account,selected:!0,loginRequired:!1,consentRequired:this.newSessionsRequireConsent||e.consentRequired}}if(400===t.status&&"invalid_request"===n?.error&&"Invalid credentials"===n?.error_description)throw new ve;if(401===t.status&&"second_authentication_factor_required"===n?.error){const e=n;throw new be(e.type,e.hint)}throw new T.FetchResponseError(t)}async accept(e){const t=new URL("/oauth/authorize/accept",window.origin);return t.searchParams.set("request_uri",this.requestUri),t.searchParams.set("account_sub",e.sub),t.searchParams.set("client_id",this.clientId),t.searchParams.set("csrf_token",this.csrfToken),t}async reject(){const e=new URL("/oauth/authorize/reject",window.origin);return e.searchParams.set("request_uri",this.requestUri),e.searchParams.set("client_id",this.clientId),e.searchParams.set("csrf_token",this.csrfToken),e}}class ve extends Error{constructor(){super("Invalid credentials")}}class be extends Error{constructor(e,t){super(`${e} authentication factor required (hint: ${t})`),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"hint",{enumerable:!0,configurable:!0,writable:!0,value:t})}}const _e=(we=document.cookie,Object.fromEntries(we.split(";").filter(Boolean).map((e=>e.split("=",2).map((e=>decodeURIComponent(e.trim())))))));var we;function ke({clientId:e,requestUri:t,csrfCookie:n,sessions:r,newSessionsRequireConsent:a},{onRedirected:o}={}){const i=_e[n]??"<csrf-token-missing>";const[s,u]=l.useState(r),c=l.useCallback((e=>{u((t=>e===(t.find((e=>e.selected))?.account.sub||null)?t:t.map((t=>({...t,selected:t.account.sub===e})))))}),[u]),d=l.useMemo((()=>new ge(t,e,i,a)),[t,e,i,a]),f=l.useCallback((e=>{window.location.href=String(e),o&&setTimeout(o)}),[o]),p=l.useCallback((async e=>{const t=await d.signIn(e),{sub:n}=t.account;u((e=>function(e,t,n){const r=e.findIndex(n);return-1===r?[...e,t]:[...e.slice(0,r),t,...e.slice(r+1)]}(e,t,(e=>e.account.sub===n)).map((e=>e!==t&&e.selected?{...e,selected:!1}:e))))}),[d,f,e,u]);return{sessions:s,setSession:c,doSignIn:p,doSignUp:l.useCallback((e=>{throw new Error("Not implemented")}),[d]),doAccept:l.useCallback((async e=>{f(await d.accept(e))}),[d,f]),doReject:l.useCallback((async()=>{f(await d.reject())}),[d,f])}}function xe(e,t){return l.useCallback((()=>e(t)),[e,t])}function Se({account:e,...t}){return u.jsx("b",{...t,children:e.preferred_username||e.email||e.sub})}function Ce({children:e,className:t,type:n="button",role:r="Button",color:a="grey",disabled:o=!1,loading:i,...s}){return u.jsx("button",{role:r,type:n,disabled:o||!0===i,...s,className:C("py-2 px-6 rounded-lg truncate cursor-pointer touch-manipulation tracking-wide overflow-hidden","brand"===a?"bg-brand text-white":"bg-slate-100 hover:bg-slate-200 text-slate-600 dark:bg-slate-800 dark:hover:bg-slate-700 dark:text-slate-300",t),children:e})}var Ee={},Te={};Object.defineProperty(Te,"__esModule",{value:!0}),Te.CLIENT_ASSERTION_TYPE_JWT_BEARER=Te.ALLOW_UNSECURE_ORIGINS=void 0,Te.ALLOW_UNSECURE_ORIGINS=(()=>{try{const e="production";return"development"===e||"test"===e}catch{return!1}})(),Te.CLIENT_ASSERTION_TYPE_JWT_BEARER="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var Ie={};function ze(e){return"localhost"===e||"127.0.0.1"===e||"[::1]"===e}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.safeUrl=Ie.isLoopbackUrl=Ie.isLoopbackHost=Ie.isIP=void 0,Ie.isIP=function(e){return!!e.match(/^\d+\.\d+\.\d+\.\d+$/)||!(!e.startsWith("[")||!e.endsWith("]"))},Ie.isLoopbackHost=ze,Ie.isLoopbackUrl=function(e){return ze(("string"==typeof e?new URL(e):e).hostname)},Ie.safeUrl=function(e){try{return new URL(e)}catch{return null}};var Pe={},je={},Ne={},Oe={},Re={},Ze={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.getParsedType=e.ZodParsedType=e.objectUtil=e.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(t=e.util||(e.util={})),(e.objectUtil||(e.objectUtil={})).mergeShapes=(e,t)=>({...e,...t}),e.ZodParsedType=t.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);e.getParsedType=t=>{switch(typeof t){case"undefined":return e.ZodParsedType.undefined;case"string":return e.ZodParsedType.string;case"number":return isNaN(t)?e.ZodParsedType.nan:e.ZodParsedType.number;case"boolean":return e.ZodParsedType.boolean;case"function":return e.ZodParsedType.function;case"bigint":return e.ZodParsedType.bigint;case"symbol":return e.ZodParsedType.symbol;case"object":return Array.isArray(t)?e.ZodParsedType.array:null===t?e.ZodParsedType.null:t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch?e.ZodParsedType.promise:"undefined"!=typeof Map&&t instanceof Map?e.ZodParsedType.map:"undefined"!=typeof Set&&t instanceof Set?e.ZodParsedType.set:"undefined"!=typeof Date&&t instanceof Date?e.ZodParsedType.date:e.ZodParsedType.object;default:return e.ZodParsedType.unknown}}}(Ze);var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.ZodError=Ae.quotelessJson=Ae.ZodIssueCode=void 0;const Le=Ze;Ae.ZodIssueCode=Le.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);Ae.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class De extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof De))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ae.ZodError=De,De.create=e=>new De(e),Object.defineProperty(Re,"__esModule",{value:!0});const Me=Ze,Ue=Ae;Re.default=(e,t)=>{let n;switch(e.code){case Ue.ZodIssueCode.invalid_type:n=e.received===Me.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ue.ZodIssueCode.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.util.jsonStringifyReplacer)}`;break;case Ue.ZodIssueCode.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.util.joinValues(e.keys,", ")}`;break;case Ue.ZodIssueCode.invalid_union:n="Invalid input";break;case Ue.ZodIssueCode.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.util.joinValues(e.options)}`;break;case Ue.ZodIssueCode.invalid_enum_value:n=`Invalid enum value. Expected ${Me.util.joinValues(e.options)}, received '${e.received}'`;break;case Ue.ZodIssueCode.invalid_arguments:n="Invalid function arguments";break;case Ue.ZodIssueCode.invalid_return_type:n="Invalid function return type";break;case Ue.ZodIssueCode.invalid_date:n="Invalid date";break;case Ue.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Me.util.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ue.ZodIssueCode.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ue.ZodIssueCode.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ue.ZodIssueCode.custom:n="Invalid input";break;case Ue.ZodIssueCode.invalid_intersection_types:n="Intersection results could not be merged";break;case Ue.ZodIssueCode.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ue.ZodIssueCode.not_finite:n="Number must be finite";break;default:n=t.defaultError,Me.util.assertNever(e)}return{message:n}};var Fe=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.getErrorMap=Oe.setErrorMap=Oe.defaultErrorMap=void 0;const $e=Fe(Re);Oe.defaultErrorMap=$e.default;let Ve=$e.default;Oe.setErrorMap=function(e){Ve=e},Oe.getErrorMap=function(){return Ve};var Be={};!function(t){var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const r=Oe,a=n(Re);t.makeIssue=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,o=[...n,...a.path||[]],i={...a,path:o};if(void 0!==a.message)return{...a,path:o,message:a.message};let s="";const l=r.filter((e=>!!e)).slice().reverse();for(const e of l)s=e(i,{data:t,defaultError:s}).message;return{...a,path:o,message:s}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,n){const o=(0,r.getErrorMap)(),i=(0,t.makeIssue)({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,o,o===a.default?void 0:a.default].filter((e=>!!e))});e.common.issues.push(i)};class o{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const a of n){if("aborted"===a.status)return t.INVALID;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return o.mergeObjectSync(e,n)}static mergeObjectSync(e,n){const r={};for(const a of n){const{key:n,value:o}=a;if("aborted"===n.status)return t.INVALID;if("aborted"===o.status)return t.INVALID;"dirty"===n.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===n.value||void 0===o.value&&!a.alwaysSet||(r[n.value]=o.value)}return{status:e.value,value:r}}}t.ParseStatus=o,t.INVALID=Object.freeze({status:"aborted"});t.DIRTY=e=>({status:"dirty",value:e});t.OK=e=>({status:"valid",value:e});t.isAborted=e=>"aborted"===e.status;t.isDirty=e=>"dirty"===e.status;t.isValid=e=>"valid"===e.status;t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise}(Be);var We={};Object.defineProperty(We,"__esModule",{value:!0});var Ke={},qe={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorUtil=void 0,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(e.errorUtil||(e.errorUtil={}))}(qe),function(t){var n,r,a=e&&e.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=e&&e.__classPrivateFieldSet||function(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;const i=Oe,s=qe,l=Be,u=Ze,c=Ae;class d{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const f=(e,t)=>{if((0,l.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new c.ZodError(e.common.issues);return this._error=t,this._error}}};function p(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var o,i;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(o=null!=s?s:r)&&void 0!==o?o:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=s?s:n)&&void 0!==i?i:a.defaultError}},description:a}}class h{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,u.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new l.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,l.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},a=this._parseSync({data:e,path:r.path,parent:r});return f(r,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.getParsedType)(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await((0,l.isAsync)(r)?r:Promise.resolve(r));return f(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),o=()=>r.addIssue({code:c.ZodIssueCode.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(o(),!1))):!!a||(o(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new le({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ue.create(this,this._def)}nullable(){return ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this,this._def)}promise(){return se.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return Q.create(this,e,this._def)}transform(e){return new le({...p(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new de({...p(this._def),innerType:this,defaultValue:t,typeName:ve.ZodDefault})}brand(){return new he({typeName:ve.ZodBranded,type:this,...p(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new fe({...p(this._def),innerType:this,catchValue:t,typeName:ve.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return me.create(this,e)}readonly(){return ye.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=h,t.Schema=h,t.ZodSchema=h;const m=/^c[^\s-]{8,}$/i,y=/^[0-9a-z]+$/,g=/^[0-9A-HJKMNP-TV-Z]{26}$/,v=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,b=/^[a-z0-9_-]{21}$/i,_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let k;const x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,S=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,C=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,E="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",T=new RegExp(`^${E}$`);function I(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function z(e){let t=`${E}T${I(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}t.datetimeRegex=z;class P extends h{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==u.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.string,received:t.parsedType}),l.INVALID}const t=new l.ParseStatus;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const r=e.data.length>o.value,a=e.data.length<o.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)w.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"email",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)k||(k=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),k.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"emoji",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)v.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"uuid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)b.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"nanoid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)m.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"cuid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)y.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"cuid2",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)g.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"ulid",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(r){n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"url",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"regex",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){z(o).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){T.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){new RegExp(`^${I(o)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?_.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"duration",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(r=e.data,("v4"!==(a=o.version)&&a||!x.test(r))&&("v6"!==a&&a||!S.test(r))&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"ip",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty())):"base64"===o.kind?C.test(e.data)||(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{validation:"base64",code:c.ZodIssueCode.invalid_string,message:o.message}),t.dirty()):u.util.assertNever(o);var r,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:c.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(n)})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...s.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...s.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...s.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...s.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errorUtil.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...s.errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...s.errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...s.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...s.errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,s.errorUtil.errToObj(e))}trim(){return new P({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new P({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new P({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function j(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}t.ZodString=P,P.create=e=>{var t;return new P({checks:[],typeName:ve.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...p(e)})};class N extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==u.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.number,received:t.parsedType}),l.INVALID}let t;const n=new l.ParseStatus;for(const r of this._def.checks)if("int"===r.kind)u.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==j(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_finite,message:r.message}),n.dirty()):u.util.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,n,r){return new N({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:s.errorUtil.toString(r)}]})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&u.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=N,N.create=e=>new N({checks:[],typeName:ve.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...p(e)});class O extends h{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==u.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.bigint,received:t.parsedType}),l.INVALID}let t;const n=new l.ParseStatus;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):u.util.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,n,r){return new O({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:s.errorUtil.toString(r)}]})}_addCheck(e){return new O({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}t.ZodBigInt=O,O.create=e=>{var t;return new O({checks:[],typeName:ve.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...p(e)})};class R extends h{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==u.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.boolean,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodBoolean=R,R.create=e=>new R({typeName:ve.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...p(e)});class Z extends h{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==u.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.date,received:t.parsedType}),l.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_date}),l.INVALID}const t=new l.ParseStatus;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):u.util.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}t.ZodDate=Z,Z.create=e=>new Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ve.ZodDate,...p(e)});class A extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.symbol,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodSymbol=A,A.create=e=>new A({typeName:ve.ZodSymbol,...p(e)});class L extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.undefined,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodUndefined=L,L.create=e=>new L({typeName:ve.ZodUndefined,...p(e)});class D extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.null,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodNull=D,D.create=e=>new D({typeName:ve.ZodNull,...p(e)});class M extends h{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,l.OK)(e.data)}}t.ZodAny=M,M.create=e=>new M({typeName:ve.ZodAny,...p(e)});class U extends h{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,l.OK)(e.data)}}t.ZodUnknown=U,U.create=e=>new U({typeName:ve.ZodUnknown,...p(e)});class F extends h{_parse(e){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.never,received:t.parsedType}),l.INVALID}}t.ZodNever=F,F.create=e=>new F({typeName:ve.ZodNever,...p(e)});class $ extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.void,received:t.parsedType}),l.INVALID}return(0,l.OK)(e.data)}}t.ZodVoid=$,$.create=e=>new $({typeName:ve.ZodVoid,...p(e)});class V extends h{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.ZodParsedType.array)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:t.parsedType}),l.INVALID;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&((0,l.addIssueToContext)(t,{code:e?c.ZodIssueCode.too_big:c.ZodIssueCode.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new d(t,e,t.path,n))))).then((e=>l.ParseStatus.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new d(t,e,t.path,n))));return l.ParseStatus.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new V({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new V({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new V({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function B(e){if(e instanceof W){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ue.create(B(r))}return new W({...e._def,shape:()=>t})}return e instanceof V?new V({...e._def,type:B(e.element)}):e instanceof ue?ue.create(B(e.unwrap())):e instanceof ce?ce.create(B(e.unwrap())):e instanceof Y?Y.create(e.items.map((e=>B(e)))):e}t.ZodArray=V,V.create=(e,t)=>new V({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...p(t)});class W extends h{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=u.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),l.INVALID}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof F&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||o.push(e);const i=[];for(const e of a){const t=r[e],a=n.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new d(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof F){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)i.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new d(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>l.ParseStatus.mergeObjectSync(t,e))):l.ParseStatus.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return s.errorUtil.errToObj,new W({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,o,i;const l=null!==(o=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=s.errorUtil.errToObj(e).message)&&void 0!==i?i:l}:{message:l}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){const t={};return u.util.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new W({...this._def,shape:()=>t})}omit(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new W({...this._def,shape:()=>t})}deepPartial(){return B(this)}partial(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new W({...this._def,shape:()=>t})}required(e){const t={};return u.util.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ue;)e=e._def.innerType;t[n]=e}})),new W({...this._def,shape:()=>t})}keyof(){return ae(u.util.objectKeys(this.shape))}}t.ZodObject=W,W.create=(e,t)=>new W({shape:()=>e,unknownKeys:"strip",catchall:F.create(),typeName:ve.ZodObject,...p(t)}),W.strictCreate=(e,t)=>new W({shape:()=>e,unknownKeys:"strict",catchall:F.create(),typeName:ve.ZodObject,...p(t)}),W.lazycreate=(e,t)=>new W({shape:e,unknownKeys:"strip",catchall:F.create(),typeName:ve.ZodObject,...p(t)});class K extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new c.ZodError(e.ctx.common.issues)));return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:n}),l.INVALID}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},o=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new c.ZodError(e)));return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union,unionErrors:a}),l.INVALID}}get options(){return this._def.options}}t.ZodUnion=K,K.create=(e,t)=>new K({options:e,typeName:ve.ZodUnion,...p(t)});const q=e=>e instanceof ne?q(e.schema):e instanceof le?q(e.innerType()):e instanceof re?[e.value]:e instanceof oe?e.options:e instanceof ie?u.util.objectValues(e.enum):e instanceof de?q(e._def.innerType):e instanceof L?[void 0]:e instanceof D?[null]:e instanceof ue?[void 0,...q(e.unwrap())]:e instanceof ce?[null,...q(e.unwrap())]:e instanceof he||e instanceof ye?q(e.unwrap()):e instanceof fe?q(e._def.innerType):[];class J extends h{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.object)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:t.parsedType}),l.INVALID;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):((0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),l.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=q(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(r.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,n)}}return new J({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...p(n)})}}function H(e,t){const n=(0,u.getParsedType)(e),r=(0,u.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(n===u.ZodParsedType.object&&r===u.ZodParsedType.object){const n=u.util.objectKeys(t),r=u.util.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=H(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}if(n===u.ZodParsedType.array&&r===u.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=H(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===u.ZodParsedType.date&&r===u.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=J;class Q extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if((0,l.isAborted)(e)||(0,l.isAborted)(r))return l.INVALID;const a=H(e.value,r.value);return a.valid?(((0,l.isDirty)(e)||(0,l.isDirty)(r))&&t.dirty(),{status:t.value,value:a.data}):((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_intersection_types}),l.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}t.ZodIntersection=Q,Q.create=(e,t,n)=>new Q({left:e,right:t,typeName:ve.ZodIntersection,...p(n)});class Y extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.array)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.array,received:n.parsedType}),l.INVALID;if(n.data.length<this._def.items.length)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),l.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new d(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>l.ParseStatus.mergeArray(t,e))):l.ParseStatus.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Y({...this._def,rest:e})}}t.ZodTuple=Y,Y.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y({items:e,typeName:ve.ZodTuple,rest:null,...p(t)})};class G extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.object)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.object,received:n.parsedType}),l.INVALID;const r=[],a=this._def.keyType,o=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new d(n,e,n.path,e)),value:o._parse(new d(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?l.ParseStatus.mergeObjectAsync(t,r):l.ParseStatus.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new G(t instanceof h?{keyType:e,valueType:t,typeName:ve.ZodRecord,...p(n)}:{keyType:P.create(),valueType:e,typeName:ve.ZodRecord,...p(t)})}}t.ZodRecord=G;class X extends h{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.map)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.map,received:n.parsedType}),l.INVALID;const r=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map((([e,t],o)=>({key:r._parse(new d(n,e,n.path,[o,"key"])),value:a._parse(new d(n,t,n.path,[o,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of o){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return l.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of o){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return l.INVALID;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}t.ZodMap=X,X.create=(e,t,n)=>new X({valueType:t,keyType:e,typeName:ve.ZodMap,...p(n)});class ee extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.ZodParsedType.set)return(0,l.addIssueToContext)(n,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.set,received:n.parsedType}),l.INVALID;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&((0,l.addIssueToContext)(n,{code:c.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function o(e){const n=new Set;for(const r of e){if("aborted"===r.status)return l.INVALID;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map(((e,t)=>a._parse(new d(n,e,n.path,t))));return n.common.async?Promise.all(i).then((e=>o(e))):o(i)}min(e,t){return new ee({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new ee({...this._def,maxSize:{value:e,message:s.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=ee,ee.create=(e,t)=>new ee({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...p(t)});class te extends h{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.function)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.function,received:t.parsedType}),l.INVALID;function n(e,n){return(0,l.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:c.ZodIssueCode.invalid_arguments,argumentsError:n}})}function r(e,n){return(0,l.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:c.ZodIssueCode.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof se){const e=this;return(0,l.OK)((async function(...t){const i=new c.ZodError([]),s=await e._def.args.parseAsync(t,a).catch((e=>{throw i.addIssue(n(t,e)),i})),l=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(l,a).catch((e=>{throw i.addIssue(r(l,e)),i}))}))}{const e=this;return(0,l.OK)((function(...t){const i=e._def.args.safeParse(t,a);if(!i.success)throw new c.ZodError([n(t,i.error)]);const s=Reflect.apply(o,this,i.data),l=e._def.returns.safeParse(s,a);if(!l.success)throw new c.ZodError([r(s,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new te({...this._def,args:Y.create(e).rest(U.create())})}returns(e){return new te({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new te({args:e||Y.create([]).rest(U.create()),returns:t||U.create(),typeName:ve.ZodFunction,...p(n)})}}t.ZodFunction=te;class ne extends h{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=ne,ne.create=(e,t)=>new ne({getter:e,typeName:ve.ZodLazy,...p(t)});class re extends h{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_literal,expected:this._def.value}),l.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ae(e,t){return new oe({values:e,typeName:ve.ZodEnum,...p(t)})}t.ZodLiteral=re,re.create=(e,t)=>new re({value:e,typeName:ve.ZodLiteral,...p(t)});class oe extends h{constructor(){super(...arguments),n.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,l.addIssueToContext)(t,{expected:u.util.joinValues(n),received:t.parsedType,code:c.ZodIssueCode.invalid_type}),l.INVALID}if(a(this,n,"f")||o(this,n,new Set(this._def.values),"f"),!a(this,n,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return(0,l.addIssueToContext)(t,{received:t.data,code:c.ZodIssueCode.invalid_enum_value,options:n}),l.INVALID}return(0,l.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return oe.create(e,{...this._def,...t})}exclude(e,t=this._def){return oe.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}t.ZodEnum=oe,n=new WeakMap,oe.create=ae;class ie extends h{constructor(){super(...arguments),r.set(this,void 0)}_parse(e){const t=u.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.ZodParsedType.string&&n.parsedType!==u.ZodParsedType.number){const e=u.util.objectValues(t);return(0,l.addIssueToContext)(n,{expected:u.util.joinValues(e),received:n.parsedType,code:c.ZodIssueCode.invalid_type}),l.INVALID}if(a(this,r,"f")||o(this,r,new Set(u.util.getValidEnumValues(this._def.values)),"f"),!a(this,r,"f").has(e.data)){const e=u.util.objectValues(t);return(0,l.addIssueToContext)(n,{received:n.data,code:c.ZodIssueCode.invalid_enum_value,options:e}),l.INVALID}return(0,l.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=ie,r=new WeakMap,ie.create=(e,t)=>new ie({values:e,typeName:ve.ZodNativeEnum,...p(t)});class se extends h{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.ZodParsedType.promise&&!1===t.common.async)return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.promise,received:t.parsedType}),l.INVALID;const n=t.parsedType===u.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,l.OK)(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=se,se.create=(e,t)=>new se({type:e,typeName:ve.ZodPromise,...p(t)});class le extends h{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{(0,l.addIssueToContext)(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return l.INVALID;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:"dirty"===r.status||"dirty"===t.value?(0,l.DIRTY)(r.value):r}));{if("aborted"===t.value)return l.INVALID;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:"dirty"===r.status||"dirty"===t.value?(0,l.DIRTY)(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?l.INVALID:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?l.INVALID:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,l.isValid)(e))return e;const o=r.transform(e.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>(0,l.isValid)(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}u.util.assertNever(r)}}t.ZodEffects=le,t.ZodTransformer=le,le.create=(e,t,n)=>new le({schema:e,typeName:ve.ZodEffects,effect:t,...p(n)}),le.createWithPreprocess=(e,t,n)=>new le({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...p(n)});class ue extends h{_parse(e){return this._getType(e)===u.ZodParsedType.undefined?(0,l.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=ue,ue.create=(e,t)=>new ue({innerType:e,typeName:ve.ZodOptional,...p(t)});class ce extends h{_parse(e){return this._getType(e)===u.ZodParsedType.null?(0,l.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=ce,ce.create=(e,t)=>new ce({innerType:e,typeName:ve.ZodNullable,...p(t)});class de extends h{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===u.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=de,de.create=(e,t)=>new de({innerType:e,typeName:ve.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...p(t)});class fe extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,l.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new c.ZodError(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new c.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}t.ZodCatch=fe,fe.create=(e,t)=>new fe({innerType:e,typeName:ve.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...p(t)});class pe extends h{_parse(e){if(this._getType(e)!==u.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,l.addIssueToContext)(t,{code:c.ZodIssueCode.invalid_type,expected:u.ZodParsedType.nan,received:t.parsedType}),l.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=pe,pe.create=e=>new pe({typeName:ve.ZodNaN,...p(e)}),t.BRAND=Symbol("zod_brand");class he extends h{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=he;class me extends h{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?l.INVALID:"dirty"===e.status?(t.dirty(),(0,l.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?l.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new me({in:e,out:t,typeName:ve.ZodPipeline})}}t.ZodPipeline=me;class ye extends h{_parse(e){const t=this._def.innerType._parse(e),n=e=>((0,l.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,l.isAsync)(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function ge(e,t={},n){return e?M.create().superRefine(((r,a)=>{var o,i;if(!e(r)){const e="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(i=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===i||i,l="string"==typeof e?{message:e}:e;a.addIssue({code:"custom",...l,fatal:s})}})):M.create()}var ve;t.ZodReadonly=ye,ye.create=(e,t)=>new ye({innerType:e,typeName:ve.ZodReadonly,...p(t)}),t.custom=ge,t.late={object:W.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ve=t.ZodFirstPartyTypeKind||(t.ZodFirstPartyTypeKind={}));t.instanceof=(e,t={message:`Input not instance of ${e.name}`})=>ge((t=>t instanceof e),t);const be=P.create;t.string=be;const _e=N.create;t.number=_e;const we=pe.create;t.nan=we;const ke=O.create;t.bigint=ke;const xe=R.create;t.boolean=xe;const Se=Z.create;t.date=Se;const Ce=A.create;t.symbol=Ce;const Ee=L.create;t.undefined=Ee;const Te=D.create;t.null=Te;const Ie=M.create;t.any=Ie;const ze=U.create;t.unknown=ze;const Pe=F.create;t.never=Pe;const je=$.create;t.void=je;const Ne=V.create;t.array=Ne;const Re=W.create;t.object=Re;const Le=W.strictCreate;t.strictObject=Le;const De=K.create;t.union=De;const Me=J.create;t.discriminatedUnion=Me;const Ue=Q.create;t.intersection=Ue;const Fe=Y.create;t.tuple=Fe;const $e=G.create;t.record=$e;const Ve=X.create;t.map=Ve;const We=ee.create;t.set=We;const Ke=te.create;t.function=Ke;const Je=ne.create;t.lazy=Je;const He=re.create;t.literal=He;const Qe=oe.create;t.enum=Qe;const Ye=ie.create;t.nativeEnum=Ye;const Ge=se.create;t.promise=Ge;const Xe=le.create;t.effect=Xe,t.transformer=Xe;const et=ue.create;t.optional=et;const tt=ce.create;t.nullable=tt;const nt=le.createWithPreprocess;t.preprocess=nt;const rt=me.create;t.pipeline=rt;t.ostring=()=>be().optional();t.onumber=()=>_e().optional();t.oboolean=()=>xe().optional(),t.coerce={string:e=>P.create({...e,coerce:!0}),number:e=>N.create({...e,coerce:!0}),boolean:e=>R.create({...e,coerce:!0}),bigint:e=>O.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},t.NEVER=l.INVALID}(Ke),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(Oe,t),r(Be,t),r(We,t),r(Ze,t),r(Ke,t),r(Ae,t)}(Ne),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t},o=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const i=a(Ne);t.z=i,o(Ne,t),t.default=i}(je),Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.accessTokenSchema=void 0;const Je=je;Pe.accessTokenSchema=Je.z.string().min(1);var He={},Qe={},Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.parseOAuthClientIdUrl=void 0,Ye.parseOAuthClientIdUrl=function(e){if(e.endsWith("/"))throw new TypeError("ClientID must not end with a trailing slash");const t=new URL(e);if("https:"!==t.protocol&&"http:"!==t.protocol)throw new TypeError('ClientID must use the "https:" or "http:" protocol');t.searchParams.sort();const n="/"===t.pathname?t.origin+t.search:t.href;if(n!==e)throw new TypeError(`ClientID must be in canonical form ("${n}", got "${e}")`);return t},Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.parseOAuthLoopbackClientId=Qe.isOAuthClientIdLoopback=void 0;const Ge=Ye;function Xe(e){const t=(0,Ge.parseOAuthClientIdUrl)(e);if("http:"!==t.protocol)throw new TypeError('Loopback ClientID must use the "http:" protocol');if("localhost"!==t.hostname)throw new TypeError('Loopback ClientID must use the "localhost" hostname');if(t.hash)throw new TypeError("Loopback ClientID must not contain a fragment");if(t.username||t.password)throw new TypeError("Loopback ClientID must not contain credentials");if(t.port)throw new TypeError("Loopback ClientID must not contain a port");if("/"!==t.pathname&&t.pathname.endsWith("/"))throw new TypeError("Loopback ClientID must not end with a trailing slash");if(t.pathname.includes("//"))throw new TypeError("Loopback ClientID must not contain any double slashes in its path");return t}Qe.isOAuthClientIdLoopback=function(e){try{return Xe(e),!0}catch{return!1}},Qe.parseOAuthLoopbackClientId=Xe,Object.defineProperty(He,"__esModule",{value:!0}),He.atprotoLoopbackClientMetadata=void 0;const et=Qe,tt=Ye;He.atprotoLoopbackClientMetadata=function(e){if(!(0,et.isOAuthClientIdLoopback)(e))throw new TypeError(`Invalid loopback client ID ${e}`);const{origin:t,pathname:n,searchParams:r}=(0,tt.parseOAuthClientIdUrl)(e);for(const e of r.keys())if("redirect_uri"!==e)throw new TypeError(`Invalid query parameter ${e} in client ID`);const a=r.getAll("redirect_uri");return{client_id:e,client_name:"Loopback client",response_types:["code id_token","code"],grant_types:["authorization_code","implicit","refresh_token"],scope:"openid profile offline_access",redirect_uris:a.length?a:["127.0.0.1","[::1]"].map((e=>Object.assign(new URL(n,t),{hostname:e}).href)),token_endpoint_auth_method:"none",application_type:"native",dpop_bound_access_tokens:!0}};var nt={};Object.defineProperty(nt,"__esModule",{value:!0}),nt.parseOAuthDiscoverableClientId=nt.isOAuthClientIdDiscoverable=void 0;const rt=Ye,at=Ie;function ot(e){const t=(0,rt.parseOAuthClientIdUrl)(e);if("localhost"===t.hostname)throw new TypeError("ClientID must not be a loopback hostname");if("https:"!==t.protocol)throw new TypeError('ClientID must use the "https:" protocol');if(t.hash)throw new TypeError("ClientID must not contain a fragment");if(t.username||t.password)throw new TypeError("ClientID must not contain credentials");if("/"===t.pathname)throw new TypeError('ClientID must contain a path (e.g. "/client-metadata")');if("/"!==t.pathname&&t.pathname.endsWith("/"))throw new TypeError("ClientID must not end with a trailing slash");if(t.pathname.includes("//"))throw new TypeError("ClientID must not contain any double slashes in its path");if((0,at.isIP)(t.hostname))throw new TypeError("ClientID must not be an IP address");return t}nt.isOAuthClientIdDiscoverable=function(e){try{return ot(e),!0}catch{return!1}},nt.parseOAuthDiscoverableClientId=ot;var it={},st={},lt={},ut={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.JwtVerifyError=e.JwtCreateError=e.JwkError=e.ERR_JWT_VERIFY=e.ERR_JWT_CREATE=e.ERR_JWT_INVALID=e.ERR_JWK_NOT_FOUND=e.ERR_JWK_INVALID=e.ERR_JWKS_NO_MATCHING_KEY=void 0,e.ERR_JWKS_NO_MATCHING_KEY="ERR_JWKS_NO_MATCHING_KEY",e.ERR_JWK_INVALID="ERR_JWK_INVALID",e.ERR_JWK_NOT_FOUND="ERR_JWK_NOT_FOUND",e.ERR_JWT_INVALID="ERR_JWT_INVALID",e.ERR_JWT_CREATE="ERR_JWT_CREATE",e.ERR_JWT_VERIFY="ERR_JWT_VERIFY";class t extends TypeError{constructor(t="JWK error",n=e.ERR_JWK_INVALID,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}}e.JwkError=t;class n extends Error{constructor(t="Unable to create JWT",n=e.ERR_JWT_CREATE,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}static from(e,r,a){return e instanceof n?e:new n(a,e instanceof t?e.code:r,{cause:e})}}e.JwtCreateError=n;class r extends Error{constructor(t="Invalid JWT",n=e.ERR_JWT_VERIFY,r){super(t,r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n})}static from(e,n,a){return e instanceof r?e:new r(a,e instanceof t?e.code:n,{cause:e})}}e.JwtVerifyError=r}(ut),Object.defineProperty(lt,"__esModule",{value:!0}),lt.jwkAlgorithms=void 0;const ct=ut,{process:dt}=globalThis,ft=void 0!==dt&&"string"==typeof dt?.versions?.node;lt.jwkAlgorithms=function*(e){if(e.alg)yield e.alg;else switch(e.kty){case"EC":if("enc"!==e.use&&void 0!==e.use||(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),"sig"===e.use||void 0===e.use){const t="crv"in e?e.crv:void 0;switch(t){case"P-256":case"P-384":yield`ES${t.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":ft&&(yield"ES256K");break;default:throw new ct.JwkError(`Unsupported crv "${t}"`)}}return;case"OKP":if(!e.use)throw new ct.JwkError('Missing "use" Parameter value');return yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",void(yield"ECDH-ES+A256KW");case"RSA":return"enc"!==e.use&&void 0!==e.use||(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",ft&&(yield"RSA1_5")),void("sig"!==e.use&&void 0!==e.use||(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512"));case"oct":return"enc"!==e.use&&void 0!==e.use||(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),void("sig"!==e.use&&void 0!==e.use||(yield"HS256",yield"HS384",yield"HS512"));default:throw new ct.JwkError(`Unsupported kty "${e.kty}"`)}};var pt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwkPubSchema=e.jwkValidator=e.jwkSchema=e.jwkUnknownKeySchema=e.jwkSymKeySchema=e.jwkOkpKeySchema=e.jwkEcSecp256k1KeySchema=e.jwkEcKeySchema=e.jwkRsaKeySchema=e.jwkBaseSchema=e.keyUsageSchema=void 0;const t=je;e.keyUsageSchema=t.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]),e.jwkBaseSchema=t.z.object({kty:t.z.string().min(1),alg:t.z.string().min(1).optional(),kid:t.z.string().min(1).optional(),ext:t.z.boolean().optional(),use:t.z.enum(["sig","enc"]).optional(),key_ops:t.z.array(e.keyUsageSchema).optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().min(1).optional(),"x5t#S256":t.z.string().min(1).optional(),x5u:t.z.string().url().optional()}),e.jwkRsaKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("RSA"),alg:t.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:t.z.string().min(1),e:t.z.string().min(1),d:t.z.string().min(1).optional(),p:t.z.string().min(1).optional(),q:t.z.string().min(1).optional(),dp:t.z.string().min(1).optional(),dq:t.z.string().min(1).optional(),qi:t.z.string().min(1).optional(),oth:t.z.array(t.z.object({r:t.z.string().optional(),d:t.z.string().optional(),t:t.z.string().optional()})).nonempty().optional()}),e.jwkEcKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256","ES384","ES512"]).optional(),crv:t.z.enum(["P-256","P-384","P-521"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkEcSecp256k1KeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("EC"),alg:t.z.enum(["ES256K"]).optional(),crv:t.z.enum(["secp256k1"]),x:t.z.string().min(1),y:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkOkpKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("OKP"),alg:t.z.enum(["EdDSA"]).optional(),crv:t.z.enum(["Ed25519","Ed448"]),x:t.z.string().min(1),d:t.z.string().min(1).optional()}),e.jwkSymKeySchema=e.jwkBaseSchema.extend({kty:t.z.literal("oct"),alg:t.z.enum(["HS256","HS384","HS512"]).optional(),k:t.z.string()}),e.jwkUnknownKeySchema=e.jwkBaseSchema.extend({kty:t.z.string().refine((e=>"RSA"!==e&&"EC"!==e&&"OKP"!==e&&"oct"!==e))}),e.jwkSchema=t.z.union([e.jwkUnknownKeySchema,e.jwkRsaKeySchema,e.jwkEcKeySchema,e.jwkEcSecp256k1KeySchema,e.jwkOkpKeySchema,e.jwkSymKeySchema]),e.jwkValidator=e.jwkSchema.refine((e=>null!=e.use||null!=e.key_ops),"use or key_ops required").refine((e=>!e.use||!e.key_ops||e.key_ops.every((t=>"sig"===e.use?"sign"===t||"verify"===t:"encrypt"===t||"decrypt"===t))),"use and key_ops must be consistent"),e.jwkPubSchema=e.jwkValidator.refine((e=>null!=e.kid),"kid is required").refine((e=>!("k"in e)&&!("d"in e)),"private key not allowed")}(pt);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.jwksPubSchema=ht.jwksSchema=void 0;const mt=je,yt=pt;ht.jwksSchema=mt.z.object({keys:mt.z.array(yt.jwkSchema)}),ht.jwksPubSchema=mt.z.object({keys:mt.z.array(yt.jwkPubSchema)});var gt={},vt={},bt={};class _t{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class wt{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return xt(this,e)}}class kt{constructor(e){this.decoders=e}or(e){return xt(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const xt=(e,t)=>new kt({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class St{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new _t(e,t,n),this.decoder=new wt(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ct=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>(({name:e,prefix:t,encode:n,decode:r})=>new St(e,t,n,r))({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],a=(1<<n)-1;let o="",i=0,s=0;for(let r=0;r<e.length;++r)for(s=s<<8|e[r],i+=8;i>n;)i-=n,o+=t[a&s>>i];if(i&&(o+=t[a&s<<n-i]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const a={};for(let e=0;e<t.length;++e)a[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const i=new Uint8Array(o*n/8|0);let s=0,l=0,u=0;for(let t=0;t<o;++t){const o=a[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);l=l<<n|o,s+=n,s>=8&&(s-=8,i[u++]=255&l>>s)}if(s>=n||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return i})(t,r,n,e)}),Et=Ct({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Tt=Ct({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),It=Ct({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),zt=Ct({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Pt=t(Object.freeze({__proto__:null,base64:Et,base64pad:Tt,base64url:It,base64urlpad:zt}));Object.defineProperty(bt,"__esModule",{value:!0}),bt.segmentedStringRefinementFactory=bt.jwtCharsRefinement=bt.parseB64uJson=bt.cachedGetter=bt.matchesAny=bt.preferredOrderCmp=bt.isDefined=void 0;const jt=Pt,Nt=je;bt.isDefined=e=>void 0!==e;bt.preferredOrderCmp=e=>(t,n)=>{const r=e.indexOf(t),a=e.indexOf(n);return r===a?0:-1===r?1:-1===a?-1:r-a},bt.matchesAny=function(e){return null==e?e=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e};bt.cachedGetter=(e,t)=>function(){const t=e.call(this);return Object.defineProperty(this,e.name,{get:()=>t,enumerable:!0,configurable:!0}),t};const Ot=new TextDecoder;bt.parseB64uJson=function(e){const t=jt.base64url.baseDecode(e),n=Ot.decode(t);return JSON.parse(n)};bt.jwtCharsRefinement=(e,t)=>{let n;for(let r=0;r<e.length;r++)if(n=e.charCodeAt(r),!(65<=n&&n<=90||97<=n&&n<=122||48<=n&&n<=57||45===n||95===n||46===n)){const n=String.fromCodePoint(e.codePointAt(r));return t.addIssue({code:Nt.ZodIssueCode.custom,message:`Invalid character "${n}" in JWT at position ${r}`})}};bt.segmentedStringRefinementFactory=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(0|e)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const n=e*t+(e-1),r="Invalid JWT format";return(a,o)=>{if(a.length<n)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: too short`}),!1;let i=0;for(let n=0;n<e-1;n++){const s=a.indexOf(".",i);if(-1===s)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: expected ${e} segments, got ${n+1}`}),!1;if(s-i<t)return o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: segment ${n+1} is too short`}),!1;i=s+1}return-1!==a.indexOf(".",i)?(o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: too many segments`}),!1):!(a.length-i<t)||(o.addIssue({code:Nt.ZodIssueCode.custom,message:`${r}: last segment is too short`}),!1)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jwtPayloadSchema=e.jwtHeaderSchema=e.isUnsignedJwt=e.unsignedJwtSchema=e.isSignedJwt=e.signedJwtSchema=void 0;const t=je,n=pt,r=bt;e.signedJwtSchema=t.z.string().superRefine(r.jwtCharsRefinement).superRefine((0,r.segmentedStringRefinementFactory)(3));e.isSignedJwt=t=>e.signedJwtSchema.safeParse(t).success,e.unsignedJwtSchema=t.z.string().superRefine(r.jwtCharsRefinement).superRefine((0,r.segmentedStringRefinementFactory)(2));e.isUnsignedJwt=t=>e.unsignedJwtSchema.safeParse(t).success,e.jwtHeaderSchema=t.z.object({alg:t.z.string(),jku:t.z.string().url().optional(),jwk:t.z.object({kty:t.z.string(),crv:t.z.string().optional(),x:t.z.string().optional(),y:t.z.string().optional(),e:t.z.string().optional(),n:t.z.string().optional()}).optional(),kid:t.z.string().optional(),x5u:t.z.string().optional(),x5c:t.z.array(t.z.string()).optional(),x5t:t.z.string().optional(),"x5t#S256":t.z.string().optional(),typ:t.z.string().optional(),cty:t.z.string().optional(),crit:t.z.array(t.z.string()).optional()}),e.jwtPayloadSchema=t.z.object({iss:t.z.string().optional(),aud:t.z.union([t.z.string(),t.z.array(t.z.string()).nonempty()]).optional(),sub:t.z.string().optional(),exp:t.z.number().int().optional(),nbf:t.z.number().int().optional(),iat:t.z.number().int().optional(),jti:t.z.string().optional(),htm:t.z.string().optional(),htu:t.z.string().optional(),ath:t.z.string().optional(),acr:t.z.string().optional(),azp:t.z.string().optional(),amr:t.z.array(t.z.string()).optional(),cnf:t.z.object({kid:t.z.string().optional(),jwk:n.jwkPubSchema.optional(),jwe:t.z.string().optional(),jku:t.z.string().url().optional(),jkt:t.z.string().optional(),"x5t#S256":t.z.string().optional(),osc:t.z.string().optional()}).optional(),client_id:t.z.string().optional(),scope:t.z.string().optional(),nonce:t.z.string().optional(),at_hash:t.z.string().optional(),c_hash:t.z.string().optional(),s_hash:t.z.string().optional(),auth_time:t.z.number().int().optional(),name:t.z.string().optional(),family_name:t.z.string().optional(),given_name:t.z.string().optional(),middle_name:t.z.string().optional(),nickname:t.z.string().optional(),preferred_username:t.z.string().optional(),gender:t.z.string().optional(),picture:t.z.string().url().optional(),profile:t.z.string().url().optional(),website:t.z.string().url().optional(),birthdate:t.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:t.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:t.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/).optional(),updated_at:t.z.number().int().optional(),email:t.z.string().optional(),email_verified:t.z.boolean().optional(),phone_number:t.z.string().optional(),phone_number_verified:t.z.boolean().optional(),address:t.z.object({formatted:t.z.string().optional(),street_address:t.z.string().optional(),locality:t.z.string().optional(),region:t.z.string().optional(),postal_code:t.z.string().optional(),country:t.z.string().optional()}).optional(),authorization_details:t.z.array(t.z.object({type:t.z.string(),locations:t.z.array(t.z.string()).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}).passthrough()).optional()})}(vt),Object.defineProperty(gt,"__esModule",{value:!0}),gt.unsafeDecodeJwt=void 0;const Rt=ut,Zt=vt,At=bt;gt.unsafeDecodeJwt=function(e){const{0:t,1:n,length:r}=e.split(".");if(r>3||r<2)throw new Rt.JwtVerifyError(void 0,Rt.ERR_JWT_INVALID);const a=Zt.jwtHeaderSchema.parse((0,At.parseB64uJson)(t));if(2===r&&"none"!==a?.alg)throw new Rt.JwtVerifyError(void 0,Rt.ERR_JWT_INVALID);return{header:a,payload:Zt.jwtPayloadSchema.parse((0,At.parseB64uJson)(n))}};var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});var Dt={},Mt=e&&e.__runInitializers||function(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0},Ut=e&&e.__esDecorate||function(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(d.get=s),(s=i(y.set))&&(d.set=s),(s=i(y.init))&&a.unshift(s)}else(s=i(y))&&("field"===l?a.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.Key=void 0;const Ft=lt,$t=ut,Vt=pt,Bt=bt;let Wt=(()=>{var e;let t,n,r,a=[];return e=class{constructor(e){if(Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(Mt(this,a),e)}),!e.use)throw new $t.JwkError('Missing "use" Parameter value')}get isPrivate(){const{jwk:e}=this;return"d"in e&&void 0!==e.d||"k"in e&&void 0!==e.k}get isSymetric(){const{jwk:e}=this;return"k"in e&&void 0!==e.k}get privateJwk(){return this.isPrivate?this.jwk:void 0}get publicJwk(){if(!this.isSymetric){if(this.isPrivate){const{d:e,...t}=this.jwk;return t}return this.jwk}}get bareJwk(){if(this.isSymetric)return;const{kty:e,crv:t,e:n,n:r,x:a,y:o}=this.jwk;return Vt.jwkSchema.parse({crv:t,e:n,kty:e,n:r,x:a,y:o})}get use(){return this.jwk.use}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Array.from((0,Ft.jwkAlgorithms)(this.jwk))}},(()=>{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[Bt.cachedGetter],n=[Bt.cachedGetter],r=[Bt.cachedGetter],Ut(e,null,t,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:e=>"publicJwk"in e,get:e=>e.publicJwk},metadata:o},null,a),Ut(e,null,n,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:e=>"bareJwk"in e,get:e=>e.bareJwk},metadata:o},null,a),Ut(e,null,r,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:e=>"algorithms"in e,get:e=>e.algorithms},metadata:o},null,a),o&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),e})();Dt.Key=Wt;var Kt={},qt=e&&e.__runInitializers||function(e,t,n){for(var r=arguments.length>2,a=0;a<t.length;a++)n=r?t[a].call(e,n):t[a].call(e);return r?n:void 0},Jt=e&&e.__esDecorate||function(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(d.get=s),(s=i(y.set))&&(d.set=s),(s=i(y.init))&&a.unshift(s)}else(s=i(y))&&("field"===l?a.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.Keyset=void 0;const Ht=ut,Qt=gt,Yt=bt,Gt=e=>e.privateJwk,Xt=e=>e.publicJwk;let en=(()=>{var e;let t,n,r,a=[];return e=class{constructor(t,n=(t instanceof e?[...t.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"])){Object.defineProperty(this,"preferredSigningAlgorithms",{enumerable:!0,configurable:!0,writable:!0,value:(qt(this,a),n)}),Object.defineProperty(this,"keys",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=[],o=new Set;for(const e of t)if(e&&(r.push(e),e.kid)){if(o.has(e.kid))throw new Ht.JwkError(`Duplicate key: ${e.kid}`);o.add(e.kid)}this.keys=Object.freeze(r)}get size(){return this.keys.length}get signAlgorithms(){const e=new Set;for(const t of this)if("sig"===t.use)for(const n of t.algorithms)e.add(n);return Object.freeze([...e].sort((0,Yt.preferredOrderCmp)(this.preferredSigningAlgorithms)))}get publicJwks(){return{keys:Array.from(this,Xt).filter(Yt.isDefined)}}get privateJwks(){return{keys:Array.from(this,Gt).filter(Yt.isDefined)}}has(e){return this.keys.some((t=>t.kid===e))}get(e){for(const t of this.list(e))return t;throw new Ht.JwkError(`Key not found ${e.kid||e.alg||"<unknown>"}`,Ht.ERR_JWK_NOT_FOUND)}*list(e){if(0!==e.kid?.length&&0!==e.alg?.length)for(const t of this)if(!e.use||t.use===e.use){if(Array.isArray(e.kid)){if(!t.kid||!e.kid.includes(t.kid))continue}else if(e.kid&&t.kid!==e.kid)continue;if(Array.isArray(e.alg)){if(!e.alg.some((e=>t.algorithms.includes(e))))continue}else if("string"==typeof e.alg&&!t.algorithms.includes(e.alg))continue;yield t}}findKey({kid:e,alg:t,use:n}){const r=[];for(const a of this.list({kid:e,alg:t,use:n}))if(a.isPrivate){if("string"==typeof t)return[a,t];r.push(a)}const a=(0,Yt.matchesAny)(t),o=r.map((e=>[e,e.algorithms.filter(a)]));for(const e of this.preferredSigningAlgorithms)for(const[t,n]of o)if(n.includes(e))return[t,e];for(const[e,t]of o)for(const n of t)return[e,n];throw new Ht.JwkError(`No singing key found for ${e||t||n||"<unknown>"}`,Ht.ERR_JWK_NOT_FOUND)}[(t=[Yt.cachedGetter],n=[Yt.cachedGetter],r=[Yt.cachedGetter],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:e,kid:t,...n},r){try{const[a,o]=this.findKey({alg:e,kid:t,use:"sig"}),i={...n,alg:o,kid:a.kid};return"function"==typeof r&&(r=await r(i,a)),await a.createJwt(i,r)}catch(e){throw Ht.JwtCreateError.from(e)}}async verifyJwt(e,t){const{header:n}=(0,Qt.unsafeDecodeJwt)(e),{kid:r,alg:a}=n,o=[];for(const n of this.list({kid:r,alg:a}))try{return{...await n.verifyJwt(e,t),key:n}}catch(e){o.push(e)}switch(o.length){case 0:throw new Ht.JwtVerifyError("No key matched",Ht.ERR_JWKS_NO_MATCHING_KEY);case 1:throw Ht.JwtVerifyError.from(o[0],Ht.ERR_JWT_INVALID);default:throw Ht.JwtVerifyError.from(o,Ht.ERR_JWT_INVALID)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Jt(e,null,t,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:e=>"signAlgorithms"in e,get:e=>e.signAlgorithms},metadata:o},null,a),Jt(e,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:e=>"publicJwks"in e,get:e=>e.publicJwks},metadata:o},null,a),Jt(e,null,r,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:e=>"privateJwks"in e,get:e=>e.privateJwks},metadata:o},null,a),o&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),e})();Kt.Keyset=en,function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(lt,t),r(ut,t),r(pt,t),r(ht,t),r(gt,t),r(Lt,t),r(vt,t),r(Dt,t),r(Kt,t),r(bt,t)}(st);var tn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationDetailsSchema=e.oauthAuthorizationDetailSchema=void 0;const t=je;e.oauthAuthorizationDetailSchema=t.z.object({type:t.z.string(),locations:t.z.array(t.z.string().url()).optional(),actions:t.z.array(t.z.string()).optional(),datatypes:t.z.array(t.z.string()).optional(),identifier:t.z.string().optional(),privileges:t.z.array(t.z.string()).optional()}),e.oauthAuthorizationDetailsSchema=t.z.array(e.oauthAuthorizationDetailSchema)}(tn);var nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.oauthClientIdSchema=void 0;const rn=je;nn.oauthClientIdSchema=rn.z.string().min(1);var an={};Object.defineProperty(an,"__esModule",{value:!0}),an.oidcClaimsParameterSchema=void 0;const on=je;an.oidcClaimsParameterSchema=on.z.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]);var sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.oidcClaimsPropertiesSchema=void 0;const ln=je,un=ln.z.union([ln.z.string(),ln.z.number(),ln.z.boolean()]);sn.oidcClaimsPropertiesSchema=ln.z.object({essential:ln.z.boolean().optional(),value:un.optional(),values:ln.z.array(un).optional()});var cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.oidcEntityTypeSchema=void 0;const dn=je;cn.oidcEntityTypeSchema=dn.z.enum(["userinfo","id_token"]),Object.defineProperty(it,"__esModule",{value:!0}),it.oauthAuthenticationRequestParametersSchema=void 0;const fn=st,pn=je,hn=tn,mn=nn,yn=an,gn=sn,vn=cn;it.oauthAuthenticationRequestParametersSchema=pn.z.object({client_id:mn.oauthClientIdSchema,state:pn.z.string().optional(),nonce:pn.z.string().optional(),dpop_jkt:pn.z.string().optional(),response_type:pn.z.enum(["code","token","id_token","none","code token","code id_token","id_token token","code id_token token"]),response_mode:pn.z.enum(["query","fragment","form_post"]).optional(),code_challenge:pn.z.string().optional(),code_challenge_method:pn.z.enum(["S256","plain"]).default("S256").optional(),redirect_uri:pn.z.string().url().optional(),scope:pn.z.string().regex(/^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+)*$/).optional(),max_age:pn.z.number().int().min(0).optional(),claims:pn.z.record(vn.oidcEntityTypeSchema,pn.z.record(yn.oidcClaimsParameterSchema,pn.z.union([pn.z.literal(null),gn.oidcClaimsPropertiesSchema]))).optional(),login_hint:pn.z.string().min(1).optional(),ui_locales:pn.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?( [a-z]{2}(-[A-Z]{2})?)*$/).optional(),id_token_hint:fn.signedJwtSchema.optional(),display:pn.z.enum(["page","popup","touch"]).optional(),prompt:pn.z.enum(["none","login","consent","select_account"]).optional(),authorization_details:hn.oauthAuthorizationDetailsSchema.optional()});var bn={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.oauthIssuerIdentifierSchema=void 0;const wn=je,kn=Te,xn=Ie;_n.oauthIssuerIdentifierSchema=wn.z.string().superRefine(((e,t)=>{e.endsWith("/")&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"});const n=(0,xn.safeUrl)(e);if(!n)return t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Invalid url"});"https:"!==n.protocol&&(kn.ALLOW_UNSECURE_ORIGINS&&"http:"===n.protocol||t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer must be an HTTPS URL"})),(n.username||n.password)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),(n.hash||n.search)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"});e!==("/"===n.pathname?n.origin:n.href)&&t.addIssue({code:wn.z.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"})})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema=void 0;const t=je,n=_n;e.oauthAuthorizationServerMetadataSchema=t.z.object({issuer:n.oauthIssuerIdentifierSchema,claims_supported:t.z.array(t.z.string()).optional(),claims_locales_supported:t.z.array(t.z.string()).optional(),claims_parameter_supported:t.z.boolean().optional(),request_parameter_supported:t.z.boolean().optional(),request_uri_parameter_supported:t.z.boolean().optional(),require_request_uri_registration:t.z.boolean().optional(),scopes_supported:t.z.array(t.z.string()).optional(),subject_types_supported:t.z.array(t.z.string()).optional(),response_types_supported:t.z.array(t.z.string()).optional(),response_modes_supported:t.z.array(t.z.string()).optional(),grant_types_supported:t.z.array(t.z.string()).optional(),code_challenge_methods_supported:t.z.array(t.z.string()).min(1).optional(),ui_locales_supported:t.z.array(t.z.string()).optional(),id_token_signing_alg_values_supported:t.z.array(t.z.string()).optional(),display_values_supported:t.z.array(t.z.string()).optional(),request_object_signing_alg_values_supported:t.z.array(t.z.string()).optional(),authorization_response_iss_parameter_supported:t.z.boolean().optional(),authorization_details_types_supported:t.z.array(t.z.string()).optional(),request_object_encryption_alg_values_supported:t.z.array(t.z.string()).optional(),request_object_encryption_enc_values_supported:t.z.array(t.z.string()).optional(),jwks_uri:t.z.string().url().optional(),authorization_endpoint:t.z.string().url(),token_endpoint:t.z.string().url(),token_endpoint_auth_methods_supported:t.z.array(t.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:t.z.array(t.z.string()).optional(),revocation_endpoint:t.z.string().url().optional(),introspection_endpoint:t.z.string().url().optional(),pushed_authorization_request_endpoint:t.z.string().url().optional(),require_pushed_authorization_requests:t.z.boolean().optional(),userinfo_endpoint:t.z.string().url().optional(),end_session_endpoint:t.z.string().url().optional(),registration_endpoint:t.z.string().url().optional(),dpop_signing_alg_values_supported:t.z.array(t.z.string()).optional(),protected_resources:t.z.array(t.z.string().url()).optional(),client_id_metadata_document_supported:t.z.boolean().optional()}),e.oauthAuthorizationServerMetadataValidator=e.oauthAuthorizationServerMetadataSchema.superRefine(((e,n)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&n.addIssue({code:t.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})})).superRefine(((e,n)=>{e.response_types_supported&&(e.response_types_supported.includes("code")||n.addIssue({code:t.z.ZodIssueCode.custom,message:'Response type "code" is required'}))}))}(bn);var Sn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.oauthClientCredentialsSchema=e.oauthClientCredentialsSecretPostSchema=e.oauthClientCredentialsJwtBearerSchema=void 0;const t=je,n=st,r=nn,a=Te;e.oauthClientCredentialsJwtBearerSchema=t.z.object({client_id:r.oauthClientIdSchema,client_assertion_type:t.z.literal(a.CLIENT_ASSERTION_TYPE_JWT_BEARER),client_assertion:n.signedJwtSchema}),e.oauthClientCredentialsSecretPostSchema=t.z.object({client_id:r.oauthClientIdSchema,client_secret:t.z.string()}),e.oauthClientCredentialsSchema=t.z.union([e.oauthClientCredentialsJwtBearerSchema,e.oauthClientCredentialsSecretPostSchema])}(Sn);var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.oauthClientIdentificationSchema=void 0;const En=je,Tn=nn,In=Sn;Cn.oauthClientIdentificationSchema=En.z.union([In.oauthClientCredentialsSchema,En.z.object({client_id:Tn.oauthClientIdSchema})]);var zn={},Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.oauthEndpointAuthMethod=void 0;const jn=je;Pn.oauthEndpointAuthMethod=jn.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]);var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.oauthGrantTypeSchema=void 0;const On=je;Nn.oauthGrantTypeSchema=On.z.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]);var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.oauthResponseTypeSchema=void 0;const Zn=je;Rn.oauthResponseTypeSchema=Zn.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),Object.defineProperty(zn,"__esModule",{value:!0}),zn.oauthClientMetadataSchema=void 0;const An=st,Ln=je,Dn=nn,Mn=Pn,Un=Nn,Fn=Rn;zn.oauthClientMetadataSchema=Ln.z.object({redirect_uris:Ln.z.array(Ln.z.string().url()).nonempty(),response_types:Ln.z.array(Fn.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:Ln.z.array(Un.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:Ln.z.string().optional(),token_endpoint_auth_method:Mn.oauthEndpointAuthMethod.default("none").optional(),token_endpoint_auth_signing_alg:Ln.z.string().optional(),userinfo_signed_response_alg:Ln.z.string().optional(),userinfo_encrypted_response_alg:Ln.z.string().optional(),jwks_uri:Ln.z.string().url().optional(),jwks:An.jwksPubSchema.optional(),application_type:Ln.z.enum(["web","native"]).default("web").optional(),subject_type:Ln.z.enum(["public","pairwise"]).default("public").optional(),request_object_signing_alg:Ln.z.string().optional(),id_token_signed_response_alg:Ln.z.string().optional(),authorization_signed_response_alg:Ln.z.string().default("RS256").optional(),authorization_encrypted_response_enc:Ln.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:Ln.z.string().optional(),client_id:Dn.oauthClientIdSchema.optional(),client_name:Ln.z.string().optional(),client_uri:Ln.z.string().url().optional(),policy_uri:Ln.z.string().url().optional(),tos_uri:Ln.z.string().url().optional(),logo_uri:Ln.z.string().url().optional(),default_max_age:Ln.z.number().optional(),require_auth_time:Ln.z.boolean().optional(),contacts:Ln.z.array(Ln.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:Ln.z.boolean().optional(),dpop_bound_access_tokens:Ln.z.boolean().optional(),authorization_details_types:Ln.z.array(Ln.z.string()).optional()});var $n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.OAUTH_ENDPOINT_NAMES=void 0,$n.OAUTH_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"];var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.oauthParResponseSchema=void 0;const Bn=je;Vn.oauthParResponseSchema=Bn.z.object({request_uri:Bn.z.string()});var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.oauthProtectedResourceMetadataSchema=void 0;const Kn=je,qn=_n;Wn.oauthProtectedResourceMetadataSchema=Kn.z.object({resource:Kn.z.string().url(),authorization_servers:Kn.z.array(qn.oauthIssuerIdentifierSchema).optional(),jwks_uri:Kn.z.string().url().optional(),scopes_supported:Kn.z.array(Kn.z.string()).optional(),bearer_methods_supported:Kn.z.array(Kn.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:Kn.z.array(Kn.z.string()).optional(),resource_documentation:Kn.z.string().url().optional(),resource_policy_uri:Kn.z.string().url().optional(),resource_tos_uri:Kn.z.string().url().optional()});var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.oauthResponseModeSchema=void 0;const Hn=je;Jn.oauthResponseModeSchema=Hn.z.enum(["query","fragment","form_post"]);var Qn={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.oauthTokenTypeSchema=void 0;const Gn=je;Yn.oauthTokenTypeSchema=Gn.z.union([Gn.z.string().regex(/^DPoP$/i).transform((()=>"DPoP")),Gn.z.string().regex(/^Bearer$/i).transform((()=>"Bearer"))]),Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.oauthTokenResponseSchema=void 0;const Xn=st,er=je,tr=tn,nr=Yn;function rr({url:e,proto:t=!1,host:n=!0,path:r=!1,query:a=!1,hash:o=!1,as:i="span",...s}){const c=l.useMemo((()=>new URL(e)),[e]);return u.jsxs(i,{...s,children:[t&&u.jsx(ar,{value:`${c.protocol}//`,...!0===t?null:t}),n&&u.jsx(ar,{value:c.host,...!0===n?{faded:!1,bold:!0}:n}),r&&u.jsx(ar,{value:c.pathname,...!0===r?null:r}),a&&u.jsx(ar,{value:c.search,...!0===a?null:a}),o&&u.jsx(ar,{value:c.hash,...!0===o?null:o})]})}function ar({value:e,faded:t=!0,bold:n=!1}){const r=n?"b":"span";return u.jsx(r,{className:t?"opacity-50":"",children:e})}function or({clientId:e,clientMetadata:t,as:n="span",...r}){return Ee.isOAuthClientIdLoopback(e)?u.jsx(n,{...r,children:"An application on your device"}):Ee.isOAuthClientIdDiscoverable(e)?u.jsx(rr,{as:n,...r,url:e,proto:!0,path:!0}):u.jsx(n,{...r,children:t.client_name||e})}function ir({clientId:e,clientMetadata:t,as:n="span",...r}){return t.client_name?u.jsx(n,{...r,children:t.client_name}):u.jsx(or,{clientId:e,clientMetadata:t,as:n,...r})}Qn.oauthTokenResponseSchema=er.z.object({access_token:er.z.string(),token_type:nr.oauthTokenTypeSchema,issuer:er.z.string().url().optional(),sub:er.z.string().optional(),scope:er.z.string().optional(),id_token:Xn.signedJwtSchema.optional(),refresh_token:er.z.string().optional(),expires_in:er.z.number().optional(),authorization_details:tr.oauthAuthorizationDetailsSchema.optional()}).passthrough(),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(Te,t),r(Ie,t),r(Pe,t),r(He,t),r(nt,t),r(Qe,t),r(it,t),r(tn,t),r(bn,t),r(Sn,t),r(nn,t),r(Cn,t),r(zn,t),r(Pn,t),r($n,t),r(Nn,t),r(_n,t),r(Vn,t),r(Wn,t),r(Jn,t),r(Rn,t),r(Qn,t),r(Yn,t),r(an,t),r(sn,t),r(cn,t)}(Ee);const sr=e=>function(t){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t,children:u.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:e})})},lr=sr("M11.14 4.494a.995.995 0 0 1 1.72 0l7.001 12.008a.996.996 0 0 1-.86 1.498H4.999a.996.996 0 0 1-.86-1.498L11.14 4.494Zm3.447-1.007c-1.155-1.983-4.019-1.983-5.174 0L2.41 15.494C1.247 17.491 2.686 20 4.998 20h14.004c2.312 0 3.751-2.509 2.587-4.506L14.587 3.487ZM13 9.019a1 1 0 1 0-2 0v2.994a1 1 0 1 0 2 0V9.02Zm-1 4.731a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Z"),ur=l.forwardRef((({className:e,icon:t,append:n,children:r,...a},o)=>u.jsxs("div",{ref:o,className:C("pl-1 pr-2","min-h-12","flex items-center justify-stretch","rounded-lg","text-gray-700","dark:text-gray-100",e),...a,children:[u.jsx("div",{className:C("self-start shrink-0 grow-0","w-8 h-12","flex items-center justify-center","text-gray-500"),children:t}),u.jsx("div",{className:"flex-auto relative",children:r}),n&&u.jsx("div",{className:"grow-0 shrink-0",children:n})]})));function cr({children:e,className:t,role:n="alert",...r}){return u.jsx(ur,{className:C("alert"===n?"bg-error":"bg-gray-100 dark:bg-slate-800",t),icon:u.jsx(lr,{className:C("fill-current h-4 w-4","alert"===n?"text-white":"text-brand")}),...r,children:u.jsx("div",{className:C("py-2 overflow-hidden","alert"===n?"text-white":void 0),children:e})})}const dr=l.forwardRef((({actions:e,cancel:t,append:n,className:r,children:a,error:o,...i},s)=>u.jsxs("form",{ref:s,className:C("flex flex-col py-4 space-y-4",r),...i,children:[u.jsx("div",{className:"space-y-4",children:a}),n&&u.jsx("div",{children:n},"append"),o&&u.jsx(cr,{role:"alert",children:o},"error"),(e||t)&&u.jsxs("div",{className:"flex flex-wrap flex-row-reverse items-center justify-end space-x-reverse space-x-2",children:[e,u.jsx("div",{className:"flex-auto"}),t]},"buttons")]}))),fr=l.forwardRef((({title:e,children:t,...n},r)=>u.jsxs("fieldset",{ref:r,...n,children:[e&&u.jsx("p",{className:"mb-1 text-slate-600 dark:text-slate-400 text-sm font-medium",children:e},"title"),u.jsx("div",{className:"flex flex-col space-y-4",children:t})]})));function pr({account:e,clientId:t,clientMetadata:n,clientTrusted:r,onAccept:a,acceptLabel:o="Accept",onReject:i,rejectLabel:s="Deny access",onBack:l,backLabel:c="Back",...d}){return u.jsx(dr,{onSubmit:e=>{e.preventDefault(),a()},cancel:l&&u.jsx(Ce,{onClick:l,children:c}),actions:u.jsxs(u.Fragment,{children:[u.jsx(Ce,{type:"submit",color:"brand",children:o}),u.jsx(Ce,{onClick:i,children:s})]}),...d,children:u.jsxs(fr,{title:u.jsx(ir,{clientId:t,clientMetadata:n}),children:[r&&n.logo_uri&&u.jsx("div",{className:"flex items-center justify-center",children:u.jsx("img",{crossOrigin:"anonymous",src:n.logo_uri,alt:n.client_name,className:"w-16 h-16 rounded-full"})},"logo"),u.jsxs("p",{children:[u.jsx(or,{clientId:t,clientMetadata:n})," ","is asking for permission to access your"," ",u.jsx(Se,{account:e})," account."]}),u.jsxs("p",{children:["By clicking ",u.jsx("b",{children:o}),", you allow this application to access your information in accordance to their"," ",u.jsx("a",{href:n.tos_uri,rel:"nofollow noopener",target:"_blank",className:"text-brand underline",children:"terms of service"})," and ",u.jsx("a",{href:n.policy_uri,rel:"nofollow noopener",target:"_blank",className:"text-brand underline",children:"privacy policy"}),"."]})]})})}function hr({clientId:e,clientMetadata:t,clientTrusted:n,session:r,onAccept:a,onReject:o,onBack:i}){const{account:s}=r;return u.jsx(E,{title:"Authorize",subtitle:u.jsxs(u.Fragment,{children:["Grant access to your"," ",u.jsx("b",{className:"text-black dark:text-white",children:s.preferred_username||s.email||s.sub})," ","account"]}),children:u.jsx(pr,{clientId:e,clientMetadata:t,clientTrusted:n,account:s,onBack:i,onAccept:a,onReject:o})})}const mr=sr("M12 4a8 8 0 1 0 4.21 14.804 1 1 0 0 1 1.054 1.7A9.958 9.958 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 1.104-.27 2.31-.949 3.243-.716.984-1.849 1.6-3.331 1.465a4.207 4.207 0 0 1-2.93-1.585c-.94 1.21-2.388 1.94-3.985 1.715-2.53-.356-4.04-2.91-3.682-5.458.358-2.547 2.514-4.586 5.044-4.23.905.127 1.68.536 2.286 1.126a1 1 0 0 1 1.964.368l-.515 3.545v.002a2.222 2.222 0 0 0 1.999 2.526c.75.068 1.212-.21 1.533-.65.358-.493.566-1.245.566-2.067a8 8 0 0 0-8-8Zm-.112 5.13c-1.195-.168-2.544.819-2.784 2.529-.24 1.71.784 3.03 1.98 3.198 1.195.168 2.543-.819 2.784-2.529.24-1.71-.784-3.03-1.98-3.198Z"),yr=sr("M8.293 3.293a1 1 0 0 1 1.414 0l8 8a1 1 0 0 1 0 1.414l-8 8a1 1 0 0 1-1.414-1.414L15.586 12 8.293 4.707a1 1 0 0 1 0-1.414Z"),gr=l.forwardRef((({className:e,onFocus:t,icon:n,onBlur:r,...a},o)=>{const[i,s]=l.useState(!1);return u.jsx(ur,{ref:o,className:C("bg-gray-100 has-[:focus]:bg-slate-200","dark:bg-slate-800 dark:has-[:focus]:bg-slate-700","outline-none","border-solid border-2 border-transparent hover:border-gray-400 has-[:focus]:border-brand hover:has-[:focus]:border-brand","dark:hover:border-gray-500",e),onFocus:e=>{t?.(e),e.defaultPrevented||s(!0)},onBlur:e=>{r?.(e),e.defaultPrevented||s(!1)},icon:u.jsx("div",{className:i?"text-brand":void 0,children:n}),...a})}));function vr({accounts:e,onAccount:t,accountAria:n=(e=>`Sign in as ${e.name}`),onOther:r,otherLabel:a="Another account",otherAria:o="Login to account that is not listed",onBack:i,backAria:s,backLabel:l=s,...c}){return u.jsx(dr,{...c,cancel:i&&u.jsx(Ce,{onClick:i,"aria-label":s,children:l}),children:u.jsxs(fr,{title:"Sign in as...",children:[e.map((e=>{const[r,a]=[e.name,e.preferred_username,e.email,e.sub].filter(Boolean);return u.jsx(gr,{onClick:()=>t(e),role:"button","aria-label":n(e),icon:e.picture?u.jsx("img",{crossOrigin:"anonymous",src:e.picture,alt:r,className:"-ml-1 w-6 h-6 rounded-full"}):u.jsxs("svg",{className:"-ml-1 w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"none",children:[u.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#0070ff"}),u.jsx("circle",{cx:"12",cy:"9.5",r:"3.5",fill:"#fff"}),u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",fill:"#fff",d:"M 12.058 22.784 C 9.422 22.784 7.007 21.836 5.137 20.262 C 5.667 17.988 8.534 16.25 11.99 16.25 C 15.494 16.25 18.391 18.036 18.864 20.357 C 17.01 21.874 14.64 22.784 12.058 22.784 Z"})]}),append:u.jsx(yr,{className:"h-4"}),children:u.jsxs("span",{className:"flex flex-wrap items-center",children:[u.jsx("span",{className:"font-medium truncate mr-2",children:r}),a&&u.jsx("span",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate",children:a})]})},e.sub)})),r&&u.jsx(gr,{onClick:r,"aria-label":o,role:"button",append:u.jsx(yr,{className:"h-4"}),icon:u.jsx(mr,{className:"h-4"}),children:u.jsx("span",{className:"truncate text-gray-700 dark:text-gray-400",children:a})})]})})}const br=sr("M7 7a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h1V7Zm-1 4v9h12v-9H6Zm9-2H9V7a3 3 0 1 1 6 0v2Zm-3 4a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z"),_r=()=>Math.random().toString(36).slice(2);function wr({id:e,children:t,className:n,...r}){const[a]=l.useState(_r),o=l.useRef(null),i=l.useRef(null);return u.jsx(gr,{id:e,ref:o,icon:u.jsx("input",{...r,ref:i,id:a,className:"text-brand outline-none",type:"checkbox"}),className:n,onClick:e=>{e.target!==o.current||e.defaultPrevented||(i.current?.click(),i.current?.focus())},children:u.jsx("label",{htmlFor:a,className:"block w-full leading-[1.6]",children:t})})}const kr=l.forwardRef((({className:e,icon:t,children:n,onFocus:r,onBlur:a,...o},i)=>{const[s,c]=l.useState(!1),d=l.useRef(null);l.useImperativeHandle(i,(()=>d.current),[]);const f=l.useCallback((e=>{d.current!==e.target&&(e.preventDefault(),e.stopPropagation(),d.current?.focus())}),[]),p=l.useCallback((e=>{s&&e.target!==d.current&&(e.preventDefault(),e.stopPropagation())}),[s]);return u.jsxs(gr,{icon:t,className:e,onClick:f,onMouseDown:p,children:[u.jsx("input",{ref:d,className:"w-full bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder-gray-500",onFocus:e=>{c(!0),r?.(e)},onBlur:e=>{c(!1),a?.(e)},...o}),n]})})),xr=sr("M4 5.5a.5.5 0 0 0-.5.5v2.535a.5.5 0 0 0 .25.433A3.498 3.498 0 0 1 5.5 12a3.498 3.498 0 0 1-1.75 3.032.5.5 0 0 0-.25.433V18a.5.5 0 0 0 .5.5h16a.5.5 0 0 0 .5-.5v-2.535a.5.5 0 0 0-.25-.433A3.498 3.498 0 0 1 18.5 12a3.5 3.5 0 0 1 1.75-3.032.5.5 0 0 0 .25-.433V6a.5.5 0 0 0-.5-.5H4ZM2.5 6A1.5 1.5 0 0 1 4 4.5h16A1.5 1.5 0 0 1 21.5 6v3.17a.5.5 0 0 1-.333.472 2.501 2.501 0 0 0 0 4.716.5.5 0 0 1 .333.471V18a1.5 1.5 0 0 1-1.5 1.5H4A1.5 1.5 0 0 1 2.5 18v-3.17a.5.5 0 0 1 .333-.472 2.501 2.501 0 0 0 0-4.716.5.5 0 0 1-.333-.471V6Zm12 2a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Zm0 4a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Zm0 4a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Z");function Sr({onSubmit:e,submitAria:t="Next",submitLabel:n=t,onCancel:r,cancelAria:a="Cancel",cancelLabel:o=a,accountSection:i="Account",sessionSection:s="Session",secondFactorSection:c="2FA Confirmation",usernameDefault:d="",usernameReadonly:f=!1,usernameLabel:p="Username or email address",usernameAria:h=p,usernamePlaceholder:m=p,usernamePattern:y,usernameFormat:g="valid email address or username",passwordLabel:v="Password",passwordAria:b=v,passwordPlaceholder:_=v,passwordPattern:w,passwordFormat:k="non empty string",passwordWarning:x=u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"font-bold text-brand leading-8",children:"Warning"}),u.jsx("p",{children:"Please verify the domain name of the website before entering your password. Never enter your password on a domain you do not trust."})]}),secondFactorLabel:S="Confirmation code",secondFactorAria:E=S,secondFactorPlaceholder:T=S,secondFactorPattern:I="^[A-Z0-9]{5}-[A-Z0-9]{5}$",secondFactorFormat:z="XXXXX-XXXXX",secondFactorHint:P="Check your $1 email for a login code and enter it here.",rememberVisible:j=!0,rememberDefault:N=!1,rememberLabel:O="Remember this account on this device",rememberAria:R=O,...Z}){const[A,L]=l.useState(!1),[D,M]=l.useState(!1),[U,F]=l.useState(null),[$,V]=l.useState(null),B=l.useCallback((()=>{F(null),V(null)}),[]),W=null!=U,K=l.useCallback((async t=>{t.preventDefault();const n={username:t.currentTarget.username.value,password:t.currentTarget.password.value,remember:t.currentTarget.remember?.checked};if(U){const e=t.currentTarget.secondFactor;if(!e)throw new Error("Second factor input not found");n[U.type]=e.value}M(!0),V(null);try{await e(n)}catch(e){e instanceof be?F({type:e.type,hint:e.hint}):V(function(e){if(e instanceof ve)return"Invalid username or password";return"An unknown error occurred"}(e))}finally{M(!1)}}),[U,e]);return u.jsxs(dr,{onSubmit:K,error:$,cancel:r&&u.jsx(Ce,{"aria-label":a,onClick:r,children:o}),actions:u.jsx(Ce,{color:"brand",type:"submit","aria-label":t,loading:D,children:n}),...Z,children:[u.jsxs(fr,{title:i,disabled:D,children:[u.jsx(kr,{icon:u.jsx(mr,{className:"w-5"}),name:"username",type:"text",onChange:B,placeholder:m,"aria-label":h,autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,defaultValue:d,readOnly:f,disabled:f,pattern:y,title:g}),u.jsx(kr,{icon:u.jsx(br,{className:"w-5"}),name:"password",type:"password",onChange:B,onFocus:()=>L(!0),onBlur:()=>setTimeout(L,100,!1),placeholder:_,"aria-label":b,autoCapitalize:"none",autoCorrect:"off",autoComplete:"current-password",dir:"auto",enterKeyHint:"done",spellCheck:"false",required:!0,readOnly:W,disabled:W,pattern:w,title:k}),x&&u.jsx("div",{className:C("transition-all delay-300 duration-300 overflow-hidden",A?"max-h-80":"max-h-0 -z-10 !mt-0"),children:u.jsx(cr,{role:"status",children:x})})]}),j&&u.jsx(fr,{title:s,disabled:D,children:u.jsx(wr,{name:"remember",defaultChecked:N,"aria-label":R,children:O})},"remember"),U&&u.jsx(fr,{title:c,disabled:D,children:u.jsxs("div",{children:[u.jsx(kr,{icon:u.jsx(xr,{className:"w-5"}),name:"secondFactor",type:"text",placeholder:T,"aria-label":E,autoCapitalize:"none",autoCorrect:"off",autoComplete:"off",spellCheck:"false",dir:"auto",enterKeyHint:"done",required:!0,pattern:I,title:z,autoFocus:!0}),u.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-sm",children:P.replaceAll("$1",U.hint)})]})},"2fa")]})}function Cr({loginHint:e,sessions:t,setSession:n,onSignIn:r,onBack:a}){const o=l.useMemo((()=>t.find((e=>e.selected))),[t]),i=l.useCallback((()=>n(null)),[n]),s=l.useMemo((()=>t.map((e=>e.account))),[t]),[c,d]=l.useState(0===t.length);return l.useEffect((()=>{o&&d(!1)}),[o]),o?o.loginRequired?u.jsx(E,{title:"Sign in",subtitle:"Confirm your password to continue",children:u.jsx(Sr,{onSubmit:r,onCancel:i,cancelAria:"Back",usernameDefault:o.account.preferred_username||o.account.sub,usernameReadonly:!0,rememberDefault:!0})}):null:e?u.jsx(E,{title:"Sign in",subtitle:"Enter your password",children:u.jsx(Sr,{onSubmit:r,onCancel:a,cancelAria:"Back",usernameDefault:e,usernameReadonly:!0})}):0===t.length?u.jsx(E,{title:"Sign in",subtitle:"Enter your username and password",children:u.jsx(Sr,{onSubmit:r,onCancel:a,cancelAria:"Back"})}):c?u.jsx(E,{title:"Sign in",subtitle:"Enter your username and password",children:u.jsx(Sr,{onSubmit:r,onCancel:()=>d(!1),cancelAria:"Back"})}):u.jsx(E,{title:"Sign in",subtitle:"Select from an existing account",children:u.jsx(vr,{accounts:s,onAccount:e=>n(e.sub),onOther:()=>d(!0),onBack:a,backAria:"Back"})})}function Er({links:e,className:t,...n}){const r=e?.find((e=>"help"===e.rel));return r?u.jsxs("p",{className:C("text-sm rounded-md bg-slate-100 text-slate-800 dark:bg-slate-800 dark:text-slate-400 p-3",t),...n,children:["Having trouble?"," ",u.jsxs("a",{href:r.href,rel:r.rel,target:"_blank",className:"text-brand",children:["Contact ",r.title]})]}):null}function Tr({onSubmit:e,submitAria:t="Next",submitLabel:n=t,onCancel:r,cancelAria:a="Cancel",cancelLabel:o=a,username:i="",usernameLabel:s="Username",usernameAria:c=s,usernamePlaceholder:d=s,usernamePattern:f,usernameTitle:p,passwordLabel:h="Password",passwordAria:m=h,passwordPlaceholder:y=h,passwordPattern:g,passwordTitle:v,children:b,..._}){const[w,k]=l.useState(!1),[x,S]=l.useState(null),C=l.useCallback((async t=>{t.preventDefault();const n={username:t.currentTarget.username.value,password:t.currentTarget.password.value};k(!0),S(null);try{await e(n)}catch(e){S(function(e){if("Invalid credentials"===e?.message)return"Invalid username or password";return console.error(e),"An unknown error occurred"}(e))}finally{k(!1)}}),[e,S,k]);return u.jsx(dr,{append:b,error:x,onSubmit:C,cancel:r&&u.jsx(Ce,{"aria-label":a,onClick:r,children:o}),actions:u.jsx(Ce,{color:"brand",type:"submit","aria-label":t,disabled:w,children:n}),..._,children:u.jsxs(fr,{disabled:w,children:[u.jsxs("label",{className:"text-sm font-medium block",children:[u.jsx("p",{children:s}),u.jsxs("div",{className:"relative flex flex-wrap items-center justify-stretch rounded-md border border-solid border-slate-200 dark:border-slate-700 text-neutral-700 dark:text-neutral-100",children:[u.jsx("span",{className:"w-6 ml-1 text-center text-base",children:"@"}),u.jsx("input",{name:"username",type:"text",onChange:()=>S(null),className:"relative m-1 block w-[1px] min-w-0 flex-auto leading-[1.6] bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder:text-neutral-100 disabled:text-gray-500",placeholder:d,"aria-label":c,autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,defaultValue:i,pattern:f,title:p})]})]}),u.jsxs("label",{className:"text-sm font-medium block",children:[u.jsx("p",{children:h}),u.jsxs("div",{className:"relative flex flex-wrap items-center justify-stretch rounded-md border border-solid border-slate-200 dark:border-slate-700 text-neutral-700 dark:text-neutral-100",children:[u.jsx("span",{className:"w-6 ml-1 text-center text-2xl font-light -mb-2",children:"*"}),u.jsx("input",{name:"password",type:"password",onChange:()=>S(null),className:"relative m-1 block w-[1px] min-w-0 flex-auto leading-[1.6] bg-transparent bg-clip-padding text-base text-inherit outline-none dark:placeholder:text-neutral-100",placeholder:y,"aria-label":m,autoCapitalize:"none",autoCorrect:"off",autoComplete:"new-password",dir:"auto",enterKeyHint:"done",spellCheck:"false",required:!0,pattern:g,title:v})]})]})]})})}function Ir({links:e,className:t,...n}){const r=e?.filter((e=>"privacy-policy"===e.rel||"terms-of-service"===e.rel));return u.jsxs("p",{className:C("text-sm text-slate-500",t),...n,children:["By creating an account you agree to the"," ",r&&r.length?r.map(((e,t,n)=>u.jsxs("span",{children:[t>0&&(t<n.length-1?", ":" and "),u.jsx("a",{href:e.href,rel:e.rel,target:"_blank",className:"text-brand underline",children:e.title})]},t))):"Terms of Service and Privacy Policy","."]})}function zr({stepName:e=((e,t)=>`Step ${e} of ${t}`),stepTitle:t=((e,t)=>1===e?"Your account":null),links:n,onSignUp:r,onBack:a}){const[o,i]=l.useState(null),[s,c]=l.useState(1),d=l.useCallback((e=>{i(e),c(2)}),[r,i,c]);return u.jsx(E,{title:"Create Account",subtitle:"We're so excited to have you join us!",children:u.jsxs("div",{className:"flex flex-col",children:[u.jsx("p",{className:"mt-4 text-slate-400 dark:text-slate-600",children:e(s,2)}),u.jsx("h2",{className:"font-medium text-xl mb-4",children:t(s,2)}),1===s&&u.jsx(Tr,{className:"flex-grow",onSubmit:d,onCancel:a,cancelLabel:"Back",children:u.jsx(Ir,{links:n})}),2===s&&u.jsx(Ce,{onClick:()=>c(1),children:"Back"}),u.jsx(Er,{className:"mb-4",links:n})]})})}function Pr({name:e,logo:t,logoAlt:n=e||"Logo",links:r,children:a,className:o,...i}){return u.jsxs("div",{className:C("min-h-screen w-full","flex items-center justify-center flex-col","bg-white text-slate-900","dark:bg-slate-900 dark:text-slate-100",o),...i,children:[u.jsxs("div",{className:"w-full max-w-screen-sm overflow-hidden flex-grow flex flex-col items-center justify-center",children:[t&&u.jsx("img",{src:t,alt:n,className:"w-16 h-16 md:w-24 md:h-24 mb-8"}),e&&u.jsx("h1",{className:"text-2xl md:text-4xl mb-8 mx-4 text-center font-bold",children:e}),a]}),null!=r&&r.length>0&&u.jsx("nav",{className:"w-full max-w-screen-sm overflow-hidden mt-4 border-t border-t-slate-200 dark:border-t-slate-700 flex flex-wrap justify-center",children:r.map((e=>u.jsx("a",{href:e.href,rel:e.rel,target:"_blank",className:"m-2 md:m-4 text-xs md:text-sm text-brand hover:underline",children:e.title},e.href)))})]})}function jr({onSignUp:e,signUpLabel:t="Create a new account",onSignIn:n,signInLabel:r="Sign in",onCancel:a,cancelLabel:o="Cancel",...i}){return u.jsxs(Pr,{...i,children:[e&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",color:n?"brand":void 0,onClick:e,children:t}),n&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",color:e?void 0:"brand",onClick:n,children:r}),a&&u.jsx(Ce,{className:"m-1 w-60 max-w-full",onClick:a,children:o})]})}function Nr({authorizeData:e,customizationData:t}){const n=null!=e?.loginHint,[r,a]=l.useState(n?"sign-in":"welcome"),o=xe(a,"done"),i=xe(a,"sign-in"),s=xe(a,"accept"),c=xe(a,"welcome"),{sessions:d,setSession:f,doAccept:p,doReject:h,doSignIn:m,doSignUp:y}=ke(e,{onRedirected:o}),g=d.find((e=>e.selected&&!e.loginRequired));return l.useEffect((()=>{g&&(g.consentRequired?s():p(g.account))}),[g,p,s]),"welcome"===r?u.jsx(jr,{name:t?.name,logo:t?.logo,links:t?.links,onSignIn:i,onCancel:h}):"sign-up"===r?u.jsx(zr,{links:t?.links,onSignUp:y,onBack:c}):"sign-in"===r?u.jsx(Cr,{loginHint:e.loginHint,sessions:d,setSession:f,onSignIn:m,onBack:n?h:c}):"accept"===r&&g?u.jsx(hr,{session:g,clientId:e.clientId,clientMetadata:e.clientMetadata,clientTrusted:e.clientTrusted,onAccept:()=>p(g.account),onReject:h,onBack:n?void 0:()=>{f(null),a(d.length?"sign-in":"welcome")}}):u.jsx(E,{title:"Login complete",children:"You are being redirected..."})}function Or({errorData:e,customizationData:t,...n}){return u.jsx(Pr,{...t,...n,children:u.jsx(cr,{role:"alert",children:Rr(e)})})}function Rr(e){const t=e?.error_description;return"This request has expired"===t||t?.startsWith("Unknown request_uri")?"This sign-in session has expired":t||"An unknown error occurred"}const{authorizeData:Zr}=g;if(Zr){const e=new URL(window.location.href);"/oauth/authorize"!==e.pathname||e.searchParams.has("request_uri")||(e.search="",e.searchParams.set("client_id",Zr.clientId),e.searchParams.set("request_uri",Zr.requestUri),window.history.replaceState(history.state,"",e.pathname+e.search))}x(document.getElementById("root")).render(u.jsx((function({authorizeData:e,customizationData:t,errorData:n}){return e&&!n?u.jsx(Nr,{customizationData:t,authorizeData:e}):u.jsx(Or,{customizationData:t,errorData:n})}),{...g}))}();
|
20
20
|
//# sourceMappingURL=main.js.map
|