12 lines
512 KiB
JavaScript
12 lines
512 KiB
JavaScript
function Qg(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in t)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();var Na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Il(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jc={exports:{}},va={},Cc={exports:{}},ze={};var Up;function Ox(){if(Up)return ze;Up=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,_={};function S(O,q,ae){this.props=O,this.context=q,this.refs=_,this.updater=ae||x}S.prototype.isReactComponent={},S.prototype.setState=function(O,q){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,q,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function I(){}I.prototype=S.prototype;function E(O,q,ae){this.props=O,this.context=q,this.refs=_,this.updater=ae||x}var z=E.prototype=new I;z.constructor=E,j(z,S.prototype),z.isPureReactComponent=!0;var M=Array.isArray,L=Object.prototype.hasOwnProperty,Q={current:null},le={key:!0,ref:!0,__self:!0,__source:!0};function ue(O,q,ae){var fe,Ee={},Ie=null,ke=null;if(q!=null)for(fe in q.ref!==void 0&&(ke=q.ref),q.key!==void 0&&(Ie=""+q.key),q)L.call(q,fe)&&!le.hasOwnProperty(fe)&&(Ee[fe]=q[fe]);var Ue=arguments.length-2;if(Ue===1)Ee.children=ae;else if(1<Ue){for(var Be=Array(Ue),_t=0;_t<Ue;_t++)Be[_t]=arguments[_t+2];Ee.children=Be}if(O&&O.defaultProps)for(fe in Ue=O.defaultProps,Ue)Ee[fe]===void 0&&(Ee[fe]=Ue[fe]);return{$$typeof:t,type:O,key:Ie,ref:ke,props:Ee,_owner:Q.current}}function pe(O,q){return{$$typeof:t,type:O.type,key:q,ref:O.ref,props:O.props,_owner:O._owner}}function _e(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Oe(O){var q={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ae){return q[ae]})}var Z=/\/+/g;function me(O,q){return typeof O=="object"&&O!==null&&O.key!=null?Oe(""+O.key):q.toString(36)}function he(O,q,ae,fe,Ee){var Ie=typeof O;(Ie==="undefined"||Ie==="boolean")&&(O=null);var ke=!1;if(O===null)ke=!0;else switch(Ie){case"string":case"number":ke=!0;break;case"object":switch(O.$$typeof){case t:case e:ke=!0}}if(ke)return ke=O,Ee=Ee(ke),O=fe===""?"."+me(ke,0):fe,M(Ee)?(ae="",O!=null&&(ae=O.replace(Z,"$&/")+"/"),he(Ee,q,ae,"",function(_t){return _t})):Ee!=null&&(_e(Ee)&&(Ee=pe(Ee,ae+(!Ee.key||ke&&ke.key===Ee.key?"":(""+Ee.key).replace(Z,"$&/")+"/")+O)),q.push(Ee)),1;if(ke=0,fe=fe===""?".":fe+":",M(O))for(var Ue=0;Ue<O.length;Ue++){Ie=O[Ue];var Be=fe+me(Ie,Ue);ke+=he(Ie,q,ae,Be,Ee)}else if(Be=w(O),typeof Be=="function")for(O=Be.call(O),Ue=0;!(Ie=O.next()).done;)Ie=Ie.value,Be=fe+me(Ie,Ue++),ke+=he(Ie,q,ae,Be,Ee);else if(Ie==="object")throw q=String(O),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return ke}function T(O,q,ae){if(O==null)return O;var fe=[],Ee=0;return he(O,fe,"","",function(Ie){return q.call(ae,Ie,Ee++)}),fe}function P(O){if(O._status===-1){var q=O._result;q=q(),q.then(function(ae){(O._status===0||O._status===-1)&&(O._status=1,O._result=ae)},function(ae){(O._status===0||O._status===-1)&&(O._status=2,O._result=ae)}),O._status===-1&&(O._status=0,O._result=q)}if(O._status===1)return O._result.default;throw O._result}var K={current:null},V={transition:null},H={ReactCurrentDispatcher:K,ReactCurrentBatchConfig:V,ReactCurrentOwner:Q};function W(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:T,forEach:function(O,q,ae){T(O,function(){q.apply(this,arguments)},ae)},count:function(O){var q=0;return T(O,function(){q++}),q},toArray:function(O){return T(O,function(q){return q})||[]},only:function(O){if(!_e(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},ze.Component=S,ze.Fragment=n,ze.Profiler=o,ze.PureComponent=E,ze.StrictMode=i,ze.Suspense=h,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,ze.act=W,ze.cloneElement=function(O,q,ae){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var fe=j({},O.props),Ee=O.key,Ie=O.ref,ke=O._owner;if(q!=null){if(q.ref!==void 0&&(Ie=q.ref,ke=Q.current),q.key!==void 0&&(Ee=""+q.key),O.type&&O.type.defaultProps)var Ue=O.type.defaultProps;for(Be in q)L.call(q,Be)&&!le.hasOwnProperty(Be)&&(fe[Be]=q[Be]===void 0&&Ue!==void 0?Ue[Be]:q[Be])}var Be=arguments.length-2;if(Be===1)fe.children=ae;else if(1<Be){Ue=Array(Be);for(var _t=0;_t<Be;_t++)Ue[_t]=arguments[_t+2];fe.children=Ue}return{$$typeof:t,type:O.type,key:Ee,ref:Ie,props:fe,_owner:ke}},ze.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:l,_context:O},O.Consumer=O},ze.createElement=ue,ze.createFactory=function(O){var q=ue.bind(null,O);return q.type=O,q},ze.createRef=function(){return{current:null}},ze.forwardRef=function(O){return{$$typeof:f,render:O}},ze.isValidElement=_e,ze.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:P}},ze.memo=function(O,q){return{$$typeof:g,type:O,compare:q===void 0?null:q}},ze.startTransition=function(O){var q=V.transition;V.transition={};try{O()}finally{V.transition=q}},ze.unstable_act=W,ze.useCallback=function(O,q){return K.current.useCallback(O,q)},ze.useContext=function(O){return K.current.useContext(O)},ze.useDebugValue=function(){},ze.useDeferredValue=function(O){return K.current.useDeferredValue(O)},ze.useEffect=function(O,q){return K.current.useEffect(O,q)},ze.useId=function(){return K.current.useId()},ze.useImperativeHandle=function(O,q,ae){return K.current.useImperativeHandle(O,q,ae)},ze.useInsertionEffect=function(O,q){return K.current.useInsertionEffect(O,q)},ze.useLayoutEffect=function(O,q){return K.current.useLayoutEffect(O,q)},ze.useMemo=function(O,q){return K.current.useMemo(O,q)},ze.useReducer=function(O,q,ae){return K.current.useReducer(O,q,ae)},ze.useRef=function(O){return K.current.useRef(O)},ze.useState=function(O){return K.current.useState(O)},ze.useSyncExternalStore=function(O,q,ae){return K.current.useSyncExternalStore(O,q,ae)},ze.useTransition=function(){return K.current.useTransition()},ze.version="18.3.1",ze}var Vp;function qa(){return Vp||(Vp=1,Cc.exports=Ox()),Cc.exports}var Bp;function Rx(){if(Bp)return va;Bp=1;var t=qa(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(f,h,g){var y,v={},w=null,x=null;g!==void 0&&(w=""+g),h.key!==void 0&&(w=""+h.key),h.ref!==void 0&&(x=h.ref);for(y in h)i.call(h,y)&&!l.hasOwnProperty(y)&&(v[y]=h[y]);if(f&&f.defaultProps)for(y in h=f.defaultProps,h)v[y]===void 0&&(v[y]=h[y]);return{$$typeof:e,type:f,key:w,ref:x,props:v,_owner:o.current}}return va.Fragment=n,va.jsx=c,va.jsxs=c,va}var Hp;function Tx(){return Hp||(Hp=1,jc.exports=Rx()),jc.exports}var m=Tx(),B=qa();const ee=Il(B),Lx=Qg({__proto__:null,default:ee},[B]);var il={},Ec={exports:{}},pr={},Nc={exports:{}},Pc={};var qp;function Ax(){return qp||(qp=1,(function(t){function e(V,H){var W=V.length;V.push(H);e:for(;0<W;){var O=W-1>>>1,q=V[O];if(0<o(q,H))V[O]=H,V[W]=q,W=O;else break e}}function n(V){return V.length===0?null:V[0]}function i(V){if(V.length===0)return null;var H=V[0],W=V.pop();if(W!==H){V[0]=W;e:for(var O=0,q=V.length,ae=q>>>1;O<ae;){var fe=2*(O+1)-1,Ee=V[fe],Ie=fe+1,ke=V[Ie];if(0>o(Ee,W))Ie<q&&0>o(ke,Ee)?(V[O]=ke,V[Ie]=W,O=Ie):(V[O]=Ee,V[fe]=W,O=fe);else if(Ie<q&&0>o(ke,W))V[O]=ke,V[Ie]=W,O=Ie;else break e}}return H}function o(V,H){var W=V.sortIndex-H.sortIndex;return W!==0?W:V.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var h=[],g=[],y=1,v=null,w=3,x=!1,j=!1,_=!1,S=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(V){for(var H=n(g);H!==null;){if(H.callback===null)i(g);else if(H.startTime<=V)i(g),H.sortIndex=H.expirationTime,e(h,H);else break;H=n(g)}}function M(V){if(_=!1,z(V),!j)if(n(h)!==null)j=!0,P(L);else{var H=n(g);H!==null&&K(M,H.startTime-V)}}function L(V,H){j=!1,_&&(_=!1,I(ue),ue=-1),x=!0;var W=w;try{for(z(H),v=n(h);v!==null&&(!(v.expirationTime>H)||V&&!Oe());){var O=v.callback;if(typeof O=="function"){v.callback=null,w=v.priorityLevel;var q=O(v.expirationTime<=H);H=t.unstable_now(),typeof q=="function"?v.callback=q:v===n(h)&&i(h),z(H)}else i(h);v=n(h)}if(v!==null)var ae=!0;else{var fe=n(g);fe!==null&&K(M,fe.startTime-H),ae=!1}return ae}finally{v=null,w=W,x=!1}}var Q=!1,le=null,ue=-1,pe=5,_e=-1;function Oe(){return!(t.unstable_now()-_e<pe)}function Z(){if(le!==null){var V=t.unstable_now();_e=V;var H=!0;try{H=le(!0,V)}finally{H?me():(Q=!1,le=null)}}else Q=!1}var me;if(typeof E=="function")me=function(){E(Z)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,T=he.port2;he.port1.onmessage=Z,me=function(){T.postMessage(null)}}else me=function(){S(Z,0)};function P(V){le=V,Q||(Q=!0,me())}function K(V,H){ue=S(function(){V(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_continueExecution=function(){j||x||(j=!0,P(L))},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_getFirstCallbackNode=function(){return n(h)},t.unstable_next=function(V){switch(w){case 1:case 2:case 3:var H=3;break;default:H=w}var W=w;w=H;try{return V()}finally{w=W}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(V,H){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=w;w=V;try{return H()}finally{w=W}},t.unstable_scheduleCallback=function(V,H,W){var O=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?O+W:O):W=O,V){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=W+q,V={id:y++,callback:H,priorityLevel:V,startTime:W,expirationTime:q,sortIndex:-1},W>O?(V.sortIndex=W,e(g,V),n(h)===null&&V===n(g)&&(_?(I(ue),ue=-1):_=!0,K(M,W-O))):(V.sortIndex=q,e(h,V),j||x||(j=!0,P(L))),V},t.unstable_shouldYield=Oe,t.unstable_wrapCallback=function(V){var H=w;return function(){var W=w;w=H;try{return V.apply(this,arguments)}finally{w=W}}}})(Pc)),Pc}var Wp;function Ix(){return Wp||(Wp=1,Nc.exports=Ax()),Nc.exports}var Qp;function Fx(){if(Qp)return pr;Qp=1;var t=qa(),e=Ix();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){c(r,s),c(r+"Capture",s)}function c(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[: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]*$/,y={},v={};function w(r){return h.call(v,r)?!0:h.call(y,r)?!1:g.test(r)?v[r]=!0:(y[r]=!0,!1)}function x(r,s,a,u){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function j(r,s,a,u){if(s===null||typeof s>"u"||x(r,s,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function _(r,s,a,u,d,p,b){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=u,this.attributeNamespace=d,this.mustUseProperty=a,this.propertyName=r,this.type=s,this.sanitizeURL=p,this.removeEmptyString=b}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new _(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];S[s]=new _(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new _(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new _(r,2,!1,r,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(r){S[r]=new _(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new _(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new _(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new _(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new _(r,5,!1,r.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function E(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(I,E);S[s]=new _(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(I,E);S[s]=new _(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(I,E);S[s]=new _(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new _(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new _(r,1,!1,r.toLowerCase(),null,!0,!0)});function z(r,s,a,u){var d=S.hasOwnProperty(s)?S[s]:null;(d!==null?d.type!==0:u||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,a,d,u)&&(a=null),u||d===null?w(s)&&(a===null?r.removeAttribute(s):r.setAttribute(s,""+a)):d.mustUseProperty?r[d.propertyName]=a===null?d.type===3?!1:"":a:(s=d.attributeName,u=d.attributeNamespace,a===null?r.removeAttribute(s):(d=d.type,a=d===3||d===4&&a===!0?"":""+a,u?r.setAttributeNS(u,s,a):r.setAttribute(s,a))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),Q=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),pe=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),Oe=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),V=Symbol.iterator;function H(r){return r===null||typeof r!="object"?null:(r=V&&r[V]||r["@@iterator"],typeof r=="function"?r:null)}var W=Object.assign,O;function q(r){if(O===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
|
|
`+O+r}var ae=!1;function fe(r,s){if(!r||ae)return"";ae=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(U){var u=U}Reflect.construct(r,[],s)}else{try{s.call()}catch(U){u=U}r.call(s.prototype)}else{try{throw Error()}catch(U){u=U}r()}}catch(U){if(U&&u&&typeof U.stack=="string"){for(var d=U.stack.split(`
|
|
`),p=u.stack.split(`
|
|
`),b=d.length-1,k=p.length-1;1<=b&&0<=k&&d[b]!==p[k];)k--;for(;1<=b&&0<=k;b--,k--)if(d[b]!==p[k]){if(b!==1||k!==1)do if(b--,k--,0>k||d[b]!==p[k]){var N=`
|
|
`+d[b].replace(" at new "," at ");return r.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",r.displayName)),N}while(1<=b&&0<=k);break}}}finally{ae=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?q(r):""}function Ee(r){switch(r.tag){case 5:return q(r.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return r=fe(r.type,!1),r;case 11:return r=fe(r.type.render,!1),r;case 1:return r=fe(r.type,!0),r;default:return""}}function Ie(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case le:return"Fragment";case Q:return"Portal";case pe:return"Profiler";case ue:return"StrictMode";case me:return"Suspense";case he:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Oe:return(r.displayName||"Context")+".Consumer";case _e:return(r._context.displayName||"Context")+".Provider";case Z:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case T:return s=r.displayName||null,s!==null?s:Ie(r.type)||"Memo";case P:s=r._payload,r=r._init;try{return Ie(r(s))}catch{}}return null}function ke(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(s);case 8:return s===ue?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ue(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Be(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function _t(r){var s=Be(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),u=""+r[s];if(!r.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,p=a.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return d.call(this)},set:function(b){u=""+b,p.call(this,b)}}),Object.defineProperty(r,s,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(b){u=""+b},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function ir(r){r._valueTracker||(r._valueTracker=_t(r))}function dn(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var a=s.getValue(),u="";return r&&(u=Be(r)?r.checked?"true":"false":r.value),r=u,r!==a?(s.setValue(r),!0):!1}function Ir(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function fn(r,s){var a=s.checked;return W({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Hs(r,s){var a=s.defaultValue==null?"":s.defaultValue,u=s.checked!=null?s.checked:s.defaultChecked;a=Ue(s.value!=null?s.value:a),r._wrapperState={initialChecked:u,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ln(r,s){s=s.checked,s!=null&&z(r,"checked",s,!1)}function ws(r,s){Ln(r,s);var a=Ue(s.value),u=s.type;if(a!=null)u==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(u==="submit"||u==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?An(r,s.type,a):s.hasOwnProperty("defaultValue")&&An(r,s.type,Ue(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function hn(r,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var u=s.type;if(!(u!=="submit"&&u!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,a||s===r.value||(r.value=s),r.defaultValue=s}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function An(r,s,a){(s!=="number"||Ir(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var Gr=Array.isArray;function ar(r,s,a,u){if(r=r.options,s){s={};for(var d=0;d<a.length;d++)s["$"+a[d]]=!0;for(a=0;a<r.length;a++)d=s.hasOwnProperty("$"+r[a].value),r[a].selected!==d&&(r[a].selected=d),d&&u&&(r[a].defaultSelected=!0)}else{for(a=""+Ue(a),s=null,d=0;d<r.length;d++){if(r[d].value===a){r[d].selected=!0,u&&(r[d].defaultSelected=!0);return}s!==null||r[d].disabled||(s=r[d])}s!==null&&(s.selected=!0)}}function bs(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return W({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function gr(r,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(n(92));if(Gr(a)){if(1<a.length)throw Error(n(93));a=a[0]}s=a}s==null&&(s=""),a=s}r._wrapperState={initialValue:Ue(a)}}function C(r,s){var a=Ue(s.value),u=Ue(s.defaultValue);a!=null&&(a=""+a,a!==r.value&&(r.value=a),s.defaultValue==null&&r.defaultValue!==a&&(r.defaultValue=a)),u!=null&&(r.defaultValue=""+u)}function A(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function D(r){switch(r){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 se(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?D(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var ie,ne=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,u,d){MSApp.execUnsafeLocalFunction(function(){return r(s,a,u,d)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(ie=ie||document.createElement("div"),ie.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=ie.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function oe(r,s){if(s){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=s;return}}r.textContent=s}var Ne={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},De=["Webkit","ms","Moz","O"];Object.keys(Ne).forEach(function(r){De.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Ne[s]=Ne[r]})});function ht(r,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||Ne.hasOwnProperty(r)&&Ne[r]?(""+s).trim():s+"px"}function kt(r,s){r=r.style;for(var a in s)if(s.hasOwnProperty(a)){var u=a.indexOf("--")===0,d=ht(a,s[a],u);a==="float"&&(a="cssFloat"),u?r.setProperty(a,d):r[a]=d}}var Pt=W({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 Cr(r,s){if(s){if(Pt[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function pn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 mn=null;function In(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var gn=null,Jr=null,yr=null;function Fr(r){if(r=na(r)){if(typeof gn!="function")throw Error(n(280));var s=r.stateNode;s&&(s=wo(s),gn(r.stateNode,r.type,s))}}function Ga(r){Jr?yr?yr.push(r):yr=[r]:Jr=r}function Re(){if(Jr){var r=Jr,s=yr;if(yr=Jr=null,Fr(r),s)for(r=0;r<s.length;r++)Fr(s[r])}}function Qe(r,s){return r(s)}function et(){}var Yt=!1;function or(r,s,a){if(Yt)return r(s,a);Yt=!0;try{return Qe(r,s,a)}finally{Yt=!1,(Jr!==null||yr!==null)&&(et(),Re())}}function lr(r,s){var a=r.stateNode;if(a===null)return null;var u=wo(a);if(u===null)return null;a=u[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(n(231,s,typeof a));return a}var Mr=!1;if(f)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch{Mr=!1}function Yr(r,s,a,u,d,p,b,k,N){var U=Array.prototype.slice.call(arguments,3);try{s.apply(a,U)}catch(J){this.onError(J)}}var Di=!1,Ja=null,Ya=!1,Hl=null,Mv={onError:function(r){Di=!0,Ja=r}};function Dv(r,s,a,u,d,p,b,k,N){Di=!1,Ja=null,Yr.apply(Mv,arguments)}function $v(r,s,a,u,d,p,b,k,N){if(Dv.apply(this,arguments),Di){if(Di){var U=Ja;Di=!1,Ja=null}else throw Error(n(198));Ya||(Ya=!0,Hl=U)}}function Ss(r){var s=r,a=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(a=s.return),r=s.return;while(r)}return s.tag===3?a:null}function cf(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function df(r){if(Ss(r)!==r)throw Error(n(188))}function zv(r){var s=r.alternate;if(!s){if(s=Ss(r),s===null)throw Error(n(188));return s!==r?null:r}for(var a=r,u=s;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(u=d.return,u!==null){a=u;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return df(d),r;if(p===u)return df(d),s;p=p.sibling}throw Error(n(188))}if(a.return!==u.return)a=d,u=p;else{for(var b=!1,k=d.child;k;){if(k===a){b=!0,a=d,u=p;break}if(k===u){b=!0,u=d,a=p;break}k=k.sibling}if(!b){for(k=p.child;k;){if(k===a){b=!0,a=p,u=d;break}if(k===u){b=!0,u=p,a=d;break}k=k.sibling}if(!b)throw Error(n(189))}}if(a.alternate!==u)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?r:s}function ff(r){return r=zv(r),r!==null?hf(r):null}function hf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=hf(r);if(s!==null)return s;r=r.sibling}return null}var pf=e.unstable_scheduleCallback,mf=e.unstable_cancelCallback,Uv=e.unstable_shouldYield,Vv=e.unstable_requestPaint,wt=e.unstable_now,Bv=e.unstable_getCurrentPriorityLevel,ql=e.unstable_ImmediatePriority,gf=e.unstable_UserBlockingPriority,Xa=e.unstable_NormalPriority,Hv=e.unstable_LowPriority,yf=e.unstable_IdlePriority,eo=null,Xr=null;function qv(r){if(Xr&&typeof Xr.onCommitFiberRoot=="function")try{Xr.onCommitFiberRoot(eo,r,void 0,(r.current.flags&128)===128)}catch{}}var Dr=Math.clz32?Math.clz32:Kv,Wv=Math.log,Qv=Math.LN2;function Kv(r){return r>>>=0,r===0?32:31-(Wv(r)/Qv|0)|0}var to=64,ro=4194304;function $i(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function no(r,s){var a=r.pendingLanes;if(a===0)return 0;var u=0,d=r.suspendedLanes,p=r.pingedLanes,b=a&268435455;if(b!==0){var k=b&~d;k!==0?u=$i(k):(p&=b,p!==0&&(u=$i(p)))}else b=a&~d,b!==0?u=$i(b):p!==0&&(u=$i(p));if(u===0)return 0;if(s!==0&&s!==u&&(s&d)===0&&(d=u&-u,p=s&-s,d>=p||d===16&&(p&4194240)!==0))return s;if((u&4)!==0&&(u|=a&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=u;0<s;)a=31-Dr(s),d=1<<a,u|=r[a],s&=~d;return u}function Zv(r,s){switch(r){case 1:case 2:case 4:return s+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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gv(r,s){for(var a=r.suspendedLanes,u=r.pingedLanes,d=r.expirationTimes,p=r.pendingLanes;0<p;){var b=31-Dr(p),k=1<<b,N=d[b];N===-1?((k&a)===0||(k&u)!==0)&&(d[b]=Zv(k,s)):N<=s&&(r.expiredLanes|=k),p&=~k}}function Wl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function vf(){var r=to;return to<<=1,(to&4194240)===0&&(to=64),r}function Ql(r){for(var s=[],a=0;31>a;a++)s.push(r);return s}function zi(r,s,a){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Dr(s),r[s]=a}function Jv(r,s){var a=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var u=r.eventTimes;for(r=r.expirationTimes;0<a;){var d=31-Dr(a),p=1<<d;s[d]=0,u[d]=-1,r[d]=-1,a&=~p}}function Kl(r,s){var a=r.entangledLanes|=s;for(r=r.entanglements;a;){var u=31-Dr(a),d=1<<u;d&s|r[u]&s&&(r[u]|=s),a&=~d}}var Ge=0;function xf(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var wf,Zl,bf,Sf,_f,Gl=!1,so=[],Fn=null,Mn=null,Dn=null,Ui=new Map,Vi=new Map,$n=[],Yv="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 kf(r,s){switch(r){case"focusin":case"focusout":Fn=null;break;case"dragenter":case"dragleave":Mn=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":Ui.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vi.delete(s.pointerId)}}function Bi(r,s,a,u,d,p){return r===null||r.nativeEvent!==p?(r={blockedOn:s,domEventName:a,eventSystemFlags:u,nativeEvent:p,targetContainers:[d]},s!==null&&(s=na(s),s!==null&&Zl(s)),r):(r.eventSystemFlags|=u,s=r.targetContainers,d!==null&&s.indexOf(d)===-1&&s.push(d),r)}function Xv(r,s,a,u,d){switch(s){case"focusin":return Fn=Bi(Fn,r,s,a,u,d),!0;case"dragenter":return Mn=Bi(Mn,r,s,a,u,d),!0;case"mouseover":return Dn=Bi(Dn,r,s,a,u,d),!0;case"pointerover":var p=d.pointerId;return Ui.set(p,Bi(Ui.get(p)||null,r,s,a,u,d)),!0;case"gotpointercapture":return p=d.pointerId,Vi.set(p,Bi(Vi.get(p)||null,r,s,a,u,d)),!0}return!1}function jf(r){var s=_s(r.target);if(s!==null){var a=Ss(s);if(a!==null){if(s=a.tag,s===13){if(s=cf(a),s!==null){r.blockedOn=s,_f(r.priority,function(){bf(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function io(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var a=Yl(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(a===null){a=r.nativeEvent;var u=new a.constructor(a.type,a);mn=u,a.target.dispatchEvent(u),mn=null}else return s=na(a),s!==null&&Zl(s),r.blockedOn=a,!1;s.shift()}return!0}function Cf(r,s,a){io(r)&&a.delete(s)}function e0(){Gl=!1,Fn!==null&&io(Fn)&&(Fn=null),Mn!==null&&io(Mn)&&(Mn=null),Dn!==null&&io(Dn)&&(Dn=null),Ui.forEach(Cf),Vi.forEach(Cf)}function Hi(r,s){r.blockedOn===s&&(r.blockedOn=null,Gl||(Gl=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,e0)))}function qi(r){function s(d){return Hi(d,r)}if(0<so.length){Hi(so[0],r);for(var a=1;a<so.length;a++){var u=so[a];u.blockedOn===r&&(u.blockedOn=null)}}for(Fn!==null&&Hi(Fn,r),Mn!==null&&Hi(Mn,r),Dn!==null&&Hi(Dn,r),Ui.forEach(s),Vi.forEach(s),a=0;a<$n.length;a++)u=$n[a],u.blockedOn===r&&(u.blockedOn=null);for(;0<$n.length&&(a=$n[0],a.blockedOn===null);)jf(a),a.blockedOn===null&&$n.shift()}var qs=M.ReactCurrentBatchConfig,ao=!0;function t0(r,s,a,u){var d=Ge,p=qs.transition;qs.transition=null;try{Ge=1,Jl(r,s,a,u)}finally{Ge=d,qs.transition=p}}function r0(r,s,a,u){var d=Ge,p=qs.transition;qs.transition=null;try{Ge=4,Jl(r,s,a,u)}finally{Ge=d,qs.transition=p}}function Jl(r,s,a,u){if(ao){var d=Yl(r,s,a,u);if(d===null)mu(r,s,u,oo,a),kf(r,u);else if(Xv(d,r,s,a,u))u.stopPropagation();else if(kf(r,u),s&4&&-1<Yv.indexOf(r)){for(;d!==null;){var p=na(d);if(p!==null&&wf(p),p=Yl(r,s,a,u),p===null&&mu(r,s,u,oo,a),p===d)break;d=p}d!==null&&u.stopPropagation()}else mu(r,s,u,null,a)}}var oo=null;function Yl(r,s,a,u){if(oo=null,r=In(u),r=_s(r),r!==null)if(s=Ss(r),s===null)r=null;else if(a=s.tag,a===13){if(r=cf(s),r!==null)return r;r=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return oo=r,null}function Ef(r){switch(r){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(Bv()){case ql:return 1;case gf:return 4;case Xa:case Hv:return 16;case yf:return 536870912;default:return 16}default:return 16}}var zn=null,Xl=null,lo=null;function Nf(){if(lo)return lo;var r,s=Xl,a=s.length,u,d="value"in zn?zn.value:zn.textContent,p=d.length;for(r=0;r<a&&s[r]===d[r];r++);var b=a-r;for(u=1;u<=b&&s[a-u]===d[p-u];u++);return lo=d.slice(r,1<u?1-u:void 0)}function uo(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function co(){return!0}function Pf(){return!1}function vr(r){function s(a,u,d,p,b){this._reactName=a,this._targetInst=d,this.type=u,this.nativeEvent=p,this.target=b,this.currentTarget=null;for(var k in r)r.hasOwnProperty(k)&&(a=r[k],this[k]=a?a(p):p[k]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?co:Pf,this.isPropagationStopped=Pf,this}return W(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=co)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=co)},persist:function(){},isPersistent:co}),s}var Ws={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=vr(Ws),Wi=W({},Ws,{view:0,detail:0}),n0=vr(Wi),tu,ru,Qi,fo=W({},Wi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Qi&&(Qi&&r.type==="mousemove"?(tu=r.screenX-Qi.screenX,ru=r.screenY-Qi.screenY):ru=tu=0,Qi=r),tu)},movementY:function(r){return"movementY"in r?r.movementY:ru}}),Of=vr(fo),s0=W({},fo,{dataTransfer:0}),i0=vr(s0),a0=W({},Wi,{relatedTarget:0}),nu=vr(a0),o0=W({},Ws,{animationName:0,elapsedTime:0,pseudoElement:0}),l0=vr(o0),u0=W({},Ws,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),c0=vr(u0),d0=W({},Ws,{data:0}),Rf=vr(d0),f0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h0={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"},p0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m0(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=p0[r])?!!s[r]:!1}function su(){return m0}var g0=W({},Wi,{key:function(r){if(r.key){var s=f0[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=uo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?h0[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(r){return r.type==="keypress"?uo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?uo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),y0=vr(g0),v0=W({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tf=vr(v0),x0=W({},Wi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),w0=vr(x0),b0=W({},Ws,{propertyName:0,elapsedTime:0,pseudoElement:0}),S0=vr(b0),_0=W({},fo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),k0=vr(_0),j0=[9,13,27,32],iu=f&&"CompositionEvent"in window,Ki=null;f&&"documentMode"in document&&(Ki=document.documentMode);var C0=f&&"TextEvent"in window&&!Ki,Lf=f&&(!iu||Ki&&8<Ki&&11>=Ki),Af=" ",If=!1;function Ff(r,s){switch(r){case"keyup":return j0.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Qs=!1;function E0(r,s){switch(r){case"compositionend":return Mf(s);case"keypress":return s.which!==32?null:(If=!0,Af);case"textInput":return r=s.data,r===Af&&If?null:r;default:return null}}function N0(r,s){if(Qs)return r==="compositionend"||!iu&&Ff(r,s)?(r=Nf(),lo=Xl=zn=null,Qs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Lf&&s.locale!=="ko"?null:s.data;default:return null}}var P0={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 Df(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!P0[r.type]:s==="textarea"}function $f(r,s,a,u){Ga(u),s=yo(s,"onChange"),0<s.length&&(a=new eu("onChange","change",null,a,u),r.push({event:a,listeners:s}))}var Zi=null,Gi=null;function O0(r){nh(r,0)}function ho(r){var s=Ys(r);if(dn(s))return r}function R0(r,s){if(r==="change")return s}var zf=!1;if(f){var au;if(f){var ou="oninput"in document;if(!ou){var Uf=document.createElement("div");Uf.setAttribute("oninput","return;"),ou=typeof Uf.oninput=="function"}au=ou}else au=!1;zf=au&&(!document.documentMode||9<document.documentMode)}function Vf(){Zi&&(Zi.detachEvent("onpropertychange",Bf),Gi=Zi=null)}function Bf(r){if(r.propertyName==="value"&&ho(Gi)){var s=[];$f(s,Gi,r,In(r)),or(O0,s)}}function T0(r,s,a){r==="focusin"?(Vf(),Zi=s,Gi=a,Zi.attachEvent("onpropertychange",Bf)):r==="focusout"&&Vf()}function L0(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ho(Gi)}function A0(r,s){if(r==="click")return ho(s)}function I0(r,s){if(r==="input"||r==="change")return ho(s)}function F0(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var $r=typeof Object.is=="function"?Object.is:F0;function Ji(r,s){if($r(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var a=Object.keys(r),u=Object.keys(s);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var d=a[u];if(!h.call(s,d)||!$r(r[d],s[d]))return!1}return!0}function Hf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function qf(r,s){var a=Hf(r);r=0;for(var u;a;){if(a.nodeType===3){if(u=r+a.textContent.length,r<=s&&u>=s)return{node:a,offset:s-r};r=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hf(a)}}function Wf(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Wf(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Qf(){for(var r=window,s=Ir();s instanceof r.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)r=s.contentWindow;else break;s=Ir(r.document)}return s}function lu(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function M0(r){var s=Qf(),a=r.focusedElem,u=r.selectionRange;if(s!==a&&a&&a.ownerDocument&&Wf(a.ownerDocument.documentElement,a)){if(u!==null&&lu(a)){if(s=u.start,r=u.end,r===void 0&&(r=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(r,a.value.length);else if(r=(s=a.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var d=a.textContent.length,p=Math.min(u.start,d);u=u.end===void 0?p:Math.min(u.end,d),!r.extend&&p>u&&(d=u,u=p,p=d),d=qf(a,p);var b=qf(a,u);d&&b&&(r.rangeCount!==1||r.anchorNode!==d.node||r.anchorOffset!==d.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(s=s.createRange(),s.setStart(d.node,d.offset),r.removeAllRanges(),p>u?(r.addRange(s),r.extend(b.node,b.offset)):(s.setEnd(b.node,b.offset),r.addRange(s)))}}for(s=[],r=a;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)r=s[a],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var D0=f&&"documentMode"in document&&11>=document.documentMode,Ks=null,uu=null,Yi=null,cu=!1;function Kf(r,s,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;cu||Ks==null||Ks!==Ir(u)||(u=Ks,"selectionStart"in u&&lu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Yi&&Ji(Yi,u)||(Yi=u,u=yo(uu,"onSelect"),0<u.length&&(s=new eu("onSelect","select",null,s,a),r.push({event:s,listeners:u}),s.target=Ks)))}function po(r,s){var a={};return a[r.toLowerCase()]=s.toLowerCase(),a["Webkit"+r]="webkit"+s,a["Moz"+r]="moz"+s,a}var Zs={animationend:po("Animation","AnimationEnd"),animationiteration:po("Animation","AnimationIteration"),animationstart:po("Animation","AnimationStart"),transitionend:po("Transition","TransitionEnd")},du={},Zf={};f&&(Zf=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function mo(r){if(du[r])return du[r];if(!Zs[r])return r;var s=Zs[r],a;for(a in s)if(s.hasOwnProperty(a)&&a in Zf)return du[r]=s[a];return r}var Gf=mo("animationend"),Jf=mo("animationiteration"),Yf=mo("animationstart"),Xf=mo("transitionend"),eh=new Map,th="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 Un(r,s){eh.set(r,s),l(s,[r])}for(var fu=0;fu<th.length;fu++){var hu=th[fu],$0=hu.toLowerCase(),z0=hu[0].toUpperCase()+hu.slice(1);Un($0,"on"+z0)}Un(Gf,"onAnimationEnd"),Un(Jf,"onAnimationIteration"),Un(Yf,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(Xf,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="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(" "),U0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xi));function rh(r,s,a){var u=r.type||"unknown-event";r.currentTarget=a,$v(u,s,void 0,r),r.currentTarget=null}function nh(r,s){s=(s&4)!==0;for(var a=0;a<r.length;a++){var u=r[a],d=u.event;u=u.listeners;e:{var p=void 0;if(s)for(var b=u.length-1;0<=b;b--){var k=u[b],N=k.instance,U=k.currentTarget;if(k=k.listener,N!==p&&d.isPropagationStopped())break e;rh(d,k,U),p=N}else for(b=0;b<u.length;b++){if(k=u[b],N=k.instance,U=k.currentTarget,k=k.listener,N!==p&&d.isPropagationStopped())break e;rh(d,k,U),p=N}}}if(Ya)throw r=Hl,Ya=!1,Hl=null,r}function st(r,s){var a=s[bu];a===void 0&&(a=s[bu]=new Set);var u=r+"__bubble";a.has(u)||(sh(s,r,2,!1),a.add(u))}function pu(r,s,a){var u=0;s&&(u|=4),sh(a,r,u,s)}var go="_reactListening"+Math.random().toString(36).slice(2);function ea(r){if(!r[go]){r[go]=!0,i.forEach(function(a){a!=="selectionchange"&&(U0.has(a)||pu(a,!1,r),pu(a,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[go]||(s[go]=!0,pu("selectionchange",!1,s))}}function sh(r,s,a,u){switch(Ef(s)){case 1:var d=t0;break;case 4:d=r0;break;default:d=Jl}a=d.bind(null,s,a,r),d=void 0,!Mr||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(d=!0),u?d!==void 0?r.addEventListener(s,a,{capture:!0,passive:d}):r.addEventListener(s,a,!0):d!==void 0?r.addEventListener(s,a,{passive:d}):r.addEventListener(s,a,!1)}function mu(r,s,a,u,d){var p=u;if((s&1)===0&&(s&2)===0&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var k=u.stateNode.containerInfo;if(k===d||k.nodeType===8&&k.parentNode===d)break;if(b===4)for(b=u.return;b!==null;){var N=b.tag;if((N===3||N===4)&&(N=b.stateNode.containerInfo,N===d||N.nodeType===8&&N.parentNode===d))return;b=b.return}for(;k!==null;){if(b=_s(k),b===null)return;if(N=b.tag,N===5||N===6){u=p=b;continue e}k=k.parentNode}}u=u.return}or(function(){var U=p,J=In(a),Y=[];e:{var G=eh.get(r);if(G!==void 0){var de=eu,ve=r;switch(r){case"keypress":if(uo(a)===0)break e;case"keydown":case"keyup":de=y0;break;case"focusin":ve="focus",de=nu;break;case"focusout":ve="blur",de=nu;break;case"beforeblur":case"afterblur":de=nu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=Of;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=i0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=w0;break;case Gf:case Jf:case Yf:de=l0;break;case Xf:de=S0;break;case"scroll":de=n0;break;case"wheel":de=k0;break;case"copy":case"cut":case"paste":de=c0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Tf}var we=(s&4)!==0,bt=!we&&r==="scroll",F=we?G!==null?G+"Capture":null:G;we=[];for(var R=U,$;R!==null;){$=R;var te=$.stateNode;if($.tag===5&&te!==null&&($=te,F!==null&&(te=lr(R,F),te!=null&&we.push(ta(R,te,$)))),bt)break;R=R.return}0<we.length&&(G=new de(G,ve,null,a,J),Y.push({event:G,listeners:we}))}}if((s&7)===0){e:{if(G=r==="mouseover"||r==="pointerover",de=r==="mouseout"||r==="pointerout",G&&a!==mn&&(ve=a.relatedTarget||a.fromElement)&&(_s(ve)||ve[yn]))break e;if((de||G)&&(G=J.window===J?J:(G=J.ownerDocument)?G.defaultView||G.parentWindow:window,de?(ve=a.relatedTarget||a.toElement,de=U,ve=ve?_s(ve):null,ve!==null&&(bt=Ss(ve),ve!==bt||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(de=null,ve=U),de!==ve)){if(we=Of,te="onMouseLeave",F="onMouseEnter",R="mouse",(r==="pointerout"||r==="pointerover")&&(we=Tf,te="onPointerLeave",F="onPointerEnter",R="pointer"),bt=de==null?G:Ys(de),$=ve==null?G:Ys(ve),G=new we(te,R+"leave",de,a,J),G.target=bt,G.relatedTarget=$,te=null,_s(J)===U&&(we=new we(F,R+"enter",ve,a,J),we.target=$,we.relatedTarget=bt,te=we),bt=te,de&&ve)t:{for(we=de,F=ve,R=0,$=we;$;$=Gs($))R++;for($=0,te=F;te;te=Gs(te))$++;for(;0<R-$;)we=Gs(we),R--;for(;0<$-R;)F=Gs(F),$--;for(;R--;){if(we===F||F!==null&&we===F.alternate)break t;we=Gs(we),F=Gs(F)}we=null}else we=null;de!==null&&ih(Y,G,de,we,!1),ve!==null&&bt!==null&&ih(Y,bt,ve,we,!0)}}e:{if(G=U?Ys(U):window,de=G.nodeName&&G.nodeName.toLowerCase(),de==="select"||de==="input"&&G.type==="file")var be=R0;else if(Df(G))if(zf)be=I0;else{be=L0;var je=T0}else(de=G.nodeName)&&de.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(be=A0);if(be&&(be=be(r,U))){$f(Y,be,a,J);break e}je&&je(r,G,U),r==="focusout"&&(je=G._wrapperState)&&je.controlled&&G.type==="number"&&An(G,"number",G.value)}switch(je=U?Ys(U):window,r){case"focusin":(Df(je)||je.contentEditable==="true")&&(Ks=je,uu=U,Yi=null);break;case"focusout":Yi=uu=Ks=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Kf(Y,a,J);break;case"selectionchange":if(D0)break;case"keydown":case"keyup":Kf(Y,a,J)}var Ce;if(iu)e:{switch(r){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Qs?Ff(r,a)&&(Pe="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Pe="onCompositionStart");Pe&&(Lf&&a.locale!=="ko"&&(Qs||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Qs&&(Ce=Nf()):(zn=J,Xl="value"in zn?zn.value:zn.textContent,Qs=!0)),je=yo(U,Pe),0<je.length&&(Pe=new Rf(Pe,r,null,a,J),Y.push({event:Pe,listeners:je}),Ce?Pe.data=Ce:(Ce=Mf(a),Ce!==null&&(Pe.data=Ce)))),(Ce=C0?E0(r,a):N0(r,a))&&(U=yo(U,"onBeforeInput"),0<U.length&&(J=new Rf("onBeforeInput","beforeinput",null,a,J),Y.push({event:J,listeners:U}),J.data=Ce))}nh(Y,s)})}function ta(r,s,a){return{instance:r,listener:s,currentTarget:a}}function yo(r,s){for(var a=s+"Capture",u=[];r!==null;){var d=r,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=lr(r,a),p!=null&&u.unshift(ta(r,p,d)),p=lr(r,s),p!=null&&u.push(ta(r,p,d))),r=r.return}return u}function Gs(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function ih(r,s,a,u,d){for(var p=s._reactName,b=[];a!==null&&a!==u;){var k=a,N=k.alternate,U=k.stateNode;if(N!==null&&N===u)break;k.tag===5&&U!==null&&(k=U,d?(N=lr(a,p),N!=null&&b.unshift(ta(a,N,k))):d||(N=lr(a,p),N!=null&&b.push(ta(a,N,k)))),a=a.return}b.length!==0&&r.push({event:s,listeners:b})}var V0=/\r\n?/g,B0=/\u0000|\uFFFD/g;function ah(r){return(typeof r=="string"?r:""+r).replace(V0,`
|
|
`).replace(B0,"")}function vo(r,s,a){if(s=ah(s),ah(r)!==s&&a)throw Error(n(425))}function xo(){}var gu=null,yu=null;function vu(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var xu=typeof setTimeout=="function"?setTimeout:void 0,H0=typeof clearTimeout=="function"?clearTimeout:void 0,oh=typeof Promise=="function"?Promise:void 0,q0=typeof queueMicrotask=="function"?queueMicrotask:typeof oh<"u"?function(r){return oh.resolve(null).then(r).catch(W0)}:xu;function W0(r){setTimeout(function(){throw r})}function wu(r,s){var a=s,u=0;do{var d=a.nextSibling;if(r.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(u===0){r.removeChild(d),qi(s);return}u--}else a!=="$"&&a!=="$?"&&a!=="$!"||u++;a=d}while(a);qi(s)}function Vn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function lh(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return r;s--}else a==="/$"&&s++}r=r.previousSibling}return null}var Js=Math.random().toString(36).slice(2),en="__reactFiber$"+Js,ra="__reactProps$"+Js,yn="__reactContainer$"+Js,bu="__reactEvents$"+Js,Q0="__reactListeners$"+Js,K0="__reactHandles$"+Js;function _s(r){var s=r[en];if(s)return s;for(var a=r.parentNode;a;){if(s=a[yn]||a[en]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(r=lh(r);r!==null;){if(a=r[en])return a;r=lh(r)}return s}r=a,a=r.parentNode}return null}function na(r){return r=r[en]||r[yn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ys(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function wo(r){return r[ra]||null}var Su=[],Xs=-1;function Bn(r){return{current:r}}function it(r){0>Xs||(r.current=Su[Xs],Su[Xs]=null,Xs--)}function nt(r,s){Xs++,Su[Xs]=r.current,r.current=s}var Hn={},Ut=Bn(Hn),ur=Bn(!1),ks=Hn;function ei(r,s){var a=r.type.contextTypes;if(!a)return Hn;var u=r.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===s)return u.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in a)d[p]=s[p];return u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=d),d}function cr(r){return r=r.childContextTypes,r!=null}function bo(){it(ur),it(Ut)}function uh(r,s,a){if(Ut.current!==Hn)throw Error(n(168));nt(Ut,s),nt(ur,a)}function ch(r,s,a){var u=r.stateNode;if(s=s.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var d in u)if(!(d in s))throw Error(n(108,ke(r)||"Unknown",d));return W({},a,u)}function So(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Hn,ks=Ut.current,nt(Ut,r),nt(ur,ur.current),!0}function dh(r,s,a){var u=r.stateNode;if(!u)throw Error(n(169));a?(r=ch(r,s,ks),u.__reactInternalMemoizedMergedChildContext=r,it(ur),it(Ut),nt(Ut,r)):it(ur),nt(ur,a)}var vn=null,_o=!1,_u=!1;function fh(r){vn===null?vn=[r]:vn.push(r)}function Z0(r){_o=!0,fh(r)}function qn(){if(!_u&&vn!==null){_u=!0;var r=0,s=Ge;try{var a=vn;for(Ge=1;r<a.length;r++){var u=a[r];do u=u(!0);while(u!==null)}vn=null,_o=!1}catch(d){throw vn!==null&&(vn=vn.slice(r+1)),pf(ql,qn),d}finally{Ge=s,_u=!1}}return null}var ti=[],ri=0,ko=null,jo=0,Er=[],Nr=0,js=null,xn=1,wn="";function Cs(r,s){ti[ri++]=jo,ti[ri++]=ko,ko=r,jo=s}function hh(r,s,a){Er[Nr++]=xn,Er[Nr++]=wn,Er[Nr++]=js,js=r;var u=xn;r=wn;var d=32-Dr(u)-1;u&=~(1<<d),a+=1;var p=32-Dr(s)+d;if(30<p){var b=d-d%5;p=(u&(1<<b)-1).toString(32),u>>=b,d-=b,xn=1<<32-Dr(s)+d|a<<d|u,wn=p+r}else xn=1<<p|a<<d|u,wn=r}function ku(r){r.return!==null&&(Cs(r,1),hh(r,1,0))}function ju(r){for(;r===ko;)ko=ti[--ri],ti[ri]=null,jo=ti[--ri],ti[ri]=null;for(;r===js;)js=Er[--Nr],Er[Nr]=null,wn=Er[--Nr],Er[Nr]=null,xn=Er[--Nr],Er[Nr]=null}var xr=null,wr=null,lt=!1,zr=null;function ph(r,s){var a=Tr(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=r,s=r.deletions,s===null?(r.deletions=[a],r.flags|=16):s.push(a)}function mh(r,s){switch(r.tag){case 5:var a=r.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,xr=r,wr=Vn(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,xr=r,wr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=js!==null?{id:xn,overflow:wn}:null,r.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=Tr(18,null,null,0),a.stateNode=s,a.return=r,r.child=a,xr=r,wr=null,!0):!1;default:return!1}}function Cu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Eu(r){if(lt){var s=wr;if(s){var a=s;if(!mh(r,s)){if(Cu(r))throw Error(n(418));s=Vn(a.nextSibling);var u=xr;s&&mh(r,s)?ph(u,a):(r.flags=r.flags&-4097|2,lt=!1,xr=r)}}else{if(Cu(r))throw Error(n(418));r.flags=r.flags&-4097|2,lt=!1,xr=r}}}function gh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;xr=r}function Co(r){if(r!==xr)return!1;if(!lt)return gh(r),lt=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!vu(r.type,r.memoizedProps)),s&&(s=wr)){if(Cu(r))throw yh(),Error(n(418));for(;s;)ph(r,s),s=Vn(s.nextSibling)}if(gh(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"){if(s===0){wr=Vn(r.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}r=r.nextSibling}wr=null}}else wr=xr?Vn(r.stateNode.nextSibling):null;return!0}function yh(){for(var r=wr;r;)r=Vn(r.nextSibling)}function ni(){wr=xr=null,lt=!1}function Nu(r){zr===null?zr=[r]:zr.push(r)}var G0=M.ReactCurrentBatchConfig;function sa(r,s,a){if(r=a.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var u=a.stateNode}if(!u)throw Error(n(147,r));var d=u,p=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===p?s.ref:(s=function(b){var k=d.refs;b===null?delete k[p]:k[p]=b},s._stringRef=p,s)}if(typeof r!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,r))}return r}function Eo(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function vh(r){var s=r._init;return s(r._payload)}function xh(r){function s(F,R){if(r){var $=F.deletions;$===null?(F.deletions=[R],F.flags|=16):$.push(R)}}function a(F,R){if(!r)return null;for(;R!==null;)s(F,R),R=R.sibling;return null}function u(F,R){for(F=new Map;R!==null;)R.key!==null?F.set(R.key,R):F.set(R.index,R),R=R.sibling;return F}function d(F,R){return F=Xn(F,R),F.index=0,F.sibling=null,F}function p(F,R,$){return F.index=$,r?($=F.alternate,$!==null?($=$.index,$<R?(F.flags|=2,R):$):(F.flags|=2,R)):(F.flags|=1048576,R)}function b(F){return r&&F.alternate===null&&(F.flags|=2),F}function k(F,R,$,te){return R===null||R.tag!==6?(R=xc($,F.mode,te),R.return=F,R):(R=d(R,$),R.return=F,R)}function N(F,R,$,te){var be=$.type;return be===le?J(F,R,$.props.children,te,$.key):R!==null&&(R.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===P&&vh(be)===R.type)?(te=d(R,$.props),te.ref=sa(F,R,$),te.return=F,te):(te=Jo($.type,$.key,$.props,null,F.mode,te),te.ref=sa(F,R,$),te.return=F,te)}function U(F,R,$,te){return R===null||R.tag!==4||R.stateNode.containerInfo!==$.containerInfo||R.stateNode.implementation!==$.implementation?(R=wc($,F.mode,te),R.return=F,R):(R=d(R,$.children||[]),R.return=F,R)}function J(F,R,$,te,be){return R===null||R.tag!==7?(R=As($,F.mode,te,be),R.return=F,R):(R=d(R,$),R.return=F,R)}function Y(F,R,$){if(typeof R=="string"&&R!==""||typeof R=="number")return R=xc(""+R,F.mode,$),R.return=F,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case L:return $=Jo(R.type,R.key,R.props,null,F.mode,$),$.ref=sa(F,null,R),$.return=F,$;case Q:return R=wc(R,F.mode,$),R.return=F,R;case P:var te=R._init;return Y(F,te(R._payload),$)}if(Gr(R)||H(R))return R=As(R,F.mode,$,null),R.return=F,R;Eo(F,R)}return null}function G(F,R,$,te){var be=R!==null?R.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return be!==null?null:k(F,R,""+$,te);if(typeof $=="object"&&$!==null){switch($.$$typeof){case L:return $.key===be?N(F,R,$,te):null;case Q:return $.key===be?U(F,R,$,te):null;case P:return be=$._init,G(F,R,be($._payload),te)}if(Gr($)||H($))return be!==null?null:J(F,R,$,te,null);Eo(F,$)}return null}function de(F,R,$,te,be){if(typeof te=="string"&&te!==""||typeof te=="number")return F=F.get($)||null,k(R,F,""+te,be);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case L:return F=F.get(te.key===null?$:te.key)||null,N(R,F,te,be);case Q:return F=F.get(te.key===null?$:te.key)||null,U(R,F,te,be);case P:var je=te._init;return de(F,R,$,je(te._payload),be)}if(Gr(te)||H(te))return F=F.get($)||null,J(R,F,te,be,null);Eo(R,te)}return null}function ve(F,R,$,te){for(var be=null,je=null,Ce=R,Pe=R=0,It=null;Ce!==null&&Pe<$.length;Pe++){Ce.index>Pe?(It=Ce,Ce=null):It=Ce.sibling;var qe=G(F,Ce,$[Pe],te);if(qe===null){Ce===null&&(Ce=It);break}r&&Ce&&qe.alternate===null&&s(F,Ce),R=p(qe,R,Pe),je===null?be=qe:je.sibling=qe,je=qe,Ce=It}if(Pe===$.length)return a(F,Ce),lt&&Cs(F,Pe),be;if(Ce===null){for(;Pe<$.length;Pe++)Ce=Y(F,$[Pe],te),Ce!==null&&(R=p(Ce,R,Pe),je===null?be=Ce:je.sibling=Ce,je=Ce);return lt&&Cs(F,Pe),be}for(Ce=u(F,Ce);Pe<$.length;Pe++)It=de(Ce,F,Pe,$[Pe],te),It!==null&&(r&&It.alternate!==null&&Ce.delete(It.key===null?Pe:It.key),R=p(It,R,Pe),je===null?be=It:je.sibling=It,je=It);return r&&Ce.forEach(function(es){return s(F,es)}),lt&&Cs(F,Pe),be}function we(F,R,$,te){var be=H($);if(typeof be!="function")throw Error(n(150));if($=be.call($),$==null)throw Error(n(151));for(var je=be=null,Ce=R,Pe=R=0,It=null,qe=$.next();Ce!==null&&!qe.done;Pe++,qe=$.next()){Ce.index>Pe?(It=Ce,Ce=null):It=Ce.sibling;var es=G(F,Ce,qe.value,te);if(es===null){Ce===null&&(Ce=It);break}r&&Ce&&es.alternate===null&&s(F,Ce),R=p(es,R,Pe),je===null?be=es:je.sibling=es,je=es,Ce=It}if(qe.done)return a(F,Ce),lt&&Cs(F,Pe),be;if(Ce===null){for(;!qe.done;Pe++,qe=$.next())qe=Y(F,qe.value,te),qe!==null&&(R=p(qe,R,Pe),je===null?be=qe:je.sibling=qe,je=qe);return lt&&Cs(F,Pe),be}for(Ce=u(F,Ce);!qe.done;Pe++,qe=$.next())qe=de(Ce,F,Pe,qe.value,te),qe!==null&&(r&&qe.alternate!==null&&Ce.delete(qe.key===null?Pe:qe.key),R=p(qe,R,Pe),je===null?be=qe:je.sibling=qe,je=qe);return r&&Ce.forEach(function(Px){return s(F,Px)}),lt&&Cs(F,Pe),be}function bt(F,R,$,te){if(typeof $=="object"&&$!==null&&$.type===le&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case L:e:{for(var be=$.key,je=R;je!==null;){if(je.key===be){if(be=$.type,be===le){if(je.tag===7){a(F,je.sibling),R=d(je,$.props.children),R.return=F,F=R;break e}}else if(je.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===P&&vh(be)===je.type){a(F,je.sibling),R=d(je,$.props),R.ref=sa(F,je,$),R.return=F,F=R;break e}a(F,je);break}else s(F,je);je=je.sibling}$.type===le?(R=As($.props.children,F.mode,te,$.key),R.return=F,F=R):(te=Jo($.type,$.key,$.props,null,F.mode,te),te.ref=sa(F,R,$),te.return=F,F=te)}return b(F);case Q:e:{for(je=$.key;R!==null;){if(R.key===je)if(R.tag===4&&R.stateNode.containerInfo===$.containerInfo&&R.stateNode.implementation===$.implementation){a(F,R.sibling),R=d(R,$.children||[]),R.return=F,F=R;break e}else{a(F,R);break}else s(F,R);R=R.sibling}R=wc($,F.mode,te),R.return=F,F=R}return b(F);case P:return je=$._init,bt(F,R,je($._payload),te)}if(Gr($))return ve(F,R,$,te);if(H($))return we(F,R,$,te);Eo(F,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,R!==null&&R.tag===6?(a(F,R.sibling),R=d(R,$),R.return=F,F=R):(a(F,R),R=xc($,F.mode,te),R.return=F,F=R),b(F)):a(F,R)}return bt}var si=xh(!0),wh=xh(!1),No=Bn(null),Po=null,ii=null,Pu=null;function Ou(){Pu=ii=Po=null}function Ru(r){var s=No.current;it(No),r._currentValue=s}function Tu(r,s,a){for(;r!==null;){var u=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,u!==null&&(u.childLanes|=s)):u!==null&&(u.childLanes&s)!==s&&(u.childLanes|=s),r===a)break;r=r.return}}function ai(r,s){Po=r,Pu=ii=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(dr=!0),r.firstContext=null)}function Pr(r){var s=r._currentValue;if(Pu!==r)if(r={context:r,memoizedValue:s,next:null},ii===null){if(Po===null)throw Error(n(308));ii=r,Po.dependencies={lanes:0,firstContext:r}}else ii=ii.next=r;return s}var Es=null;function Lu(r){Es===null?Es=[r]:Es.push(r)}function bh(r,s,a,u){var d=s.interleaved;return d===null?(a.next=a,Lu(s)):(a.next=d.next,d.next=a),s.interleaved=a,bn(r,u)}function bn(r,s){r.lanes|=s;var a=r.alternate;for(a!==null&&(a.lanes|=s),a=r,r=r.return;r!==null;)r.childLanes|=s,a=r.alternate,a!==null&&(a.childLanes|=s),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Wn=!1;function Au(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Sn(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function Qn(r,s,a){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(He&2)!==0){var d=u.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),u.pending=s,bn(r,a)}return d=u.interleaved,d===null?(s.next=s,Lu(u)):(s.next=d.next,d.next=s),u.interleaved=s,bn(r,a)}function Oo(r,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var u=s.lanes;u&=r.pendingLanes,a|=u,s.lanes=a,Kl(r,a)}}function _h(r,s){var a=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var d=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var b={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};p===null?d=p=b:p=p.next=b,a=a.next}while(a!==null);p===null?d=p=s:p=p.next=s}else d=p=s;a={baseState:u.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:u.shared,effects:u.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=s:r.next=s,a.lastBaseUpdate=s}function Ro(r,s,a,u){var d=r.updateQueue;Wn=!1;var p=d.firstBaseUpdate,b=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var N=k,U=N.next;N.next=null,b===null?p=U:b.next=U,b=N;var J=r.alternate;J!==null&&(J=J.updateQueue,k=J.lastBaseUpdate,k!==b&&(k===null?J.firstBaseUpdate=U:k.next=U,J.lastBaseUpdate=N))}if(p!==null){var Y=d.baseState;b=0,J=U=N=null,k=p;do{var G=k.lane,de=k.eventTime;if((u&G)===G){J!==null&&(J=J.next={eventTime:de,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var ve=r,we=k;switch(G=s,de=a,we.tag){case 1:if(ve=we.payload,typeof ve=="function"){Y=ve.call(de,Y,G);break e}Y=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,G=typeof ve=="function"?ve.call(de,Y,G):ve,G==null)break e;Y=W({},Y,G);break e;case 2:Wn=!0}}k.callback!==null&&k.lane!==0&&(r.flags|=64,G=d.effects,G===null?d.effects=[k]:G.push(k))}else de={eventTime:de,lane:G,tag:k.tag,payload:k.payload,callback:k.callback,next:null},J===null?(U=J=de,N=Y):J=J.next=de,b|=G;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;G=k,k=G.next,G.next=null,d.lastBaseUpdate=G,d.shared.pending=null}}while(!0);if(J===null&&(N=Y),d.baseState=N,d.firstBaseUpdate=U,d.lastBaseUpdate=J,s=d.shared.interleaved,s!==null){d=s;do b|=d.lane,d=d.next;while(d!==s)}else p===null&&(d.shared.lanes=0);Os|=b,r.lanes=b,r.memoizedState=Y}}function kh(r,s,a){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var u=r[s],d=u.callback;if(d!==null){if(u.callback=null,u=a,typeof d!="function")throw Error(n(191,d));d.call(u)}}}var ia={},tn=Bn(ia),aa=Bn(ia),oa=Bn(ia);function Ns(r){if(r===ia)throw Error(n(174));return r}function Iu(r,s){switch(nt(oa,s),nt(aa,r),nt(tn,ia),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:se(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=se(s,r)}it(tn),nt(tn,s)}function oi(){it(tn),it(aa),it(oa)}function jh(r){Ns(oa.current);var s=Ns(tn.current),a=se(s,r.type);s!==a&&(nt(aa,r),nt(tn,a))}function Fu(r){aa.current===r&&(it(tn),it(aa))}var dt=Bn(0);function To(r){for(var s=r;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Mu=[];function Du(){for(var r=0;r<Mu.length;r++)Mu[r]._workInProgressVersionPrimary=null;Mu.length=0}var Lo=M.ReactCurrentDispatcher,$u=M.ReactCurrentBatchConfig,Ps=0,ft=null,Ot=null,Lt=null,Ao=!1,la=!1,ua=0,J0=0;function Vt(){throw Error(n(321))}function zu(r,s){if(s===null)return!1;for(var a=0;a<s.length&&a<r.length;a++)if(!$r(r[a],s[a]))return!1;return!0}function Uu(r,s,a,u,d,p){if(Ps=p,ft=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Lo.current=r===null||r.memoizedState===null?tx:rx,r=a(u,d),la){p=0;do{if(la=!1,ua=0,25<=p)throw Error(n(301));p+=1,Lt=Ot=null,s.updateQueue=null,Lo.current=nx,r=a(u,d)}while(la)}if(Lo.current=Mo,s=Ot!==null&&Ot.next!==null,Ps=0,Lt=Ot=ft=null,Ao=!1,s)throw Error(n(300));return r}function Vu(){var r=ua!==0;return ua=0,r}function rn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?ft.memoizedState=Lt=r:Lt=Lt.next=r,Lt}function Or(){if(Ot===null){var r=ft.alternate;r=r!==null?r.memoizedState:null}else r=Ot.next;var s=Lt===null?ft.memoizedState:Lt.next;if(s!==null)Lt=s,Ot=r;else{if(r===null)throw Error(n(310));Ot=r,r={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},Lt===null?ft.memoizedState=Lt=r:Lt=Lt.next=r}return Lt}function ca(r,s){return typeof s=="function"?s(r):s}function Bu(r){var s=Or(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var u=Ot,d=u.baseQueue,p=a.pending;if(p!==null){if(d!==null){var b=d.next;d.next=p.next,p.next=b}u.baseQueue=d=p,a.pending=null}if(d!==null){p=d.next,u=u.baseState;var k=b=null,N=null,U=p;do{var J=U.lane;if((Ps&J)===J)N!==null&&(N=N.next={lane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),u=U.hasEagerState?U.eagerState:r(u,U.action);else{var Y={lane:J,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null};N===null?(k=N=Y,b=u):N=N.next=Y,ft.lanes|=J,Os|=J}U=U.next}while(U!==null&&U!==p);N===null?b=u:N.next=k,$r(u,s.memoizedState)||(dr=!0),s.memoizedState=u,s.baseState=b,s.baseQueue=N,a.lastRenderedState=u}if(r=a.interleaved,r!==null){d=r;do p=d.lane,ft.lanes|=p,Os|=p,d=d.next;while(d!==r)}else d===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function Hu(r){var s=Or(),a=s.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var u=a.dispatch,d=a.pending,p=s.memoizedState;if(d!==null){a.pending=null;var b=d=d.next;do p=r(p,b.action),b=b.next;while(b!==d);$r(p,s.memoizedState)||(dr=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,u]}function Ch(){}function Eh(r,s){var a=ft,u=Or(),d=s(),p=!$r(u.memoizedState,d);if(p&&(u.memoizedState=d,dr=!0),u=u.queue,qu(Oh.bind(null,a,u,r),[r]),u.getSnapshot!==s||p||Lt!==null&&Lt.memoizedState.tag&1){if(a.flags|=2048,da(9,Ph.bind(null,a,u,d,s),void 0,null),At===null)throw Error(n(349));(Ps&30)!==0||Nh(a,s,d)}return d}function Nh(r,s,a){r.flags|=16384,r={getSnapshot:s,value:a},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.stores=[r]):(a=s.stores,a===null?s.stores=[r]:a.push(r))}function Ph(r,s,a,u){s.value=a,s.getSnapshot=u,Rh(s)&&Th(r)}function Oh(r,s,a){return a(function(){Rh(s)&&Th(r)})}function Rh(r){var s=r.getSnapshot;r=r.value;try{var a=s();return!$r(r,a)}catch{return!0}}function Th(r){var s=bn(r,1);s!==null&&Hr(s,r,1,-1)}function Lh(r){var s=rn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:r},s.queue=r,r=r.dispatch=ex.bind(null,ft,r),[s.memoizedState,r]}function da(r,s,a,u){return r={tag:r,create:s,destroy:a,deps:u,next:null},s=ft.updateQueue,s===null?(s={lastEffect:null,stores:null},ft.updateQueue=s,s.lastEffect=r.next=r):(a=s.lastEffect,a===null?s.lastEffect=r.next=r:(u=a.next,a.next=r,r.next=u,s.lastEffect=r)),r}function Ah(){return Or().memoizedState}function Io(r,s,a,u){var d=rn();ft.flags|=r,d.memoizedState=da(1|s,a,void 0,u===void 0?null:u)}function Fo(r,s,a,u){var d=Or();u=u===void 0?null:u;var p=void 0;if(Ot!==null){var b=Ot.memoizedState;if(p=b.destroy,u!==null&&zu(u,b.deps)){d.memoizedState=da(s,a,p,u);return}}ft.flags|=r,d.memoizedState=da(1|s,a,p,u)}function Ih(r,s){return Io(8390656,8,r,s)}function qu(r,s){return Fo(2048,8,r,s)}function Fh(r,s){return Fo(4,2,r,s)}function Mh(r,s){return Fo(4,4,r,s)}function Dh(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function $h(r,s,a){return a=a!=null?a.concat([r]):null,Fo(4,4,Dh.bind(null,s,r),a)}function Wu(){}function zh(r,s){var a=Or();s=s===void 0?null:s;var u=a.memoizedState;return u!==null&&s!==null&&zu(s,u[1])?u[0]:(a.memoizedState=[r,s],r)}function Uh(r,s){var a=Or();s=s===void 0?null:s;var u=a.memoizedState;return u!==null&&s!==null&&zu(s,u[1])?u[0]:(r=r(),a.memoizedState=[r,s],r)}function Vh(r,s,a){return(Ps&21)===0?(r.baseState&&(r.baseState=!1,dr=!0),r.memoizedState=a):($r(a,s)||(a=vf(),ft.lanes|=a,Os|=a,r.baseState=!0),s)}function Y0(r,s){var a=Ge;Ge=a!==0&&4>a?a:4,r(!0);var u=$u.transition;$u.transition={};try{r(!1),s()}finally{Ge=a,$u.transition=u}}function Bh(){return Or().memoizedState}function X0(r,s,a){var u=Jn(r);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},Hh(r))qh(s,a);else if(a=bh(r,s,a,u),a!==null){var d=er();Hr(a,r,u,d),Wh(a,s,u)}}function ex(r,s,a){var u=Jn(r),d={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hh(r))qh(s,d);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var b=s.lastRenderedState,k=p(b,a);if(d.hasEagerState=!0,d.eagerState=k,$r(k,b)){var N=s.interleaved;N===null?(d.next=d,Lu(s)):(d.next=N.next,N.next=d),s.interleaved=d;return}}catch{}a=bh(r,s,d,u),a!==null&&(d=er(),Hr(a,r,u,d),Wh(a,s,u))}}function Hh(r){var s=r.alternate;return r===ft||s!==null&&s===ft}function qh(r,s){la=Ao=!0;var a=r.pending;a===null?s.next=s:(s.next=a.next,a.next=s),r.pending=s}function Wh(r,s,a){if((a&4194240)!==0){var u=s.lanes;u&=r.pendingLanes,a|=u,s.lanes=a,Kl(r,a)}}var Mo={readContext:Pr,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},tx={readContext:Pr,useCallback:function(r,s){return rn().memoizedState=[r,s===void 0?null:s],r},useContext:Pr,useEffect:Ih,useImperativeHandle:function(r,s,a){return a=a!=null?a.concat([r]):null,Io(4194308,4,Dh.bind(null,s,r),a)},useLayoutEffect:function(r,s){return Io(4194308,4,r,s)},useInsertionEffect:function(r,s){return Io(4,2,r,s)},useMemo:function(r,s){var a=rn();return s=s===void 0?null:s,r=r(),a.memoizedState=[r,s],r},useReducer:function(r,s,a){var u=rn();return s=a!==void 0?a(s):s,u.memoizedState=u.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},u.queue=r,r=r.dispatch=X0.bind(null,ft,r),[u.memoizedState,r]},useRef:function(r){var s=rn();return r={current:r},s.memoizedState=r},useState:Lh,useDebugValue:Wu,useDeferredValue:function(r){return rn().memoizedState=r},useTransition:function(){var r=Lh(!1),s=r[0];return r=Y0.bind(null,r[1]),rn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,a){var u=ft,d=rn();if(lt){if(a===void 0)throw Error(n(407));a=a()}else{if(a=s(),At===null)throw Error(n(349));(Ps&30)!==0||Nh(u,s,a)}d.memoizedState=a;var p={value:a,getSnapshot:s};return d.queue=p,Ih(Oh.bind(null,u,p,r),[r]),u.flags|=2048,da(9,Ph.bind(null,u,p,a,s),void 0,null),a},useId:function(){var r=rn(),s=At.identifierPrefix;if(lt){var a=wn,u=xn;a=(u&~(1<<32-Dr(u)-1)).toString(32)+a,s=":"+s+"R"+a,a=ua++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=J0++,s=":"+s+"r"+a.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},rx={readContext:Pr,useCallback:zh,useContext:Pr,useEffect:qu,useImperativeHandle:$h,useInsertionEffect:Fh,useLayoutEffect:Mh,useMemo:Uh,useReducer:Bu,useRef:Ah,useState:function(){return Bu(ca)},useDebugValue:Wu,useDeferredValue:function(r){var s=Or();return Vh(s,Ot.memoizedState,r)},useTransition:function(){var r=Bu(ca)[0],s=Or().memoizedState;return[r,s]},useMutableSource:Ch,useSyncExternalStore:Eh,useId:Bh,unstable_isNewReconciler:!1},nx={readContext:Pr,useCallback:zh,useContext:Pr,useEffect:qu,useImperativeHandle:$h,useInsertionEffect:Fh,useLayoutEffect:Mh,useMemo:Uh,useReducer:Hu,useRef:Ah,useState:function(){return Hu(ca)},useDebugValue:Wu,useDeferredValue:function(r){var s=Or();return Ot===null?s.memoizedState=r:Vh(s,Ot.memoizedState,r)},useTransition:function(){var r=Hu(ca)[0],s=Or().memoizedState;return[r,s]},useMutableSource:Ch,useSyncExternalStore:Eh,useId:Bh,unstable_isNewReconciler:!1};function Ur(r,s){if(r&&r.defaultProps){s=W({},s),r=r.defaultProps;for(var a in r)s[a]===void 0&&(s[a]=r[a]);return s}return s}function Qu(r,s,a,u){s=r.memoizedState,a=a(u,s),a=a==null?s:W({},s,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Do={isMounted:function(r){return(r=r._reactInternals)?Ss(r)===r:!1},enqueueSetState:function(r,s,a){r=r._reactInternals;var u=er(),d=Jn(r),p=Sn(u,d);p.payload=s,a!=null&&(p.callback=a),s=Qn(r,p,d),s!==null&&(Hr(s,r,d,u),Oo(s,r,d))},enqueueReplaceState:function(r,s,a){r=r._reactInternals;var u=er(),d=Jn(r),p=Sn(u,d);p.tag=1,p.payload=s,a!=null&&(p.callback=a),s=Qn(r,p,d),s!==null&&(Hr(s,r,d,u),Oo(s,r,d))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var a=er(),u=Jn(r),d=Sn(a,u);d.tag=2,s!=null&&(d.callback=s),s=Qn(r,d,u),s!==null&&(Hr(s,r,u,a),Oo(s,r,u))}};function Qh(r,s,a,u,d,p,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,p,b):s.prototype&&s.prototype.isPureReactComponent?!Ji(a,u)||!Ji(d,p):!0}function Kh(r,s,a){var u=!1,d=Hn,p=s.contextType;return typeof p=="object"&&p!==null?p=Pr(p):(d=cr(s)?ks:Ut.current,u=s.contextTypes,p=(u=u!=null)?ei(r,d):Hn),s=new s(a,p),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Do,r.stateNode=s,s._reactInternals=r,u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=d,r.__reactInternalMemoizedMaskedChildContext=p),s}function Zh(r,s,a,u){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,u),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,u),s.state!==r&&Do.enqueueReplaceState(s,s.state,null)}function Ku(r,s,a,u){var d=r.stateNode;d.props=a,d.state=r.memoizedState,d.refs={},Au(r);var p=s.contextType;typeof p=="object"&&p!==null?d.context=Pr(p):(p=cr(s)?ks:Ut.current,d.context=ei(r,p)),d.state=r.memoizedState,p=s.getDerivedStateFromProps,typeof p=="function"&&(Qu(r,s,p,a),d.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(s=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),s!==d.state&&Do.enqueueReplaceState(d,d.state,null),Ro(r,a,d,u),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308)}function li(r,s){try{var a="",u=s;do a+=Ee(u),u=u.return;while(u);var d=a}catch(p){d=`
|
|
Error generating stack: `+p.message+`
|
|
`+p.stack}return{value:r,source:s,stack:d,digest:null}}function Zu(r,s,a){return{value:r,source:null,stack:a??null,digest:s??null}}function Gu(r,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var sx=typeof WeakMap=="function"?WeakMap:Map;function Gh(r,s,a){a=Sn(-1,a),a.tag=3,a.payload={element:null};var u=s.value;return a.callback=function(){qo||(qo=!0,dc=u),Gu(r,s)},a}function Jh(r,s,a){a=Sn(-1,a),a.tag=3;var u=r.type.getDerivedStateFromError;if(typeof u=="function"){var d=s.value;a.payload=function(){return u(d)},a.callback=function(){Gu(r,s)}}var p=r.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(a.callback=function(){Gu(r,s),typeof u!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})}),a}function Yh(r,s,a){var u=r.pingCache;if(u===null){u=r.pingCache=new sx;var d=new Set;u.set(s,d)}else d=u.get(s),d===void 0&&(d=new Set,u.set(s,d));d.has(a)||(d.add(a),r=vx.bind(null,r,s,a),s.then(r,r))}function Xh(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function ep(r,s,a,u,d){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=Sn(-1,1),s.tag=2,Qn(a,s,1))),a.lanes|=1),r):(r.flags|=65536,r.lanes=d,r)}var ix=M.ReactCurrentOwner,dr=!1;function Xt(r,s,a,u){s.child=r===null?wh(s,null,a,u):si(s,r.child,a,u)}function tp(r,s,a,u,d){a=a.render;var p=s.ref;return ai(s,d),u=Uu(r,s,a,u,p,d),a=Vu(),r!==null&&!dr?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~d,_n(r,s,d)):(lt&&a&&ku(s),s.flags|=1,Xt(r,s,u,d),s.child)}function rp(r,s,a,u,d){if(r===null){var p=a.type;return typeof p=="function"&&!vc(p)&&p.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=p,np(r,s,p,u,d)):(r=Jo(a.type,null,u,s,s.mode,d),r.ref=s.ref,r.return=s,s.child=r)}if(p=r.child,(r.lanes&d)===0){var b=p.memoizedProps;if(a=a.compare,a=a!==null?a:Ji,a(b,u)&&r.ref===s.ref)return _n(r,s,d)}return s.flags|=1,r=Xn(p,u),r.ref=s.ref,r.return=s,s.child=r}function np(r,s,a,u,d){if(r!==null){var p=r.memoizedProps;if(Ji(p,u)&&r.ref===s.ref)if(dr=!1,s.pendingProps=u=p,(r.lanes&d)!==0)(r.flags&131072)!==0&&(dr=!0);else return s.lanes=r.lanes,_n(r,s,d)}return Ju(r,s,a,u,d)}function sp(r,s,a){var u=s.pendingProps,d=u.children,p=r!==null?r.memoizedState:null;if(u.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(ci,br),br|=a;else{if((a&1073741824)===0)return r=p!==null?p.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,nt(ci,br),br|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=p!==null?p.baseLanes:a,nt(ci,br),br|=u}else p!==null?(u=p.baseLanes|a,s.memoizedState=null):u=a,nt(ci,br),br|=u;return Xt(r,s,d,a),s.child}function ip(r,s){var a=s.ref;(r===null&&a!==null||r!==null&&r.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function Ju(r,s,a,u,d){var p=cr(a)?ks:Ut.current;return p=ei(s,p),ai(s,d),a=Uu(r,s,a,u,p,d),u=Vu(),r!==null&&!dr?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~d,_n(r,s,d)):(lt&&u&&ku(s),s.flags|=1,Xt(r,s,a,d),s.child)}function ap(r,s,a,u,d){if(cr(a)){var p=!0;So(s)}else p=!1;if(ai(s,d),s.stateNode===null)zo(r,s),Kh(s,a,u),Ku(s,a,u,d),u=!0;else if(r===null){var b=s.stateNode,k=s.memoizedProps;b.props=k;var N=b.context,U=a.contextType;typeof U=="object"&&U!==null?U=Pr(U):(U=cr(a)?ks:Ut.current,U=ei(s,U));var J=a.getDerivedStateFromProps,Y=typeof J=="function"||typeof b.getSnapshotBeforeUpdate=="function";Y||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k!==u||N!==U)&&Zh(s,b,u,U),Wn=!1;var G=s.memoizedState;b.state=G,Ro(s,u,b,d),N=s.memoizedState,k!==u||G!==N||ur.current||Wn?(typeof J=="function"&&(Qu(s,a,J,u),N=s.memoizedState),(k=Wn||Qh(s,a,k,u,G,N,U))?(Y||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=u,s.memoizedState=N),b.props=u,b.state=N,b.context=U,u=k):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),u=!1)}else{b=s.stateNode,Sh(r,s),k=s.memoizedProps,U=s.type===s.elementType?k:Ur(s.type,k),b.props=U,Y=s.pendingProps,G=b.context,N=a.contextType,typeof N=="object"&&N!==null?N=Pr(N):(N=cr(a)?ks:Ut.current,N=ei(s,N));var de=a.getDerivedStateFromProps;(J=typeof de=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k!==Y||G!==N)&&Zh(s,b,u,N),Wn=!1,G=s.memoizedState,b.state=G,Ro(s,u,b,d);var ve=s.memoizedState;k!==Y||G!==ve||ur.current||Wn?(typeof de=="function"&&(Qu(s,a,de,u),ve=s.memoizedState),(U=Wn||Qh(s,a,U,u,G,ve,N)||!1)?(J||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ve,N),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ve,N)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||k===r.memoizedProps&&G===r.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&G===r.memoizedState||(s.flags|=1024),s.memoizedProps=u,s.memoizedState=ve),b.props=u,b.state=ve,b.context=N,u=U):(typeof b.componentDidUpdate!="function"||k===r.memoizedProps&&G===r.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&G===r.memoizedState||(s.flags|=1024),u=!1)}return Yu(r,s,a,u,p,d)}function Yu(r,s,a,u,d,p){ip(r,s);var b=(s.flags&128)!==0;if(!u&&!b)return d&&dh(s,a,!1),_n(r,s,p);u=s.stateNode,ix.current=s;var k=b&&typeof a.getDerivedStateFromError!="function"?null:u.render();return s.flags|=1,r!==null&&b?(s.child=si(s,r.child,null,p),s.child=si(s,null,k,p)):Xt(r,s,k,p),s.memoizedState=u.state,d&&dh(s,a,!0),s.child}function op(r){var s=r.stateNode;s.pendingContext?uh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&uh(r,s.context,!1),Iu(r,s.containerInfo)}function lp(r,s,a,u,d){return ni(),Nu(d),s.flags|=256,Xt(r,s,a,u),s.child}var Xu={dehydrated:null,treeContext:null,retryLane:0};function ec(r){return{baseLanes:r,cachePool:null,transitions:null}}function up(r,s,a){var u=s.pendingProps,d=dt.current,p=!1,b=(s.flags&128)!==0,k;if((k=b)||(k=r!==null&&r.memoizedState===null?!1:(d&2)!==0),k?(p=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(d|=1),nt(dt,d&1),r===null)return Eu(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(b=u.children,r=u.fallback,p?(u=s.mode,p=s.child,b={mode:"hidden",children:b},(u&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=b):p=Yo(b,u,0,null),r=As(r,u,a,null),p.return=s,r.return=s,p.sibling=r,s.child=p,s.child.memoizedState=ec(a),s.memoizedState=Xu,r):tc(s,b));if(d=r.memoizedState,d!==null&&(k=d.dehydrated,k!==null))return ax(r,s,b,u,k,d,a);if(p){p=u.fallback,b=s.mode,d=r.child,k=d.sibling;var N={mode:"hidden",children:u.children};return(b&1)===0&&s.child!==d?(u=s.child,u.childLanes=0,u.pendingProps=N,s.deletions=null):(u=Xn(d,N),u.subtreeFlags=d.subtreeFlags&14680064),k!==null?p=Xn(k,p):(p=As(p,b,a,null),p.flags|=2),p.return=s,u.return=s,u.sibling=p,s.child=u,u=p,p=s.child,b=r.child.memoizedState,b=b===null?ec(a):{baseLanes:b.baseLanes|a,cachePool:null,transitions:b.transitions},p.memoizedState=b,p.childLanes=r.childLanes&~a,s.memoizedState=Xu,u}return p=r.child,r=p.sibling,u=Xn(p,{mode:"visible",children:u.children}),(s.mode&1)===0&&(u.lanes=a),u.return=s,u.sibling=null,r!==null&&(a=s.deletions,a===null?(s.deletions=[r],s.flags|=16):a.push(r)),s.child=u,s.memoizedState=null,u}function tc(r,s){return s=Yo({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function $o(r,s,a,u){return u!==null&&Nu(u),si(s,r.child,null,a),r=tc(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function ax(r,s,a,u,d,p,b){if(a)return s.flags&256?(s.flags&=-257,u=Zu(Error(n(422))),$o(r,s,b,u)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(p=u.fallback,d=s.mode,u=Yo({mode:"visible",children:u.children},d,0,null),p=As(p,d,b,null),p.flags|=2,u.return=s,p.return=s,u.sibling=p,s.child=u,(s.mode&1)!==0&&si(s,r.child,null,b),s.child.memoizedState=ec(b),s.memoizedState=Xu,p);if((s.mode&1)===0)return $o(r,s,b,null);if(d.data==="$!"){if(u=d.nextSibling&&d.nextSibling.dataset,u)var k=u.dgst;return u=k,p=Error(n(419)),u=Zu(p,u,void 0),$o(r,s,b,u)}if(k=(b&r.childLanes)!==0,dr||k){if(u=At,u!==null){switch(b&-b){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(u.suspendedLanes|b))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,bn(r,d),Hr(u,r,d,-1))}return yc(),u=Zu(Error(n(421))),$o(r,s,b,u)}return d.data==="$?"?(s.flags|=128,s.child=r.child,s=xx.bind(null,r),d._reactRetry=s,null):(r=p.treeContext,wr=Vn(d.nextSibling),xr=s,lt=!0,zr=null,r!==null&&(Er[Nr++]=xn,Er[Nr++]=wn,Er[Nr++]=js,xn=r.id,wn=r.overflow,js=s),s=tc(s,u.children),s.flags|=4096,s)}function cp(r,s,a){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s),Tu(r.return,s,a)}function rc(r,s,a,u,d){var p=r.memoizedState;p===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:d}:(p.isBackwards=s,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=a,p.tailMode=d)}function dp(r,s,a){var u=s.pendingProps,d=u.revealOrder,p=u.tail;if(Xt(r,s,u.children,a),u=dt.current,(u&2)!==0)u=u&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&cp(r,a,s);else if(r.tag===19)cp(r,a,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}u&=1}if(nt(dt,u),(s.mode&1)===0)s.memoizedState=null;else switch(d){case"forwards":for(a=s.child,d=null;a!==null;)r=a.alternate,r!==null&&To(r)===null&&(d=a),a=a.sibling;a=d,a===null?(d=s.child,s.child=null):(d=a.sibling,a.sibling=null),rc(s,!1,d,a,p);break;case"backwards":for(a=null,d=s.child,s.child=null;d!==null;){if(r=d.alternate,r!==null&&To(r)===null){s.child=d;break}r=d.sibling,d.sibling=a,a=d,d=r}rc(s,!0,a,null,p);break;case"together":rc(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function zo(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function _n(r,s,a){if(r!==null&&(s.dependencies=r.dependencies),Os|=s.lanes,(a&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,a=Xn(r,r.pendingProps),s.child=a,a.return=s;r.sibling!==null;)r=r.sibling,a=a.sibling=Xn(r,r.pendingProps),a.return=s;a.sibling=null}return s.child}function ox(r,s,a){switch(s.tag){case 3:op(s),ni();break;case 5:jh(s);break;case 1:cr(s.type)&&So(s);break;case 4:Iu(s,s.stateNode.containerInfo);break;case 10:var u=s.type._context,d=s.memoizedProps.value;nt(No,u._currentValue),u._currentValue=d;break;case 13:if(u=s.memoizedState,u!==null)return u.dehydrated!==null?(nt(dt,dt.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?up(r,s,a):(nt(dt,dt.current&1),r=_n(r,s,a),r!==null?r.sibling:null);nt(dt,dt.current&1);break;case 19:if(u=(a&s.childLanes)!==0,(r.flags&128)!==0){if(u)return dp(r,s,a);s.flags|=128}if(d=s.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),nt(dt,dt.current),u)break;return null;case 22:case 23:return s.lanes=0,sp(r,s,a)}return _n(r,s,a)}var fp,nc,hp,pp;fp=function(r,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)r.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},nc=function(){},hp=function(r,s,a,u){var d=r.memoizedProps;if(d!==u){r=s.stateNode,Ns(tn.current);var p=null;switch(a){case"input":d=fn(r,d),u=fn(r,u),p=[];break;case"select":d=W({},d,{value:void 0}),u=W({},u,{value:void 0}),p=[];break;case"textarea":d=bs(r,d),u=bs(r,u),p=[];break;default:typeof d.onClick!="function"&&typeof u.onClick=="function"&&(r.onclick=xo)}Cr(a,u);var b;a=null;for(U in d)if(!u.hasOwnProperty(U)&&d.hasOwnProperty(U)&&d[U]!=null)if(U==="style"){var k=d[U];for(b in k)k.hasOwnProperty(b)&&(a||(a={}),a[b]="")}else U!=="dangerouslySetInnerHTML"&&U!=="children"&&U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(o.hasOwnProperty(U)?p||(p=[]):(p=p||[]).push(U,null));for(U in u){var N=u[U];if(k=d?.[U],u.hasOwnProperty(U)&&N!==k&&(N!=null||k!=null))if(U==="style")if(k){for(b in k)!k.hasOwnProperty(b)||N&&N.hasOwnProperty(b)||(a||(a={}),a[b]="");for(b in N)N.hasOwnProperty(b)&&k[b]!==N[b]&&(a||(a={}),a[b]=N[b])}else a||(p||(p=[]),p.push(U,a)),a=N;else U==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,k=k?k.__html:void 0,N!=null&&k!==N&&(p=p||[]).push(U,N)):U==="children"?typeof N!="string"&&typeof N!="number"||(p=p||[]).push(U,""+N):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&(o.hasOwnProperty(U)?(N!=null&&U==="onScroll"&&st("scroll",r),p||k===N||(p=[])):(p=p||[]).push(U,N))}a&&(p=p||[]).push("style",a);var U=p;(s.updateQueue=U)&&(s.flags|=4)}},pp=function(r,s,a,u){a!==u&&(s.flags|=4)};function fa(r,s){if(!lt)switch(r.tailMode){case"hidden":s=r.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Bt(r){var s=r.alternate!==null&&r.alternate.child===r.child,a=0,u=0;if(s)for(var d=r.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags&14680064,u|=d.flags&14680064,d.return=r,d=d.sibling;else for(d=r.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags,u|=d.flags,d.return=r,d=d.sibling;return r.subtreeFlags|=u,r.childLanes=a,s}function lx(r,s,a){var u=s.pendingProps;switch(ju(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(s),null;case 1:return cr(s.type)&&bo(),Bt(s),null;case 3:return u=s.stateNode,oi(),it(ur),it(Ut),Du(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(Co(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,zr!==null&&(pc(zr),zr=null))),nc(r,s),Bt(s),null;case 5:Fu(s);var d=Ns(oa.current);if(a=s.type,r!==null&&s.stateNode!=null)hp(r,s,a,u,d),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!u){if(s.stateNode===null)throw Error(n(166));return Bt(s),null}if(r=Ns(tn.current),Co(s)){u=s.stateNode,a=s.type;var p=s.memoizedProps;switch(u[en]=s,u[ra]=p,r=(s.mode&1)!==0,a){case"dialog":st("cancel",u),st("close",u);break;case"iframe":case"object":case"embed":st("load",u);break;case"video":case"audio":for(d=0;d<Xi.length;d++)st(Xi[d],u);break;case"source":st("error",u);break;case"img":case"image":case"link":st("error",u),st("load",u);break;case"details":st("toggle",u);break;case"input":Hs(u,p),st("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!p.multiple},st("invalid",u);break;case"textarea":gr(u,p),st("invalid",u)}Cr(a,p),d=null;for(var b in p)if(p.hasOwnProperty(b)){var k=p[b];b==="children"?typeof k=="string"?u.textContent!==k&&(p.suppressHydrationWarning!==!0&&vo(u.textContent,k,r),d=["children",k]):typeof k=="number"&&u.textContent!==""+k&&(p.suppressHydrationWarning!==!0&&vo(u.textContent,k,r),d=["children",""+k]):o.hasOwnProperty(b)&&k!=null&&b==="onScroll"&&st("scroll",u)}switch(a){case"input":ir(u),hn(u,p,!0);break;case"textarea":ir(u),A(u);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(u.onclick=xo)}u=d,s.updateQueue=u,u!==null&&(s.flags|=4)}else{b=d.nodeType===9?d:d.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=D(a)),r==="http://www.w3.org/1999/xhtml"?a==="script"?(r=b.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof u.is=="string"?r=b.createElement(a,{is:u.is}):(r=b.createElement(a),a==="select"&&(b=r,u.multiple?b.multiple=!0:u.size&&(b.size=u.size))):r=b.createElementNS(r,a),r[en]=s,r[ra]=u,fp(r,s,!1,!1),s.stateNode=r;e:{switch(b=pn(a,u),a){case"dialog":st("cancel",r),st("close",r),d=u;break;case"iframe":case"object":case"embed":st("load",r),d=u;break;case"video":case"audio":for(d=0;d<Xi.length;d++)st(Xi[d],r);d=u;break;case"source":st("error",r),d=u;break;case"img":case"image":case"link":st("error",r),st("load",r),d=u;break;case"details":st("toggle",r),d=u;break;case"input":Hs(r,u),d=fn(r,u),st("invalid",r);break;case"option":d=u;break;case"select":r._wrapperState={wasMultiple:!!u.multiple},d=W({},u,{value:void 0}),st("invalid",r);break;case"textarea":gr(r,u),d=bs(r,u),st("invalid",r);break;default:d=u}Cr(a,d),k=d;for(p in k)if(k.hasOwnProperty(p)){var N=k[p];p==="style"?kt(r,N):p==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,N!=null&&ne(r,N)):p==="children"?typeof N=="string"?(a!=="textarea"||N!=="")&&oe(r,N):typeof N=="number"&&oe(r,""+N):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(o.hasOwnProperty(p)?N!=null&&p==="onScroll"&&st("scroll",r):N!=null&&z(r,p,N,b))}switch(a){case"input":ir(r),hn(r,u,!1);break;case"textarea":ir(r),A(r);break;case"option":u.value!=null&&r.setAttribute("value",""+Ue(u.value));break;case"select":r.multiple=!!u.multiple,p=u.value,p!=null?ar(r,!!u.multiple,p,!1):u.defaultValue!=null&&ar(r,!!u.multiple,u.defaultValue,!0);break;default:typeof d.onClick=="function"&&(r.onclick=xo)}switch(a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Bt(s),null;case 6:if(r&&s.stateNode!=null)pp(r,s,r.memoizedProps,u);else{if(typeof u!="string"&&s.stateNode===null)throw Error(n(166));if(a=Ns(oa.current),Ns(tn.current),Co(s)){if(u=s.stateNode,a=s.memoizedProps,u[en]=s,(p=u.nodeValue!==a)&&(r=xr,r!==null))switch(r.tag){case 3:vo(u.nodeValue,a,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&vo(u.nodeValue,a,(r.mode&1)!==0)}p&&(s.flags|=4)}else u=(a.nodeType===9?a:a.ownerDocument).createTextNode(u),u[en]=s,s.stateNode=u}return Bt(s),null;case 13:if(it(dt),u=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(lt&&wr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)yh(),ni(),s.flags|=98560,p=!1;else if(p=Co(s),u!==null&&u.dehydrated!==null){if(r===null){if(!p)throw Error(n(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(n(317));p[en]=s}else ni(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Bt(s),p=!1}else zr!==null&&(pc(zr),zr=null),p=!0;if(!p)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(u=u!==null,u!==(r!==null&&r.memoizedState!==null)&&u&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(dt.current&1)!==0?Rt===0&&(Rt=3):yc())),s.updateQueue!==null&&(s.flags|=4),Bt(s),null);case 4:return oi(),nc(r,s),r===null&&ea(s.stateNode.containerInfo),Bt(s),null;case 10:return Ru(s.type._context),Bt(s),null;case 17:return cr(s.type)&&bo(),Bt(s),null;case 19:if(it(dt),p=s.memoizedState,p===null)return Bt(s),null;if(u=(s.flags&128)!==0,b=p.rendering,b===null)if(u)fa(p,!1);else{if(Rt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(b=To(r),b!==null){for(s.flags|=128,fa(p,!1),u=b.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),s.subtreeFlags=0,u=a,a=s.child;a!==null;)p=a,r=u,p.flags&=14680066,b=p.alternate,b===null?(p.childLanes=0,p.lanes=r,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=b.childLanes,p.lanes=b.lanes,p.child=b.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=b.memoizedProps,p.memoizedState=b.memoizedState,p.updateQueue=b.updateQueue,p.type=b.type,r=b.dependencies,p.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a=a.sibling;return nt(dt,dt.current&1|2),s.child}r=r.sibling}p.tail!==null&&wt()>di&&(s.flags|=128,u=!0,fa(p,!1),s.lanes=4194304)}else{if(!u)if(r=To(b),r!==null){if(s.flags|=128,u=!0,a=r.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),fa(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!lt)return Bt(s),null}else 2*wt()-p.renderingStartTime>di&&a!==1073741824&&(s.flags|=128,u=!0,fa(p,!1),s.lanes=4194304);p.isBackwards?(b.sibling=s.child,s.child=b):(a=p.last,a!==null?a.sibling=b:s.child=b,p.last=b)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=wt(),s.sibling=null,a=dt.current,nt(dt,u?a&1|2:a&1),s):(Bt(s),null);case 22:case 23:return gc(),u=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==u&&(s.flags|=8192),u&&(s.mode&1)!==0?(br&1073741824)!==0&&(Bt(s),s.subtreeFlags&6&&(s.flags|=8192)):Bt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ux(r,s){switch(ju(s),s.tag){case 1:return cr(s.type)&&bo(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return oi(),it(ur),it(Ut),Du(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Fu(s),null;case 13:if(it(dt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ni()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return it(dt),null;case 4:return oi(),null;case 10:return Ru(s.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Uo=!1,Ht=!1,cx=typeof WeakSet=="function"?WeakSet:Set,ge=null;function ui(r,s){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){pt(r,s,u)}else a.current=null}function sc(r,s,a){try{a()}catch(u){pt(r,s,u)}}var mp=!1;function dx(r,s){if(gu=ao,r=Qf(),lu(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var d=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var b=0,k=-1,N=-1,U=0,J=0,Y=r,G=null;t:for(;;){for(var de;Y!==a||d!==0&&Y.nodeType!==3||(k=b+d),Y!==p||u!==0&&Y.nodeType!==3||(N=b+u),Y.nodeType===3&&(b+=Y.nodeValue.length),(de=Y.firstChild)!==null;)G=Y,Y=de;for(;;){if(Y===r)break t;if(G===a&&++U===d&&(k=b),G===p&&++J===u&&(N=b),(de=Y.nextSibling)!==null)break;Y=G,G=Y.parentNode}Y=de}a=k===-1||N===-1?null:{start:k,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(yu={focusedElem:r,selectionRange:a},ao=!1,ge=s;ge!==null;)if(s=ge,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ge=r;else for(;ge!==null;){s=ge;try{var ve=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var we=ve.memoizedProps,bt=ve.memoizedState,F=s.stateNode,R=F.getSnapshotBeforeUpdate(s.elementType===s.type?we:Ur(s.type,we),bt);F.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(te){pt(s,s.return,te)}if(r=s.sibling,r!==null){r.return=s.return,ge=r;break}ge=s.return}return ve=mp,mp=!1,ve}function ha(r,s,a){var u=s.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&r)===r){var p=d.destroy;d.destroy=void 0,p!==void 0&&sc(s,a,p)}d=d.next}while(d!==u)}}function Vo(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&r)===r){var u=a.create;a.destroy=u()}a=a.next}while(a!==s)}}function ic(r){var s=r.ref;if(s!==null){var a=r.stateNode;r.tag,r=a,typeof s=="function"?s(r):s.current=r}}function gp(r){var s=r.alternate;s!==null&&(r.alternate=null,gp(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[en],delete s[ra],delete s[bu],delete s[Q0],delete s[K0])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function yp(r){return r.tag===5||r.tag===3||r.tag===4}function vp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||yp(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function ac(r,s,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(r,s):a.insertBefore(r,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(r,a)):(s=a,s.appendChild(r)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=xo));else if(u!==4&&(r=r.child,r!==null))for(ac(r,s,a),r=r.sibling;r!==null;)ac(r,s,a),r=r.sibling}function oc(r,s,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,s?a.insertBefore(r,s):a.appendChild(r);else if(u!==4&&(r=r.child,r!==null))for(oc(r,s,a),r=r.sibling;r!==null;)oc(r,s,a),r=r.sibling}var Mt=null,Vr=!1;function Kn(r,s,a){for(a=a.child;a!==null;)xp(r,s,a),a=a.sibling}function xp(r,s,a){if(Xr&&typeof Xr.onCommitFiberUnmount=="function")try{Xr.onCommitFiberUnmount(eo,a)}catch{}switch(a.tag){case 5:Ht||ui(a,s);case 6:var u=Mt,d=Vr;Mt=null,Kn(r,s,a),Mt=u,Vr=d,Mt!==null&&(Vr?(r=Mt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):Mt.removeChild(a.stateNode));break;case 18:Mt!==null&&(Vr?(r=Mt,a=a.stateNode,r.nodeType===8?wu(r.parentNode,a):r.nodeType===1&&wu(r,a),qi(r)):wu(Mt,a.stateNode));break;case 4:u=Mt,d=Vr,Mt=a.stateNode.containerInfo,Vr=!0,Kn(r,s,a),Mt=u,Vr=d;break;case 0:case 11:case 14:case 15:if(!Ht&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){d=u=u.next;do{var p=d,b=p.destroy;p=p.tag,b!==void 0&&((p&2)!==0||(p&4)!==0)&&sc(a,s,b),d=d.next}while(d!==u)}Kn(r,s,a);break;case 1:if(!Ht&&(ui(a,s),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(k){pt(a,s,k)}Kn(r,s,a);break;case 21:Kn(r,s,a);break;case 22:a.mode&1?(Ht=(u=Ht)||a.memoizedState!==null,Kn(r,s,a),Ht=u):Kn(r,s,a);break;default:Kn(r,s,a)}}function wp(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new cx),s.forEach(function(u){var d=wx.bind(null,r,u);a.has(u)||(a.add(u),u.then(d,d))})}}function Br(r,s){var a=s.deletions;if(a!==null)for(var u=0;u<a.length;u++){var d=a[u];try{var p=r,b=s,k=b;e:for(;k!==null;){switch(k.tag){case 5:Mt=k.stateNode,Vr=!1;break e;case 3:Mt=k.stateNode.containerInfo,Vr=!0;break e;case 4:Mt=k.stateNode.containerInfo,Vr=!0;break e}k=k.return}if(Mt===null)throw Error(n(160));xp(p,b,d),Mt=null,Vr=!1;var N=d.alternate;N!==null&&(N.return=null),d.return=null}catch(U){pt(d,s,U)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)bp(s,r),s=s.sibling}function bp(r,s){var a=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Br(s,r),nn(r),u&4){try{ha(3,r,r.return),Vo(3,r)}catch(we){pt(r,r.return,we)}try{ha(5,r,r.return)}catch(we){pt(r,r.return,we)}}break;case 1:Br(s,r),nn(r),u&512&&a!==null&&ui(a,a.return);break;case 5:if(Br(s,r),nn(r),u&512&&a!==null&&ui(a,a.return),r.flags&32){var d=r.stateNode;try{oe(d,"")}catch(we){pt(r,r.return,we)}}if(u&4&&(d=r.stateNode,d!=null)){var p=r.memoizedProps,b=a!==null?a.memoizedProps:p,k=r.type,N=r.updateQueue;if(r.updateQueue=null,N!==null)try{k==="input"&&p.type==="radio"&&p.name!=null&&Ln(d,p),pn(k,b);var U=pn(k,p);for(b=0;b<N.length;b+=2){var J=N[b],Y=N[b+1];J==="style"?kt(d,Y):J==="dangerouslySetInnerHTML"?ne(d,Y):J==="children"?oe(d,Y):z(d,J,Y,U)}switch(k){case"input":ws(d,p);break;case"textarea":C(d,p);break;case"select":var G=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var de=p.value;de!=null?ar(d,!!p.multiple,de,!1):G!==!!p.multiple&&(p.defaultValue!=null?ar(d,!!p.multiple,p.defaultValue,!0):ar(d,!!p.multiple,p.multiple?[]:"",!1))}d[ra]=p}catch(we){pt(r,r.return,we)}}break;case 6:if(Br(s,r),nn(r),u&4){if(r.stateNode===null)throw Error(n(162));d=r.stateNode,p=r.memoizedProps;try{d.nodeValue=p}catch(we){pt(r,r.return,we)}}break;case 3:if(Br(s,r),nn(r),u&4&&a!==null&&a.memoizedState.isDehydrated)try{qi(s.containerInfo)}catch(we){pt(r,r.return,we)}break;case 4:Br(s,r),nn(r);break;case 13:Br(s,r),nn(r),d=r.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(cc=wt())),u&4&&wp(r);break;case 22:if(J=a!==null&&a.memoizedState!==null,r.mode&1?(Ht=(U=Ht)||J,Br(s,r),Ht=U):Br(s,r),nn(r),u&8192){if(U=r.memoizedState!==null,(r.stateNode.isHidden=U)&&!J&&(r.mode&1)!==0)for(ge=r,J=r.child;J!==null;){for(Y=ge=J;ge!==null;){switch(G=ge,de=G.child,G.tag){case 0:case 11:case 14:case 15:ha(4,G,G.return);break;case 1:ui(G,G.return);var ve=G.stateNode;if(typeof ve.componentWillUnmount=="function"){u=G,a=G.return;try{s=u,ve.props=s.memoizedProps,ve.state=s.memoizedState,ve.componentWillUnmount()}catch(we){pt(u,a,we)}}break;case 5:ui(G,G.return);break;case 22:if(G.memoizedState!==null){kp(Y);continue}}de!==null?(de.return=G,ge=de):kp(Y)}J=J.sibling}e:for(J=null,Y=r;;){if(Y.tag===5){if(J===null){J=Y;try{d=Y.stateNode,U?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(k=Y.stateNode,N=Y.memoizedProps.style,b=N!=null&&N.hasOwnProperty("display")?N.display:null,k.style.display=ht("display",b))}catch(we){pt(r,r.return,we)}}}else if(Y.tag===6){if(J===null)try{Y.stateNode.nodeValue=U?"":Y.memoizedProps}catch(we){pt(r,r.return,we)}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===r)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===r)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===r)break e;J===Y&&(J=null),Y=Y.return}J===Y&&(J=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:Br(s,r),nn(r),u&4&&wp(r);break;case 21:break;default:Br(s,r),nn(r)}}function nn(r){var s=r.flags;if(s&2){try{e:{for(var a=r.return;a!==null;){if(yp(a)){var u=a;break e}a=a.return}throw Error(n(160))}switch(u.tag){case 5:var d=u.stateNode;u.flags&32&&(oe(d,""),u.flags&=-33);var p=vp(r);oc(r,p,d);break;case 3:case 4:var b=u.stateNode.containerInfo,k=vp(r);ac(r,k,b);break;default:throw Error(n(161))}}catch(N){pt(r,r.return,N)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function fx(r,s,a){ge=r,Sp(r)}function Sp(r,s,a){for(var u=(r.mode&1)!==0;ge!==null;){var d=ge,p=d.child;if(d.tag===22&&u){var b=d.memoizedState!==null||Uo;if(!b){var k=d.alternate,N=k!==null&&k.memoizedState!==null||Ht;k=Uo;var U=Ht;if(Uo=b,(Ht=N)&&!U)for(ge=d;ge!==null;)b=ge,N=b.child,b.tag===22&&b.memoizedState!==null?jp(d):N!==null?(N.return=b,ge=N):jp(d);for(;p!==null;)ge=p,Sp(p),p=p.sibling;ge=d,Uo=k,Ht=U}_p(r)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,ge=p):_p(r)}}function _p(r){for(;ge!==null;){var s=ge;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Ht||Vo(5,s);break;case 1:var u=s.stateNode;if(s.flags&4&&!Ht)if(a===null)u.componentDidMount();else{var d=s.elementType===s.type?a.memoizedProps:Ur(s.type,a.memoizedProps);u.componentDidUpdate(d,a.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var p=s.updateQueue;p!==null&&kh(s,p,u);break;case 3:var b=s.updateQueue;if(b!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}kh(s,b,a)}break;case 5:var k=s.stateNode;if(a===null&&s.flags&4){a=k;var N=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":N.autoFocus&&a.focus();break;case"img":N.src&&(a.src=N.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var U=s.alternate;if(U!==null){var J=U.memoizedState;if(J!==null){var Y=J.dehydrated;Y!==null&&qi(Y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ht||s.flags&512&&ic(s)}catch(G){pt(s,s.return,G)}}if(s===r){ge=null;break}if(a=s.sibling,a!==null){a.return=s.return,ge=a;break}ge=s.return}}function kp(r){for(;ge!==null;){var s=ge;if(s===r){ge=null;break}var a=s.sibling;if(a!==null){a.return=s.return,ge=a;break}ge=s.return}}function jp(r){for(;ge!==null;){var s=ge;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{Vo(4,s)}catch(N){pt(s,a,N)}break;case 1:var u=s.stateNode;if(typeof u.componentDidMount=="function"){var d=s.return;try{u.componentDidMount()}catch(N){pt(s,d,N)}}var p=s.return;try{ic(s)}catch(N){pt(s,p,N)}break;case 5:var b=s.return;try{ic(s)}catch(N){pt(s,b,N)}}}catch(N){pt(s,s.return,N)}if(s===r){ge=null;break}var k=s.sibling;if(k!==null){k.return=s.return,ge=k;break}ge=s.return}}var hx=Math.ceil,Bo=M.ReactCurrentDispatcher,lc=M.ReactCurrentOwner,Rr=M.ReactCurrentBatchConfig,He=0,At=null,jt=null,Dt=0,br=0,ci=Bn(0),Rt=0,pa=null,Os=0,Ho=0,uc=0,ma=null,fr=null,cc=0,di=1/0,kn=null,qo=!1,dc=null,Zn=null,Wo=!1,Gn=null,Qo=0,ga=0,fc=null,Ko=-1,Zo=0;function er(){return(He&6)!==0?wt():Ko!==-1?Ko:Ko=wt()}function Jn(r){return(r.mode&1)===0?1:(He&2)!==0&&Dt!==0?Dt&-Dt:G0.transition!==null?(Zo===0&&(Zo=vf()),Zo):(r=Ge,r!==0||(r=window.event,r=r===void 0?16:Ef(r.type)),r)}function Hr(r,s,a,u){if(50<ga)throw ga=0,fc=null,Error(n(185));zi(r,a,u),((He&2)===0||r!==At)&&(r===At&&((He&2)===0&&(Ho|=a),Rt===4&&Yn(r,Dt)),hr(r,u),a===1&&He===0&&(s.mode&1)===0&&(di=wt()+500,_o&&qn()))}function hr(r,s){var a=r.callbackNode;Gv(r,s);var u=no(r,r===At?Dt:0);if(u===0)a!==null&&mf(a),r.callbackNode=null,r.callbackPriority=0;else if(s=u&-u,r.callbackPriority!==s){if(a!=null&&mf(a),s===1)r.tag===0?Z0(Ep.bind(null,r)):fh(Ep.bind(null,r)),q0(function(){(He&6)===0&&qn()}),a=null;else{switch(xf(u)){case 1:a=ql;break;case 4:a=gf;break;case 16:a=Xa;break;case 536870912:a=yf;break;default:a=Xa}a=Ip(a,Cp.bind(null,r))}r.callbackPriority=s,r.callbackNode=a}}function Cp(r,s){if(Ko=-1,Zo=0,(He&6)!==0)throw Error(n(327));var a=r.callbackNode;if(fi()&&r.callbackNode!==a)return null;var u=no(r,r===At?Dt:0);if(u===0)return null;if((u&30)!==0||(u&r.expiredLanes)!==0||s)s=Go(r,u);else{s=u;var d=He;He|=2;var p=Pp();(At!==r||Dt!==s)&&(kn=null,di=wt()+500,Ts(r,s));do try{gx();break}catch(k){Np(r,k)}while(!0);Ou(),Bo.current=p,He=d,jt!==null?s=0:(At=null,Dt=0,s=Rt)}if(s!==0){if(s===2&&(d=Wl(r),d!==0&&(u=d,s=hc(r,d))),s===1)throw a=pa,Ts(r,0),Yn(r,u),hr(r,wt()),a;if(s===6)Yn(r,u);else{if(d=r.current.alternate,(u&30)===0&&!px(d)&&(s=Go(r,u),s===2&&(p=Wl(r),p!==0&&(u=p,s=hc(r,p))),s===1))throw a=pa,Ts(r,0),Yn(r,u),hr(r,wt()),a;switch(r.finishedWork=d,r.finishedLanes=u,s){case 0:case 1:throw Error(n(345));case 2:Ls(r,fr,kn);break;case 3:if(Yn(r,u),(u&130023424)===u&&(s=cc+500-wt(),10<s)){if(no(r,0)!==0)break;if(d=r.suspendedLanes,(d&u)!==u){er(),r.pingedLanes|=r.suspendedLanes&d;break}r.timeoutHandle=xu(Ls.bind(null,r,fr,kn),s);break}Ls(r,fr,kn);break;case 4:if(Yn(r,u),(u&4194240)===u)break;for(s=r.eventTimes,d=-1;0<u;){var b=31-Dr(u);p=1<<b,b=s[b],b>d&&(d=b),u&=~p}if(u=d,u=wt()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*hx(u/1960))-u,10<u){r.timeoutHandle=xu(Ls.bind(null,r,fr,kn),u);break}Ls(r,fr,kn);break;case 5:Ls(r,fr,kn);break;default:throw Error(n(329))}}}return hr(r,wt()),r.callbackNode===a?Cp.bind(null,r):null}function hc(r,s){var a=ma;return r.current.memoizedState.isDehydrated&&(Ts(r,s).flags|=256),r=Go(r,s),r!==2&&(s=fr,fr=a,s!==null&&pc(s)),r}function pc(r){fr===null?fr=r:fr.push.apply(fr,r)}function px(r){for(var s=r;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var u=0;u<a.length;u++){var d=a[u],p=d.getSnapshot;d=d.value;try{if(!$r(p(),d))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Yn(r,s){for(s&=~uc,s&=~Ho,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var a=31-Dr(s),u=1<<a;r[a]=-1,s&=~u}}function Ep(r){if((He&6)!==0)throw Error(n(327));fi();var s=no(r,0);if((s&1)===0)return hr(r,wt()),null;var a=Go(r,s);if(r.tag!==0&&a===2){var u=Wl(r);u!==0&&(s=u,a=hc(r,u))}if(a===1)throw a=pa,Ts(r,0),Yn(r,s),hr(r,wt()),a;if(a===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Ls(r,fr,kn),hr(r,wt()),null}function mc(r,s){var a=He;He|=1;try{return r(s)}finally{He=a,He===0&&(di=wt()+500,_o&&qn())}}function Rs(r){Gn!==null&&Gn.tag===0&&(He&6)===0&&fi();var s=He;He|=1;var a=Rr.transition,u=Ge;try{if(Rr.transition=null,Ge=1,r)return r()}finally{Ge=u,Rr.transition=a,He=s,(He&6)===0&&qn()}}function gc(){br=ci.current,it(ci)}function Ts(r,s){r.finishedWork=null,r.finishedLanes=0;var a=r.timeoutHandle;if(a!==-1&&(r.timeoutHandle=-1,H0(a)),jt!==null)for(a=jt.return;a!==null;){var u=a;switch(ju(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&bo();break;case 3:oi(),it(ur),it(Ut),Du();break;case 5:Fu(u);break;case 4:oi();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Ru(u.type._context);break;case 22:case 23:gc()}a=a.return}if(At=r,jt=r=Xn(r.current,null),Dt=br=s,Rt=0,pa=null,uc=Ho=Os=0,fr=ma=null,Es!==null){for(s=0;s<Es.length;s++)if(a=Es[s],u=a.interleaved,u!==null){a.interleaved=null;var d=u.next,p=a.pending;if(p!==null){var b=p.next;p.next=d,u.next=b}a.pending=u}Es=null}return r}function Np(r,s){do{var a=jt;try{if(Ou(),Lo.current=Mo,Ao){for(var u=ft.memoizedState;u!==null;){var d=u.queue;d!==null&&(d.pending=null),u=u.next}Ao=!1}if(Ps=0,Lt=Ot=ft=null,la=!1,ua=0,lc.current=null,a===null||a.return===null){Rt=1,pa=s,jt=null;break}e:{var p=r,b=a.return,k=a,N=s;if(s=Dt,k.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var U=N,J=k,Y=J.tag;if((J.mode&1)===0&&(Y===0||Y===11||Y===15)){var G=J.alternate;G?(J.updateQueue=G.updateQueue,J.memoizedState=G.memoizedState,J.lanes=G.lanes):(J.updateQueue=null,J.memoizedState=null)}var de=Xh(b);if(de!==null){de.flags&=-257,ep(de,b,k,p,s),de.mode&1&&Yh(p,U,s),s=de,N=U;var ve=s.updateQueue;if(ve===null){var we=new Set;we.add(N),s.updateQueue=we}else ve.add(N);break e}else{if((s&1)===0){Yh(p,U,s),yc();break e}N=Error(n(426))}}else if(lt&&k.mode&1){var bt=Xh(b);if(bt!==null){(bt.flags&65536)===0&&(bt.flags|=256),ep(bt,b,k,p,s),Nu(li(N,k));break e}}p=N=li(N,k),Rt!==4&&(Rt=2),ma===null?ma=[p]:ma.push(p),p=b;do{switch(p.tag){case 3:p.flags|=65536,s&=-s,p.lanes|=s;var F=Gh(p,N,s);_h(p,F);break e;case 1:k=N;var R=p.type,$=p.stateNode;if((p.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(Zn===null||!Zn.has($)))){p.flags|=65536,s&=-s,p.lanes|=s;var te=Jh(p,k,s);_h(p,te);break e}}p=p.return}while(p!==null)}Rp(a)}catch(be){s=be,jt===a&&a!==null&&(jt=a=a.return);continue}break}while(!0)}function Pp(){var r=Bo.current;return Bo.current=Mo,r===null?Mo:r}function yc(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),At===null||(Os&268435455)===0&&(Ho&268435455)===0||Yn(At,Dt)}function Go(r,s){var a=He;He|=2;var u=Pp();(At!==r||Dt!==s)&&(kn=null,Ts(r,s));do try{mx();break}catch(d){Np(r,d)}while(!0);if(Ou(),He=a,Bo.current=u,jt!==null)throw Error(n(261));return At=null,Dt=0,Rt}function mx(){for(;jt!==null;)Op(jt)}function gx(){for(;jt!==null&&!Uv();)Op(jt)}function Op(r){var s=Ap(r.alternate,r,br);r.memoizedProps=r.pendingProps,s===null?Rp(r):jt=s,lc.current=null}function Rp(r){var s=r;do{var a=s.alternate;if(r=s.return,(s.flags&32768)===0){if(a=lx(a,s,br),a!==null){jt=a;return}}else{if(a=ux(a,s),a!==null){a.flags&=32767,jt=a;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Rt=6,jt=null;return}}if(s=s.sibling,s!==null){jt=s;return}jt=s=r}while(s!==null);Rt===0&&(Rt=5)}function Ls(r,s,a){var u=Ge,d=Rr.transition;try{Rr.transition=null,Ge=1,yx(r,s,a,u)}finally{Rr.transition=d,Ge=u}return null}function yx(r,s,a,u){do fi();while(Gn!==null);if((He&6)!==0)throw Error(n(327));a=r.finishedWork;var d=r.finishedLanes;if(a===null)return null;if(r.finishedWork=null,r.finishedLanes=0,a===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var p=a.lanes|a.childLanes;if(Jv(r,p),r===At&&(jt=At=null,Dt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Wo||(Wo=!0,Ip(Xa,function(){return fi(),null})),p=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||p){p=Rr.transition,Rr.transition=null;var b=Ge;Ge=1;var k=He;He|=4,lc.current=null,dx(r,a),bp(a,r),M0(yu),ao=!!gu,yu=gu=null,r.current=a,fx(a),Vv(),He=k,Ge=b,Rr.transition=p}else r.current=a;if(Wo&&(Wo=!1,Gn=r,Qo=d),p=r.pendingLanes,p===0&&(Zn=null),qv(a.stateNode),hr(r,wt()),s!==null)for(u=r.onRecoverableError,a=0;a<s.length;a++)d=s[a],u(d.value,{componentStack:d.stack,digest:d.digest});if(qo)throw qo=!1,r=dc,dc=null,r;return(Qo&1)!==0&&r.tag!==0&&fi(),p=r.pendingLanes,(p&1)!==0?r===fc?ga++:(ga=0,fc=r):ga=0,qn(),null}function fi(){if(Gn!==null){var r=xf(Qo),s=Rr.transition,a=Ge;try{if(Rr.transition=null,Ge=16>r?16:r,Gn===null)var u=!1;else{if(r=Gn,Gn=null,Qo=0,(He&6)!==0)throw Error(n(331));var d=He;for(He|=4,ge=r.current;ge!==null;){var p=ge,b=p.child;if((ge.flags&16)!==0){var k=p.deletions;if(k!==null){for(var N=0;N<k.length;N++){var U=k[N];for(ge=U;ge!==null;){var J=ge;switch(J.tag){case 0:case 11:case 15:ha(8,J,p)}var Y=J.child;if(Y!==null)Y.return=J,ge=Y;else for(;ge!==null;){J=ge;var G=J.sibling,de=J.return;if(gp(J),J===U){ge=null;break}if(G!==null){G.return=de,ge=G;break}ge=de}}}var ve=p.alternate;if(ve!==null){var we=ve.child;if(we!==null){ve.child=null;do{var bt=we.sibling;we.sibling=null,we=bt}while(we!==null)}}ge=p}}if((p.subtreeFlags&2064)!==0&&b!==null)b.return=p,ge=b;else e:for(;ge!==null;){if(p=ge,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:ha(9,p,p.return)}var F=p.sibling;if(F!==null){F.return=p.return,ge=F;break e}ge=p.return}}var R=r.current;for(ge=R;ge!==null;){b=ge;var $=b.child;if((b.subtreeFlags&2064)!==0&&$!==null)$.return=b,ge=$;else e:for(b=R;ge!==null;){if(k=ge,(k.flags&2048)!==0)try{switch(k.tag){case 0:case 11:case 15:Vo(9,k)}}catch(be){pt(k,k.return,be)}if(k===b){ge=null;break e}var te=k.sibling;if(te!==null){te.return=k.return,ge=te;break e}ge=k.return}}if(He=d,qn(),Xr&&typeof Xr.onPostCommitFiberRoot=="function")try{Xr.onPostCommitFiberRoot(eo,r)}catch{}u=!0}return u}finally{Ge=a,Rr.transition=s}}return!1}function Tp(r,s,a){s=li(a,s),s=Gh(r,s,1),r=Qn(r,s,1),s=er(),r!==null&&(zi(r,1,s),hr(r,s))}function pt(r,s,a){if(r.tag===3)Tp(r,r,a);else for(;s!==null;){if(s.tag===3){Tp(s,r,a);break}else if(s.tag===1){var u=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Zn===null||!Zn.has(u))){r=li(a,r),r=Jh(s,r,1),s=Qn(s,r,1),r=er(),s!==null&&(zi(s,1,r),hr(s,r));break}}s=s.return}}function vx(r,s,a){var u=r.pingCache;u!==null&&u.delete(s),s=er(),r.pingedLanes|=r.suspendedLanes&a,At===r&&(Dt&a)===a&&(Rt===4||Rt===3&&(Dt&130023424)===Dt&&500>wt()-cc?Ts(r,0):uc|=a),hr(r,s)}function Lp(r,s){s===0&&((r.mode&1)===0?s=1:(s=ro,ro<<=1,(ro&130023424)===0&&(ro=4194304)));var a=er();r=bn(r,s),r!==null&&(zi(r,s,a),hr(r,a))}function xx(r){var s=r.memoizedState,a=0;s!==null&&(a=s.retryLane),Lp(r,a)}function wx(r,s){var a=0;switch(r.tag){case 13:var u=r.stateNode,d=r.memoizedState;d!==null&&(a=d.retryLane);break;case 19:u=r.stateNode;break;default:throw Error(n(314))}u!==null&&u.delete(s),Lp(r,a)}var Ap;Ap=function(r,s,a){if(r!==null)if(r.memoizedProps!==s.pendingProps||ur.current)dr=!0;else{if((r.lanes&a)===0&&(s.flags&128)===0)return dr=!1,ox(r,s,a);dr=(r.flags&131072)!==0}else dr=!1,lt&&(s.flags&1048576)!==0&&hh(s,jo,s.index);switch(s.lanes=0,s.tag){case 2:var u=s.type;zo(r,s),r=s.pendingProps;var d=ei(s,Ut.current);ai(s,a),d=Uu(null,s,u,r,d,a);var p=Vu();return s.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,cr(u)?(p=!0,So(s)):p=!1,s.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Au(s),d.updater=Do,s.stateNode=d,d._reactInternals=s,Ku(s,u,r,a),s=Yu(null,s,u,!0,p,a)):(s.tag=0,lt&&p&&ku(s),Xt(null,s,d,a),s=s.child),s;case 16:u=s.elementType;e:{switch(zo(r,s),r=s.pendingProps,d=u._init,u=d(u._payload),s.type=u,d=s.tag=Sx(u),r=Ur(u,r),d){case 0:s=Ju(null,s,u,r,a);break e;case 1:s=ap(null,s,u,r,a);break e;case 11:s=tp(null,s,u,r,a);break e;case 14:s=rp(null,s,u,Ur(u.type,r),a);break e}throw Error(n(306,u,""))}return s;case 0:return u=s.type,d=s.pendingProps,d=s.elementType===u?d:Ur(u,d),Ju(r,s,u,d,a);case 1:return u=s.type,d=s.pendingProps,d=s.elementType===u?d:Ur(u,d),ap(r,s,u,d,a);case 3:e:{if(op(s),r===null)throw Error(n(387));u=s.pendingProps,p=s.memoizedState,d=p.element,Sh(r,s),Ro(s,u,null,a);var b=s.memoizedState;if(u=b.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){d=li(Error(n(423)),s),s=lp(r,s,u,a,d);break e}else if(u!==d){d=li(Error(n(424)),s),s=lp(r,s,u,a,d);break e}else for(wr=Vn(s.stateNode.containerInfo.firstChild),xr=s,lt=!0,zr=null,a=wh(s,null,u,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ni(),u===d){s=_n(r,s,a);break e}Xt(r,s,u,a)}s=s.child}return s;case 5:return jh(s),r===null&&Eu(s),u=s.type,d=s.pendingProps,p=r!==null?r.memoizedProps:null,b=d.children,vu(u,d)?b=null:p!==null&&vu(u,p)&&(s.flags|=32),ip(r,s),Xt(r,s,b,a),s.child;case 6:return r===null&&Eu(s),null;case 13:return up(r,s,a);case 4:return Iu(s,s.stateNode.containerInfo),u=s.pendingProps,r===null?s.child=si(s,null,u,a):Xt(r,s,u,a),s.child;case 11:return u=s.type,d=s.pendingProps,d=s.elementType===u?d:Ur(u,d),tp(r,s,u,d,a);case 7:return Xt(r,s,s.pendingProps,a),s.child;case 8:return Xt(r,s,s.pendingProps.children,a),s.child;case 12:return Xt(r,s,s.pendingProps.children,a),s.child;case 10:e:{if(u=s.type._context,d=s.pendingProps,p=s.memoizedProps,b=d.value,nt(No,u._currentValue),u._currentValue=b,p!==null)if($r(p.value,b)){if(p.children===d.children&&!ur.current){s=_n(r,s,a);break e}}else for(p=s.child,p!==null&&(p.return=s);p!==null;){var k=p.dependencies;if(k!==null){b=p.child;for(var N=k.firstContext;N!==null;){if(N.context===u){if(p.tag===1){N=Sn(-1,a&-a),N.tag=2;var U=p.updateQueue;if(U!==null){U=U.shared;var J=U.pending;J===null?N.next=N:(N.next=J.next,J.next=N),U.pending=N}}p.lanes|=a,N=p.alternate,N!==null&&(N.lanes|=a),Tu(p.return,a,s),k.lanes|=a;break}N=N.next}}else if(p.tag===10)b=p.type===s.type?null:p.child;else if(p.tag===18){if(b=p.return,b===null)throw Error(n(341));b.lanes|=a,k=b.alternate,k!==null&&(k.lanes|=a),Tu(b,a,s),b=p.sibling}else b=p.child;if(b!==null)b.return=p;else for(b=p;b!==null;){if(b===s){b=null;break}if(p=b.sibling,p!==null){p.return=b.return,b=p;break}b=b.return}p=b}Xt(r,s,d.children,a),s=s.child}return s;case 9:return d=s.type,u=s.pendingProps.children,ai(s,a),d=Pr(d),u=u(d),s.flags|=1,Xt(r,s,u,a),s.child;case 14:return u=s.type,d=Ur(u,s.pendingProps),d=Ur(u.type,d),rp(r,s,u,d,a);case 15:return np(r,s,s.type,s.pendingProps,a);case 17:return u=s.type,d=s.pendingProps,d=s.elementType===u?d:Ur(u,d),zo(r,s),s.tag=1,cr(u)?(r=!0,So(s)):r=!1,ai(s,a),Kh(s,u,d),Ku(s,u,d,a),Yu(null,s,u,!0,r,a);case 19:return dp(r,s,a);case 22:return sp(r,s,a)}throw Error(n(156,s.tag))};function Ip(r,s){return pf(r,s)}function bx(r,s,a,u){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(r,s,a,u){return new bx(r,s,a,u)}function vc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Sx(r){if(typeof r=="function")return vc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Z)return 11;if(r===T)return 14}return 2}function Xn(r,s){var a=r.alternate;return a===null?(a=Tr(r.tag,s,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=s,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,s=r.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function Jo(r,s,a,u,d,p){var b=2;if(u=r,typeof r=="function")vc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case le:return As(a.children,d,p,s);case ue:b=8,d|=8;break;case pe:return r=Tr(12,a,s,d|2),r.elementType=pe,r.lanes=p,r;case me:return r=Tr(13,a,s,d),r.elementType=me,r.lanes=p,r;case he:return r=Tr(19,a,s,d),r.elementType=he,r.lanes=p,r;case K:return Yo(a,d,p,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case _e:b=10;break e;case Oe:b=9;break e;case Z:b=11;break e;case T:b=14;break e;case P:b=16,u=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Tr(b,a,s,d),s.elementType=r,s.type=u,s.lanes=p,s}function As(r,s,a,u){return r=Tr(7,r,u,s),r.lanes=a,r}function Yo(r,s,a,u){return r=Tr(22,r,u,s),r.elementType=K,r.lanes=a,r.stateNode={isHidden:!1},r}function xc(r,s,a){return r=Tr(6,r,null,s),r.lanes=a,r}function wc(r,s,a){return s=Tr(4,r.children!==null?r.children:[],r.key,s),s.lanes=a,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function _x(r,s,a,u,d){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=u,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function bc(r,s,a,u,d,p,b,k,N){return r=new _x(r,s,a,k,N),s===1?(s=1,p===!0&&(s|=8)):s=0,p=Tr(3,null,null,s),r.current=p,p.stateNode=r,p.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Au(p),r}function kx(r,s,a){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:u==null?null:""+u,children:r,containerInfo:s,implementation:a}}function Fp(r){if(!r)return Hn;r=r._reactInternals;e:{if(Ss(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(cr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var a=r.type;if(cr(a))return ch(r,a,s)}return s}function Mp(r,s,a,u,d,p,b,k,N){return r=bc(a,u,!0,r,d,p,b,k,N),r.context=Fp(null),a=r.current,u=er(),d=Jn(a),p=Sn(u,d),p.callback=s??null,Qn(a,p,d),r.current.lanes=d,zi(r,d,u),hr(r,u),r}function Xo(r,s,a,u){var d=s.current,p=er(),b=Jn(d);return a=Fp(a),s.context===null?s.context=a:s.pendingContext=a,s=Sn(p,b),s.payload={element:r},u=u===void 0?null:u,u!==null&&(s.callback=u),r=Qn(d,s,b),r!==null&&(Hr(r,d,b,p),Oo(r,d,b)),b}function el(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function Dp(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<s?a:s}}function Sc(r,s){Dp(r,s),(r=r.alternate)&&Dp(r,s)}function jx(){return null}var $p=typeof reportError=="function"?reportError:function(r){console.error(r)};function _c(r){this._internalRoot=r}tl.prototype.render=_c.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Xo(r,s,null,null)},tl.prototype.unmount=_c.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Rs(function(){Xo(null,r,null,null)}),s[yn]=null}};function tl(r){this._internalRoot=r}tl.prototype.unstable_scheduleHydration=function(r){if(r){var s=Sf();r={blockedOn:null,target:r,priority:s};for(var a=0;a<$n.length&&s!==0&&s<$n[a].priority;a++);$n.splice(a,0,r),a===0&&jf(r)}};function kc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function rl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function zp(){}function Cx(r,s,a,u,d){if(d){if(typeof u=="function"){var p=u;u=function(){var U=el(b);p.call(U)}}var b=Mp(s,u,r,0,null,!1,!1,"",zp);return r._reactRootContainer=b,r[yn]=b.current,ea(r.nodeType===8?r.parentNode:r),Rs(),b}for(;d=r.lastChild;)r.removeChild(d);if(typeof u=="function"){var k=u;u=function(){var U=el(N);k.call(U)}}var N=bc(r,0,!1,null,null,!1,!1,"",zp);return r._reactRootContainer=N,r[yn]=N.current,ea(r.nodeType===8?r.parentNode:r),Rs(function(){Xo(s,N,a,u)}),N}function nl(r,s,a,u,d){var p=a._reactRootContainer;if(p){var b=p;if(typeof d=="function"){var k=d;d=function(){var N=el(b);k.call(N)}}Xo(s,b,r,d)}else b=Cx(a,s,r,d,u);return el(b)}wf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var a=$i(s.pendingLanes);a!==0&&(Kl(s,a|1),hr(s,wt()),(He&6)===0&&(di=wt()+500,qn()))}break;case 13:Rs(function(){var u=bn(r,1);if(u!==null){var d=er();Hr(u,r,1,d)}}),Sc(r,1)}},Zl=function(r){if(r.tag===13){var s=bn(r,134217728);if(s!==null){var a=er();Hr(s,r,134217728,a)}Sc(r,134217728)}},bf=function(r){if(r.tag===13){var s=Jn(r),a=bn(r,s);if(a!==null){var u=er();Hr(a,r,s,u)}Sc(r,s)}},Sf=function(){return Ge},_f=function(r,s){var a=Ge;try{return Ge=r,s()}finally{Ge=a}},gn=function(r,s,a){switch(s){case"input":if(ws(r,a),s=a.name,a.type==="radio"&&s!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var u=a[s];if(u!==r&&u.form===r.form){var d=wo(u);if(!d)throw Error(n(90));dn(u),ws(u,d)}}}break;case"textarea":C(r,a);break;case"select":s=a.value,s!=null&&ar(r,!!a.multiple,s,!1)}},Qe=mc,et=Rs;var Ex={usingClientEntryPoint:!1,Events:[na,Ys,wo,Ga,Re,mc]},ya={findFiberByHostInstance:_s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nx={bundleType:ya.bundleType,version:ya.version,rendererPackageName:ya.rendererPackageName,rendererConfig:ya.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=ff(r),r===null?null:r.stateNode},findFiberByHostInstance:ya.findFiberByHostInstance||jx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{eo=sl.inject(Nx),Xr=sl}catch{}}return pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ex,pr.createPortal=function(r,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kc(s))throw Error(n(200));return kx(r,s,null,a)},pr.createRoot=function(r,s){if(!kc(r))throw Error(n(299));var a=!1,u="",d=$p;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onRecoverableError!==void 0&&(d=s.onRecoverableError)),s=bc(r,1,!1,null,null,a,!1,u,d),r[yn]=s.current,ea(r.nodeType===8?r.parentNode:r),new _c(s)},pr.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=ff(s),r=r===null?null:r.stateNode,r},pr.flushSync=function(r){return Rs(r)},pr.hydrate=function(r,s,a){if(!rl(s))throw Error(n(200));return nl(null,r,s,!0,a)},pr.hydrateRoot=function(r,s,a){if(!kc(r))throw Error(n(405));var u=a!=null&&a.hydratedSources||null,d=!1,p="",b=$p;if(a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),s=Mp(s,null,r,1,a??null,d,!1,p,b),r[yn]=s.current,ea(r),u)for(r=0;r<u.length;r++)a=u[r],d=a._getVersion,d=d(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,d]:s.mutableSourceEagerHydrationData.push(a,d);return new tl(s)},pr.render=function(r,s,a){if(!rl(s))throw Error(n(200));return nl(null,r,s,!1,a)},pr.unmountComponentAtNode=function(r){if(!rl(r))throw Error(n(40));return r._reactRootContainer?(Rs(function(){nl(null,null,r,!1,function(){r._reactRootContainer=null,r[yn]=null})}),!0):!1},pr.unstable_batchedUpdates=mc,pr.unstable_renderSubtreeIntoContainer=function(r,s,a,u){if(!rl(a))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return nl(r,s,a,!1,u)},pr.version="18.3.1-next-f1338f8080-20240426",pr}var Kp;function Kg(){if(Kp)return Ec.exports;Kp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ec.exports=Fx(),Ec.exports}var Zp;function Mx(){if(Zp)return il;Zp=1;var t=Kg();return il.createRoot=t.createRoot,il.hydrateRoot=t.hydrateRoot,il}var Dx=Mx();const $x=Il(Dx);var Oc={exports:{}},Rc={};var Gp;function zx(){if(Gp)return Rc;Gp=1;var t=qa();function e(v,w){return v===w&&(v!==0||1/v===1/w)||v!==v&&w!==w}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,o=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue;function f(v,w){var x=w(),j=i({inst:{value:x,getSnapshot:w}}),_=j[0].inst,S=j[1];return l(function(){_.value=x,_.getSnapshot=w,h(_)&&S({inst:_})},[v,x,w]),o(function(){return h(_)&&S({inst:_}),v(function(){h(_)&&S({inst:_})})},[v]),c(x),x}function h(v){var w=v.getSnapshot;v=v.value;try{var x=w();return!n(v,x)}catch{return!0}}function g(v,w){return w()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return Rc.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Rc}var Jp;function Zg(){return Jp||(Jp=1,Oc.exports=zx()),Oc.exports}Zg();var Tc={exports:{}},Lc={};var Yp;function Ux(){if(Yp)return Lc;Yp=1;var t=qa(),e=Zg();function n(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var i=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,l=t.useRef,c=t.useEffect,f=t.useMemo,h=t.useDebugValue;return Lc.useSyncExternalStoreWithSelector=function(g,y,v,w,x){var j=l(null);if(j.current===null){var _={hasValue:!1,value:null};j.current=_}else _=j.current;j=f(function(){function I(Q){if(!E){if(E=!0,z=Q,Q=w(Q),x!==void 0&&_.hasValue){var le=_.value;if(x(le,Q))return M=le}return M=Q}if(le=M,i(z,Q))return le;var ue=w(Q);return x!==void 0&&x(le,ue)?(z=Q,le):(z=Q,M=ue)}var E=!1,z,M,L=v===void 0?null:v;return[function(){return I(y())},L===null?void 0:function(){return I(L())}]},[y,v,w,x]);var S=o(g,j[0],j[1]);return c(function(){_.hasValue=!0,_.value=S},[S]),h(S),S},Lc}var Xp;function Vx(){return Xp||(Xp=1,Tc.exports=Ux()),Tc.exports}var Bx=Vx(),Gg=Kg();const Hx=Il(Gg);function qx(t){t()}let Jg=qx;const Wx=t=>Jg=t,Qx=()=>Jg,em=Symbol.for("react-redux-context"),tm=typeof globalThis<"u"?globalThis:{};function Kx(){var t;if(!B.createContext)return{};const e=(t=tm[em])!=null?t:tm[em]=new Map;let n=e.get(B.createContext);return n||(n=B.createContext(null),e.set(B.createContext,n)),n}const fs=Kx();function Md(t=fs){return function(){return B.useContext(t)}}const Yg=Md(),Zx=()=>{throw new Error("uSES not initialized!")};let Xg=Zx;const Gx=t=>{Xg=t},Jx=(t,e)=>t===e;function Yx(t=fs){const e=t===fs?Yg:Md(t);return function(i,o={}){const{equalityFn:l=Jx,stabilityCheck:c=void 0,noopCheck:f=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:h,subscription:g,getServerState:y,stabilityCheck:v,noopCheck:w}=e();B.useRef(!0);const x=B.useCallback({[i.name](_){return i(_)}}[i.name],[i,v,c]),j=Xg(g.addNestedSub,h.getState,y||h.getState,x,l);return B.useDebugValue(j),j}}const Xx=Yx();var Ac={exports:{}},Ke={};var rm;function e1(){if(rm)return Ke;rm=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,l=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,f=t?Symbol.for("react.context"):60110,h=t?Symbol.for("react.async_mode"):60111,g=t?Symbol.for("react.concurrent_mode"):60111,y=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,w=t?Symbol.for("react.suspense_list"):60120,x=t?Symbol.for("react.memo"):60115,j=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,I=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function z(L){if(typeof L=="object"&&L!==null){var Q=L.$$typeof;switch(Q){case e:switch(L=L.type,L){case h:case g:case i:case l:case o:case v:return L;default:switch(L=L&&L.$$typeof,L){case f:case y:case j:case x:case c:return L;default:return Q}}case n:return Q}}}function M(L){return z(L)===g}return Ke.AsyncMode=h,Ke.ConcurrentMode=g,Ke.ContextConsumer=f,Ke.ContextProvider=c,Ke.Element=e,Ke.ForwardRef=y,Ke.Fragment=i,Ke.Lazy=j,Ke.Memo=x,Ke.Portal=n,Ke.Profiler=l,Ke.StrictMode=o,Ke.Suspense=v,Ke.isAsyncMode=function(L){return M(L)||z(L)===h},Ke.isConcurrentMode=M,Ke.isContextConsumer=function(L){return z(L)===f},Ke.isContextProvider=function(L){return z(L)===c},Ke.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===e},Ke.isForwardRef=function(L){return z(L)===y},Ke.isFragment=function(L){return z(L)===i},Ke.isLazy=function(L){return z(L)===j},Ke.isMemo=function(L){return z(L)===x},Ke.isPortal=function(L){return z(L)===n},Ke.isProfiler=function(L){return z(L)===l},Ke.isStrictMode=function(L){return z(L)===o},Ke.isSuspense=function(L){return z(L)===v},Ke.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===i||L===g||L===l||L===o||L===v||L===w||typeof L=="object"&&L!==null&&(L.$$typeof===j||L.$$typeof===x||L.$$typeof===c||L.$$typeof===f||L.$$typeof===y||L.$$typeof===S||L.$$typeof===I||L.$$typeof===E||L.$$typeof===_)},Ke.typeOf=z,Ke}var nm;function t1(){return nm||(nm=1,Ac.exports=e1()),Ac.exports}var Ic,sm;function r1(){if(sm)return Ic;sm=1;var t=t1(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[t.ForwardRef]=i,l[t.Memo]=o;function c(j){return t.isMemo(j)?o:l[j.$$typeof]||e}var f=Object.defineProperty,h=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,v=Object.getPrototypeOf,w=Object.prototype;function x(j,_,S){if(typeof _!="string"){if(w){var I=v(_);I&&I!==w&&x(j,I,S)}var E=h(_);g&&(E=E.concat(g(_)));for(var z=c(j),M=c(_),L=0;L<E.length;++L){var Q=E[L];if(!n[Q]&&!(S&&S[Q])&&!(M&&M[Q])&&!(z&&z[Q])){var le=y(_,Q);try{f(j,Q,le)}catch{}}}}return j}return Ic=x,Ic}r1();var Fc={exports:{}},Ze={};var im;function n1(){if(im)return Ze;im=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),j;j=Symbol.for("react.module.reference");function _(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case n:case o:case i:case g:case y:return S;default:switch(S=S&&S.$$typeof,S){case f:case c:case h:case w:case v:case l:return S;default:return I}}case e:return I}}}return Ze.ContextConsumer=c,Ze.ContextProvider=l,Ze.Element=t,Ze.ForwardRef=h,Ze.Fragment=n,Ze.Lazy=w,Ze.Memo=v,Ze.Portal=e,Ze.Profiler=o,Ze.StrictMode=i,Ze.Suspense=g,Ze.SuspenseList=y,Ze.isAsyncMode=function(){return!1},Ze.isConcurrentMode=function(){return!1},Ze.isContextConsumer=function(S){return _(S)===c},Ze.isContextProvider=function(S){return _(S)===l},Ze.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ze.isForwardRef=function(S){return _(S)===h},Ze.isFragment=function(S){return _(S)===n},Ze.isLazy=function(S){return _(S)===w},Ze.isMemo=function(S){return _(S)===v},Ze.isPortal=function(S){return _(S)===e},Ze.isProfiler=function(S){return _(S)===o},Ze.isStrictMode=function(S){return _(S)===i},Ze.isSuspense=function(S){return _(S)===g},Ze.isSuspenseList=function(S){return _(S)===y},Ze.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===o||S===i||S===g||S===y||S===x||typeof S=="object"&&S!==null&&(S.$$typeof===w||S.$$typeof===v||S.$$typeof===l||S.$$typeof===c||S.$$typeof===h||S.$$typeof===j||S.getModuleId!==void 0)},Ze.typeOf=_,Ze}var am;function s1(){return am||(am=1,Fc.exports=n1()),Fc.exports}s1();function i1(){const t=Qx();let e=null,n=null;return{clear(){e=null,n=null},notify(){t(()=>{let i=e;for(;i;)i.callback(),i=i.next})},get(){let i=[],o=e;for(;o;)i.push(o),o=o.next;return i},subscribe(i){let o=!0,l=n={callback:i,next:null,prev:n};return l.prev?l.prev.next=l:e=l,function(){!o||e===null||(o=!1,l.next?l.next.prev=l.prev:n=l.prev,l.prev?l.prev.next=l.next:e=l.next)}}}}const om={notify(){},get:()=>[]};function a1(t,e){let n,i=om,o=0,l=!1;function c(_){y();const S=i.subscribe(_);let I=!1;return()=>{I||(I=!0,S(),v())}}function f(){i.notify()}function h(){j.onStateChange&&j.onStateChange()}function g(){return l}function y(){o++,n||(n=t.subscribe(h),i=i1())}function v(){o--,n&&o===0&&(n(),n=void 0,i.clear(),i=om)}function w(){l||(l=!0,y())}function x(){l&&(l=!1,v())}const j={addNestedSub:c,notifyNestedSubs:f,handleChangeWrapper:h,isSubscribed:g,trySubscribe:w,tryUnsubscribe:x,getListeners:()=>i};return j}const o1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",l1=o1?B.useLayoutEffect:B.useEffect;function u1({store:t,context:e,children:n,serverState:i,stabilityCheck:o="once",noopCheck:l="once"}){const c=B.useMemo(()=>{const g=a1(t);return{store:t,subscription:g,getServerState:i?()=>i:void 0,stabilityCheck:o,noopCheck:l}},[t,i,o,l]),f=B.useMemo(()=>t.getState(),[t]);l1(()=>{const{subscription:g}=c;return g.onStateChange=g.notifyNestedSubs,g.trySubscribe(),f!==t.getState()&&g.notifyNestedSubs(),()=>{g.tryUnsubscribe(),g.onStateChange=void 0}},[c,f]);const h=e||fs;return B.createElement(h.Provider,{value:c},n)}function ey(t=fs){const e=t===fs?Yg:Md(t);return function(){const{store:i}=e();return i}}const c1=ey();function d1(t=fs){const e=t===fs?c1:ey(t);return function(){return e().dispatch}}const f1=d1();Gx(Bx.useSyncExternalStoreWithSelector);Wx(Gg.unstable_batchedUpdates);function Ta(){return Ta=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ta.apply(this,arguments)}var is;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(is||(is={}));const lm="popstate";function h1(t){t===void 0&&(t={});function e(i,o){let{pathname:l,search:c,hash:f}=i.location;return td("",{pathname:l,search:c,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){return typeof o=="string"?o:hl(o)}return m1(e,n,null,t)}function vt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Dd(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function p1(){return Math.random().toString(36).substr(2,8)}function um(t,e){return{usr:t.state,key:t.key,idx:e}}function td(t,e,n,i){return n===void 0&&(n=null),Ta({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ti(e):e,{state:n,key:e&&e.key||i||p1()})}function hl(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Ti(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function m1(t,e,n,i){i===void 0&&(i={});let{window:o=document.defaultView,v5Compat:l=!1}=i,c=o.history,f=is.Pop,h=null,g=y();g==null&&(g=0,c.replaceState(Ta({},c.state,{idx:g}),""));function y(){return(c.state||{idx:null}).idx}function v(){f=is.Pop;let S=y(),I=S==null?null:S-g;g=S,h&&h({action:f,location:_.location,delta:I})}function w(S,I){f=is.Push;let E=td(_.location,S,I);g=y()+1;let z=um(E,g),M=_.createHref(E);try{c.pushState(z,"",M)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(M)}l&&h&&h({action:f,location:_.location,delta:1})}function x(S,I){f=is.Replace;let E=td(_.location,S,I);g=y();let z=um(E,g),M=_.createHref(E);c.replaceState(z,"",M),l&&h&&h({action:f,location:_.location,delta:0})}function j(S){let I=o.location.origin!=="null"?o.location.origin:o.location.href,E=typeof S=="string"?S:hl(S);return E=E.replace(/ $/,"%20"),vt(I,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,I)}let _={get action(){return f},get location(){return t(o,c)},listen(S){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(lm,v),h=S,()=>{o.removeEventListener(lm,v),h=null}},createHref(S){return e(o,S)},createURL:j,encodeLocation(S){let I=j(S);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:w,replace:x,go(S){return c.go(S)}};return _}var cm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(cm||(cm={}));function g1(t,e,n){return n===void 0&&(n="/"),y1(t,e,n)}function y1(t,e,n,i){let o=typeof e=="string"?Ti(e):e,l=Si(o.pathname||"/",n);if(l==null)return null;let c=ty(t);v1(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let g=P1(l);f=E1(c[h],g)}return f}function ty(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let o=(l,c,f)=>{let h={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};h.relativePath.startsWith("/")&&(vt(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=as([i,h.relativePath]),y=n.concat(h);l.children&&l.children.length>0&&(vt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),ty(l.children,e,y,g)),!(l.path==null&&!l.index)&&e.push({path:g,score:j1(g,l.index),routesMeta:y})};return t.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,c);else for(let h of ry(l.path))o(l,c,h)}),e}function ry(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(i.length===0)return o?[l,""]:[l];let c=ry(i.join("/")),f=[];return f.push(...c.map(h=>h===""?l:[l,h].join("/"))),o&&f.push(...c),f.map(h=>t.startsWith("/")&&h===""?"/":h)}function v1(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:C1(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const x1=/^:[\w-]+$/,w1=3,b1=2,S1=1,_1=10,k1=-2,dm=t=>t==="*";function j1(t,e){let n=t.split("/"),i=n.length;return n.some(dm)&&(i+=k1),e&&(i+=b1),n.filter(o=>!dm(o)).reduce((o,l)=>o+(x1.test(l)?w1:l===""?S1:_1),i)}function C1(t,e){return t.length===e.length&&t.slice(0,-1).every((i,o)=>i===e[o])?t[t.length-1]-e[e.length-1]:0}function E1(t,e,n){let{routesMeta:i}=t,o={},l="/",c=[];for(let f=0;f<i.length;++f){let h=i[f],g=f===i.length-1,y=l==="/"?e:e.slice(l.length)||"/",v=La({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},y),w=h.route;if(!v)return null;Object.assign(o,v.params),c.push({params:o,pathname:as([l,v.pathname]),pathnameBase:A1(as([l,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(l=as([l,v.pathnameBase]))}return c}function La(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=N1(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let l=o[0],c=l.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((g,y,v)=>{let{paramName:w,isOptional:x}=y;if(w==="*"){let _=f[v]||"";c=l.slice(0,l.length-_.length).replace(/(.)\/+$/,"$1")}const j=f[v];return x&&!j?g[w]=void 0:g[w]=(j||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:c,pattern:t}}function N1(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Dd(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),i]}function P1(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Dd(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Si(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}const O1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,R1=t=>O1.test(t);function T1(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:o=""}=typeof t=="string"?Ti(t):t,l;if(n)if(R1(n))l=n;else{if(n.includes("//")){let c=n;n=n.replace(/\/\/+/g,"/"),Dd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(c+" -> "+n))}n.startsWith("/")?l=fm(n.substring(1),"/"):l=fm(n,e)}else l=e;return{pathname:l,search:I1(i),hash:F1(o)}}function fm(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Mc(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function L1(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ny(t,e){let n=L1(t);return e?n.map((i,o)=>o===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function sy(t,e,n,i){i===void 0&&(i=!1);let o;typeof t=="string"?o=Ti(t):(o=Ta({},t),vt(!o.pathname||!o.pathname.includes("?"),Mc("?","pathname","search",o)),vt(!o.pathname||!o.pathname.includes("#"),Mc("#","pathname","hash",o)),vt(!o.search||!o.search.includes("#"),Mc("#","search","hash",o)));let l=t===""||o.pathname==="",c=l?"/":o.pathname,f;if(c==null)f=n;else{let v=e.length-1;if(!i&&c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),v-=1;o.pathname=w.join("/")}f=v>=0?e[v]:"/"}let h=T1(o,f),g=c&&c!=="/"&&c.endsWith("/"),y=(l||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(g||y)&&(h.pathname+="/"),h}const as=t=>t.join("/").replace(/\/\/+/g,"/"),A1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),I1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,F1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function M1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const iy=["post","put","patch","delete"];new Set(iy);const D1=["get",...iy];new Set(D1);function Aa(){return Aa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Aa.apply(this,arguments)}const Fl=B.createContext(null),ay=B.createContext(null),ys=B.createContext(null),Ml=B.createContext(null),Rn=B.createContext({outlet:null,matches:[],isDataRoute:!1}),oy=B.createContext(null);function $1(t,e){let{relative:n}=e===void 0?{}:e;Wa()||vt(!1);let{basename:i,navigator:o}=B.useContext(ys),{hash:l,pathname:c,search:f}=Dl(t,{relative:n}),h=c;return i!=="/"&&(h=c==="/"?i:as([i,c])),o.createHref({pathname:h,search:f,hash:l})}function Wa(){return B.useContext(Ml)!=null}function Li(){return Wa()||vt(!1),B.useContext(Ml).location}function ly(t){B.useContext(ys).static||B.useLayoutEffect(t)}function Tn(){let{isDataRoute:t}=B.useContext(Rn);return t?ew():z1()}function z1(){Wa()||vt(!1);let t=B.useContext(Fl),{basename:e,future:n,navigator:i}=B.useContext(ys),{matches:o}=B.useContext(Rn),{pathname:l}=Li(),c=JSON.stringify(ny(o,n.v7_relativeSplatPath)),f=B.useRef(!1);return ly(()=>{f.current=!0}),B.useCallback(function(g,y){if(y===void 0&&(y={}),!f.current)return;if(typeof g=="number"){i.go(g);return}let v=sy(g,JSON.parse(c),l,y.relative==="path");t==null&&e!=="/"&&(v.pathname=v.pathname==="/"?e:as([e,v.pathname])),(y.replace?i.replace:i.push)(v,y.state,y)},[e,i,c,l,t])}const U1=B.createContext(null);function V1(t){let e=B.useContext(Rn).outlet;return e&&B.createElement(U1.Provider,{value:t},e)}function Qa(){let{matches:t}=B.useContext(Rn),e=t[t.length-1];return e?e.params:{}}function Dl(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=B.useContext(ys),{matches:o}=B.useContext(Rn),{pathname:l}=Li(),c=JSON.stringify(ny(o,i.v7_relativeSplatPath));return B.useMemo(()=>sy(t,JSON.parse(c),l,n==="path"),[t,c,l,n])}function B1(t,e){return H1(t,e)}function H1(t,e,n,i){Wa()||vt(!1);let{navigator:o}=B.useContext(ys),{matches:l}=B.useContext(Rn),c=l[l.length-1],f=c?c.params:{};c&&c.pathname;let h=c?c.pathnameBase:"/";c&&c.route;let g=Li(),y;if(e){var v;let S=typeof e=="string"?Ti(e):e;h==="/"||(v=S.pathname)!=null&&v.startsWith(h)||vt(!1),y=S}else y=g;let w=y.pathname||"/",x=w;if(h!=="/"){let S=h.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(S.length).join("/")}let j=g1(t,{pathname:x}),_=Z1(j&&j.map(S=>Object.assign({},S,{params:Object.assign({},f,S.params),pathname:as([h,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:as([h,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,i);return e&&_?B.createElement(Ml.Provider,{value:{location:Aa({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:is.Pop}},_):_}function q1(){let t=X1(),e=M1(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return B.createElement(B.Fragment,null,B.createElement("h2",null,"Unexpected Application Error!"),B.createElement("h3",{style:{fontStyle:"italic"}},e),n?B.createElement("pre",{style:o},n):null,null)}const W1=B.createElement(q1,null);class Q1 extends B.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?B.createElement(Rn.Provider,{value:this.props.routeContext},B.createElement(oy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K1(t){let{routeContext:e,match:n,children:i}=t,o=B.useContext(Fl);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),B.createElement(Rn.Provider,{value:e},i)}function Z1(t,e,n,i){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var l;if(!n)return null;if(n.errors)t=n.matches;else if((l=i)!=null&&l.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let c=t,f=(o=n)==null?void 0:o.errors;if(f!=null){let y=c.findIndex(v=>v.route.id&&f?.[v.route.id]!==void 0);y>=0||vt(!1),c=c.slice(0,Math.min(c.length,y+1))}let h=!1,g=-1;if(n&&i&&i.v7_partialHydration)for(let y=0;y<c.length;y++){let v=c[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(g=y),v.route.id){let{loaderData:w,errors:x}=n,j=v.route.loader&&w[v.route.id]===void 0&&(!x||x[v.route.id]===void 0);if(v.route.lazy||j){h=!0,g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}return c.reduceRight((y,v,w)=>{let x,j=!1,_=null,S=null;n&&(x=f&&v.route.id?f[v.route.id]:void 0,_=v.route.errorElement||W1,h&&(g<0&&w===0?(tw("route-fallback"),j=!0,S=null):g===w&&(j=!0,S=v.route.hydrateFallbackElement||null)));let I=e.concat(c.slice(0,w+1)),E=()=>{let z;return x?z=_:j?z=S:v.route.Component?z=B.createElement(v.route.Component,null):v.route.element?z=v.route.element:z=y,B.createElement(K1,{match:v,routeContext:{outlet:y,matches:I,isDataRoute:n!=null},children:z})};return n&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?B.createElement(Q1,{location:n.location,revalidation:n.revalidation,component:_,error:x,children:E(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):E()},null)}var uy=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(uy||{}),cy=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(cy||{});function G1(t){let e=B.useContext(Fl);return e||vt(!1),e}function J1(t){let e=B.useContext(ay);return e||vt(!1),e}function Y1(t){let e=B.useContext(Rn);return e||vt(!1),e}function dy(t){let e=Y1(),n=e.matches[e.matches.length-1];return n.route.id||vt(!1),n.route.id}function X1(){var t;let e=B.useContext(oy),n=J1(),i=dy();return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function ew(){let{router:t}=G1(uy.UseNavigateStable),e=dy(cy.UseNavigateStable),n=B.useRef(!1);return ly(()=>{n.current=!0}),B.useCallback(function(o,l){l===void 0&&(l={}),n.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,Aa({fromRouteId:e},l)))},[t,e])}const hm={};function tw(t,e,n){hm[t]||(hm[t]=!0)}function rw(t,e){t?.v7_startTransition,t?.v7_relativeSplatPath}function nw(t){return V1(t.context)}function Cn(t){vt(!1)}function sw(t){let{basename:e="/",children:n=null,location:i,navigationType:o=is.Pop,navigator:l,static:c=!1,future:f}=t;Wa()&&vt(!1);let h=e.replace(/^\/*/,"/"),g=B.useMemo(()=>({basename:h,navigator:l,static:c,future:Aa({v7_relativeSplatPath:!1},f)}),[h,f,l,c]);typeof i=="string"&&(i=Ti(i));let{pathname:y="/",search:v="",hash:w="",state:x=null,key:j="default"}=i,_=B.useMemo(()=>{let S=Si(y,h);return S==null?null:{location:{pathname:S,search:v,hash:w,state:x,key:j},navigationType:o}},[h,y,v,w,x,j,o]);return _==null?null:B.createElement(ys.Provider,{value:g},B.createElement(Ml.Provider,{children:n,value:_}))}function iw(t){let{children:e,location:n}=t;return B1(rd(e),n)}new Promise(()=>{});function rd(t,e){e===void 0&&(e=[]);let n=[];return B.Children.forEach(t,(i,o)=>{if(!B.isValidElement(i))return;let l=[...e,o];if(i.type===B.Fragment){n.push.apply(n,rd(i.props.children,l));return}i.type!==Cn&&vt(!1),!i.props.index||!i.props.children||vt(!1);let c={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=rd(i.props.children,l)),n.push(c)}),n}function pl(){return pl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pl.apply(this,arguments)}function fy(t,e){if(t==null)return{};var n={},i=Object.keys(t),o,l;for(l=0;l<i.length;l++)o=i[l],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function aw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ow(t,e){return t.button===0&&(!e||e==="_self")&&!aw(t)}const lw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uw=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cw="6";try{window.__reactRouterVersion=cw}catch{}const dw=B.createContext({isTransitioning:!1}),fw="startTransition",pm=Lx[fw];function hw(t){let{basename:e,children:n,future:i,window:o}=t,l=B.useRef();l.current==null&&(l.current=h1({window:o,v5Compat:!0}));let c=l.current,[f,h]=B.useState({action:c.action,location:c.location}),{v7_startTransition:g}=i||{},y=B.useCallback(v=>{g&&pm?pm(()=>h(v)):h(v)},[h,g]);return B.useLayoutEffect(()=>c.listen(y),[c,y]),B.useEffect(()=>rw(i),[i]),B.createElement(sw,{basename:e,children:n,location:f.location,navigationType:f.action,navigator:c,future:i})}const pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gw=B.forwardRef(function(e,n){let{onClick:i,relative:o,reloadDocument:l,replace:c,state:f,target:h,to:g,preventScrollReset:y,viewTransition:v}=e,w=fy(e,lw),{basename:x}=B.useContext(ys),j,_=!1;if(typeof g=="string"&&mw.test(g)&&(j=g,pw))try{let z=new URL(window.location.href),M=g.startsWith("//")?new URL(z.protocol+g):new URL(g),L=Si(M.pathname,x);M.origin===z.origin&&L!=null?g=L+M.search+M.hash:_=!0}catch{}let S=$1(g,{relative:o}),I=xw(g,{replace:c,state:f,target:h,preventScrollReset:y,relative:o,viewTransition:v});function E(z){i&&i(z),z.defaultPrevented||I(z)}return B.createElement("a",pl({},w,{href:j||S,onClick:_||l?i:E,ref:n,target:h}))}),yw=B.forwardRef(function(e,n){let{"aria-current":i="page",caseSensitive:o=!1,className:l="",end:c=!1,style:f,to:h,viewTransition:g,children:y}=e,v=fy(e,uw),w=Dl(h,{relative:v.relative}),x=Li(),j=B.useContext(ay),{navigator:_,basename:S}=B.useContext(ys),I=j!=null&&ww(w)&&g===!0,E=_.encodeLocation?_.encodeLocation(w).pathname:w.pathname,z=x.pathname,M=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;o||(z=z.toLowerCase(),M=M?M.toLowerCase():null,E=E.toLowerCase()),M&&S&&(M=Si(M,S)||M);const L=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let Q=z===E||!c&&z.startsWith(E)&&z.charAt(L)==="/",le=M!=null&&(M===E||!c&&M.startsWith(E)&&M.charAt(E.length)==="/"),ue={isActive:Q,isPending:le,isTransitioning:I},pe=Q?i:void 0,_e;typeof l=="function"?_e=l(ue):_e=[l,Q?"active":null,le?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let Oe=typeof f=="function"?f(ue):f;return B.createElement(gw,pl({},v,{"aria-current":pe,className:_e,ref:n,style:Oe,to:h,viewTransition:g}),typeof y=="function"?y(ue):y)});var nd;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(nd||(nd={}));var mm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(mm||(mm={}));function vw(t){let e=B.useContext(Fl);return e||vt(!1),e}function xw(t,e){let{target:n,replace:i,state:o,preventScrollReset:l,relative:c,viewTransition:f}=e===void 0?{}:e,h=Tn(),g=Li(),y=Dl(t,{relative:c});return B.useCallback(v=>{if(ow(v,n)){v.preventDefault();let w=i!==void 0?i:hl(g)===hl(y);h(t,{replace:w,state:o,preventScrollReset:l,relative:c,viewTransition:f})}},[g,h,y,i,o,n,t,l,c,f])}function ww(t,e){e===void 0&&(e={});let n=B.useContext(dw);n==null&&vt(!1);let{basename:i}=vw(nd.useViewTransitionState),o=Dl(t,{relative:e.relative});if(!n.isTransitioning)return!1;let l=Si(n.currentLocation.pathname,i)||n.currentLocation.pathname,c=Si(n.nextLocation.pathname,i)||n.nextLocation.pathname;return La(o.pathname,c)!=null||La(o.pathname,l)!=null}var Ai=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bw=class extends Ai{#e;#t;#r;constructor(){super(),this.#r=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$d=new bw,Sw={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},_w=class{#e=Sw;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Fs=new _w;function kw(t){setTimeout(t,0)}var jw=typeof window>"u"||"Deno"in globalThis;function tr(){}function Cw(t,e){return typeof t=="function"?t(e):t}function sd(t){return typeof t=="number"&&t>=0&&t!==1/0}function hy(t,e){return Math.max(t+(e||0)-Date.now(),0)}function os(t,e){return typeof t=="function"?t(e):t}function Sr(t,e){return typeof t=="function"?t(e):t}function gm(t,e){const{type:n="all",exact:i,fetchStatus:o,predicate:l,queryKey:c,stale:f}=t;if(c){if(i){if(e.queryHash!==zd(c,e.options))return!1}else if(!Ia(e.queryKey,c))return!1}if(n!=="all"){const h=e.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||o&&o!==e.state.fetchStatus||l&&!l(e))}function ym(t,e){const{exact:n,status:i,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(Ds(e.options.mutationKey)!==Ds(l))return!1}else if(!Ia(e.options.mutationKey,l))return!1}return!(i&&e.state.status!==i||o&&!o(e))}function zd(t,e){return(e?.queryKeyHashFn||Ds)(t)}function Ds(t){return JSON.stringify(t,(e,n)=>id(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function Ia(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ia(t[n],e[n])):!1}var Ew=Object.prototype.hasOwnProperty;function py(t,e,n=0){if(t===e)return t;if(n>500)return e;const i=vm(t)&&vm(e);if(!i&&!(id(t)&&id(e)))return e;const l=(i?t:Object.keys(t)).length,c=i?e:Object.keys(e),f=c.length,h=i?new Array(f):{};let g=0;for(let y=0;y<f;y++){const v=i?y:c[y],w=t[v],x=e[v];if(w===x){h[v]=w,(i?y<l:Ew.call(t,v))&&g++;continue}if(w===null||x===null||typeof w!="object"||typeof x!="object"){h[v]=x;continue}const j=py(w,x,n+1);h[v]=j,j===w&&g++}return l===f&&g===l?t:h}function ml(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function vm(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function id(t){if(!xm(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!xm(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function xm(t){return Object.prototype.toString.call(t)==="[object Object]"}function Nw(t){return new Promise(e=>{Fs.setTimeout(e,t)})}function ad(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?py(t,e):e}function Pw(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function Ow(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var Ud=Symbol();function my(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Ud?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Vd(t,e){return typeof t=="function"?t(...e):!!t}function Rw(t,e,n){let i=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var Fa=(()=>{let t=()=>jw;return{isServer(){return t()},setIsServer(e){t=e}}})();function od(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),t(o)},n.reject=o=>{i({status:"rejected",reason:o}),e(o)},n}var Tw=kw;function Lw(){let t=[],e=0,n=f=>{f()},i=f=>{f()},o=Tw;const l=f=>{e?t.push(f):o(()=>{n(f)})},c=()=>{const f=t;t=[],f.length&&o(()=>{i(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;e++;try{h=f()}finally{e--,e||c()}return h},batchCalls:f=>(...h)=>{l(()=>{f(...h)})},schedule:l,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{o=f}}}var Tt=Lw(),Aw=class extends Ai{#e=!0;#t;#r;constructor(){super(),this.#r=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#r=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},gl=new Aw;function Iw(t){return Math.min(1e3*2**t,3e4)}function gy(t){return(t??"online")==="online"?gl.isOnline():!0}var ld=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function yy(t){let e=!1,n=0,i;const o=od(),l=()=>o.status!=="pending",c=_=>{if(!l()){const S=new ld(_);w(S),t.onCancel?.(S)}},f=()=>{e=!0},h=()=>{e=!1},g=()=>$d.isFocused()&&(t.networkMode==="always"||gl.isOnline())&&t.canRun(),y=()=>gy(t.networkMode)&&t.canRun(),v=_=>{l()||(i?.(),o.resolve(_))},w=_=>{l()||(i?.(),o.reject(_))},x=()=>new Promise(_=>{i=S=>{(l()||g())&&_(S)},t.onPause?.()}).then(()=>{i=void 0,l()||t.onContinue?.()}),j=()=>{if(l())return;let _;const S=n===0?t.initialPromise:void 0;try{_=S??t.fn()}catch(I){_=Promise.reject(I)}Promise.resolve(_).then(v).catch(I=>{if(l())return;const E=t.retry??(Fa.isServer()?0:3),z=t.retryDelay??Iw,M=typeof z=="function"?z(n,I):z,L=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,I);if(e||!L){w(I);return}n++,t.onFail?.(n,I),Nw(M).then(()=>g()?void 0:x()).then(()=>{e?w(I):j()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(i?.(),o),cancelRetry:f,continueRetry:h,canStart:y,start:()=>(y()?j():x().then(j),o)}}var vy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sd(this.gcTime)&&(this.#e=Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Fa.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Fs.clearTimeout(this.#e),this.#e=void 0)}};function Fw(t){return{onFetch:(e,n)=>{const i=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,l=e.state.data?.pages||[],c=e.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const g=async()=>{let y=!1;const v=j=>{Rw(j,()=>e.signal,()=>y=!0)},w=my(e.options,e.fetchOptions),x=async(j,_,S)=>{if(y)return Promise.reject(e.signal.reason);if(_==null&&j.pages.length)return Promise.resolve(j);const E=(()=>{const Q={client:e.client,queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};return v(Q),Q})(),z=await w(E),{maxPages:M}=e.options,L=S?Ow:Pw;return{pages:L(j.pages,z,M),pageParams:L(j.pageParams,_,M)}};if(o&&l.length){const j=o==="backward",_=j?Mw:wm,S={pages:l,pageParams:c},I=_(i,S);f=await x(S,I,j)}else{const j=t??l.length;do{const _=h===0?c[0]??i.initialPageParam:wm(i,f);if(h>0&&_==null)break;f=await x(f,_),h++}while(h<j)}return f};e.options.persister?e.fetchFn=()=>e.options.persister?.(g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=g}}}function wm(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function Mw(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var Dw=class extends vy{#e;#t;#r;#n;#i;#s;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#n=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Sm(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Sm(this.options);e.data!==void 0&&(this.setState(bm(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=ad(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(tr).catch(tr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Sr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ud||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>os(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hy(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#a||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const h=my(this.options,e),y=(()=>{const v={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#a=!1,this.options.persister?this.options.persister(h,y,this):h(y)},c=(()=>{const h={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return i(h),h})();(this.#e==="infinite"?Fw(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#r=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#s=yy({initialPromise:e?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof ld&&h.revert&&this.setState({...this.#r,fetchStatus:"idle"}),n.abort()},onFail:(h,g)=>{this.#l({type:"failed",failureCount:h,error:g})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const h=await this.#s.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof ld){if(h.silent)return this.#s.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...xy(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...bm(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#r=t.manual?i:void 0,i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),Tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function xy(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gy(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function bm(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Sm(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $w=class extends Ai{constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.#o=od(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#r=void 0;#n=void 0;#i;#s;#o;#a;#c;#l;#p;#d;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_m(this.#t,this.options)?this.#h():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ud(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ud(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#b(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!ml(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&km(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),i&&(this.#t!==n||Sr(this.options.enabled,this.#t)!==Sr(e.enabled,this.#t)||os(this.options.staleTime,this.#t)!==os(e.staleTime,this.#t))&&this.#g();const o=this.#y();i&&(this.#t!==n||Sr(this.options.enabled,this.#t)!==Sr(e.enabled,this.#t)||o!==this.#u)&&this.#v(o)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return Uw(this,n)&&(this.#n=n,this.#s=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#h(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(tr)),e}#g(){this.#w();const t=os(this.options.staleTime,this.#t);if(Fa.isServer()||this.#n.isStale||!sd(t))return;const n=hy(this.#n.dataUpdatedAt,t)+1;this.#d=Fs.setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#b(),this.#u=t,!(Fa.isServer()||Sr(this.options.enabled,this.#t)===!1||!sd(this.#u)||this.#u===0)&&(this.#f=Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||$d.isFocused())&&this.#h()},this.#u))}#x(){this.#g(),this.#v(this.#y())}#w(){this.#d!==void 0&&(Fs.clearTimeout(this.#d),this.#d=void 0)}#b(){this.#f!==void 0&&(Fs.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,i=this.options,o=this.#n,l=this.#i,c=this.#s,h=t!==n?t.state:this.#r,{state:g}=t;let y={...g},v=!1,w;if(e._optimisticResults){const ue=this.hasListeners(),pe=!ue&&_m(t,e),_e=ue&&km(t,n,e,i);(pe||_e)&&(y={...y,...xy(g.data,t.options)}),e._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:x,errorUpdatedAt:j,status:_}=y;w=y.data;let S=!1;if(e.placeholderData!==void 0&&w===void 0&&_==="pending"){let ue;o?.isPlaceholderData&&e.placeholderData===c?.placeholderData?(ue=o.data,S=!0):ue=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,ue!==void 0&&(_="success",w=ad(o?.data,ue,e),v=!0)}if(e.select&&w!==void 0&&!S)if(o&&w===l?.data&&e.select===this.#c)w=this.#l;else try{this.#c=e.select,w=e.select(w),w=ad(o?.data,w,e),this.#l=w,this.#a=null}catch(ue){this.#a=ue}this.#a&&(x=this.#a,w=this.#l,j=Date.now(),_="error");const I=y.fetchStatus==="fetching",E=_==="pending",z=_==="error",M=E&&I,L=w!==void 0,le={status:_,fetchStatus:y.fetchStatus,isPending:E,isSuccess:_==="success",isError:z,isInitialLoading:M,isLoading:M,data:w,dataUpdatedAt:y.dataUpdatedAt,error:x,errorUpdatedAt:j,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:I,isRefetching:I&&!E,isLoadingError:z&&!L,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:z&&L,isStale:Bd(t,e),refetch:this.refetch,promise:this.#o,isEnabled:Sr(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=le.data!==void 0,pe=le.status==="error"&&!ue,_e=me=>{pe?me.reject(le.error):ue&&me.resolve(le.data)},Oe=()=>{const me=this.#o=le.promise=od();_e(me)},Z=this.#o;switch(Z.status){case"pending":t.queryHash===n.queryHash&&_e(Z);break;case"fulfilled":(pe||le.data!==Z.value)&&Oe();break;case"rejected":(!pe||le.error!==Z.reason)&&Oe();break}}return le}updateResult(){const t=this.#n,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#p=this.#t),ml(e,t))return;this.#n=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!this.#m.size)return!0;const l=new Set(o??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#n).some(c=>{const f=c;return this.#n[f]!==t[f]&&l.has(f)})};this.#_({listeners:n()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#_(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function zw(t,e){return Sr(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Sr(e.retryOnMount,t)===!1)}function _m(t,e){return zw(t,e)||t.state.data!==void 0&&ud(t,e,e.refetchOnMount)}function ud(t,e,n){if(Sr(e.enabled,t)!==!1&&os(e.staleTime,t)!=="static"){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Bd(t,e)}return!1}function km(t,e,n,i){return(t!==e||Sr(i.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Bd(t,n)}function Bd(t,e){return Sr(e.enabled,t)!==!1&&t.isStaleByTime(os(e.staleTime,t))}function Uw(t,e){return!ml(t.getCurrentResult(),e)}var Vw=class extends vy{#e;#t;#r;#n;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#t=[],this.state=t.state||wy(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=yy({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#i({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const i=this.state.status==="pending",o=!this.#n.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:o}),this.#r.config.onMutate&&await this.#r.config.onMutate(t,this,n);const c=await this.options.onMutate?.(t,n);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:o})}const l=await this.#n.start();return await this.#r.config.onSuccess?.(l,t,this.state.context,this,n),await this.options.onSuccess?.(l,t,this.state.context,n),await this.#r.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,t,this.state.context,n),this.#i({type:"success",data:l}),l}catch(l){try{await this.#r.config.onError?.(l,t,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,t,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#r.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,t,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:l}),l}finally{this.#r.runNext(this)}}#i(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Tt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function wy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bw=class extends Ai{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(t,e,n){const i=new Vw({client:t,mutationCache:this,mutationId:++this.#r,options:t.defaultMutationOptions(e),state:n});return this.add(i),i}add(t){this.#e.add(t);const e=al(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=al(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=al(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=al(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Tt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>ym(e,n))}findAll(t={}){return this.getAll().filter(e=>ym(t,e))}notify(t){Tt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Tt.batch(()=>Promise.all(t.map(e=>e.continue().catch(tr))))}};function al(t){return t.options.scope?.id}var Hw=class extends Ai{#e;#t=void 0;#r;#n;constructor(e,n){super(),this.#e=e,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const n=this.options;this.options=this.#e.defaultMutationOptions(e),ml(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&Ds(n.mutationKey)!==Ds(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#s()}mutate(e,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){const e=this.#r?.state??wy();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#s(e){Tt.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,i=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,n,i,o)}catch(l){Promise.reject(l)}try{this.#n.onSettled?.(e.data,null,n,i,o)}catch(l){Promise.reject(l)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,n,i,o)}catch(l){Promise.reject(l)}try{this.#n.onSettled?.(void 0,e.error,n,i,o)}catch(l){Promise.reject(l)}}}this.listeners.forEach(n=>{n(this.#t)})})}},qw=class extends Ai{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const i=e.queryKey,o=e.queryHash??zd(i,e);let l=this.get(o);return l||(l=new Dw({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>gm(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>gm(t,n)):e}notify(t){Tt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ww=class{#e;#t;#r;#n;#i;#s;#o;#a;constructor(t={}){this.#e=t.queryCache||new qw,this.#t=t.mutationCache||new Bw,this.#r=t.defaultOptions||{},this.#n=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=$d.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=gl.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(os(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),l=this.#e.get(i.queryHash)?.state.data,c=Cw(e,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(t,e,n){return Tt.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Tt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return Tt.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=Tt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(n)));return Promise.all(i).then(tr).catch(tr)}invalidateQueries(t,e={}){return Tt.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=Tt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(tr)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(tr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(os(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(tr).catch(tr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(tr).catch(tr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return gl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(t){this.#r=t}setQueryDefaults(t,e){this.#n.set(Ds(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#n.values()],n={};return e.forEach(i=>{Ia(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){this.#i.set(Ds(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(i=>{Ia(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#r.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=zd(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ud&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#r.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},by=B.createContext(void 0),jr=t=>{const e=B.useContext(by);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Qw=({client:t,children:e})=>(B.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(by.Provider,{value:t,children:e})),Sy=B.createContext(!1),Kw=()=>B.useContext(Sy);Sy.Provider;function Zw(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Gw=B.createContext(Zw()),Jw=()=>B.useContext(Gw),Yw=(t,e,n)=>{const i=n?.state.error&&typeof t.throwOnError=="function"?Vd(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},Xw=t=>{B.useEffect(()=>{t.clearReset()},[t])},eb=({result:t,errorResetBoundary:e,throwOnError:n,query:i,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(o&&t.data===void 0||Vd(n,[t.error,i])),tb=t=>{if(t.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},rb=(t,e)=>t.isLoading&&t.isFetching&&!e,nb=(t,e)=>t?.suspense&&e.isPending,jm=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function sb(t,e,n){const i=Kw(),o=Jw(),l=jr(),c=l.defaultQueryOptions(t);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",tb(c),Yw(c,o,f),Xw(o);const h=!l.getQueryCache().get(c.queryHash),[g]=B.useState(()=>new e(l,c)),y=g.getOptimisticResult(c),v=!i&&t.subscribed!==!1;if(B.useSyncExternalStore(B.useCallback(w=>{const x=v?g.subscribe(Tt.batchCalls(w)):tr;return g.updateResult(),x},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),B.useEffect(()=>{g.setOptions(c)},[c,g]),nb(c,y))throw jm(c,g,o);if(eb({result:y,errorResetBoundary:o,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,y),c.experimental_prefetchInRender&&!Fa.isServer()&&rb(y,i)&&(h?jm(c,g,o):f?.promise)?.catch(tr).finally(()=>{g.updateResult()}),c.notifyOnChangeProps?y:g.trackResult(y)}function vs(t,e){return sb(t,$w)}function Zr(t,e){const n=jr(),[i]=B.useState(()=>new Hw(n,t));B.useEffect(()=>{i.setOptions(t)},[i,t]);const o=B.useSyncExternalStore(B.useCallback(c=>i.subscribe(Tt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=B.useCallback((c,f)=>{i.mutate(c,f).catch(tr)},[i]);if(o.error&&Vd(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}var ib=t=>{switch(t){case"success":return lb;case"info":return cb;case"warning":return ub;case"error":return db;default:return null}},ab=Array(12).fill(0),ob=({visible:t,className:e})=>ee.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ee.createElement("div",{className:"sonner-spinner"},ab.map((n,i)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),lb=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ub=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cb=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),db=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fb=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hb=()=>{let[t,e]=ee.useState(document.hidden);return ee.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},cd=1,pb=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...i}=t,o=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:cd++,l=this.toasts.find(f=>f.id===o),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(f=>f.id===o?(this.publish({...f,...t,id:o,title:n}),{...f,...t,id:o,dismissible:c,title:n}):f):this.addToast({title:n,...i,dismissible:c,id:o}),o},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let i=t instanceof Promise?t:t(),o=n!==void 0,l,c=i.then(async h=>{if(l=["resolve",h],ee.isValidElement(h))o=!1,this.create({id:n,type:"default",message:h});else if(gb(h)&&!h.ok){o=!1;let g=typeof e.error=="function"?await e.error(`HTTP error! status: ${h.status}`):e.error,y=typeof e.description=="function"?await e.description(`HTTP error! status: ${h.status}`):e.description;this.create({id:n,type:"error",message:g,description:y})}else if(e.success!==void 0){o=!1;let g=typeof e.success=="function"?await e.success(h):e.success,y=typeof e.description=="function"?await e.description(h):e.description;this.create({id:n,type:"success",message:g,description:y})}}).catch(async h=>{if(l=["reject",h],e.error!==void 0){o=!1;let g=typeof e.error=="function"?await e.error(h):e.error,y=typeof e.description=="function"?await e.description(h):e.description;this.create({id:n,type:"error",message:g,description:y})}}).finally(()=>{var h;o&&(this.dismiss(n),n=void 0),(h=e.finally)==null||h.call(e)}),f=()=>new Promise((h,g)=>c.then(()=>l[0]==="reject"?g(l[1]):h(l[1])).catch(g));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,e)=>{let n=e?.id||cd++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},mr=new pb,mb=(t,e)=>{let n=e?.id||cd++;return mr.addToast({title:t,...e,id:n}),n},gb=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",yb=mb,vb=()=>mr.toasts,xb=()=>mr.getActiveToasts(),$t=Object.assign(yb,{success:mr.success,info:mr.info,warning:mr.warning,error:mr.error,custom:mr.custom,message:mr.message,promise:mr.promise,dismiss:mr.dismiss,loading:mr.loading},{getHistory:vb,getToasts:xb});function wb(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}wb(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
`);function ol(t){return t.label!==void 0}var bb=3,Sb="32px",_b="16px",Cm=4e3,kb=356,jb=14,Cb=20,Eb=200;function qr(...t){return t.filter(Boolean).join(" ")}function Nb(t){let[e,n]=t.split("-"),i=[];return e&&i.push(e),n&&i.push(n),i}var Pb=t=>{var e,n,i,o,l,c,f,h,g,y,v;let{invert:w,toast:x,unstyled:j,interacting:_,setHeights:S,visibleToasts:I,heights:E,index:z,toasts:M,expanded:L,removeToast:Q,defaultRichColors:le,closeButton:ue,style:pe,cancelButtonStyle:_e,actionButtonStyle:Oe,className:Z="",descriptionClassName:me="",duration:he,position:T,gap:P,loadingIcon:K,expandByDefault:V,classNames:H,icons:W,closeButtonAriaLabel:O="Close toast",pauseWhenPageIsHidden:q}=t,[ae,fe]=ee.useState(null),[Ee,Ie]=ee.useState(null),[ke,Ue]=ee.useState(!1),[Be,_t]=ee.useState(!1),[ir,dn]=ee.useState(!1),[Ir,fn]=ee.useState(!1),[Hs,Ln]=ee.useState(!1),[ws,hn]=ee.useState(0),[An,Gr]=ee.useState(0),ar=ee.useRef(x.duration||he||Cm),bs=ee.useRef(null),gr=ee.useRef(null),C=z===0,A=z+1<=I,D=x.type,se=x.dismissible!==!1,ie=x.className||"",ne=x.descriptionClassName||"",oe=ee.useMemo(()=>E.findIndex(Re=>Re.toastId===x.id)||0,[E,x.id]),Ne=ee.useMemo(()=>{var Re;return(Re=x.closeButton)!=null?Re:ue},[x.closeButton,ue]),De=ee.useMemo(()=>x.duration||he||Cm,[x.duration,he]),ht=ee.useRef(0),kt=ee.useRef(0),Pt=ee.useRef(0),Cr=ee.useRef(null),[pn,mn]=T.split("-"),In=ee.useMemo(()=>E.reduce((Re,Qe,et)=>et>=oe?Re:Re+Qe.height,0),[E,oe]),gn=hb(),Jr=x.invert||w,yr=D==="loading";kt.current=ee.useMemo(()=>oe*P+In,[oe,In]),ee.useEffect(()=>{ar.current=De},[De]),ee.useEffect(()=>{Ue(!0)},[]),ee.useEffect(()=>{let Re=gr.current;if(Re){let Qe=Re.getBoundingClientRect().height;return Gr(Qe),S(et=>[{toastId:x.id,height:Qe,position:x.position},...et]),()=>S(et=>et.filter(Yt=>Yt.toastId!==x.id))}},[S,x.id]),ee.useLayoutEffect(()=>{if(!ke)return;let Re=gr.current,Qe=Re.style.height;Re.style.height="auto";let et=Re.getBoundingClientRect().height;Re.style.height=Qe,Gr(et),S(Yt=>Yt.find(or=>or.toastId===x.id)?Yt.map(or=>or.toastId===x.id?{...or,height:et}:or):[{toastId:x.id,height:et,position:x.position},...Yt])},[ke,x.title,x.description,S,x.id]);let Fr=ee.useCallback(()=>{_t(!0),hn(kt.current),S(Re=>Re.filter(Qe=>Qe.toastId!==x.id)),setTimeout(()=>{Q(x)},Eb)},[x,Q,S,kt]);ee.useEffect(()=>{if(x.promise&&D==="loading"||x.duration===1/0||x.type==="loading")return;let Re;return L||_||q&&gn?(()=>{if(Pt.current<ht.current){let Qe=new Date().getTime()-ht.current;ar.current=ar.current-Qe}Pt.current=new Date().getTime()})():ar.current!==1/0&&(ht.current=new Date().getTime(),Re=setTimeout(()=>{var Qe;(Qe=x.onAutoClose)==null||Qe.call(x,x),Fr()},ar.current)),()=>clearTimeout(Re)},[L,_,x,D,q,gn,Fr]),ee.useEffect(()=>{x.delete&&Fr()},[Fr,x.delete]);function Ga(){var Re,Qe,et;return W!=null&&W.loading?ee.createElement("div",{className:qr(H?.loader,(Re=x?.classNames)==null?void 0:Re.loader,"sonner-loader"),"data-visible":D==="loading"},W.loading):K?ee.createElement("div",{className:qr(H?.loader,(Qe=x?.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":D==="loading"},K):ee.createElement(ob,{className:qr(H?.loader,(et=x?.classNames)==null?void 0:et.loader),visible:D==="loading"})}return ee.createElement("li",{tabIndex:0,ref:gr,className:qr(Z,ie,H?.toast,(e=x?.classNames)==null?void 0:e.toast,H?.default,H?.[D],(n=x?.classNames)==null?void 0:n[D]),"data-sonner-toast":"","data-rich-colors":(i=x.richColors)!=null?i:le,"data-styled":!(x.jsx||x.unstyled||j),"data-mounted":ke,"data-promise":!!x.promise,"data-swiped":Hs,"data-removed":Be,"data-visible":A,"data-y-position":pn,"data-x-position":mn,"data-index":z,"data-front":C,"data-swiping":ir,"data-dismissible":se,"data-type":D,"data-invert":Jr,"data-swipe-out":Ir,"data-swipe-direction":Ee,"data-expanded":!!(L||V&&ke),style:{"--index":z,"--toasts-before":z,"--z-index":M.length-z,"--offset":`${Be?ws:kt.current}px`,"--initial-height":V?"auto":`${An}px`,...pe,...x.style},onDragEnd:()=>{dn(!1),fe(null),Cr.current=null},onPointerDown:Re=>{yr||!se||(bs.current=new Date,hn(kt.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(dn(!0),Cr.current={x:Re.clientX,y:Re.clientY}))},onPointerUp:()=>{var Re,Qe,et,Yt;if(Ir||!se)return;Cr.current=null;let or=Number(((Re=gr.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lr=Number(((Qe=gr.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mr=new Date().getTime()-((et=bs.current)==null?void 0:et.getTime()),Ft=ae==="x"?or:lr,Yr=Math.abs(Ft)/Mr;if(Math.abs(Ft)>=Cb||Yr>.11){hn(kt.current),(Yt=x.onDismiss)==null||Yt.call(x,x),Ie(ae==="x"?or>0?"right":"left":lr>0?"down":"up"),Fr(),fn(!0),Ln(!1);return}dn(!1),fe(null)},onPointerMove:Re=>{var Qe,et,Yt,or;if(!Cr.current||!se||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;let lr=Re.clientY-Cr.current.y,Mr=Re.clientX-Cr.current.x,Ft=(et=t.swipeDirections)!=null?et:Nb(T);!ae&&(Math.abs(Mr)>1||Math.abs(lr)>1)&&fe(Math.abs(Mr)>Math.abs(lr)?"x":"y");let Yr={x:0,y:0};ae==="y"?(Ft.includes("top")||Ft.includes("bottom"))&&(Ft.includes("top")&&lr<0||Ft.includes("bottom")&&lr>0)&&(Yr.y=lr):ae==="x"&&(Ft.includes("left")||Ft.includes("right"))&&(Ft.includes("left")&&Mr<0||Ft.includes("right")&&Mr>0)&&(Yr.x=Mr),(Math.abs(Yr.x)>0||Math.abs(Yr.y)>0)&&Ln(!0),(Yt=gr.current)==null||Yt.style.setProperty("--swipe-amount-x",`${Yr.x}px`),(or=gr.current)==null||or.style.setProperty("--swipe-amount-y",`${Yr.y}px`)}},Ne&&!x.jsx?ee.createElement("button",{"aria-label":O,"data-disabled":yr,"data-close-button":!0,onClick:yr||!se?()=>{}:()=>{var Re;Fr(),(Re=x.onDismiss)==null||Re.call(x,x)},className:qr(H?.closeButton,(o=x?.classNames)==null?void 0:o.closeButton)},(l=W?.close)!=null?l:fb):null,x.jsx||B.isValidElement(x.title)?x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title:ee.createElement(ee.Fragment,null,D||x.icon||x.promise?ee.createElement("div",{"data-icon":"",className:qr(H?.icon,(c=x?.classNames)==null?void 0:c.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||Ga():null,x.type!=="loading"?x.icon||W?.[D]||ib(D):null):null,ee.createElement("div",{"data-content":"",className:qr(H?.content,(f=x?.classNames)==null?void 0:f.content)},ee.createElement("div",{"data-title":"",className:qr(H?.title,(h=x?.classNames)==null?void 0:h.title)},typeof x.title=="function"?x.title():x.title),x.description?ee.createElement("div",{"data-description":"",className:qr(me,ne,H?.description,(g=x?.classNames)==null?void 0:g.description)},typeof x.description=="function"?x.description():x.description):null),B.isValidElement(x.cancel)?x.cancel:x.cancel&&ol(x.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||_e,onClick:Re=>{var Qe,et;ol(x.cancel)&&se&&((et=(Qe=x.cancel).onClick)==null||et.call(Qe,Re),Fr())},className:qr(H?.cancelButton,(y=x?.classNames)==null?void 0:y.cancelButton)},x.cancel.label):null,B.isValidElement(x.action)?x.action:x.action&&ol(x.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||Oe,onClick:Re=>{var Qe,et;ol(x.action)&&((et=(Qe=x.action).onClick)==null||et.call(Qe,Re),!Re.defaultPrevented&&Fr())},className:qr(H?.actionButton,(v=x?.classNames)==null?void 0:v.actionButton)},x.action.label):null))};function Em(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function Ob(t,e){let n={};return[t,e].forEach((i,o)=>{let l=o===1,c=l?"--mobile-offset":"--offset",f=l?_b:Sb;function h(g){["top","right","bottom","left"].forEach(y=>{n[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?n[`${c}-${g}`]=f:n[`${c}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(f)}),n}var Rb=B.forwardRef(function(t,e){let{invert:n,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:f,offset:h,mobileOffset:g,theme:y="light",richColors:v,duration:w,style:x,visibleToasts:j=bb,toastOptions:_,dir:S=Em(),gap:I=jb,loadingIcon:E,icons:z,containerAriaLabel:M="Notifications",pauseWhenPageIsHidden:L}=t,[Q,le]=ee.useState([]),ue=ee.useMemo(()=>Array.from(new Set([i].concat(Q.filter(q=>q.position).map(q=>q.position)))),[Q,i]),[pe,_e]=ee.useState([]),[Oe,Z]=ee.useState(!1),[me,he]=ee.useState(!1),[T,P]=ee.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=ee.useRef(null),V=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=ee.useRef(null),W=ee.useRef(!1),O=ee.useCallback(q=>{le(ae=>{var fe;return(fe=ae.find(Ee=>Ee.id===q.id))!=null&&fe.delete||mr.dismiss(q.id),ae.filter(({id:Ee})=>Ee!==q.id)})},[]);return ee.useEffect(()=>mr.subscribe(q=>{if(q.dismiss){le(ae=>ae.map(fe=>fe.id===q.id?{...fe,delete:!0}:fe));return}setTimeout(()=>{Hx.flushSync(()=>{le(ae=>{let fe=ae.findIndex(Ee=>Ee.id===q.id);return fe!==-1?[...ae.slice(0,fe),{...ae[fe],...q},...ae.slice(fe+1)]:[q,...ae]})})})}),[]),ee.useEffect(()=>{if(y!=="system"){P(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:ae})=>{P(ae?"dark":"light")})}catch{q.addListener(({matches:fe})=>{try{P(fe?"dark":"light")}catch(Ee){console.error(Ee)}})}},[y]),ee.useEffect(()=>{Q.length<=1&&Z(!1)},[Q]),ee.useEffect(()=>{let q=ae=>{var fe,Ee;o.every(Ie=>ae[Ie]||ae.code===Ie)&&(Z(!0),(fe=K.current)==null||fe.focus()),ae.code==="Escape"&&(document.activeElement===K.current||(Ee=K.current)!=null&&Ee.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[o]),ee.useEffect(()=>{if(K.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,W.current=!1)}},[K.current]),ee.createElement("section",{ref:e,"aria-label":`${M} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ue.map((q,ae)=>{var fe;let[Ee,Ie]=q.split("-");return Q.length?ee.createElement("ol",{key:q,dir:S==="auto"?Em():S,tabIndex:-1,ref:K,className:f,"data-sonner-toaster":!0,"data-theme":T,"data-y-position":Ee,"data-lifted":Oe&&Q.length>1&&!l,"data-x-position":Ie,style:{"--front-toast-height":`${((fe=pe[0])==null?void 0:fe.height)||0}px`,"--width":`${kb}px`,"--gap":`${I}px`,...x,...Ob(h,g)},onBlur:ke=>{W.current&&!ke.currentTarget.contains(ke.relatedTarget)&&(W.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ke=>{ke.target instanceof HTMLElement&&ke.target.dataset.dismissible==="false"||W.current||(W.current=!0,H.current=ke.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{me||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:ke=>{ke.target instanceof HTMLElement&&ke.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},Q.filter(ke=>!ke.position&&ae===0||ke.position===q).map((ke,Ue)=>{var Be,_t;return ee.createElement(Pb,{key:ke.id,icons:z,index:Ue,toast:ke,defaultRichColors:v,duration:(Be=_?.duration)!=null?Be:w,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:n,visibleToasts:j,closeButton:(_t=_?.closeButton)!=null?_t:c,interacting:me,position:q,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,removeToast:O,toasts:Q.filter(ir=>ir.position==ke.position),heights:pe.filter(ir=>ir.position==ke.position),setHeights:_e,expandByDefault:l,gap:I,loadingIcon:E,expanded:Oe,pauseWhenPageIsHidden:L,swipeDirections:t.swipeDirections})})):null}))});const Le=t=>typeof t=="string",xa=()=>{let t,e;const n=new Promise((i,o)=>{t=i,e=o});return n.resolve=t,n.reject=e,n},Nm=t=>t==null?"":""+t,Tb=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},Lb=/###/g,Pm=t=>t&&t.indexOf("###")>-1?t.replace(Lb,"."):t,Om=t=>!t||Le(t),Pa=(t,e,n)=>{const i=Le(e)?e.split("."):e;let o=0;for(;o<i.length-1;){if(Om(t))return{};const l=Pm(i[o]);!t[l]&&n&&(t[l]=new n),Object.prototype.hasOwnProperty.call(t,l)?t=t[l]:t={},++o}return Om(t)?{}:{obj:t,k:Pm(i[o])}},Rm=(t,e,n)=>{const{obj:i,k:o}=Pa(t,e,Object);if(i!==void 0||e.length===1){i[o]=n;return}let l=e[e.length-1],c=e.slice(0,e.length-1),f=Pa(t,c,Object);for(;f.obj===void 0&&c.length;)l=`${c[c.length-1]}.${l}`,c=c.slice(0,c.length-1),f=Pa(t,c,Object),f&&f.obj&&typeof f.obj[`${f.k}.${l}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${l}`]=n},Ab=(t,e,n,i)=>{const{obj:o,k:l}=Pa(t,e,Object);o[l]=o[l]||[],o[l].push(n)},yl=(t,e)=>{const{obj:n,k:i}=Pa(t,e);if(n)return n[i]},Ib=(t,e,n)=>{const i=yl(t,n);return i!==void 0?i:yl(e,n)},_y=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?Le(t[i])||t[i]instanceof String||Le(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):_y(t[i],e[i],n):t[i]=e[i]);return t},hi=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Fb={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Mb=t=>Le(t)?t.replace(/[&<>"'\/]/g,e=>Fb[e]):t;class Db{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const $b=[" ",",","?","!",";"],zb=new Db(20),Ub=(t,e,n)=>{e=e||"",n=n||"";const i=$b.filter(c=>e.indexOf(c)<0&&n.indexOf(c)<0);if(i.length===0)return!0;const o=zb.getRegExp(`(${i.map(c=>c==="?"?"\\?":c).join("|")})`);let l=!o.test(t);if(!l){const c=t.indexOf(n);c>0&&!o.test(t.substring(0,c))&&(l=!0)}return l},dd=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let o=t;for(let l=0;l<i.length;){if(!o||typeof o!="object")return;let c,f="";for(let h=l;h<i.length;++h)if(h!==l&&(f+=n),f+=i[h],c=o[f],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&h<i.length-1)continue;l+=h-l+1;break}o=c}return o},vl=t=>t&&t.replace("_","-"),Vb={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class xl{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||Vb,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,o){return o&&!this.debug?null:(Le(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new xl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xl(this.logger,e)}}var on=new xl;class $l{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(n)||0;this.observers[i].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(c=>{let[f,h]=c;for(let g=0;g<h;g++)f(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(c=>{let[f,h]=c;for(let g=0;g<h;g++)f.apply(f,[e,...i])})}}class Tm extends $l{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;e.indexOf(".")>-1?f=e.split("."):(f=[e,n],i&&(Array.isArray(i)?f.push(...i):Le(i)&&l?f.push(...i.split(l)):f.push(i)));const h=yl(this.data,f);return!h&&!n&&!i&&e.indexOf(".")>-1&&(e=f[0],n=f[1],i=f.slice(2).join(".")),h||!c||!Le(i)?h:dd(this.data&&this.data[e]&&this.data[e][n],i,l)}addResource(e,n,i,o){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let f=[e,n];i&&(f=f.concat(c?i.split(c):i)),e.indexOf(".")>-1&&(f=e.split("."),o=n,n=f[1]),this.addNamespaces(n),Rm(this.data,f,o),l.silent||this.emit("added",e,n,i,o)}addResources(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const l in i)(Le(i[l])||Array.isArray(i[l]))&&this.addResource(e,n,l,i[l],{silent:!0});o.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,o,l){let c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},f=[e,n];e.indexOf(".")>-1&&(f=e.split("."),o=i,i=n,n=f[1]),this.addNamespaces(n);let h=yl(this.data,f)||{};c.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?_y(h,i,l):h={...h,...i},Rm(this.data,f,h),c.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var ky={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,o){return t.forEach(l=>{this.processors[l]&&(e=this.processors[l].process(e,n,i,o))}),e}};const Lm={};class wl extends $l{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Tb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=on.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let l=n.ns||this.options.defaultNS||[];const c=i&&e.indexOf(i)>-1,f=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ub(e,i,o);if(c&&!f){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:Le(l)?[l]:l};const g=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(g[0])>-1)&&(l=g.shift()),e=g.join(o)}return{key:e,namespaces:Le(l)?[l]:l}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,l=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:c,namespaces:f}=this.extractFromKey(e[e.length-1],n),h=f[f.length-1],g=n.lng||this.language,y=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(y){const M=n.nsSeparator||this.options.nsSeparator;return o?{res:`${h}${M}${c}`,usedKey:c,exactUsedKey:c,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:`${h}${M}${c}`}return o?{res:c,usedKey:c,exactUsedKey:c,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:c}const v=this.resolve(e,n);let w=v&&v.res;const x=v&&v.usedKey||c,j=v&&v.exactUsedKey||c,_=Object.prototype.toString.apply(w),S=["[object Number]","[object Function]","[object RegExp]"],I=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,z=!Le(w)&&typeof w!="boolean"&&typeof w!="number";if(E&&w&&z&&S.indexOf(_)<0&&!(Le(I)&&Array.isArray(w))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,w,{...n,ns:f}):`key '${c} (${this.language})' returned an object instead of string.`;return o?(v.res=M,v.usedParams=this.getUsedParamsDetails(n),v):M}if(l){const M=Array.isArray(w),L=M?[]:{},Q=M?j:x;for(const le in w)if(Object.prototype.hasOwnProperty.call(w,le)){const ue=`${Q}${l}${le}`;L[le]=this.translate(ue,{...n,joinArrays:!1,ns:f}),L[le]===ue&&(L[le]=w[le])}w=L}}else if(E&&Le(I)&&Array.isArray(w))w=w.join(I),w&&(w=this.extendTranslation(w,e,n,i));else{let M=!1,L=!1;const Q=n.count!==void 0&&!Le(n.count),le=wl.hasDefaultValue(n),ue=Q?this.pluralResolver.getSuffix(g,n.count,n):"",pe=n.ordinal&&Q?this.pluralResolver.getSuffix(g,n.count,{ordinal:!1}):"",_e=Q&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Oe=_e&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${ue}`]||n[`defaultValue${pe}`]||n.defaultValue;!this.isValidLookup(w)&&le&&(M=!0,w=Oe),this.isValidLookup(w)||(L=!0,w=c);const me=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:w,he=le&&Oe!==w&&this.options.updateMissing;if(L||M||he){if(this.logger.log(he?"updateKey":"missingKey",g,h,c,he?Oe:w),l){const V=this.resolve(c,{...n,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const P=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&P&&P[0])for(let V=0;V<P.length;V++)T.push(P[V]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(n.lng||this.language):T.push(n.lng||this.language);const K=(V,H,W)=>{const O=le&&W!==w?W:me;this.options.missingKeyHandler?this.options.missingKeyHandler(V,h,H,O,he,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(V,h,H,O,he,n),this.emit("missingKey",V,h,H,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Q?T.forEach(V=>{const H=this.pluralResolver.getSuffixes(V,n);_e&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(W=>{K([V],c+W,n[`defaultValue${W}`]||Oe)})}):K(T,c,Oe))}w=this.extendTranslation(w,e,n,v,i),L&&w===c&&this.options.appendNamespaceToMissingKey&&(w=`${h}:${c}`),(L||M)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${c}`:c,M?w:void 0):w=this.options.parseMissingKeyHandler(w))}return o?(v.res=w,v.usedParams=this.getUsedParamsDetails(n),v):w}extendTranslation(e,n,i,o,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const g=Le(e)&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(g){const w=e.match(this.interpolator.nestingRegexp);y=w&&w.length}let v=i.replace&&!Le(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),e=this.interpolator.interpolate(e,v,i.lng||this.language||o.usedLng,i),g){const w=e.match(this.interpolator.nestingRegexp),x=w&&w.length;y<x&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(i.lng=this.language||o.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var w=arguments.length,x=new Array(w),j=0;j<w;j++)x[j]=arguments[j];return l&&l[0]===x[0]&&!i.context?(c.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${n[0]}`),null):c.translate(...x,n)},i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,h=Le(f)?[f]:f;return e!=null&&h&&h.length&&i.applyPostProcessor!==!1&&(e=ky.handle(h,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,o,l,c,f;return Le(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(h,n),y=g.key;o=y;let v=g.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const w=n.count!==void 0&&!Le(n.count),x=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),j=n.context!==void 0&&(Le(n.context)||typeof n.context=="number")&&n.context!=="",_=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);v.forEach(S=>{this.isValidLookup(i)||(f=S,!Lm[`${_[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(f)&&(Lm[`${_[0]}-${S}`]=!0,this.logger.warn(`key "${o}" for languages "${_.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(I=>{if(this.isValidLookup(i))return;c=I;const E=[y];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(E,y,I,S,n);else{let M;w&&(M=this.pluralResolver.getSuffix(I,n.count,n));const L=`${this.options.pluralSeparator}zero`,Q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(E.push(y+M),n.ordinal&&M.indexOf(Q)===0&&E.push(y+M.replace(Q,this.options.pluralSeparator)),x&&E.push(y+L)),j){const le=`${y}${this.options.contextSeparator}${n.context}`;E.push(le),w&&(E.push(le+M),n.ordinal&&M.indexOf(Q)===0&&E.push(le+M.replace(Q,this.options.pluralSeparator)),x&&E.push(le+L))}}let z;for(;z=E.pop();)this.isValidLookup(i)||(l=z,i=this.getResource(I,S,z,n))}))})}),{res:i,usedKey:o,exactUsedKey:l,usedLng:c,usedNS:f}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,o):this.resourceStore.getResource(e,n,i,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Le(e.replace);let o=i?e.replace:e;if(i&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const l of n)delete o[l]}return o}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const Dc=t=>t.charAt(0).toUpperCase()+t.slice(1);class Am{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}getScriptPartFromCode(e){if(e=vl(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=vl(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Le(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(e)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(o=>o.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Dc(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Dc(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Dc(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(l=>{if(l===o)return l;if(!(l.indexOf("-")<0&&o.indexOf("-")<0)&&(l.indexOf("-")>0&&o.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===o||l.indexOf(o)===0&&o.length>1))return l})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Le(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),o=[],l=c=>{c&&(this.isSupportedCode(c)?o.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Le(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):Le(e)&&l(this.formatLanguageCode(e)),i.forEach(c=>{o.indexOf(c)<0&&l(this.formatLanguageCode(c))}),o}}let Bb=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Hb={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const qb=["v1","v2","v3"],Wb=["v4"],Im={zero:0,one:1,two:2,few:3,many:4,other:5},Qb=()=>{const t={};return Bb.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Hb[e.fc]}})}),t};class Kb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||Wb.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Qb(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const i=vl(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let c;try{c=new Intl.PluralRules(i,{type:o})}catch{if(!e.match(/-|_/))return;const h=this.languageUtils.getLanguagePartFromCode(e);c=this.getRule(h,n)}return this.pluralRulesCache[l]=c,c}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(o=>`${n}${o}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((o,l)=>Im[o]-Im[l]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):i.numbers.map(o=>this.getSuffix(e,o,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,i);return o?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let o=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const l=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?l():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!qb.includes(this.options.compatibilityJSON)}}const Fm=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=Ib(t,e,n);return!l&&o&&Le(n)&&(l=dd(t,n,i),l===void 0&&(l=dd(e,n,i))),l},$c=t=>t.replace(/\$/g,"$$$$");class Zb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=on.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:o,prefix:l,prefixEscaped:c,suffix:f,suffixEscaped:h,formatSeparator:g,unescapeSuffix:y,unescapePrefix:v,nestingPrefix:w,nestingPrefixEscaped:x,nestingSuffix:j,nestingSuffixEscaped:_,nestingOptionsSeparator:S,maxReplaces:I,alwaysFormat:E}=e.interpolation;this.escape=n!==void 0?n:Mb,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?hi(l):c||"{{",this.suffix=f?hi(f):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=w?hi(w):x||hi("$t("),this.nestingSuffix=j?hi(j):_||hi(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=I||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,o){let l,c,f;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=x=>{if(x.indexOf(this.formatSeparator)<0){const I=Fm(n,h,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(I,void 0,i,{...o,...n,interpolationkey:x}):I}const j=x.split(this.formatSeparator),_=j.shift().trim(),S=j.join(this.formatSeparator).trim();return this.format(Fm(n,h,_,this.options.keySeparator,this.options.ignoreJSONStructure),S,i,{...o,...n,interpolationkey:_})};this.resetRegExp();const y=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,v=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>$c(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?$c(this.escape(x)):$c(x)}].forEach(x=>{for(f=0;l=x.regex.exec(e);){const j=l[1].trim();if(c=g(j),c===void 0)if(typeof y=="function"){const S=y(e,l,o);c=Le(S)?S:""}else if(o&&Object.prototype.hasOwnProperty.call(o,j))c="";else if(v){c=l[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${e}`),c="";else!Le(c)&&!this.useRawValueToEscape&&(c=Nm(c));const _=x.safeValue(c);if(e=e.replace(l[0],_),v?(x.regex.lastIndex+=c.length,x.regex.lastIndex-=l[0].length):x.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,l,c;const f=(h,g)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const v=h.split(new RegExp(`${y}[ ]*{`));let w=`{${v[1]}`;h=v[0],w=this.interpolate(w,c);const x=w.match(/'/g),j=w.match(/"/g);(x&&x.length%2===0&&!j||j.length%2!==0)&&(w=w.replace(/'/g,'"'));try{c=JSON.parse(w),g&&(c={...g,...c})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,_),`${h}${y}${w}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,h};for(;o=this.nestingRegexp.exec(e);){let h=[];c={...i},c=c.replace&&!Le(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;let g=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const y=o[1].split(this.formatSeparator).map(v=>v.trim());o[1]=y.shift(),h=y,g=!0}if(l=n(f.call(this,o[1].trim(),c),c),l&&o[0]===e&&!Le(l))return l;Le(l)||(l=Nm(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),l=""),g&&(l=h.reduce((y,v)=>this.format(y,v,i.lng,{...i,interpolationkey:o[1].trim()}),l.trim())),e=e.replace(o[0],l),this.regexp.lastIndex=0}return e}}const Gb=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(c=>{if(c){const[f,...h]=c.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),y=f.trim();n[y]||(n[y]=g),g==="false"&&(n[y]=!1),g==="true"&&(n[y]=!0),isNaN(g)||(n[y]=parseInt(g,10))}})}return{formatName:e,formatOptions:n}},pi=t=>{const e={};return(n,i,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});const c=i+JSON.stringify(l);let f=e[c];return f||(f=t(vl(i),o),e[c]=f),f(n)}};class Jb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=on.create("formatter"),this.options=e,this.formats={number:pi((n,i)=>{const o=new Intl.NumberFormat(n,{...i});return l=>o.format(l)}),currency:pi((n,i)=>{const o=new Intl.NumberFormat(n,{...i,style:"currency"});return l=>o.format(l)}),datetime:pi((n,i)=>{const o=new Intl.DateTimeFormat(n,{...i});return l=>o.format(l)}),relativetime:pi((n,i)=>{const o=new Intl.RelativeTimeFormat(n,{...i});return l=>o.format(l,i.range||"day")}),list:pi((n,i)=>{const o=new Intl.ListFormat(n,{...i});return l=>o.format(l)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=pi(n)}format(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=n.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(f=>f.indexOf(")")>-1)){const f=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,f)].join(this.formatSeparator)}return l.reduce((f,h)=>{const{formatName:g,formatOptions:y}=Gb(h);if(this.formats[g]){let v=f;try{const w=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},x=w.locale||w.lng||o.locale||o.lng||i;v=this.formats[g](f,x,{...y,...o,...w})}catch(w){this.logger.warn(w)}return v}else this.logger.warn(`there was no format function for ${g}`);return f},e)}}const Yb=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Xb extends $l{constructor(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=on.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,o.backend,o)}queueLoad(e,n,i,o){const l={},c={},f={},h={};return e.forEach(g=>{let y=!0;n.forEach(v=>{const w=`${g}|${v}`;!i.reload&&this.store.hasResourceBundle(g,v)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?c[w]===void 0&&(c[w]=!0):(this.state[w]=1,y=!1,c[w]===void 0&&(c[w]=!0),l[w]===void 0&&(l[w]=!0),h[v]===void 0&&(h[v]=!0)))}),y||(f[g]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}loaded(e,n,i){const o=e.split("|"),l=o[0],c=o[1];n&&this.emit("failedLoading",l,c,n),!n&&i&&this.store.addResourceBundle(l,c,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const f={};this.queue.forEach(h=>{Ab(h.loaded,[l],c),Yb(h,e),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{f[g]||(f[g]={});const y=h.loaded[g];y.length&&y.forEach(v=>{f[g][v]===void 0&&(f[g][v]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(h=>!h.done)}read(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!e.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:o,wait:l,callback:c});return}this.readingCalls++;const f=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(g&&y&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,o+1,l*2,c)},l);return}c(g,y)},h=this.backend[i].bind(this.backend);if(h.length===2){try{const g=h(e,n);g&&typeof g.then=="function"?g.then(y=>f(null,y)).catch(f):f(null,g)}catch(g){f(g)}return}return h(e,n,f)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Le(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Le(n)&&(n=[n]);const l=this.queueLoad(e,n,i,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(c=>{this.loadOne(c)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),o=i[0],l=i[1];this.read(o,l,"read",void 0,void 0,(c,f)=>{c&&this.logger.warn(`${n}loading namespace ${l} for language ${o} failed`,c),!c&&f&&this.logger.log(`${n}loaded namespace ${l} for language ${o}`,f),this.loaded(e,c,f)})}saveMissing(e,n,i,o,l){let c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},f=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const h={...c,isUpdate:l},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,n,i,o,h):y=g(e,n,i,o),y&&typeof y.then=="function"?y.then(v=>f(null,v)).catch(f):f(null,y)}catch(y){f(y)}else g(e,n,i,o,f,h)}!e||!e[0]||this.store.addResource(e[0],n,i,o)}}}const Mm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Le(t[1])&&(e.defaultValue=t[1]),Le(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Dm=t=>(Le(t.ns)&&(t.ns=[t.ns]),Le(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Le(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),ll=()=>{},eS=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Ma extends $l{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Dm(e),this.services={},this.logger=on,this.modules={external:[]},eS(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Le(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Mm();this.options={...o,...this.options,...Dm(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const l=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?on.init(l(this.modules.logger),this.options):on.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:typeof Intl<"u"&&(y=Jb);const v=new Am(this.options);this.store=new Tm(this.options.resources,this.options);const w=this.services;w.logger=on,w.resourceStore=this.store,w.languageUtils=v,w.pluralResolver=new Kb(v,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(w.formatter=l(y),w.formatter.init(w,this.options),this.options.interpolation.format=w.formatter.format.bind(w.formatter)),w.interpolator=new Zb(this.options),w.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},w.backendConnector=new Xb(l(this.modules.backend),w.resourceStore,w,this.options),w.backendConnector.on("*",function(x){for(var j=arguments.length,_=new Array(j>1?j-1:0),S=1;S<j;S++)_[S-1]=arguments[S];e.emit(x,..._)}),this.modules.languageDetector&&(w.languageDetector=l(this.modules.languageDetector),w.languageDetector.init&&w.languageDetector.init(w,this.options.detection,this.options)),this.modules.i18nFormat&&(w.i18nFormat=l(this.modules.i18nFormat),w.i18nFormat.init&&w.i18nFormat.init(this)),this.translator=new wl(this.services,this.options),this.translator.on("*",function(x){for(var j=arguments.length,_=new Array(j>1?j-1:0),S=1;S<j;S++)_[S-1]=arguments[S];e.emit(x,..._)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,i||(i=ll),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=function(){return e.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return e.store[y](...arguments),e}});const h=xa(),g=()=>{const y=(v,w)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(w),i(v,w)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),h}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ll;const o=Le(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],c=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(g=>{g!=="cimode"&&l.indexOf(g)<0&&l.push(g)})};o?c(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>c(h)),this.options.preload&&this.options.preload.forEach(f=>c(f)),this.services.backendConnector.load(l,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(f)})}else i(null)}reloadResources(e,n,i){const o=xa();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=ll),this.services.backendConnector.reload(e,n,l=>{o.resolve(),i(l)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ky.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const o=xa();this.emit("languageChanging",e);const l=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},c=(h,g)=>{g?(l(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(...arguments)}),n&&n(h,function(){return i.t(...arguments)})},f=h=>{!e&&!h&&this.services.languageDetector&&(h=[]);const g=Le(h)?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||l(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,y=>{c(y,g)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(e),o}getFixedT(e,n,i){var o=this;const l=function(c,f){let h;if(typeof f!="object"){for(var g=arguments.length,y=new Array(g>2?g-2:0),v=2;v<g;v++)y[v-2]=arguments[v];h=o.options.overloadTranslationOptionHandler([c,f].concat(y))}else h={...f};h.lng=h.lng||l.lng,h.lngs=h.lngs||l.lngs,h.ns=h.ns||l.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||i||l.keyPrefix);const w=o.options.keySeparator||".";let x;return h.keyPrefix&&Array.isArray(c)?x=c.map(j=>`${h.keyPrefix}${w}${j}`):x=h.keyPrefix?`${h.keyPrefix}${w}${c}`:c,o.t(x,h)};return Le(e)?l.lng=e:l.lngs=e,l.ns=n,l.keyPrefix=i,l}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const c=(f,h)=>{const g=this.services.backendConnector.state[`${f}|${h}`];return g===-1||g===0||g===2};if(n.precheck){const f=n.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(i,e)&&(!o||c(l,e)))}loadNamespaces(e,n){const i=xa();return this.options.ns?(Le(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),n&&n(o)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=xa();Le(e)&&(e=[e]);const o=this.options.preload||[],l=e.filter(c=>o.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return l.length?(this.options.preload=o.concat(l),this.loadResources(c=>{i.resolve(),n&&n(c)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Am(Mm());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ma(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ll;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},l=new Ma(o);return(e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(f=>{l[f]=this[f]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i&&(l.store=new Tm(this.store.data,o),l.services.resourceStore=l.store),l.translator=new wl(l.services,o),l.translator.on("*",function(f){for(var h=arguments.length,g=new Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];l.emit(f,...g)}),l.init(o,n),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Jt=Ma.createInstance();Jt.createInstance=Ma.createInstance;Jt.createInstance;Jt.dir;Jt.init;Jt.loadResources;Jt.reloadResources;Jt.use;Jt.changeLanguage;Jt.getFixedT;Jt.t;Jt.exists;Jt.setDefaultNamespace;Jt.hasLoadedNamespace;Jt.loadNamespaces;Jt.loadLanguages;function tS(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const $m={};function fd(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&$m[e[0]]||(typeof e[0]=="string"&&($m[e[0]]=new Date),tS(...e))}const jy=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function zm(t,e,n){t.loadNamespaces(e,jy(t,n))}function Um(t,e,n,i){typeof n=="string"&&(n=[n]),n.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,jy(t,i))}function rS(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=e.languages[0],o=e.options?e.options.fallbackLng:!1,l=e.languages[e.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const c=(f,h)=>{const g=e.services.backendConnector.state[`${f}|${h}`];return g===-1||g===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!c(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(i,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||c(i,t)&&(!o||c(l,t)))}function nS(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(fd("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(o,l)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!l(o.isLanguageChangingTo,t))return!1}}):rS(t,e,n)}const sS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,iS={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},aS=t=>iS[t],oS=t=>t.replace(sS,aS);let hd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:oS};function lS(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hd={...hd,...t}}function uS(){return hd}let Cy;function cS(t){Cy=t}function dS(){return Cy}const fS={type:"3rdParty",init(t){lS(t.options.react),cS(t)}},hS=B.createContext();class pS{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const mS=(t,e)=>{const n=B.useRef();return B.useEffect(()=>{n.current=t},[t,e]),n.current};function xs(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:i,defaultNS:o}=B.useContext(hS)||{},l=n||i||dS();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new pS),!l){fd("You will need to pass in an i18next instance by using initReactI18next");const z=(L,Q)=>typeof Q=="string"?Q:Q&&typeof Q=="object"&&typeof Q.defaultValue=="string"?Q.defaultValue:Array.isArray(L)?L[L.length-1]:L,M=[z,{},!1];return M.t=z,M.i18n={},M.ready=!1,M}l.options.react&&l.options.react.wait!==void 0&&fd("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...uS(),...l.options.react,...e},{useSuspense:f,keyPrefix:h}=c;let g=o||l.options&&l.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],l.reportNamespaces.addUsedNamespaces&&l.reportNamespaces.addUsedNamespaces(g);const y=(l.isInitialized||l.initializedStoreOnce)&&g.every(z=>nS(z,l,c));function v(){return l.getFixedT(e.lng||null,c.nsMode==="fallback"?g:g[0],h)}const[w,x]=B.useState(v);let j=g.join();e.lng&&(j=`${e.lng}${j}`);const _=mS(j),S=B.useRef(!0);B.useEffect(()=>{const{bindI18n:z,bindI18nStore:M}=c;S.current=!0,!y&&!f&&(e.lng?Um(l,e.lng,g,()=>{S.current&&x(v)}):zm(l,g,()=>{S.current&&x(v)})),y&&_&&_!==j&&S.current&&x(v);function L(){S.current&&x(v)}return z&&l&&l.on(z,L),M&&l&&l.store.on(M,L),()=>{S.current=!1,z&&l&&z.split(" ").forEach(Q=>l.off(Q,L)),M&&l&&M.split(" ").forEach(Q=>l.store.off(Q,L))}},[l,j]);const I=B.useRef(!0);B.useEffect(()=>{S.current&&!I.current&&x(v),I.current=!1},[l,h]);const E=[w,l,y];if(E.t=w,E.i18n=l,E.ready=y,y||!y&&!f)return E;throw new Promise(z=>{e.lng?Um(l,e.lng,g,()=>z()):zm(l,g,()=>z())})}function gS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Da(t){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(t)}function yS(t,e){if(Da(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Da(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ey(t){var e=yS(t,"string");return Da(e)=="symbol"?e:e+""}function vS(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ey(i.key),i)}}function xS(t,e,n){return e&&vS(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Ny=[],wS=Ny.forEach,bS=Ny.slice;function SS(t){return wS.call(bS.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Vm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,_S=function(e,n,i){var o=i||{};o.path=o.path||"/";var l=encodeURIComponent(n),c="".concat(e,"=").concat(l);if(o.maxAge>0){var f=o.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");c+="; Max-Age=".concat(Math.floor(f))}if(o.domain){if(!Vm.test(o.domain))throw new TypeError("option domain is invalid");c+="; Domain=".concat(o.domain)}if(o.path){if(!Vm.test(o.path))throw new TypeError("option path is invalid");c+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.sameSite){var h=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(h){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c},Bm={create:function(e,n,i,o){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+i*60*1e3)),o&&(l.domain=o),document.cookie=_S(e,encodeURIComponent(n),l)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),o=0;o<i.length;o++){for(var l=i[o];l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(n)===0)return l.substring(n.length,l.length)}return null},remove:function(e){this.create(e,"",-1)}},kS={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document<"u"){var i=Bm.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document<"u"&&Bm.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},jS={name:"querystring",lookup:function(e){var n;if(typeof window<"u"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=i.substring(1),l=o.split("&"),c=0;c<l.length;c++){var f=l[c].indexOf("=");if(f>0){var h=l[c].substring(0,f);h===e.lookupQuerystring&&(n=l[c].substring(f+1))}}}return n}},wa=null,Hm=function(){if(wa!==null)return wa;try{wa=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{wa=!1}return wa},CS={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Hm()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Hm()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},ba=null,qm=function(){if(ba!==null)return ba;try{ba=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ba=!1}return ba},ES={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&qm()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&qm()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},NS={name:"navigator",lookup:function(e){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},PS={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},OS={name:"path",lookup:function(e){var n;if(typeof window<"u"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},RS={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}},Py=!1;try{document.cookie,Py=!0}catch{}var Oy=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Py||Oy.splice(1,1);function TS(){return{order:Oy,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var Ry=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gS(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return xS(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=SS(i,this.options||{},TS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(l){return l.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(kS),this.addDetector(jS),this.addDetector(CS),this.addDetector(ES),this.addDetector(NS),this.addDetector(PS),this.addDetector(OS),this.addDetector(RS)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var o=[];return n.forEach(function(l){if(i.detectors[l]){var c=i.detectors[l].lookup(i.options);c&&typeof c=="string"&&(c=[c]),c&&(o=o.concat(c))}}),o=o.map(function(l){return i.options.convertDetectedLanguage(l)}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var o=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(l){o.detectors[l]&&o.detectors[l].cacheUserLanguage(n,o.options)}))}}])})();Ry.type="languageDetector";function pd(t){"@babel/helpers - typeof";return pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pd(t)}function Ty(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":pd(XMLHttpRequest))==="object"}function LS(t){return!!t&&typeof t.then=="function"}function AS(t){return LS(t)?t:Promise.resolve(t)}function IS(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ul={exports:{}},cl={exports:{}},Wm;function FS(){return Wm||(Wm=1,(function(t,e){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Na<"u"&&Na,i=(function(){function l(){this.fetch=!1,this.DOMException=n.DOMException}return l.prototype=n,new l})();(function(l){(function(c){var f=typeof l<"u"&&l||typeof self<"u"&&self||typeof f<"u"&&f,h={searchParams:"URLSearchParams"in f,iterable:"Symbol"in f&&"iterator"in Symbol,blob:"FileReader"in f&&"Blob"in f&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in f,arrayBuffer:"ArrayBuffer"in f};function g(T){return T&&DataView.prototype.isPrototypeOf(T)}if(h.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(T){return T&&y.indexOf(Object.prototype.toString.call(T))>-1};function w(T){if(typeof T!="string"&&(T=String(T)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(T)||T==="")throw new TypeError('Invalid character in header field name: "'+T+'"');return T.toLowerCase()}function x(T){return typeof T!="string"&&(T=String(T)),T}function j(T){var P={next:function(){var K=T.shift();return{done:K===void 0,value:K}}};return h.iterable&&(P[Symbol.iterator]=function(){return P}),P}function _(T){this.map={},T instanceof _?T.forEach(function(P,K){this.append(K,P)},this):Array.isArray(T)?T.forEach(function(P){this.append(P[0],P[1])},this):T&&Object.getOwnPropertyNames(T).forEach(function(P){this.append(P,T[P])},this)}_.prototype.append=function(T,P){T=w(T),P=x(P);var K=this.map[T];this.map[T]=K?K+", "+P:P},_.prototype.delete=function(T){delete this.map[w(T)]},_.prototype.get=function(T){return T=w(T),this.has(T)?this.map[T]:null},_.prototype.has=function(T){return this.map.hasOwnProperty(w(T))},_.prototype.set=function(T,P){this.map[w(T)]=x(P)},_.prototype.forEach=function(T,P){for(var K in this.map)this.map.hasOwnProperty(K)&&T.call(P,this.map[K],K,this)},_.prototype.keys=function(){var T=[];return this.forEach(function(P,K){T.push(K)}),j(T)},_.prototype.values=function(){var T=[];return this.forEach(function(P){T.push(P)}),j(T)},_.prototype.entries=function(){var T=[];return this.forEach(function(P,K){T.push([K,P])}),j(T)},h.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function S(T){if(T.bodyUsed)return Promise.reject(new TypeError("Already read"));T.bodyUsed=!0}function I(T){return new Promise(function(P,K){T.onload=function(){P(T.result)},T.onerror=function(){K(T.error)}})}function E(T){var P=new FileReader,K=I(P);return P.readAsArrayBuffer(T),K}function z(T){var P=new FileReader,K=I(P);return P.readAsText(T),K}function M(T){for(var P=new Uint8Array(T),K=new Array(P.length),V=0;V<P.length;V++)K[V]=String.fromCharCode(P[V]);return K.join("")}function L(T){if(T.slice)return T.slice(0);var P=new Uint8Array(T.byteLength);return P.set(new Uint8Array(T)),P.buffer}function Q(){return this.bodyUsed=!1,this._initBody=function(T){this.bodyUsed=this.bodyUsed,this._bodyInit=T,T?typeof T=="string"?this._bodyText=T:h.blob&&Blob.prototype.isPrototypeOf(T)?this._bodyBlob=T:h.formData&&FormData.prototype.isPrototypeOf(T)?this._bodyFormData=T:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)?this._bodyText=T.toString():h.arrayBuffer&&h.blob&&g(T)?(this._bodyArrayBuffer=L(T.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(T)||v(T))?this._bodyArrayBuffer=L(T):this._bodyText=T=Object.prototype.toString.call(T):this._bodyText="",this.headers.get("content-type")||(typeof T=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(T)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var T=S(this);if(T)return T;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var T=S(this);return T||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(E)}),this.text=function(){var T=S(this);if(T)return T;if(this._bodyBlob)return z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(_e)}),this.json=function(){return this.text().then(JSON.parse)},this}var le=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ue(T){var P=T.toUpperCase();return le.indexOf(P)>-1?P:T}function pe(T,P){if(!(this instanceof pe))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var K=P.body;if(T instanceof pe){if(T.bodyUsed)throw new TypeError("Already read");this.url=T.url,this.credentials=T.credentials,P.headers||(this.headers=new _(T.headers)),this.method=T.method,this.mode=T.mode,this.signal=T.signal,!K&&T._bodyInit!=null&&(K=T._bodyInit,T.bodyUsed=!0)}else this.url=String(T);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new _(P.headers)),this.method=ue(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&K)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(K),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var V=/([?&])_=[^&]*/;if(V.test(this.url))this.url=this.url.replace(V,"$1_="+new Date().getTime());else{var H=/\?/;this.url+=(H.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}pe.prototype.clone=function(){return new pe(this,{body:this._bodyInit})};function _e(T){var P=new FormData;return T.trim().split("&").forEach(function(K){if(K){var V=K.split("="),H=V.shift().replace(/\+/g," "),W=V.join("=").replace(/\+/g," ");P.append(decodeURIComponent(H),decodeURIComponent(W))}}),P}function Oe(T){var P=new _,K=T.replace(/\r?\n[\t ]+/g," ");return K.split("\r").map(function(V){return V.indexOf(`
|
|
`)===0?V.substr(1,V.length):V}).forEach(function(V){var H=V.split(":"),W=H.shift().trim();if(W){var O=H.join(":").trim();P.append(W,O)}}),P}Q.call(pe.prototype);function Z(T,P){if(!(this instanceof Z))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new _(P.headers),this.url=P.url||"",this._initBody(T)}Q.call(Z.prototype),Z.prototype.clone=function(){return new Z(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},Z.error=function(){var T=new Z(null,{status:0,statusText:""});return T.type="error",T};var me=[301,302,303,307,308];Z.redirect=function(T,P){if(me.indexOf(P)===-1)throw new RangeError("Invalid status code");return new Z(null,{status:P,headers:{location:T}})},c.DOMException=f.DOMException;try{new c.DOMException}catch{c.DOMException=function(P,K){this.message=P,this.name=K;var V=Error(P);this.stack=V.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function he(T,P){return new Promise(function(K,V){var H=new pe(T,P);if(H.signal&&H.signal.aborted)return V(new c.DOMException("Aborted","AbortError"));var W=new XMLHttpRequest;function O(){W.abort()}W.onload=function(){var ae={status:W.status,statusText:W.statusText,headers:Oe(W.getAllResponseHeaders()||"")};ae.url="responseURL"in W?W.responseURL:ae.headers.get("X-Request-URL");var fe="response"in W?W.response:W.responseText;setTimeout(function(){K(new Z(fe,ae))},0)},W.onerror=function(){setTimeout(function(){V(new TypeError("Network request failed"))},0)},W.ontimeout=function(){setTimeout(function(){V(new TypeError("Network request failed"))},0)},W.onabort=function(){setTimeout(function(){V(new c.DOMException("Aborted","AbortError"))},0)};function q(ae){try{return ae===""&&f.location.href?f.location.href:ae}catch{return ae}}W.open(H.method,q(H.url),!0),H.credentials==="include"?W.withCredentials=!0:H.credentials==="omit"&&(W.withCredentials=!1),"responseType"in W&&(h.blob?W.responseType="blob":h.arrayBuffer&&H.headers.get("Content-Type")&&H.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(W.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof _)?Object.getOwnPropertyNames(P.headers).forEach(function(ae){W.setRequestHeader(ae,x(P.headers[ae]))}):H.headers.forEach(function(ae,fe){W.setRequestHeader(fe,ae)}),H.signal&&(H.signal.addEventListener("abort",O),W.onreadystatechange=function(){W.readyState===4&&H.signal.removeEventListener("abort",O)}),W.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return he.polyfill=!0,f.fetch||(f.fetch=he,f.Headers=_,f.Request=pe,f.Response=Z),c.Headers=_,c.Request=pe,c.Response=Z,c.fetch=he,c})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;e=o.fetch,e.default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e})(cl,cl.exports)),cl.exports}var Qm;function MS(){return Qm||(Qm=1,(function(t,e){var n=typeof fetch=="function"?fetch:void 0;if(typeof Na<"u"&&Na.fetch?n=Na.fetch:typeof window<"u"&&window.fetch&&(n=window.fetch),typeof IS<"u"&&typeof window>"u"){var i=n||FS();i.default&&(i=i.default),e.default=i,t.exports=e.default}})(ul,ul.exports)),ul.exports}var Ly=MS();const Ay=Il(Ly),Km=Qg({__proto__:null,default:Ay},[Ly]);function Zm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function Gm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zm(Object(n),!0).forEach(function(i){DS(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function DS(t,e,n){return(e=$S(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $S(t){var e=zS(t,"string");return $s(e)=="symbol"?e:e+""}function zS(t,e){if($s(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if($s(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}var hs=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?hs=global.fetch:typeof window<"u"&&window.fetch&&(hs=window.fetch);var $a;Ty()&&(typeof global<"u"&&global.XMLHttpRequest?$a=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&($a=window.XMLHttpRequest));var bl;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?bl=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(bl=window.ActiveXObject));!hs&&Km&&!$a&&!bl&&(hs=Ay||Km);typeof hs!="function"&&(hs=void 0);var md=function(e,n){if(n&&$s(n)==="object"){var i="";for(var o in n)i+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!i)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+i.slice(1)}return e},Jm=function(e,n,i,o){var l=function(h){if(!h.ok)return i(h.statusText||"Error",{status:h.status});h.text().then(function(g){i(null,{status:h.status,data:g})}).catch(i)};if(o){var c=o(e,n);if(c instanceof Promise){c.then(l).catch(i);return}}typeof fetch=="function"?fetch(e,n).then(l).catch(i):hs(e,n).then(l).catch(i)},Ym=!1,US=function(e,n,i,o){e.queryStringParams&&(n=md(n,e.queryStringParams));var l=Gm({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(l["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(l["Content-Type"]="application/json");var c=typeof e.requestOptions=="function"?e.requestOptions(i):e.requestOptions,f=Gm({method:i?"POST":"GET",body:i?e.stringify(i):void 0,headers:l},Ym?{}:c),h=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Jm(n,f,o,h)}catch(g){if(!c||Object.keys(c).length===0||!g.message||g.message.indexOf("not implemented")<0)return o(g);try{Object.keys(c).forEach(function(y){delete f[y]}),Jm(n,f,o,h),Ym=!0}catch(y){o(y)}}},VS=function(e,n,i,o){i&&$s(i)==="object"&&(i=md("",i).slice(1)),e.queryStringParams&&(n=md(n,e.queryStringParams));try{var l;$a?l=new $a:l=new bl("MSXML2.XMLHTTP.3.0"),l.open(i?"POST":"GET",n,1),e.crossDomain||l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.withCredentials=!!e.withCredentials,i&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.overrideMimeType&&l.overrideMimeType("application/json");var c=e.customHeaders;if(c=typeof c=="function"?c():c,c)for(var f in c)l.setRequestHeader(f,c[f]);l.onreadystatechange=function(){l.readyState>3&&o(l.status>=400?l.statusText:null,{status:l.status,data:l.responseText})},l.send(i)}catch(h){console&&console.log(h)}},BS=function(e,n,i,o){if(typeof i=="function"&&(o=i,i=void 0),o=o||function(){},hs&&n.indexOf("file:")!==0)return US(e,n,i,o);if(Ty()||typeof ActiveXObject=="function")return VS(e,n,i,o);o(new Error("No fetch and no xhr implementation found!"))};function _i(t){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}function Xm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function zc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xm(Object(n),!0).forEach(function(i){Iy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xm(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function HS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qS(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fy(i.key),i)}}function WS(t,e,n){return e&&qS(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Iy(t,e,n){return(e=Fy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fy(t){var e=QS(t,"string");return _i(e)=="symbol"?e:e+""}function QS(t,e){if(_i(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(_i(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var KS=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,i,o){return Iy({},i,o||"")},parseLoadPayload:function(n,i){},request:BS,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},My=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};HS(this,t),this.services=e,this.options=n,this.allOptions=i,this.type="backend",this.init(e,n,i)}return WS(t,[{key:"init",value:function(n){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=zc(zc(zc({},KS()),this.options||{}),o),this.allOptions=l,this.services&&this.options.reloadInterval){var c=setInterval(function(){return i.reload()},this.options.reloadInterval);_i(c)==="object"&&typeof c.unref=="function"&&c.unref()}}},{key:"readMulti",value:function(n,i,o){this._readAny(n,n,i,i,o)}},{key:"read",value:function(n,i,o){this._readAny([n],n,[i],i,o)}},{key:"_readAny",value:function(n,i,o,l,c){var f=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(n,o)),h=AS(h),h.then(function(g){if(!g)return c(null,{});var y=f.services.interpolator.interpolate(g,{lng:n.join("+"),ns:o.join("+")});f.loadUrl(y,c,i,l)})}},{key:"loadUrl",value:function(n,i,o,l){var c=this,f=typeof o=="string"?[o]:o,h=typeof l=="string"?[l]:l,g=this.options.parseLoadPayload(f,h);this.options.request(this.options,n,g,function(y,v){if(v&&(v.status>=500&&v.status<600||!v.status))return i("failed loading "+n+"; status code: "+v.status,!0);if(v&&v.status>=400&&v.status<500)return i("failed loading "+n+"; status code: "+v.status,!1);if(!v&&y&&y.message){var w=y.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(S){return w.indexOf(S)>-1});if(x)return i("failed loading "+n+": "+y.message,!0)}if(y)return i(y,!1);var j,_;try{typeof v.data=="string"?j=c.options.parse(v.data,o,l):j=v.data}catch{_="failed parsing "+n+" to json"}if(_)return i(_,!1);i(null,j)})}},{key:"create",value:function(n,i,o,l,c){var f=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var h=this.options.parsePayload(i,o,l),g=0,y=[],v=[];n.forEach(function(w){var x=f.options.addPath;typeof f.options.addPath=="function"&&(x=f.options.addPath(w,i));var j=f.services.interpolator.interpolate(x,{lng:w,ns:i});f.options.request(f.options,j,h,function(_,S){g+=1,y.push(_),v.push(S),g===n.length&&typeof c=="function"&&c(y,v)})})}}},{key:"reload",value:function(){var n=this,i=this.services,o=i.backendConnector,l=i.languageUtils,c=i.logger,f=o.language;if(!(f&&f.toLowerCase()==="cimode")){var h=[],g=function(v){var w=l.toResolveHierarchy(v);w.forEach(function(x){h.indexOf(x)<0&&h.push(x)})};g(f),this.allOptions.preload&&this.allOptions.preload.forEach(function(y){return g(y)}),h.forEach(function(y){n.allOptions.ns.forEach(function(v){o.read(y,v,"read",null,null,function(w,x){w&&c.warn("loading namespace ".concat(v," for language ").concat(y," failed"),w),!w&&x&&c.log("loaded namespace ".concat(v," for language ").concat(y),x),o.loaded("".concat(y,"|").concat(v),w,x)})})})}}}])})();My.type="backend";Jt.use(My).use(Ry).use(fS).init({fallbackLng:"en",ns:["common","pages"],defaultNS:"common",backend:{loadPath:"/static/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1},react:{useSuspense:!1}});var ZS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const GS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rt=(t,e)=>{const n=B.forwardRef(({color:i="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:c,children:f,...h},g)=>B.createElement("svg",{ref:g,...ZS,width:o,height:o,stroke:i,strokeWidth:c?Number(l)*24/Number(o):l,className:`lucide lucide-${GS(t)}`,...h},[...e.map(([y,v])=>B.createElement(y,v)),...(Array.isArray(f)?f:[f])||[]]));return n.displayName=`${t}`,n},JS=rt("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),zs=rt("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Ka=rt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Dy=rt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),YS=rt("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),$y=rt("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]),zy=rt("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),XS=rt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),e_=rt("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]),eg=rt("FileJson",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),t_=rt("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),r_=rt("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),n_=rt("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),s_=rt("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),i_=rt("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),a_=rt("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),ls=rt("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),o_=rt("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Uy=rt("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),l_=rt("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]),za=rt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),u_=rt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),c_=rt("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),d_=rt("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),gd=rt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),f_=rt("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),h_=rt("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function Qr(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(o){return"'"+o+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ps(t){return!!t&&!!t[ut]}function Pn(t){var e;return!!t&&((function(n){if(!n||typeof n!="object")return!1;var i=Object.getPrototypeOf(n);if(i===null)return!0;var o=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===S_})(t)||Array.isArray(t)||!!t[og]||!!(!((e=t.constructor)===null||e===void 0)&&e[og])||Hd(t)||qd(t))}function Us(t,e,n){n===void 0&&(n=!1),Ii(t)===0?(n?Object.keys:xi)(t).forEach((function(i){n&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function Ii(t){var e=t[ut];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Hd(t)?2:qd(t)?3:0}function vi(t,e){return Ii(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function p_(t,e){return Ii(t)===2?t.get(e):t[e]}function Vy(t,e,n){var i=Ii(t);i===2?t.set(e,n):i===3?t.add(n):t[e]=n}function By(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Hd(t){return w_&&t instanceof Map}function qd(t){return b_&&t instanceof Set}function Is(t){return t.o||t.t}function Wd(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qy(t);delete e[ut];for(var n=xi(e),i=0;i<n.length;i++){var o=n[i],l=e[o];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(e[o]={configurable:!0,writable:!0,enumerable:l.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function Qd(t,e){return e===void 0&&(e=!1),Kd(t)||ps(t)||!Pn(t)||(Ii(t)>1&&(t.set=t.add=t.clear=t.delete=m_),Object.freeze(t),e&&Us(t,(function(n,i){return Qd(i,!0)}),!0)),t}function m_(){Qr(2)}function Kd(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ln(t){var e=wd[t];return e||Qr(18,t),e}function g_(t,e){wd[t]||(wd[t]=e)}function yd(){return Ua}function Uc(t,e){e&&(ln("Patches"),t.u=[],t.s=[],t.v=e)}function Sl(t){vd(t),t.p.forEach(y_),t.p=null}function vd(t){t===Ua&&(Ua=t.l)}function tg(t){return Ua={p:[],l:Ua,h:t,m:!0,_:0}}function y_(t){var e=t[ut];e.i===0||e.i===1?e.j():e.g=!0}function Vc(t,e){e._=e.p.length;var n=e.p[0],i=t!==void 0&&t!==n;return e.h.O||ln("ES5").S(e,t,i),i?(n[ut].P&&(Sl(e),Qr(4)),Pn(t)&&(t=_l(e,t),e.l||kl(e,t)),e.u&&ln("Patches").M(n[ut].t,t,e.u,e.s)):t=_l(e,n,[]),Sl(e),e.u&&e.v(e.u,e.s),t!==Hy?t:void 0}function _l(t,e,n){if(Kd(e))return e;var i=e[ut];if(!i)return Us(e,(function(f,h){return rg(t,i,e,f,h,n)}),!0),e;if(i.A!==t)return e;if(!i.P)return kl(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var o=i.i===4||i.i===5?i.o=Wd(i.k):i.o,l=o,c=!1;i.i===3&&(l=new Set(o),o.clear(),c=!0),Us(l,(function(f,h){return rg(t,i,o,f,h,n,c)})),kl(t,o,!1),n&&t.u&&ln("Patches").N(i,n,t.u,t.s)}return i.o}function rg(t,e,n,i,o,l,c){if(ps(o)){var f=_l(t,o,l&&e&&e.i!==3&&!vi(e.R,i)?l.concat(i):void 0);if(Vy(n,i,f),!ps(f))return;t.m=!1}else c&&n.add(o);if(Pn(o)&&!Kd(o)){if(!t.h.D&&t._<1)return;_l(t,o),e&&e.A.l||kl(t,o)}}function kl(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&Qd(e,n)}function Bc(t,e){var n=t[ut];return(n?Is(n):t)[e]}function ng(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var i=Object.getOwnPropertyDescriptor(n,e);if(i)return i;n=Object.getPrototypeOf(n)}}function ss(t){t.P||(t.P=!0,t.l&&ss(t.l))}function Hc(t){t.o||(t.o=Wd(t.t))}function xd(t,e,n){var i=Hd(e)?ln("MapSet").F(e,n):qd(e)?ln("MapSet").T(e,n):t.O?(function(o,l){var c=Array.isArray(o),f={i:c?1:0,A:l?l.A:yd(),P:!1,I:!1,R:{},l,t:o,k:null,o:null,j:null,C:!1},h=f,g=Va;c&&(h=[f],g=ja);var y=Proxy.revocable(h,g),v=y.revoke,w=y.proxy;return f.k=w,f.j=v,w})(e,n):ln("ES5").J(e,n);return(n?n.A:yd()).p.push(i),i}function v_(t){return ps(t)||Qr(22,t),(function e(n){if(!Pn(n))return n;var i,o=n[ut],l=Ii(n);if(o){if(!o.P&&(o.i<4||!ln("ES5").K(o)))return o.t;o.I=!0,i=sg(n,l),o.I=!1}else i=sg(n,l);return Us(i,(function(c,f){o&&p_(o.t,c)===f||Vy(i,c,e(f))})),l===3?new Set(i):i})(t)}function sg(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Wd(t)}function x_(){function t(l,c){var f=o[l];return f?f.enumerable=c:o[l]=f={configurable:!0,enumerable:c,get:function(){var h=this[ut];return Va.get(h,l)},set:function(h){var g=this[ut];Va.set(g,l,h)}},f}function e(l){for(var c=l.length-1;c>=0;c--){var f=l[c][ut];if(!f.P)switch(f.i){case 5:i(f)&&ss(f);break;case 4:n(f)&&ss(f)}}}function n(l){for(var c=l.t,f=l.k,h=xi(f),g=h.length-1;g>=0;g--){var y=h[g];if(y!==ut){var v=c[y];if(v===void 0&&!vi(c,y))return!0;var w=f[y],x=w&&w[ut];if(x?x.t!==v:!By(w,v))return!0}}var j=!!c[ut];return h.length!==xi(c).length+(j?0:1)}function i(l){var c=l.k;if(c.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var h=0;h<c.length;h++)if(!c.hasOwnProperty(h))return!0;return!1}var o={};g_("ES5",{J:function(l,c){var f=Array.isArray(l),h=(function(y,v){if(y){for(var w=Array(v.length),x=0;x<v.length;x++)Object.defineProperty(w,""+x,t(x,!0));return w}var j=qy(v);delete j[ut];for(var _=xi(j),S=0;S<_.length;S++){var I=_[S];j[I]=t(I,y||!!j[I].enumerable)}return Object.create(Object.getPrototypeOf(v),j)})(f,l),g={i:f?5:4,A:c?c.A:yd(),P:!1,I:!1,R:{},l:c,t:l,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,ut,{value:g,writable:!0}),h},S:function(l,c,f){f?ps(c)&&c[ut].A===l&&e(l.p):(l.u&&(function h(g){if(g&&typeof g=="object"){var y=g[ut];if(y){var v=y.t,w=y.k,x=y.R,j=y.i;if(j===4)Us(w,(function(z){z!==ut&&(v[z]!==void 0||vi(v,z)?x[z]||h(w[z]):(x[z]=!0,ss(y)))})),Us(v,(function(z){w[z]!==void 0||vi(w,z)||(x[z]=!1,ss(y))}));else if(j===5){if(i(y)&&(ss(y),x.length=!0),w.length<v.length)for(var _=w.length;_<v.length;_++)x[_]=!1;else for(var S=v.length;S<w.length;S++)x[S]=!0;for(var I=Math.min(w.length,v.length),E=0;E<I;E++)w.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&h(w[E])}}}})(l.p[0]),e(l.p))},K:function(l){return l.i===4?n(l):i(l)}})}var ig,Ua,Zd=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",w_=typeof Map<"u",b_=typeof Set<"u",ag=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Hy=Zd?Symbol.for("immer-nothing"):((ig={})["immer-nothing"]=!0,ig),og=Zd?Symbol.for("immer-draftable"):"__$immer_draftable",ut=Zd?Symbol.for("immer-state"):"__$immer_state",S_=""+Object.prototype.constructor,xi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qy=Object.getOwnPropertyDescriptors||function(t){var e={};return xi(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},wd={},Va={get:function(t,e){if(e===ut)return t;var n=Is(t);if(!vi(n,e))return(function(o,l,c){var f,h=ng(l,c);return h?"value"in h?h.value:(f=h.get)===null||f===void 0?void 0:f.call(o.k):void 0})(t,n,e);var i=n[e];return t.I||!Pn(i)?i:i===Bc(t.t,e)?(Hc(t),t.o[e]=xd(t.A.h,i,t)):i},has:function(t,e){return e in Is(t)},ownKeys:function(t){return Reflect.ownKeys(Is(t))},set:function(t,e,n){var i=ng(Is(t),e);if(i?.set)return i.set.call(t.k,n),!0;if(!t.P){var o=Bc(Is(t),e),l=o?.[ut];if(l&&l.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(By(n,o)&&(n!==void 0||vi(t.t,e)))return!0;Hc(t),ss(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return Bc(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Hc(t),ss(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Is(t),i=Reflect.getOwnPropertyDescriptor(n,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:n[e]}},defineProperty:function(){Qr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Qr(12)}},ja={};Us(Va,(function(t,e){ja[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ja.deleteProperty=function(t,e){return ja.set.call(this,t,e,void 0)},ja.set=function(t,e,n){return Va.set.call(this,t[0],e,n,t[0])};var __=(function(){function t(n){var i=this;this.O=ag,this.D=!0,this.produce=function(o,l,c){if(typeof o=="function"&&typeof l!="function"){var f=l;l=o;var h=i;return function(_){var S=this;_===void 0&&(_=f);for(var I=arguments.length,E=Array(I>1?I-1:0),z=1;z<I;z++)E[z-1]=arguments[z];return h.produce(_,(function(M){var L;return(L=l).call.apply(L,[S,M].concat(E))}))}}var g;if(typeof l!="function"&&Qr(6),c!==void 0&&typeof c!="function"&&Qr(7),Pn(o)){var y=tg(i),v=xd(i,o,void 0),w=!0;try{g=l(v),w=!1}finally{w?Sl(y):vd(y)}return typeof Promise<"u"&&g instanceof Promise?g.then((function(_){return Uc(y,c),Vc(_,y)}),(function(_){throw Sl(y),_})):(Uc(y,c),Vc(g,y))}if(!o||typeof o!="object"){if((g=l(o))===void 0&&(g=o),g===Hy&&(g=void 0),i.D&&Qd(g,!0),c){var x=[],j=[];ln("Patches").M(o,g,x,j),c(x,j)}return g}Qr(21,o)},this.produceWithPatches=function(o,l){if(typeof o=="function")return function(g){for(var y=arguments.length,v=Array(y>1?y-1:0),w=1;w<y;w++)v[w-1]=arguments[w];return i.produceWithPatches(g,(function(x){return o.apply(void 0,[x].concat(v))}))};var c,f,h=i.produce(o,l,(function(g,y){c=g,f=y}));return typeof Promise<"u"&&h instanceof Promise?h.then((function(g){return[g,c,f]})):[h,c,f]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var e=t.prototype;return e.createDraft=function(n){Pn(n)||Qr(8),ps(n)&&(n=v_(n));var i=tg(this),o=xd(this,n,void 0);return o[ut].C=!0,vd(i),o},e.finishDraft=function(n,i){var o=n&&n[ut],l=o.A;return Uc(l,i),Vc(void 0,l)},e.setAutoFreeze=function(n){this.D=n},e.setUseProxies=function(n){n&&!ag&&Qr(20),this.O=n},e.applyPatches=function(n,i){var o;for(o=i.length-1;o>=0;o--){var l=i[o];if(l.path.length===0&&l.op==="replace"){n=l.value;break}}o>-1&&(i=i.slice(o+1));var c=ln("Patches").$;return ps(n)?c(n,i):this.produce(n,(function(f){return c(f,i)}))},t})(),_r=new __,Wy=_r.produce;_r.produceWithPatches.bind(_r);_r.setAutoFreeze.bind(_r);_r.setUseProxies.bind(_r);_r.applyPatches.bind(_r);_r.createDraft.bind(_r);_r.finishDraft.bind(_r);function k_(t,e,n){return(e=Ey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function ug(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lg(Object(n),!0).forEach(function(i){k_(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lg(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function qt(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var cg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),qc=function(){return Math.random().toString(36).substring(7).split("").join(".")},jl={INIT:"@@redux/INIT"+qc(),REPLACE:"@@redux/REPLACE"+qc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qc()}};function j_(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Qy(t,e,n){var i;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qt(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qt(1));return n(Qy)(t,e)}if(typeof t!="function")throw new Error(qt(2));var o=t,l=e,c=[],f=c,h=!1;function g(){f===c&&(f=c.slice())}function y(){if(h)throw new Error(qt(3));return l}function v(_){if(typeof _!="function")throw new Error(qt(4));if(h)throw new Error(qt(5));var S=!0;return g(),f.push(_),function(){if(S){if(h)throw new Error(qt(6));S=!1,g();var E=f.indexOf(_);f.splice(E,1),c=null}}}function w(_){if(!j_(_))throw new Error(qt(7));if(typeof _.type>"u")throw new Error(qt(8));if(h)throw new Error(qt(9));try{h=!0,l=o(l,_)}finally{h=!1}for(var S=c=f,I=0;I<S.length;I++){var E=S[I];E()}return _}function x(_){if(typeof _!="function")throw new Error(qt(10));o=_,w({type:jl.REPLACE})}function j(){var _,S=v;return _={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(qt(11));function z(){E.next&&E.next(y())}z();var M=S(z);return{unsubscribe:M}}},_[cg]=function(){return this},_}return w({type:jl.INIT}),i={dispatch:w,subscribe:v,getState:y,replaceReducer:x},i[cg]=j,i}function C_(t){Object.keys(t).forEach(function(e){var n=t[e],i=n(void 0,{type:jl.INIT});if(typeof i>"u")throw new Error(qt(12));if(typeof n(void 0,{type:jl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qt(13))})}function E_(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var o=e[i];typeof t[o]=="function"&&(n[o]=t[o])}var l=Object.keys(n),c;try{C_(n)}catch(f){c=f}return function(h,g){if(h===void 0&&(h={}),c)throw c;for(var y=!1,v={},w=0;w<l.length;w++){var x=l[w],j=n[x],_=h[x],S=j(_,g);if(typeof S>"u")throw g&&g.type,new Error(qt(14));v[x]=S,y=y||S!==_}return y=y||l.length!==Object.keys(h).length,y?v:h}}function Cl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,o){return function(){return i(o.apply(void 0,arguments))}})}function N_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return function(){var o=i.apply(void 0,arguments),l=function(){throw new Error(qt(15))},c={getState:o.getState,dispatch:function(){return l.apply(void 0,arguments)}},f=e.map(function(h){return h(c)});return l=Cl.apply(void 0,f)(o.dispatch),ug(ug({},o),{},{dispatch:l})}}}function Ky(t){var e=function(i){var o=i.dispatch,l=i.getState;return function(c){return function(f){return typeof f=="function"?f(o,l,t):c(f)}}};return e}var bd=Ky();bd.withExtraArgument=Ky;var Zy=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(i[l]=o[l])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})(),P_=function(t,e){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},i,o,l,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(g){return function(y){return h([g,y])}}function h(g){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(l=g[0]&2?o.return:g[0]?o.throw||((l=o.return)&&l.call(o),0):o.next)&&!(l=l.call(o,g[1])).done)return l;switch(o=0,l&&(g=[g[0]&2,l.value]),g[0]){case 0:case 1:l=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,o=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(l=n.trys,!(l=l.length>0&&l[l.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!l||g[1]>l[0]&&g[1]<l[3])){n.label=g[1];break}if(g[0]===6&&n.label<l[1]){n.label=l[1],l=g;break}if(l&&n.label<l[2]){n.label=l[2],n.ops.push(g);break}l[2]&&n.ops.pop(),n.trys.pop();continue}g=e.call(t,n)}catch(y){g=[6,y],o=0}finally{i=l=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},ki=function(t,e){for(var n=0,i=e.length,o=t.length;n<i;n++,o++)t[o]=e[n];return t},O_=Object.defineProperty,R_=Object.defineProperties,T_=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,L_=Object.prototype.hasOwnProperty,A_=Object.prototype.propertyIsEnumerable,fg=function(t,e,n){return e in t?O_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},us=function(t,e){for(var n in e||(e={}))L_.call(e,n)&&fg(t,n,e[n]);if(dg)for(var i=0,o=dg(e);i<o.length;i++){var n=o[i];A_.call(e,n)&&fg(t,n,e[n])}return t},Wc=function(t,e){return R_(t,T_(e))},I_=function(t,e,n){return new Promise(function(i,o){var l=function(h){try{f(n.next(h))}catch(g){o(g)}},c=function(h){try{f(n.throw(h))}catch(g){o(g)}},f=function(h){return h.done?i(h.value):Promise.resolve(h.value).then(l,c)};f((n=n.apply(t,e)).next())})},F_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Cl:Cl.apply(null,arguments)};function M_(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var n=e;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return e===n}function cs(t,e){function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var l=e.apply(void 0,i);if(!l)throw new Error("prepareAction did not return an object");return us(us({type:t,payload:l.payload},"meta"in l&&{meta:l.meta}),"error"in l&&{error:l.error})}return{type:t,payload:i[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(i){return i.type===t},n}var D_=(function(t){Zy(e,t);function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return t.prototype.concat.apply(this,n)},e.prototype.prepend=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return n.length===1&&Array.isArray(n[0])?new(e.bind.apply(e,ki([void 0],n[0].concat(this)))):new(e.bind.apply(e,ki([void 0],n.concat(this))))},e})(Array),$_=(function(t){Zy(e,t);function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=t.apply(this,n)||this;return Object.setPrototypeOf(o,e.prototype),o}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return t.prototype.concat.apply(this,n)},e.prototype.prepend=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return n.length===1&&Array.isArray(n[0])?new(e.bind.apply(e,ki([void 0],n[0].concat(this)))):new(e.bind.apply(e,ki([void 0],n.concat(this))))},e})(Array);function Sd(t){return Pn(t)?Wy(t,function(){}):t}function z_(t){return typeof t=="boolean"}function U_(){return function(e){return V_(e)}}function V_(t){t===void 0&&(t={});var e=t.thunk,n=e===void 0?!0:e;t.immutableCheck,t.serializableCheck,t.actionCreatorCheck;var i=new D_;return n&&(z_(n)?i.push(bd):i.push(bd.withExtraArgument(n.extraArgument))),i}function B_(t){var e=U_(),n=t||{},i=n.reducer,o=i===void 0?void 0:i,l=n.middleware,c=l===void 0?e():l,f=n.devTools,h=f===void 0?!0:f,g=n.preloadedState,y=g===void 0?void 0:g,v=n.enhancers,w=v===void 0?void 0:v,x;if(typeof o=="function")x=o;else if(M_(o))x=E_(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var j=c;typeof j=="function"&&(j=j(e));var _=N_.apply(void 0,j),S=Cl;h&&(S=F_(us({trace:!1},typeof h=="object"&&h)));var I=new $_(_),E=I;Array.isArray(w)?E=ki([_],w):typeof w=="function"&&(E=w(I));var z=S.apply(void 0,E);return Qy(x,y,z)}function Gy(t){var e={},n=[],i,o={addCase:function(l,c){var f=typeof l=="string"?l:l.type;if(!f)throw new Error("`builder.addCase` cannot be called with an empty action type");if(f in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[f]=c,o},addMatcher:function(l,c){return n.push({matcher:l,reducer:c}),o},addDefaultCase:function(l){return i=l,o}};return t(o),[e,n,i]}function H_(t){return typeof t=="function"}function q_(t,e,n,i){n===void 0&&(n=[]);var o=typeof e=="function"?Gy(e):[e,n,i],l=o[0],c=o[1],f=o[2],h;if(H_(t))h=function(){return Sd(t())};else{var g=Sd(t);h=function(){return g}}function y(v,w){v===void 0&&(v=h());var x=ki([l[w.type]],c.filter(function(j){var _=j.matcher;return _(w)}).map(function(j){var _=j.reducer;return _}));return x.filter(function(j){return!!j}).length===0&&(x=[f]),x.reduce(function(j,_){if(_)if(ps(j)){var S=j,I=_(S,w);return I===void 0?j:I}else{if(Pn(j))return Wy(j,function(E){return _(E,w)});var I=_(j,w);if(I===void 0){if(j===null)return j;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return j},v)}return y.getInitialState=h,y}function W_(t,e){return t+"/"+e}function Gd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n=typeof t.initialState=="function"?t.initialState:Sd(t.initialState),i=t.reducers||{},o=Object.keys(i),l={},c={},f={};o.forEach(function(y){var v=i[y],w=W_(e,y),x,j;"reducer"in v?(x=v.reducer,j=v.prepare):x=v,l[y]=x,c[w]=x,f[y]=j?cs(w,j):cs(w)});function h(){var y=typeof t.extraReducers=="function"?Gy(t.extraReducers):[t.extraReducers],v=y[0],w=v===void 0?{}:v,x=y[1],j=x===void 0?[]:x,_=y[2],S=_===void 0?void 0:_,I=us(us({},w),c);return q_(n,function(E){for(var z in I)E.addCase(z,I[z]);for(var M=0,L=j;M<L.length;M++){var Q=L[M];E.addMatcher(Q.matcher,Q.reducer)}S&&E.addDefaultCase(S)})}var g;return{name:e,reducer:function(y,v){return g||(g=h()),g(y,v)},actions:f,caseReducers:l,getInitialState:function(){return g||(g=h()),g.getInitialState()}}}var Q_="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",K_=function(t){t===void 0&&(t=21);for(var e="",n=t;n--;)e+=Q_[Math.random()*64|0];return e},Z_=["name","message","stack","code"],Qc=(function(){function t(e,n){this.payload=e,this.meta=n}return t})(),hg=(function(){function t(e,n){this.payload=e,this.meta=n}return t})(),G_=function(t){if(typeof t=="object"&&t!==null){for(var e={},n=0,i=Z_;n<i.length;n++){var o=i[n];typeof t[o]=="string"&&(e[o]=t[o])}return e}return{message:String(t)}};(function(){function t(e,n,i){var o=cs(e+"/fulfilled",function(g,y,v,w){return{payload:g,meta:Wc(us({},w||{}),{arg:v,requestId:y,requestStatus:"fulfilled"})}}),l=cs(e+"/pending",function(g,y,v){return{payload:void 0,meta:Wc(us({},v||{}),{arg:y,requestId:g,requestStatus:"pending"})}}),c=cs(e+"/rejected",function(g,y,v,w,x){return{payload:w,error:(i&&i.serializeError||G_)(g||"Rejected"),meta:Wc(us({},x||{}),{arg:v,requestId:y,rejectedWithValue:!!w,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),f=typeof AbortController<"u"?AbortController:(function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g})();function h(g){return function(y,v,w){var x=i?.idGenerator?i.idGenerator(g):K_(),j=new f,_;function S(E){_=E,j.abort()}var I=(function(){return I_(this,null,function(){var E,z,M,L,Q,le,ue;return P_(this,function(pe){switch(pe.label){case 0:return pe.trys.push([0,4,,5]),L=(E=i?.condition)==null?void 0:E.call(i,g,{getState:v,extra:w}),Y_(L)?[4,L]:[3,2];case 1:L=pe.sent(),pe.label=2;case 2:if(L===!1||j.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return Q=new Promise(function(_e,Oe){return j.signal.addEventListener("abort",function(){return Oe({name:"AbortError",message:_||"Aborted"})})}),y(l(x,g,(z=i?.getPendingMeta)==null?void 0:z.call(i,{requestId:x,arg:g},{getState:v,extra:w}))),[4,Promise.race([Q,Promise.resolve(n(g,{dispatch:y,getState:v,extra:w,requestId:x,signal:j.signal,abort:S,rejectWithValue:function(_e,Oe){return new Qc(_e,Oe)},fulfillWithValue:function(_e,Oe){return new hg(_e,Oe)}})).then(function(_e){if(_e instanceof Qc)throw _e;return _e instanceof hg?o(_e.payload,x,g,_e.meta):o(_e,x,g)})])];case 3:return M=pe.sent(),[3,5];case 4:return le=pe.sent(),M=le instanceof Qc?c(null,x,g,le.payload,le.meta):c(le,x,g),[3,5];case 5:return ue=i&&!i.dispatchConditionRejection&&c.match(M)&&M.meta.condition,ue||y(M),[2,M]}})})})();return Object.assign(I,{abort:S,requestId:x,arg:g,unwrap:function(){return I.then(J_)}})}}return Object.assign(h,{pending:l,rejected:c,fulfilled:o,typePrefix:e})}return t.withTypes=function(){return t},t})();function J_(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Y_(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Jd="listenerMiddleware";cs(Jd+"/add");cs(Jd+"/removeAll");cs(Jd+"/remove");var pg;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);x_();const X_={sidebarOpen:!0,currentStep:0,selectedProjectId:null,isLoading:!1,notification:{type:null,message:""}},Jy=Gd({name:"ui",initialState:X_,reducers:{toggleSidebar:t=>{t.sidebarOpen=!t.sidebarOpen},setCurrentStep:(t,e)=>{t.currentStep=e.payload},setSelectedProject:(t,e)=>{t.selectedProjectId=e.payload},setLoading:(t,e)=>{t.isLoading=e.payload},showNotification:(t,e)=>{t.notification=e.payload},clearNotification:t=>{t.notification={type:null,message:""}}}}),{toggleSidebar:ek}=Jy.actions,tk=Jy.reducer;function Yy(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Yy(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Xy(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Yy(t))&&(i&&(i+=" "),i+=e);return i}const Yd="-",rk=t=>{const e=sk(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:c=>{const f=c.split(Yd);return f[0]===""&&f.length!==1&&f.shift(),ev(f,e)||nk(c)},getConflictingClassGroupIds:(c,f)=>{const h=n[c]||[];return f&&i[c]?[...h,...i[c]]:h}}},ev=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),o=i?ev(t.slice(1),i):void 0;if(o)return o;if(e.validators.length===0)return;const l=t.join(Yd);return e.validators.find(({validator:c})=>c(l))?.classGroupId},mg=/^\[(.+)\]$/,nk=t=>{if(mg.test(t)){const e=mg.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},sk=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return ak(Object.entries(t.classGroups),n).forEach(([l,c])=>{_d(c,i,l,e)}),i},_d=(t,e,n,i)=>{t.forEach(o=>{if(typeof o=="string"){const l=o===""?e:gg(e,o);l.classGroupId=n;return}if(typeof o=="function"){if(ik(o)){_d(o(i),e,n,i);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,c])=>{_d(c,gg(e,l),n,i)})})},gg=(t,e)=>{let n=t;return e.split(Yd).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},ik=t=>t.isThemeGetter,ak=(t,e)=>e?t.map(([n,i])=>{const o=i.map(l=>typeof l=="string"?e+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,f])=>[e+c,f])):l);return[n,o]}):t,ok=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const o=(l,c)=>{n.set(l,c),e++,e>t&&(e=0,i=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=i.get(l))!==void 0)return o(l,c),c},set(l,c){n.has(l)?n.set(l,c):o(l,c)}}},tv="!",lk=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,o=e[0],l=e.length,c=f=>{const h=[];let g=0,y=0,v;for(let S=0;S<f.length;S++){let I=f[S];if(g===0){if(I===o&&(i||f.slice(S,S+l)===e)){h.push(f.slice(y,S)),y=S+l;continue}if(I==="/"){v=S;continue}}I==="["?g++:I==="]"&&g--}const w=h.length===0?f:f.substring(y),x=w.startsWith(tv),j=x?w.substring(1):w,_=v&&v>y?v-y:void 0;return{modifiers:h,hasImportantModifier:x,baseClassName:j,maybePostfixModifierPosition:_}};return n?f=>n({className:f,parseClassName:c}):c},uk=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},ck=t=>({cache:ok(t.cacheSize),parseClassName:lk(t),...rk(t)}),dk=/\s+/,fk=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o}=e,l=[],c=t.trim().split(dk);let f="";for(let h=c.length-1;h>=0;h-=1){const g=c[h],{modifiers:y,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:x}=n(g);let j=!!x,_=i(j?w.substring(0,x):w);if(!_){if(!j){f=g+(f.length>0?" "+f:f);continue}if(_=i(w),!_){f=g+(f.length>0?" "+f:f);continue}j=!1}const S=uk(y).join(":"),I=v?S+tv:S,E=I+_;if(l.includes(E))continue;l.push(E);const z=o(_,j);for(let M=0;M<z.length;++M){const L=z[M];l.push(I+L)}f=g+(f.length>0?" "+f:f)}return f};function hk(){let t=0,e,n,i="";for(;t<arguments.length;)(e=arguments[t++])&&(n=rv(e))&&(i&&(i+=" "),i+=n);return i}const rv=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=rv(t[i]))&&(n&&(n+=" "),n+=e);return n};function pk(t,...e){let n,i,o,l=c;function c(h){const g=e.reduce((y,v)=>v(y),t());return n=ck(g),i=n.cache.get,o=n.cache.set,l=f,f(h)}function f(h){const g=i(h);if(g)return g;const y=fk(h,n);return o(h,y),y}return function(){return l(hk.apply(null,arguments))}}const at=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},nv=/^\[(?:([a-z-]+):)?(.+)\]$/i,mk=/^\d+\/\d+$/,gk=new Set(["px","full","screen"]),yk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jn=t=>wi(t)||gk.has(t)||mk.test(t),ts=t=>Fi(t,"length",Pk),wi=t=>!!t&&!Number.isNaN(Number(t)),Kc=t=>Fi(t,"number",wi),Sa=t=>!!t&&Number.isInteger(Number(t)),Sk=t=>t.endsWith("%")&&wi(t.slice(0,-1)),Me=t=>nv.test(t),rs=t=>yk.test(t),_k=new Set(["length","size","percentage"]),kk=t=>Fi(t,_k,sv),jk=t=>Fi(t,"position",sv),Ck=new Set(["image","url"]),Ek=t=>Fi(t,Ck,Rk),Nk=t=>Fi(t,"",Ok),_a=()=>!0,Fi=(t,e,n)=>{const i=nv.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},Pk=t=>vk.test(t)&&!xk.test(t),sv=()=>!1,Ok=t=>wk.test(t),Rk=t=>bk.test(t),Tk=()=>{const t=at("colors"),e=at("spacing"),n=at("blur"),i=at("brightness"),o=at("borderColor"),l=at("borderRadius"),c=at("borderSpacing"),f=at("borderWidth"),h=at("contrast"),g=at("grayscale"),y=at("hueRotate"),v=at("invert"),w=at("gap"),x=at("gradientColorStops"),j=at("gradientColorStopPositions"),_=at("inset"),S=at("margin"),I=at("opacity"),E=at("padding"),z=at("saturate"),M=at("scale"),L=at("sepia"),Q=at("skew"),le=at("space"),ue=at("translate"),pe=()=>["auto","contain","none"],_e=()=>["auto","hidden","clip","visible","scroll"],Oe=()=>["auto",Me,e],Z=()=>[Me,e],me=()=>["",jn,ts],he=()=>["auto",wi,Me],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],P=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",Me],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[wi,Me];return{cacheSize:500,separator:":",theme:{colors:[_a],spacing:[jn,ts],blur:["none","",rs,Me],brightness:O(),borderColor:[t],borderRadius:["none","","full",rs,Me],borderSpacing:Z(),borderWidth:me(),contrast:O(),grayscale:H(),hueRotate:O(),invert:H(),gap:Z(),gradientColorStops:[t],gradientColorStopPositions:[Sk,ts],inset:Oe(),margin:Oe(),opacity:O(),padding:Z(),saturate:O(),scale:O(),sepia:H(),skew:O(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",Me]}],container:["container"],columns:[{columns:[rs]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Me]}],overflow:[{overflow:_e()}],"overflow-x":[{"overflow-x":_e()}],"overflow-y":[{"overflow-y":_e()}],overscroll:[{overscroll:pe()}],"overscroll-x":[{"overscroll-x":pe()}],"overscroll-y":[{"overscroll-y":pe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sa,Me]}],basis:[{basis:Oe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Me]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Sa,Me]}],"grid-cols":[{"grid-cols":[_a]}],"col-start-end":[{col:["auto",{span:["full",Sa,Me]},Me]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[_a]}],"row-start-end":[{row:["auto",{span:[Sa,Me]},Me]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Me]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Me,e]}],"min-w":[{"min-w":[Me,e,"min","max","fit"]}],"max-w":[{"max-w":[Me,e,"none","full","min","max","fit","prose",{screen:[rs]},rs]}],h:[{h:[Me,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Me,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Me,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Me,e,"auto","min","max","fit"]}],"font-size":[{text:["base",rs,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kc]}],"font-family":[{font:[_a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Me]}],"line-clamp":[{"line-clamp":["none",wi,Kc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jn,Me]}],"list-image":[{"list-image":["none",Me]}],"list-style-type":[{list:["none","disc","decimal",Me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...P(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jn,ts]}],"underline-offset":[{"underline-offset":["auto",jn,Me]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),jk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ek]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[...P(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:P()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...P()]}],"outline-offset":[{"outline-offset":[jn,Me]}],"outline-w":[{outline:[jn,ts]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[jn,ts]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",rs,Nk]}],"shadow-color":[{shadow:[_a]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",rs,Me]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[v]}],saturate:[{saturate:[z]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[z]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Me]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",Me]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",Me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Sa,Me]}],"translate-x":[{"translate-x":[ue]}],"translate-y":[{"translate-y":[ue]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Me]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[jn,ts,Kc]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Lk=pk(Tk);function xt(...t){return Lk(Xy(t))}const yg=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,vg=Xy,iv=(t,e)=>n=>{var i;if(e?.variants==null)return vg(t,n?.class,n?.className);const{variants:o,defaultVariants:l}=e,c=Object.keys(o).map(g=>{const y=n?.[g],v=l?.[g];if(y===null)return null;const w=yg(y)||yg(v);return o[g][w]}),f=n&&Object.entries(n).reduce((g,y)=>{let[v,w]=y;return w===void 0||(g[v]=w),g},{}),h=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((g,y)=>{let{class:v,className:w,...x}=y;return Object.entries(x).every(j=>{let[_,S]=j;return Array.isArray(S)?S.includes({...l,...f}[_]):{...l,...f}[_]===S})?[...g,v,w]:g},[]);return vg(t,c,h,n?.class,n?.className)},Ak=iv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ye=B.forwardRef(({className:t,variant:e,size:n,...i},o)=>m.jsx("button",{ref:o,className:xt(Ak({variant:e,size:n}),t),...i}));Ye.displayName="Button";var We;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const l={};for(const c of o)l[c]=c;return l},t.getValidEnumValues=o=>{const l=t.objectKeys(o).filter(f=>typeof o[o[f]]!="number"),c={};for(const f of l)c[f]=o[f];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(l){return o[l]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const l=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&l.push(c);return l},t.find=(o,l)=>{for(const c of o)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function i(o,l=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=i,t.jsonStringifyReplacer=(o,l)=>typeof l=="bigint"?l.toString():l})(We||(We={}));var xg;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(xg||(xg={}));const xe=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ns=t=>{switch(typeof t){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return Number.isNaN(t)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(t)?xe.array:t===null?xe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?xe.promise:typeof Map<"u"&&t instanceof Map?xe.map:typeof Set<"u"&&t instanceof Set?xe.set:typeof Date<"u"&&t instanceof Date?xe.date:xe.object;default:return xe.unknown}},re=We.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"]);class On extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(l){return l.message},i={_errors:[]},o=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)i._errors.push(n(c));else{let f=i,h=0;for(;h<c.path.length;){const g=c.path[h];h===c.path.length-1?(f[g]=f[g]||{_errors:[]},f[g]._errors.push(n(c))):f[g]=f[g]||{_errors:[]},f=f[g],h++}}};return o(this),i}static assert(e){if(!(e instanceof On))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},i=[];for(const o of this.issues)if(o.path.length>0){const l=o.path[0];n[l]=n[l]||[],n[l].push(e(o))}else i.push(e(o));return{formErrors:i,fieldErrors:n}}get formErrors(){return this.flatten()}}On.create=t=>new On(t);const kd=(t,e)=>{let n;switch(t.code){case re.invalid_type:t.received===xe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,We.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${We.joinValues(t.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${We.joinValues(t.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${We.joinValues(t.options)}, received '${t.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:We.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case re.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case re.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=e.defaultError,We.assertNever(t)}return{message:n}};let Ik=kd;function Fk(){return Ik}const Mk=t=>{const{data:e,path:n,errorMaps:i,issueData:o}=t,l=[...n,...o.path||[]],c={...o,path:l};if(o.message!==void 0)return{...o,path:l,message:o.message};let f="";const h=i.filter(g=>!!g).slice().reverse();for(const g of h)f=g(c,{data:e,defaultError:f}).message;return{...o,path:l,message:f}};function ce(t,e){const n=Fk(),i=Mk({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===kd?void 0:kd].filter(o=>!!o)});t.common.issues.push(i)}class sr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const i=[];for(const o of n){if(o.status==="aborted")return Ae;o.status==="dirty"&&e.dirty(),i.push(o.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,n){const i=[];for(const o of n){const l=await o.key,c=await o.value;i.push({key:l,value:c})}return sr.mergeObjectSync(e,i)}static mergeObjectSync(e,n){const i={};for(const o of n){const{key:l,value:c}=o;if(l.status==="aborted"||c.status==="aborted")return Ae;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(i[l.value]=c.value)}return{status:e.value,value:i}}}const Ae=Object.freeze({status:"aborted"}),Ca=t=>({status:"dirty",value:t}),Ar=t=>({status:"valid",value:t}),wg=t=>t.status==="aborted",bg=t=>t.status==="dirty",ji=t=>t.status==="valid",El=t=>typeof Promise<"u"&&t instanceof Promise;var Se;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Se||(Se={}));class cn{constructor(e,n,i,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=i,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Sg=(t,e)=>{if(ji(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new On(t.common.issues);return this._error=n,this._error}}};function $e(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:i,description:o}=t;if(e&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,f)=>{const{message:h}=t;return c.code==="invalid_enum_value"?{message:h??f.defaultError}:typeof f.data>"u"?{message:h??i??f.defaultError}:c.code!=="invalid_type"?{message:f.defaultError}:{message:h??n??f.defaultError}},description:o}}class Ve{get description(){return this._def.description}_getType(e){return ns(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:ns(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new sr,ctx:{common:e.parent.common,data:e.data,parsedType:ns(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(El(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const i=this.safeParse(e,n);if(i.success)return i.data;throw i.error}safeParse(e,n){const i={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)},o=this._parseSync({data:e,path:i.path,parent:i});return Sg(i,o)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return ji(i)?{value:i.value}:{issues:n.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>ji(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const i=await this.safeParseAsync(e,n);if(i.success)return i.data;throw i.error}async safeParseAsync(e,n){const i={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ns(e)},o=this._parse({data:e,path:i.path,parent:i}),l=await(El(o)?o:Promise.resolve(o));return Sg(i,l)}refine(e,n){const i=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,l)=>{const c=e(o),f=()=>l.addIssue({code:re.custom,...i(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(h=>h?!0:(f(),!1)):c?!0:(f(),!1)})}refinement(e,n){return this._refinement((i,o)=>e(i)?!0:(o.addIssue(typeof n=="function"?n(i,o):n),!1))}_refinement(e){return new Ni({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}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),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ds.create(this,this._def)}nullable(){return Pi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return un.create(this)}promise(){return Tl.create(this,this._def)}or(e){return Pl.create([this,e],this._def)}and(e){return Ol.create(this,e,this._def)}transform(e){return new Ni({...$e(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Od({...$e(this._def),innerType:this,defaultValue:n,typeName:Te.ZodDefault})}brand(){return new aj({typeName:Te.ZodBranded,type:this,...$e(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Rd({...$e(this._def),innerType:this,catchValue:n,typeName:Te.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Xd.create(this,e)}readonly(){return Td.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Dk=/^c[^\s-]{8,}$/i,$k=/^[0-9a-z]+$/,zk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Uk=/^[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,Vk=/^[a-z0-9_-]{21}$/i,Bk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Hk=/^[-+]?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)?)??$/,qk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zc;const Qk=/^(?:(?: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])$/,Kk=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Zk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Gk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Jk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Yk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,av="((\\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])))",Xk=new RegExp(`^${av}$`);function ov(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function ej(t){return new RegExp(`^${ov(t)}$`)}function tj(t){let e=`${av}T${ov(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function rj(t,e){return!!((e==="v4"||!e)&&Qk.test(t)||(e==="v6"||!e)&&Zk.test(t))}function nj(t,e){if(!Bk.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(i));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function sj(t,e){return!!((e==="v4"||!e)&&Kk.test(t)||(e==="v6"||!e)&&Gk.test(t))}class Nn extends Ve{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==xe.string){const l=this._getOrReturnCtx(e);return ce(l,{code:re.invalid_type,expected:xe.string,received:l.parsedType}),Ae}const i=new sr;let o;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(o=this._getOrReturnCtx(e,o),ce(o,{code:re.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")e.data.length>l.value&&(o=this._getOrReturnCtx(e,o),ce(o,{code:re.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,f=e.data.length<l.value;(c||f)&&(o=this._getOrReturnCtx(e,o),c?ce(o,{code:re.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):f&&ce(o,{code:re.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")qk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"email",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")Zc||(Zc=new RegExp(Wk,"u")),Zc.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"emoji",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")Uk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"uuid",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")Vk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"nanoid",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")Dk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"cuid",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")$k.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"cuid2",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")zk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"ulid",code:re.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ce(o,{validation:"url",code:re.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"regex",code:re.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?tj(l).test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?Xk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?ej(l).test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{code:re.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?Hk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"duration",code:re.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?rj(e.data,l.version)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"ip",code:re.invalid_string,message:l.message}),i.dirty()):l.kind==="jwt"?nj(e.data,l.alg)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"jwt",code:re.invalid_string,message:l.message}),i.dirty()):l.kind==="cidr"?sj(e.data,l.version)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"cidr",code:re.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?Jk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"base64",code:re.invalid_string,message:l.message}),i.dirty()):l.kind==="base64url"?Yk.test(e.data)||(o=this._getOrReturnCtx(e,o),ce(o,{validation:"base64url",code:re.invalid_string,message:l.message}),i.dirty()):We.assertNever(l);return{status:i.value,value:e.data}}_regex(e,n,i){return this.refinement(o=>e.test(o),{validation:n,code:re.invalid_string,...Se.errToObj(i)})}_addCheck(e){return new Nn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Se.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Se.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Se.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Se.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Se.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Se.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Se.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Se.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Se.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Se.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Se.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Se.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Se.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Se.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Se.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Se.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Se.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...Se.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Se.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Se.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Se.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Se.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Se.errToObj(n)})}nonempty(e){return this.min(1,Se.errToObj(e))}trim(){return new Nn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Nn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Nn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Nn.create=t=>new Nn({checks:[],typeName:Te.ZodString,coerce:t?.coerce??!1,...$e(t)});function ij(t,e){const n=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,o=n>i?n:i,l=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return l%c/10**o}class Ci extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==xe.number){const l=this._getOrReturnCtx(e);return ce(l,{code:re.invalid_type,expected:xe.number,received:l.parsedType}),Ae}let i;const o=new sr;for(const l of this._def.checks)l.kind==="int"?We.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),ce(i,{code:re.invalid_type,expected:"integer",received:"float",message:l.message}),o.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),o.dirty()):l.kind==="multipleOf"?ij(e.data,l.value)!==0&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),ce(i,{code:re.not_finite,message:l.message}),o.dirty()):We.assertNever(l);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Se.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Se.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Se.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Se.toString(n))}setLimit(e,n,i,o){return new Ci({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Se.toString(o)}]})}_addCheck(e){return new Ci({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Se.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Se.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&We.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(n===null||i.value>n)&&(n=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Ci.create=t=>new Ci({checks:[],typeName:Te.ZodNumber,coerce:t?.coerce||!1,...$e(t)});class Ba extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==xe.bigint)return this._getInvalidInput(e);let i;const o=new sr;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),o.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),ce(i,{code:re.not_multiple_of,multipleOf:l.value,message:l.message}),o.dirty()):We.assertNever(l);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return ce(n,{code:re.invalid_type,expected:xe.bigint,received:n.parsedType}),Ae}gte(e,n){return this.setLimit("min",e,!0,Se.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Se.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Se.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Se.toString(n))}setLimit(e,n,i,o){return new Ba({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:i,message:Se.toString(o)}]})}_addCheck(e){return new Ba({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ba.create=t=>new Ba({checks:[],typeName:Te.ZodBigInt,coerce:t?.coerce??!1,...$e(t)});class jd extends Ve{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==xe.boolean){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.boolean,received:i.parsedType}),Ae}return Ar(e.data)}}jd.create=t=>new jd({typeName:Te.ZodBoolean,coerce:t?.coerce||!1,...$e(t)});class Nl extends Ve{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==xe.date){const l=this._getOrReturnCtx(e);return ce(l,{code:re.invalid_type,expected:xe.date,received:l.parsedType}),Ae}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ce(l,{code:re.invalid_date}),Ae}const i=new sr;let o;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(o=this._getOrReturnCtx(e,o),ce(o,{code:re.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(o=this._getOrReturnCtx(e,o),ce(o,{code:re.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):We.assertNever(l);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Nl({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Se.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Se.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Nl.create=t=>new Nl({checks:[],coerce:t?.coerce||!1,typeName:Te.ZodDate,...$e(t)});class _g extends Ve{_parse(e){if(this._getType(e)!==xe.symbol){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.symbol,received:i.parsedType}),Ae}return Ar(e.data)}}_g.create=t=>new _g({typeName:Te.ZodSymbol,...$e(t)});class kg extends Ve{_parse(e){if(this._getType(e)!==xe.undefined){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.undefined,received:i.parsedType}),Ae}return Ar(e.data)}}kg.create=t=>new kg({typeName:Te.ZodUndefined,...$e(t)});class Cd extends Ve{_parse(e){if(this._getType(e)!==xe.null){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.null,received:i.parsedType}),Ae}return Ar(e.data)}}Cd.create=t=>new Cd({typeName:Te.ZodNull,...$e(t)});class jg extends Ve{constructor(){super(...arguments),this._any=!0}_parse(e){return Ar(e.data)}}jg.create=t=>new jg({typeName:Te.ZodAny,...$e(t)});class Ed extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ar(e.data)}}Ed.create=t=>new Ed({typeName:Te.ZodUnknown,...$e(t)});class ms extends Ve{_parse(e){const n=this._getOrReturnCtx(e);return ce(n,{code:re.invalid_type,expected:xe.never,received:n.parsedType}),Ae}}ms.create=t=>new ms({typeName:Te.ZodNever,...$e(t)});class Cg extends Ve{_parse(e){if(this._getType(e)!==xe.undefined){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.void,received:i.parsedType}),Ae}return Ar(e.data)}}Cg.create=t=>new Cg({typeName:Te.ZodVoid,...$e(t)});class un extends Ve{_parse(e){const{ctx:n,status:i}=this._processInputParams(e),o=this._def;if(n.parsedType!==xe.array)return ce(n,{code:re.invalid_type,expected:xe.array,received:n.parsedType}),Ae;if(o.exactLength!==null){const c=n.data.length>o.exactLength.value,f=n.data.length<o.exactLength.value;(c||f)&&(ce(n,{code:c?re.too_big:re.too_small,minimum:f?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),i.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ce(n,{code:re.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),i.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ce(n,{code:re.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),i.dirty()),n.common.async)return Promise.all([...n.data].map((c,f)=>o.type._parseAsync(new cn(n,c,n.path,f)))).then(c=>sr.mergeArray(i,c));const l=[...n.data].map((c,f)=>o.type._parseSync(new cn(n,c,n.path,f)));return sr.mergeArray(i,l)}get element(){return this._def.type}min(e,n){return new un({...this._def,minLength:{value:e,message:Se.toString(n)}})}max(e,n){return new un({...this._def,maxLength:{value:e,message:Se.toString(n)}})}length(e,n){return new un({...this._def,exactLength:{value:e,message:Se.toString(n)}})}nonempty(e){return this.min(1,e)}}un.create=(t,e)=>new un({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...$e(e)});function yi(t){if(t instanceof Nt){const e={};for(const n in t.shape){const i=t.shape[n];e[n]=ds.create(yi(i))}return new Nt({...t._def,shape:()=>e})}else return t instanceof un?new un({...t._def,type:yi(t.element)}):t instanceof ds?ds.create(yi(t.unwrap())):t instanceof Pi?Pi.create(yi(t.unwrap())):t instanceof Vs?Vs.create(t.items.map(e=>yi(e))):t}class Nt extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=We.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==xe.object){const g=this._getOrReturnCtx(e);return ce(g,{code:re.invalid_type,expected:xe.object,received:g.parsedType}),Ae}const{status:i,ctx:o}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),f=[];if(!(this._def.catchall instanceof ms&&this._def.unknownKeys==="strip"))for(const g in o.data)c.includes(g)||f.push(g);const h=[];for(const g of c){const y=l[g],v=o.data[g];h.push({key:{status:"valid",value:g},value:y._parse(new cn(o,v,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof ms){const g=this._def.unknownKeys;if(g==="passthrough")for(const y of f)h.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(g==="strict")f.length>0&&(ce(o,{code:re.unrecognized_keys,keys:f}),i.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const y of f){const v=o.data[y];h.push({key:{status:"valid",value:y},value:g._parse(new cn(o,v,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const g=[];for(const y of h){const v=await y.key,w=await y.value;g.push({key:v,value:w,alwaysSet:y.alwaysSet})}return g}).then(g=>sr.mergeObjectSync(i,g)):sr.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(e){return Se.errToObj,new Nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,i)=>{const o=this._def.errorMap?.(n,i).message??i.defaultError;return n.code==="unrecognized_keys"?{message:Se.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new Nt({...this._def,unknownKeys:"strip"})}passthrough(){return new Nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new Nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Nt({...this._def,catchall:e})}pick(e){const n={};for(const i of We.objectKeys(e))e[i]&&this.shape[i]&&(n[i]=this.shape[i]);return new Nt({...this._def,shape:()=>n})}omit(e){const n={};for(const i of We.objectKeys(this.shape))e[i]||(n[i]=this.shape[i]);return new Nt({...this._def,shape:()=>n})}deepPartial(){return yi(this)}partial(e){const n={};for(const i of We.objectKeys(this.shape)){const o=this.shape[i];e&&!e[i]?n[i]=o:n[i]=o.optional()}return new Nt({...this._def,shape:()=>n})}required(e){const n={};for(const i of We.objectKeys(this.shape))if(e&&!e[i])n[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof ds;)l=l._def.innerType;n[i]=l}return new Nt({...this._def,shape:()=>n})}keyof(){return lv(We.objectKeys(this.shape))}}Nt.create=(t,e)=>new Nt({shape:()=>t,unknownKeys:"strip",catchall:ms.create(),typeName:Te.ZodObject,...$e(e)});Nt.strictCreate=(t,e)=>new Nt({shape:()=>t,unknownKeys:"strict",catchall:ms.create(),typeName:Te.ZodObject,...$e(e)});Nt.lazycreate=(t,e)=>new Nt({shape:t,unknownKeys:"strip",catchall:ms.create(),typeName:Te.ZodObject,...$e(e)});class Pl extends Ve{_parse(e){const{ctx:n}=this._processInputParams(e),i=this._def.options;function o(l){for(const f of l)if(f.result.status==="valid")return f.result;for(const f of l)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const c=l.map(f=>new On(f.ctx.common.issues));return ce(n,{code:re.invalid_union,unionErrors:c}),Ae}if(n.common.async)return Promise.all(i.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(o);{let l;const c=[];for(const h of i){const g={...n,common:{...n.common,issues:[]},parent:null},y=h._parseSync({data:n.data,path:n.path,parent:g});if(y.status==="valid")return y;y.status==="dirty"&&!l&&(l={result:y,ctx:g}),g.common.issues.length&&c.push(g.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const f=c.map(h=>new On(h));return ce(n,{code:re.invalid_union,unionErrors:f}),Ae}}get options(){return this._def.options}}Pl.create=(t,e)=>new Pl({options:t,typeName:Te.ZodUnion,...$e(e)});function Nd(t,e){const n=ns(t),i=ns(e);if(t===e)return{valid:!0,data:t};if(n===xe.object&&i===xe.object){const o=We.objectKeys(e),l=We.objectKeys(t).filter(f=>o.indexOf(f)!==-1),c={...t,...e};for(const f of l){const h=Nd(t[f],e[f]);if(!h.valid)return{valid:!1};c[f]=h.data}return{valid:!0,data:c}}else if(n===xe.array&&i===xe.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let l=0;l<t.length;l++){const c=t[l],f=e[l],h=Nd(c,f);if(!h.valid)return{valid:!1};o.push(h.data)}return{valid:!0,data:o}}else return n===xe.date&&i===xe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ol extends Ve{_parse(e){const{status:n,ctx:i}=this._processInputParams(e),o=(l,c)=>{if(wg(l)||wg(c))return Ae;const f=Nd(l.value,c.value);return f.valid?((bg(l)||bg(c))&&n.dirty(),{status:n.value,value:f.data}):(ce(i,{code:re.invalid_intersection_types}),Ae)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,c])=>o(l,c)):o(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Ol.create=(t,e,n)=>new Ol({left:t,right:e,typeName:Te.ZodIntersection,...$e(n)});class Vs extends Ve{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==xe.array)return ce(i,{code:re.invalid_type,expected:xe.array,received:i.parsedType}),Ae;if(i.data.length<this._def.items.length)return ce(i,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ae;!this._def.rest&&i.data.length>this._def.items.length&&(ce(i,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...i.data].map((c,f)=>{const h=this._def.items[f]||this._def.rest;return h?h._parse(new cn(i,c,i.path,f)):null}).filter(c=>!!c);return i.common.async?Promise.all(l).then(c=>sr.mergeArray(n,c)):sr.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Vs({...this._def,rest:e})}}Vs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vs({items:t,typeName:Te.ZodTuple,rest:null,...$e(e)})};class Rl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==xe.object)return ce(i,{code:re.invalid_type,expected:xe.object,received:i.parsedType}),Ae;const o=[],l=this._def.keyType,c=this._def.valueType;for(const f in i.data)o.push({key:l._parse(new cn(i,f,i.path,f)),value:c._parse(new cn(i,i.data[f],i.path,f)),alwaysSet:f in i.data});return i.common.async?sr.mergeObjectAsync(n,o):sr.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,i){return n instanceof Ve?new Rl({keyType:e,valueType:n,typeName:Te.ZodRecord,...$e(i)}):new Rl({keyType:Nn.create(),valueType:e,typeName:Te.ZodRecord,...$e(n)})}}class Eg extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==xe.map)return ce(i,{code:re.invalid_type,expected:xe.map,received:i.parsedType}),Ae;const o=this._def.keyType,l=this._def.valueType,c=[...i.data.entries()].map(([f,h],g)=>({key:o._parse(new cn(i,f,i.path,[g,"key"])),value:l._parse(new cn(i,h,i.path,[g,"value"]))}));if(i.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const h of c){const g=await h.key,y=await h.value;if(g.status==="aborted"||y.status==="aborted")return Ae;(g.status==="dirty"||y.status==="dirty")&&n.dirty(),f.set(g.value,y.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const h of c){const g=h.key,y=h.value;if(g.status==="aborted"||y.status==="aborted")return Ae;(g.status==="dirty"||y.status==="dirty")&&n.dirty(),f.set(g.value,y.value)}return{status:n.value,value:f}}}}Eg.create=(t,e,n)=>new Eg({valueType:e,keyType:t,typeName:Te.ZodMap,...$e(n)});class Ha extends Ve{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.parsedType!==xe.set)return ce(i,{code:re.invalid_type,expected:xe.set,received:i.parsedType}),Ae;const o=this._def;o.minSize!==null&&i.data.size<o.minSize.value&&(ce(i,{code:re.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&i.data.size>o.maxSize.value&&(ce(i,{code:re.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const l=this._def.valueType;function c(h){const g=new Set;for(const y of h){if(y.status==="aborted")return Ae;y.status==="dirty"&&n.dirty(),g.add(y.value)}return{status:n.value,value:g}}const f=[...i.data.values()].map((h,g)=>l._parse(new cn(i,h,i.path,g)));return i.common.async?Promise.all(f).then(h=>c(h)):c(f)}min(e,n){return new Ha({...this._def,minSize:{value:e,message:Se.toString(n)}})}max(e,n){return new Ha({...this._def,maxSize:{value:e,message:Se.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ha.create=(t,e)=>new Ha({valueType:t,minSize:null,maxSize:null,typeName:Te.ZodSet,...$e(e)});class Ng extends Ve{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ng.create=(t,e)=>new Ng({getter:t,typeName:Te.ZodLazy,...$e(e)});class Pd extends Ve{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ce(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),Ae}return{status:"valid",value:e.data}}get value(){return this._def.value}}Pd.create=(t,e)=>new Pd({value:t,typeName:Te.ZodLiteral,...$e(e)});function lv(t,e){return new Ei({values:t,typeName:Te.ZodEnum,...$e(e)})}class Ei extends Ve{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),i=this._def.values;return ce(n,{expected:We.joinValues(i),received:n.parsedType,code:re.invalid_type}),Ae}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),i=this._def.values;return ce(n,{received:n.data,code:re.invalid_enum_value,options:i}),Ae}return Ar(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Ei.create(e,{...this._def,...n})}exclude(e,n=this._def){return Ei.create(this.options.filter(i=>!e.includes(i)),{...this._def,...n})}}Ei.create=lv;class Pg extends Ve{_parse(e){const n=We.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==xe.string&&i.parsedType!==xe.number){const o=We.objectValues(n);return ce(i,{expected:We.joinValues(o),received:i.parsedType,code:re.invalid_type}),Ae}if(this._cache||(this._cache=new Set(We.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const o=We.objectValues(n);return ce(i,{received:i.data,code:re.invalid_enum_value,options:o}),Ae}return Ar(e.data)}get enum(){return this._def.values}}Pg.create=(t,e)=>new Pg({values:t,typeName:Te.ZodNativeEnum,...$e(e)});class Tl extends Ve{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==xe.promise&&n.common.async===!1)return ce(n,{code:re.invalid_type,expected:xe.promise,received:n.parsedType}),Ae;const i=n.parsedType===xe.promise?n.data:Promise.resolve(n.data);return Ar(i.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Tl.create=(t,e)=>new Tl({type:t,typeName:Te.ZodPromise,...$e(e)});class Ni extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:i}=this._processInputParams(e),o=this._def.effect||null,l={addIssue:c=>{ce(i,c),c.fatal?n.abort():n.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),o.type==="preprocess"){const c=o.transform(i.data,l);if(i.common.async)return Promise.resolve(c).then(async f=>{if(n.value==="aborted")return Ae;const h=await this._def.schema._parseAsync({data:f,path:i.path,parent:i});return h.status==="aborted"?Ae:h.status==="dirty"||n.value==="dirty"?Ca(h.value):h});{if(n.value==="aborted")return Ae;const f=this._def.schema._parseSync({data:c,path:i.path,parent:i});return f.status==="aborted"?Ae:f.status==="dirty"||n.value==="dirty"?Ca(f.value):f}}if(o.type==="refinement"){const c=f=>{const h=o.refinement(f,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(i.common.async===!1){const f=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return f.status==="aborted"?Ae:(f.status==="dirty"&&n.dirty(),c(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(f=>f.status==="aborted"?Ae:(f.status==="dirty"&&n.dirty(),c(f.value).then(()=>({status:n.value,value:f.value}))))}if(o.type==="transform")if(i.common.async===!1){const c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ji(c))return Ae;const f=o.transform(c.value,l);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(c=>ji(c)?Promise.resolve(o.transform(c.value,l)).then(f=>({status:n.value,value:f})):Ae);We.assertNever(o)}}Ni.create=(t,e,n)=>new Ni({schema:t,typeName:Te.ZodEffects,effect:e,...$e(n)});Ni.createWithPreprocess=(t,e,n)=>new Ni({schema:e,effect:{type:"preprocess",transform:t},typeName:Te.ZodEffects,...$e(n)});class ds extends Ve{_parse(e){return this._getType(e)===xe.undefined?Ar(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ds.create=(t,e)=>new ds({innerType:t,typeName:Te.ZodOptional,...$e(e)});class Pi extends Ve{_parse(e){return this._getType(e)===xe.null?Ar(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pi.create=(t,e)=>new Pi({innerType:t,typeName:Te.ZodNullable,...$e(e)});class Od extends Ve{_parse(e){const{ctx:n}=this._processInputParams(e);let i=n.data;return n.parsedType===xe.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Od.create=(t,e)=>new Od({innerType:t,typeName:Te.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...$e(e)});class Rd extends Ve{_parse(e){const{ctx:n}=this._processInputParams(e),i={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return El(o)?o.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new On(i.common.issues)},input:i.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new On(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Rd.create=(t,e)=>new Rd({innerType:t,typeName:Te.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...$e(e)});class Og extends Ve{_parse(e){if(this._getType(e)!==xe.nan){const i=this._getOrReturnCtx(e);return ce(i,{code:re.invalid_type,expected:xe.nan,received:i.parsedType}),Ae}return{status:"valid",value:e.data}}}Og.create=t=>new Og({typeName:Te.ZodNaN,...$e(t)});class aj extends Ve{_parse(e){const{ctx:n}=this._processInputParams(e),i=n.data;return this._def.type._parse({data:i,path:n.path,parent:n})}unwrap(){return this._def.type}}class Xd extends Ve{_parse(e){const{status:n,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?Ae:l.status==="dirty"?(n.dirty(),Ca(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const o=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?Ae:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:i.path,parent:i})}}static create(e,n){return new Xd({in:e,out:n,typeName:Te.ZodPipeline})}}class Td extends Ve{_parse(e){const n=this._def.innerType._parse(e),i=o=>(ji(o)&&(o.value=Object.freeze(o.value)),o);return El(n)?n.then(o=>i(o)):i(n)}unwrap(){return this._def.innerType}}Td.create=(t,e)=>new Td({innerType:t,typeName:Te.ZodReadonly,...$e(e)});var Te;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Te||(Te={}));const X=Nn.create,Fe=Ci.create,Bs=jd.create,oj=Cd.create,Mi=Ed.create;ms.create;const nr=un.create,ot=Nt.create,kr=Pl.create;Ol.create;Vs.create;const zl=Rl.create,uv=Pd.create,cv=Ei.create;Tl.create;ds.create;Pi.create;class Rg extends Error{constructor(e,n,i,o){super(`${e} ${n} — ${o}`),this.status=e,this.statusText=n,this.body=i,this.url=o,this.name="ApiError"}status;statusText;body;url}function lj(t,e){if(!e)return t;const n=new URLSearchParams;for(const[o,l]of Object.entries(e))l!=null&&n.append(o,String(l));const i=n.toString();return i?`${t}?${i}`:t}async function dl(t,e,n={}){const{body:i,query:o,headers:l,...c}=n,f=lj(t,o),h={...c,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...l},body:i!==void 0?JSON.stringify(i):void 0},g=await fetch(f,h),v=(g.headers.get("content-type")??"").includes("application/json")&&g.status!==204?await g.json():await g.text();if(!g.ok)throw new Rg(g.status,g.statusText,v,f);const w=e.safeParse(v);if(!w.success)throw new Rg(g.status,"Response schema mismatch",{issues:w.error.issues,raw:v},f);return w.data}const St={get:(t,e,n)=>dl(t,e,{...n,method:"GET"}),post:(t,e,n,i)=>dl(t,e,{...i,method:"POST",body:n}),put:(t,e,n,i)=>dl(t,e,{...i,method:"PUT",body:n}),delete:(t,e,n)=>dl(t,e,{...n,method:"DELETE"})},uj=ot({id:kr([X(),Fe()]).transform(String),name:X(),domain:X(),created_at:X(),updated_at:X()}),cj=nr(uj),dj=ot({id:kr([X(),Fe()]).transform(String),name:X(),type:X(),base_url:X().nullable().optional(),trust_level:kr([X(),Fe()]).nullable().optional(),respect_robots_txt:Bs().nullable().optional(),rate_limit_per_minute:Fe().nullable().optional()}),fj=ot({id:kr([X(),Fe()]).transform(String),name:X(),domain:X(),config:Mi().optional(),sources:nr(dj).default([])}),Tg=ot({id:kr([X(),Fe()]).transform(String),name:X(),domain:X()}),ef={list:()=>St.get("/projects",cj),detail:t=>St.get(`/projects/${encodeURIComponent(t)}`,fj),create:t=>St.post("/projects",Tg,t),createInline:t=>St.post("/projects/inline",Tg,t)},Je={projects:{all:["projects"],list:()=>[...Je.projects.all,"list"],detail:t=>[...Je.projects.all,"detail",t]},domains:{all:["domains"],list:()=>[...Je.domains.all,"list"]},ontology:{all:["ontology"],byDomain:t=>[...Je.ontology.all,"byDomain",t]},crawl:{all:["crawl"],job:t=>[...Je.crawl.all,"job",t]},research:{all:["research"],sessions:t=>[...Je.research.all,"sessions",t],session:t=>[...Je.research.all,"session",t]},entities:{all:["entities"],list:(t,e)=>[...Je.entities.all,"list",t,e??"*"]},claims:{all:["claims"],list:(t,e)=>[...Je.claims.all,"list",t,e??"*"]}};function dv(){return vs({queryKey:Je.projects.list(),queryFn:()=>ef.list()})}function Ul(t){return vs({queryKey:Je.projects.detail(t??""),queryFn:()=>ef.detail(t),enabled:!!t})}function hj(){const t=jr();return Zr({mutationFn:e=>ef.createInline(e),onSuccess:()=>{t.invalidateQueries({queryKey:Je.projects.all})}})}const pj=[{to:"/",labelKey:"nav.dashboard",icon:s_},{to:"/onboard",labelKey:"nav.onboard",icon:f_},{projectPath:"sources",labelKey:"nav.sources",icon:u_},{projectPath:"crawl",labelKey:"nav.crawl",icon:JS},{projectPath:"research",labelKey:"nav.research",icon:$y},{projectPath:"editor",labelKey:"nav.editor",icon:Uy},{projectPath:"review",labelKey:"nav.review",icon:a_}],fv=["/sources/:projectId","/crawl/:projectId","/research/:projectId","/editor/:projectId","/review/:projectId"];function mj(t){for(const e of fv){const n=La({path:e,end:!1},t);if(n?.params.projectId)return n.params.projectId}}function gj(t){for(const e of fv)if(La({path:e,end:!1},t)?.params.projectId)return e.split("/")[1]}function yj(){const{t}=xs(),e=Xx(v=>v.ui.sidebarOpen),n=f1(),i=Li(),o=Tn(),l=mj(i.pathname),c=gj(i.pathname),{data:f}=dv(),h=f?.[0]?.name,g=!l||!f||f.some(v=>v.name===l),y=g?l??h:h;return B.useEffect(()=>{if(l&&f&&!g){const v=c&&h?`/${c}/${encodeURIComponent(h)}`:"/";o(v,{replace:!0})}},[h,o,f,g,l,c]),m.jsxs("div",{className:"flex min-h-screen bg-background text-foreground",children:[m.jsxs("aside",{className:xt("border-r bg-card transition-all duration-200 ease-out",e?"w-60":"w-16"),children:[m.jsxs("div",{className:"flex h-14 items-center justify-between px-4 border-b",children:[e&&m.jsx("span",{className:"text-sm font-semibold",children:t("app.title","Ontology Builder")}),m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>n(ek()),"aria-label":t("nav.toggleSidebar","Toggle sidebar"),children:m.jsx(o_,{className:"h-4 w-4"})})]}),e&&m.jsxs("div",{className:"border-b px-4 py-3",children:[m.jsx("p",{className:"text-xs text-muted-foreground",children:t("nav.currentProject","Current project")}),m.jsx("p",{className:"mt-1 truncate text-sm font-medium",children:y??t("nav.noProjectSelected","Select a project")})]}),m.jsx("nav",{className:"flex flex-col gap-1 p-2",children:pj.map(({to:v,projectPath:w,labelKey:x,icon:j})=>{const _=v??(y?`/${w}/${encodeURIComponent(y)}`:void 0);return _?m.jsxs(yw,{to:_,end:_==="/",className:({isActive:S})=>xt("flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",S?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[m.jsx(j,{className:"h-4 w-4 flex-shrink-0"}),e&&m.jsx("span",{children:t(x)})]},x):m.jsxs("div",{className:"flex cursor-not-allowed items-center gap-3 rounded-md px-3 py-2 text-sm text-muted-foreground/50",title:t("nav.selectProjectFirst","Select a project from the dashboard first"),children:[m.jsx(j,{className:"h-4 w-4 flex-shrink-0"}),e&&m.jsx("span",{children:t(x)})]},x)})})]}),m.jsxs("div",{className:"flex flex-1 flex-col",children:[m.jsx("header",{className:"flex h-14 items-center justify-between border-b bg-card px-6",children:m.jsx("h1",{className:"text-sm font-medium text-muted-foreground",children:t("app.subtitle","AI-powered ontology construction")})}),m.jsx("main",{className:"flex-1 overflow-auto",children:m.jsx(nw,{})})]})]})}var Za=t=>t.type==="checkbox",Ms=t=>t instanceof Date,rr=t=>t==null;const hv=t=>typeof t=="object";var yt=t=>!rr(t)&&!Array.isArray(t)&&hv(t)&&!Ms(t),vj=t=>yt(t)&&t.target?Za(t.target)?t.target.checked:t.target.value:t,xj=(t,e)=>e.split(".").some((n,i,o)=>!isNaN(Number(n))&&t.has(o.slice(0,i).join("."))),wj=t=>{const e=t.constructor&&t.constructor.prototype;return yt(e)&&e.hasOwnProperty("isPrototypeOf")},tf=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ct(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(tf&&(t instanceof Blob||e))return t;const n=Array.isArray(t);if(!n&&!(yt(t)&&wj(t)))return t;const i=n?[]:Object.create(Object.getPrototypeOf(t));for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=Ct(t[o]));return i}var Vl=t=>/^\w*$/.test(t),ct=t=>t===void 0,rf=t=>Array.isArray(t)?t.filter(Boolean):[],nf=t=>rf(t.replace(/["|']|\]/g,"").split(/\.|\[/)),ye=(t,e,n)=>{if(!e||!yt(t))return n;const o=(Vl(e)?[e]:nf(e)).reduce((l,c)=>rr(l)?void 0:l[c],t);return ct(o)||o===t?ct(t[e])?n:t[e]:o},sn=t=>typeof t=="boolean",Lr=t=>typeof t=="function",tt=(t,e,n)=>{let i=-1;const o=Vl(e)?[e]:nf(e),l=o.length,c=l-1;for(;++i<l;){const f=o[i];let h=n;if(i!==c){const g=t[f];h=yt(g)||Array.isArray(g)?g:isNaN(+o[i+1])?{}:[]}if(f==="__proto__"||f==="constructor"||f==="prototype")return;t[f]=h,t=t[f]}};const mi={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Kr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Wr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Gc="form",pv="root",bj=ee.createContext(null);bj.displayName="HookFormControlContext";var Sj=(t,e,n,i=!0)=>{const o={};for(const l in t)Object.defineProperty(o,l,{get:()=>{const c=l;return e._proxyFormState[c]!==Kr.all&&(e._proxyFormState[c]=!i||Kr.all),t[c]}});return o};const _j=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;var Qt=t=>typeof t=="string",kj=(t,e,n,i,o)=>Qt(t)?(i&&e.watch.add(t),ye(n,t,o)):Array.isArray(t)?t.map(l=>(i&&e.watch.add(l),ye(n,l))):(i&&(e.watchAll=!0),n),Ld=t=>rr(t)||!hv(t);function an(t,e,n=new WeakSet){if(t===e)return!0;if(Ld(t)||Ld(e))return Object.is(t,e);if(Ms(t)&&Ms(e))return Object.is(t.getTime(),e.getTime());const i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const l of i){const c=t[l];if(!(l in e))return!1;if(l!=="ref"){const f=e[l];if(Ms(c)&&Ms(f)||(yt(c)||Array.isArray(c))&&(yt(f)||Array.isArray(f))?!an(c,f,n):!Object.is(c,f))return!1}}return!0}const jj=ee.createContext(null);jj.displayName="HookFormContext";var mv=(t,e,n,i,o)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[i]:o||!0}}:{},Oa=t=>Array.isArray(t)?t:[t],Lg=()=>{let t=[];return{get observers(){return t},next:o=>{for(const l of t)l.next&&l.next(o)},subscribe:o=>(t.push(o),{unsubscribe:()=>{t=t.filter(l=>l!==o)}}),unsubscribe:()=>{t=[]}}};function gv(t,e){const n={};for(const i in t)if(t.hasOwnProperty(i)){const o=t[i],l=e[i];if(o&&yt(o)&&l){const c=gv(o,l);yt(c)&&(n[i]=c)}else t[i]&&(n[i]=l)}return n}var Wt=t=>yt(t)&&!Object.keys(t).length,sf=t=>t.type==="file",Ll=t=>{if(!tf)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},yv=t=>t.type==="select-multiple",af=t=>t.type==="radio",Cj=t=>af(t)||Za(t),Jc=t=>Ll(t)&&t.isConnected;function Ej(t,e){const n=e.slice(0,-1).length;let i=0;for(;i<n;){if(rr(t)){t=void 0;break}t=t[e[i]],i++}return t}function Nj(t){for(const e in t)if(t.hasOwnProperty(e)&&!ct(t[e]))return!1;return!0}function Et(t,e){if(Qt(e)&&Object.prototype.hasOwnProperty.call(t,e))return delete t[e],t;const n=Array.isArray(e)?e:Vl(e)?[e]:nf(e),i=n.length===1?t:Ej(t,n),o=n.length-1,l=n[o];return i&&delete i[l],o!==0&&(yt(i)&&Wt(i)||Array.isArray(i)&&Nj(i))&&Et(t,n.slice(0,-1)),t}var Pj=t=>{for(const e in t)if(Lr(t[e]))return!0;return!1};function vv(t){return Array.isArray(t)||yt(t)&&!Pj(t)}function Ad(t,e={}){for(const n in t){const i=t[n];vv(i)?(e[n]=Array.isArray(i)?[]:{},Ad(i,e[n])):ct(i)||(e[n]=!0)}return e}function Id(t){if(t!==!1){if(t===!0)return!0;if(Array.isArray(t)){const e=t.map(n=>Id(n));return e.some(n=>n!==void 0)?e:void 0}if(yt(t)){const e={};for(const n in t){const i=Id(t[n]);ct(i)||(e[n]=i)}return Object.keys(e).length?e:void 0}}}function Ea(t,e,n){n||(n=Ad(e));for(const i in t){const o=t[i];if(vv(o))ct(e)||Ld(n[i])?n[i]=Ad(o,Array.isArray(o)?[]:{}):Ea(o,rr(e)?{}:e[i],n[i]);else{const l=e[i];n[i]=!an(o,l)}}return Id(n)||{}}const Ag={value:!1,isValid:!1},Ig={value:!0,isValid:!0};var xv=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!ct(t[0].attributes.value)?ct(t[0].value)||t[0].value===""?Ig:{value:t[0].value,isValid:!0}:Ig:Ag}return Ag},wv=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:i})=>ct(t)?t:e?t===""?NaN:t&&+t:n&&Qt(t)?new Date(t):i?i(t):t;const Fg={isValid:!1,value:null};var bv=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,Fg):Fg;function Mg(t){const e=t.ref;return sf(e)?e.files:af(e)?bv(t.refs).value:yv(e)?[...e.selectedOptions].map(({value:n})=>n):Za(e)?xv(t.refs).value:wv(ct(e.value)?t.ref.value:e.value,t)}var Oj=(t,e,n,i)=>{const o={};for(const l of t){const c=ye(e,l);c&&tt(o,l,c._f)}return{criteriaMode:n,names:[...t],fields:o,shouldUseNativeValidation:i}},Al=t=>t instanceof RegExp,ka=t=>ct(t)?t:Al(t)?t.source:yt(t)?Al(t.value)?t.value.source:t.value:t,Dg=t=>({isOnSubmit:!t||t===Kr.onSubmit,isOnBlur:t===Kr.onBlur,isOnChange:t===Kr.onChange,isOnAll:t===Kr.all,isOnTouch:t===Kr.onTouched});const $g="AsyncFunction";var Rj=t=>!!t&&!!t.validate&&!!(Lr(t.validate)&&t.validate.constructor.name===$g||yt(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===$g)),Tj=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),zg=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const Ra=(t,e,n,i)=>{for(const o of n||Object.keys(t)){const l=ye(t,o);if(l){const{_f:c,...f}=l;if(c){if(c.refs&&c.refs[0]&&e(c.refs[0],o)&&!i)return!0;if(c.ref&&e(c.ref,c.name)&&!i)return!0;if(Ra(f,e))break}else if(yt(f)&&Ra(f,e))break}}};function Ug(t,e,n){const i=ye(t,n);if(i||Vl(n))return{error:i,name:n};const o=n.split(".");for(;o.length;){const l=o.join("."),c=ye(e,l),f=ye(t,l);if(c&&!Array.isArray(c)&&n!==l)return{name:n};if(f&&f.type)return{name:l,error:f};if(f&&f.root&&f.root.type)return{name:`${l}.root`,error:f.root};o.pop()}return{name:n}}var Lj=(t,e,n,i)=>{n(t);const{name:o,...l}=t;return Wt(l)||i&&Object.keys(l).length>=Object.keys(e).length||Object.keys(l).find(c=>e[c]===(!i||Kr.all))},Aj=(t,e,n)=>!t||!e||t===e||Oa(t).some(i=>i&&(n?i===e:i.startsWith(e)||e.startsWith(i))),Ij=(t,e,n,i,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(e||t):(n?i.isOnBlur:o.isOnBlur)?!t:(n?i.isOnChange:o.isOnChange)?t:!0,Fj=(t,e)=>!rf(ye(t,e)).length&&Et(t,e),Mj=(t,e,n)=>{const i=Oa(ye(t,n));return tt(i,pv,e[n]),tt(t,n,i),t};function Vg(t,e,n="validate"){if(Qt(t)||Array.isArray(t)&&t.every(Qt)||sn(t)&&!t)return{type:n,message:Qt(t)?t:"",ref:e}}var gi=t=>yt(t)&&!Al(t)?t:{value:t,message:""},Bg=async(t,e,n,i,o,l)=>{const{ref:c,refs:f,required:h,maxLength:g,minLength:y,min:v,max:w,pattern:x,validate:j,name:_,valueAsNumber:S,mount:I}=t._f,E=ye(n,_);if(!I||e.has(_))return{};const z=f?f[0]:c,M=Z=>{o&&z.reportValidity&&(z.setCustomValidity(sn(Z)?"":Z||""),z.reportValidity())},L={},Q=af(c),le=Za(c),ue=Q||le,pe=(S||sf(c))&&ct(c.value)&&ct(E)||Ll(c)&&c.value===""||E===""||Array.isArray(E)&&!E.length||S&&typeof E=="number"&&isNaN(E),_e=mv.bind(null,_,i,L),Oe=(Z,me,he,T=Wr.maxLength,P=Wr.minLength)=>{const K=Z?me:he;L[_]={type:Z?T:P,message:K,ref:c,..._e(Z?T:P,K)}};if(l?!Array.isArray(E)||!E.length:h&&(!ue&&(pe||rr(E))||sn(E)&&!E||le&&!xv(f).isValid||Q&&!bv(f).isValid)){const{value:Z,message:me}=Qt(h)?{value:!!h,message:h}:gi(h);if(Z&&(L[_]={type:Wr.required,message:me,ref:z,..._e(Wr.required,me)},!i))return M(me),L}if(!pe&&(!rr(v)||!rr(w))){let Z,me;const he=gi(w),T=gi(v);if(!rr(E)&&!isNaN(E)){const P=c.valueAsNumber||E&&+E;rr(he.value)||(Z=P>he.value),rr(T.value)||(me=P<T.value)}else{const P=c.valueAsDate||new Date(E),K=W=>new Date(new Date().toDateString()+" "+W),V=c.type=="time",H=c.type=="week";Qt(he.value)&&E&&(Z=V?K(E)>K(he.value):H?E>he.value:P>new Date(he.value)),Qt(T.value)&&E&&(me=V?K(E)<K(T.value):H?E<T.value:P<new Date(T.value))}if((Z||me)&&(Oe(!!Z,he.message,T.message,Wr.max,Wr.min),!i))return M(L[_].message),L}if((g||y)&&!pe&&(Qt(E)||l&&Array.isArray(E))){const Z=gi(g),me=gi(y),he=!rr(Z.value)&&E.length>+Z.value,T=!rr(me.value)&&E.length<+me.value;if((he||T)&&(Oe(he,Z.message,me.message),!i))return M(L[_].message),L}if(x&&!pe&&Qt(E)){const{value:Z,message:me}=gi(x);if(Al(Z)&&!E.match(Z)&&(L[_]={type:Wr.pattern,message:me,ref:c,..._e(Wr.pattern,me)},!i))return M(me),L}if(j){if(Lr(j)){const Z=await j(E,n),me=Vg(Z,z);if(me&&(L[_]={...me,..._e(Wr.validate,me.message)},!i))return M(me.message),L}else if(yt(j)){let Z={};for(const me in j){if(!Wt(Z)&&!i)break;const he=Vg(await j[me](E,n),z,me);he&&(Z={...he,..._e(me,he.message)},M(he.message),i&&(L[_]=Z))}if(!Wt(Z)&&(L[_]={ref:z,...Z},!i))return L}}return M(!0),L};const Dj={mode:Kr.onSubmit,reValidateMode:Kr.onChange,shouldFocusError:!0},Sv={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function $j(t={}){let e={...Dj,...t},n={...Ct(Sv),isLoading:Lr(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1},i={},o=yt(e.defaultValues)||yt(e.values)?Ct(e.defaultValues||e.values)||{}:{},l=e.shouldUnregister?{}:Ct(o),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},f={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},h,g=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={...y};let w={...v};const x={array:Lg(),state:Lg()},j=e.criteriaMode===Kr.all,_=C=>A=>{clearTimeout(g),g=setTimeout(C,A)},S=async C=>{if(!c.keepIsValid&&!e.disabled&&(v.isValid||w.isValid||C)){let A;e.resolver?(A=Wt((await pe()).errors),I()):A=await Z({fields:i,onlyCheckValid:!0,eventType:mi.VALID}),A!==n.isValid&&x.state.next({isValid:A})}},I=(C,A)=>{!e.disabled&&(v.isValidating||v.validatingFields||w.isValidating||w.validatingFields)&&((C||Array.from(f.mount)).forEach(D=>{D&&(A?tt(n.validatingFields,D,A):Et(n.validatingFields,D))}),x.state.next({validatingFields:n.validatingFields,isValidating:!Wt(n.validatingFields)}))},E=()=>{n.dirtyFields=Ea(o,l)},z=(C,A=[],D,se,ie=!0,ne=!0)=>{if(se&&D&&!e.disabled){if(c.action=!0,ne&&Array.isArray(ye(i,C))){const oe=D(ye(i,C),se.argA,se.argB);ie&&tt(i,C,oe)}if(ne&&Array.isArray(ye(n.errors,C))){const oe=D(ye(n.errors,C),se.argA,se.argB);ie&&tt(n.errors,C,oe),Fj(n.errors,C)}if((v.touchedFields||w.touchedFields)&&ne&&Array.isArray(ye(n.touchedFields,C))){const oe=D(ye(n.touchedFields,C),se.argA,se.argB);ie&&tt(n.touchedFields,C,oe)}(v.dirtyFields||w.dirtyFields)&&E(),x.state.next({name:C,isDirty:he(C,A),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else tt(l,C,A)},M=(C,A)=>{tt(n.errors,C,A),x.state.next({errors:n.errors})},L=C=>{n.errors=C,x.state.next({errors:n.errors,isValid:!1})},Q=(C,A,D,se)=>{const ie=ye(i,C);if(ie){const ne=ct(ye(l,C)),oe=ye(l,C,ct(D)?ye(o,C):D);ct(oe)||se&&se.defaultChecked||A?tt(l,C,A?oe:Mg(ie._f)):K(C,oe),c.mount&&!c.action&&(S(),ne&&n.isDirty&&(v.isDirty||w.isDirty)&&(he()||(n.isDirty=!1,x.state.next({...n}))))}},le=(C,A,D,se,ie)=>{let ne=!1,oe=!1;const Ne={name:C};if(!e.disabled){if(!D||se){(v.isDirty||w.isDirty)&&(oe=n.isDirty,n.isDirty=Ne.isDirty=he(),ne=oe!==Ne.isDirty);const De=an(ye(o,C),A);oe=!!ye(n.dirtyFields,C),De?Et(n.dirtyFields,C):tt(n.dirtyFields,C,!0),Ne.dirtyFields=n.dirtyFields,ne=ne||(v.dirtyFields||w.dirtyFields)&&oe!==!De}if(D){const De=ye(n.touchedFields,C);De||(tt(n.touchedFields,C,D),Ne.touchedFields=n.touchedFields,ne=ne||(v.touchedFields||w.touchedFields)&&De!==D)}ne&&ie&&x.state.next(Ne)}return ne?Ne:{}},ue=(C,A,D,se)=>{const ie=ye(n.errors,C),ne=(v.isValid||w.isValid)&&sn(A)&&n.isValid!==A;if(e.delayError&&D?(h=_(()=>M(C,D)),h(e.delayError)):(clearTimeout(g),h=null,D?tt(n.errors,C,D):Et(n.errors,C)),(D?!an(ie,D):ie)||!Wt(se)||ne){const oe={...se,...ne&&sn(A)?{isValid:A}:{},errors:n.errors,name:C};n={...n,...oe},x.state.next(oe)}},pe=async C=>(I(C,!0),await e.resolver(l,e.context,Oj(C||f.mount,i,e.criteriaMode,e.shouldUseNativeValidation))),_e=async C=>{const{errors:A}=await pe(C);if(I(C),C)for(const D of C){const se=ye(A,D);se?tt(n.errors,D,se):Et(n.errors,D)}else n.errors=A;return A},Oe=async({name:C,eventType:A})=>{if(t.validate){const D=await t.validate({formValues:l,formState:n,name:C,eventType:A});if(yt(D))for(const se in D)D[se]&&ke(`${Gc}.${se}`,{message:Qt(D.message)?D.message:"",type:Wr.validate});else Qt(D)||!D?ke(Gc,{message:D||"",type:Wr.validate}):Ie(Gc);return D}return!0},Z=async({fields:C,onlyCheckValid:A,name:D,eventType:se,context:ie={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(ie.runRootValidation=!0,!await Oe({name:D,eventType:se})&&(ie.valid=!1,A)))return ie.valid;for(const ne in C){const oe=C[ne];if(oe){const{_f:Ne,...De}=oe;if(Ne){const ht=f.array.has(Ne.name),kt=oe._f&&Rj(oe._f);kt&&v.validatingFields&&I([Ne.name],!0);const Pt=await Bg(oe,f.disabled,l,j,e.shouldUseNativeValidation&&!A,ht);if(kt&&v.validatingFields&&I([Ne.name]),Pt[Ne.name]&&(ie.valid=!1,A)||(!A&&(ye(Pt,Ne.name)?ht?Mj(n.errors,Pt,Ne.name):tt(n.errors,Ne.name,Pt[Ne.name]):Et(n.errors,Ne.name)),t.shouldUseNativeValidation&&Pt[Ne.name]))break}!Wt(De)&&await Z({context:ie,onlyCheckValid:A,fields:De,name:ne,eventType:se})}}return ie.valid},me=()=>{for(const C of f.unMount){const A=ye(i,C);A&&(A._f.refs?A._f.refs.every(D=>!Jc(D)):!Jc(A._f.ref))&&ir(C)}f.unMount=new Set},he=(C,A)=>!e.disabled&&(C&&A&&tt(l,C,A),!an(fe(),o)),T=(C,A,D)=>kj(C,f,{...c.mount?l:ct(A)?o:Qt(C)?{[C]:A}:A},D,A),P=C=>rf(ye(c.mount?l:o,C,e.shouldUnregister?ye(o,C,[]):[])),K=(C,A,D={})=>{const se=ye(i,C);let ie=A;if(se){const ne=se._f;ne&&(!ne.disabled&&tt(l,C,wv(A,ne)),ie=Ll(ne.ref)&&rr(A)?"":A,yv(ne.ref)?[...ne.ref.options].forEach(oe=>oe.selected=ie.includes(oe.value)):ne.refs?Za(ne.ref)?ne.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(ie)?oe.checked=!!ie.find(Ne=>Ne===oe.value):oe.checked=ie===oe.value||!!ie)}):ne.refs.forEach(oe=>oe.checked=oe.value===ie):sf(ne.ref)?ne.ref.value="":(ne.ref.value=ie,ne.ref.type||x.state.next({name:C,values:Ct(l)})))}(D.shouldDirty||D.shouldTouch)&&le(C,ie,D.shouldTouch,D.shouldDirty,!0),D.shouldValidate&&ae(C)},V=(C,A,D)=>{for(const se in A){if(!A.hasOwnProperty(se))return;const ie=A[se],ne=C+"."+se,oe=ye(i,ne);(f.array.has(C)||yt(ie)||oe&&!oe._f)&&!Ms(ie)?V(ne,ie,D):K(ne,ie,D)}},H=(C,A,D={})=>{const se=ye(i,C),ie=f.array.has(C),ne=Ct(A),oe=ye(l,C),Ne=an(oe,ne);if(tt(l,C,ne),ie)x.array.next({name:C,values:Ct(l)}),(v.isDirty||v.dirtyFields||w.isDirty||w.dirtyFields)&&D.shouldDirty&&(E(),x.state.next({name:C,dirtyFields:n.dirtyFields,isDirty:he(C,ne)}));else{const De=Array.isArray(ne)&&!ne.length||Wt(ne);!se||se._f||rr(ne)||De?K(C,ne,D):V(C,ne,D)}if(!Ne){const De=zg(C,f);x.state.next({...De&&n,name:c.mount||De?C:void 0,values:Ct(l)})}},W=C=>{const A=Lr(C)?C(l):C;an(l,A)||(l={...l,...A},x.state.next({...n,values:l}))},O=async C=>{c.mount=!0;const A=C.target;let D=A.name,se=!0;const ie=ye(i,D),ne=De=>{se=Number.isNaN(De)||Ms(De)&&isNaN(De.getTime())||an(De,ye(l,D,De))},oe=Dg(e.mode),Ne=Dg(e.reValidateMode);if(ie){let De,ht;const kt=A.type?Mg(ie._f):vj(C),Pt=C.type===mi.BLUR||C.type===mi.FOCUS_OUT,Cr=!Tj(ie._f)&&!t.validate&&!e.resolver&&!ye(n.errors,D)&&!ie._f.deps||Ij(Pt,ye(n.touchedFields,D),n.isSubmitted,Ne,oe),pn=zg(D,f,Pt);tt(l,D,kt),Pt?(!A||!A.readOnly)&&(ie._f.onBlur&&ie._f.onBlur(C),h&&h(0)):ie._f.onChange&&ie._f.onChange(C);const mn=le(D,kt,Pt),In=!Wt(mn)||pn;if(!Pt&&x.state.next({name:D,type:C.type,values:Ct(l)}),Cr)return(v.isValid||w.isValid)&&(e.mode==="onBlur"?Pt&&S():Pt||S()),In&&x.state.next({name:D,...pn?{}:mn});if(!e.resolver&&t.validate&&await Oe({name:D,eventType:C.type}),!Pt&&pn&&x.state.next({...n}),e.resolver){const{errors:gn}=await pe([D]);if(I([D]),ne(kt),se){const Jr=Ug(n.errors,i,D),yr=Ug(gn,i,Jr.name||D);De=yr.error,D=yr.name,ht=Wt(gn)}}else I([D],!0),De=(await Bg(ie,f.disabled,l,j,e.shouldUseNativeValidation))[D],I([D]),ne(kt),se&&(De?ht=!1:(v.isValid||w.isValid)&&(ht=await Z({fields:i,onlyCheckValid:!0,name:D,eventType:C.type})));se&&(ie._f.deps&&(!Array.isArray(ie._f.deps)||ie._f.deps.length>0)&&ae(ie._f.deps),ue(D,ht,De,mn))}},q=(C,A)=>{if(ye(n.errors,A)&&C.focus)return C.focus(),1},ae=async(C,A={})=>{let D,se;const ie=Oa(C);if(e.resolver){const ne=await _e(ct(C)?C:ie);D=Wt(ne),se=C?!ie.some(oe=>ye(ne,oe)):D}else C?(se=(await Promise.all(ie.map(async ne=>{const oe=ye(i,ne);return await Z({fields:oe&&oe._f?{[ne]:oe}:oe,eventType:mi.TRIGGER})}))).every(Boolean),!(!se&&!n.isValid)&&S()):se=D=await Z({fields:i,name:C,eventType:mi.TRIGGER});return x.state.next({...!Qt(C)||(v.isValid||w.isValid)&&D!==n.isValid?{}:{name:C},...e.resolver||!C?{isValid:D}:{},errors:n.errors}),A.shouldFocus&&!se&&Ra(i,q,C?ie:f.mount),se},fe=(C,A)=>{let D={...c.mount?l:o};return A&&(D=gv(A.dirtyFields?n.dirtyFields:n.touchedFields,D)),ct(C)?D:Qt(C)?ye(D,C):C.map(se=>ye(D,se))},Ee=(C,A)=>({invalid:!!ye((A||n).errors,C),isDirty:!!ye((A||n).dirtyFields,C),error:ye((A||n).errors,C),isValidating:!!ye(n.validatingFields,C),isTouched:!!ye((A||n).touchedFields,C)}),Ie=C=>{const A=C?Oa(C):void 0;A?.forEach(D=>Et(n.errors,D)),A?A.forEach(D=>{x.state.next({name:D,errors:n.errors})}):x.state.next({errors:{}})},ke=(C,A,D)=>{const se=(ye(i,C,{_f:{}})._f||{}).ref,ie=ye(n.errors,C)||{},{ref:ne,message:oe,type:Ne,...De}=ie;tt(n.errors,C,{...De,...A,ref:se}),x.state.next({name:C,errors:n.errors,isValid:!1}),D&&D.shouldFocus&&se&&se.focus&&se.focus()},Ue=(C,A)=>Lr(C)?x.state.subscribe({next:D=>"values"in D&&C(D.values||T(void 0,A),D)}):T(C,A,!0),Be=C=>x.state.subscribe({next:A=>{if(Aj(C.name,A.name,C.exact)&&Lj(A,C.formState||v,ar,C.reRenderRoot)){const D={...l};C.callback({values:D,...n,...A,defaultValues:o})}}}).unsubscribe,_t=C=>(c.mount=!0,w={...w,...C.formState},Be({...C,formState:{...y,...C.formState}})),ir=(C,A={})=>{for(const D of C?Oa(C):f.mount)f.mount.delete(D),f.array.delete(D),A.keepValue||(Et(i,D),Et(l,D)),!A.keepError&&Et(n.errors,D),!A.keepDirty&&Et(n.dirtyFields,D),!A.keepTouched&&Et(n.touchedFields,D),!A.keepIsValidating&&Et(n.validatingFields,D),!e.shouldUnregister&&!A.keepDefaultValue&&Et(o,D);x.state.next({values:Ct(l)}),x.state.next({...n,...A.keepDirty?{isDirty:he()}:{}}),!A.keepIsValid&&S()},dn=({disabled:C,name:A})=>{if(sn(C)&&c.mount||C||f.disabled.has(A)){const ie=f.disabled.has(A)!==!!C;C?f.disabled.add(A):f.disabled.delete(A),ie&&c.mount&&!c.action&&S()}},Ir=(C,A={})=>{let D=ye(i,C);const se=sn(A.disabled)||sn(e.disabled),ie=!f.registerName.has(C)&&D&&D._f&&!D._f.mount;return tt(i,C,{...D||{},_f:{...D&&D._f?D._f:{ref:{name:C}},name:C,mount:!0,...A}}),f.mount.add(C),D&&!ie?dn({disabled:sn(A.disabled)?A.disabled:e.disabled,name:C}):Q(C,!0,A.value),{...se?{disabled:A.disabled||e.disabled}:{},...e.progressive?{required:!!A.required,min:ka(A.min),max:ka(A.max),minLength:ka(A.minLength),maxLength:ka(A.maxLength),pattern:ka(A.pattern)}:{},name:C,onChange:O,onBlur:O,ref:ne=>{if(ne){f.registerName.add(C),Ir(C,A),f.registerName.delete(C),D=ye(i,C);const oe=ct(ne.value)&&ne.querySelectorAll&&ne.querySelectorAll("input,select,textarea")[0]||ne,Ne=Cj(oe),De=D._f.refs||[];if(Ne?De.find(ht=>ht===oe):oe===D._f.ref)return;tt(i,C,{_f:{...D._f,...Ne?{refs:[...De.filter(Jc),oe,...Array.isArray(ye(o,C))?[{}]:[]],ref:{type:oe.type,name:C}}:{ref:oe}}}),Q(C,!1,void 0,oe)}else D=ye(i,C,{}),D._f&&(D._f.mount=!1),(e.shouldUnregister||A.shouldUnregister)&&!(xj(f.array,C)&&c.action)&&f.unMount.add(C)}}},fn=()=>e.shouldFocusError&&Ra(i,q,f.mount),Hs=C=>{sn(C)&&(x.state.next({disabled:C}),Ra(i,(A,D)=>{const se=ye(i,D);se&&(A.disabled=se._f.disabled||C,Array.isArray(se._f.refs)&&se._f.refs.forEach(ie=>{ie.disabled=se._f.disabled||C}))},0,!1))},Ln=(C,A)=>async D=>{let se;D&&(D.preventDefault&&D.preventDefault(),D.persist&&D.persist());let ie=Ct(l);if(x.state.next({isSubmitting:!0}),e.resolver){const{errors:ne,values:oe}=await pe();I(),n.errors=ne,ie=Ct(oe)}else await Z({fields:i,eventType:mi.SUBMIT});if(f.disabled.size)for(const ne of f.disabled)Et(ie,ne);if(Et(n.errors,pv),Wt(n.errors)){x.state.next({errors:{}});try{await C(ie,D)}catch(ne){se=ne}}else A&&await A({...n.errors},D),fn(),setTimeout(fn);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Wt(n.errors)&&!se,submitCount:n.submitCount+1,errors:n.errors}),se)throw se},ws=(C,A={})=>{ye(i,C)&&(ct(A.defaultValue)?H(C,Ct(ye(o,C))):(H(C,A.defaultValue),tt(o,C,Ct(A.defaultValue))),A.keepTouched||Et(n.touchedFields,C),A.keepDirty||(Et(n.dirtyFields,C),n.isDirty=A.defaultValue?he(C,Ct(ye(o,C))):he()),A.keepError||(Et(n.errors,C),v.isValid&&S()),x.state.next({...n}))},hn=(C,A={})=>{const D=C?Ct(C):o,se=Ct(D),ie=Wt(C),ne=ie?o:se;if(A.keepDefaultValues||(o=D),!A.keepValues){if(A.keepDirtyValues){const oe=new Set([...f.mount,...Object.keys(Ea(o,l))]);for(const Ne of Array.from(oe)){const De=ye(n.dirtyFields,Ne),ht=ye(l,Ne),kt=ye(ne,Ne);De&&!ct(ht)?tt(ne,Ne,ht):!De&&!ct(kt)&&H(Ne,kt)}}else{if(tf&&ct(C))for(const oe of f.mount){const Ne=ye(i,oe);if(Ne&&Ne._f){const De=Array.isArray(Ne._f.refs)?Ne._f.refs[0]:Ne._f.ref;if(Ll(De)){const ht=De.closest("form");if(ht){ht.reset();break}}}}if(A.keepFieldsRef)for(const oe of f.mount)H(oe,ye(ne,oe));else i={}}l=e.shouldUnregister?A.keepDefaultValues?Ct(o):{}:Ct(ne),x.array.next({values:{...ne}}),x.state.next({values:{...ne}})}f={mount:A.keepDirtyValues?f.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!v.isValid||!!A.keepIsValid||!!A.keepDirtyValues||!e.shouldUnregister&&!Wt(ne),c.watch=!!e.shouldUnregister,c.keepIsValid=!!A.keepIsValid,c.action=!1,A.keepErrors||(n.errors={}),x.state.next({submitCount:A.keepSubmitCount?n.submitCount:0,isDirty:ie?!1:A.keepDirty?n.isDirty:!!(A.keepDefaultValues&&!an(C,o)),isSubmitted:A.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ie?{}:A.keepDirtyValues?A.keepDefaultValues&&l?Ea(o,l):n.dirtyFields:A.keepDefaultValues&&C?Ea(o,C):A.keepDirty?n.dirtyFields:{},touchedFields:A.keepTouched?n.touchedFields:{},errors:A.keepErrors?n.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},An=(C,A)=>hn(Lr(C)?C(l):C,{...e.resetOptions,...A}),Gr=(C,A={})=>{const D=ye(i,C),se=D&&D._f;if(se){const ie=se.refs?se.refs[0]:se.ref;ie.focus&&setTimeout(()=>{ie.focus(),A.shouldSelect&&Lr(ie.select)&&ie.select()})}},ar=C=>{n={...n,...C}},gr={control:{register:Ir,unregister:ir,getFieldState:Ee,handleSubmit:Ln,setError:ke,_subscribe:Be,_runSchema:pe,_updateIsValidating:I,_focusError:fn,_getWatch:T,_getDirty:he,_setValid:S,_setFieldArray:z,_setDisabledField:dn,_setErrors:L,_getFieldArray:P,_reset:hn,_resetDefaultValues:()=>Lr(e.defaultValues)&&e.defaultValues().then(C=>{An(C,e.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:me,_disableForm:Hs,_subjects:x,_proxyFormState:v,get _fields(){return i},get _formValues(){return l},get _state(){return c},set _state(C){c=C},get _defaultValues(){return o},get _names(){return f},set _names(C){f=C},get _formState(){return n},get _options(){return e},set _options(C){e={...e,...C}}},subscribe:_t,trigger:ae,register:Ir,handleSubmit:Ln,watch:Ue,setValue:H,setValues:W,getValues:fe,reset:An,resetField:ws,clearErrors:Ie,unregister:ir,setError:ke,setFocus:Gr,getFieldState:Ee};return{...gr,formControl:gr}}function Oi(t={}){const e=ee.useRef(void 0),n=ee.useRef(void 0),[i,o]=ee.useState(()=>({...Ct(Sv),isLoading:Lr(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Lr(t.defaultValues)?void 0:t.defaultValues}));if(!e.current)if(t.formControl)e.current={...t.formControl,formState:i},t.defaultValues&&!Lr(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:c,...f}=$j(t);e.current={...f,formState:i}}const l=e.current.control;return l._options=t,_j(()=>{const c=l._subscribe({formState:l._proxyFormState,callback:()=>o({...l._formState}),reRenderRoot:!0});return o(f=>({...f,isReady:!0})),l._formState.isReady=!0,c},[l]),ee.useEffect(()=>l._disableForm(t.disabled),[l,t.disabled]),ee.useEffect(()=>{t.mode&&(l._options.mode=t.mode),t.reValidateMode&&(l._options.reValidateMode=t.reValidateMode)},[l,t.mode,t.reValidateMode]),ee.useEffect(()=>{t.errors&&(l._setErrors(t.errors),l._focusError())},[l,t.errors]),ee.useEffect(()=>{t.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,t.shouldUnregister]),ee.useEffect(()=>{if(l._proxyFormState.isDirty){const c=l._getDirty();c!==i.isDirty&&l._subjects.state.next({isDirty:c})}},[l,i.isDirty]),ee.useEffect(()=>{var c;t.values&&!an(t.values,n.current)?(l._reset(t.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((c=l._options.resetOptions)===null||c===void 0)&&c.keepIsValid||l._setValid(),n.current=t.values,o(f=>({...f}))):l._resetDefaultValues()},[l,t.values]),ee.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),e.current.formState=ee.useMemo(()=>Sj(i,l),[l,i]),e.current}const Hg=(t,e,n)=>{if(t&&"reportValidity"in t){const i=ye(n,e);t.setCustomValidity(i&&i.message||""),t.reportValidity()}},_v=(t,e)=>{for(const n in e.fields){const i=e.fields[n];i&&i.ref&&"reportValidity"in i.ref?Hg(i.ref,n,t):i.refs&&i.refs.forEach(o=>Hg(o,n,t))}},zj=(t,e)=>{e.shouldUseNativeValidation&&_v(t,e);const n={};for(const i in t){const o=ye(e.fields,i),l=Object.assign(t[i]||{},{ref:o&&o.ref});if(Uj(e.names||Object.keys(t),i)){const c=Object.assign({},ye(n,i));tt(c,"root",l),tt(n,i,c)}else tt(n,i,l)}return n},Uj=(t,e)=>t.some(n=>n.startsWith(e+"."));var Vj=function(t,e){for(var n={};t.length;){var i=t[0],o=i.code,l=i.message,c=i.path.join(".");if(!n[c])if("unionErrors"in i){var f=i.unionErrors[0].errors[0];n[c]={message:f.message,type:f.code}}else n[c]={message:l,type:o};if("unionErrors"in i&&i.unionErrors.forEach(function(y){return y.errors.forEach(function(v){return t.push(v)})}),e){var h=n[c].types,g=h&&h[i.code];n[c]=mv(c,e,n,o,g?[].concat(g,i.message):i.message)}t.shift()}return n},Ri=function(t,e,n){return n===void 0&&(n={}),function(i,o,l){try{return Promise.resolve((function(c,f){try{var h=Promise.resolve(t[n.mode==="sync"?"parse":"parseAsync"](i,e)).then(function(g){return l.shouldUseNativeValidation&&_v({},l),{errors:{},values:n.raw?i:g}})}catch(g){return f(g)}return h&&h.then?h.then(void 0,f):h})(0,function(c){if((function(f){return Array.isArray(f?.errors)})(c))return{values:{},errors:zj(Vj(c.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw c}))}catch(c){return Promise.reject(c)}}};const mt=B.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:xt("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));mt.displayName="Card";const Kt=B.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:xt("flex flex-col space-y-1.5 p-6",t),...e}));Kt.displayName="CardHeader";const Zt=B.forwardRef(({className:t,...e},n)=>m.jsx("h3",{ref:n,className:xt("text-lg font-semibold leading-none tracking-tight",t),...e}));Zt.displayName="CardTitle";const Gt=B.forwardRef(({className:t,...e},n)=>m.jsx("p",{ref:n,className:xt("text-sm text-muted-foreground",t),...e}));Gt.displayName="CardDescription";const gt=B.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:xt("p-6 pt-0",t),...e}));gt.displayName="CardContent";const Bj=B.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:xt("flex items-center p-6 pt-0",t),...e}));Bj.displayName="CardFooter";const zt=B.forwardRef(({className:t,type:e="text",...n},i)=>m.jsx("input",{type:e,ref:i,className:xt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...n}));zt.displayName="Input";const Xe=B.forwardRef(({className:t,...e},n)=>m.jsx("label",{ref:n,className:xt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...e}));Xe.displayName="Label";function gs({className:t,...e}){return m.jsx("div",{className:xt("animate-pulse rounded-md bg-muted",t),...e})}const Hj=ot({domain:X(),entity_types:nr(X()),predicates:nr(X()),attribute_count:Fe().int()}),qj=nr(Hj),Wj={list:()=>St.get("/domains",qj)},Qj=ot({domain:X(),entity_types:nr(X()),predicates:nr(X()),attributes:nr(X()),aliases:zl(X(),X()).default({})}),Kj={get:t=>St.get(`/ontology/${encodeURIComponent(t)}`,Qj)};function Zj(){return vs({queryKey:Je.domains.list(),queryFn:()=>Wj.list(),staleTime:1e3*60*30})}function Gj(t){return vs({queryKey:Je.ontology.byDomain(t??""),queryFn:()=>Kj.get(t),enabled:!!t,staleTime:1e3*60*30})}const Jj=/^[a-zA-Z0-9_-]+$/,Yj=ot({project_name:X().min(2,"최소 2자 이상").max(64,"최대 64자").regex(Jj,"영문/숫자/_/- 만 허용"),domain:X().min(1,"도메인을 선택하세요")});function Xj(){const t=Tn(),{t:e}=xs(),{data:n,isLoading:i,isError:o,error:l,refetch:c}=Zj(),f=hj(),{register:h,handleSubmit:g,watch:y,setValue:v,formState:{errors:w,isSubmitting:x}}=Oi({resolver:Ri(Yj),defaultValues:{project_name:"",domain:""}}),j=y("domain"),_=async S=>{const I=n?.find(E=>E.domain===S.domain);try{const E=await f.mutateAsync({project_name:S.project_name,domain:S.domain,target_entities:I?.entity_types??[]});$t.success(e("onboarding.created","프로젝트가 생성되었습니다: {{name}}",{name:E.name})),t(`/sources/${E.name}`)}catch(E){$t.error(e("onboarding.createFailed","생성 실패: {{msg}}",{msg:E.message}))}};return m.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-10",children:[m.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>t("/"),"aria-label":e("common.back","이전"),children:m.jsx(Ka,{className:"h-4 w-4"})}),m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:e("onboarding.title","새 프로젝트 만들기")})]}),m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:e("onboarding.formTitle","온톨로지 도메인 선택")}),m.jsx(Gt,{children:e("onboarding.formDesc","어떤 종류의 온톨로지를 구축할지 도메인을 선택하고 프로젝트 이름을 정해주세요.")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:g(_),className:"space-y-6",noValidate:!0,children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(Xe,{htmlFor:"project_name",children:e("onboarding.projectName","프로젝트 이름")}),m.jsx(zt,{id:"project_name",placeholder:"my_perfume_project","aria-invalid":!!w.project_name,...h("project_name")}),w.project_name&&m.jsx("p",{className:"text-sm text-destructive",children:w.project_name.message}),m.jsx("p",{className:"text-xs text-muted-foreground",children:e("onboarding.projectNameHint","영문, 숫자, _ , - 만 사용 (2~64자)")})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(Xe,{children:e("onboarding.domain","도메인")}),o&&m.jsx(mt,{className:"border-destructive",children:m.jsxs(gt,{className:"flex items-center justify-between gap-3 py-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[m.jsx(zs,{className:"h-4 w-4"}),m.jsx("span",{children:l.message})]}),m.jsx(Ye,{variant:"outline",size:"sm",type:"button",onClick:()=>c(),children:e("common.retry","다시 시도")})]})}),i&&m.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:Array.from({length:4}).map((S,I)=>m.jsx(gs,{className:"h-24"},I))}),n&&m.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:n.map(S=>{const I=j===S.domain;return m.jsxs("button",{type:"button",onClick:()=>v("domain",S.domain,{shouldValidate:!0}),className:xt("rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",I&&"border-primary bg-accent/60"),children:[m.jsx("div",{className:"mb-1 font-semibold capitalize",children:S.domain}),m.jsx("div",{className:"text-xs text-muted-foreground",children:e("onboarding.domainSummary",{entities:S.entity_types.length,predicates:S.predicates.length,defaultValue:"엔티티 {{entities}}종 · 관계 {{predicates}}개"})}),m.jsxs("div",{className:"mt-2 line-clamp-2 text-xs text-muted-foreground/70",children:[S.entity_types.slice(0,5).join(", "),S.entity_types.length>5&&" …"]})]},S.domain)})}),w.domain&&m.jsx("p",{className:"text-sm text-destructive",children:w.domain.message})]}),m.jsxs("div",{className:"flex justify-end gap-3 border-t pt-4",children:[m.jsx(Ye,{type:"button",variant:"outline",onClick:()=>t("/"),disabled:x||f.isPending,children:e("common.cancel","취소")}),m.jsxs(Ye,{type:"submit",disabled:x||f.isPending,children:[f.isPending&&m.jsx(ls,{className:"h-4 w-4 animate-spin"}),e("onboarding.submit","프로젝트 만들기")]})]})]})})]})]})}const eC=ot({id:kr([X(),Fe()]).transform(String),name:X(),type:X(),base_url:X().nullable().optional(),trust_level:Fe().nullable().optional(),respect_robots_txt:Bs().nullable().optional(),rate_limit_per_minute:Fe().nullable().optional()}),tC=ot({ok:Bs(),deleted:X()}),kv={create:(t,e)=>St.post(`/projects/${encodeURIComponent(t)}/sources`,eC,e),delete:(t,e)=>St.delete(`/projects/${encodeURIComponent(t)}/sources/${encodeURIComponent(e)}`,tC)};function rC(t){const e=jr();return Zr({mutationFn:n=>kv.create(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.projects.detail(t)})}})}function nC(t){const e=jr();return Zr({mutationFn:n=>kv.delete(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.projects.detail(t)})}})}const jv=["official","review","blog","news","community","unknown"],sC=ot({name:X().min(2,"최소 2자 이상").max(64,"최대 64자").regex(/^[a-zA-Z0-9_-]+$/,"영문/숫자/_/-만 허용"),type:cv(jv),base_url:X().url("올바른 URL 형식이 아닙니다").or(uv("")).optional(),trust_level:Fe({invalid_type_error:"0~1 사이의 숫자"}).min(0).max(1),rate_limit_per_minute:Fe({invalid_type_error:"양의 정수"}).int().min(1).max(600),respect_robots_txt:Bs()});function iC(){const t=Tn(),{projectId:e}=Qa(),{t:n}=xs(),i=e??"",{data:o,isLoading:l,isError:c,error:f,refetch:h}=Ul(i),g=rC(i),y=nC(i),{register:v,handleSubmit:w,reset:x,formState:{errors:j,isSubmitting:_}}=Oi({resolver:Ri(sC),defaultValues:{name:"",type:"official",base_url:"",trust_level:.7,rate_limit_per_minute:30,respect_robots_txt:!0}}),S=async E=>{try{await g.mutateAsync({...E,base_url:E.base_url||null}),$t.success(n("sources.added","소스가 추가되었습니다: {{name}}",{name:E.name})),x()}catch(z){$t.error(n("sources.addFailed","추가 실패: {{msg}}",{msg:z.message}))}},I=async E=>{if(confirm(n("sources.confirmDelete","정말 '{{name}}' 소스를 삭제하시겠습니까?",{name:E})))try{await y.mutateAsync(E),$t.success(n("sources.deleted","소스가 삭제되었습니다: {{name}}",{name:E}))}catch(z){$t.error(n("sources.deleteFailed","삭제 실패: {{msg}}",{msg:z.message}))}};return m.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-10",children:[m.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>t("/"),"aria-label":n("common.back","이전"),children:m.jsx(Ka,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n("sources.title","참고 소스 설정")}),o&&m.jsxs("p",{className:"text-sm text-muted-foreground",children:[o.name," ",m.jsxs("span",{className:"capitalize text-muted-foreground/70",children:["· ",o.domain]})]})]}),m.jsxs(Ye,{onClick:()=>t(`/crawl/${i}`),disabled:!o||(o.sources?.length??0)===0,children:[n("sources.next","크롤 진행"),m.jsx(Dy,{className:"h-4 w-4"})]})]}),c&&m.jsx(mt,{className:"mb-6 border-destructive",children:m.jsxs(gt,{className:"flex items-center justify-between gap-3 py-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[m.jsx(zs,{className:"h-4 w-4"}),m.jsx("span",{children:f.message})]}),m.jsx(Ye,{variant:"outline",size:"sm",type:"button",onClick:()=>h(),children:n("common.retry","다시 시도")})]})}),m.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_360px]",children:[m.jsx("section",{children:m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("sources.listTitle","등록된 소스")}),m.jsx(Gt,{children:n("sources.listDesc","프로젝트 온톨로지 구축에 사용할 참고 사이트 목록")})]}),m.jsxs(gt,{children:[l&&m.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((E,z)=>m.jsx(gs,{className:"h-16"},z))}),o&&o.sources.length===0&&m.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:n("sources.empty","아직 등록된 소스가 없습니다. 오른쪽 폼에서 추가하세요.")}),o&&o.sources.length>0&&m.jsx("ul",{className:"divide-y",children:o.sources.map(E=>m.jsxs("li",{className:"flex items-center justify-between gap-4 py-3",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-medium",children:E.name}),m.jsx("span",{className:"rounded bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground",children:E.type}),typeof E.trust_level=="number"&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[n("sources.trust","신뢰도")," ",E.trust_level.toFixed(2)]})]}),E.base_url&&m.jsxs("a",{href:E.base_url,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[m.jsx(e_,{className:"h-3 w-3"}),E.base_url]})]}),m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>I(E.name),disabled:y.isPending,"aria-label":n("sources.delete","삭제"),children:m.jsx(gd,{className:"h-4 w-4 text-destructive"})})]},E.id))})]})]})}),m.jsx("aside",{children:m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("sources.addTitle","소스 추가")}),m.jsx(Gt,{children:n("sources.addDesc","참고할 사이트 정보를 입력하세요")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:w(S),className:"space-y-4",noValidate:!0,children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"src_name",children:n("sources.name","이름")}),m.jsx(zt,{id:"src_name",placeholder:"official_brand_site",...v("name")}),j.name&&m.jsx("p",{className:"text-xs text-destructive",children:j.name.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"src_type",children:n("sources.type","타입")}),m.jsx("select",{id:"src_type",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",...v("type"),children:jv.map(E=>m.jsx("option",{value:E,children:E},E))})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"src_url",children:n("sources.baseUrl","Base URL")}),m.jsx(zt,{id:"src_url",placeholder:"https://example.com",type:"url",...v("base_url")}),j.base_url&&m.jsx("p",{className:"text-xs text-destructive",children:j.base_url.message})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"src_trust",children:n("sources.trust","신뢰도")}),m.jsx(zt,{id:"src_trust",type:"number",step:"0.05",min:0,max:1,...v("trust_level",{valueAsNumber:!0})}),j.trust_level&&m.jsx("p",{className:"text-xs text-destructive",children:j.trust_level.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"src_rate",children:n("sources.rateLimit","rate/분")}),m.jsx(zt,{id:"src_rate",type:"number",min:1,max:600,...v("rate_limit_per_minute",{valueAsNumber:!0})}),j.rate_limit_per_minute&&m.jsx("p",{className:"text-xs text-destructive",children:j.rate_limit_per_minute.message})]})]}),m.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[m.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...v("respect_robots_txt")}),m.jsx("span",{children:n("sources.respectRobots","robots.txt 준수")})]}),m.jsxs(Ye,{type:"submit",className:"w-full",disabled:_||g.isPending,children:[g.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(za,{className:"h-4 w-4"}),n("sources.add","소스 추가")]})]})})]})})]})]})}const En=B.forwardRef(({className:t,children:e,...n},i)=>m.jsx("select",{ref:i,className:xt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e}));En.displayName="Select";const Cv=B.forwardRef(({className:t,value:e=0,max:n=100,indeterminate:i,...o},l)=>{const c=Math.min(100,Math.max(0,e/n*100));return m.jsx("div",{ref:l,role:"progressbar","aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":i?void 0:e,className:xt("relative h-2 w-full overflow-hidden rounded-full bg-secondary",t),...o,children:m.jsx("div",{className:xt("h-full bg-primary transition-all",i&&"w-1/3 animate-pulse"),style:i?void 0:{width:`${c}%`}})})});Cv.displayName="Progress";const aC=iv("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800",warning:"border-transparent bg-yellow-100 text-yellow-800"}},defaultVariants:{variant:"default"}});function bi({className:t,variant:e,...n}){return m.jsx("span",{className:xt(aC({variant:e}),t),...n})}const oC=kr([X(),Fe()]).transform(String),qg=ot({url:X().optional(),status:X().optional(),page_type:X().optional(),title:X().nullable().optional(),error:X().nullable().optional()}).passthrough(),lC=ot({seed_url:X().optional(),visited_count:Fe().optional(),analyzed_count:Fe().optional(),queued_count:Fe().optional(),skipped_count:Fe().optional(),errors:nr(X()).optional(),pages:nr(qg).optional(),latest_page:qg.optional()}).passthrough(),Yc=ot({job_id:oC,status:X(),url:X().nullable().optional(),error:X().nullable().optional(),scheduled_at:X().nullable().optional(),started_at:X().nullable().optional(),finished_at:X().nullable().optional(),progress:lC.default({}),request:zl(X(),Mi()).default({})}),uC=new Set(["completed","failed","canceled"]);function Ev(t){return uC.has(t)}const of={startByProject:t=>St.post("/crawl-site/by-project",Yc,t),getJob:t=>St.get(`/crawl-site/jobs/${encodeURIComponent(t)}`,Yc),cancel:t=>St.post(`/crawl-site/jobs/${encodeURIComponent(t)}/cancel`,Yc)},Wg=2e3;function cC(){const t=jr();return Zr({mutationFn:e=>of.startByProject(e),onSuccess:e=>{t.setQueryData(Je.crawl.job(e.job_id),e)}})}function dC(t){return vs({queryKey:Je.crawl.job(t??""),queryFn:()=>of.getJob(t),enabled:!!t,refetchInterval:e=>{const n=e.state.data;return n&&Ev(n.status)?!1:Wg},refetchIntervalInBackground:!1})}function fC(){const t=jr();return Zr({mutationFn:e=>of.cancel(e),onSuccess:e=>{t.setQueryData(Je.crawl.job(e.job_id),e)}})}const hC=ot({source_name:X().min(1,"소스를 선택하세요"),url:X().url("올바른 URL 형식이 아닙니다"),max_depth:Fe().int().min(0).max(10),max_pages:Fe().int().min(1).max(500),same_domain_only:Bs()});function pC(t){switch(t){case"completed":return"success";case"failed":return"destructive";case"canceled":return"secondary";case"cancel_requested":return"warning";case"running":case"pending":return"default";default:return"outline"}}function mC({status:t}){return m.jsx(bi,{variant:pC(t),children:t})}function gC(){const t=Tn(),{projectId:e}=Qa(),{t:n}=xs(),i=e??"",{data:o,isLoading:l,isError:c,error:f,refetch:h}=Ul(i),[g,y]=B.useState(null),{data:v}=dC(g),w=cC(),x=fC(),{register:j,handleSubmit:_,setValue:S,watch:I,formState:{errors:E,isSubmitting:z}}=Oi({resolver:Ri(hC),defaultValues:{source_name:"",url:"",max_depth:2,max_pages:30,same_domain_only:!0}}),M=async V=>{try{const H=await w.mutateAsync({project_name:i,...V});y(H.job_id),$t.success(n("crawl.started","크롤이 시작되었습니다 (job #{{id}})",{id:H.job_id}))}catch(H){$t.error(n("crawl.startFailed","시작 실패: {{msg}}",{msg:H.message}))}},L=async()=>{if(g)try{await x.mutateAsync(g),$t.info(n("crawl.cancelRequested","취소 요청됨"))}catch(V){$t.error(n("crawl.cancelFailed","취소 실패: {{msg}}",{msg:V.message}))}},Q=o?.sources??[],le=I("source_name"),ue=Q.find(V=>V.name===le),pe=v?.progress,_e=pe?.visited_count??0,Oe=pe?.queued_count??0,Z=pe?.analyzed_count??0,me=pe?.errors??[],he=I("max_pages"),T=v&&he?Math.min(100,_e/he*100):0,P=v?Ev(v.status):!1,K=v&&!P;return m.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-10",children:[m.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":n("common.back","이전"),children:m.jsx(Ka,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n("crawl.title","시드 크롤")}),o&&m.jsxs("p",{className:"text-sm text-muted-foreground",children:[o.name,m.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",o.domain]})]})]}),P&&v?.status==="completed"&&m.jsxs(Ye,{onClick:()=>t(`/review/${i}`),children:[n("crawl.review","결과 검토"),m.jsx(Dy,{className:"h-4 w-4"})]})]}),c&&m.jsx(mt,{className:"mb-6 border-destructive",children:m.jsxs(gt,{className:"flex items-center justify-between gap-3 py-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[m.jsx(zs,{className:"h-4 w-4"}),m.jsx("span",{children:f.message})]}),m.jsx(Ye,{variant:"outline",size:"sm",type:"button",onClick:()=>h(),children:n("common.retry","다시 시도")})]})}),m.jsxs("div",{className:"grid gap-6 lg:grid-cols-[420px_1fr]",children:[m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("crawl.formTitle","크롤 설정")}),m.jsx(Gt,{children:n("crawl.formDesc","시드 URL에서 시작해 링크를 따라가며 정보를 추출합니다")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:_(M),className:"space-y-4",noValidate:!0,children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"source_name",children:n("crawl.source","참고 소스")}),l?m.jsx(gs,{className:"h-10"}):m.jsxs(En,{id:"source_name",...j("source_name"),onChange:V=>S("source_name",V.target.value,{shouldValidate:!0}),children:[m.jsx("option",{value:"",children:n("crawl.pickSource","소스를 선택하세요...")}),Q.map(V=>m.jsxs("option",{value:V.name,children:[V.name," (",V.type,")"]},V.id))]}),Q.length===0&&!l&&m.jsxs("p",{className:"text-xs text-muted-foreground",children:[n("crawl.noSources","등록된 소스가 없습니다. 먼저 참고 소스를 추가하세요.")," ",m.jsx("button",{type:"button",className:"text-primary underline",onClick:()=>t(`/sources/${i}`),children:n("crawl.addSource","소스 추가")})]}),E.source_name&&m.jsx("p",{className:"text-xs text-destructive",children:E.source_name.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"url",children:n("crawl.seedUrl","시드 URL")}),m.jsx(zt,{id:"url",placeholder:ue?.base_url??"https://example.com/start",...j("url")}),E.url&&m.jsx("p",{className:"text-xs text-destructive",children:E.url.message})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"max_depth",children:n("crawl.maxDepth","최대 깊이")}),m.jsx(zt,{id:"max_depth",type:"number",min:0,max:10,...j("max_depth",{valueAsNumber:!0})}),E.max_depth&&m.jsx("p",{className:"text-xs text-destructive",children:E.max_depth.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"max_pages",children:n("crawl.maxPages","최대 페이지")}),m.jsx(zt,{id:"max_pages",type:"number",min:1,max:500,...j("max_pages",{valueAsNumber:!0})}),E.max_pages&&m.jsx("p",{className:"text-xs text-destructive",children:E.max_pages.message})]})]}),m.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[m.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...j("same_domain_only")}),m.jsx("span",{children:n("crawl.sameDomainOnly","동일 도메인만 따라가기")})]}),m.jsxs(Ye,{type:"submit",className:"w-full",disabled:z||w.isPending||!!K,children:[w.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(l_,{className:"h-4 w-4"}),n("crawl.start","크롤 시작")]})]})})]}),m.jsxs(mt,{children:[m.jsx(Kt,{children:m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx(Zt,{children:n("crawl.progressTitle","진행 상태")}),v&&m.jsxs(Gt,{className:"flex items-center gap-2",children:[m.jsxs("span",{children:["job #",v.job_id]}),m.jsx(mC,{status:v.status})]})]}),K&&m.jsxs(Ye,{variant:"outline",size:"sm",onClick:L,disabled:x.isPending,children:[m.jsx(YS,{className:"h-4 w-4"}),n("crawl.cancel","취소")]})]})}),m.jsxs(gt,{children:[!v&&m.jsxs("div",{className:"flex flex-col items-center gap-3 py-12 text-center text-muted-foreground",children:[m.jsx(r_,{className:"h-12 w-12 opacity-40"}),m.jsx("p",{children:n("crawl.idleHint","왼쪽에서 시드 URL을 입력하고 시작하세요")})]}),v&&m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"mb-1 flex items-center justify-between text-sm",children:[m.jsxs("span",{className:"text-muted-foreground",children:[n("crawl.visited","방문")," ",_e," / ",he]}),m.jsxs("span",{className:"text-muted-foreground",children:[n("crawl.queued","대기")," ",Oe," ·"," ",n("crawl.analyzed","분석")," ",Z]})]}),m.jsx(Cv,{value:T,indeterminate:K&&_e===0})]}),v.url&&m.jsxs("div",{className:"rounded-md bg-secondary/30 px-3 py-2 text-xs",children:[m.jsx("div",{className:"text-muted-foreground",children:n("crawl.seedUrl","시드 URL")}),m.jsx("a",{href:v.url,target:"_blank",rel:"noopener noreferrer",className:"break-all text-foreground hover:underline",children:v.url})]}),pe?.latest_page&&m.jsxs("div",{className:"rounded-md border bg-background px-3 py-2 text-xs",children:[m.jsx("div",{className:"mb-1 text-muted-foreground",children:n("crawl.latestPage","최근 페이지")}),m.jsx("div",{className:"truncate font-medium",children:pe.latest_page.title||pe.latest_page.url}),pe.latest_page.page_type&&m.jsx(bi,{variant:"outline",className:"mt-1",children:pe.latest_page.page_type})]}),v.error&&m.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive bg-destructive/5 px-3 py-2 text-sm text-destructive",children:[m.jsx(h_,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),m.jsx("span",{children:v.error})]}),me.length>0&&m.jsxs("details",{className:"rounded-md border bg-background",children:[m.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:n("crawl.errorsCount","에러 {{count}}건",{count:me.length})}),m.jsx("ul",{className:"max-h-40 overflow-y-auto px-4 py-2 text-xs text-muted-foreground",children:me.map((V,H)=>m.jsx("li",{className:"border-b py-1 last:border-0",children:V},H))})]}),P&&v.status==="completed"&&m.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-700",children:[m.jsx(zy,{className:"h-4 w-4"}),n("crawl.doneHint","크롤 완료. 결과 검토로 이동하세요.")]})]})]})]})]})]})}const lf=B.forwardRef(({className:t,...e},n)=>m.jsx("textarea",{ref:n,className:xt("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e}));lf.displayName="Textarea";const Fd=kr([X(),Fe()]).transform(String),yC=ot({job_id:Fd.optional(),project_id:Fd.optional(),project_name:X().optional(),goal:X().optional(),status:X().optional(),started_at:X().nullable().optional(),finished_at:X().nullable().optional(),steps_taken:Fe().optional(),pages_visited:Fe().optional(),entities_found:Fe().optional(),claims_added:Fe().optional(),error:X().nullable().optional()}).passthrough(),Nv=ot({job_id:Fd,status:X().optional(),goal:X().nullable().optional(),seed_url:X().nullable().optional(),started_at:X().nullable().optional(),finished_at:X().nullable().optional(),steps_taken:Fe().nullable().optional(),pages_visited:Fe().nullable().optional(),entities_found:Fe().nullable().optional()}).passthrough(),vC=nr(Nv),xC=Nv.extend({trace:nr(zl(X(),Mi())).optional()}),Pv={startByProject:t=>St.post("/research/run/by-project",yC,t),listSessions:(t,e=25)=>St.get(`/projects/${encodeURIComponent(t)}/research/sessions`,vC,{query:{limit:e}}),getSession:t=>St.get(`/research/sessions/${encodeURIComponent(t)}`,xC)};function wC(t){const e=jr();return Zr({mutationFn:n=>Pv.startByProject(n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.research.sessions(t)})}})}function bC(t,e=25){return vs({queryKey:Je.research.sessions(t),queryFn:()=>Pv.listSessions(t,e),enabled:!!t})}const SC=ot({source_name:X().min(1,"소스를 선택하세요"),url:X().url("올바른 URL 형식이 아닙니다").or(uv("")).optional(),goal:X().min(3,"최소 3자").max(500,"최대 500자"),max_depth:Fe().int().min(0).max(10),max_steps:Fe().int().min(1).max(50),max_branch:Fe().int().min(1).max(30),min_relevance:Fe().min(0).max(1),same_domain_only:Bs()});function _C(t){switch(t){case"completed":return"success";case"failed":return"destructive";case"canceled":return"secondary";case"running":case"pending":return"default";default:return"outline"}}function kC(){const t=Tn(),{projectId:e}=Qa(),{t:n}=xs(),i=e??"",{data:o,isLoading:l,isError:c,error:f,refetch:h}=Ul(i),g=bC(i),y=wC(i),[v,w]=B.useState(null),{register:x,handleSubmit:j,setValue:_,formState:{errors:S,isSubmitting:I}}=Oi({resolver:Ri(SC),defaultValues:{source_name:"",url:"",goal:"Semantic ontology exploration",max_depth:2,max_steps:12,max_branch:8,min_relevance:.35,same_domain_only:!0}}),E=async M=>{try{w(null);const L=await y.mutateAsync({project_name:i,source_name:M.source_name,url:M.url||void 0,goal:M.goal,max_depth:M.max_depth,max_steps:M.max_steps,max_branch:M.max_branch,min_relevance:M.min_relevance,same_domain_only:M.same_domain_only});w(L),$t.success(n("research.completed","자율 연구가 완료되었습니다"))}catch(L){$t.error(n("research.failed","실패: {{msg}}",{msg:L.message}))}},z=o?.sources??[];return m.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-10",children:[m.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":n("common.back","이전"),children:m.jsx(Ka,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex-1",children:[m.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[m.jsx($y,{className:"h-6 w-6 text-primary"}),n("research.title","자율 연구")]}),o&&m.jsxs("p",{className:"text-sm text-muted-foreground",children:[o.name,m.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",o.domain]})]})]})]}),c&&m.jsx(mt,{className:"mb-6 border-destructive",children:m.jsxs(gt,{className:"flex items-center justify-between gap-3 py-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[m.jsx(zs,{className:"h-4 w-4"}),m.jsx("span",{children:f.message})]}),m.jsx(Ye,{variant:"outline",size:"sm",type:"button",onClick:()=>h(),children:n("common.retry","다시 시도")})]})}),m.jsxs("div",{className:"grid gap-6 lg:grid-cols-[460px_1fr]",children:[m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsxs(Zt,{className:"flex items-center gap-2",children:[m.jsx(d_,{className:"h-5 w-5"}),n("research.formTitle","자율 연구 설정")]}),m.jsx(Gt,{children:n("research.formDesc","AI가 시드에서 시작해 스스로 링크를 따라가며 온톨로지를 확장합니다")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:j(E),className:"space-y-4",noValidate:!0,children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"source_name",children:n("research.source","참고 소스")}),l?m.jsx(gs,{className:"h-10"}):m.jsxs(En,{id:"source_name",...x("source_name"),onChange:M=>_("source_name",M.target.value,{shouldValidate:!0}),children:[m.jsx("option",{value:"",children:n("research.pickSource","소스를 선택하세요...")}),z.map(M=>m.jsxs("option",{value:M.name,children:[M.name," (",M.type,")"]},M.id))]}),S.source_name&&m.jsx("p",{className:"text-xs text-destructive",children:S.source_name.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"goal",children:n("research.goal","목표")}),m.jsx(lf,{id:"goal",rows:2,placeholder:n("research.goalPlaceholder","예: 인기 브랜드 향수의 노트 구성과 시즌 추천 정보 수집"),...x("goal")}),S.goal&&m.jsx("p",{className:"text-xs text-destructive",children:S.goal.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsxs(Xe,{htmlFor:"url",children:[n("research.seedUrl","시드 URL")," ",m.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",n("research.optional","선택"),")"]})]}),m.jsx(zt,{id:"url",placeholder:"https://example.com/start",...x("url")}),S.url&&m.jsx("p",{className:"text-xs text-destructive",children:S.url.message})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"max_steps",children:n("research.maxSteps","최대 단계")}),m.jsx(zt,{id:"max_steps",type:"number",min:1,max:50,...x("max_steps",{valueAsNumber:!0})}),S.max_steps&&m.jsx("p",{className:"text-xs text-destructive",children:S.max_steps.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"max_branch",children:n("research.maxBranch","분기 폭")}),m.jsx(zt,{id:"max_branch",type:"number",min:1,max:30,...x("max_branch",{valueAsNumber:!0})}),S.max_branch&&m.jsx("p",{className:"text-xs text-destructive",children:S.max_branch.message})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"max_depth",children:n("research.maxDepth","최대 깊이")}),m.jsx(zt,{id:"max_depth",type:"number",min:0,max:10,...x("max_depth",{valueAsNumber:!0})})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{htmlFor:"min_relevance",children:n("research.minRelevance","최소 관련도")}),m.jsx(zt,{id:"min_relevance",type:"number",step:"0.05",min:0,max:1,...x("min_relevance",{valueAsNumber:!0})})]})]}),m.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[m.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...x("same_domain_only")}),m.jsx("span",{children:n("research.sameDomainOnly","동일 도메인만 탐색")})]}),m.jsxs(Ye,{type:"submit",className:"w-full",disabled:I||y.isPending,children:[y.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(c_,{className:"h-4 w-4"}),n("research.start","자율 연구 시작")]}),y.isPending&&m.jsx("p",{className:"text-xs text-muted-foreground",children:n("research.runningHint","장시간 걸릴 수 있습니다. 완료될 때까지 페이지를 닫지 마세요.")})]})})]}),m.jsxs("div",{className:"space-y-6",children:[m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("research.resultTitle","최근 결과")}),m.jsx(Gt,{children:n("research.resultDesc","이번 세션에서 실행된 연구의 결과")})]}),m.jsxs(gt,{children:[!v&&!y.isPending&&m.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:n("research.idleHint","왼쪽에서 자율 연구를 시작하면 결과가 여기에 표시됩니다")}),y.isPending&&m.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center text-muted-foreground",children:[m.jsx(ls,{className:"h-8 w-8 animate-spin text-primary"}),m.jsx("p",{children:n("research.runningTitle","AI가 연구 중입니다...")})]}),v&&!y.isPending&&m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-700",children:[m.jsx(zy,{className:"h-4 w-4"}),n("research.doneHint","완료")]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm sm:grid-cols-4",children:[m.jsx(fl,{label:n("research.stepsTaken","단계"),value:v.steps_taken}),m.jsx(fl,{label:n("research.pagesVisited","페이지"),value:v.pages_visited}),m.jsx(fl,{label:n("research.entitiesFound","엔티티"),value:v.entities_found}),m.jsx(fl,{label:n("research.claimsAdded","클레임"),value:v.claims_added})]}),v.error&&m.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive bg-destructive/5 px-3 py-2 text-sm text-destructive",children:[m.jsx(zs,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),m.jsx("span",{children:v.error})]}),m.jsxs("details",{className:"rounded-md border bg-background",children:[m.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:n("research.rawResult","원시 응답 JSON")}),m.jsx("pre",{className:"max-h-64 overflow-auto px-4 py-2 text-xs text-muted-foreground",children:JSON.stringify(v,null,2)})]})]})]})]}),m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsxs(Zt,{className:"flex items-center gap-2",children:[m.jsx(n_,{className:"h-5 w-5"}),n("research.historyTitle","세션 이력")]}),m.jsx(Gt,{children:n("research.historyDesc","이 프로젝트의 자율 연구 세션 기록")})]}),m.jsxs(gt,{children:[g.isLoading&&m.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((M,L)=>m.jsx(gs,{className:"h-12"},L))}),g.data&&g.data.length===0&&m.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:n("research.historyEmpty","아직 실행된 세션이 없습니다")}),g.data&&g.data.length>0&&m.jsx("ul",{className:"divide-y",children:g.data.map(M=>m.jsxs("li",{className:"flex items-center justify-between gap-3 py-3 text-sm",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs("span",{className:"font-medium",children:["#",M.job_id]}),M.status&&m.jsx(bi,{variant:_C(M.status),children:M.status})]}),M.goal&&m.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:M.goal})]}),m.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[typeof M.pages_visited=="number"&&m.jsxs("div",{children:[M.pages_visited," ",n("research.pages","페이지")]}),M.started_at&&m.jsx("div",{children:new Date(M.started_at).toLocaleString()})]})]},M.job_id))})]})]})]})]})]})}function fl({label:t,value:e}){return m.jsxs("div",{className:"rounded-md border bg-background px-3 py-2",children:[m.jsx("div",{className:"text-xs text-muted-foreground",children:t}),m.jsx("div",{className:"mt-1 text-xl font-semibold",children:typeof e=="number"?e:"—"})]})}const Ov=B.createContext(null);function Rv(){const t=B.useContext(Ov);if(!t)throw new Error("Tabs primitives must be used within <Tabs>");return t}function jC({value:t,onValueChange:e,className:n,children:i}){return m.jsx(Ov.Provider,{value:{value:t,onChange:e},children:m.jsx("div",{className:xt("flex flex-col gap-3",n),children:i})})}function CC({className:t,children:e}){return m.jsx("div",{role:"tablist",className:xt("inline-flex h-10 items-center justify-start gap-1 rounded-md bg-muted p-1 text-muted-foreground",t),children:e})}function Xc({value:t,children:e,className:n}){const i=Rv(),o=i.value===t;return m.jsx("button",{role:"tab",type:"button","aria-selected":o,onClick:()=>i.onChange(t),className:xt("inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",o?"bg-background text-foreground shadow-sm":"hover:text-foreground",n),children:e})}function ed({value:t,children:e,className:n}){return Rv().value!==t?null:m.jsx("div",{role:"tabpanel",className:xt("focus-visible:outline-none",n),children:e})}const Tv=kr([X(),Fe()]).transform(String),Lv=ot({id:Tv,type:X(),name:X(),metadata:zl(X(),Mi()).default({})}),EC=nr(Lv),NC=ot({created:Fe(),entities:nr(ot({id:Tv,type:X(),name:X()}))}),Av=ot({ok:Bs(),deleted:kr([X(),Fe()])}),Bl={list:(t,e,n=200)=>St.get(`/projects/${encodeURIComponent(t)}/entities`,EC,{query:{limit:n,...e?{entity_type:e}:{}}}),create:(t,e)=>St.post(`/projects/${encodeURIComponent(t)}/entities`,Lv,e),bulkCreate:(t,e)=>St.post(`/projects/${encodeURIComponent(t)}/entities/bulk`,NC,e),delete:(t,e)=>St.delete(`/projects/${encodeURIComponent(t)}/entities/${e}`,Av)};function PC(t,e){return vs({queryKey:Je.entities.list(t,e),queryFn:()=>Bl.list(t,e),enabled:!!t})}function OC(t){const e=jr();return Zr({mutationFn:n=>Bl.create(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.entities.all})}})}function RC(t){const e=jr();return Zr({mutationFn:n=>Bl.bulkCreate(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.entities.all})}})}function TC(t){const e=jr();return Zr({mutationFn:n=>Bl.delete(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.entities.all}),e.invalidateQueries({queryKey:Je.claims.all})}})}const Iv=kr([X(),Fe()]).transform(String),LC=ot({id:Iv,subject:X().optional(),subject_type:X().optional(),predicate:X(),object:X().nullable().optional(),object_value:Mi().nullable().optional(),source:X().nullable().optional(),page_url:X().nullable().optional(),confidence:Fe().optional(),confidence_reason:X().nullable().optional(),status:X().optional(),evidence_text:X().nullable().optional(),evidence_summary:X().nullable().optional(),last_seen_at:X().optional()}).passthrough(),AC=nr(LC),IC=ot({id:Iv,subject_entity_id:kr([X(),Fe()]).transform(String),predicate:X(),object_entity_id:kr([X(),Fe(),oj()]).nullable().optional(),object_value:Mi().nullable().optional(),confidence:Fe(),status:X()}),uf={list:(t,e={})=>St.get(`/projects/${encodeURIComponent(t)}/claims`,AC,{query:{limit:e.limit??100,include_candidates:e.includeCandidates,status:e.status}}),create:(t,e)=>St.post(`/projects/${encodeURIComponent(t)}/claims`,IC,e),delete:(t,e)=>St.delete(`/projects/${encodeURIComponent(t)}/claims/${e}`,Av)};function FC(t,e={}){return vs({queryKey:Je.claims.list(t,e.status),queryFn:()=>uf.list(t,{status:e.status,includeCandidates:e.includeCandidates}),enabled:!!t})}function MC(t){const e=jr();return Zr({mutationFn:n=>uf.create(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.claims.all})}})}function DC(t){const e=jr();return Zr({mutationFn:n=>uf.delete(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Je.claims.all})}})}const $C=ot({entity_type:X().min(1,"타입을 선택하세요"),name:X().min(1,"이름을 입력하세요").max(240)}),zC=ot({source_name:X().min(1,"소스를 선택하세요"),subject_entity_id:Fe().int().min(1,"주어 엔티티 선택"),predicate:X().min(1,"술어를 선택하세요"),object_kind:cv(["entity","value"]),object_entity_id:Fe().int().nullable().optional(),object_value:X().optional(),confidence:Fe().min(0).max(1)});function UC(){const t=Tn(),{projectId:e}=Qa(),{t:n}=xs(),i=e??"",[o,l]=B.useState("entities"),{data:c,isLoading:f,isError:h,error:g,refetch:y}=Ul(i),{data:v}=Gj(c?.domain),w=PC(i),x=FC(i,{includeCandidates:!0}),j=OC(i),_=RC(i),S=TC(i),I=MC(i),E=DC(i),z=c?.sources??[],M=B.useMemo(()=>v?.entity_types?.length?v.entity_types:["Entity","Concept","Attribute"],[v]),L=B.useMemo(()=>v?.predicates?.length?v.predicates:["hasAttribute","relatedTo","sameAs"],[v]),Q=Oi({resolver:Ri($C),defaultValues:{entity_type:"",name:""}}),le=async P=>{try{await j.mutateAsync({entity_type:P.entity_type,name:P.name}),$t.success(n("editor.entityAdded","엔티티가 추가되었습니다: {{name}}",{name:P.name})),Q.reset({entity_type:P.entity_type,name:""})}catch(K){$t.error(n("editor.entityAddFailed","추가 실패: {{msg}}",{msg:K.message}))}},ue=Oi({resolver:Ri(zC),defaultValues:{source_name:"",subject_entity_id:0,predicate:"",object_kind:"entity",object_entity_id:null,object_value:"",confidence:1}}),pe=ue.watch("object_kind"),_e=async P=>{try{await I.mutateAsync({source_name:P.source_name,subject_entity_id:P.subject_entity_id,predicate:P.predicate,object_entity_id:P.object_kind==="entity"?P.object_entity_id:null,object_value:P.object_kind==="value"?P.object_value:void 0,confidence:P.confidence}),$t.success(n("editor.claimAdded","클레임이 추가되었습니다")),ue.reset({...ue.getValues(),object_entity_id:null,object_value:""})}catch(K){$t.error(n("editor.claimAddFailed","추가 실패: {{msg}}",{msg:K.message}))}},[Oe,Z]=B.useState(JSON.stringify({entities:[{entity_type:"Entity",name:"Example A"},{entity_type:"Entity",name:"Example B"}]},null,2)),[me,he]=B.useState(null),T=async()=>{he(null);try{const P=JSON.parse(Oe),K=Array.isArray(P.entities)?P.entities:Array.isArray(P)?P:null;if(!K||K.length===0)throw new Error("최상위에 entities 배열이 있어야 합니다");const V=K.map((W,O)=>{if(typeof W!="object"||W===null||typeof W.entity_type!="string"||typeof W.name!="string")throw new Error(`항목 [${O}]에 entity_type/name 문자열이 필요합니다`);return{entity_type:W.entity_type,name:W.name,metadata:typeof W.metadata=="object"&&W.metadata!==null?W.metadata:{}}}),H=await _.mutateAsync({entities:V});$t.success(n("editor.bulkAdded","{{count}}개 엔티티가 추가되었습니다",{count:H.created}))}catch(P){he(P.message)}};return m.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10",children:[m.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":n("common.back","이전"),children:m.jsx(Ka,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex-1",children:[m.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[m.jsx(Uy,{className:"h-6 w-6 text-primary"}),n("editor.title","온톨로지 직접 편집")]}),c&&m.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.name,m.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",c.domain]})]})]})]}),h&&m.jsx(mt,{className:"mb-6 border-destructive",children:m.jsxs(gt,{className:"flex items-center justify-between gap-3 py-4",children:[m.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[m.jsx(zs,{className:"h-4 w-4"}),m.jsx("span",{children:g.message})]}),m.jsx(Ye,{variant:"outline",size:"sm",type:"button",onClick:()=>y(),children:n("common.retry","다시 시도")})]})}),m.jsxs(jC,{value:o,onValueChange:P=>l(P),children:[m.jsxs(CC,{children:[m.jsxs(Xc,{value:"entities",children:[n("editor.entitiesTab","엔티티")," (",w.data?.length??0,")"]}),m.jsxs(Xc,{value:"claims",children:[m.jsx(i_,{className:"mr-1 h-4 w-4"}),n("editor.claimsTab","클레임")," (",x.data?.length??0,")"]}),m.jsxs(Xc,{value:"bulk",children:[m.jsx(eg,{className:"mr-1 h-4 w-4"}),n("editor.bulkTab","JSON 일괄 입력")]})]}),m.jsx(ed,{value:"entities",children:m.jsxs("div",{className:"grid gap-6 lg:grid-cols-[380px_1fr]",children:[m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("editor.addEntity","엔티티 추가")}),m.jsx(Gt,{children:n("editor.addEntityDesc","온톨로지 도메인의 entity_types 중에서 선택")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:Q.handleSubmit(le),className:"space-y-3",noValidate:!0,children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.entityType","타입")}),m.jsxs(En,{...Q.register("entity_type"),children:[m.jsx("option",{value:"",children:n("editor.pickType","타입 선택...")}),M.map(P=>m.jsx("option",{value:P,children:P},P))]}),Q.formState.errors.entity_type&&m.jsx("p",{className:"text-xs text-destructive",children:Q.formState.errors.entity_type.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.entityName","이름")}),m.jsx(zt,{placeholder:"Chanel No.5",...Q.register("name")}),Q.formState.errors.name&&m.jsx("p",{className:"text-xs text-destructive",children:Q.formState.errors.name.message})]}),m.jsxs(Ye,{type:"submit",className:"w-full",disabled:j.isPending,children:[j.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(za,{className:"h-4 w-4"}),n("editor.add","추가")]})]})})]}),m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("editor.entitiesList","엔티티 목록")}),m.jsx(Gt,{children:w.data?n("editor.entityCount","{{count}}개",{count:w.data.length}):n("dashboard.loadFailed","")})]}),m.jsxs(gt,{children:[w.isLoading&&m.jsx("div",{className:"space-y-2",children:Array.from({length:4}).map((P,K)=>m.jsx(gs,{className:"h-10"},K))}),w.data&&w.data.length===0&&m.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:n("editor.entitiesEmpty","아직 등록된 엔티티가 없습니다")}),w.data&&w.data.length>0&&m.jsx("ul",{className:"max-h-[600px] divide-y overflow-y-auto",children:w.data.map(P=>m.jsxs("li",{className:"flex items-center justify-between gap-3 py-2 text-sm",children:[m.jsx("div",{className:"min-w-0 flex-1",children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(bi,{variant:"outline",children:P.type}),m.jsx("span",{className:"truncate font-medium",children:P.name})]})}),m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>{confirm(n("editor.confirmDeleteEntity","엔티티 '{{name}}'을 삭제하시겠습니까?",{name:P.name}))&&S.mutate(P.id)},disabled:S.isPending,children:m.jsx(gd,{className:"h-4 w-4 text-destructive"})})]},P.id))})]})]})]})}),m.jsx(ed,{value:"claims",children:m.jsxs("div",{className:"grid gap-6 lg:grid-cols-[420px_1fr]",children:[m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("editor.addClaim","클레임 추가")}),m.jsx(Gt,{children:n("editor.addClaimDesc","주어-술어-목적어 형태로 직접 입력")})]}),m.jsx(gt,{children:m.jsxs("form",{onSubmit:ue.handleSubmit(_e),className:"space-y-3",noValidate:!0,children:[m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.source","소스")}),m.jsxs(En,{...ue.register("source_name"),children:[m.jsx("option",{value:"",children:n("editor.pickSource","소스 선택...")}),z.map(P=>m.jsx("option",{value:P.name,children:P.name},P.id))]}),ue.formState.errors.source_name&&m.jsx("p",{className:"text-xs text-destructive",children:ue.formState.errors.source_name.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.subject","주어 (Subject)")}),m.jsxs(En,{...ue.register("subject_entity_id",{valueAsNumber:!0}),children:[m.jsx("option",{value:0,children:n("editor.pickSubject","엔티티 선택...")}),w.data?.map(P=>m.jsxs("option",{value:P.id,children:["[",P.type,"] ",P.name]},P.id))]}),ue.formState.errors.subject_entity_id&&m.jsx("p",{className:"text-xs text-destructive",children:ue.formState.errors.subject_entity_id.message})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.predicate","술어 (Predicate)")}),m.jsxs(En,{...ue.register("predicate"),children:[m.jsx("option",{value:"",children:n("editor.pickPredicate","술어 선택...")}),L.map(P=>m.jsx("option",{value:P,children:P},P))]})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.objectKind","목적어 유형")}),m.jsxs(En,{...ue.register("object_kind"),children:[m.jsx("option",{value:"entity",children:n("editor.objectEntity","다른 엔티티")}),m.jsx("option",{value:"value",children:n("editor.objectValue","리터럴 값")})]})]}),pe==="entity"?m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.objectEntity","목적 엔티티")}),m.jsxs(En,{...ue.register("object_entity_id",{valueAsNumber:!0,setValueAs:P=>P===""||P===null||P===void 0?null:Number(P)}),children:[m.jsx("option",{value:"",children:n("editor.pickObject","엔티티 선택...")}),w.data?.map(P=>m.jsxs("option",{value:P.id,children:["[",P.type,"] ",P.name]},P.id))]})]}):m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.objectValue","값")}),m.jsx(zt,{placeholder:"2024-01-15 또는 임의 문자열",...ue.register("object_value")})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsx(Xe,{children:n("editor.confidence","신뢰도")}),m.jsx(zt,{type:"number",step:"0.05",min:0,max:1,...ue.register("confidence",{valueAsNumber:!0})})]}),m.jsxs(Ye,{type:"submit",className:"w-full",disabled:I.isPending,children:[I.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(za,{className:"h-4 w-4"}),n("editor.add","추가")]})]})})]}),m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("editor.claimsList","클레임 목록")}),m.jsx(Gt,{children:x.data&&n("editor.claimCount","{{count}}개",{count:x.data.length})})]}),m.jsxs(gt,{children:[x.isLoading&&m.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((P,K)=>m.jsx(gs,{className:"h-12"},K))}),x.data&&x.data.length===0&&m.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:n("editor.claimsEmpty","아직 등록된 클레임이 없습니다")}),x.data&&x.data.length>0&&m.jsx("ul",{className:"max-h-[600px] divide-y overflow-y-auto",children:x.data.map(P=>m.jsxs("li",{className:"flex items-start justify-between gap-3 py-3 text-sm",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.jsx("span",{className:"font-medium",children:P.subject??"?"}),m.jsx(bi,{variant:"secondary",children:P.predicate}),m.jsx("span",{className:"font-medium",children:P.object??String(P.object_value??"—")})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-muted-foreground",children:[m.jsxs("span",{children:[n("editor.source","소스"),": ",P.source??"—"]}),typeof P.confidence=="number"&&m.jsxs("span",{children:[n("editor.confidence","신뢰도"),":"," ",P.confidence.toFixed(2)]}),P.status&&m.jsx(bi,{variant:"outline",children:P.status})]})]}),m.jsx(Ye,{variant:"ghost",size:"icon",onClick:()=>{confirm(n("editor.confirmDeleteClaim","클레임을 삭제하시겠습니까?"))&&E.mutate(P.id)},children:m.jsx(gd,{className:"h-4 w-4 text-destructive"})})]},P.id))})]})]})]})}),m.jsx(ed,{value:"bulk",children:m.jsxs(mt,{children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:n("editor.bulkTitle","JSON 일괄 입력")}),m.jsx(Gt,{children:n("editor.bulkDesc","{ entities: [{ entity_type, name, metadata? }] } 형태의 JSON")})]}),m.jsxs(gt,{className:"space-y-3",children:[m.jsx(lf,{value:Oe,onChange:P=>Z(P.target.value),rows:12,className:"font-mono text-xs"}),me&&m.jsx("p",{className:"text-sm text-destructive",children:me}),m.jsxs(Ye,{onClick:T,disabled:_.isPending||f,children:[_.isPending?m.jsx(ls,{className:"h-4 w-4 animate-spin"}):m.jsx(eg,{className:"h-4 w-4"}),n("editor.bulkSubmit","일괄 추가")]})]})]})})]})]})}function VC(){const t=Tn(),{projectId:e}=Qa(),{t:n}=xs();return m.jsx("div",{className:"min-h-screen bg-gray-50 p-4",children:m.jsxs("div",{className:"max-w-4xl mx-auto",children:[m.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:n("Review & Validate")}),m.jsx("p",{className:"text-gray-600 mb-6",children:n("Step 4 of 4: Review extracted entities and relations")}),m.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[m.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[m.jsx("h3",{className:"font-semibold text-lg mb-2",children:n("Phase 5 Entity Merges")}),m.jsx("p",{className:"text-gray-500",children:n("Review merge suggestions")})]}),m.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[m.jsx("h3",{className:"font-semibold text-lg mb-2",children:n("Phase 7 Extractions")}),m.jsx("p",{className:"text-gray-500",children:n("Validate extracted claims")})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx("button",{onClick:()=>t(`/crawl/${e}`),className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition",children:n("Back")}),m.jsx("button",{onClick:()=>t("/"),className:"flex-1 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition",children:n("Complete")})]})]})})}function BC(t){const e=new Date(t);return Number.isNaN(e.getTime())?t:e.toLocaleString()}function HC(){const t=Tn(),{t:e}=xs(),{data:n,isLoading:i,isError:o,error:l,refetch:c}=dv();return m.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10",children:[m.jsxs("div",{className:"mb-8 flex items-start justify-between",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e("dashboard.title","Ontology Builder")}),m.jsx("p",{className:"mt-2 text-muted-foreground",children:e("dashboard.subtitle","Build and manage domain ontologies with AI-powered extraction")})]}),m.jsxs(Ye,{onClick:()=>t("/onboard"),children:[m.jsx(za,{className:"h-4 w-4"}),e("dashboard.newProject","New Project")]})]}),m.jsxs("section",{children:[m.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[m.jsx("h2",{className:"text-lg font-semibold",children:e("dashboard.projects","Projects")}),n&&m.jsx("span",{className:"text-sm text-muted-foreground",children:e("dashboard.projectCount","{{count}} total",{count:n.length})})]}),i&&m.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((f,h)=>m.jsx(gs,{className:"h-32"},h))}),o&&m.jsxs(mt,{className:"border-destructive",children:[m.jsxs(Kt,{children:[m.jsxs(Zt,{className:"flex items-center gap-2 text-destructive",children:[m.jsx(zs,{className:"h-5 w-5"}),e("dashboard.loadFailed","Failed to load projects")]}),m.jsx(Gt,{children:l.message})]}),m.jsx(gt,{children:m.jsx(Ye,{variant:"outline",onClick:()=>c(),children:e("common.retry","Retry")})})]}),n&&n.length===0&&m.jsx(mt,{children:m.jsxs(gt,{className:"flex flex-col items-center gap-4 py-12 text-center",children:[m.jsx(t_,{className:"h-12 w-12 text-muted-foreground"}),m.jsxs("div",{children:[m.jsx("p",{className:"font-medium",children:e("dashboard.empty.title","No projects yet")}),m.jsx("p",{className:"text-sm text-muted-foreground",children:e("dashboard.empty.hint","Create your first project to start building an ontology")})]}),m.jsxs(Ye,{onClick:()=>t("/onboard"),children:[m.jsx(za,{className:"h-4 w-4"}),e("dashboard.newProject","New Project")]})]})}),n&&n.length>0&&m.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(f=>m.jsxs(mt,{role:"button",tabIndex:0,onClick:()=>t(`/sources/${f.name}`),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&t(`/sources/${f.name}`)},className:"cursor-pointer transition-colors hover:bg-accent/40",children:[m.jsxs(Kt,{children:[m.jsx(Zt,{children:f.name}),m.jsx(Gt,{children:f.domain})]}),m.jsxs(gt,{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[m.jsx(XS,{className:"h-3 w-3"}),BC(f.updated_at)]})]},f.id))})]})]})}function qC(){return m.jsx(iw,{children:m.jsxs(Cn,{element:m.jsx(yj,{}),children:[m.jsx(Cn,{path:"/",element:m.jsx(HC,{})}),m.jsx(Cn,{path:"/onboard",element:m.jsx(Xj,{})}),m.jsx(Cn,{path:"/sources/:projectId",element:m.jsx(iC,{})}),m.jsx(Cn,{path:"/crawl/:projectId",element:m.jsx(gC,{})}),m.jsx(Cn,{path:"/research/:projectId",element:m.jsx(kC,{})}),m.jsx(Cn,{path:"/editor/:projectId",element:m.jsx(UC,{})}),m.jsx(Cn,{path:"/review/:projectId",element:m.jsx(VC,{})})]})})}const Fv={name:"",domain:"",format:null,fileName:null,rawText:""},WC={draft:Fv,isDirty:!1},QC=Gd({name:"ontology",initialState:WC,reducers:{updateDraft:(t,e)=>{t.draft={...t.draft,...e.payload},t.isDirty=!0},resetDraft:t=>{t.draft=Fv,t.isDirty=!1},markClean:t=>{t.isDirty=!1}}}),KC=QC.reducer,ZC={activeJobId:null,expandedStep:null,showLogs:!0,autoScrollLogs:!0},GC=Gd({name:"crawl",initialState:ZC,reducers:{setActiveJob:(t,e)=>{t.activeJobId=e.payload},expandStep:(t,e)=>{t.expandedStep=e.payload},toggleLogs:t=>{t.showLogs=!t.showLogs},setAutoScroll:(t,e)=>{t.autoScrollLogs=e.payload}}}),JC=GC.reducer,YC=B_({reducer:{ontology:KC,crawl:JC,ui:tk}}),XC=new Ww({defaultOptions:{queries:{staleTime:1e3*60*5,gcTime:1e3*60*10,retry:1},mutations:{retry:1}}});$x.createRoot(document.getElementById("root")).render(m.jsx(ee.StrictMode,{children:m.jsx(u1,{store:YC,children:m.jsx(Qw,{client:XC,children:m.jsxs(hw,{basename:"/static/",children:[m.jsx(qC,{}),m.jsx(Rb,{position:"top-right"})]})})})}));
|
|
//# sourceMappingURL=index-DTEQpvfm.js.map
|