certimate/ui/dist/assets/index-DTugtq1k.js
2024-09-12 21:59:50 +08:00

285 lines
716 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var _T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var h8=_T((k8,Ou)=>{function R0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var Pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P0={exports:{}},Od={},D0={exports:{}},Je={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rc=Symbol.for("react.element"),bT=Symbol.for("react.portal"),ST=Symbol.for("react.fragment"),kT=Symbol.for("react.strict_mode"),CT=Symbol.for("react.profiler"),ET=Symbol.for("react.provider"),TT=Symbol.for("react.context"),jT=Symbol.for("react.forward_ref"),NT=Symbol.for("react.suspense"),RT=Symbol.for("react.memo"),PT=Symbol.for("react.lazy"),Qv=Symbol.iterator;function DT(e){return e===null||typeof e!="object"?null:(e=Qv&&e[Qv]||e["@@iterator"],typeof e=="function"?e:null)}var A0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O0=Object.assign,M0={};function ua(e,t,r){this.props=e,this.context=t,this.refs=M0,this.updater=r||A0}ua.prototype.isReactComponent={};ua.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ua.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function I0(){}I0.prototype=ua.prototype;function vm(e,t,r){this.props=e,this.context=t,this.refs=M0,this.updater=r||A0}var ym=vm.prototype=new I0;ym.constructor=vm;O0(ym,ua.prototype);ym.isPureReactComponent=!0;var Jv=Array.isArray,L0=Object.prototype.hasOwnProperty,xm={current:null},F0={key:!0,ref:!0,__self:!0,__source:!0};function z0(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)L0.call(t,n)&&!F0.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:rc,type:e,key:o,ref:i,props:s,_owner:xm.current}}function AT(e,t){return{$$typeof:rc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wm(e){return typeof e=="object"&&e!==null&&e.$$typeof===rc}function OT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ey=/\/+/g;function $f(e,t){return typeof e=="object"&&e!==null&&e.key!=null?OT(""+e.key):t.toString(36)}function cu(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case rc:case bT:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+$f(i,0):n,Jv(s)?(r="",e!=null&&(r=e.replace(ey,"$&/")+"/"),cu(s,t,r,"",function(u){return u})):s!=null&&(wm(s)&&(s=AT(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(ey,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Jv(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+$f(o,a);i+=cu(o,t,r,l,s)}else if(l=DT(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+$f(o,a++),i+=cu(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Dc(e,t,r){if(e==null)return e;var n=[],s=0;return cu(e,n,"","",function(o){return t.call(r,o,s++)}),n}function MT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var gr={current:null},uu={transition:null},IT={ReactCurrentDispatcher:gr,ReactCurrentBatchConfig:uu,ReactCurrentOwner:xm};function U0(){throw Error("act(...) is not supported in production builds of React.")}Je.Children={map:Dc,forEach:function(e,t,r){Dc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Dc(e,function(){t++}),t},toArray:function(e){return Dc(e,function(t){return t})||[]},only:function(e){if(!wm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Je.Component=ua;Je.Fragment=ST;Je.Profiler=CT;Je.PureComponent=vm;Je.StrictMode=kT;Je.Suspense=NT;Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IT;Je.act=U0;Je.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=O0({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=xm.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)L0.call(t,l)&&!F0.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:rc,type:e.type,key:s,ref:o,props:n,_owner:i}};Je.createContext=function(e){return e={$$typeof:TT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ET,_context:e},e.Consumer=e};Je.createElement=z0;Je.createFactory=function(e){var t=z0.bind(null,e);return t.type=e,t};Je.createRef=function(){return{current:null}};Je.forwardRef=function(e){return{$$typeof:jT,render:e}};Je.isValidElement=wm;Je.lazy=function(e){return{$$typeof:PT,_payload:{_status:-1,_result:e},_init:MT}};Je.memo=function(e,t){return{$$typeof:RT,type:e,compare:t===void 0?null:t}};Je.startTransition=function(e){var t=uu.transition;uu.transition={};try{e()}finally{uu.transition=t}};Je.unstable_act=U0;Je.useCallback=function(e,t){return gr.current.useCallback(e,t)};Je.useContext=function(e){return gr.current.useContext(e)};Je.useDebugValue=function(){};Je.useDeferredValue=function(e){return gr.current.useDeferredValue(e)};Je.useEffect=function(e,t){return gr.current.useEffect(e,t)};Je.useId=function(){return gr.current.useId()};Je.useImperativeHandle=function(e,t,r){return gr.current.useImperativeHandle(e,t,r)};Je.useInsertionEffect=function(e,t){return gr.current.useInsertionEffect(e,t)};Je.useLayoutEffect=function(e,t){return gr.current.useLayoutEffect(e,t)};Je.useMemo=function(e,t){return gr.current.useMemo(e,t)};Je.useReducer=function(e,t,r){return gr.current.useReducer(e,t,r)};Je.useRef=function(e){return gr.current.useRef(e)};Je.useState=function(e){return gr.current.useState(e)};Je.useSyncExternalStore=function(e,t,r){return gr.current.useSyncExternalStore(e,t,r)};Je.useTransition=function(){return gr.current.useTransition()};Je.version="18.3.1";D0.exports=Je;var y=D0.exports;const et=gm(y),V0=R0({__proto__:null,default:et},[y]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var LT=y,FT=Symbol.for("react.element"),zT=Symbol.for("react.fragment"),UT=Object.prototype.hasOwnProperty,VT=LT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,WT={key:!0,ref:!0,__self:!0,__source:!0};function W0(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)UT.call(t,n)&&!WT.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:FT,type:e,key:o,ref:i,props:s,_owner:VT.current}}Od.Fragment=zT;Od.jsx=W0;Od.jsxs=W0;P0.exports=Od;var c=P0.exports,zh={},$0={exports:{}},zr={},B0={exports:{}},H0={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(Z,I){var Q=Z.length;Z.push(I);e:for(;0<Q;){var z=Q-1>>>1,V=Z[z];if(0<s(V,I))Z[z]=I,Z[Q]=V,Q=z;else break e}}function r(Z){return Z.length===0?null:Z[0]}function n(Z){if(Z.length===0)return null;var I=Z[0],Q=Z.pop();if(Q!==I){Z[0]=Q;e:for(var z=0,V=Z.length,de=V>>>1;z<de;){var ne=2*(z+1)-1,se=Z[ne],je=ne+1,fe=Z[je];if(0>s(se,Q))je<V&&0>s(fe,se)?(Z[z]=fe,Z[je]=Q,z=je):(Z[z]=se,Z[ne]=Q,z=ne);else if(je<V&&0>s(fe,Q))Z[z]=fe,Z[je]=Q,z=je;else break e}}return I}function s(Z,I){var Q=Z.sortIndex-I.sortIndex;return Q!==0?Q:Z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,f=null,m=3,h=!1,x=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=Z)n(u),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(u)}}function C(Z){if(g=!1,_(Z),!x)if(r(l)!==null)x=!0,te(E);else{var I=r(u);I!==null&&$(C,I.startTime-Z)}}function E(Z,I){x=!1,g&&(g=!1,v(D),D=-1),h=!0;var Q=m;try{for(_(I),f=r(l);f!==null&&(!(f.expirationTime>I)||Z&&!q());){var z=f.callback;if(typeof z=="function"){f.callback=null,m=f.priorityLevel;var V=z(f.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?f.callback=V:f===r(l)&&n(l),_(I)}else n(l);f=r(l)}if(f!==null)var de=!0;else{var ne=r(u);ne!==null&&$(C,ne.startTime-I),de=!1}return de}finally{f=null,m=Q,h=!1}}var T=!1,R=null,D=-1,P=5,L=-1;function q(){return!(e.unstable_now()-L<P)}function j(){if(R!==null){var Z=e.unstable_now();L=Z;var I=!0;try{I=R(!0,Z)}finally{I?F():(T=!1,R=null)}}else T=!1}var F;if(typeof p=="function")F=function(){p(j)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,W=b.port2;b.port1.onmessage=j,F=function(){W.postMessage(null)}}else F=function(){w(j,0)};function te(Z){R=Z,T||(T=!0,F())}function $(Z,I){D=w(function(){Z(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_continueExecution=function(){x||h||(x=!0,te(E))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(Z){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var Q=m;m=I;try{return Z()}finally{m=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,I){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Q=m;m=Z;try{return I()}finally{m=Q}},e.unstable_scheduleCallback=function(Z,I,Q){var z=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?z+Q:z):Q=z,Z){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=Q+V,Z={id:d++,callback:I,priorityLevel:Z,startTime:Q,expirationTime:V,sortIndex:-1},Q>z?(Z.sortIndex=Q,t(u,Z),r(l)===null&&Z===r(u)&&(g?(v(D),D=-1):g=!0,$(C,Q-z))):(Z.sortIndex=V,t(l,Z),x||h||(x=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=m;return function(){var Q=m;m=I;try{return Z.apply(this,arguments)}finally{m=Q}}}})(H0);B0.exports=H0;var $T=B0.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var BT=y,Fr=$T;function oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Y0=new Set,pl={};function Jo(e,t){qi(e,t),qi(e+"Capture",t)}function qi(e,t){for(pl[e]=t,e=0;e<t.length;e++)Y0.add(t[e])}var ms=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uh=Object.prototype.hasOwnProperty,HT=/^[: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]*$/,ty={},ry={};function YT(e){return Uh.call(ry,e)?!0:Uh.call(ty,e)?!1:HT.test(e)?ry[e]=!0:(ty[e]=!0,!1)}function ZT(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function KT(e,t,r,n){if(t===null||typeof t>"u"||ZT(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function vr(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new vr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rr[e]=new vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var _m=/[\-:]([a-z])/g;function bm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_m,bm);rr[t]=new vr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_m,bm);rr[t]=new vr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_m,bm);rr[t]=new vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sm(e,t,r,n){var s=rr.hasOwnProperty(t)?rr[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(KT(t,r,s,n)&&(r=null),n||s===null?YT(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var ks=BT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ac=Symbol.for("react.element"),xi=Symbol.for("react.portal"),wi=Symbol.for("react.fragment"),km=Symbol.for("react.strict_mode"),Vh=Symbol.for("react.profiler"),Z0=Symbol.for("react.provider"),K0=Symbol.for("react.context"),Cm=Symbol.for("react.forward_ref"),Wh=Symbol.for("react.suspense"),$h=Symbol.for("react.suspense_list"),Em=Symbol.for("react.memo"),zs=Symbol.for("react.lazy"),G0=Symbol.for("react.offscreen"),ny=Symbol.iterator;function Ca(e){return e===null||typeof e!="object"?null:(e=ny&&e[ny]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,Bf;function Va(e){if(Bf===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Bf=t&&t[1]||""}return`
`+Bf+e}var Hf=!1;function Yf(e,t){if(!e||Hf)return"";Hf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=n.stack.split(`
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Hf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Va(e):""}function GT(e){switch(e.tag){case 5:return Va(e.type);case 16:return Va("Lazy");case 13:return Va("Suspense");case 19:return Va("SuspenseList");case 0:case 2:case 15:return e=Yf(e.type,!1),e;case 11:return e=Yf(e.type.render,!1),e;case 1:return e=Yf(e.type,!0),e;default:return""}}function Bh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wi:return"Fragment";case xi:return"Portal";case Vh:return"Profiler";case km:return"StrictMode";case Wh:return"Suspense";case $h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case K0:return(e.displayName||"Context")+".Consumer";case Z0:return(e._context.displayName||"Context")+".Provider";case Cm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Em:return t=e.displayName||null,t!==null?t:Bh(e.type)||"Memo";case zs:t=e._payload,e=e._init;try{return Bh(e(t))}catch{}}return null}function qT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bh(t);case 8:return t===km?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function so(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function q0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XT(e){var t=q0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oc(e){e._valueTracker||(e._valueTracker=XT(e))}function X0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=q0(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Mu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hh(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function sy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=so(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Q0(e,t){t=t.checked,t!=null&&Sm(e,"checked",t,!1)}function Yh(e,t){Q0(e,t);var r=so(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zh(e,t.type,r):t.hasOwnProperty("defaultValue")&&Zh(e,t.type,so(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oy(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Zh(e,t,r){(t!=="number"||Mu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wa=Array.isArray;function Mi(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+so(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Kh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(oe(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function iy(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(oe(92));if(Wa(r)){if(1<r.length)throw Error(oe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:so(r)}}function J0(e,t){var r=so(t.value),n=so(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function ay(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ew(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ew(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mc,tw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Mc=Mc||document.createElement("div"),Mc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ml(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qa={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},QT=["Webkit","ms","Moz","O"];Object.keys(qa).forEach(function(e){QT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qa[t]=qa[e]})});function rw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qa.hasOwnProperty(e)&&qa[e]?(""+t).trim():t+"px"}function nw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=rw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var JT=Mt({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 qh(e,t){if(t){if(JT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(oe(62))}}function Xh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qh=null;function Tm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jh=null,Ii=null,Li=null;function ly(e){if(e=oc(e)){if(typeof Jh!="function")throw Error(oe(280));var t=e.stateNode;t&&(t=zd(t),Jh(e.stateNode,e.type,t))}}function sw(e){Ii?Li?Li.push(e):Li=[e]:Ii=e}function ow(){if(Ii){var e=Ii,t=Li;if(Li=Ii=null,ly(e),t)for(e=0;e<t.length;e++)ly(t[e])}}function iw(e,t){return e(t)}function aw(){}var Zf=!1;function lw(e,t,r){if(Zf)return e(t,r);Zf=!0;try{return iw(e,t,r)}finally{Zf=!1,(Ii!==null||Li!==null)&&(aw(),ow())}}function gl(e,t){var r=e.stateNode;if(r===null)return null;var n=zd(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(oe(231,t,typeof r));return r}var ep=!1;if(ms)try{var Ea={};Object.defineProperty(Ea,"passive",{get:function(){ep=!0}}),window.addEventListener("test",Ea,Ea),window.removeEventListener("test",Ea,Ea)}catch{ep=!1}function ej(e,t,r,n,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Xa=!1,Iu=null,Lu=!1,tp=null,tj={onError:function(e){Xa=!0,Iu=e}};function rj(e,t,r,n,s,o,i,a,l){Xa=!1,Iu=null,ej.apply(tj,arguments)}function nj(e,t,r,n,s,o,i,a,l){if(rj.apply(this,arguments),Xa){if(Xa){var u=Iu;Xa=!1,Iu=null}else throw Error(oe(198));Lu||(Lu=!0,tp=u)}}function ei(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function cw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function cy(e){if(ei(e)!==e)throw Error(oe(188))}function sj(e){var t=e.alternate;if(!t){if(t=ei(e),t===null)throw Error(oe(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return cy(s),e;if(o===n)return cy(s),t;o=o.sibling}throw Error(oe(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(oe(189))}}if(r.alternate!==n)throw Error(oe(190))}if(r.tag!==3)throw Error(oe(188));return r.stateNode.current===r?e:t}function uw(e){return e=sj(e),e!==null?dw(e):null}function dw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=dw(e);if(t!==null)return t;e=e.sibling}return null}var fw=Fr.unstable_scheduleCallback,uy=Fr.unstable_cancelCallback,oj=Fr.unstable_shouldYield,ij=Fr.unstable_requestPaint,Ut=Fr.unstable_now,aj=Fr.unstable_getCurrentPriorityLevel,jm=Fr.unstable_ImmediatePriority,hw=Fr.unstable_UserBlockingPriority,Fu=Fr.unstable_NormalPriority,lj=Fr.unstable_LowPriority,pw=Fr.unstable_IdlePriority,Md=null,In=null;function cj(e){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Md,e,void 0,(e.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:fj,uj=Math.log,dj=Math.LN2;function fj(e){return e>>>=0,e===0?32:31-(uj(e)/dj|0)|0}var Ic=64,Lc=4194304;function $a(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=$a(a):(o&=i,o!==0&&(n=$a(o)))}else i=r&~s,i!==0?n=$a(i):o!==0&&(n=$a(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-dn(t),s=1<<r,n|=e[r],t&=~s;return n}function hj(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;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 pj(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-dn(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=hj(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function rp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function mw(){var e=Ic;return Ic<<=1,!(Ic&4194240)&&(Ic=64),e}function Kf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function nc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=r}function mj(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-dn(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Nm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-dn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ht=0;function gw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var vw,Rm,yw,xw,ww,np=!1,Fc=[],Gs=null,qs=null,Xs=null,vl=new Map,yl=new Map,Vs=[],gj="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 dy(e,t){switch(e){case"focusin":case"focusout":Gs=null;break;case"dragenter":case"dragleave":qs=null;break;case"mouseover":case"mouseout":Xs=null;break;case"pointerover":case"pointerout":vl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yl.delete(t.pointerId)}}function Ta(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=oc(t),t!==null&&Rm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function vj(e,t,r,n,s){switch(t){case"focusin":return Gs=Ta(Gs,e,t,r,n,s),!0;case"dragenter":return qs=Ta(qs,e,t,r,n,s),!0;case"mouseover":return Xs=Ta(Xs,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return vl.set(o,Ta(vl.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,yl.set(o,Ta(yl.get(o)||null,e,t,r,n,s)),!0}return!1}function _w(e){var t=jo(e.target);if(t!==null){var r=ei(t);if(r!==null){if(t=r.tag,t===13){if(t=cw(r),t!==null){e.blockedOn=t,ww(e.priority,function(){yw(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function du(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=sp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Qh=n,r.target.dispatchEvent(n),Qh=null}else return t=oc(r),t!==null&&Rm(t),e.blockedOn=r,!1;t.shift()}return!0}function fy(e,t,r){du(e)&&r.delete(t)}function yj(){np=!1,Gs!==null&&du(Gs)&&(Gs=null),qs!==null&&du(qs)&&(qs=null),Xs!==null&&du(Xs)&&(Xs=null),vl.forEach(fy),yl.forEach(fy)}function ja(e,t){e.blockedOn===t&&(e.blockedOn=null,np||(np=!0,Fr.unstable_scheduleCallback(Fr.unstable_NormalPriority,yj)))}function xl(e){function t(s){return ja(s,e)}if(0<Fc.length){ja(Fc[0],e);for(var r=1;r<Fc.length;r++){var n=Fc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Gs!==null&&ja(Gs,e),qs!==null&&ja(qs,e),Xs!==null&&ja(Xs,e),vl.forEach(t),yl.forEach(t),r=0;r<Vs.length;r++)n=Vs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vs.length&&(r=Vs[0],r.blockedOn===null);)_w(r),r.blockedOn===null&&Vs.shift()}var Fi=ks.ReactCurrentBatchConfig,Uu=!0;function xj(e,t,r,n){var s=ht,o=Fi.transition;Fi.transition=null;try{ht=1,Pm(e,t,r,n)}finally{ht=s,Fi.transition=o}}function wj(e,t,r,n){var s=ht,o=Fi.transition;Fi.transition=null;try{ht=4,Pm(e,t,r,n)}finally{ht=s,Fi.transition=o}}function Pm(e,t,r,n){if(Uu){var s=sp(e,t,r,n);if(s===null)sh(e,t,n,Vu,r),dy(e,n);else if(vj(s,e,t,r,n))n.stopPropagation();else if(dy(e,n),t&4&&-1<gj.indexOf(e)){for(;s!==null;){var o=oc(s);if(o!==null&&vw(o),o=sp(e,t,r,n),o===null&&sh(e,t,n,Vu,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else sh(e,t,n,null,r)}}var Vu=null;function sp(e,t,r,n){if(Vu=null,e=Tm(n),e=jo(e),e!==null)if(t=ei(e),t===null)e=null;else if(r=t.tag,r===13){if(e=cw(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Vu=e,null}function bw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(aj()){case jm:return 1;case hw:return 4;case Fu:case lj:return 16;case pw:return 536870912;default:return 16}default:return 16}}var Bs=null,Dm=null,fu=null;function Sw(){if(fu)return fu;var e,t=Dm,r=t.length,n,s="value"in Bs?Bs.value:Bs.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return fu=s.slice(e,1<n?1-n:void 0)}function hu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zc(){return!0}function hy(){return!1}function Ur(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?zc:hy,this.isPropagationStopped=hy,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=zc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=zc)},persist:function(){},isPersistent:zc}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Am=Ur(da),sc=Mt({},da,{view:0,detail:0}),_j=Ur(sc),Gf,qf,Na,Id=Mt({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Om,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Na&&(Na&&e.type==="mousemove"?(Gf=e.screenX-Na.screenX,qf=e.screenY-Na.screenY):qf=Gf=0,Na=e),Gf)},movementY:function(e){return"movementY"in e?e.movementY:qf}}),py=Ur(Id),bj=Mt({},Id,{dataTransfer:0}),Sj=Ur(bj),kj=Mt({},sc,{relatedTarget:0}),Xf=Ur(kj),Cj=Mt({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),Ej=Ur(Cj),Tj=Mt({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jj=Ur(Tj),Nj=Mt({},da,{data:0}),my=Ur(Nj),Rj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pj={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"},Dj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Aj(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dj[e])?!!t[e]:!1}function Om(){return Aj}var Oj=Mt({},sc,{key:function(e){if(e.key){var t=Rj[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Om,charCode:function(e){return e.type==="keypress"?hu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mj=Ur(Oj),Ij=Mt({},Id,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gy=Ur(Ij),Lj=Mt({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Om}),Fj=Ur(Lj),zj=Mt({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uj=Ur(zj),Vj=Mt({},Id,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wj=Ur(Vj),$j=[9,13,27,32],Mm=ms&&"CompositionEvent"in window,Qa=null;ms&&"documentMode"in document&&(Qa=document.documentMode);var Bj=ms&&"TextEvent"in window&&!Qa,kw=ms&&(!Mm||Qa&&8<Qa&&11>=Qa),vy=" ",yy=!1;function Cw(e,t){switch(e){case"keyup":return $j.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _i=!1;function Hj(e,t){switch(e){case"compositionend":return Ew(t);case"keypress":return t.which!==32?null:(yy=!0,vy);case"textInput":return e=t.data,e===vy&&yy?null:e;default:return null}}function Yj(e,t){if(_i)return e==="compositionend"||!Mm&&Cw(e,t)?(e=Sw(),fu=Dm=Bs=null,_i=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kw&&t.locale!=="ko"?null:t.data;default:return null}}var Zj={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 xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zj[e.type]:t==="textarea"}function Tw(e,t,r,n){sw(n),t=Wu(t,"onChange"),0<t.length&&(r=new Am("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ja=null,wl=null;function Kj(e){Fw(e,0)}function Ld(e){var t=ki(e);if(X0(t))return e}function Gj(e,t){if(e==="change")return t}var jw=!1;if(ms){var Qf;if(ms){var Jf="oninput"in document;if(!Jf){var wy=document.createElement("div");wy.setAttribute("oninput","return;"),Jf=typeof wy.oninput=="function"}Qf=Jf}else Qf=!1;jw=Qf&&(!document.documentMode||9<document.documentMode)}function _y(){Ja&&(Ja.detachEvent("onpropertychange",Nw),wl=Ja=null)}function Nw(e){if(e.propertyName==="value"&&Ld(wl)){var t=[];Tw(t,wl,e,Tm(e)),lw(Kj,t)}}function qj(e,t,r){e==="focusin"?(_y(),Ja=t,wl=r,Ja.attachEvent("onpropertychange",Nw)):e==="focusout"&&_y()}function Xj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ld(wl)}function Qj(e,t){if(e==="click")return Ld(t)}function Jj(e,t){if(e==="input"||e==="change")return Ld(t)}function eN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:eN;function _l(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Uh.call(t,s)||!pn(e[s],t[s]))return!1}return!0}function by(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sy(e,t){var r=by(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=by(r)}}function Rw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pw(){for(var e=window,t=Mu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Mu(e.document)}return t}function Im(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function tN(e){var t=Pw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Rw(r.ownerDocument.documentElement,r)){if(n!==null&&Im(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=Sy(r,o);var i=Sy(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rN=ms&&"documentMode"in document&&11>=document.documentMode,bi=null,op=null,el=null,ip=!1;function ky(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ip||bi==null||bi!==Mu(n)||(n=bi,"selectionStart"in n&&Im(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),el&&_l(el,n)||(el=n,n=Wu(op,"onSelect"),0<n.length&&(t=new Am("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=bi)))}function Uc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Si={animationend:Uc("Animation","AnimationEnd"),animationiteration:Uc("Animation","AnimationIteration"),animationstart:Uc("Animation","AnimationStart"),transitionend:Uc("Transition","TransitionEnd")},eh={},Dw={};ms&&(Dw=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function Fd(e){if(eh[e])return eh[e];if(!Si[e])return e;var t=Si[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Dw)return eh[e]=t[r];return e}var Aw=Fd("animationend"),Ow=Fd("animationiteration"),Mw=Fd("animationstart"),Iw=Fd("transitionend"),Lw=new Map,Cy="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 mo(e,t){Lw.set(e,t),Jo(t,[e])}for(var th=0;th<Cy.length;th++){var rh=Cy[th],nN=rh.toLowerCase(),sN=rh[0].toUpperCase()+rh.slice(1);mo(nN,"on"+sN)}mo(Aw,"onAnimationEnd");mo(Ow,"onAnimationIteration");mo(Mw,"onAnimationStart");mo("dblclick","onDoubleClick");mo("focusin","onFocus");mo("focusout","onBlur");mo(Iw,"onTransitionEnd");qi("onMouseEnter",["mouseout","mouseover"]);qi("onMouseLeave",["mouseout","mouseover"]);qi("onPointerEnter",["pointerout","pointerover"]);qi("onPointerLeave",["pointerout","pointerover"]);Jo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Jo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Jo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Jo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ba="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(" "),oN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ba));function Ey(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,nj(n,t,void 0,e),e.currentTarget=null}function Fw(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Ey(s,a,u),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Ey(s,a,u),o=l}}}if(Lu)throw e=tp,Lu=!1,tp=null,e}function wt(e,t){var r=t[dp];r===void 0&&(r=t[dp]=new Set);var n=e+"__bubble";r.has(n)||(zw(t,e,2,!1),r.add(n))}function nh(e,t,r){var n=0;t&&(n|=4),zw(r,e,n,t)}var Vc="_reactListening"+Math.random().toString(36).slice(2);function bl(e){if(!e[Vc]){e[Vc]=!0,Y0.forEach(function(r){r!=="selectionchange"&&(oN.has(r)||nh(r,!1,e),nh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vc]||(t[Vc]=!0,nh("selectionchange",!1,t))}}function zw(e,t,r,n){switch(bw(t)){case 1:var s=xj;break;case 4:s=wj;break;default:s=Pm}r=s.bind(null,t,r,e),s=void 0,!ep||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function sh(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=jo(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}lw(function(){var u=o,d=Tm(r),f=[];e:{var m=Lw.get(e);if(m!==void 0){var h=Am,x=e;switch(e){case"keypress":if(hu(r)===0)break e;case"keydown":case"keyup":h=Mj;break;case"focusin":x="focus",h=Xf;break;case"focusout":x="blur",h=Xf;break;case"beforeblur":case"afterblur":h=Xf;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=py;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Sj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Fj;break;case Aw:case Ow:case Mw:h=Ej;break;case Iw:h=Uj;break;case"scroll":h=_j;break;case"wheel":h=Wj;break;case"copy":case"cut":case"paste":h=jj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=gy}var g=(t&4)!==0,w=!g&&e==="scroll",v=g?m!==null?m+"Capture":null:m;g=[];for(var p=u,_;p!==null;){_=p;var C=_.stateNode;if(_.tag===5&&C!==null&&(_=C,v!==null&&(C=gl(p,v),C!=null&&g.push(Sl(p,C,_)))),w)break;p=p.return}0<g.length&&(m=new h(m,x,null,r,d),f.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",m&&r!==Qh&&(x=r.relatedTarget||r.fromElement)&&(jo(x)||x[gs]))break e;if((h||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,h?(x=r.relatedTarget||r.toElement,h=u,x=x?jo(x):null,x!==null&&(w=ei(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(h=null,x=u),h!==x)){if(g=py,C="onMouseLeave",v="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(g=gy,C="onPointerLeave",v="onPointerEnter",p="pointer"),w=h==null?m:ki(h),_=x==null?m:ki(x),m=new g(C,p+"leave",h,r,d),m.target=w,m.relatedTarget=_,C=null,jo(d)===u&&(g=new g(v,p+"enter",x,r,d),g.target=_,g.relatedTarget=w,C=g),w=C,h&&x)t:{for(g=h,v=x,p=0,_=g;_;_=ui(_))p++;for(_=0,C=v;C;C=ui(C))_++;for(;0<p-_;)g=ui(g),p--;for(;0<_-p;)v=ui(v),_--;for(;p--;){if(g===v||v!==null&&g===v.alternate)break t;g=ui(g),v=ui(v)}g=null}else g=null;h!==null&&Ty(f,m,h,g,!1),x!==null&&w!==null&&Ty(f,w,x,g,!0)}}e:{if(m=u?ki(u):window,h=m.nodeName&&m.nodeName.toLowerCase(),h==="select"||h==="input"&&m.type==="file")var E=Gj;else if(xy(m))if(jw)E=Jj;else{E=Xj;var T=qj}else(h=m.nodeName)&&h.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=Qj);if(E&&(E=E(e,u))){Tw(f,E,r,d);break e}T&&T(e,m,u),e==="focusout"&&(T=m._wrapperState)&&T.controlled&&m.type==="number"&&Zh(m,"number",m.value)}switch(T=u?ki(u):window,e){case"focusin":(xy(T)||T.contentEditable==="true")&&(bi=T,op=u,el=null);break;case"focusout":el=op=bi=null;break;case"mousedown":ip=!0;break;case"contextmenu":case"mouseup":case"dragend":ip=!1,ky(f,r,d);break;case"selectionchange":if(rN)break;case"keydown":case"keyup":ky(f,r,d)}var R;if(Mm)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else _i?Cw(e,r)&&(D="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(D="onCompositionStart");D&&(kw&&r.locale!=="ko"&&(_i||D!=="onCompositionStart"?D==="onCompositionEnd"&&_i&&(R=Sw()):(Bs=d,Dm="value"in Bs?Bs.value:Bs.textContent,_i=!0)),T=Wu(u,D),0<T.length&&(D=new my(D,e,null,r,d),f.push({event:D,listeners:T}),R?D.data=R:(R=Ew(r),R!==null&&(D.data=R)))),(R=Bj?Hj(e,r):Yj(e,r))&&(u=Wu(u,"onBeforeInput"),0<u.length&&(d=new my("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=R))}Fw(f,t)})}function Sl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wu(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=gl(e,r),o!=null&&n.unshift(Sl(e,o,s)),o=gl(e,t),o!=null&&n.push(Sl(e,o,s))),e=e.return}return n}function ui(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ty(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=gl(r,o),l!=null&&i.unshift(Sl(r,l,a))):s||(l=gl(r,o),l!=null&&i.push(Sl(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var iN=/\r\n?/g,aN=/\u0000|\uFFFD/g;function jy(e){return(typeof e=="string"?e:""+e).replace(iN,`
`).replace(aN,"")}function Wc(e,t,r){if(t=jy(t),jy(e)!==t&&r)throw Error(oe(425))}function $u(){}var ap=null,lp=null;function cp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var up=typeof setTimeout=="function"?setTimeout:void 0,lN=typeof clearTimeout=="function"?clearTimeout:void 0,Ny=typeof Promise=="function"?Promise:void 0,cN=typeof queueMicrotask=="function"?queueMicrotask:typeof Ny<"u"?function(e){return Ny.resolve(null).then(e).catch(uN)}:up;function uN(e){setTimeout(function(){throw e})}function oh(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),xl(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);xl(t)}function Qs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ry(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var fa=Math.random().toString(36).slice(2),Rn="__reactFiber$"+fa,kl="__reactProps$"+fa,gs="__reactContainer$"+fa,dp="__reactEvents$"+fa,dN="__reactListeners$"+fa,fN="__reactHandles$"+fa;function jo(e){var t=e[Rn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[gs]||r[Rn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ry(e);e!==null;){if(r=e[Rn])return r;e=Ry(e)}return t}e=r,r=e.parentNode}return null}function oc(e){return e=e[Rn]||e[gs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ki(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(oe(33))}function zd(e){return e[kl]||null}var fp=[],Ci=-1;function go(e){return{current:e}}function _t(e){0>Ci||(e.current=fp[Ci],fp[Ci]=null,Ci--)}function yt(e,t){Ci++,fp[Ci]=e.current,e.current=t}var oo={},lr=go(oo),Sr=go(!1),Vo=oo;function Xi(e,t){var r=e.type.contextTypes;if(!r)return oo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function kr(e){return e=e.childContextTypes,e!=null}function Bu(){_t(Sr),_t(lr)}function Py(e,t,r){if(lr.current!==oo)throw Error(oe(168));yt(lr,t),yt(Sr,r)}function Uw(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(oe(108,qT(e)||"Unknown",s));return Mt({},r,n)}function Hu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||oo,Vo=lr.current,yt(lr,e),yt(Sr,Sr.current),!0}function Dy(e,t,r){var n=e.stateNode;if(!n)throw Error(oe(169));r?(e=Uw(e,t,Vo),n.__reactInternalMemoizedMergedChildContext=e,_t(Sr),_t(lr),yt(lr,e)):_t(Sr),yt(Sr,r)}var is=null,Ud=!1,ih=!1;function Vw(e){is===null?is=[e]:is.push(e)}function hN(e){Ud=!0,Vw(e)}function vo(){if(!ih&&is!==null){ih=!0;var e=0,t=ht;try{var r=is;for(ht=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}is=null,Ud=!1}catch(s){throw is!==null&&(is=is.slice(e+1)),fw(jm,vo),s}finally{ht=t,ih=!1}}return null}var Ei=[],Ti=0,Yu=null,Zu=0,Br=[],Hr=0,Wo=null,as=1,ls="";function Co(e,t){Ei[Ti++]=Zu,Ei[Ti++]=Yu,Yu=e,Zu=t}function Ww(e,t,r){Br[Hr++]=as,Br[Hr++]=ls,Br[Hr++]=Wo,Wo=e;var n=as;e=ls;var s=32-dn(n)-1;n&=~(1<<s),r+=1;var o=32-dn(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,as=1<<32-dn(t)+s|r<<s|n,ls=o+e}else as=1<<o|r<<s|n,ls=e}function Lm(e){e.return!==null&&(Co(e,1),Ww(e,1,0))}function Fm(e){for(;e===Yu;)Yu=Ei[--Ti],Ei[Ti]=null,Zu=Ei[--Ti],Ei[Ti]=null;for(;e===Wo;)Wo=Br[--Hr],Br[Hr]=null,ls=Br[--Hr],Br[Hr]=null,as=Br[--Hr],Br[Hr]=null}var Or=null,Ar=null,jt=!1,an=null;function $w(e,t){var r=Zr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Ay(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Or=e,Ar=Qs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Or=e,Ar=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Wo!==null?{id:as,overflow:ls}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Zr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Or=e,Ar=null,!0):!1;default:return!1}}function hp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function pp(e){if(jt){var t=Ar;if(t){var r=t;if(!Ay(e,t)){if(hp(e))throw Error(oe(418));t=Qs(r.nextSibling);var n=Or;t&&Ay(e,t)?$w(n,r):(e.flags=e.flags&-4097|2,jt=!1,Or=e)}}else{if(hp(e))throw Error(oe(418));e.flags=e.flags&-4097|2,jt=!1,Or=e}}}function Oy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Or=e}function $c(e){if(e!==Or)return!1;if(!jt)return Oy(e),jt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cp(e.type,e.memoizedProps)),t&&(t=Ar)){if(hp(e))throw Bw(),Error(oe(418));for(;t;)$w(e,t),t=Qs(t.nextSibling)}if(Oy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(oe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ar=Qs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ar=null}}else Ar=Or?Qs(e.stateNode.nextSibling):null;return!0}function Bw(){for(var e=Ar;e;)e=Qs(e.nextSibling)}function Qi(){Ar=Or=null,jt=!1}function zm(e){an===null?an=[e]:an.push(e)}var pN=ks.ReactCurrentBatchConfig;function Ra(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(oe(309));var n=r.stateNode}if(!n)throw Error(oe(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(oe(284));if(!r._owner)throw Error(oe(290,e))}return e}function Bc(e,t){throw e=Object.prototype.toString.call(t),Error(oe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function My(e){var t=e._init;return t(e._payload)}function Hw(e){function t(v,p){if(e){var _=v.deletions;_===null?(v.deletions=[p],v.flags|=16):_.push(p)}}function r(v,p){if(!e)return null;for(;p!==null;)t(v,p),p=p.sibling;return null}function n(v,p){for(v=new Map;p!==null;)p.key!==null?v.set(p.key,p):v.set(p.index,p),p=p.sibling;return v}function s(v,p){return v=ro(v,p),v.index=0,v.sibling=null,v}function o(v,p,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<p?(v.flags|=2,p):_):(v.flags|=2,p)):(v.flags|=1048576,p)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,p,_,C){return p===null||p.tag!==6?(p=hh(_,v.mode,C),p.return=v,p):(p=s(p,_),p.return=v,p)}function l(v,p,_,C){var E=_.type;return E===wi?d(v,p,_.props.children,C,_.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===zs&&My(E)===p.type)?(C=s(p,_.props),C.ref=Ra(v,p,_),C.return=v,C):(C=wu(_.type,_.key,_.props,null,v.mode,C),C.ref=Ra(v,p,_),C.return=v,C)}function u(v,p,_,C){return p===null||p.tag!==4||p.stateNode.containerInfo!==_.containerInfo||p.stateNode.implementation!==_.implementation?(p=ph(_,v.mode,C),p.return=v,p):(p=s(p,_.children||[]),p.return=v,p)}function d(v,p,_,C,E){return p===null||p.tag!==7?(p=Lo(_,v.mode,C,E),p.return=v,p):(p=s(p,_),p.return=v,p)}function f(v,p,_){if(typeof p=="string"&&p!==""||typeof p=="number")return p=hh(""+p,v.mode,_),p.return=v,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ac:return _=wu(p.type,p.key,p.props,null,v.mode,_),_.ref=Ra(v,null,p),_.return=v,_;case xi:return p=ph(p,v.mode,_),p.return=v,p;case zs:var C=p._init;return f(v,C(p._payload),_)}if(Wa(p)||Ca(p))return p=Lo(p,v.mode,_,null),p.return=v,p;Bc(v,p)}return null}function m(v,p,_,C){var E=p!==null?p.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:a(v,p,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ac:return _.key===E?l(v,p,_,C):null;case xi:return _.key===E?u(v,p,_,C):null;case zs:return E=_._init,m(v,p,E(_._payload),C)}if(Wa(_)||Ca(_))return E!==null?null:d(v,p,_,C,null);Bc(v,_)}return null}function h(v,p,_,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return v=v.get(_)||null,a(p,v,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ac:return v=v.get(C.key===null?_:C.key)||null,l(p,v,C,E);case xi:return v=v.get(C.key===null?_:C.key)||null,u(p,v,C,E);case zs:var T=C._init;return h(v,p,_,T(C._payload),E)}if(Wa(C)||Ca(C))return v=v.get(_)||null,d(p,v,C,E,null);Bc(p,C)}return null}function x(v,p,_,C){for(var E=null,T=null,R=p,D=p=0,P=null;R!==null&&D<_.length;D++){R.index>D?(P=R,R=null):P=R.sibling;var L=m(v,R,_[D],C);if(L===null){R===null&&(R=P);break}e&&R&&L.alternate===null&&t(v,R),p=o(L,p,D),T===null?E=L:T.sibling=L,T=L,R=P}if(D===_.length)return r(v,R),jt&&Co(v,D),E;if(R===null){for(;D<_.length;D++)R=f(v,_[D],C),R!==null&&(p=o(R,p,D),T===null?E=R:T.sibling=R,T=R);return jt&&Co(v,D),E}for(R=n(v,R);D<_.length;D++)P=h(R,v,D,_[D],C),P!==null&&(e&&P.alternate!==null&&R.delete(P.key===null?D:P.key),p=o(P,p,D),T===null?E=P:T.sibling=P,T=P);return e&&R.forEach(function(q){return t(v,q)}),jt&&Co(v,D),E}function g(v,p,_,C){var E=Ca(_);if(typeof E!="function")throw Error(oe(150));if(_=E.call(_),_==null)throw Error(oe(151));for(var T=E=null,R=p,D=p=0,P=null,L=_.next();R!==null&&!L.done;D++,L=_.next()){R.index>D?(P=R,R=null):P=R.sibling;var q=m(v,R,L.value,C);if(q===null){R===null&&(R=P);break}e&&R&&q.alternate===null&&t(v,R),p=o(q,p,D),T===null?E=q:T.sibling=q,T=q,R=P}if(L.done)return r(v,R),jt&&Co(v,D),E;if(R===null){for(;!L.done;D++,L=_.next())L=f(v,L.value,C),L!==null&&(p=o(L,p,D),T===null?E=L:T.sibling=L,T=L);return jt&&Co(v,D),E}for(R=n(v,R);!L.done;D++,L=_.next())L=h(R,v,D,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?D:L.key),p=o(L,p,D),T===null?E=L:T.sibling=L,T=L);return e&&R.forEach(function(j){return t(v,j)}),jt&&Co(v,D),E}function w(v,p,_,C){if(typeof _=="object"&&_!==null&&_.type===wi&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ac:e:{for(var E=_.key,T=p;T!==null;){if(T.key===E){if(E=_.type,E===wi){if(T.tag===7){r(v,T.sibling),p=s(T,_.props.children),p.return=v,v=p;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===zs&&My(E)===T.type){r(v,T.sibling),p=s(T,_.props),p.ref=Ra(v,T,_),p.return=v,v=p;break e}r(v,T);break}else t(v,T);T=T.sibling}_.type===wi?(p=Lo(_.props.children,v.mode,C,_.key),p.return=v,v=p):(C=wu(_.type,_.key,_.props,null,v.mode,C),C.ref=Ra(v,p,_),C.return=v,v=C)}return i(v);case xi:e:{for(T=_.key;p!==null;){if(p.key===T)if(p.tag===4&&p.stateNode.containerInfo===_.containerInfo&&p.stateNode.implementation===_.implementation){r(v,p.sibling),p=s(p,_.children||[]),p.return=v,v=p;break e}else{r(v,p);break}else t(v,p);p=p.sibling}p=ph(_,v.mode,C),p.return=v,v=p}return i(v);case zs:return T=_._init,w(v,p,T(_._payload),C)}if(Wa(_))return x(v,p,_,C);if(Ca(_))return g(v,p,_,C);Bc(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,p!==null&&p.tag===6?(r(v,p.sibling),p=s(p,_),p.return=v,v=p):(r(v,p),p=hh(_,v.mode,C),p.return=v,v=p),i(v)):r(v,p)}return w}var Ji=Hw(!0),Yw=Hw(!1),Ku=go(null),Gu=null,ji=null,Um=null;function Vm(){Um=ji=Gu=null}function Wm(e){var t=Ku.current;_t(Ku),e._currentValue=t}function mp(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function zi(e,t){Gu=e,Um=ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(br=!0),e.firstContext=null)}function qr(e){var t=e._currentValue;if(Um!==e)if(e={context:e,memoizedValue:t,next:null},ji===null){if(Gu===null)throw Error(oe(308));ji=e,Gu.dependencies={lanes:0,firstContext:e}}else ji=ji.next=e;return t}var No=null;function $m(e){No===null?No=[e]:No.push(e)}function Zw(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,$m(t)):(r.next=s.next,s.next=r),t.interleaved=r,vs(e,n)}function vs(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Us=!1;function Bm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ds(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Js(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,it&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,vs(e,r)}return s=n.interleaved,s===null?(t.next=t,$m(n)):(t.next=s.next,s.next=t),n.interleaved=t,vs(e,r)}function pu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nm(e,r)}}function Iy(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function qu(e,t,r,n){var s=e.updateQueue;Us=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=u=l=null,a=o;do{var m=a.lane,h=a.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,g=a;switch(m=t,h=r,g.tag){case 1:if(x=g.payload,typeof x=="function"){f=x.call(h,f,m);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,m=typeof x=="function"?x.call(h,f,m):x,m==null)break e;f=Mt({},f,m);break e;case 2:Us=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else h={eventTime:h,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=h,l=f):d=d.next=h,i|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Bo|=i,e.lanes=i,e.memoizedState=f}}function Ly(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(oe(191,s));s.call(n)}}}var ic={},Ln=go(ic),Cl=go(ic),El=go(ic);function Ro(e){if(e===ic)throw Error(oe(174));return e}function Hm(e,t){switch(yt(El,t),yt(Cl,e),yt(Ln,ic),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gh(t,e)}_t(Ln),yt(Ln,t)}function ea(){_t(Ln),_t(Cl),_t(El)}function Gw(e){Ro(El.current);var t=Ro(Ln.current),r=Gh(t,e.type);t!==r&&(yt(Cl,e),yt(Ln,r))}function Ym(e){Cl.current===e&&(_t(Ln),_t(Cl))}var Dt=go(0);function Xu(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ah=[];function Zm(){for(var e=0;e<ah.length;e++)ah[e]._workInProgressVersionPrimary=null;ah.length=0}var mu=ks.ReactCurrentDispatcher,lh=ks.ReactCurrentBatchConfig,$o=0,Ot=null,Zt=null,Xt=null,Qu=!1,tl=!1,Tl=0,mN=0;function sr(){throw Error(oe(321))}function Km(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!pn(e[r],t[r]))return!1;return!0}function Gm(e,t,r,n,s,o){if($o=o,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,mu.current=e===null||e.memoizedState===null?xN:wN,e=r(n,s),tl){o=0;do{if(tl=!1,Tl=0,25<=o)throw Error(oe(301));o+=1,Xt=Zt=null,t.updateQueue=null,mu.current=_N,e=r(n,s)}while(tl)}if(mu.current=Ju,t=Zt!==null&&Zt.next!==null,$o=0,Xt=Zt=Ot=null,Qu=!1,t)throw Error(oe(300));return e}function qm(){var e=Tl!==0;return Tl=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Ot.memoizedState=Xt=e:Xt=Xt.next=e,Xt}function Xr(){if(Zt===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=Zt.next;var t=Xt===null?Ot.memoizedState:Xt.next;if(t!==null)Xt=t,Zt=e;else{if(e===null)throw Error(oe(310));Zt=e,e={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},Xt===null?Ot.memoizedState=Xt=e:Xt=Xt.next=e}return Xt}function jl(e,t){return typeof t=="function"?t(e):t}function ch(e){var t=Xr(),r=t.queue;if(r===null)throw Error(oe(311));r.lastRenderedReducer=e;var n=Zt,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,u=o;do{var d=u.lane;if(($o&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,i=n):l=l.next=f,Ot.lanes|=d,Bo|=d}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,pn(n,t.memoizedState)||(br=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ot.lanes|=o,Bo|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function uh(e){var t=Xr(),r=t.queue;if(r===null)throw Error(oe(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);pn(o,t.memoizedState)||(br=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function qw(){}function Xw(e,t){var r=Ot,n=Xr(),s=t(),o=!pn(n.memoizedState,s);if(o&&(n.memoizedState=s,br=!0),n=n.queue,Xm(e_.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Xt!==null&&Xt.memoizedState.tag&1){if(r.flags|=2048,Nl(9,Jw.bind(null,r,n,s,t),void 0,null),Qt===null)throw Error(oe(349));$o&30||Qw(r,t,s)}return s}function Qw(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jw(e,t,r,n){t.value=r,t.getSnapshot=n,t_(t)&&r_(e)}function e_(e,t,r){return r(function(){t_(t)&&r_(e)})}function t_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!pn(e,r)}catch{return!0}}function r_(e){var t=vs(e,1);t!==null&&fn(t,e,1,-1)}function Fy(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:e},t.queue=e,e=e.dispatch=yN.bind(null,Ot,e),[t.memoizedState,e]}function Nl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function n_(){return Xr().memoizedState}function gu(e,t,r,n){var s=Nn();Ot.flags|=e,s.memoizedState=Nl(1|t,r,void 0,n===void 0?null:n)}function Vd(e,t,r,n){var s=Xr();n=n===void 0?null:n;var o=void 0;if(Zt!==null){var i=Zt.memoizedState;if(o=i.destroy,n!==null&&Km(n,i.deps)){s.memoizedState=Nl(t,r,o,n);return}}Ot.flags|=e,s.memoizedState=Nl(1|t,r,o,n)}function zy(e,t){return gu(8390656,8,e,t)}function Xm(e,t){return Vd(2048,8,e,t)}function s_(e,t){return Vd(4,2,e,t)}function o_(e,t){return Vd(4,4,e,t)}function i_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function a_(e,t,r){return r=r!=null?r.concat([e]):null,Vd(4,4,i_.bind(null,t,e),r)}function Qm(){}function l_(e,t){var r=Xr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Km(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function c_(e,t){var r=Xr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Km(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function u_(e,t,r){return $o&21?(pn(r,t)||(r=mw(),Ot.lanes|=r,Bo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,br=!0),e.memoizedState=r)}function gN(e,t){var r=ht;ht=r!==0&&4>r?r:4,e(!0);var n=lh.transition;lh.transition={};try{e(!1),t()}finally{ht=r,lh.transition=n}}function d_(){return Xr().memoizedState}function vN(e,t,r){var n=to(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},f_(e))h_(t,r);else if(r=Zw(e,t,r,n),r!==null){var s=pr();fn(r,e,n,s),p_(r,t,n)}}function yN(e,t,r){var n=to(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(f_(e))h_(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,pn(a,i)){var l=t.interleaved;l===null?(s.next=s,$m(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Zw(e,t,s,n),r!==null&&(s=pr(),fn(r,e,n,s),p_(r,t,n))}}function f_(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function h_(e,t){tl=Qu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function p_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nm(e,r)}}var Ju={readContext:qr,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},xN={readContext:qr,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:qr,useEffect:zy,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,gu(4194308,4,i_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return gu(4194308,4,e,t)},useInsertionEffect:function(e,t){return gu(4,2,e,t)},useMemo:function(e,t){var r=Nn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Nn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=vN.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:Fy,useDebugValue:Qm,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=Fy(!1),t=e[0];return e=gN.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=Nn();if(jt){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=t(),Qt===null)throw Error(oe(349));$o&30||Qw(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,zy(e_.bind(null,n,o,e),[e]),n.flags|=2048,Nl(9,Jw.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Nn(),t=Qt.identifierPrefix;if(jt){var r=ls,n=as;r=(n&~(1<<32-dn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Tl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=mN++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wN={readContext:qr,useCallback:l_,useContext:qr,useEffect:Xm,useImperativeHandle:a_,useInsertionEffect:s_,useLayoutEffect:o_,useMemo:c_,useReducer:ch,useRef:n_,useState:function(){return ch(jl)},useDebugValue:Qm,useDeferredValue:function(e){var t=Xr();return u_(t,Zt.memoizedState,e)},useTransition:function(){var e=ch(jl)[0],t=Xr().memoizedState;return[e,t]},useMutableSource:qw,useSyncExternalStore:Xw,useId:d_,unstable_isNewReconciler:!1},_N={readContext:qr,useCallback:l_,useContext:qr,useEffect:Xm,useImperativeHandle:a_,useInsertionEffect:s_,useLayoutEffect:o_,useMemo:c_,useReducer:uh,useRef:n_,useState:function(){return uh(jl)},useDebugValue:Qm,useDeferredValue:function(e){var t=Xr();return Zt===null?t.memoizedState=e:u_(t,Zt.memoizedState,e)},useTransition:function(){var e=uh(jl)[0],t=Xr().memoizedState;return[e,t]},useMutableSource:qw,useSyncExternalStore:Xw,useId:d_,unstable_isNewReconciler:!1};function nn(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function gp(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wd={isMounted:function(e){return(e=e._reactInternals)?ei(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=pr(),s=to(e),o=ds(n,s);o.payload=t,r!=null&&(o.callback=r),t=Js(e,o,s),t!==null&&(fn(t,e,s,n),pu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=pr(),s=to(e),o=ds(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Js(e,o,s),t!==null&&(fn(t,e,s,n),pu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=pr(),n=to(e),s=ds(r,n);s.tag=2,t!=null&&(s.callback=t),t=Js(e,s,n),t!==null&&(fn(t,e,n,r),pu(t,e,n))}};function Uy(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!_l(r,n)||!_l(s,o):!0}function m_(e,t,r){var n=!1,s=oo,o=t.contextType;return typeof o=="object"&&o!==null?o=qr(o):(s=kr(t)?Vo:lr.current,n=t.contextTypes,o=(n=n!=null)?Xi(e,s):oo),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Vy(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Wd.enqueueReplaceState(t,t.state,null)}function vp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Bm(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=qr(o):(o=kr(t)?Vo:lr.current,s.context=Xi(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(gp(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Wd.enqueueReplaceState(s,s.state,null),qu(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ta(e,t){try{var r="",n=t;do r+=GT(n),n=n.return;while(n);var s=r}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function dh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function yp(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var bN=typeof WeakMap=="function"?WeakMap:Map;function g_(e,t,r){r=ds(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){td||(td=!0,jp=n),yp(e,t)},r}function v_(e,t,r){r=ds(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){yp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){yp(e,t),typeof n!="function"&&(eo===null?eo=new Set([this]):eo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Wy(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new bN;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=IN.bind(null,e,t,r),t.then(e,e))}function $y(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function By(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ds(-1,1),t.tag=2,Js(r,t,1))),r.lanes|=1),e)}var SN=ks.ReactCurrentOwner,br=!1;function fr(e,t,r,n){t.child=e===null?Yw(t,null,r,n):Ji(t,e.child,r,n)}function Hy(e,t,r,n,s){r=r.render;var o=t.ref;return zi(t,s),n=Gm(e,t,r,n,o,s),r=qm(),e!==null&&!br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ys(e,t,s)):(jt&&r&&Lm(t),t.flags|=1,fr(e,t,n,s),t.child)}function Yy(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!ig(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,y_(e,t,o,n,s)):(e=wu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:_l,r(i,n)&&e.ref===t.ref)return ys(e,t,s)}return t.flags|=1,e=ro(o,n),e.ref=t.ref,e.return=t,t.child=e}function y_(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(_l(o,n)&&e.ref===t.ref)if(br=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(br=!0);else return t.lanes=e.lanes,ys(e,t,s)}return xp(e,t,r,n,s)}function x_(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Ri,Rr),Rr|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yt(Ri,Rr),Rr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,yt(Ri,Rr),Rr|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,yt(Ri,Rr),Rr|=n;return fr(e,t,s,r),t.child}function w_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function xp(e,t,r,n,s){var o=kr(r)?Vo:lr.current;return o=Xi(t,o),zi(t,s),r=Gm(e,t,r,n,o,s),n=qm(),e!==null&&!br?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ys(e,t,s)):(jt&&n&&Lm(t),t.flags|=1,fr(e,t,r,s),t.child)}function Zy(e,t,r,n,s){if(kr(r)){var o=!0;Hu(t)}else o=!1;if(zi(t,s),t.stateNode===null)vu(e,t),m_(t,r,n),vp(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=qr(u):(u=kr(r)?Vo:lr.current,u=Xi(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Vy(t,i,n,u),Us=!1;var m=t.memoizedState;i.state=m,qu(t,n,i,s),l=t.memoizedState,a!==n||m!==l||Sr.current||Us?(typeof d=="function"&&(gp(t,r,d,n),l=t.memoizedState),(a=Us||Uy(t,r,a,n,m,l,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Kw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:nn(t.type,a),i.props=u,f=t.pendingProps,m=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=qr(l):(l=kr(r)?Vo:lr.current,l=Xi(t,l));var h=r.getDerivedStateFromProps;(d=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||m!==l)&&Vy(t,i,n,l),Us=!1,m=t.memoizedState,i.state=m,qu(t,n,i,s);var x=t.memoizedState;a!==f||m!==x||Sr.current||Us?(typeof h=="function"&&(gp(t,r,h,n),x=t.memoizedState),(u=Us||Uy(t,r,u,n,m,x,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),i.props=n,i.state=x,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return wp(e,t,r,n,o,s)}function wp(e,t,r,n,s,o){w_(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Dy(t,r,!1),ys(e,t,o);n=t.stateNode,SN.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Ji(t,e.child,null,o),t.child=Ji(t,null,a,o)):fr(e,t,a,o),t.memoizedState=n.state,s&&Dy(t,r,!0),t.child}function __(e){var t=e.stateNode;t.pendingContext?Py(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Py(e,t.context,!1),Hm(e,t.containerInfo)}function Ky(e,t,r,n,s){return Qi(),zm(s),t.flags|=256,fr(e,t,r,n),t.child}var _p={dehydrated:null,treeContext:null,retryLane:0};function bp(e){return{baseLanes:e,cachePool:null,transitions:null}}function b_(e,t,r){var n=t.pendingProps,s=Dt.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),yt(Dt,s&1),e===null)return pp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Hd(i,n,0,null),e=Lo(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=bp(r),t.memoizedState=_p,e):Jm(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return kN(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=ro(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=ro(a,o):(o=Lo(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?bp(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=_p,n}return o=e.child,e=o.sibling,n=ro(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Jm(e,t){return t=Hd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hc(e,t,r,n){return n!==null&&zm(n),Ji(t,e.child,null,r),e=Jm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kN(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=dh(Error(oe(422))),Hc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Hd({mode:"visible",children:n.children},s,0,null),o=Lo(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&Ji(t,e.child,null,i),t.child.memoizedState=bp(i),t.memoizedState=_p,o);if(!(t.mode&1))return Hc(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(oe(419)),n=dh(o,n,void 0),Hc(e,t,i,n)}if(a=(i&e.childLanes)!==0,br||a){if(n=Qt,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,vs(e,s),fn(n,e,s,-1))}return og(),n=dh(Error(oe(421))),Hc(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=LN.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Ar=Qs(s.nextSibling),Or=t,jt=!0,an=null,e!==null&&(Br[Hr++]=as,Br[Hr++]=ls,Br[Hr++]=Wo,as=e.id,ls=e.overflow,Wo=t),t=Jm(t,n.children),t.flags|=4096,t)}function Gy(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),mp(e.return,t,r)}function fh(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function S_(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(fr(e,t,n.children,r),n=Dt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gy(e,r,t);else if(e.tag===19)Gy(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(yt(Dt,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Xu(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),fh(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Xu(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}fh(t,!0,r,null,o);break;case"together":fh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ys(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Bo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(oe(153));if(t.child!==null){for(e=t.child,r=ro(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ro(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function CN(e,t,r){switch(t.tag){case 3:__(t),Qi();break;case 5:Gw(t);break;case 1:kr(t.type)&&Hu(t);break;case 4:Hm(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;yt(Ku,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(yt(Dt,Dt.current&1),t.flags|=128,null):r&t.child.childLanes?b_(e,t,r):(yt(Dt,Dt.current&1),e=ys(e,t,r),e!==null?e.sibling:null);yt(Dt,Dt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return S_(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),yt(Dt,Dt.current),n)break;return null;case 22:case 23:return t.lanes=0,x_(e,t,r)}return ys(e,t,r)}var k_,Sp,C_,E_;k_=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Sp=function(){};C_=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Ro(Ln.current);var o=null;switch(r){case"input":s=Hh(e,s),n=Hh(e,n),o=[];break;case"select":s=Mt({},s,{value:void 0}),n=Mt({},n,{value:void 0}),o=[];break;case"textarea":s=Kh(e,s),n=Kh(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=$u)}qh(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(pl.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(pl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&wt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};E_=function(e,t,r,n){r!==n&&(t.flags|=4)};function Pa(e,t){if(!jt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function or(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function EN(e,t,r){var n=t.pendingProps;switch(Fm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(t),null;case 1:return kr(t.type)&&Bu(),or(t),null;case 3:return n=t.stateNode,ea(),_t(Sr),_t(lr),Zm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&($c(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,an!==null&&(Pp(an),an=null))),Sp(e,t),or(t),null;case 5:Ym(t);var s=Ro(El.current);if(r=t.type,e!==null&&t.stateNode!=null)C_(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(oe(166));return or(t),null}if(e=Ro(Ln.current),$c(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Rn]=t,n[kl]=o,e=(t.mode&1)!==0,r){case"dialog":wt("cancel",n),wt("close",n);break;case"iframe":case"object":case"embed":wt("load",n);break;case"video":case"audio":for(s=0;s<Ba.length;s++)wt(Ba[s],n);break;case"source":wt("error",n);break;case"img":case"image":case"link":wt("error",n),wt("load",n);break;case"details":wt("toggle",n);break;case"input":sy(n,o),wt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},wt("invalid",n);break;case"textarea":iy(n,o),wt("invalid",n)}qh(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Wc(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Wc(n.textContent,a,e),s=["children",""+a]):pl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&wt("scroll",n)}switch(r){case"input":Oc(n),oy(n,o,!0);break;case"textarea":Oc(n),ay(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=$u)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ew(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Rn]=t,e[kl]=n,k_(e,t,!1,!1),t.stateNode=e;e:{switch(i=Xh(r,n),r){case"dialog":wt("cancel",e),wt("close",e),s=n;break;case"iframe":case"object":case"embed":wt("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ba.length;s++)wt(Ba[s],e);s=n;break;case"source":wt("error",e),s=n;break;case"img":case"image":case"link":wt("error",e),wt("load",e),s=n;break;case"details":wt("toggle",e),s=n;break;case"input":sy(e,n),s=Hh(e,n),wt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Mt({},n,{value:void 0}),wt("invalid",e);break;case"textarea":iy(e,n),s=Kh(e,n),wt("invalid",e);break;default:s=n}qh(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?nw(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&tw(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ml(e,l):typeof l=="number"&&ml(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(pl.hasOwnProperty(o)?l!=null&&o==="onScroll"&&wt("scroll",e):l!=null&&Sm(e,o,l,i))}switch(r){case"input":Oc(e),oy(e,n,!1);break;case"textarea":Oc(e),ay(e);break;case"option":n.value!=null&&e.setAttribute("value",""+so(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Mi(e,!!n.multiple,o,!1):n.defaultValue!=null&&Mi(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=$u)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return or(t),null;case 6:if(e&&t.stateNode!=null)E_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(oe(166));if(r=Ro(El.current),Ro(Ln.current),$c(t)){if(n=t.stateNode,r=t.memoizedProps,n[Rn]=t,(o=n.nodeValue!==r)&&(e=Or,e!==null))switch(e.tag){case 3:Wc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wc(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Rn]=t,t.stateNode=n}return or(t),null;case 13:if(_t(Dt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(jt&&Ar!==null&&t.mode&1&&!(t.flags&128))Bw(),Qi(),t.flags|=98560,o=!1;else if(o=$c(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(oe(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(oe(317));o[Rn]=t}else Qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;or(t),o=!1}else an!==null&&(Pp(an),an=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?Kt===0&&(Kt=3):og())),t.updateQueue!==null&&(t.flags|=4),or(t),null);case 4:return ea(),Sp(e,t),e===null&&bl(t.stateNode.containerInfo),or(t),null;case 10:return Wm(t.type._context),or(t),null;case 17:return kr(t.type)&&Bu(),or(t),null;case 19:if(_t(Dt),o=t.memoizedState,o===null)return or(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Pa(o,!1);else{if(Kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Xu(e),i!==null){for(t.flags|=128,Pa(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return yt(Dt,Dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>ra&&(t.flags|=128,n=!0,Pa(o,!1),t.lanes=4194304)}else{if(!n)if(e=Xu(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Pa(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!jt)return or(t),null}else 2*Ut()-o.renderingStartTime>ra&&r!==1073741824&&(t.flags|=128,n=!0,Pa(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ut(),t.sibling=null,r=Dt.current,yt(Dt,n?r&1|2:r&1),t):(or(t),null);case 22:case 23:return sg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Rr&1073741824&&(or(t),t.subtreeFlags&6&&(t.flags|=8192)):or(t),null;case 24:return null;case 25:return null}throw Error(oe(156,t.tag))}function TN(e,t){switch(Fm(t),t.tag){case 1:return kr(t.type)&&Bu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(),_t(Sr),_t(lr),Zm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ym(t),null;case 13:if(_t(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(oe(340));Qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _t(Dt),null;case 4:return ea(),null;case 10:return Wm(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var Yc=!1,ir=!1,jN=typeof WeakSet=="function"?WeakSet:Set,_e=null;function Ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Lt(e,t,n)}else r.current=null}function kp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var qy=!1;function NN(e,t){if(ap=Uu,e=Pw(),Im(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=i+s),f!==o||n!==0&&f.nodeType!==3||(l=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)m=f,f=h;for(;;){if(f===e)break t;if(m===r&&++u===s&&(a=i),m===o&&++d===n&&(l=i),(h=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(lp={focusedElem:e,selectionRange:r},Uu=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,w=x.memoizedState,v=t.stateNode,p=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:nn(t.type,g),w);v.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(C){Lt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return x=qy,qy=!1,x}function rl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&kp(t,r,o)}s=s.next}while(s!==n)}}function $d(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Cp(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function T_(e){var t=e.alternate;t!==null&&(e.alternate=null,T_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rn],delete t[kl],delete t[dp],delete t[dN],delete t[fN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function j_(e){return e.tag===5||e.tag===3||e.tag===4}function Xy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||j_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ep(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=$u));else if(n!==4&&(e=e.child,e!==null))for(Ep(e,t,r),e=e.sibling;e!==null;)Ep(e,t,r),e=e.sibling}function Tp(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Tp(e,t,r),e=e.sibling;e!==null;)Tp(e,t,r),e=e.sibling}var er=null,sn=!1;function Os(e,t,r){for(r=r.child;r!==null;)N_(e,t,r),r=r.sibling}function N_(e,t,r){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Md,r)}catch{}switch(r.tag){case 5:ir||Ni(r,t);case 6:var n=er,s=sn;er=null,Os(e,t,r),er=n,sn=s,er!==null&&(sn?(e=er,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):er.removeChild(r.stateNode));break;case 18:er!==null&&(sn?(e=er,r=r.stateNode,e.nodeType===8?oh(e.parentNode,r):e.nodeType===1&&oh(e,r),xl(e)):oh(er,r.stateNode));break;case 4:n=er,s=sn,er=r.stateNode.containerInfo,sn=!0,Os(e,t,r),er=n,sn=s;break;case 0:case 11:case 14:case 15:if(!ir&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&kp(r,t,i),s=s.next}while(s!==n)}Os(e,t,r);break;case 1:if(!ir&&(Ni(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Lt(r,t,a)}Os(e,t,r);break;case 21:Os(e,t,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,Os(e,t,r),ir=n):Os(e,t,r);break;default:Os(e,t,r)}}function Qy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new jN),t.forEach(function(n){var s=FN.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function rn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:er=a.stateNode,sn=!1;break e;case 3:er=a.stateNode.containerInfo,sn=!0;break e;case 4:er=a.stateNode.containerInfo,sn=!0;break e}a=a.return}if(er===null)throw Error(oe(160));N_(o,i,s),er=null,sn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)R_(t,e),t=t.sibling}function R_(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rn(t,e),jn(e),n&4){try{rl(3,e,e.return),$d(3,e)}catch(g){Lt(e,e.return,g)}try{rl(5,e,e.return)}catch(g){Lt(e,e.return,g)}}break;case 1:rn(t,e),jn(e),n&512&&r!==null&&Ni(r,r.return);break;case 5:if(rn(t,e),jn(e),n&512&&r!==null&&Ni(r,r.return),e.flags&32){var s=e.stateNode;try{ml(s,"")}catch(g){Lt(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Q0(s,o),Xh(a,i);var u=Xh(a,o);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?nw(s,f):d==="dangerouslySetInnerHTML"?tw(s,f):d==="children"?ml(s,f):Sm(s,d,f,u)}switch(a){case"input":Yh(s,o);break;case"textarea":J0(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Mi(s,!!o.multiple,h,!1):m!==!!o.multiple&&(o.defaultValue!=null?Mi(s,!!o.multiple,o.defaultValue,!0):Mi(s,!!o.multiple,o.multiple?[]:"",!1))}s[kl]=o}catch(g){Lt(e,e.return,g)}}break;case 6:if(rn(t,e),jn(e),n&4){if(e.stateNode===null)throw Error(oe(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){Lt(e,e.return,g)}}break;case 3:if(rn(t,e),jn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{xl(t.containerInfo)}catch(g){Lt(e,e.return,g)}break;case 4:rn(t,e),jn(e);break;case 13:rn(t,e),jn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(rg=Ut())),n&4&&Qy(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(ir=(u=ir)||d,rn(t,e),ir=u):rn(t,e),jn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(_e=e,d=e.child;d!==null;){for(f=_e=d;_e!==null;){switch(m=_e,h=m.child,m.tag){case 0:case 11:case 14:case 15:rl(4,m,m.return);break;case 1:Ni(m,m.return);var x=m.stateNode;if(typeof x.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(g){Lt(n,r,g)}}break;case 5:Ni(m,m.return);break;case 22:if(m.memoizedState!==null){ex(f);continue}}h!==null?(h.return=m,_e=h):ex(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=rw("display",i))}catch(g){Lt(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Lt(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:rn(t,e),jn(e),n&4&&Qy(e);break;case 21:break;default:rn(t,e),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(j_(r)){var n=r;break e}r=r.return}throw Error(oe(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ml(s,""),n.flags&=-33);var o=Xy(e);Tp(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Xy(e);Ep(e,a,i);break;default:throw Error(oe(161))}}catch(l){Lt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function RN(e,t,r){_e=e,P_(e)}function P_(e,t,r){for(var n=(e.mode&1)!==0;_e!==null;){var s=_e,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Yc;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ir;a=Yc;var u=ir;if(Yc=i,(ir=l)&&!u)for(_e=s;_e!==null;)i=_e,l=i.child,i.tag===22&&i.memoizedState!==null?tx(s):l!==null?(l.return=i,_e=l):tx(s);for(;o!==null;)_e=o,P_(o),o=o.sibling;_e=s,Yc=a,ir=u}Jy(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,_e=o):Jy(e)}}function Jy(e){for(;_e!==null;){var t=_e;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ir||$d(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ir)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:nn(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ly(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ly(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&xl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(oe(163))}ir||t.flags&512&&Cp(t)}catch(m){Lt(t,t.return,m)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function ex(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function tx(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{$d(4,t)}catch(l){Lt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Lt(t,s,l)}}var o=t.return;try{Cp(t)}catch(l){Lt(t,o,l)}break;case 5:var i=t.return;try{Cp(t)}catch(l){Lt(t,i,l)}}}catch(l){Lt(t,t.return,l)}if(t===e){_e=null;break}var a=t.sibling;if(a!==null){a.return=t.return,_e=a;break}_e=t.return}}var PN=Math.ceil,ed=ks.ReactCurrentDispatcher,eg=ks.ReactCurrentOwner,Kr=ks.ReactCurrentBatchConfig,it=0,Qt=null,$t=null,tr=0,Rr=0,Ri=go(0),Kt=0,Rl=null,Bo=0,Bd=0,tg=0,nl=null,_r=null,rg=0,ra=1/0,ns=null,td=!1,jp=null,eo=null,Zc=!1,Hs=null,rd=0,sl=0,Np=null,yu=-1,xu=0;function pr(){return it&6?Ut():yu!==-1?yu:yu=Ut()}function to(e){return e.mode&1?it&2&&tr!==0?tr&-tr:pN.transition!==null?(xu===0&&(xu=mw()),xu):(e=ht,e!==0||(e=window.event,e=e===void 0?16:bw(e.type)),e):1}function fn(e,t,r,n){if(50<sl)throw sl=0,Np=null,Error(oe(185));nc(e,r,n),(!(it&2)||e!==Qt)&&(e===Qt&&(!(it&2)&&(Bd|=r),Kt===4&&Ws(e,tr)),Cr(e,n),r===1&&it===0&&!(t.mode&1)&&(ra=Ut()+500,Ud&&vo()))}function Cr(e,t){var r=e.callbackNode;pj(e,t);var n=zu(e,e===Qt?tr:0);if(n===0)r!==null&&uy(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&uy(r),t===1)e.tag===0?hN(rx.bind(null,e)):Vw(rx.bind(null,e)),cN(function(){!(it&6)&&vo()}),r=null;else{switch(gw(n)){case 1:r=jm;break;case 4:r=hw;break;case 16:r=Fu;break;case 536870912:r=pw;break;default:r=Fu}r=z_(r,D_.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function D_(e,t){if(yu=-1,xu=0,it&6)throw Error(oe(327));var r=e.callbackNode;if(Ui()&&e.callbackNode!==r)return null;var n=zu(e,e===Qt?tr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=nd(e,n);else{t=n;var s=it;it|=2;var o=O_();(Qt!==e||tr!==t)&&(ns=null,ra=Ut()+500,Io(e,t));do try{ON();break}catch(a){A_(e,a)}while(!0);Vm(),ed.current=o,it=s,$t!==null?t=0:(Qt=null,tr=0,t=Kt)}if(t!==0){if(t===2&&(s=rp(e),s!==0&&(n=s,t=Rp(e,s))),t===1)throw r=Rl,Io(e,0),Ws(e,n),Cr(e,Ut()),r;if(t===6)Ws(e,n);else{if(s=e.current.alternate,!(n&30)&&!DN(s)&&(t=nd(e,n),t===2&&(o=rp(e),o!==0&&(n=o,t=Rp(e,o))),t===1))throw r=Rl,Io(e,0),Ws(e,n),Cr(e,Ut()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(oe(345));case 2:Eo(e,_r,ns);break;case 3:if(Ws(e,n),(n&130023424)===n&&(t=rg+500-Ut(),10<t)){if(zu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){pr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=up(Eo.bind(null,e,_r,ns),t);break}Eo(e,_r,ns);break;case 4:if(Ws(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-dn(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ut()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*PN(n/1960))-n,10<n){e.timeoutHandle=up(Eo.bind(null,e,_r,ns),n);break}Eo(e,_r,ns);break;case 5:Eo(e,_r,ns);break;default:throw Error(oe(329))}}}return Cr(e,Ut()),e.callbackNode===r?D_.bind(null,e):null}function Rp(e,t){var r=nl;return e.current.memoizedState.isDehydrated&&(Io(e,t).flags|=256),e=nd(e,t),e!==2&&(t=_r,_r=r,t!==null&&Pp(t)),e}function Pp(e){_r===null?_r=e:_r.push.apply(_r,e)}function DN(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!pn(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ws(e,t){for(t&=~tg,t&=~Bd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-dn(t),n=1<<r;e[r]=-1,t&=~n}}function rx(e){if(it&6)throw Error(oe(327));Ui();var t=zu(e,0);if(!(t&1))return Cr(e,Ut()),null;var r=nd(e,t);if(e.tag!==0&&r===2){var n=rp(e);n!==0&&(t=n,r=Rp(e,n))}if(r===1)throw r=Rl,Io(e,0),Ws(e,t),Cr(e,Ut()),r;if(r===6)throw Error(oe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Eo(e,_r,ns),Cr(e,Ut()),null}function ng(e,t){var r=it;it|=1;try{return e(t)}finally{it=r,it===0&&(ra=Ut()+500,Ud&&vo())}}function Ho(e){Hs!==null&&Hs.tag===0&&!(it&6)&&Ui();var t=it;it|=1;var r=Kr.transition,n=ht;try{if(Kr.transition=null,ht=1,e)return e()}finally{ht=n,Kr.transition=r,it=t,!(it&6)&&vo()}}function sg(){Rr=Ri.current,_t(Ri)}function Io(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,lN(r)),$t!==null)for(r=$t.return;r!==null;){var n=r;switch(Fm(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Bu();break;case 3:ea(),_t(Sr),_t(lr),Zm();break;case 5:Ym(n);break;case 4:ea();break;case 13:_t(Dt);break;case 19:_t(Dt);break;case 10:Wm(n.type._context);break;case 22:case 23:sg()}r=r.return}if(Qt=e,$t=e=ro(e.current,null),tr=Rr=t,Kt=0,Rl=null,tg=Bd=Bo=0,_r=nl=null,No!==null){for(t=0;t<No.length;t++)if(r=No[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}No=null}return e}function A_(e,t){do{var r=$t;try{if(Vm(),mu.current=Ju,Qu){for(var n=Ot.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Qu=!1}if($o=0,Xt=Zt=Ot=null,tl=!1,Tl=0,eg.current=null,r===null||r.return===null){Kt=1,Rl=t,$t=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=tr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=$y(i);if(h!==null){h.flags&=-257,By(h,i,a,o,t),h.mode&1&&Wy(o,u,t),t=h,l=u;var x=t.updateQueue;if(x===null){var g=new Set;g.add(l),t.updateQueue=g}else x.add(l);break e}else{if(!(t&1)){Wy(o,u,t),og();break e}l=Error(oe(426))}}else if(jt&&a.mode&1){var w=$y(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),By(w,i,a,o,t),zm(ta(l,a));break e}}o=l=ta(l,a),Kt!==4&&(Kt=2),nl===null?nl=[o]:nl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=g_(o,l,t);Iy(o,v);break e;case 1:a=l;var p=o.type,_=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(eo===null||!eo.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t;var C=v_(o,a,t);Iy(o,C);break e}}o=o.return}while(o!==null)}I_(r)}catch(E){t=E,$t===r&&r!==null&&($t=r=r.return);continue}break}while(!0)}function O_(){var e=ed.current;return ed.current=Ju,e===null?Ju:e}function og(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),Qt===null||!(Bo&268435455)&&!(Bd&268435455)||Ws(Qt,tr)}function nd(e,t){var r=it;it|=2;var n=O_();(Qt!==e||tr!==t)&&(ns=null,Io(e,t));do try{AN();break}catch(s){A_(e,s)}while(!0);if(Vm(),it=r,ed.current=n,$t!==null)throw Error(oe(261));return Qt=null,tr=0,Kt}function AN(){for(;$t!==null;)M_($t)}function ON(){for(;$t!==null&&!oj();)M_($t)}function M_(e){var t=F_(e.alternate,e,Rr);e.memoizedProps=e.pendingProps,t===null?I_(e):$t=t,eg.current=null}function I_(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=TN(r,t),r!==null){r.flags&=32767,$t=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kt=6,$t=null;return}}else if(r=EN(r,t,Rr),r!==null){$t=r;return}if(t=t.sibling,t!==null){$t=t;return}$t=t=e}while(t!==null);Kt===0&&(Kt=5)}function Eo(e,t,r){var n=ht,s=Kr.transition;try{Kr.transition=null,ht=1,MN(e,t,r,n)}finally{Kr.transition=s,ht=n}return null}function MN(e,t,r,n){do Ui();while(Hs!==null);if(it&6)throw Error(oe(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(oe(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(mj(e,o),e===Qt&&($t=Qt=null,tr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Zc||(Zc=!0,z_(Fu,function(){return Ui(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Kr.transition,Kr.transition=null;var i=ht;ht=1;var a=it;it|=4,eg.current=null,NN(e,r),R_(r,e),tN(lp),Uu=!!ap,lp=ap=null,e.current=r,RN(r),ij(),it=a,ht=i,Kr.transition=o}else e.current=r;if(Zc&&(Zc=!1,Hs=e,rd=s),o=e.pendingLanes,o===0&&(eo=null),cj(r.stateNode),Cr(e,Ut()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(td)throw td=!1,e=jp,jp=null,e;return rd&1&&e.tag!==0&&Ui(),o=e.pendingLanes,o&1?e===Np?sl++:(sl=0,Np=e):sl=0,vo(),null}function Ui(){if(Hs!==null){var e=gw(rd),t=Kr.transition,r=ht;try{if(Kr.transition=null,ht=16>e?16:e,Hs===null)var n=!1;else{if(e=Hs,Hs=null,rd=0,it&6)throw Error(oe(331));var s=it;for(it|=4,_e=e.current;_e!==null;){var o=_e,i=o.child;if(_e.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(_e=u;_e!==null;){var d=_e;switch(d.tag){case 0:case 11:case 15:rl(8,d,o)}var f=d.child;if(f!==null)f.return=d,_e=f;else for(;_e!==null;){d=_e;var m=d.sibling,h=d.return;if(T_(d),d===u){_e=null;break}if(m!==null){m.return=h,_e=m;break}_e=h}}}var x=o.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}_e=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,_e=i;else e:for(;_e!==null;){if(o=_e,o.flags&2048)switch(o.tag){case 0:case 11:case 15:rl(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,_e=v;break e}_e=o.return}}var p=e.current;for(_e=p;_e!==null;){i=_e;var _=i.child;if(i.subtreeFlags&2064&&_!==null)_.return=i,_e=_;else e:for(i=p;_e!==null;){if(a=_e,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:$d(9,a)}}catch(E){Lt(a,a.return,E)}if(a===i){_e=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,_e=C;break e}_e=a.return}}if(it=s,vo(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Md,e)}catch{}n=!0}return n}finally{ht=r,Kr.transition=t}}return!1}function nx(e,t,r){t=ta(r,t),t=g_(e,t,1),e=Js(e,t,1),t=pr(),e!==null&&(nc(e,1,t),Cr(e,t))}function Lt(e,t,r){if(e.tag===3)nx(e,e,r);else for(;t!==null;){if(t.tag===3){nx(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(eo===null||!eo.has(n))){e=ta(r,e),e=v_(t,e,1),t=Js(t,e,1),e=pr(),t!==null&&(nc(t,1,e),Cr(t,e));break}}t=t.return}}function IN(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=pr(),e.pingedLanes|=e.suspendedLanes&r,Qt===e&&(tr&r)===r&&(Kt===4||Kt===3&&(tr&130023424)===tr&&500>Ut()-rg?Io(e,0):tg|=r),Cr(e,t)}function L_(e,t){t===0&&(e.mode&1?(t=Lc,Lc<<=1,!(Lc&130023424)&&(Lc=4194304)):t=1);var r=pr();e=vs(e,t),e!==null&&(nc(e,t,r),Cr(e,r))}function LN(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),L_(e,r)}function FN(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(oe(314))}n!==null&&n.delete(t),L_(e,r)}var F_;F_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Sr.current)br=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return br=!1,CN(e,t,r);br=!!(e.flags&131072)}else br=!1,jt&&t.flags&1048576&&Ww(t,Zu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;vu(e,t),e=t.pendingProps;var s=Xi(t,lr.current);zi(t,r),s=Gm(null,t,n,e,s,r);var o=qm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(n)?(o=!0,Hu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Bm(t),s.updater=Wd,t.stateNode=s,s._reactInternals=t,vp(t,n,e,r),t=wp(null,t,n,!0,o,r)):(t.tag=0,jt&&o&&Lm(t),fr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(vu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=UN(n),e=nn(n,e),s){case 0:t=xp(null,t,n,e,r);break e;case 1:t=Zy(null,t,n,e,r);break e;case 11:t=Hy(null,t,n,e,r);break e;case 14:t=Yy(null,t,n,nn(n.type,e),r);break e}throw Error(oe(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:nn(n,s),xp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:nn(n,s),Zy(e,t,n,s,r);case 3:e:{if(__(t),e===null)throw Error(oe(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Kw(e,t),qu(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ta(Error(oe(423)),t),t=Ky(e,t,n,r,s);break e}else if(n!==s){s=ta(Error(oe(424)),t),t=Ky(e,t,n,r,s);break e}else for(Ar=Qs(t.stateNode.containerInfo.firstChild),Or=t,jt=!0,an=null,r=Yw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Qi(),n===s){t=ys(e,t,r);break e}fr(e,t,n,r)}t=t.child}return t;case 5:return Gw(t),e===null&&pp(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,cp(n,s)?i=null:o!==null&&cp(n,o)&&(t.flags|=32),w_(e,t),fr(e,t,i,r),t.child;case 6:return e===null&&pp(t),null;case 13:return b_(e,t,r);case 4:return Hm(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ji(t,null,n,r):fr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:nn(n,s),Hy(e,t,n,s,r);case 7:return fr(e,t,t.pendingProps,r),t.child;case 8:return fr(e,t,t.pendingProps.children,r),t.child;case 12:return fr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,yt(Ku,n._currentValue),n._currentValue=i,o!==null)if(pn(o.value,i)){if(o.children===s.children&&!Sr.current){t=ys(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=ds(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),mp(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(oe(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),mp(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}fr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,zi(t,r),s=qr(s),n=n(s),t.flags|=1,fr(e,t,n,r),t.child;case 14:return n=t.type,s=nn(n,t.pendingProps),s=nn(n.type,s),Yy(e,t,n,s,r);case 15:return y_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:nn(n,s),vu(e,t),t.tag=1,kr(n)?(e=!0,Hu(t)):e=!1,zi(t,r),m_(t,n,s),vp(t,n,s,r),wp(null,t,n,!0,e,r);case 19:return S_(e,t,r);case 22:return x_(e,t,r)}throw Error(oe(156,t.tag))};function z_(e,t){return fw(e,t)}function zN(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(e,t,r,n){return new zN(e,t,r,n)}function ig(e){return e=e.prototype,!(!e||!e.isReactComponent)}function UN(e){if(typeof e=="function")return ig(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cm)return 11;if(e===Em)return 14}return 2}function ro(e,t){var r=e.alternate;return r===null?(r=Zr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function wu(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")ig(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case wi:return Lo(r.children,s,o,t);case km:i=8,s|=8;break;case Vh:return e=Zr(12,r,t,s|2),e.elementType=Vh,e.lanes=o,e;case Wh:return e=Zr(13,r,t,s),e.elementType=Wh,e.lanes=o,e;case $h:return e=Zr(19,r,t,s),e.elementType=$h,e.lanes=o,e;case G0:return Hd(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z0:i=10;break e;case K0:i=9;break e;case Cm:i=11;break e;case Em:i=14;break e;case zs:i=16,n=null;break e}throw Error(oe(130,e==null?e:typeof e,""))}return t=Zr(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Lo(e,t,r,n){return e=Zr(7,e,n,t),e.lanes=r,e}function Hd(e,t,r,n){return e=Zr(22,e,n,t),e.elementType=G0,e.lanes=r,e.stateNode={isHidden:!1},e}function hh(e,t,r){return e=Zr(6,e,null,t),e.lanes=r,e}function ph(e,t,r){return t=Zr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function VN(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kf(0),this.expirationTimes=Kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kf(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ag(e,t,r,n,s,o,i,a,l){return e=new VN(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Zr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bm(o),e}function WN(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function U_(e){if(!e)return oo;e=e._reactInternals;e:{if(ei(e)!==e||e.tag!==1)throw Error(oe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(kr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(oe(171))}if(e.tag===1){var r=e.type;if(kr(r))return Uw(e,r,t)}return t}function V_(e,t,r,n,s,o,i,a,l){return e=ag(r,n,!0,e,s,o,i,a,l),e.context=U_(null),r=e.current,n=pr(),s=to(r),o=ds(n,s),o.callback=t??null,Js(r,o,s),e.current.lanes=s,nc(e,s,n),Cr(e,n),e}function Yd(e,t,r,n){var s=t.current,o=pr(),i=to(s);return r=U_(r),t.context===null?t.context=r:t.pendingContext=r,t=ds(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Js(s,t,i),e!==null&&(fn(e,s,i,o),pu(e,s,i)),i}function sd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function sx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function lg(e,t){sx(e,t),(e=e.alternate)&&sx(e,t)}function $N(){return null}var W_=typeof reportError=="function"?reportError:function(e){console.error(e)};function cg(e){this._internalRoot=e}Zd.prototype.render=cg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(oe(409));Yd(e,t,null,null)};Zd.prototype.unmount=cg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ho(function(){Yd(null,e,null,null)}),t[gs]=null}};function Zd(e){this._internalRoot=e}Zd.prototype.unstable_scheduleHydration=function(e){if(e){var t=xw();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vs.length&&t!==0&&t<Vs[r].priority;r++);Vs.splice(r,0,e),r===0&&_w(e)}};function ug(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Kd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ox(){}function BN(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=sd(i);o.call(u)}}var i=V_(t,n,e,0,null,!1,!1,"",ox);return e._reactRootContainer=i,e[gs]=i.current,bl(e.nodeType===8?e.parentNode:e),Ho(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=sd(l);a.call(u)}}var l=ag(e,0,!1,null,null,!1,!1,"",ox);return e._reactRootContainer=l,e[gs]=l.current,bl(e.nodeType===8?e.parentNode:e),Ho(function(){Yd(t,l,r,n)}),l}function Gd(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=sd(i);a.call(l)}}Yd(t,i,e,s)}else i=BN(r,t,e,s,n);return sd(i)}vw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$a(t.pendingLanes);r!==0&&(Nm(t,r|1),Cr(t,Ut()),!(it&6)&&(ra=Ut()+500,vo()))}break;case 13:Ho(function(){var n=vs(e,1);if(n!==null){var s=pr();fn(n,e,1,s)}}),lg(e,1)}};Rm=function(e){if(e.tag===13){var t=vs(e,134217728);if(t!==null){var r=pr();fn(t,e,134217728,r)}lg(e,134217728)}};yw=function(e){if(e.tag===13){var t=to(e),r=vs(e,t);if(r!==null){var n=pr();fn(r,e,t,n)}lg(e,t)}};xw=function(){return ht};ww=function(e,t){var r=ht;try{return ht=e,t()}finally{ht=r}};Jh=function(e,t,r){switch(t){case"input":if(Yh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=zd(n);if(!s)throw Error(oe(90));X0(n),Yh(n,s)}}}break;case"textarea":J0(e,r);break;case"select":t=r.value,t!=null&&Mi(e,!!r.multiple,t,!1)}};iw=ng;aw=Ho;var HN={usingClientEntryPoint:!1,Events:[oc,ki,zd,sw,ow,ng]},Da={findFiberByHostInstance:jo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},YN={bundleType:Da.bundleType,version:Da.version,rendererPackageName:Da.rendererPackageName,rendererConfig:Da.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ks.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uw(e),e===null?null:e.stateNode},findFiberByHostInstance:Da.findFiberByHostInstance||$N,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 Kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kc.isDisabled&&Kc.supportsFiber)try{Md=Kc.inject(YN),In=Kc}catch{}}zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HN;zr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ug(t))throw Error(oe(200));return WN(e,t,null,r)};zr.createRoot=function(e,t){if(!ug(e))throw Error(oe(299));var r=!1,n="",s=W_;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ag(e,1,!1,null,null,r,!1,n,s),e[gs]=t.current,bl(e.nodeType===8?e.parentNode:e),new cg(t)};zr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(oe(188)):(e=Object.keys(e).join(","),Error(oe(268,e)));return e=uw(t),e=e===null?null:e.stateNode,e};zr.flushSync=function(e){return Ho(e)};zr.hydrate=function(e,t,r){if(!Kd(t))throw Error(oe(200));return Gd(null,e,t,!0,r)};zr.hydrateRoot=function(e,t,r){if(!ug(e))throw Error(oe(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=W_;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=V_(t,null,e,1,r??null,s,!1,o,i),e[gs]=t.current,bl(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Zd(t)};zr.render=function(e,t,r){if(!Kd(t))throw Error(oe(200));return Gd(null,e,t,!1,r)};zr.unmountComponentAtNode=function(e){if(!Kd(e))throw Error(oe(40));return e._reactRootContainer?(Ho(function(){Gd(null,null,e,!1,function(){e._reactRootContainer=null,e[gs]=null})}),!0):!1};zr.unstable_batchedUpdates=ng;zr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Kd(r))throw Error(oe(200));if(e==null||e._reactInternals===void 0)throw Error(oe(38));return Gd(e,t,r,!1,n)};zr.version="18.3.1-next-f1338f8080-20240426";function $_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($_)}catch(e){console.error(e)}}$_(),$0.exports=zr;var Cs=$0.exports;const B_=gm(Cs),ZN=R0({__proto__:null,default:B_},[Cs]);var ix=Cs;zh.createRoot=ix.createRoot,zh.hydrateRoot=ix.hydrateRoot;/**
* @remix-run/router v1.18.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pt.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const ax="popstate";function KN(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:l=""}=Es(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Pl("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let l=s.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof o=="string"?o:Zo(o))}function n(s,o){Yo(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return qN(t,r,n,e)}function Qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function GN(){return Math.random().toString(36).substr(2,8)}function lx(e,t){return{usr:e.state,key:e.key,idx:t}}function Pl(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Es(t):t,{state:r,key:t&&t.key||n||GN()})}function Zo(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Es(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function qN(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=Wt.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(Pt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Wt.Pop;let w=d(),v=w==null?null:w-u;u=w,l&&l({action:a,location:g.location,delta:v})}function m(w,v){a=Wt.Push;let p=Pl(g.location,w,v);r&&r(p,w),u=d()+1;let _=lx(p,u),C=g.createHref(p);try{i.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}o&&l&&l({action:a,location:g.location,delta:1})}function h(w,v){a=Wt.Replace;let p=Pl(g.location,w,v);r&&r(p,w),u=d();let _=lx(p,u),C=g.createHref(p);i.replaceState(_,"",C),o&&l&&l({action:a,location:g.location,delta:0})}function x(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof w=="string"?w:Zo(w);return p=p.replace(/ $/,"%20"),Qe(v,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,v)}let g={get action(){return a},get location(){return e(s,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(ax,f),l=w,()=>{s.removeEventListener(ax,f),l=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let v=x(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:m,replace:h,go(w){return i.go(w)}};return g}var vt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vt||(vt={}));const XN=new Set(["lazy","caseSensitive","path","id","index","children"]);function QN(e){return e.index===!0}function Dl(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,o)=>{let i=[...r,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),QN(s)){let l=Pt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Pt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Dl(s.children,t,i,n)),l}})}function To(e,t,r){return r===void 0&&(r="/"),_u(e,t,r,!1)}function _u(e,t,r,n){let s=typeof t=="string"?Es(t):t,o=ha(s.pathname||"/",r);if(o==null)return null;let i=H_(e);e2(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=d2(o);a=c2(i[l],u,n)}return a}function JN(e,t){let{route:r,pathname:n,params:s}=e;return{id:r.id,pathname:n,params:s,data:t[r.id],handle:r.handle}}function H_(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Qe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=fs([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(Qe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),H_(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:a2(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Y_(o.path))s(o,i,l)}),t}function Y_(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Y_(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function e2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:l2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const t2=/^:[\w-]+$/,r2=3,n2=2,s2=1,o2=10,i2=-2,cx=e=>e==="*";function a2(e,t){let r=e.split("/"),n=r.length;return r.some(cx)&&(n+=i2),t&&(n+=n2),r.filter(s=>!cx(s)).reduce((s,o)=>s+(t2.test(o)?r2:o===""?s2:o2),n)}function l2(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function c2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=ux({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),m=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=ux({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:fs([o,f.pathname]),pathnameBase:p2(fs([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=fs([o,f.pathnameBase]))}return i}function ux(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=u2(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:m,isOptional:h}=d;if(m==="*"){let g=a[f]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[f];return h&&!x?u[m]=void 0:u[m]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function u2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Yo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function d2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ha(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function f2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Es(e):e;return{pathname:r?r.startsWith("/")?r:h2(r,t):t,search:m2(n),hash:g2(s)}}function h2(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function mh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Z_(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function qd(e,t){let r=Z_(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Xd(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Es(e):(s=Pt({},e),Qe(!s.pathname||!s.pathname.includes("?"),mh("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),mh("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),mh("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;s.pathname=m.join("/")}a=f>=0?t[f]:"/"}let l=f2(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const fs=e=>e.join("/").replace(/\/\/+/g,"/"),p2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),m2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,g2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class dg{constructor(t,r,n,s){s===void 0&&(s=!1),this.status=t,this.statusText=r||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Qd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const K_=["post","put","patch","delete"],v2=new Set(K_),y2=["get",...K_],x2=new Set(y2),w2=new Set([301,302,303,307,308]),_2=new Set([307,308]),gh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},b2={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Aa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,S2=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),G_="remix-router-transitions";function k2(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let U=e.detectErrorBoundary;s=B=>({hasErrorBoundary:U(B)})}else s=S2;let o={},i=Dl(e.routes,s,void 0,o),a,l=e.basename||"/",u=e.unstable_dataStrategy||N2,d=e.unstable_patchRoutesOnMiss,f=Pt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,h=new Set,x=null,g=null,w=null,v=e.hydrationData!=null,p=To(i,e.history.location,l),_=null;if(p==null&&!d){let U=ur(404,{pathname:e.history.location.pathname}),{matches:B,route:G}=wx(i);p=B,_={[G.id]:U}}p&&d&&!e.hydrationData&&Wf(p,i,e.history.location.pathname).active&&(p=null);let C;if(!p)C=!1,p=[];else if(p.some(U=>U.route.lazy))C=!1;else if(!p.some(U=>U.route.loader))C=!0;else if(f.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,B=e.hydrationData?e.hydrationData.errors:null,G=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||B&&B[re.route.id]!==void 0:!0;if(B){let re=p.findIndex(ye=>B[ye.route.id]!==void 0);C=p.slice(0,re+1).every(G)}else C=p.every(G)}else C=e.hydrationData!=null;let E,T={historyAction:e.history.action,location:e.history.location,matches:p,initialized:C,navigation:gh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},R=Wt.Pop,D=!1,P,L=!1,q=new Map,j=null,F=!1,b=!1,W=[],te=[],$=new Map,Z=0,I=-1,Q=new Map,z=new Set,V=new Map,de=new Map,ne=new Set,se=new Map,je=new Map,fe=new Map,ve=!1;function Se(){if(m=e.history.listen(U=>{let{action:B,location:G,delta:re}=U;if(ve){ve=!1;return}Yo(je.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=Ec({currentLocation:T.location,nextLocation:G,historyAction:B});if(ye&&re!=null){ve=!0,e.history.go(re*-1),oi(ye,{state:"blocked",location:G,proceed(){oi(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(re)},reset(){let Ce=new Map(T.blockers);Ce.set(ye,Aa),ke({blockers:Ce})}});return}return K(B,G)}),r){W2(t,q);let U=()=>$2(t,q);t.addEventListener("pagehide",U),j=()=>t.removeEventListener("pagehide",U)}return T.initialized||K(Wt.Pop,T.location,{initialHydration:!0}),E}function Ie(){m&&m(),j&&j(),h.clear(),P&&P.abort(),T.fetchers.forEach((U,B)=>Bt(B)),T.blockers.forEach((U,B)=>Cc(B))}function Ne(U){return h.add(U),()=>h.delete(U)}function ke(U,B){B===void 0&&(B={}),T=Pt({},T,U);let G=[],re=[];f.v7_fetcherPersist&&T.fetchers.forEach((ye,Ce)=>{ye.state==="idle"&&(ne.has(Ce)?re.push(Ce):G.push(Ce))}),[...h].forEach(ye=>ye(T,{deletedFetchers:re,unstable_viewTransitionOpts:B.viewTransitionOpts,unstable_flushSync:B.flushSync===!0})),f.v7_fetcherPersist&&(G.forEach(ye=>T.fetchers.delete(ye)),re.forEach(ye=>Bt(ye)))}function rt(U,B,G){var re,ye;let{flushSync:Ce}=G===void 0?{}:G,We=T.actionData!=null&&T.navigation.formMethod!=null&&on(T.navigation.formMethod)&&T.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,ce;B.actionData?Object.keys(B.actionData).length>0?ce=B.actionData:ce=null:We?ce=T.actionData:ce=null;let Ye=B.loaderData?yx(T.loaderData,B.loaderData,B.matches||[],B.errors):T.loaderData,Oe=T.blockers;Oe.size>0&&(Oe=new Map(Oe),Oe.forEach((ft,gt)=>Oe.set(gt,Aa)));let Le=D===!0||T.navigation.formMethod!=null&&on(T.navigation.formMethod)&&((ye=U.state)==null?void 0:ye._isRedirect)!==!0;a&&(i=a,a=void 0),F||R===Wt.Pop||(R===Wt.Push?e.history.push(U,U.state):R===Wt.Replace&&e.history.replace(U,U.state));let pt;if(R===Wt.Pop){let ft=q.get(T.location.pathname);ft&&ft.has(U.pathname)?pt={currentLocation:T.location,nextLocation:U}:q.has(U.pathname)&&(pt={currentLocation:U,nextLocation:T.location})}else if(L){let ft=q.get(T.location.pathname);ft?ft.add(U.pathname):(ft=new Set([U.pathname]),q.set(T.location.pathname,ft)),pt={currentLocation:T.location,nextLocation:U}}ke(Pt({},B,{actionData:ce,loaderData:Ye,historyAction:R,location:U,initialized:!0,navigation:gh,revalidation:"idle",restoreScrollPosition:qv(U,B.matches||T.matches),preventScrollReset:Le,blockers:Oe}),{viewTransitionOpts:pt,flushSync:Ce===!0}),R=Wt.Pop,D=!1,L=!1,F=!1,b=!1,W=[],te=[]}async function k(U,B){if(typeof U=="number"){e.history.go(U);return}let G=Dp(T.location,T.matches,l,f.v7_prependBasename,U,f.v7_relativeSplatPath,B==null?void 0:B.fromRouteId,B==null?void 0:B.relative),{path:re,submission:ye,error:Ce}=dx(f.v7_normalizeFormMethod,!1,G,B),We=T.location,ce=Pl(T.location,re,B&&B.state);ce=Pt({},ce,e.history.encodeLocation(ce));let Ye=B&&B.replace!=null?B.replace:void 0,Oe=Wt.Push;Ye===!0?Oe=Wt.Replace:Ye===!1||ye!=null&&on(ye.formMethod)&&ye.formAction===T.location.pathname+T.location.search&&(Oe=Wt.Replace);let Le=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,pt=(B&&B.unstable_flushSync)===!0,ft=Ec({currentLocation:We,nextLocation:ce,historyAction:Oe});if(ft){oi(ft,{state:"blocked",location:ce,proceed(){oi(ft,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),k(U,B)},reset(){let gt=new Map(T.blockers);gt.set(ft,Aa),ke({blockers:gt})}});return}return await K(Oe,ce,{submission:ye,pendingError:Ce,preventScrollReset:Le,replace:B&&B.replace,enableViewTransition:B&&B.unstable_viewTransition,flushSync:pt})}function J(){if(Be(),ke({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){K(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}K(R||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function K(U,B,G){P&&P.abort(),P=null,R=U,F=(G&&G.startUninterruptedRevalidation)===!0,vT(T.location,T.matches),D=(G&&G.preventScrollReset)===!0,L=(G&&G.enableViewTransition)===!0;let re=a||i,ye=G&&G.overrideNavigation,Ce=To(re,B,l),We=(G&&G.flushSync)===!0,ce=Wf(Ce,re,B.pathname);if(ce.active&&ce.matches&&(Ce=ce.matches),!Ce){let{error:ut,notFoundMatches:Jt,route:Vt}=ii(B.pathname);rt(B,{matches:Jt,loaderData:{},errors:{[Vt.id]:ut}},{flushSync:We});return}if(T.initialized&&!b&&M2(T.location,B)&&!(G&&G.submission&&on(G.submission.formMethod))){rt(B,{matches:Ce},{flushSync:We});return}P=new AbortController;let Ye=di(e.history,B,P.signal,G&&G.submission),Oe;if(G&&G.pendingError)Oe=[Pi(Ce).route.id,{type:vt.error,error:G.pendingError}];else if(G&&G.submission&&on(G.submission.formMethod)){let ut=await A(Ye,B,G.submission,Ce,ce.active,{replace:G.replace,flushSync:We});if(ut.shortCircuited)return;if(ut.pendingActionResult){let[Jt,Vt]=ut.pendingActionResult;if(Pr(Vt)&&Qd(Vt.error)&&Vt.error.status===404){P=null,rt(B,{matches:ut.matches,loaderData:{},errors:{[Jt]:Vt.error}});return}}Ce=ut.matches||Ce,Oe=ut.pendingActionResult,ye=vh(B,G.submission),We=!1,ce.active=!1,Ye=di(e.history,Ye.url,Ye.signal)}let{shortCircuited:Le,matches:pt,loaderData:ft,errors:gt}=await S(Ye,B,Ce,ce.active,ye,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,We,Oe);Le||(P=null,rt(B,Pt({matches:pt||Ce},xx(Oe),{loaderData:ft,errors:gt})))}async function A(U,B,G,re,ye,Ce){Ce===void 0&&(Ce={}),Be();let We=U2(B,G);if(ke({navigation:We},{flushSync:Ce.flushSync===!0}),ye){let Oe=await Tc(re,B.pathname,U.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){let{boundaryId:Le,error:pt}=En(B.pathname,Oe);return{matches:Oe.partialMatches,pendingActionResult:[Le,{type:vt.error,error:pt}]}}else if(Oe.matches)re=Oe.matches;else{let{notFoundMatches:Le,error:pt,route:ft}=ii(B.pathname);return{matches:Le,pendingActionResult:[ft.id,{type:vt.error,error:pt}]}}}let ce,Ye=Ha(re,B);if(!Ye.route.action&&!Ye.route.lazy)ce={type:vt.error,error:ur(405,{method:U.method,pathname:B.pathname,routeId:Ye.route.id})};else if(ce=(await ee("action",U,[Ye],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Do(ce)){let Oe;return Ce&&Ce.replace!=null?Oe=Ce.replace:Oe=mx(ce.response.headers.get("Location"),new URL(U.url),l)===T.location.pathname+T.location.search,await X(U,ce,{submission:G,replace:Oe}),{shortCircuited:!0}}if(Po(ce))throw ur(400,{type:"defer-action"});if(Pr(ce)){let Oe=Pi(re,Ye.route.id);return(Ce&&Ce.replace)!==!0&&(R=Wt.Push),{matches:re,pendingActionResult:[Oe.route.id,ce]}}return{matches:re,pendingActionResult:[Ye.route.id,ce]}}async function S(U,B,G,re,ye,Ce,We,ce,Ye,Oe,Le){let pt=ye||vh(B,Ce),ft=Ce||We||Sx(pt),gt=!F&&(!f.v7_partialHydration||!Ye);if(re){if(gt){let It=N(Le);ke(Pt({navigation:pt},It!==void 0?{actionData:It}:{}),{flushSync:Oe})}let Ge=await Tc(G,B.pathname,U.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let{boundaryId:It,error:Tr}=En(B.pathname,Ge);return{matches:Ge.partialMatches,loaderData:{},errors:{[It]:Tr}}}else if(Ge.matches)G=Ge.matches;else{let{error:It,notFoundMatches:Tr,route:Et}=ii(B.pathname);return{matches:Tr,loaderData:{},errors:{[Et.id]:It}}}}let ut=a||i,[Jt,Vt]=fx(e.history,T,G,ft,B,f.v7_partialHydration&&Ye===!0,f.v7_skipActionErrorRevalidation,b,W,te,ne,V,z,ut,l,Le);if(Ds(Ge=>!(G&&G.some(It=>It.route.id===Ge))||Jt&&Jt.some(It=>It.route.id===Ge)),I=++Z,Jt.length===0&&Vt.length===0){let Ge=Xn();return rt(B,Pt({matches:G,loaderData:{},errors:Le&&Pr(Le[1])?{[Le[0]]:Le[1].error}:null},xx(Le),Ge?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Oe}),{shortCircuited:!0}}if(gt){let Ge={};if(!re){Ge.navigation=pt;let It=N(Le);It!==void 0&&(Ge.actionData=It)}Vt.length>0&&(Ge.fetchers=O(Vt)),ke(Ge,{flushSync:Oe})}Vt.forEach(Ge=>{$.has(Ge.key)&&ot(Ge.key),Ge.controller&&$.set(Ge.key,Ge.controller)});let ka=()=>Vt.forEach(Ge=>ot(Ge.key));P&&P.signal.addEventListener("abort",ka);let{loaderResults:As,fetcherResults:ai}=await he(T.matches,G,Jt,Vt,U);if(U.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",ka),Vt.forEach(Ge=>$.delete(Ge.key));let li=_x([...As,...ai]);if(li){if(li.idx>=Jt.length){let Ge=Vt[li.idx-Jt.length].key;z.add(Ge)}return await X(U,li.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:ci,errors:Tn}=vx(T,G,Jt,As,Le,Vt,ai,se);se.forEach((Ge,It)=>{Ge.subscribe(Tr=>{(Tr||Ge.done)&&se.delete(It)})}),f.v7_partialHydration&&Ye&&T.errors&&Object.entries(T.errors).filter(Ge=>{let[It]=Ge;return!Jt.some(Tr=>Tr.route.id===It)}).forEach(Ge=>{let[It,Tr]=Ge;Tn=Object.assign(Tn||{},{[It]:Tr})});let jc=Xn(),Nc=$r(I),Rc=jc||Nc||Vt.length>0;return Pt({matches:G,loaderData:ci,errors:Tn},Rc?{fetchers:new Map(T.fetchers)}:{})}function N(U){if(U&&!Pr(U[1]))return{[U[0]]:U[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function O(U){return U.forEach(B=>{let G=T.fetchers.get(B.key),re=Oa(void 0,G?G.data:void 0);T.fetchers.set(B.key,re)}),new Map(T.fetchers)}function Y(U,B,G,re){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");$.has(U)&&ot(U);let ye=(re&&re.unstable_flushSync)===!0,Ce=a||i,We=Dp(T.location,T.matches,l,f.v7_prependBasename,G,f.v7_relativeSplatPath,B,re==null?void 0:re.relative),ce=To(Ce,We,l),Ye=Wf(ce,Ce,We);if(Ye.active&&Ye.matches&&(ce=Ye.matches),!ce){Ct(U,B,ur(404,{pathname:We}),{flushSync:ye});return}let{path:Oe,submission:Le,error:pt}=dx(f.v7_normalizeFormMethod,!0,We,re);if(pt){Ct(U,B,pt,{flushSync:ye});return}let ft=Ha(ce,Oe);if(D=(re&&re.preventScrollReset)===!0,Le&&on(Le.formMethod)){M(U,B,Oe,ft,ce,Ye.active,ye,Le);return}V.set(U,{routeId:B,path:Oe}),H(U,B,Oe,ft,ce,Ye.active,ye,Le)}async function M(U,B,G,re,ye,Ce,We,ce){Be(),V.delete(U);function Ye(Et){if(!Et.route.action&&!Et.route.lazy){let Qn=ur(405,{method:ce.formMethod,pathname:G,routeId:B});return Ct(U,B,Qn,{flushSync:We}),!0}return!1}if(!Ce&&Ye(re))return;let Oe=T.fetchers.get(U);Fe(U,V2(ce,Oe),{flushSync:We});let Le=new AbortController,pt=di(e.history,G,Le.signal,ce);if(Ce){let Et=await Tc(ye,G,pt.signal);if(Et.type==="aborted")return;if(Et.type==="error"){let{error:Qn}=En(G,Et);Ct(U,B,Qn,{flushSync:We});return}else if(Et.matches){if(ye=Et.matches,re=Ha(ye,G),Ye(re))return}else{Ct(U,B,ur(404,{pathname:G}),{flushSync:We});return}}$.set(U,Le);let ft=Z,ut=(await ee("action",pt,[re],ye))[0];if(pt.signal.aborted){$.get(U)===Le&&$.delete(U);return}if(f.v7_fetcherPersist&&ne.has(U)){if(Do(ut)||Pr(ut)){Fe(U,Ls(void 0));return}}else{if(Do(ut))if($.delete(U),I>ft){Fe(U,Ls(void 0));return}else return z.add(U),Fe(U,Oa(ce)),X(pt,ut,{fetcherSubmission:ce});if(Pr(ut)){Ct(U,B,ut.error);return}}if(Po(ut))throw ur(400,{type:"defer-action"});let Jt=T.navigation.location||T.location,Vt=di(e.history,Jt,Le.signal),ka=a||i,As=T.navigation.state!=="idle"?To(ka,T.navigation.location,l):T.matches;Qe(As,"Didn't find any matches after fetcher action");let ai=++Z;Q.set(U,ai);let li=Oa(ce,ut.data);T.fetchers.set(U,li);let[ci,Tn]=fx(e.history,T,As,ce,Jt,!1,f.v7_skipActionErrorRevalidation,b,W,te,ne,V,z,ka,l,[re.route.id,ut]);Tn.filter(Et=>Et.key!==U).forEach(Et=>{let Qn=Et.key,Xv=T.fetchers.get(Qn),wT=Oa(void 0,Xv?Xv.data:void 0);T.fetchers.set(Qn,wT),$.has(Qn)&&ot(Qn),Et.controller&&$.set(Qn,Et.controller)}),ke({fetchers:new Map(T.fetchers)});let jc=()=>Tn.forEach(Et=>ot(Et.key));Le.signal.addEventListener("abort",jc);let{loaderResults:Nc,fetcherResults:Rc}=await he(T.matches,As,ci,Tn,Vt);if(Le.signal.aborted)return;Le.signal.removeEventListener("abort",jc),Q.delete(U),$.delete(U),Tn.forEach(Et=>$.delete(Et.key));let Ge=_x([...Nc,...Rc]);if(Ge){if(Ge.idx>=ci.length){let Et=Tn[Ge.idx-ci.length].key;z.add(Et)}return X(Vt,Ge.result)}let{loaderData:It,errors:Tr}=vx(T,T.matches,ci,Nc,void 0,Tn,Rc,se);if(T.fetchers.has(U)){let Et=Ls(ut.data);T.fetchers.set(U,Et)}$r(ai),T.navigation.state==="loading"&&ai>I?(Qe(R,"Expected pending action"),P&&P.abort(),rt(T.navigation.location,{matches:As,loaderData:It,errors:Tr,fetchers:new Map(T.fetchers)})):(ke({errors:Tr,loaderData:yx(T.loaderData,It,As,Tr),fetchers:new Map(T.fetchers)}),b=!1)}async function H(U,B,G,re,ye,Ce,We,ce){let Ye=T.fetchers.get(U);Fe(U,Oa(ce,Ye?Ye.data:void 0),{flushSync:We});let Oe=new AbortController,Le=di(e.history,G,Oe.signal);if(Ce){let ut=await Tc(ye,G,Le.signal);if(ut.type==="aborted")return;if(ut.type==="error"){let{error:Jt}=En(G,ut);Ct(U,B,Jt,{flushSync:We});return}else if(ut.matches)ye=ut.matches,re=Ha(ye,G);else{Ct(U,B,ur(404,{pathname:G}),{flushSync:We});return}}$.set(U,Oe);let pt=Z,gt=(await ee("loader",Le,[re],ye))[0];if(Po(gt)&&(gt=await e1(gt,Le.signal,!0)||gt),$.get(U)===Oe&&$.delete(U),!Le.signal.aborted){if(ne.has(U)){Fe(U,Ls(void 0));return}if(Do(gt))if(I>pt){Fe(U,Ls(void 0));return}else{z.add(U),await X(Le,gt);return}if(Pr(gt)){Ct(U,B,gt.error);return}Qe(!Po(gt),"Unhandled fetcher deferred data"),Fe(U,Ls(gt.data))}}async function X(U,B,G){let{submission:re,fetcherSubmission:ye,replace:Ce}=G===void 0?{}:G;B.response.headers.has("X-Remix-Revalidate")&&(b=!0);let We=B.response.headers.get("Location");Qe(We,"Expected a Location header on the redirect Response"),We=mx(We,new URL(U.url),l);let ce=Pl(T.location,We,{_isRedirect:!0});if(r){let gt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(fg.test(We)){const ut=e.history.createURL(We);gt=ut.origin!==t.location.origin||ha(ut.pathname,l)==null}if(gt){Ce?t.location.replace(We):t.location.assign(We);return}}P=null;let Ye=Ce===!0?Wt.Replace:Wt.Push,{formMethod:Oe,formAction:Le,formEncType:pt}=T.navigation;!re&&!ye&&Oe&&Le&&pt&&(re=Sx(T.navigation));let ft=re||ye;if(_2.has(B.response.status)&&ft&&on(ft.formMethod))await K(Ye,ce,{submission:Pt({},ft,{formAction:We}),preventScrollReset:D});else{let gt=vh(ce,re);await K(Ye,ce,{overrideNavigation:gt,fetcherSubmission:ye,preventScrollReset:D})}}async function ee(U,B,G,re){try{let ye=await R2(u,U,B,G,re,o,s);return await Promise.all(ye.map((Ce,We)=>{if(L2(Ce)){let ce=Ce.result;return{type:vt.redirect,response:A2(ce,B,G[We].route.id,re,l,f.v7_relativeSplatPath)}}return D2(Ce)}))}catch(ye){return G.map(()=>({type:vt.error,error:ye}))}}async function he(U,B,G,re,ye){let[Ce,...We]=await Promise.all([G.length?ee("loader",ye,G,B):[],...re.map(ce=>{if(ce.matches&&ce.match&&ce.controller){let Ye=di(e.history,ce.path,ce.controller.signal);return ee("loader",Ye,[ce.match],ce.matches).then(Oe=>Oe[0])}else return Promise.resolve({type:vt.error,error:ur(404,{pathname:ce.path})})})]);return await Promise.all([bx(U,G,Ce,Ce.map(()=>ye.signal),!1,T.loaderData),bx(U,re.map(ce=>ce.match),We,re.map(ce=>ce.controller?ce.controller.signal:null),!0)]),{loaderResults:Ce,fetcherResults:We}}function Be(){b=!0,W.push(...Ds()),V.forEach((U,B)=>{$.has(B)&&(te.push(B),ot(B))})}function Fe(U,B,G){G===void 0&&(G={}),T.fetchers.set(U,B),ke({fetchers:new Map(T.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Ct(U,B,G,re){re===void 0&&(re={});let ye=Pi(T.matches,B);Bt(U),ke({errors:{[ye.route.id]:G},fetchers:new Map(T.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Wr(U){return f.v7_fetcherPersist&&(de.set(U,(de.get(U)||0)+1),ne.has(U)&&ne.delete(U)),T.fetchers.get(U)||b2}function Bt(U){let B=T.fetchers.get(U);$.has(U)&&!(B&&B.state==="loading"&&Q.has(U))&&ot(U),V.delete(U),Q.delete(U),z.delete(U),ne.delete(U),T.fetchers.delete(U)}function Gn(U){if(f.v7_fetcherPersist){let B=(de.get(U)||0)-1;B<=0?(de.delete(U),ne.add(U)):de.set(U,B)}else Bt(U);ke({fetchers:new Map(T.fetchers)})}function ot(U){let B=$.get(U);Qe(B,"Expected fetch controller: "+U),B.abort(),$.delete(U)}function qn(U){for(let B of U){let G=Wr(B),re=Ls(G.data);T.fetchers.set(B,re)}}function Xn(){let U=[],B=!1;for(let G of z){let re=T.fetchers.get(G);Qe(re,"Expected fetcher: "+G),re.state==="loading"&&(z.delete(G),U.push(G),B=!0)}return qn(U),B}function $r(U){let B=[];for(let[G,re]of Q)if(re<U){let ye=T.fetchers.get(G);Qe(ye,"Expected fetcher: "+G),ye.state==="loading"&&(ot(G),Q.delete(G),B.push(G))}return qn(B),B.length>0}function kc(U,B){let G=T.blockers.get(U)||Aa;return je.get(U)!==B&&je.set(U,B),G}function Cc(U){T.blockers.delete(U),je.delete(U)}function oi(U,B){let G=T.blockers.get(U)||Aa;Qe(G.state==="unblocked"&&B.state==="blocked"||G.state==="blocked"&&B.state==="blocked"||G.state==="blocked"&&B.state==="proceeding"||G.state==="blocked"&&B.state==="unblocked"||G.state==="proceeding"&&B.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+B.state);let re=new Map(T.blockers);re.set(U,B),ke({blockers:re})}function Ec(U){let{currentLocation:B,nextLocation:G,historyAction:re}=U;if(je.size===0)return;je.size>1&&Yo(!1,"A router only supports one blocker at a time");let ye=Array.from(je.entries()),[Ce,We]=ye[ye.length-1],ce=T.blockers.get(Ce);if(!(ce&&ce.state==="proceeding")&&We({currentLocation:B,nextLocation:G,historyAction:re}))return Ce}function ii(U){let B=ur(404,{pathname:U}),G=a||i,{matches:re,route:ye}=wx(G);return Ds(),{notFoundMatches:re,route:ye,error:B}}function En(U,B){return{boundaryId:Pi(B.partialMatches).route.id,error:ur(400,{type:"route-discovery",pathname:U,message:B.error!=null&&"message"in B.error?B.error:String(B.error)})}}function Ds(U){let B=[];return se.forEach((G,re)=>{(!U||U(re))&&(G.cancel(),B.push(re),se.delete(re))}),B}function gT(U,B,G){if(x=U,w=B,g=G||null,!v&&T.navigation===gh){v=!0;let re=qv(T.location,T.matches);re!=null&&ke({restoreScrollPosition:re})}return()=>{x=null,w=null,g=null}}function Gv(U,B){return g&&g(U,B.map(re=>JN(re,T.loaderData)))||U.key}function vT(U,B){if(x&&w){let G=Gv(U,B);x[G]=w()}}function qv(U,B){if(x){let G=Gv(U,B),re=x[G];if(typeof re=="number")return re}return null}function Wf(U,B,G){if(d)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:_u(B,G,l,!0)}}else return{active:!0,matches:_u(B,G,l,!0)||[]};return{active:!1,matches:null}}async function Tc(U,B,G){let re=U,ye=re.length>0?re[re.length-1].route:null;for(;;){let Ce=a==null,We=a||i;try{await j2(d,B,re,We,o,s,fe,G)}catch(Le){return{type:"error",error:Le,partialMatches:re}}finally{Ce&&(i=[...i])}if(G.aborted)return{type:"aborted"};let ce=To(We,B,l),Ye=!1;if(ce){let Le=ce[ce.length-1].route;if(Le.index)return{type:"success",matches:ce};if(Le.path&&Le.path.length>0)if(Le.path==="*")Ye=!0;else return{type:"success",matches:ce}}let Oe=_u(We,B,l,!0);if(!Oe||re.map(Le=>Le.route.id).join("-")===Oe.map(Le=>Le.route.id).join("-"))return{type:"success",matches:Ye?ce:null};if(re=Oe,ye=re[re.length-1].route,ye.path==="*")return{type:"success",matches:re}}}function yT(U){o={},a=Dl(U,s,void 0,o)}function xT(U,B){let G=a==null;X_(U,B,a||i,o,s),G&&(i=[...i],ke({}))}return E={get basename(){return l},get future(){return f},get state(){return T},get routes(){return i},get window(){return t},initialize:Se,subscribe:Ne,enableScrollRestoration:gT,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Wr,deleteFetcher:Gn,dispose:Ie,getBlocker:kc,deleteBlocker:Cc,patchRoutes:xT,_internalFetchControllers:$,_internalActiveDeferreds:se,_internalSetRoutes:yT},E}function C2(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Dp(e,t,r,n,s,o,i,a){let l,u;if(i){l=[];for(let f of t)if(l.push(f),f.route.id===i){u=f;break}}else l=t,u=t[t.length-1];let d=Xd(s||".",qd(l,o),ha(e.pathname,r)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!hg(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:fs([r,d.pathname])),Zo(d)}function dx(e,t,r,n){if(!n||!C2(n))return{path:r};if(n.formMethod&&!z2(n.formMethod))return{path:r,error:ur(405,{method:n.formMethod})};let s=()=>({path:r,error:ur(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Q_(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!on(i))return s();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,x)=>{let[g,w]=x;return""+h+g+"="+w+`
`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!on(i))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=Ap(n.formData),u=n.formData;else if(n.body instanceof FormData)l=Ap(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=gx(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=gx(l)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(on(d.formMethod))return{path:r,submission:d};let f=Es(r);return t&&f.search&&hg(f.search)&&l.append("index",""),f.search="?"+l,{path:Zo(f),submission:d}}function E2(e,t){let r=e;if(t){let n=e.findIndex(s=>s.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function fx(e,t,r,n,s,o,i,a,l,u,d,f,m,h,x,g){let w=g?Pr(g[1])?g[1].error:g[1].data:void 0,v=e.createURL(t.location),p=e.createURL(s),_=g&&Pr(g[1])?g[0]:void 0,C=_?E2(r,_):r,E=g?g[1].statusCode:void 0,T=i&&E&&E>=400,R=C.filter((P,L)=>{let{route:q}=P;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(T2(t.loaderData,t.matches[L],P)||l.some(b=>b===P.route.id))return!0;let j=t.matches[L],F=P;return hx(P,Pt({currentUrl:v,currentParams:j.params,nextUrl:p,nextParams:F.params},n,{actionResult:w,actionStatus:E,defaultShouldRevalidate:T?!1:a||v.pathname+v.search===p.pathname+p.search||v.search!==p.search||q_(j,F)}))}),D=[];return f.forEach((P,L)=>{if(o||!r.some(W=>W.route.id===P.routeId)||d.has(L))return;let q=To(h,P.path,x);if(!q){D.push({key:L,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let j=t.fetchers.get(L),F=Ha(q,P.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:j&&j.state!=="idle"&&j.data===void 0?b=a:b=hx(F,Pt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:p,nextParams:r[r.length-1].params},n,{actionResult:w,actionStatus:E,defaultShouldRevalidate:T?!1:a})),b&&D.push({key:L,routeId:P.routeId,path:P.path,matches:q,match:F,controller:new AbortController})}),[R,D]}function T2(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function q_(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function hx(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function j2(e,t,r,n,s,o,i,a){let l=[t,...r.map(u=>u.route.id)].join("-");try{let u=i.get(l);u||(u=e({path:t,matches:r,patch:(d,f)=>{a.aborted||X_(d,f,n,s,o)}}),i.set(l,u)),u&&I2(u)&&await u}finally{i.delete(l)}}function X_(e,t,r,n,s){if(e){var o;let i=n[e];Qe(i,"No route found to patch children into: routeId = "+e);let a=Dl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...a):i.children=a}else{let i=Dl(t,s,["patch",String(r.length||"0")],n);r.push(...i)}}async function px(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Qe(s,"No route found in manifest");let o={};for(let i in n){let l=s[i]!==void 0&&i!=="hasErrorBoundary";Yo(!l,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!XN.has(i)&&(o[i]=n[i])}Object.assign(s,o),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function N2(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function R2(e,t,r,n,s,o,i,a){let l=n.reduce((f,m)=>f.add(m.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let m=l.has(f.route.id);return Pt({},f,{shouldLoad:m,resolve:x=>(u.add(f.route.id),m?P2(t,r,f,o,i,x,a):Promise.resolve({type:vt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(f=>Qe(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,m)=>l.has(s[m].route.id))}async function P2(e,t,r,n,s,o,i){let a,l,u=d=>{let f,m=new Promise((g,w)=>f=w);l=()=>f(),t.signal.addEventListener("abort",l);let h=g=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):d({request:t,params:r.params,context:i},...g!==void 0?[g]:[]),x;return o?x=o(g=>h(g)):x=(async()=>{try{return{type:"data",result:await h()}}catch(g){return{type:"error",result:g}}})(),Promise.race([x,m])};try{let d=r.route[e];if(r.route.lazy)if(d){let f,[m]=await Promise.all([u(d).catch(h=>{f=h}),px(r.route,s,n)]);if(f!==void 0)throw f;a=m}else if(await px(r.route,s,n),d=r.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),m=f.pathname+f.search;throw ur(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:vt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),m=f.pathname+f.search;throw ur(404,{pathname:m})}Qe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:vt.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function D2(e){let{result:t,type:r,status:n}=e;if(J_(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:vt.error,error:a}}return r===vt.error?{type:vt.error,error:new dg(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:vt.data,data:i,statusCode:t.status,headers:t.headers}}if(r===vt.error)return{type:vt.error,error:t,statusCode:Qd(t)?t.status:n};if(F2(t)){var s,o;return{type:vt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:vt.data,data:t,statusCode:n}}function A2(e,t,r,n,s,o){let i=e.headers.get("Location");if(Qe(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!fg.test(i)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=Dp(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function mx(e,t,r){if(fg.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=ha(s.pathname,r)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function di(e,t,r,n){let s=e.createURL(Q_(t)).toString(),o={signal:r};if(n&&on(n.formMethod)){let{formMethod:i,formEncType:a}=n;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(n.json)):a==="text/plain"?o.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?o.body=Ap(n.formData):o.body=n.formData}return new Request(s,o)}function Ap(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function gx(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function O2(e,t,r,n,s,o){let i={},a=null,l,u=!1,d={},f=n&&Pr(n[1])?n[1].error:void 0;return r.forEach((m,h)=>{let x=t[h].route.id;if(Qe(!Do(m),"Cannot handle redirect results in processLoaderData"),Pr(m)){let g=m.error;f!==void 0&&(g=f,f=void 0),a=a||{};{let w=Pi(e,x);a[w.route.id]==null&&(a[w.route.id]=g)}i[x]=void 0,u||(u=!0,l=Qd(m.error)?m.error.status:500),m.headers&&(d[x]=m.headers)}else Po(m)?(s.set(x,m.deferredData),i[x]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(d[x]=m.headers)):(i[x]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(d[x]=m.headers))}),f!==void 0&&n&&(a={[n[0]]:f},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:d}}function vx(e,t,r,n,s,o,i,a){let{loaderData:l,errors:u}=O2(t,r,n,s,a);for(let d=0;d<o.length;d++){let{key:f,match:m,controller:h}=o[d];Qe(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(h&&h.signal.aborted))if(Pr(x)){let g=Pi(e.matches,m==null?void 0:m.route.id);u&&u[g.route.id]||(u=Pt({},u,{[g.route.id]:x.error})),e.fetchers.delete(f)}else if(Do(x))Qe(!1,"Unhandled fetcher revalidation redirect");else if(Po(x))Qe(!1,"Unhandled fetcher deferred data");else{let g=Ls(x.data);e.fetchers.set(f,g)}}return{loaderData:l,errors:u}}function yx(e,t,r,n){let s=Pt({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),n&&n.hasOwnProperty(i))break}return s}function xx(e){return e?Pr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Pi(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function wx(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ur(e,t){let{pathname:r,routeId:n,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new dg(e||500,a,new Error(l),!0)}function _x(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Do(r))return{result:r,idx:t}}}function Q_(e){let t=typeof e=="string"?Es(e):e;return Zo(Pt({},t,{hash:""}))}function M2(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function I2(e){return typeof e=="object"&&e!=null&&"then"in e}function L2(e){return J_(e.result)&&w2.has(e.result.status)}function Po(e){return e.type===vt.deferred}function Pr(e){return e.type===vt.error}function Do(e){return(e&&e.type)===vt.redirect}function F2(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function J_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function z2(e){return x2.has(e.toLowerCase())}function on(e){return v2.has(e.toLowerCase())}async function bx(e,t,r,n,s,o){for(let i=0;i<r.length;i++){let a=r[i],l=t[i];if(!l)continue;let u=e.find(f=>f.route.id===l.route.id),d=u!=null&&!q_(u,l)&&(o&&o[l.route.id])!==void 0;if(Po(a)&&(s||d)){let f=n[i];Qe(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await e1(a,f,s).then(m=>{m&&(r[i]=m||r[i])})}}}async function e1(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:vt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:vt.error,error:s}}return{type:vt.data,data:e.deferredData.data}}}function hg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ha(e,t){let r=typeof t=="string"?Es(t).search:t.search;if(e[e.length-1].route.index&&hg(r||""))return e[e.length-1];let n=Z_(e);return n[n.length-1]}function Sx(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:o,json:i}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function vh(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function U2(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Oa(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function V2(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ls(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function W2(e,t){try{let r=e.sessionStorage.getItem(G_);if(r){let n=JSON.parse(r);for(let[s,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function $2(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(G_,JSON.stringify(r))}catch(n){Yo(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
* React Router v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function od(){return od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},od.apply(this,arguments)}const Jd=y.createContext(null),t1=y.createContext(null),yo=y.createContext(null),pg=y.createContext(null),Ts=y.createContext({outlet:null,matches:[],isDataRoute:!1}),r1=y.createContext(null);function B2(e,t){let{relative:r}=t===void 0?{}:t;pa()||Qe(!1);let{basename:n,navigator:s}=y.useContext(yo),{hash:o,pathname:i,search:a}=s1(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:fs([n,i])),s.createHref({pathname:l,search:a,hash:o})}function pa(){return y.useContext(pg)!=null}function Bn(){return pa()||Qe(!1),y.useContext(pg).location}function n1(e){y.useContext(yo).static||y.useLayoutEffect(e)}function wn(){let{isDataRoute:e}=y.useContext(Ts);return e?sR():H2()}function H2(){pa()||Qe(!1);let e=y.useContext(Jd),{basename:t,future:r,navigator:n}=y.useContext(yo),{matches:s}=y.useContext(Ts),{pathname:o}=Bn(),i=JSON.stringify(qd(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return n1(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=Xd(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:fs([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,i,o,e])}const Y2=y.createContext(null);function Z2(e){let t=y.useContext(Ts).outlet;return t&&y.createElement(Y2.Provider,{value:e},t)}function s1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(yo),{matches:s}=y.useContext(Ts),{pathname:o}=Bn(),i=JSON.stringify(qd(s,n.v7_relativeSplatPath));return y.useMemo(()=>Xd(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function K2(e,t,r,n){pa()||Qe(!1);let{navigator:s}=y.useContext(yo),{matches:o}=y.useContext(Ts),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=Bn(),d;d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let h=To(e,{pathname:m});return J2(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:fs([l,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:fs([l,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r,n)}function G2(){let e=nR(),t=Qd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const q2=y.createElement(G2,null);class X2 extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Ts.Provider,{value:this.props.routeContext},y.createElement(r1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Q2(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(Jd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ts.Provider,{value:t},n)}function J2(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Qe(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:h}=r,x=f.route.loader&&m[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||x){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let h,x=!1,g=null,w=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||q2,l&&(u<0&&m===0?(oR("route-fallback"),x=!0,w=null):u===m&&(x=!0,w=f.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,m+1)),p=()=>{let _;return h?_=g:x?_=w:f.route.Component?_=y.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=d,y.createElement(Q2,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:r!=null},children:_})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?y.createElement(X2,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:p(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):p()},null)}var o1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(o1||{}),id=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(id||{});function eR(e){let t=y.useContext(Jd);return t||Qe(!1),t}function tR(e){let t=y.useContext(t1);return t||Qe(!1),t}function rR(e){let t=y.useContext(Ts);return t||Qe(!1),t}function i1(e){let t=rR(),r=t.matches[t.matches.length-1];return r.route.id||Qe(!1),r.route.id}function nR(){var e;let t=y.useContext(r1),r=tR(id.UseRouteError),n=i1(id.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function sR(){let{router:e}=eR(o1.UseNavigateStable),t=i1(id.UseNavigateStable),r=y.useRef(!1);return n1(()=>{r.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,od({fromRouteId:t},o)))},[e,t])}const kx={};function oR(e,t,r){kx[e]||(kx[e]=!0)}function a1(e){let{to:t,replace:r,state:n,relative:s}=e;pa()||Qe(!1);let{future:o,static:i}=y.useContext(yo),{matches:a}=y.useContext(Ts),{pathname:l}=Bn(),u=wn(),d=Xd(t,qd(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function mg(e){return Z2(e.context)}function iR(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:a}=e;pa()&&Qe(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:o,static:i,future:od({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=Es(n));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:x="default"}=n,g=y.useMemo(()=>{let w=ha(d,l);return w==null?null:{location:{pathname:w,search:f,hash:m,state:h,key:x},navigationType:s}},[l,d,f,m,h,x,s]);return g==null?null:y.createElement(yo.Provider,{value:u},y.createElement(pg.Provider,{children:r,value:g}))}new Promise(()=>{});function aR(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Al.apply(this,arguments)}function lR(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function cR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uR(e,t){return e.button===0&&(!t||t==="_self")&&!cR(e)}function Op(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function dR(e,t){let r=Op(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const fR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],hR="6";try{window.__reactRouterVersion=hR}catch{}function pR(e,t){return k2({basename:void 0,future:Al({},void 0,{v7_prependBasename:!0}),history:KN({window:void 0}),hydrationData:mR(),routes:e,mapRouteProperties:aR,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function mR(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Al({},t,{errors:gR(t.errors)})),t}function gR(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,s]of t)if(s&&s.__type==="RouteErrorResponse")r[n]=new dg(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(s.message);o.stack="",r[n]=o}}else r[n]=s;return r}const vR=y.createContext({isTransitioning:!1}),yR=y.createContext(new Map),xR="startTransition",Cx=V0[xR],wR="flushSync",Ex=ZN[wR];function _R(e){Cx?Cx(e):e()}function Ma(e){Ex?Ex(e):e()}class bR{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function SR(e){let{fallbackElement:t,router:r,future:n}=e,[s,o]=y.useState(r.state),[i,a]=y.useState(),[l,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[m,h]=y.useState(),[x,g]=y.useState(),w=y.useRef(new Map),{v7_startTransition:v}=n||{},p=y.useCallback(D=>{v?_R(D):D()},[v]),_=y.useCallback((D,P)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:j}=P;L.forEach(b=>w.current.delete(b)),D.fetchers.forEach((b,W)=>{b.data!==void 0&&w.current.set(W,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!j||F){q?Ma(()=>o(D)):p(()=>o(D));return}if(q){Ma(()=>{m&&(d&&d.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let b=r.window.document.startViewTransition(()=>{Ma(()=>o(D))});b.finished.finally(()=>{Ma(()=>{f(void 0),h(void 0),a(void 0),u({isTransitioning:!1})})}),Ma(()=>h(b));return}m?(d&&d.resolve(),m.skipTransition(),g({state:D,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(a(D),u({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[r.window,m,d,w,p]);y.useLayoutEffect(()=>r.subscribe(_),[r,_]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new bR)},[l]),y.useEffect(()=>{if(d&&i&&r.window){let D=i,P=d.promise,L=r.window.document.startViewTransition(async()=>{p(()=>o(D)),await P});L.finished.finally(()=>{f(void 0),h(void 0),a(void 0),u({isTransitioning:!1})}),h(L)}},[p,i,d,r.window]),y.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,m,s.location,i]),y.useEffect(()=>{!l.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),g(void 0))},[l.isTransitioning,x]),y.useEffect(()=>{},[]);let C=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:D=>r.navigate(D),push:(D,P,L)=>r.navigate(D,{state:P,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(D,P,L)=>r.navigate(D,{replace:!0,state:P,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",T=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),R=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(Jd.Provider,{value:T},y.createElement(t1.Provider,{value:s},y.createElement(yR.Provider,{value:w.current},y.createElement(vR.Provider,{value:l},y.createElement(iR,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?y.createElement(kR,{routes:r.routes,future:r.future,state:s}):t))))),null)}const kR=y.memo(CR);function CR(e){let{routes:t,future:r,state:n}=e;return K2(t,void 0,n,r)}const ER=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dr=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,m=lR(t,fR),{basename:h}=y.useContext(yo),x,g=!1;if(typeof u=="string"&&TR.test(u)&&(x=u,ER))try{let _=new URL(window.location.href),C=u.startsWith("//")?new URL(_.protocol+u):new URL(u),E=ha(C.pathname,h);C.origin===_.origin&&E!=null?u=E+C.search+C.hash:g=!0}catch{}let w=B2(u,{relative:s}),v=jR(u,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function p(_){n&&n(_),_.defaultPrevented||v(_)}return y.createElement("a",Al({},m,{href:x||w,onClick:g||o?n:p,ref:r,target:l}))});var Tx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Tx||(Tx={}));var jx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jx||(jx={}));function jR(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=wn(),u=Bn(),d=s1(e,{relative:i});return y.useCallback(f=>{if(uR(f,r)){f.preventDefault();let m=n!==void 0?n:Zo(u)===Zo(d);l(e,{replace:m,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,l,d,n,s,r,e,o,i,a])}function NR(e){let t=y.useRef(Op(e)),r=y.useRef(!1),n=Bn(),s=y.useMemo(()=>dR(n.search,r.current?null:t.current),[n.search]),o=wn(),i=y.useCallback((a,l)=>{const u=Op(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l1=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var PR={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"};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DR=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>y.createElement("svg",{ref:l,...PR,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:l1("lucide",s),...a},[...i.map(([u,d])=>y.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const St=(e,t)=>{const r=y.forwardRef(({className:n,...s},o)=>y.createElement(DR,{ref:o,iconNode:t,className:l1(`lucide-${RR(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AR=St("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OR=St("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MR=St("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c1=St("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u1=St("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IR=St("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LR=St("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gg=St("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FR=St("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vg=St("CircleX",[["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"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zR=St("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mp=St("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UR=St("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nx=St("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"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rx=St("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VR=St("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WR=St("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $R=St("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"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BR=St("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Px=St("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dx=St("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d1=St("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HR=St("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YR=St("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yg=St("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ZR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ef(...e){return t=>e.forEach(r=>ZR(r,t))}function Xe(...e){return y.useCallback(ef(...e),e)}var xs=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),o=s.find(KR);if(o){const i=o.props.children,a=s.map(l=>l===o?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:l);return c.jsx(Ip,{...n,ref:t,children:y.isValidElement(i)?y.cloneElement(i,void 0,a):null})}return c.jsx(Ip,{...n,ref:t,children:r})});xs.displayName="Slot";var Ip=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=qR(r);return y.cloneElement(r,{...GR(n,r.props),ref:t?ef(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});Ip.displayName="SlotClone";var xg=({children:e})=>c.jsx(c.Fragment,{children:e});function KR(e){return y.isValidElement(e)&&e.type===xg}function GR(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{o(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function qR(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function f1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=f1(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function XR(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=f1(e))&&(n&&(n+=" "),n+=t);return n}const Ax=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ox=XR,ac=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ox(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],f=o==null?void 0:o[u];if(d===null)return null;const m=Ax(d)||Ax(f);return s[u][m]}),a=r&&Object.entries(r).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:m,...h}=d;return Object.entries(h).every(x=>{let[g,w]=x;return Array.isArray(w)?w.includes({...o,...a}[g]):{...o,...a}[g]===w})?[...u,f,m]:u},[]);return Ox(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};function h1(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=h1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function QR(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=h1(e))&&(n&&(n+=" "),n+=t);return n}const wg="-";function JR(e){const t=tP(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function s(i){const a=i.split(wg);return a[0]===""&&a.length!==1&&a.shift(),p1(a,t)||eP(i)}function o(i,a){const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function p1(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?p1(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(wg);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const Mx=/^\[(.+)\]$/;function eP(e){if(Mx.test(e)){const t=Mx.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function tP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return nP(Object.entries(e.classGroups),r).forEach(([o,i])=>{Lp(i,n,o,t)}),n}function Lp(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ix(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(rP(s)){Lp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Lp(i,Ix(t,o),r,n)})})}function Ix(e,t){let r=e;return t.split(wg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function rP(e){return e.isThemeGetter}function nP(e,t){return t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e}function sP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(o,i){r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}}const m1="!";function oP(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let u=0,d=0,f;for(let w=0;w<a.length;w++){let v=a[w];if(u===0){if(v===s&&(n||a.slice(w,w+o)===t)){l.push(a.slice(d,w)),d=w+o;continue}if(v==="/"){f=w;continue}}v==="["?u++:v==="]"&&u--}const m=l.length===0?a:a.substring(d),h=m.startsWith(m1),x=h?m.substring(1):m,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:i})}:i}function iP(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function aP(e){return{cache:sP(e.cacheSize),parseClassName:oP(e),...JR(e)}}const lP=/\s+/;function cP(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(lP).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=r(i);let f=!!d,m=n(f?u.substring(0,d):u);if(!m){if(!f)return{isTailwindClass:!1,originalClassName:i};if(m=n(u),!m)return{isTailwindClass:!1,originalClassName:i};f=!1}const h=iP(a).join(":");return{isTailwindClass:!0,modifierId:l?h+m1:h,classGroupId:m,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=i,d=a+l;return o.has(d)?!1:(o.add(d),s(l,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function uP(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=g1(t))&&(n&&(n+=" "),n+=r);return n}function g1(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=g1(e[n]))&&(r&&(r+=" "),r+=t);return r}function dP(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((d,f)=>f(d),e());return r=aP(u),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=cP(l,r);return s(l,d),d}return function(){return o(uP.apply(null,arguments))}}function xt(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const v1=/^\[(?:([a-z-]+):)?(.+)\]$/i,fP=/^\d+\/\d+$/,hP=new Set(["px","full","screen"]),pP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mP=/\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$/,gP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Jn(e){return Ao(e)||hP.has(e)||fP.test(e)}function Ms(e){return ma(e,"length",EP)}function Ao(e){return!!e&&!Number.isNaN(Number(e))}function Gc(e){return ma(e,"number",Ao)}function Ia(e){return!!e&&Number.isInteger(Number(e))}function xP(e){return e.endsWith("%")&&Ao(e.slice(0,-1))}function Ze(e){return v1.test(e)}function Is(e){return pP.test(e)}const wP=new Set(["length","size","percentage"]);function _P(e){return ma(e,wP,y1)}function bP(e){return ma(e,"position",y1)}const SP=new Set(["image","url"]);function kP(e){return ma(e,SP,jP)}function CP(e){return ma(e,"",TP)}function La(){return!0}function ma(e,t,r){const n=v1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function EP(e){return mP.test(e)&&!gP.test(e)}function y1(){return!1}function TP(e){return vP.test(e)}function jP(e){return yP.test(e)}function NP(){const e=xt("colors"),t=xt("spacing"),r=xt("blur"),n=xt("brightness"),s=xt("borderColor"),o=xt("borderRadius"),i=xt("borderSpacing"),a=xt("borderWidth"),l=xt("contrast"),u=xt("grayscale"),d=xt("hueRotate"),f=xt("invert"),m=xt("gap"),h=xt("gradientColorStops"),x=xt("gradientColorStopPositions"),g=xt("inset"),w=xt("margin"),v=xt("opacity"),p=xt("padding"),_=xt("saturate"),C=xt("scale"),E=xt("sepia"),T=xt("skew"),R=xt("space"),D=xt("translate"),P=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Ze,t],j=()=>[Ze,t],F=()=>["",Jn,Ms],b=()=>["auto",Ao,Ze],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ze],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Ao,Gc],V=()=>[Ao,Ze];return{cacheSize:500,separator:":",theme:{colors:[La],spacing:[Jn,Ms],blur:["none","",Is,Ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",Is,Ze],borderSpacing:j(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:V(),invert:I(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[xP,Ms],inset:q(),margin:q(),opacity:z(),padding:j(),saturate:z(),scale:z(),sepia:I(),skew:V(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Is]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...W(),Ze]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ia,Ze]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Ia,Ze]}],"grid-cols":[{"grid-cols":[La]}],"col-start-end":[{col:["auto",{span:["full",Ia,Ze]},Ze]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[La]}],"row-start-end":[{row:["auto",{span:[Ia,Ze]},Ze]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Is]},Is]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Is,Ms]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gc]}],"font-family":[{font:[La]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",Ao,Gc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Jn,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Jn,Ms]}],"underline-offset":[{"underline-offset":["auto",Jn,Ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],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",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),bP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_P]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[Jn,Ze]}],"outline-w":[{outline:[Jn,Ms]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Jn,Ms]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Is,CP]}],"shadow-color":[{shadow:[La]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Is,Ze]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Ia,Ze]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jn,Ms,Gc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-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"]}}}const RP=dP(NP);function me(...e){return RP(QR(e))}const tf=ac("inline-flex items-center justify-center 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"}}),ct=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?xs:"button";return c.jsx(i,{className:me(tf({variant:t,size:r,className:e})),ref:o,...s})});ct.displayName="Button";function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function PP(e,t){const r=y.createContext(t);function n(o){const{children:i,...a}=o,l=y.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:i})}function s(o){const i=y.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Qr(e,t=[]){let r=[];function n(o,i){const a=y.createContext(i),l=r.length;r=[...r,i];function u(f){const{scope:m,children:h,...x}=f,g=(m==null?void 0:m[e][l])||a,w=y.useMemo(()=>x,Object.values(x));return c.jsx(g.Provider,{value:w,children:h})}function d(f,m){const h=(m==null?void 0:m[e][l])||a,x=y.useContext(h);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=r.map(i=>y.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,DP(s,...t)]}function DP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(o)[`__scope${u}`];return{...a,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function At(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function io({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=AP({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,a=At(r),l=y.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,l]}function AP({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),o=At(t);return y.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var OP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ve=OP.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:o,...i}=n,a=o?xs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _g(e,t){e&&Cs.flushSync(()=>e.dispatchEvent(t))}function rf(e){const t=e+"CollectionProvider",[r,n]=Qr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:g}=h,w=et.useRef(null),v=et.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:v,collectionRef:w,children:g})};i.displayName=t;const a=e+"CollectionSlot",l=et.forwardRef((h,x)=>{const{scope:g,children:w}=h,v=o(a,g),p=Xe(x,v.collectionRef);return c.jsx(xs,{ref:p,children:w})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=et.forwardRef((h,x)=>{const{scope:g,children:w,...v}=h,p=et.useRef(null),_=Xe(x,p),C=o(u,g);return et.useEffect(()=>(C.itemMap.set(p,{ref:p,...v}),()=>void C.itemMap.delete(p))),c.jsx(xs,{[d]:"",ref:_,children:w})});f.displayName=u;function m(h){const x=o(e+"CollectionConsumer",h);return et.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const v=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,E)=>v.indexOf(C.ref.current)-v.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},m,n]}var MP=y.createContext(void 0);function nf(e){const t=y.useContext(MP);return e||t||"ltr"}function IP(e,t=globalThis==null?void 0:globalThis.document){const r=At(e);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var LP="DismissableLayer",Fp="dismissableLayer.update",FP="dismissableLayer.pointerDownOutside",zP="dismissableLayer.focusOutside",Lx,x1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ga=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=y.useContext(x1),[d,f]=y.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),x=Xe(t,R=>f(R)),g=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),p=d?g.indexOf(d):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,C=p>=v,E=VP(R=>{const D=R.target,P=[...u.branches].some(L=>L.contains(D));!C||P||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},m),T=WP(R=>{const D=R.target;[...u.branches].some(L=>L.contains(D))||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},m);return IP(R=>{p===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),y.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Lx=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Fx(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Lx)}},[d,m,r,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Fx())},[d,u]),y.useEffect(()=>{const R=()=>h({});return document.addEventListener(Fp,R),()=>document.removeEventListener(Fp,R)},[]),c.jsx(Ve.div,{...l,ref:x,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,E.onPointerDownCapture)})});ga.displayName=LP;var UP="DismissableLayerBranch",w1=y.forwardRef((e,t)=>{const r=y.useContext(x1),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Ve.div,{...e,ref:s})});w1.displayName=UP;function VP(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){_1(FP,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function WP(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!n.current&&_1(zP,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Fx(){const e=new CustomEvent(Fp);document.dispatchEvent(e)}function _1(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?_g(s,o):s.dispatchEvent(o)}var $P=ga,BP=w1,yh=0;function bg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zx()),document.body.insertAdjacentElement("beforeend",e[1]??zx()),yh++,()=>{yh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yh--}},[])}function zx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var xh="focusScope.autoFocusOnMount",wh="focusScope.autoFocusOnUnmount",Ux={bubbles:!1,cancelable:!0},HP="FocusScope",sf=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=y.useState(null),u=At(s),d=At(o),f=y.useRef(null),m=Xe(t,g=>l(g)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let g=function(_){if(h.paused||!a)return;const C=_.target;a.contains(C)?f.current=C:Fs(f.current,{select:!0})},w=function(_){if(h.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Fs(f.current,{select:!0}))},v=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&Fs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const p=new MutationObserver(v);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),p.disconnect()}}},[n,a,h.paused]),y.useEffect(()=>{if(a){Wx.add(h);const g=document.activeElement;if(!a.contains(g)){const v=new CustomEvent(xh,Ux);a.addEventListener(xh,u),a.dispatchEvent(v),v.defaultPrevented||(YP(XP(b1(a)),{select:!0}),document.activeElement===g&&Fs(a))}return()=>{a.removeEventListener(xh,u),setTimeout(()=>{const v=new CustomEvent(wh,Ux);a.addEventListener(wh,d),a.dispatchEvent(v),v.defaultPrevented||Fs(g??document.body,{select:!0}),a.removeEventListener(wh,d),Wx.remove(h)},0)}}},[a,u,d,h]);const x=y.useCallback(g=>{if(!r&&!n||h.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const p=g.currentTarget,[_,C]=ZP(p);_&&C?!g.shiftKey&&v===C?(g.preventDefault(),r&&Fs(_,{select:!0})):g.shiftKey&&v===_&&(g.preventDefault(),r&&Fs(C,{select:!0})):v===p&&g.preventDefault()}},[r,n,h.paused]);return c.jsx(Ve.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});sf.displayName=HP;function YP(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Fs(n,{select:t}),document.activeElement!==r)return}function ZP(e){const t=b1(e),r=Vx(t,e),n=Vx(t.reverse(),e);return[r,n]}function b1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Vx(e,t){for(const r of e)if(!KP(r,{upTo:t}))return r}function KP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GP(e){return e instanceof HTMLInputElement&&"select"in e}function Fs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&GP(e)&&t&&e.select()}}var Wx=qP();function qP(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=$x(e,t),e.unshift(t)},remove(t){var r;e=$x(e,t),(r=e[0])==null||r.resume()}}}function $x(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function XP(e){return e.filter(t=>t.tagName!=="A")}var nr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},QP=V0.useId||(()=>{}),JP=0;function Fn(e){const[t,r]=y.useState(QP());return nr(()=>{r(n=>n??String(JP++))},[e]),t?`radix-${t}`:""}const eD=["top","right","bottom","left"],On=Math.min,Dr=Math.max,ad=Math.round,qc=Math.floor,ao=e=>({x:e,y:e}),tD={left:"right",right:"left",bottom:"top",top:"bottom"},rD={start:"end",end:"start"};function zp(e,t,r){return Dr(e,On(t,r))}function ws(e,t){return typeof e=="function"?e(t):e}function _s(e){return e.split("-")[0]}function va(e){return e.split("-")[1]}function Sg(e){return e==="x"?"y":"x"}function kg(e){return e==="y"?"height":"width"}function lo(e){return["top","bottom"].includes(_s(e))?"y":"x"}function Cg(e){return Sg(lo(e))}function nD(e,t,r){r===void 0&&(r=!1);const n=va(e),s=Cg(e),o=kg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ld(i)),[i,ld(i)]}function sD(e){const t=ld(e);return[Up(e),t,Up(t)]}function Up(e){return e.replace(/start|end/g,t=>rD[t])}function oD(e,t,r){const n=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?o:i;default:return[]}}function iD(e,t,r,n){const s=va(e);let o=oD(_s(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Up)))),o}function ld(e){return e.replace(/left|right|bottom|top/g,t=>tD[t])}function aD(e){return{top:0,right:0,bottom:0,left:0,...e}}function S1(e){return typeof e!="number"?aD(e):{top:e,right:e,bottom:e,left:e}}function cd(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Bx(e,t,r){let{reference:n,floating:s}=e;const o=lo(t),i=Cg(t),a=kg(i),l=_s(t),u=o==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,m=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-s.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(va(t)){case"start":h[i]-=m*(r&&u?-1:1);break;case"end":h[i]+=m*(r&&u?-1:1);break}return h}const lD=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=Bx(u,n,l),m=n,h={},x=0;for(let g=0;g<a.length;g++){const{name:w,fn:v}=a[g],{x:p,y:_,data:C,reset:E}=await v({x:d,y:f,initialPlacement:n,placement:m,strategy:s,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=p??d,f=_??f,h={...h,[w]:{...h[w],...C}},E&&x<=50&&(x++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:f}=Bx(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:s,middlewareData:h}};async function Ol(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=ws(t,e),x=S1(h),w=a[m?f==="floating"?"reference":"floating":f],v=cd(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),p=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},E=cd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:_,strategy:l}):p);return{top:(v.top-E.top+x.top)/C.y,bottom:(E.bottom-v.bottom+x.bottom)/C.y,left:(v.left-E.left+x.left)/C.x,right:(E.right-v.right+x.right)/C.x}}const cD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ws(e,t)||{};if(u==null)return{};const f=S1(d),m={x:r,y:n},h=Cg(s),x=kg(h),g=await i.getDimensions(u),w=h==="y",v=w?"top":"left",p=w?"bottom":"right",_=w?"clientHeight":"clientWidth",C=o.reference[x]+o.reference[h]-m[h]-o.floating[x],E=m[h]-o.reference[h],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=T?T[_]:0;(!R||!await(i.isElement==null?void 0:i.isElement(T)))&&(R=a.floating[_]||o.floating[x]);const D=C/2-E/2,P=R/2-g[x]/2-1,L=On(f[v],P),q=On(f[p],P),j=L,F=R-g[x]-q,b=R/2-g[x]/2+D,W=zp(j,b,F),te=!l.arrow&&va(s)!=null&&b!==W&&o.reference[x]/2-(b<j?L:q)-g[x]/2<0,$=te?b<j?b-j:b-F:0;return{[h]:m[h]+$,data:{[h]:W,centerOffset:b-W-$,...te&&{alignmentOffset:$}},reset:te}}}),uD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,...w}=ws(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=_s(s),p=lo(a),_=_s(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(_||!g?[ld(a)]:sD(a)),T=x!=="none";!m&&T&&E.push(...iD(a,g,x,C));const R=[a,...E],D=await Ol(t,w),P=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&P.push(D[v]),f){const b=nD(s,i,C);P.push(D[b[0]],D[b[1]])}if(L=[...L,{placement:s,overflows:P}],!P.every(b=>b<=0)){var q,j;const b=(((q=o.flip)==null?void 0:q.index)||0)+1,W=R[b];if(W)return{data:{index:b,overflows:L},reset:{placement:W}};let te=(j=L.filter($=>$.overflows[0]<=0).sort(($,Z)=>$.overflows[1]-Z.overflows[1])[0])==null?void 0:j.placement;if(!te)switch(h){case"bestFit":{var F;const $=(F=L.filter(Z=>{if(T){const I=lo(Z.placement);return I===p||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:F[0];$&&(te=$);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function Hx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yx(e){return eD.some(t=>e[t]>=0)}const dD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=ws(e,t);switch(n){case"referenceHidden":{const o=await Ol(t,{...s,elementContext:"reference"}),i=Hx(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Yx(i)}}}case"escaped":{const o=await Ol(t,{...s,altBoundary:!0}),i=Hx(o,r.floating);return{data:{escapedOffsets:i,escaped:Yx(i)}}}default:return{}}}}};async function fD(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=_s(r),a=va(r),l=lo(r)==="y",u=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,f=ws(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(h=a==="end"?x*-1:x),l?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const hD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await fD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},pD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:v,y:p}=w;return{x:v,y:p}}},...l}=ws(e,t),u={x:r,y:n},d=await Ol(t,l),f=lo(_s(s)),m=Sg(f);let h=u[m],x=u[f];if(o){const w=m==="y"?"top":"left",v=m==="y"?"bottom":"right",p=h+d[w],_=h-d[v];h=zp(p,h,_)}if(i){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",p=x+d[w],_=x-d[v];x=zp(p,x,_)}const g=a.fn({...t,[m]:h,[f]:x});return{...g,data:{x:g.x-r,y:g.y-n}}}}},mD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ws(e,t),d={x:r,y:n},f=lo(s),m=Sg(f);let h=d[m],x=d[f];const g=ws(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const _=m==="y"?"height":"width",C=o.reference[m]-o.floating[_]+w.mainAxis,E=o.reference[m]+o.reference[_]-w.mainAxis;h<C?h=C:h>E&&(h=E)}if(u){var v,p;const _=m==="y"?"width":"height",C=["top","left"].includes(_s(s)),E=o.reference[f]-o.floating[_]+(C&&((v=i.offset)==null?void 0:v[f])||0)+(C?0:w.crossAxis),T=o.reference[f]+o.reference[_]+(C?0:((p=i.offset)==null?void 0:p[f])||0)-(C?w.crossAxis:0);x<E?x=E:x>T&&(x=T)}return{[m]:h,[f]:x}}}},gD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:o}=t,{apply:i=()=>{},...a}=ws(e,t),l=await Ol(t,a),u=_s(r),d=va(r),f=lo(r)==="y",{width:m,height:h}=n.floating;let x,g;u==="top"||u==="bottom"?(x=u,g=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,x=d==="end"?"top":"bottom");const w=h-l.top-l.bottom,v=m-l.left-l.right,p=On(h-l[x],w),_=On(m-l[g],v),C=!t.middlewareData.shift;let E=p,T=_;if(f?T=d||C?On(_,v):v:E=d||C?On(p,w):w,C&&!d){const D=Dr(l.left,0),P=Dr(l.right,0),L=Dr(l.top,0),q=Dr(l.bottom,0);f?T=m-2*(D!==0||P!==0?D+P:Dr(l.left,l.right)):E=h-2*(L!==0||q!==0?L+q:Dr(l.top,l.bottom))}await i({...t,availableWidth:T,availableHeight:E});const R=await s.getDimensions(o.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function ya(e){return k1(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function js(e){var t;return(t=(k1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function k1(e){return e instanceof Node||e instanceof Mr(e).Node}function mn(e){return e instanceof Element||e instanceof Mr(e).Element}function Un(e){return e instanceof HTMLElement||e instanceof Mr(e).HTMLElement}function Zx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}function lc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function vD(e){return["table","td","th"].includes(ya(e))}function of(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Eg(e){const t=Tg(),r=mn(e)?gn(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function yD(e){let t=co(e);for(;Un(t)&&!na(t);){if(Eg(t))return t;if(of(t))return null;t=co(t)}return null}function Tg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function na(e){return["html","body","#document"].includes(ya(e))}function gn(e){return Mr(e).getComputedStyle(e)}function af(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function co(e){if(ya(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zx(e)&&e.host||js(e);return Zx(t)?t.host:t}function C1(e){const t=co(e);return na(t)?e.ownerDocument?e.ownerDocument.body:e.body:Un(t)&&lc(t)?t:C1(t)}function Ml(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=C1(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Mr(s);return o?t.concat(i,i.visualViewport||[],lc(s)?s:[],i.frameElement&&r?Ml(i.frameElement):[]):t.concat(s,Ml(s,[],r))}function E1(e){const t=gn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Un(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=ad(r)!==o||ad(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function jg(e){return mn(e)?e:e.contextElement}function Vi(e){const t=jg(e);if(!Un(t))return ao(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=E1(t);let i=(o?ad(r.width):r.width)/n,a=(o?ad(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const xD=ao(0);function T1(e){const t=Mr(e);return!Tg()||!t.visualViewport?xD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Mr(e)?!1:t}function Ko(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=jg(e);let i=ao(1);t&&(n?mn(n)&&(i=Vi(n)):i=Vi(e));const a=wD(o,r,n)?T1(o):ao(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const m=Mr(o),h=n&&mn(n)?Mr(n):n;let x=m,g=x.frameElement;for(;g&&n&&h!==x;){const w=Vi(g),v=g.getBoundingClientRect(),p=gn(g),_=v.left+(g.clientLeft+parseFloat(p.paddingLeft))*w.x,C=v.top+(g.clientTop+parseFloat(p.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,f*=w.y,l+=_,u+=C,x=Mr(g),g=x.frameElement}}return cd({width:d,height:f,x:l,y:u})}function _D(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=js(n),a=t?of(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=ao(1);const d=ao(0),f=Un(n);if((f||!f&&!o)&&((ya(n)!=="body"||lc(i))&&(l=af(n)),Un(n))){const m=Ko(n);u=Vi(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function bD(e){return Array.from(e.getClientRects())}function j1(e){return Ko(js(e)).left+af(e).scrollLeft}function SD(e){const t=js(e),r=af(e),n=e.ownerDocument.body,s=Dr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Dr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+j1(e);const a=-r.scrollTop;return gn(n).direction==="rtl"&&(i+=Dr(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function kD(e,t){const r=Mr(e),n=js(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=Tg();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function CD(e,t){const r=Ko(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Un(e)?Vi(e):ao(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function Kx(e,t,r){let n;if(t==="viewport")n=kD(e,r);else if(t==="document")n=SD(js(e));else if(mn(t))n=CD(t,r);else{const s=T1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return cd(n)}function N1(e,t){const r=co(e);return r===t||!mn(r)||na(r)?!1:gn(r).position==="fixed"||N1(r,t)}function ED(e,t){const r=t.get(e);if(r)return r;let n=Ml(e,[],!1).filter(a=>mn(a)&&ya(a)!=="body"),s=null;const o=gn(e).position==="fixed";let i=o?co(e):e;for(;mn(i)&&!na(i);){const a=gn(i),l=Eg(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||lc(i)&&!l&&N1(e,i))?n=n.filter(d=>d!==i):s=a,i=co(i)}return t.set(e,n),n}function TD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?of(t)?[]:ED(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,d)=>{const f=Kx(t,d,s);return u.top=Dr(f.top,u.top),u.right=On(f.right,u.right),u.bottom=On(f.bottom,u.bottom),u.left=Dr(f.left,u.left),u},Kx(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function jD(e){const{width:t,height:r}=E1(e);return{width:t,height:r}}function ND(e,t,r){const n=Un(t),s=js(t),o=r==="fixed",i=Ko(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ao(0);if(n||!n&&!o)if((ya(t)!=="body"||lc(s))&&(a=af(t)),n){const f=Ko(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=j1(s));const u=i.left+a.scrollLeft-l.x,d=i.top+a.scrollTop-l.y;return{x:u,y:d,width:i.width,height:i.height}}function _h(e){return gn(e).position==="static"}function Gx(e,t){return!Un(e)||gn(e).position==="fixed"?null:t?t(e):e.offsetParent}function R1(e,t){const r=Mr(e);if(of(e))return r;if(!Un(e)){let s=co(e);for(;s&&!na(s);){if(mn(s)&&!_h(s))return s;s=co(s)}return r}let n=Gx(e,t);for(;n&&vD(n)&&_h(n);)n=Gx(n,t);return n&&na(n)&&_h(n)&&!Eg(n)?r:n||yD(e)||r}const RD=async function(e){const t=this.getOffsetParent||R1,r=this.getDimensions,n=await r(e.floating);return{reference:ND(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function PD(e){return gn(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:_D,getDocumentElement:js,getClippingRect:TD,getOffsetParent:R1,getElementRects:RD,getClientRects:bD,getDimensions:jD,getScale:Vi,isElement:mn,isRTL:PD};function AD(e,t){let r=null,n;const s=js(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const h=qc(d),x=qc(s.clientWidth-(u+f)),g=qc(s.clientHeight-(d+m)),w=qc(u),p={rootMargin:-h+"px "+-x+"px "+-g+"px "+-w+"px",threshold:Dr(0,On(1,l))||1};let _=!0;function C(E){const T=E[0].intersectionRatio;if(T!==l){if(!_)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,p)}r.observe(e)}return i(!0),o}function OD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=jg(e),d=s||o?[...u?Ml(u):[],...Ml(t)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const f=u&&a?AD(u,r):null;let m=-1,h=null;i&&(h=new ResizeObserver(v=>{let[p]=v;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let x,g=l?Ko(e):null;l&&w();function w(){const v=Ko(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&r(),g=v,x=requestAnimationFrame(w)}return r(),()=>{var v;d.forEach(p=>{s&&p.removeEventListener("scroll",r),o&&p.removeEventListener("resize",r)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(x)}}const MD=hD,ID=pD,LD=uD,FD=gD,zD=dD,qx=cD,UD=mD,VD=(e,t,r)=>{const n=new Map,s={platform:DD,...r},o={...s.platform,_c:n};return lD(e,t,{...s,platform:o})};var bu=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ud(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ud(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!ud(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function P1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xx(e,t){const r=P1(e);return Math.round(t*r)/r}function Qx(e){const t=y.useRef(e);return bu(()=>{t.current=e}),t}function WD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=y.useState(n);ud(m,n)||h(n);const[x,g]=y.useState(null),[w,v]=y.useState(null),p=y.useCallback($=>{$!==T.current&&(T.current=$,g($))},[]),_=y.useCallback($=>{$!==R.current&&(R.current=$,v($))},[]),C=o||x,E=i||w,T=y.useRef(null),R=y.useRef(null),D=y.useRef(d),P=l!=null,L=Qx(l),q=Qx(s),j=y.useCallback(()=>{if(!T.current||!R.current)return;const $={placement:t,strategy:r,middleware:m};q.current&&($.platform=q.current),VD(T.current,R.current,$).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!ud(D.current,I)&&(D.current=I,Cs.flushSync(()=>{f(I)}))})},[m,t,r,q]);bu(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[u]);const F=y.useRef(!1);bu(()=>(F.current=!0,()=>{F.current=!1}),[]),bu(()=>{if(C&&(T.current=C),E&&(R.current=E),C&&E){if(L.current)return L.current(C,E,j);j()}},[C,E,j,L,P]);const b=y.useMemo(()=>({reference:T,floating:R,setReference:p,setFloating:_}),[p,_]),W=y.useMemo(()=>({reference:C,floating:E}),[C,E]),te=y.useMemo(()=>{const $={position:r,left:0,top:0};if(!W.floating)return $;const Z=Xx(W.floating,d.x),I=Xx(W.floating,d.y);return a?{...$,transform:"translate("+Z+"px, "+I+"px)",...P1(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,W.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:j,refs:b,elements:W,floatingStyles:te}),[d,j,b,W,te])}const $D=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?qx({element:n.current,padding:s}).fn(r):{}:n?qx({element:n,padding:s}).fn(r):{}}}},BD=(e,t)=>({...MD(e),options:[e,t]}),HD=(e,t)=>({...ID(e),options:[e,t]}),YD=(e,t)=>({...UD(e),options:[e,t]}),ZD=(e,t)=>({...LD(e),options:[e,t]}),KD=(e,t)=>({...FD(e),options:[e,t]}),GD=(e,t)=>({...zD(e),options:[e,t]}),qD=(e,t)=>({...$D(e),options:[e,t]});var XD="Arrow",D1=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return c.jsx(Ve.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});D1.displayName=XD;var QD=D1;function A1(e){const[t,r]=y.useState(void 0);return nr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ng="Popper",[O1,xa]=Qr(Ng),[JD,M1]=O1(Ng),I1=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return c.jsx(JD,{scope:t,anchor:n,onAnchorChange:s,children:r})};I1.displayName=Ng;var L1="PopperAnchor",F1=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=M1(L1,r),i=y.useRef(null),a=Xe(t,i);return y.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:c.jsx(Ve.div,{...s,ref:a})});F1.displayName=L1;var Rg="PopperContent",[eA,tA]=O1(Rg),z1=y.forwardRef((e,t)=>{var fe,ve,Se,Ie,Ne,ke;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:x,...g}=e,w=M1(Rg,r),[v,p]=y.useState(null),_=Xe(t,rt=>p(rt)),[C,E]=y.useState(null),T=A1(C),R=(T==null?void 0:T.width)??0,D=(T==null?void 0:T.height)??0,P=n+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],j=q.length>0,F={padding:L,boundary:q.filter(nA),altBoundary:j},{refs:b,floatingStyles:W,placement:te,isPositioned:$,middlewareData:Z}=WD({strategy:"fixed",placement:P,whileElementsMounted:(...rt)=>OD(...rt,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[BD({mainAxis:s+D,alignmentAxis:i}),l&&HD({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?YD():void 0,...F}),l&&ZD({...F}),KD({...F,apply:({elements:rt,rects:k,availableWidth:J,availableHeight:K})=>{const{width:A,height:S}=k.reference,N=rt.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${K}px`),N.setProperty("--radix-popper-anchor-width",`${A}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&qD({element:C,padding:a}),sA({arrowWidth:R,arrowHeight:D}),m&&GD({strategy:"referenceHidden",...F})]}),[I,Q]=W1(te),z=At(x);nr(()=>{$&&(z==null||z())},[$,z]);const V=(fe=Z.arrow)==null?void 0:fe.x,de=(ve=Z.arrow)==null?void 0:ve.y,ne=((Se=Z.arrow)==null?void 0:Se.centerOffset)!==0,[se,je]=y.useState();return nr(()=>{v&&je(window.getComputedStyle(v).zIndex)},[v]),c.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Ie=Z.transformOrigin)==null?void 0:Ie.x,(Ne=Z.transformOrigin)==null?void 0:Ne.y].join(" "),...((ke=Z.hide)==null?void 0:ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(eA,{scope:r,placedSide:I,onArrowChange:E,arrowX:V,arrowY:de,shouldHideArrow:ne,children:c.jsx(Ve.div,{"data-side":I,"data-align":Q,...g,ref:_,style:{...g.style,animation:$?void 0:"none"}})})})});z1.displayName=Rg;var U1="PopperArrow",rA={top:"bottom",right:"left",bottom:"top",left:"right"},V1=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=tA(U1,n),i=rA[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(QD,{...s,ref:r,style:{...s.style,display:"block"}})})});V1.displayName=U1;function nA(e){return e!==null}var sA=e=>({name:"transformOrigin",options:e,fn(t){var w,v,p;const{placement:r,rects:n,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=W1(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,h=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let x="",g="";return u==="bottom"?(x=i?f:`${m}px`,g=`${-l}px`):u==="top"?(x=i?f:`${m}px`,g=`${n.floating.height+l}px`):u==="right"?(x=`${-l}px`,g=i?f:`${h}px`):u==="left"&&(x=`${n.floating.width+l}px`,g=i?f:`${h}px`),{data:{x,y:g}}}});function W1(e){const[t,r="center"]=e.split("-");return[t,r]}var Pg=I1,Dg=F1,Ag=z1,Og=V1,oA="Portal",cc=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=y.useState(!1);nr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?B_.createPortal(c.jsx(Ve.div,{...n,ref:t}),i):null});cc.displayName=oA;function iA(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Er=e=>{const{present:t,children:r}=e,n=aA(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=Xe(n.ref,lA(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:o}):null};Er.displayName="Presence";function aA(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),o=y.useRef("none"),i=e?"mounted":"unmounted",[a,l]=iA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Xc(n.current);o.current=a==="mounted"?u:"none"},[a]),nr(()=>{const u=n.current,d=s.current;if(d!==e){const m=o.current,h=Xc(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),nr(()=>{if(t){const u=f=>{const h=Xc(n.current).includes(f.animationName);f.target===t&&h&&Cs.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Xc(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Xc(e){return(e==null?void 0:e.animationName)||"none"}function lA(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bh="rovingFocusGroup.onEntryFocus",cA={bubbles:!1,cancelable:!0},lf="RovingFocusGroup",[Vp,$1,uA]=rf(lf),[dA,B1]=Qr(lf,[uA]),[fA,hA]=dA(lf),H1=y.forwardRef((e,t)=>c.jsx(Vp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Vp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(pA,{...e,ref:t})})}));H1.displayName=lf;var pA=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=y.useRef(null),h=Xe(t,m),x=nf(o),[g=null,w]=io({prop:i,defaultProp:a,onChange:l}),[v,p]=y.useState(!1),_=At(u),C=$1(r),E=y.useRef(!1),[T,R]=y.useState(0);return y.useEffect(()=>{const D=m.current;if(D)return D.addEventListener(bh,_),()=>D.removeEventListener(bh,_)},[_]),c.jsx(fA,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:g,onItemFocus:y.useCallback(D=>w(D),[w]),onItemShiftTab:y.useCallback(()=>p(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>R(D=>D-1),[]),children:c.jsx(Ve.div,{tabIndex:v||T===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{E.current=!0}),onFocus:ue(e.onFocus,D=>{const P=!E.current;if(D.target===D.currentTarget&&P&&!v){const L=new CustomEvent(bh,cA);if(D.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),j=q.find(te=>te.active),F=q.find(te=>te.id===g),W=[j,F,...q].filter(Boolean).map(te=>te.ref.current);K1(W,d)}}E.current=!1}),onBlur:ue(e.onBlur,()=>p(!1))})})}),Y1="RovingFocusGroupItem",Z1=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,...i}=e,a=Fn(),l=o||a,u=hA(Y1,r),d=u.currentTabStopId===l,f=$1(r),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return y.useEffect(()=>{if(n)return m(),()=>h()},[n,m,h]),c.jsx(Vp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Ve.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{n?u.onItemFocus(l):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=vA(x,u.orientation,u.dir);if(g!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let v=f().filter(p=>p.focusable).map(p=>p.ref.current);if(g==="last")v.reverse();else if(g==="prev"||g==="next"){g==="prev"&&v.reverse();const p=v.indexOf(x.currentTarget);v=u.loop?yA(v,p+1):v.slice(p+1)}setTimeout(()=>K1(v))}})})})});Z1.displayName=Y1;var mA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gA(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vA(e,t,r){const n=gA(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return mA[n]}function K1(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function yA(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xA=H1,wA=Z1,_A=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fi=new WeakMap,Qc=new WeakMap,Jc={},Sh=0,G1=function(e){return e&&(e.host||G1(e.parentNode))},bA=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=G1(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},SA=function(e,t,r,n){var s=bA(t,Array.isArray(e)?e:[e]);Jc[r]||(Jc[r]=new WeakMap);var o=Jc[r],i=[],a=new Set,l=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var h=m.getAttribute(n),x=h!==null&&h!=="false",g=(fi.get(m)||0)+1,w=(o.get(m)||0)+1;fi.set(m,g),o.set(m,w),i.push(m),g===1&&x&&Qc.set(m,!0),w===1&&m.setAttribute(r,"true"),x||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),a.clear(),Sh++,function(){i.forEach(function(f){var m=fi.get(f)-1,h=o.get(f)-1;fi.set(f,m),o.set(f,h),m||(Qc.has(f)||f.removeAttribute(n),Qc.delete(f)),h||f.removeAttribute(r)}),Sh--,Sh||(fi=new WeakMap,fi=new WeakMap,Qc=new WeakMap,Jc={})}},Mg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=_A(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),SA(n,s,r,"aria-hidden")):function(){return null}},Pn=function(){return Pn=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Pn.apply(this,arguments)};function q1(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function kA(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Su="right-scroll-bar-position",ku="width-before-scroll-bar",CA="with-scroll-bars-hidden",EA="--removed-body-scroll-bar-size";function kh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function TA(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var jA=typeof window<"u"?y.useLayoutEffect:y.useEffect,Jx=new WeakMap;function NA(e,t){var r=TA(null,function(n){return e.forEach(function(s){return kh(s,n)})});return jA(function(){var n=Jx.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||kh(a,null)}),o.forEach(function(a){s.has(a)||kh(a,i)})}Jx.set(r,e)},[e]),r}function RA(e){return e}function PA(e,t){t===void 0&&(t=RA);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(o),i=r}var l=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return s}function DA(e){e===void 0&&(e={});var t=PA(null);return t.options=Pn({async:!0,ssr:!1},e),t}var X1=function(e){var t=e.sideCar,r=q1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,Pn({},r))};X1.isSideCarExport=!0;function AA(e,t){return e.useMedium(t),X1}var Q1=DA(),Ch=function(){},cf=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Ch,onWheelCapture:Ch,onTouchMoveCapture:Ch}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noIsolation,x=e.inert,g=e.allowPinchZoom,w=e.as,v=w===void 0?"div":w,p=e.gapMode,_=q1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,E=NA([r,t]),T=Pn(Pn({},_),s);return y.createElement(y.Fragment,null,d&&y.createElement(C,{sideCar:Q1,removeScrollBar:u,shards:f,noIsolation:h,inert:x,setCallbacks:o,allowPinchZoom:!!g,lockRef:r,gapMode:p}),i?y.cloneElement(y.Children.only(a),Pn(Pn({},T),{ref:E})):y.createElement(v,Pn({},T,{className:l,ref:E}),a))});cf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cf.classNames={fullWidth:ku,zeroRight:Su};var OA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=OA();return t&&e.setAttribute("nonce",t),e}function IA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FA=function(){var e=0,t=null;return{add:function(r){e==0&&(t=MA())&&(IA(t,r),LA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zA=function(){var e=FA();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},J1=function(){var e=zA(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},UA={left:0,top:0,right:0,gap:0},Eh=function(e){return parseInt(e||"",10)||0},VA=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Eh(r),Eh(n),Eh(s)]},WA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return UA;var t=VA(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$A=J1(),Wi="data-scroll-locked",BA=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
.`.concat(CA,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(a,"px ").concat(n,`;
}
body[`).concat(Wi,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Su,` {
right: `).concat(a,"px ").concat(n,`;
}
.`).concat(ku,` {
margin-right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Su," .").concat(Su,` {
right: 0 `).concat(n,`;
}
.`).concat(ku," .").concat(ku,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Wi,`] {
`).concat(EA,": ").concat(a,`px;
}
`)},e0=function(){var e=parseInt(document.body.getAttribute(Wi)||"0",10);return isFinite(e)?e:0},HA=function(){y.useEffect(function(){return document.body.setAttribute(Wi,(e0()+1).toString()),function(){var e=e0()-1;e<=0?document.body.removeAttribute(Wi):document.body.setAttribute(Wi,e.toString())}},[])},YA=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;HA();var o=y.useMemo(function(){return WA(s)},[s]);return y.createElement($A,{styles:BA(o,!t,s,r?"":"!important")})},Wp=!1;if(typeof window<"u")try{var eu=Object.defineProperty({},"passive",{get:function(){return Wp=!0,!0}});window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{Wp=!1}var hi=Wp?{passive:!1}:!1,ZA=function(e){return e.tagName==="TEXTAREA"},eb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ZA(e)&&r[t]==="visible")},KA=function(e){return eb(e,"overflowY")},GA=function(e){return eb(e,"overflowX")},t0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=tb(e,n);if(s){var o=rb(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},qA=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},XA=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},tb=function(e,t){return e==="v"?KA(t):GA(t)},rb=function(e,t){return e==="v"?qA(t):XA(t)},QA=function(e,t){return e==="h"&&t==="rtl"?-1:1},JA=function(e,t,r,n,s){var o=QA(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),u=!1,d=i>0,f=0,m=0;do{var h=rb(e,a),x=h[0],g=h[1],w=h[2],v=g-w-o*x;(x||v)&&tb(e,a)&&(f+=v,m+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},tu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},r0=function(e){return[e.deltaX,e.deltaY]},n0=function(e){return e&&"current"in e?e.current:e},eO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tO=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},rO=0,pi=[];function nO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(rO++)[0],o=y.useState(J1)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=kA([e.lockRef.current],(e.shards||[]).map(n0),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(g,w){if("touches"in g&&g.touches.length===2)return!i.current.allowPinchZoom;var v=tu(g),p=r.current,_="deltaX"in g?g.deltaX:p[0]-v[0],C="deltaY"in g?g.deltaY:p[1]-v[1],E,T=g.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&T.type==="range")return!1;var D=t0(R,T);if(!D)return!0;if(D?E=R:(E=R==="v"?"h":"v",D=t0(R,T)),!D)return!1;if(!n.current&&"changedTouches"in g&&(_||C)&&(n.current=E),!E)return!0;var P=n.current||E;return JA(P,w,g,P==="h"?_:C,!0)},[]),l=y.useCallback(function(g){var w=g;if(!(!pi.length||pi[pi.length-1]!==o)){var v="deltaY"in w?r0(w):tu(w),p=t.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&eO(E.delta,v)})[0];if(p&&p.should){w.cancelable&&w.preventDefault();return}if(!p){var _=(i.current.shards||[]).map(n0).filter(Boolean).filter(function(E){return E.contains(w.target)}),C=_.length>0?a(w,_[0]):!i.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),u=y.useCallback(function(g,w,v,p){var _={name:g,delta:w,target:v,should:p,shadowParent:sO(v)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=y.useCallback(function(g){r.current=tu(g),n.current=void 0},[]),f=y.useCallback(function(g){u(g.type,r0(g),g.target,a(g,e.lockRef.current))},[]),m=y.useCallback(function(g){u(g.type,tu(g),g.target,a(g,e.lockRef.current))},[]);y.useEffect(function(){return pi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,hi),document.addEventListener("touchmove",l,hi),document.addEventListener("touchstart",d,hi),function(){pi=pi.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,hi),document.removeEventListener("touchmove",l,hi),document.removeEventListener("touchstart",d,hi)}},[]);var h=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(o,{styles:tO(s)}):null,h?y.createElement(YA,{gapMode:e.gapMode}):null)}function sO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oO=AA(Q1,nO);var uf=y.forwardRef(function(e,t){return y.createElement(cf,Pn({},e,{ref:t,sideCar:oO}))});uf.classNames=cf.classNames;var $p=["Enter"," "],iO=["ArrowDown","PageUp","Home"],nb=["ArrowUp","PageDown","End"],aO=[...iO,...nb],lO={ltr:[...$p,"ArrowRight"],rtl:[...$p,"ArrowLeft"]},cO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},uc="Menu",[Il,uO,dO]=rf(uc),[ti,sb]=Qr(uc,[dO,xa,B1]),df=xa(),ob=B1(),[fO,ri]=ti(uc),[hO,dc]=ti(uc),ib=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,a=df(t),[l,u]=y.useState(null),d=y.useRef(!1),f=At(o),m=nf(s);return y.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),c.jsx(Pg,{...a,children:c.jsx(fO,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:c.jsx(hO,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:i,children:n})})})};ib.displayName=uc;var pO="MenuAnchor",Ig=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=df(r);return c.jsx(Dg,{...s,...n,ref:t})});Ig.displayName=pO;var Lg="MenuPortal",[mO,ab]=ti(Lg,{forceMount:void 0}),lb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=ri(Lg,t);return c.jsx(mO,{scope:t,forceMount:r,children:c.jsx(Er,{present:r||o.open,children:c.jsx(cc,{asChild:!0,container:s,children:n})})})};lb.displayName=Lg;var Gr="MenuContent",[gO,Fg]=ti(Gr),cb=y.forwardRef((e,t)=>{const r=ab(Gr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=ri(Gr,e.__scopeMenu),i=dc(Gr,e.__scopeMenu);return c.jsx(Il.Provider,{scope:e.__scopeMenu,children:c.jsx(Er,{present:n||o.open,children:c.jsx(Il.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx(vO,{...s,ref:t}):c.jsx(yO,{...s,ref:t})})})})}),vO=y.forwardRef((e,t)=>{const r=ri(Gr,e.__scopeMenu),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const o=n.current;if(o)return Mg(o)},[]),c.jsx(zg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),yO=y.forwardRef((e,t)=>{const r=ri(Gr,e.__scopeMenu);return c.jsx(zg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),zg=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:x,...g}=e,w=ri(Gr,r),v=dc(Gr,r),p=df(r),_=ob(r),C=uO(r),[E,T]=y.useState(null),R=y.useRef(null),D=Xe(t,R,w.onContentChange),P=y.useRef(0),L=y.useRef(""),q=y.useRef(0),j=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),W=x?uf:y.Fragment,te=x?{as:xs,allowPinchZoom:!0}:void 0,$=I=>{var fe,ve;const Q=L.current+I,z=C().filter(Se=>!Se.disabled),V=document.activeElement,de=(fe=z.find(Se=>Se.ref.current===V))==null?void 0:fe.textValue,ne=z.map(Se=>Se.textValue),se=RO(ne,Q,de),je=(ve=z.find(Se=>Se.textValue===se))==null?void 0:ve.ref.current;(function Se(Ie){L.current=Ie,window.clearTimeout(P.current),Ie!==""&&(P.current=window.setTimeout(()=>Se(""),1e3))})(Q),je&&setTimeout(()=>je.focus())};y.useEffect(()=>()=>window.clearTimeout(P.current),[]),bg();const Z=y.useCallback(I=>{var z,V;return F.current===((z=j.current)==null?void 0:z.side)&&DO(I,(V=j.current)==null?void 0:V.area)},[]);return c.jsx(gO,{scope:r,searchRef:L,onItemEnter:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:y.useCallback(I=>{var Q;Z(I)||((Q=R.current)==null||Q.focus(),T(null))},[Z]),onTriggerLeave:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:y.useCallback(I=>{j.current=I},[]),children:c.jsx(W,{...te,children:c.jsx(sf,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(ga,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:c.jsx(xA,{asChild:!0,..._,dir:v.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:ue(l,I=>{v.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Ag,{role:"menu","aria-orientation":"vertical","data-state":Cb(w.open),"data-radix-menu-content":"",dir:v.dir,...p,...g,ref:D,style:{outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,de=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!V&&de&&$(I.key));const ne=R.current;if(I.target!==ne||!aO.includes(I.key))return;I.preventDefault();const je=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);nb.includes(I.key)&&je.reverse(),jO(je)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(P.current),L.current="")}),onPointerMove:ue(e.onPointerMove,Ll(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const V=I.clientX>b.current?"right":"left";F.current=V,b.current=I.clientX}}))})})})})})})});cb.displayName=Gr;var xO="MenuGroup",Ug=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{role:"group",...n,ref:t})});Ug.displayName=xO;var wO="MenuLabel",ub=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});ub.displayName=wO;var dd="MenuItem",s0="menu.itemSelect",ff=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=y.useRef(null),i=dc(dd,e.__scopeMenu),a=Fg(dd,e.__scopeMenu),l=Xe(t,o),u=y.useRef(!1),d=()=>{const f=o.current;if(!r&&f){const m=new CustomEvent(s0,{bubbles:!0,cancelable:!0});f.addEventListener(s0,h=>n==null?void 0:n(h),{once:!0}),_g(f,m),m.defaultPrevented?u.current=!1:i.onClose()}};return c.jsx(db,{...s,ref:l,disabled:r,onClick:ue(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:ue(e.onKeyDown,f=>{const m=a.searchRef.current!=="";r||m&&f.key===" "||$p.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});ff.displayName=dd;var db=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=Fg(dd,r),a=ob(r),l=y.useRef(null),u=Xe(t,l),[d,f]=y.useState(!1),[m,h]=y.useState("");return y.useEffect(()=>{const x=l.current;x&&h((x.textContent??"").trim())},[o.children]),c.jsx(Il.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:c.jsx(wA,{asChild:!0,...a,focusable:!n,children:c.jsx(Ve.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,Ll(x=>{n?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,Ll(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),_O="MenuCheckboxItem",fb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return c.jsx(vb,{scope:e.__scopeMenu,checked:r,children:c.jsx(ff,{role:"menuitemcheckbox","aria-checked":fd(r)?"mixed":r,...s,ref:t,"data-state":Wg(r),onSelect:ue(s.onSelect,()=>n==null?void 0:n(fd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});fb.displayName=_O;var hb="MenuRadioGroup",[bO,SO]=ti(hb,{value:void 0,onValueChange:()=>{}}),pb=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=At(n);return c.jsx(bO,{scope:e.__scopeMenu,value:r,onValueChange:o,children:c.jsx(Ug,{...s,ref:t})})});pb.displayName=hb;var mb="MenuRadioItem",gb=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=SO(mb,e.__scopeMenu),o=r===s.value;return c.jsx(vb,{scope:e.__scopeMenu,checked:o,children:c.jsx(ff,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":Wg(o),onSelect:ue(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});gb.displayName=mb;var Vg="MenuItemIndicator",[vb,kO]=ti(Vg,{checked:!1}),yb=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=kO(Vg,r);return c.jsx(Er,{present:n||fd(o.checked)||o.checked===!0,children:c.jsx(Ve.span,{...s,ref:t,"data-state":Wg(o.checked)})})});yb.displayName=Vg;var CO="MenuSeparator",xb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ve.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});xb.displayName=CO;var EO="MenuArrow",wb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=df(r);return c.jsx(Og,{...s,...n,ref:t})});wb.displayName=EO;var TO="MenuSub",[m8,_b]=ti(TO),Ya="MenuSubTrigger",bb=y.forwardRef((e,t)=>{const r=ri(Ya,e.__scopeMenu),n=dc(Ya,e.__scopeMenu),s=_b(Ya,e.__scopeMenu),o=Fg(Ya,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),c.jsx(Ig,{asChild:!0,...u,children:c.jsx(db,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Cb(r.open),...e,ref:ef(t,s.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,Ll(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,Ll(f=>{var h,x;d();const m=(h=r.content)==null?void 0:h.getBoundingClientRect();if(m){const g=(x=r.content)==null?void 0:x.dataset.side,w=g==="right",v=w?-5:5,p=m[w?"left":"right"],_=m[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:p,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:p,y:m.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var h;const m=o.searchRef.current!=="";e.disabled||m&&f.key===" "||lO[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});bb.displayName=Ya;var Sb="MenuSubContent",kb=y.forwardRef((e,t)=>{const r=ab(Gr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=ri(Gr,e.__scopeMenu),i=dc(Gr,e.__scopeMenu),a=_b(Sb,e.__scopeMenu),l=y.useRef(null),u=Xe(t,l);return c.jsx(Il.Provider,{scope:e.__scopeMenu,children:c.jsx(Er,{present:n||o.open,children:c.jsx(Il.Slot,{scope:e.__scopeMenu,children:c.jsx(zg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var h;const f=d.currentTarget.contains(d.target),m=cO[i.dir].includes(d.key);f&&m&&(o.onOpenChange(!1),(h=a.trigger)==null||h.focus(),d.preventDefault())})})})})})});kb.displayName=Sb;function Cb(e){return e?"open":"closed"}function fd(e){return e==="indeterminate"}function Wg(e){return fd(e)?"indeterminate":e?"checked":"unchecked"}function jO(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function NO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function RO(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=NO(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const l=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function PO(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,u=t[i].x,d=t[i].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function DO(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return PO(r,t)}function Ll(e){return t=>t.pointerType==="mouse"?e(t):void 0}var AO=ib,OO=Ig,MO=lb,IO=cb,LO=Ug,FO=ub,zO=ff,UO=fb,VO=pb,WO=gb,$O=yb,BO=xb,HO=wb,YO=bb,ZO=kb,$g="DropdownMenu",[KO,g8]=Qr($g,[sb]),yr=sb(),[GO,Eb]=KO($g),Tb=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=yr(t),u=y.useRef(null),[d=!1,f]=io({prop:s,defaultProp:o,onChange:i});return c.jsx(GO,{scope:t,triggerId:Fn(),triggerRef:u,contentId:Fn(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(m=>!m),[f]),modal:a,children:c.jsx(AO,{...l,open:d,onOpenChange:f,dir:n,modal:a,children:r})})};Tb.displayName=$g;var jb="DropdownMenuTrigger",Nb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=Eb(jb,r),i=yr(r);return c.jsx(OO,{asChild:!0,...i,children:c.jsx(Ve.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:ef(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Nb.displayName=jb;var qO="DropdownMenuPortal",Rb=e=>{const{__scopeDropdownMenu:t,...r}=e,n=yr(t);return c.jsx(MO,{...n,...r})};Rb.displayName=qO;var Pb="DropdownMenuContent",Db=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Eb(Pb,r),o=yr(r),i=y.useRef(!1);return c.jsx(IO,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Db.displayName=Pb;var XO="DropdownMenuGroup",QO=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(LO,{...s,...n,ref:t})});QO.displayName=XO;var JO="DropdownMenuLabel",Ab=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(FO,{...s,...n,ref:t})});Ab.displayName=JO;var eM="DropdownMenuItem",Ob=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(zO,{...s,...n,ref:t})});Ob.displayName=eM;var tM="DropdownMenuCheckboxItem",Mb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(UO,{...s,...n,ref:t})});Mb.displayName=tM;var rM="DropdownMenuRadioGroup",nM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(VO,{...s,...n,ref:t})});nM.displayName=rM;var sM="DropdownMenuRadioItem",Ib=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(WO,{...s,...n,ref:t})});Ib.displayName=sM;var oM="DropdownMenuItemIndicator",Lb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx($O,{...s,...n,ref:t})});Lb.displayName=oM;var iM="DropdownMenuSeparator",Fb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(BO,{...s,...n,ref:t})});Fb.displayName=iM;var aM="DropdownMenuArrow",lM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(HO,{...s,...n,ref:t})});lM.displayName=aM;var cM="DropdownMenuSubTrigger",zb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(YO,{...s,...n,ref:t})});zb.displayName=cM;var uM="DropdownMenuSubContent",Ub=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=yr(r);return c.jsx(ZO,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ub.displayName=uM;var dM=Tb,fM=Nb,hM=Rb,Vb=Db,Wb=Ab,$b=Ob,Bb=Mb,Hb=Ib,Yb=Lb,Zb=Fb,Kb=zb,Gb=Ub;const qb=dM,Xb=fM,pM=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>c.jsxs(Kb,{ref:s,className:me("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,c.jsx(IR,{className:"ml-auto h-4 w-4"})]}));pM.displayName=Kb.displayName;const mM=y.forwardRef(({className:e,...t},r)=>c.jsx(Gb,{ref:r,className:me("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));mM.displayName=Gb.displayName;const Bg=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(hM,{children:c.jsx(Vb,{ref:n,sideOffset:t,className:me("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Bg.displayName=Vb.displayName;const $i=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx($b,{ref:n,className:me("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));$i.displayName=$b.displayName;const gM=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>c.jsxs(Bb,{ref:s,className:me("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Yb,{children:c.jsx(c1,{className:"h-4 w-4"})})}),t]}));gM.displayName=Bb.displayName;const vM=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Hb,{ref:n,className:me("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Yb,{children:c.jsx(zR,{className:"h-2 w-2 fill-current"})})}),t]}));vM.displayName=Hb.displayName;const Qb=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(Wb,{ref:n,className:me("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Qb.displayName=Wb.displayName;const Jb=y.forwardRef(({className:e,...t},r)=>c.jsx(Zb,{ref:r,className:me("-mx-1 my-1 h-px bg-muted",e),...t}));Jb.displayName=Zb.displayName;var Hg="Dialog",[eS,tS]=Qr(Hg),[yM,_n]=eS(Hg),rS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=y.useRef(null),l=y.useRef(null),[u=!1,d]=io({prop:n,defaultProp:s,onChange:o});return c.jsx(yM,{scope:t,triggerRef:a,contentRef:l,contentId:Fn(),titleId:Fn(),descriptionId:Fn(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:i,children:r})};rS.displayName=Hg;var nS="DialogTrigger",sS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=_n(nS,r),o=Xe(t,s.triggerRef);return c.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Kg(s.open),...n,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});sS.displayName=nS;var Yg="DialogPortal",[xM,oS]=eS(Yg,{forceMount:void 0}),iS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=_n(Yg,t);return c.jsx(xM,{scope:t,forceMount:r,children:y.Children.map(n,i=>c.jsx(Er,{present:r||o.open,children:c.jsx(cc,{asChild:!0,container:s,children:i})}))})};iS.displayName=Yg;var hd="DialogOverlay",aS=y.forwardRef((e,t)=>{const r=oS(hd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=_n(hd,e.__scopeDialog);return o.modal?c.jsx(Er,{present:n||o.open,children:c.jsx(wM,{...s,ref:t})}):null});aS.displayName=hd;var wM=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=_n(hd,r);return c.jsx(uf,{as:xs,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Ve.div,{"data-state":Kg(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Go="DialogContent",lS=y.forwardRef((e,t)=>{const r=oS(Go,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=_n(Go,e.__scopeDialog);return c.jsx(Er,{present:n||o.open,children:o.modal?c.jsx(_M,{...s,ref:t}):c.jsx(bM,{...s,ref:t})})});lS.displayName=Go;var _M=y.forwardRef((e,t)=>{const r=_n(Go,e.__scopeDialog),n=y.useRef(null),s=Xe(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return Mg(o)},[]),c.jsx(cS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),bM=y.forwardRef((e,t)=>{const r=_n(Go,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return c.jsx(cS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),cS=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=_n(Go,r),l=y.useRef(null),u=Xe(t,l);return bg(),c.jsxs(c.Fragment,{children:[c.jsx(sf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:c.jsx(ga,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Kg(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(kM,{titleId:a.titleId}),c.jsx(EM,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Zg="DialogTitle",uS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=_n(Zg,r);return c.jsx(Ve.h2,{id:s.titleId,...n,ref:t})});uS.displayName=Zg;var dS="DialogDescription",fS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=_n(dS,r);return c.jsx(Ve.p,{id:s.descriptionId,...n,ref:t})});fS.displayName=dS;var hS="DialogClose",pS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=_n(hS,r);return c.jsx(Ve.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});pS.displayName=hS;function Kg(e){return e?"open":"closed"}var mS="DialogTitleWarning",[SM,gS]=PP(mS,{contentName:Go,titleName:Zg,docsSlug:"dialog"}),kM=({titleId:e})=>{const t=gS(mS),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},CM="DialogDescriptionWarning",EM=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gS(CM).contentName}}.`;return y.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Gg=rS,qg=sS,Xg=iS,fc=aS,hc=lS,pc=uS,mc=fS,hf=pS;const Qg=Gg,Jg=qg,TM=Xg,vS=y.forwardRef(({className:e,...t},r)=>c.jsx(fc,{className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));vS.displayName=fc.displayName;const jM=ac("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),pf=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>c.jsxs(TM,{children:[c.jsx(vS,{}),c.jsxs(hc,{ref:s,className:me(jM({side:e}),t),...n,children:[r,c.jsxs(hf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(yg,{className:"h-4 w-4 dark:text-stone-200"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pf.displayName=hc.displayName;const ev=({className:e,...t})=>c.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",e),...t});ev.displayName="SheetHeader";const tv=y.forwardRef(({className:e,...t},r)=>c.jsx(pc,{ref:r,className:me("text-lg font-semibold text-foreground",e),...t}));tv.displayName=pc.displayName;const NM=y.forwardRef(({className:e,...t},r)=>c.jsx(mc,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));NM.displayName=mc.displayName;class Ir extends Error{constructor(t){var r,n,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Ir.prototype),t!==null&&typeof t=="object"&&(this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort,this.originalError=t.originalError,t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof Ir||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const ru=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function RM(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||PM;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(r[a]===void 0){let l=e.slice(o+1,i).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{r[a]=n(l)}catch{r[a]=l}}s=i+1}return r}function o0(e,t,r){const n=Object.assign({},r||{}),s=n.encode||DM;if(!ru.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!ru.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(n.maxAge!=null){const a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ru.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!ru.test(n.path))throw new TypeError("option path is invalid");i+="; Path="+n.path}if(n.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function PM(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function DM(e){return encodeURIComponent(e)}const AM=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let yS;function Bi(e){if(e)try{const t=decodeURIComponent(yS(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function xS(e,t=0){let r=Bi(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}yS=typeof atob!="function"||AM?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,o=0,i="";n=t.charAt(o++);~n&&(r=s%4?64*r+n:n,s++%4)?i+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i}:atob;const i0="pb_auth";class OM{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!xS(this.token)}get isAdmin(){return Bi(this.token).type==="admin"}get isAuthRecord(){return Bi(this.token).type==="authRecord"}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=i0){const n=RM(t||"")[r]||"";let s={};try{s=JSON.parse(n),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,r=i0){var l,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Bi(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=o0(r,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(l=o==null?void 0:o.model)==null?void 0:l.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=o0(r,JSON.stringify(o),t)}return i}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class MM extends OM{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(t,r){this._storageSet(this.storageKey,{token:t,model:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&(window!=null&&window.localStorage)){let n=r;typeof r!="string"&&(n=JSON.stringify(r)),window.localStorage.setItem(t,n)}else this.storageFallback[t]=r}_storageRemove(t){var r;typeof window<"u"&&(window!=null&&window.localStorage)&&((r=window.localStorage)==null||r.removeItem(t)),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",t=>{if(t.key!=this.storageKey)return;const r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.model||null)})}}class ni{constructor(t){this.client=t}}class IM extends ni{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class rv extends ni{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Ir({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return n.items[0]})}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async o=>this.getList(o,t||500,r).then(i=>{const a=i.items;return n=n.concat(a),a.length==i.perPage?s(o+1):n});return s(1)}}function jr(e,t,r,n){const s=n!==void 0;return s||r!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,n),t):Object.assign(t,r):t}function Th(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class LM extends rv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};o=jr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,n,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Th(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,m){Th(u);const h=u.beforeSend,x=u.authStore.model,g=u.authStore.onChange((w,v)=>{(!w||(v==null?void 0:v.id)!=(x==null?void 0:x.id)||(v!=null&&v.collectionId||x!=null&&x.collectionId)&&(v==null?void 0:v.collectionId)!=(x==null?void 0:x.collectionId))&&Th(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=h,delete u._resetAutoRefresh},u.beforeSend=async(w,v)=>{var E;const p=u.authStore.token;if((E=v.query)!=null&&E.autoRefresh)return h?h(w,v):{url:w,sendOptions:v};let _=u.authStore.isValid;if(_&&xS(u.authStore.token,d))try{await f()}catch{_=!1}_||await m();const C=v.headers||{};for(let T in C)if(T.toLowerCase()=="authorization"&&p==C[T]&&u.authStore.token){C[T]=u.authStore.token;break}return v.headers=C,h?h(w,v):{url:w,sendOptions:v}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,r){let n={method:"POST"};return n=jr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCrudPath+"/auth-refresh",n).then(this.authResponse.bind(this))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=jr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=jr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const FM=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function wS(e){if(e){e.query=e.query||{};for(let t in e)FM.includes(t)||(e.query[t]=e[t],delete e[t])}}class _S extends ni{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,r,n){var i;if(!t)throw new Error("topic must be set.");let s=t;if(n){wS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(n=this.eventSource)==null||n.removeEventListener(o,i);delete this.subscriptions[o],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let o of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,o);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var o;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let l=this.subscriptions[i].length-1;l>=0;l--)this.subscriptions[i][l]===r&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(o=this.eventSource)==null||o.removeEventListener(i,r));a&&(this.subscriptions[i].length||delete this.subscriptions[i],n||this.hasSubscriptionListeners(i)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let o of n[s])o(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Ir(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},r)}disconnect(t=!1){var r;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(r=this.eventSource)==null||r.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[]}}}class zM extends rv{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o,i;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};return o=jr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,r,n,s,o,i,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:o}};return l=jr("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",l,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=a0(void 0));const s=new _S(this.client);function o(){n==null||n.close(),s.unsubscribe()}const i={},a=r.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var m;const u=l.authProviders.find(h=>h.name===r.provider);if(!u)throw new Ir(new Error(`Missing or invalid provider "${r.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(m=this.client.cancelControllers)==null?void 0:m[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(h,x)=>{var g;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const T=Object.assign({},r);delete T.provider,delete T.scopes,delete T.createData,delete T.urlCallback,(E=f==null?void 0:f.signal)!=null&&E.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,_.code,u.codeVerifier,d,r.createData,T);h(R)}catch(T){x(new Ir(T))}o()});const w={state:s.clientId};(g=r.scopes)!=null&&g.length&&(w.scope=r.scopes.join(" "));const v=this._replaceQueryParams(u.authUrl+d,w);await(r.urlCallback||function(_){n?n.location.href=_:n=a0(_)})(v)}catch(w){o(),x(new Ir(w))}})}).catch(l=>{throw o(),l})}async authRefresh(t,r){let n={method:"POST"};return n=jr("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",n,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",n).then(s=>this.authResponse(s))}async requestPasswordReset(t,r,n){let s={method:"POST",body:{email:t}};return s=jr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=jr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=jr("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,r,n){let s={method:"POST",body:{token:t}};return s=jr("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Bi(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=jr("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let o={method:"POST",body:{token:t,password:r}};return o=jr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Bi(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const l=a.split("=");o[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete o[a]:o[a]=r[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function a0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Ir(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let o=n/2-t/2,i=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+i+",left="+o+",resizable,menubar=no")}class UM extends rv{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,n){return n=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},n),this.client.send(this.baseCrudPath+"/import",n).then(()=>!0)}}class VM extends ni{async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send("/api/logs",n)}async getOne(t,r){if(!t)throw new Ir({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class WM extends ni{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class $M extends ni{getUrl(t,r,n={}){if(!r||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(r));let o=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const i=new URLSearchParams(n);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class BM extends ni{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then(()=>!0)}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then(()=>!0)}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then(()=>!0)}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then(()=>!0)}getDownloadUrl(t,r){return this.client.buildUrl(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}}class HM{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new MM,this.admins=new LM(this),this.collections=new UM(this),this.files=new $M(this),this.logs=new VM(this),this.settings=new IM(this),this.realtime=new _S(this),this.health=new WM(this),this.backups=new BM(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new zM(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,r){if(!r)return t;for(let n in r){let s=r[n];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Ir({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Ir(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),wS(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)r.append(n,i)}else{let o={};o[n]=s,r.append("@jsonPayload",JSON.stringify(o))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],o=encodeURIComponent(n);if(Array.isArray(s))for(const i of s)r.push(o+"="+encodeURIComponent(i));else s instanceof Date?r.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(o+"="+encodeURIComponent(JSON.stringify(s))):r.push(o+"="+encodeURIComponent(s))}return r.join("&")}}var YM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const ZM=YM.VITE_API_DOMAIN;console.log(ZM);let nu;const Nt=()=>nu||(nu=new HM("/"),nu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var bS;function ge(){return bS.apply(null,arguments)}function KM(e){bS=e}function vn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Fo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function at(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(at(e,t))return!1;return!0}function xr(e){return e===void 0}function bs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function gc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function SS(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function Ys(e,t){for(var r in t)at(t,r)&&(e[r]=t[r]);return at(t,"toString")&&(e.toString=t.toString),at(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Hn(e,t,r,n){return YS(e,t,r,n,!0).utc()}function GM(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ke(e){return e._pf==null&&(e._pf=GM()),e._pf}var Bp;Array.prototype.some?Bp=Array.prototype.some:Bp=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function sv(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ke(e),r=Bp.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function mf(e){var t=Hn(NaN);return e!=null?Ys(Ke(t),e):Ke(t).userInvalidated=!0,t}var l0=ge.momentProperties=[],jh=!1;function ov(e,t){var r,n,s,o=l0.length;if(xr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),xr(t._i)||(e._i=t._i),xr(t._f)||(e._f=t._f),xr(t._l)||(e._l=t._l),xr(t._strict)||(e._strict=t._strict),xr(t._tzm)||(e._tzm=t._tzm),xr(t._isUTC)||(e._isUTC=t._isUTC),xr(t._offset)||(e._offset=t._offset),xr(t._pf)||(e._pf=Ke(t)),xr(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)n=l0[r],s=t[n],xr(s)||(e[n]=s);return e}function vc(e){ov(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),jh===!1&&(jh=!0,ge.updateOffset(this),jh=!1)}function yn(e){return e instanceof vc||e!=null&&e._isAMomentObject!=null}function kS(e){ge.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Jr(e,t){var r=!0;return Ys(function(){if(ge.deprecationHandler!=null&&ge.deprecationHandler(null,e),r){var n=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])at(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];n.push(s)}kS(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var c0={};function CS(e,t){ge.deprecationHandler!=null&&ge.deprecationHandler(e,t),c0[e]||(kS(t),c0[e]=!0)}ge.suppressDeprecationWarnings=!1;ge.deprecationHandler=null;function Yn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function qM(e){var t,r;for(r in e)at(e,r)&&(t=e[r],Yn(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Hp(e,t){var r=Ys({},e),n;for(n in t)at(t,n)&&(Fo(e[n])&&Fo(t[n])?(r[n]={},Ys(r[n],e[n]),Ys(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)at(e,n)&&!at(t,n)&&Fo(e[n])&&(r[n]=Ys({},r[n]));return r}function iv(e){e!=null&&this.set(e)}var Yp;Object.keys?Yp=Object.keys:Yp=function(e){var t,r=[];for(t in e)at(e,t)&&r.push(t);return r};var XM={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function QM(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Yn(n)?n.call(t,r):n}function Vn(e,t,r){var n=""+Math.abs(e),s=t-n.length,o=e>=0;return(o?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var av=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,su=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Nh={},Hi={};function Re(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Hi[e]=s),t&&(Hi[t[0]]=function(){return Vn(s.apply(this,arguments),t[1],t[2])}),r&&(Hi[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function JM(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function eI(e){var t=e.match(av),r,n;for(r=0,n=t.length;r<n;r++)Hi[t[r]]?t[r]=Hi[t[r]]:t[r]=JM(t[r]);return function(s){var o="",i;for(i=0;i<n;i++)o+=Yn(t[i])?t[i].call(s,e):t[i];return o}}function Cu(e,t){return e.isValid()?(t=ES(t,e.localeData()),Nh[t]=Nh[t]||eI(t),Nh[t](e)):e.localeData().invalidDate()}function ES(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(su.lastIndex=0;r>=0&&su.test(e);)e=e.replace(su,n),su.lastIndex=0,r-=1;return e}var tI={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function rI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(av).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var nI="Invalid date";function sI(){return this._invalidDate}var oI="%d",iI=/\d{1,2}/;function aI(e){return this._ordinal.replace("%d",e)}var lI={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function cI(e,t,r,n){var s=this._relativeTime[r];return Yn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function uI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Yn(r)?r(t):r.replace(/%s/i,t)}var u0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function en(e){return typeof e=="string"?u0[e]||u0[e.toLowerCase()]:void 0}function lv(e){var t={},r,n;for(n in e)at(e,n)&&(r=en(n),r&&(t[r]=e[n]));return t}var dI={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function fI(e){var t=[],r;for(r in e)at(e,r)&&t.push({unit:r,priority:dI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var TS=/\d/,Vr=/\d\d/,jS=/\d{3}/,cv=/\d{4}/,gf=/[+-]?\d{6}/,kt=/\d\d?/,NS=/\d\d\d\d?/,RS=/\d\d\d\d\d\d?/,vf=/\d{1,3}/,uv=/\d{1,4}/,yf=/[+-]?\d{1,6}/,wa=/\d+/,xf=/[+-]?\d+/,hI=/Z|[+-]\d\d:?\d\d/gi,wf=/Z|[+-]\d\d(?::?\d\d)?/gi,pI=/[+-]?\d+(\.\d{1,3})?/,yc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,_a=/^[1-9]\d?/,dv=/^([1-9]\d|\d)/,pd;pd={};function we(e,t,r){pd[e]=Yn(t)?t:function(n,s){return n&&r?r:t}}function mI(e,t){return at(pd,e)?pd[e](t._strict,t._locale):new RegExp(gI(e))}function gI(e){return hs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function hs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Yr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function tt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Yr(t)),r}var Zp={};function mt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),bs(t)&&(n=function(o,i){i[t]=tt(o)}),s=e.length,r=0;r<s;r++)Zp[e[r]]=n}function xc(e,t){mt(e,function(r,n,s,o){s._w=s._w||{},t(r,s._w,s,o)})}function vI(e,t,r){t!=null&&at(Zp,e)&&Zp[e](t,r._a,r,e)}function _f(e){return e%4===0&&e%100!==0||e%400===0}var ar=0,cs=1,Dn=2,Gt=3,cn=4,us=5,Oo=6,yI=7,xI=8;Re("Y",0,0,function(){var e=this.year();return e<=9999?Vn(e,4):"+"+e});Re(0,["YY",2],0,function(){return this.year()%100});Re(0,["YYYY",4],0,"year");Re(0,["YYYYY",5],0,"year");Re(0,["YYYYYY",6,!0],0,"year");we("Y",xf);we("YY",kt,Vr);we("YYYY",uv,cv);we("YYYYY",yf,gf);we("YYYYYY",yf,gf);mt(["YYYYY","YYYYYY"],ar);mt("YYYY",function(e,t){t[ar]=e.length===2?ge.parseTwoDigitYear(e):tt(e)});mt("YY",function(e,t){t[ar]=ge.parseTwoDigitYear(e)});mt("Y",function(e,t){t[ar]=parseInt(e,10)});function ol(e){return _f(e)?366:365}ge.parseTwoDigitYear=function(e){return tt(e)+(tt(e)>68?1900:2e3)};var PS=ba("FullYear",!0);function wI(){return _f(this.year())}function ba(e,t){return function(r){return r!=null?(DS(this,e,r),ge.updateOffset(this,t),this):Fl(this,e)}}function Fl(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function DS(e,t,r){var n,s,o,i,a;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,i=e.month(),a=e.date(),a=a===29&&i===1&&!_f(o)?28:a,s?n.setUTCFullYear(o,i,a):n.setFullYear(o,i,a)}}function _I(e){return e=en(e),Yn(this[e])?this[e]():this}function bI(e,t){if(typeof e=="object"){e=lv(e);var r=fI(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=en(e),Yn(this[e]))return this[e](t);return this}function SI(e,t){return(e%t+t)%t}var zt;Array.prototype.indexOf?zt=Array.prototype.indexOf:zt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function fv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=SI(t,12);return e+=(t-r)/12,r===1?_f(e)?29:28:31-r%7%2}Re("M",["MM",2],"Mo",function(){return this.month()+1});Re("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Re("MMMM",0,0,function(e){return this.localeData().months(this,e)});we("M",kt,_a);we("MM",kt,Vr);we("MMM",function(e,t){return t.monthsShortRegex(e)});we("MMMM",function(e,t){return t.monthsRegex(e)});mt(["M","MM"],function(e,t){t[cs]=tt(e)-1});mt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[cs]=s:Ke(r).invalidMonth=e});var kI="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),AS="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),OS=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,CI=yc,EI=yc;function TI(e,t){return e?vn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||OS).test(t)?"format":"standalone"][e.month()]:vn(this._months)?this._months:this._months.standalone}function jI(e,t){return e?vn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[OS.test(t)?"format":"standalone"][e.month()]:vn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function NI(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=Hn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?t==="MMM"?(s=zt.call(this._shortMonthsParse,i),s!==-1?s:null):(s=zt.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=zt.call(this._shortMonthsParse,i),s!==-1?s:(s=zt.call(this._longMonthsParse,i),s!==-1?s:null)):(s=zt.call(this._longMonthsParse,i),s!==-1?s:(s=zt.call(this._shortMonthsParse,i),s!==-1?s:null))}function RI(e,t,r){var n,s,o;if(this._monthsParseExact)return NI.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Hn([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function MS(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=tt(t);else if(t=e.localeData().monthsParse(t),!bs(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,fv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function IS(e){return e!=null?(MS(this,e),ge.updateOffset(this,!0),this):Fl(this,"Month")}function PI(){return fv(this.year(),this.month())}function DI(e){return this._monthsParseExact?(at(this,"_monthsRegex")||LS.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(at(this,"_monthsShortRegex")||(this._monthsShortRegex=CI),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function AI(e){return this._monthsParseExact?(at(this,"_monthsRegex")||LS.call(this),e?this._monthsStrictRegex:this._monthsRegex):(at(this,"_monthsRegex")||(this._monthsRegex=EI),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function LS(){function e(l,u){return u.length-l.length}var t=[],r=[],n=[],s,o,i,a;for(s=0;s<12;s++)o=Hn([2e3,s]),i=hs(this.monthsShort(o,"")),a=hs(this.months(o,"")),t.push(i),r.push(a),n.push(a),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function OI(e,t,r,n,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,o,i),a}function zl(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function md(e,t,r){var n=7+t-r,s=(7+zl(e,0,n).getUTCDay()-t)%7;return-s+n-1}function FS(e,t,r,n,s){var o=(7+r-n)%7,i=md(e,n,s),a=1+7*(t-1)+o+i,l,u;return a<=0?(l=e-1,u=ol(l)+a):a>ol(e)?(l=e+1,u=a-ol(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Ul(e,t,r){var n=md(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+ps(i,t,r)):s>ps(e.year(),t,r)?(o=s-ps(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function ps(e,t,r){var n=md(e,t,r),s=md(e+1,t,r);return(ol(e)-n+s)/7}Re("w",["ww",2],"wo","week");Re("W",["WW",2],"Wo","isoWeek");we("w",kt,_a);we("ww",kt,Vr);we("W",kt,_a);we("WW",kt,Vr);xc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=tt(e)});function MI(e){return Ul(e,this._week.dow,this._week.doy).week}var II={dow:0,doy:6};function LI(){return this._week.dow}function FI(){return this._week.doy}function zI(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function UI(e){var t=Ul(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Re("d",0,"do","day");Re("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Re("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Re("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Re("e",0,0,"weekday");Re("E",0,0,"isoWeekday");we("d",kt);we("e",kt);we("E",kt);we("dd",function(e,t){return t.weekdaysMinRegex(e)});we("ddd",function(e,t){return t.weekdaysShortRegex(e)});we("dddd",function(e,t){return t.weekdaysRegex(e)});xc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ke(r).invalidWeekday=e});xc(["d","e","E"],function(e,t,r,n){t[n]=tt(e)});function VI(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function WI(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var $I="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),BI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),HI=yc,YI=yc,ZI=yc;function KI(e,t){var r=vn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hv(r,this._week.dow):e?r[e.day()]:r}function GI(e){return e===!0?hv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function qI(e){return e===!0?hv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function XI(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=Hn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,i),s!==-1||(s=zt.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,i),s!==-1||(s=zt.call(this._weekdaysParse,i),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,i),s!==-1||(s=zt.call(this._weekdaysParse,i),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function QI(e,t,r){var n,s,o;if(this._weekdaysParseExact)return XI.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Hn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function JI(e){if(!this.isValid())return e!=null?this:NaN;var t=Fl(this,"Day");return e!=null?(e=VI(e,this.localeData()),this.add(e-t,"d")):t}function eL(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function tL(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=WI(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function rL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||pv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(at(this,"_weekdaysRegex")||(this._weekdaysRegex=HI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function nL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||pv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(at(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=YI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||pv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(at(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ZI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function pv(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],s=[],o,i,a,l,u;for(o=0;o<7;o++)i=Hn([2e3,1]).day(o),a=hs(this.weekdaysMin(i,"")),l=hs(this.weekdaysShort(i,"")),u=hs(this.weekdays(i,"")),t.push(a),r.push(l),n.push(u),s.push(a),s.push(l),s.push(u);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function mv(){return this.hours()%12||12}function oL(){return this.hours()||24}Re("H",["HH",2],0,"hour");Re("h",["hh",2],0,mv);Re("k",["kk",2],0,oL);Re("hmm",0,0,function(){return""+mv.apply(this)+Vn(this.minutes(),2)});Re("hmmss",0,0,function(){return""+mv.apply(this)+Vn(this.minutes(),2)+Vn(this.seconds(),2)});Re("Hmm",0,0,function(){return""+this.hours()+Vn(this.minutes(),2)});Re("Hmmss",0,0,function(){return""+this.hours()+Vn(this.minutes(),2)+Vn(this.seconds(),2)});function US(e,t){Re(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}US("a",!0);US("A",!1);function VS(e,t){return t._meridiemParse}we("a",VS);we("A",VS);we("H",kt,dv);we("h",kt,_a);we("k",kt,_a);we("HH",kt,Vr);we("hh",kt,Vr);we("kk",kt,Vr);we("hmm",NS);we("hmmss",RS);we("Hmm",NS);we("Hmmss",RS);mt(["H","HH"],Gt);mt(["k","kk"],function(e,t,r){var n=tt(e);t[Gt]=n===24?0:n});mt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});mt(["h","hh"],function(e,t,r){t[Gt]=tt(e),Ke(r).bigHour=!0});mt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=tt(e.substr(0,n)),t[cn]=tt(e.substr(n)),Ke(r).bigHour=!0});mt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=tt(e.substr(0,n)),t[cn]=tt(e.substr(n,2)),t[us]=tt(e.substr(s)),Ke(r).bigHour=!0});mt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=tt(e.substr(0,n)),t[cn]=tt(e.substr(n))});mt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=tt(e.substr(0,n)),t[cn]=tt(e.substr(n,2)),t[us]=tt(e.substr(s))});function iL(e){return(e+"").toLowerCase().charAt(0)==="p"}var aL=/[ap]\.?m?\.?/i,lL=ba("Hours",!0);function cL(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var WS={calendar:XM,longDateFormat:tI,invalidDate:nI,ordinal:oI,dayOfMonthOrdinalParse:iI,relativeTime:lI,months:kI,monthsShort:AS,week:II,weekdays:$I,weekdaysMin:BI,weekdaysShort:zS,meridiemParse:aL},Tt={},Fa={},Vl;function uL(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function d0(e){return e&&e.toLowerCase().replace("_","-")}function dL(e){for(var t=0,r,n,s,o;t<e.length;){for(o=d0(e[t]).split("-"),r=o.length,n=d0(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=bf(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&uL(o,n)>=r-1)break;r--}t++}return Vl}function fL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function bf(e){var t=null,r;if(Tt[e]===void 0&&typeof Ou<"u"&&Ou&&Ou.exports&&fL(e))try{t=Vl._abbr,r=require,r("./locale/"+e),no(t)}catch{Tt[e]=null}return Tt[e]}function no(e,t){var r;return e&&(xr(t)?r=Ns(e):r=gv(e,t),r?Vl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Vl._abbr}function gv(e,t){if(t!==null){var r,n=WS;if(t.abbr=e,Tt[e]!=null)CS("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)n=Tt[t.parentLocale]._config;else if(r=bf(t.parentLocale),r!=null)n=r._config;else return Fa[t.parentLocale]||(Fa[t.parentLocale]=[]),Fa[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new iv(Hp(n,t)),Fa[e]&&Fa[e].forEach(function(s){gv(s.name,s.config)}),no(e),Tt[e]}else return delete Tt[e],null}function hL(e,t){if(t!=null){var r,n,s=WS;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Hp(Tt[e]._config,t)):(n=bf(e),n!=null&&(s=n._config),t=Hp(s,t),n==null&&(t.abbr=e),r=new iv(t),r.parentLocale=Tt[e],Tt[e]=r),no(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===no()&&no(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ns(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Vl;if(!vn(e)){if(t=bf(e),t)return t;e=[e]}return dL(e)}function pL(){return Yp(Tt)}function vv(e){var t,r=e._a;return r&&Ke(e).overflow===-2&&(t=r[cs]<0||r[cs]>11?cs:r[Dn]<1||r[Dn]>fv(r[ar],r[cs])?Dn:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[cn]!==0||r[us]!==0||r[Oo]!==0)?Gt:r[cn]<0||r[cn]>59?cn:r[us]<0||r[us]>59?us:r[Oo]<0||r[Oo]>999?Oo:-1,Ke(e)._overflowDayOfYear&&(t<ar||t>Dn)&&(t=Dn),Ke(e)._overflowWeeks&&t===-1&&(t=yI),Ke(e)._overflowWeekday&&t===-1&&(t=xI),Ke(e).overflow=t),e}var mL=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gL=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vL=/Z|[+-]\d\d(?::?\d\d)?/,ou=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Rh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yL=/^\/?Date\((-?\d+)/i,xL=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,wL={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function $S(e){var t,r,n=e._i,s=mL.exec(n)||gL.exec(n),o,i,a,l,u=ou.length,d=Rh.length;if(s){for(Ke(e).iso=!0,t=0,r=u;t<r;t++)if(ou[t][1].exec(s[1])){i=ou[t][0],o=ou[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=d;t<r;t++)if(Rh[t][1].exec(s[3])){a=(s[2]||" ")+Rh[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(vL.exec(s[4]))l="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(l||""),xv(e)}else e._isValid=!1}function _L(e,t,r,n,s,o){var i=[bL(e),AS.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function bL(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function SL(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kL(e,t,r){if(e){var n=zS.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Ke(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function CL(e,t,r){if(e)return wL[e];if(t)return 0;var n=parseInt(r,10),s=n%100,o=(n-s)/100;return o*60+s}function BS(e){var t=xL.exec(SL(e._i)),r;if(t){if(r=_L(t[4],t[3],t[2],t[5],t[6],t[7]),!kL(t[1],r,e))return;e._a=r,e._tzm=CL(t[8],t[9],t[10]),e._d=zl.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ke(e).rfc2822=!0}else e._isValid=!1}function EL(e){var t=yL.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if($S(e),e._isValid===!1)delete e._isValid;else return;if(BS(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ge.createFromInputFallback(e)}ge.createFromInputFallback=Jr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function vi(e,t,r){return e??t??r}function TL(e){var t=new Date(ge.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function yv(e){var t,r,n=[],s,o,i;if(!e._d){for(s=TL(e),e._w&&e._a[Dn]==null&&e._a[cs]==null&&jL(e),e._dayOfYear!=null&&(i=vi(e._a[ar],s[ar]),(e._dayOfYear>ol(i)||e._dayOfYear===0)&&(Ke(e)._overflowDayOfYear=!0),r=zl(i,0,e._dayOfYear),e._a[cs]=r.getUTCMonth(),e._a[Dn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Gt]===24&&e._a[cn]===0&&e._a[us]===0&&e._a[Oo]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?zl:OI).apply(null,n),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Ke(e).weekdayMismatch=!0)}}function jL(e){var t,r,n,s,o,i,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=vi(t.GG,e._a[ar],Ul(bt(),1,4).year),n=vi(t.W,1),s=vi(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Ul(bt(),o,i),r=vi(t.gg,e._a[ar],u.year),n=vi(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(l=!0)):s=o),n<1||n>ps(r,o,i)?Ke(e)._overflowWeeks=!0:l!=null?Ke(e)._overflowWeekday=!0:(a=FS(r,n,s,o,i),e._a[ar]=a.year,e._dayOfYear=a.dayOfYear)}ge.ISO_8601=function(){};ge.RFC_2822=function(){};function xv(e){if(e._f===ge.ISO_8601){$S(e);return}if(e._f===ge.RFC_2822){BS(e);return}e._a=[],Ke(e).empty=!0;var t=""+e._i,r,n,s,o,i,a=t.length,l=0,u,d;for(s=ES(e._f,e._locale).match(av)||[],d=s.length,r=0;r<d;r++)o=s[r],n=(t.match(mI(o,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&Ke(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Hi[o]?(n?Ke(e).empty=!1:Ke(e).unusedTokens.push(o),vI(o,n,e)):e._strict&&!n&&Ke(e).unusedTokens.push(o);Ke(e).charsLeftOver=a-l,t.length>0&&Ke(e).unusedInput.push(t),e._a[Gt]<=12&&Ke(e).bigHour===!0&&e._a[Gt]>0&&(Ke(e).bigHour=void 0),Ke(e).parsedDateParts=e._a.slice(0),Ke(e).meridiem=e._meridiem,e._a[Gt]=NL(e._locale,e._a[Gt],e._meridiem),u=Ke(e).era,u!==null&&(e._a[ar]=e._locale.erasConvertYear(u,e._a[ar])),yv(e),vv(e)}function NL(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function RL(e){var t,r,n,s,o,i,a=!1,l=e._f.length;if(l===0){Ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<l;s++)o=0,i=!1,t=ov({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],xv(t),sv(t)&&(i=!0),o+=Ke(t).charsLeftOver,o+=Ke(t).unusedTokens.length*10,Ke(t).score=o,a?o<n&&(n=o,r=t):(n==null||o<n||i)&&(n=o,r=t,i&&(a=!0));Ys(e,r||t)}function PL(e){if(!e._d){var t=lv(e._i),r=t.day===void 0?t.date:t.day;e._a=SS([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),yv(e)}}function DL(e){var t=new vc(vv(HS(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function HS(e){var t=e._i,r=e._f;return e._locale=e._locale||Ns(e._l),t===null||r===void 0&&t===""?mf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),yn(t)?new vc(vv(t)):(gc(t)?e._d=t:vn(r)?RL(e):r?xv(e):AL(e),sv(e)||(e._d=null),e))}function AL(e){var t=e._i;xr(t)?e._d=new Date(ge.now()):gc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?EL(e):vn(t)?(e._a=SS(t.slice(0),function(r){return parseInt(r,10)}),yv(e)):Fo(t)?PL(e):bs(t)?e._d=new Date(t):ge.createFromInputFallback(e)}function YS(e,t,r,n,s){var o={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Fo(e)&&nv(e)||vn(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=r,o._i=e,o._f=t,o._strict=n,DL(o)}function bt(e,t,r,n){return YS(e,t,r,n,!1)}var OL=Jr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:mf()}),ML=Jr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:mf()});function ZS(e,t){var r,n;if(t.length===1&&vn(t[0])&&(t=t[0]),!t.length)return bt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function IL(){var e=[].slice.call(arguments,0);return ZS("isBefore",e)}function LL(){var e=[].slice.call(arguments,0);return ZS("isAfter",e)}var FL=function(){return Date.now?Date.now():+new Date},za=["year","quarter","month","week","day","hour","minute","second","millisecond"];function zL(e){var t,r=!1,n,s=za.length;for(t in e)if(at(e,t)&&!(zt.call(za,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[za[n]]){if(r)return!1;parseFloat(e[za[n]])!==tt(e[za[n]])&&(r=!0)}return!0}function UL(){return this._isValid}function VL(){return bn(NaN)}function Sf(e){var t=lv(e),r=t.year||0,n=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=zL(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+n*3+r*12,this._data={},this._locale=Ns(),this._bubble()}function Eu(e){return e instanceof Sf}function Kp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function WL(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<n;i++)tt(e[i])!==tt(t[i])&&o++;return o+s}function KS(e,t){Re(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Vn(~~(r/60),2)+t+Vn(~~r%60,2)})}KS("Z",":");KS("ZZ","");we("Z",wf);we("ZZ",wf);mt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=wv(wf,e)});var $L=/([\+\-]|\d\d)/gi;function wv(e,t){var r=(t||"").match(e),n,s,o;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match($L)||["-",0,0],o=+(s[1]*60)+tt(s[2]),o===0?0:s[0]==="+"?o:-o)}function _v(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(yn(e)||gc(e)?e.valueOf():bt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ge.updateOffset(r,!1),r):bt(e).local()}function Gp(e){return-Math.round(e._d.getTimezoneOffset())}ge.updateOffset=function(){};function BL(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=wv(wf,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Gp(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?XS(this,bn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ge.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Gp(this)}function HL(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function YL(e){return this.utcOffset(0,e)}function ZL(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gp(this),"m")),this}function KL(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=wv(hI,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function GL(e){return this.isValid()?(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function qL(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function XL(){if(!xr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ov(e,this),e=HS(e),e._a?(t=e._isUTC?Hn(e._a):bt(e._a),this._isDSTShifted=this.isValid()&&WL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QL(){return this.isValid()?!this._isUTC:!1}function JL(){return this.isValid()?this._isUTC:!1}function GS(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function bn(e,t){var r=e,n=null,s,o,i;return Eu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:bs(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=e4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:tt(n[Dn])*s,h:tt(n[Gt])*s,m:tt(n[cn])*s,s:tt(n[us])*s,ms:tt(Kp(n[Oo]*1e3))*s}):(n=t4.exec(e))?(s=n[1]==="-"?-1:1,r={y:ko(n[2],s),M:ko(n[3],s),w:ko(n[4],s),d:ko(n[5],s),h:ko(n[6],s),m:ko(n[7],s),s:ko(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=r4(bt(r.from),bt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new Sf(r),Eu(e)&&at(e,"_locale")&&(o._locale=e._locale),Eu(e)&&at(e,"_isValid")&&(o._isValid=e._isValid),o}bn.fn=Sf.prototype;bn.invalid=VL;function ko(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function f0(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function r4(e,t){var r;return e.isValid()&&t.isValid()?(t=_v(t,e),e.isBefore(t)?r=f0(e,t):(r=f0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function qS(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(CS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),s=bn(r,n),XS(this,s,e),this}}function XS(e,t,r,n){var s=t._milliseconds,o=Kp(t._days),i=Kp(t._months);e.isValid()&&(n=n??!0,i&&MS(e,Fl(e,"Month")+i*r),o&&DS(e,"Date",Fl(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ge.updateOffset(e,o||i))}var n4=qS(1,"add"),s4=qS(-1,"subtract");function QS(e){return typeof e=="string"||e instanceof String}function o4(e){return yn(e)||gc(e)||QS(e)||bs(e)||a4(e)||i4(e)||e===null||e===void 0}function i4(e){var t=Fo(e)&&!nv(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=n.length;for(s=0;s<i;s+=1)o=n[s],r=r||at(e,o);return t&&r}function a4(e){var t=vn(e),r=!1;return t&&(r=e.filter(function(n){return!bs(n)&&QS(e)}).length===0),t&&r}function l4(e){var t=Fo(e)&&!nv(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<n.length;s+=1)o=n[s],r=r||at(e,o);return t&&r}function c4(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function u4(e,t){arguments.length===1&&(arguments[0]?o4(arguments[0])?(e=arguments[0],t=void 0):l4(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||bt(),n=_v(r,this).startOf("day"),s=ge.calendarFormat(this,n)||"sameElse",o=t&&(Yn(t[s])?t[s].call(this,r):t[s]);return this.format(o||this.localeData().calendar(s,this,bt(r)))}function d4(){return new vc(this)}function f4(e,t){var r=yn(e)?e:bt(e);return this.isValid()&&r.isValid()?(t=en(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function h4(e,t){var r=yn(e)?e:bt(e);return this.isValid()&&r.isValid()?(t=en(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function p4(e,t,r,n){var s=yn(e)?e:bt(e),o=yn(t)?t:bt(t);return this.isValid()&&s.isValid()&&o.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(o,r):!this.isAfter(o,r))):!1}function m4(e,t){var r=yn(e)?e:bt(e),n;return this.isValid()&&r.isValid()?(t=en(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function g4(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function v4(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function y4(e,t,r){var n,s,o;if(!this.isValid())return NaN;if(n=_v(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=en(t),t){case"year":o=Tu(this,n)/12;break;case"month":o=Tu(this,n);break;case"quarter":o=Tu(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-s)/864e5;break;case"week":o=(this-n-s)/6048e5;break;default:o=this-n}return r?o:Yr(o)}function Tu(e,t){if(e.date()<t.date())return-Tu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,o;return t-n<0?(s=e.clone().add(r-1,"months"),o=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),o=(t-n)/(s-n)),-(r+o)||0}ge.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ge.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function x4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function w4(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Cu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Yn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Cu(r,"Z")):Cu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function _4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(r+n+s+o)}function b4(e){e||(e=this.isUtc()?ge.defaultFormatUtc:ge.defaultFormat);var t=Cu(this,e);return this.localeData().postformat(t)}function S4(e,t){return this.isValid()&&(yn(e)&&e.isValid()||bt(e).isValid())?bn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function k4(e){return this.from(bt(),e)}function C4(e,t){return this.isValid()&&(yn(e)&&e.isValid()||bt(e).isValid())?bn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function E4(e){return this.to(bt(),e)}function JS(e){var t;return e===void 0?this._locale._abbr:(t=Ns(e),t!=null&&(this._locale=t),this)}var ek=Jr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function tk(){return this._locale}var gd=1e3,Yi=60*gd,vd=60*Yi,rk=(365*400+97)*24*vd;function Zi(e,t){return(e%t+t)%t}function nk(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-rk:new Date(e,t,r).valueOf()}function sk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-rk:Date.UTC(e,t,r)}function T4(e){var t,r;if(e=en(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?sk:nk,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zi(t+(this._isUTC?0:this.utcOffset()*Yi),vd);break;case"minute":t=this._d.valueOf(),t-=Zi(t,Yi);break;case"second":t=this._d.valueOf(),t-=Zi(t,gd);break}return this._d.setTime(t),ge.updateOffset(this,!0),this}function j4(e){var t,r;if(e=en(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?sk:nk,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=vd-Zi(t+(this._isUTC?0:this.utcOffset()*Yi),vd)-1;break;case"minute":t=this._d.valueOf(),t+=Yi-Zi(t,Yi)-1;break;case"second":t=this._d.valueOf(),t+=gd-Zi(t,gd)-1;break}return this._d.setTime(t),ge.updateOffset(this,!0),this}function N4(){return this._d.valueOf()-(this._offset||0)*6e4}function R4(){return Math.floor(this.valueOf()/1e3)}function P4(){return new Date(this.valueOf())}function D4(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function A4(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function O4(){return this.isValid()?this.toISOString():null}function M4(){return sv(this)}function I4(){return Ys({},Ke(this))}function L4(){return Ke(this).overflow}function F4(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Re("N",0,0,"eraAbbr");Re("NN",0,0,"eraAbbr");Re("NNN",0,0,"eraAbbr");Re("NNNN",0,0,"eraName");Re("NNNNN",0,0,"eraNarrow");Re("y",["y",1],"yo","eraYear");Re("y",["yy",2],0,"eraYear");Re("y",["yyy",3],0,"eraYear");Re("y",["yyyy",4],0,"eraYear");we("N",bv);we("NN",bv);we("NNN",bv);we("NNNN",G4);we("NNNNN",q4);mt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ke(r).era=s:Ke(r).invalidEra=e});we("y",wa);we("yy",wa);we("yyy",wa);we("yyyy",wa);we("yo",X4);mt(["y","yy","yyy","yyyy"],ar);mt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ar]=r._locale.eraYearOrdinalParse(e,s):t[ar]=parseInt(e,10)});function z4(e,t){var r,n,s,o=this._eras||Ns("en")._eras;for(r=0,n=o.length;r<n;++r){switch(typeof o[r].since){case"string":s=ge(o[r].since).startOf("day"),o[r].since=s.valueOf();break}switch(typeof o[r].until){case"undefined":o[r].until=1/0;break;case"string":s=ge(o[r].until).startOf("day").valueOf(),o[r].until=s.valueOf();break}}return o}function U4(e,t,r){var n,s,o=this.eras(),i,a,l;for(e=e.toUpperCase(),n=0,s=o.length;n<s;++n)if(i=o[n].name.toUpperCase(),a=o[n].abbr.toUpperCase(),l=o[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[n];break;case"NNNN":if(i===e)return o[n];break;case"NNNNN":if(l===e)return o[n];break}else if([i,a,l].indexOf(e)>=0)return o[n]}function V4(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ge(e.since).year():ge(e.since).year()+(t-e.offset)*r}function W4(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function $4(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function B4(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function H4(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-ge(s[e].since).year())*r+s[e].offset;return this.year()}function Y4(e){return at(this,"_erasNameRegex")||Sv.call(this),e?this._erasNameRegex:this._erasRegex}function Z4(e){return at(this,"_erasAbbrRegex")||Sv.call(this),e?this._erasAbbrRegex:this._erasRegex}function K4(e){return at(this,"_erasNarrowRegex")||Sv.call(this),e?this._erasNarrowRegex:this._erasRegex}function bv(e,t){return t.erasAbbrRegex(e)}function G4(e,t){return t.erasNameRegex(e)}function q4(e,t){return t.erasNarrowRegex(e)}function X4(e,t){return t._eraYearOrdinalRegex||wa}function Sv(){var e=[],t=[],r=[],n=[],s,o,i,a,l,u=this.eras();for(s=0,o=u.length;s<o;++s)i=hs(u[s].name),a=hs(u[s].abbr),l=hs(u[s].narrow),t.push(i),e.push(a),r.push(l),n.push(i),n.push(a),n.push(l);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Re(0,["gg",2],0,function(){return this.weekYear()%100});Re(0,["GG",2],0,function(){return this.isoWeekYear()%100});function kf(e,t){Re(0,[e,e.length],0,t)}kf("gggg","weekYear");kf("ggggg","weekYear");kf("GGGG","isoWeekYear");kf("GGGGG","isoWeekYear");we("G",xf);we("g",xf);we("GG",kt,Vr);we("gg",kt,Vr);we("GGGG",uv,cv);we("gggg",uv,cv);we("GGGGG",yf,gf);we("ggggg",yf,gf);xc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=tt(e)});xc(["gg","GG"],function(e,t,r,n){t[n]=ge.parseTwoDigitYear(e)});function Q4(e){return ok.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function J4(e){return ok.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function eF(){return ps(this.year(),1,4)}function tF(){return ps(this.isoWeekYear(),1,4)}function rF(){var e=this.localeData()._week;return ps(this.year(),e.dow,e.doy)}function nF(){var e=this.localeData()._week;return ps(this.weekYear(),e.dow,e.doy)}function ok(e,t,r,n,s){var o;return e==null?Ul(this,n,s).year:(o=ps(e,n,s),t>o&&(t=o),sF.call(this,e,t,r,n,s))}function sF(e,t,r,n,s){var o=FS(e,t,r,n,s),i=zl(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Re("Q",0,"Qo","quarter");we("Q",TS);mt("Q",function(e,t){t[cs]=(tt(e)-1)*3});function oF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Re("D",["DD",2],"Do","date");we("D",kt,_a);we("DD",kt,Vr);we("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});mt(["D","DD"],Dn);mt("Do",function(e,t){t[Dn]=tt(e.match(kt)[0])});var ik=ba("Date",!0);Re("DDD",["DDDD",3],"DDDo","dayOfYear");we("DDD",vf);we("DDDD",jS);mt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=tt(e)});function iF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Re("m",["mm",2],0,"minute");we("m",kt,dv);we("mm",kt,Vr);mt(["m","mm"],cn);var aF=ba("Minutes",!1);Re("s",["ss",2],0,"second");we("s",kt,dv);we("ss",kt,Vr);mt(["s","ss"],us);var lF=ba("Seconds",!1);Re("S",0,0,function(){return~~(this.millisecond()/100)});Re(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Re(0,["SSS",3],0,"millisecond");Re(0,["SSSS",4],0,function(){return this.millisecond()*10});Re(0,["SSSSS",5],0,function(){return this.millisecond()*100});Re(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Re(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Re(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Re(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});we("S",vf,TS);we("SS",vf,Vr);we("SSS",vf,jS);var Zs,ak;for(Zs="SSSS";Zs.length<=9;Zs+="S")we(Zs,wa);function cF(e,t){t[Oo]=tt(("0."+e)*1e3)}for(Zs="S";Zs.length<=9;Zs+="S")mt(Zs,cF);ak=ba("Milliseconds",!1);Re("z",0,0,"zoneAbbr");Re("zz",0,0,"zoneName");function uF(){return this._isUTC?"UTC":""}function dF(){return this._isUTC?"Coordinated Universal Time":""}var ae=vc.prototype;ae.add=n4;ae.calendar=u4;ae.clone=d4;ae.diff=y4;ae.endOf=j4;ae.format=b4;ae.from=S4;ae.fromNow=k4;ae.to=C4;ae.toNow=E4;ae.get=_I;ae.invalidAt=L4;ae.isAfter=f4;ae.isBefore=h4;ae.isBetween=p4;ae.isSame=m4;ae.isSameOrAfter=g4;ae.isSameOrBefore=v4;ae.isValid=M4;ae.lang=ek;ae.locale=JS;ae.localeData=tk;ae.max=ML;ae.min=OL;ae.parsingFlags=I4;ae.set=bI;ae.startOf=T4;ae.subtract=s4;ae.toArray=D4;ae.toObject=A4;ae.toDate=P4;ae.toISOString=w4;ae.inspect=_4;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=O4;ae.toString=x4;ae.unix=R4;ae.valueOf=N4;ae.creationData=F4;ae.eraName=W4;ae.eraNarrow=$4;ae.eraAbbr=B4;ae.eraYear=H4;ae.year=PS;ae.isLeapYear=wI;ae.weekYear=Q4;ae.isoWeekYear=J4;ae.quarter=ae.quarters=oF;ae.month=IS;ae.daysInMonth=PI;ae.week=ae.weeks=zI;ae.isoWeek=ae.isoWeeks=UI;ae.weeksInYear=rF;ae.weeksInWeekYear=nF;ae.isoWeeksInYear=eF;ae.isoWeeksInISOWeekYear=tF;ae.date=ik;ae.day=ae.days=JI;ae.weekday=eL;ae.isoWeekday=tL;ae.dayOfYear=iF;ae.hour=ae.hours=lL;ae.minute=ae.minutes=aF;ae.second=ae.seconds=lF;ae.millisecond=ae.milliseconds=ak;ae.utcOffset=BL;ae.utc=YL;ae.local=ZL;ae.parseZone=KL;ae.hasAlignedHourOffset=GL;ae.isDST=qL;ae.isLocal=QL;ae.isUtcOffset=JL;ae.isUtc=GS;ae.isUTC=GS;ae.zoneAbbr=uF;ae.zoneName=dF;ae.dates=Jr("dates accessor is deprecated. Use date instead.",ik);ae.months=Jr("months accessor is deprecated. Use month instead",IS);ae.years=Jr("years accessor is deprecated. Use year instead",PS);ae.zone=Jr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",HL);ae.isDSTShifted=Jr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",XL);function fF(e){return bt(e*1e3)}function hF(){return bt.apply(null,arguments).parseZone()}function lk(e){return e}var lt=iv.prototype;lt.calendar=QM;lt.longDateFormat=rI;lt.invalidDate=sI;lt.ordinal=aI;lt.preparse=lk;lt.postformat=lk;lt.relativeTime=cI;lt.pastFuture=uI;lt.set=qM;lt.eras=z4;lt.erasParse=U4;lt.erasConvertYear=V4;lt.erasAbbrRegex=Z4;lt.erasNameRegex=Y4;lt.erasNarrowRegex=K4;lt.months=TI;lt.monthsShort=jI;lt.monthsParse=RI;lt.monthsRegex=AI;lt.monthsShortRegex=DI;lt.week=MI;lt.firstDayOfYear=FI;lt.firstDayOfWeek=LI;lt.weekdays=KI;lt.weekdaysMin=qI;lt.weekdaysShort=GI;lt.weekdaysParse=QI;lt.weekdaysRegex=rL;lt.weekdaysShortRegex=nL;lt.weekdaysMinRegex=sL;lt.isPM=iL;lt.meridiem=cL;function yd(e,t,r,n){var s=Ns(),o=Hn().set(n,t);return s[r](o,e)}function ck(e,t,r){if(bs(e)&&(t=e,e=void 0),e=e||"",t!=null)return yd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=yd(e,n,r,"month");return s}function kv(e,t,r,n){typeof e=="boolean"?(bs(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,bs(t)&&(r=t,t=void 0),t=t||"");var s=Ns(),o=e?s._week.dow:0,i,a=[];if(r!=null)return yd(t,(r+o)%7,n,"day");for(i=0;i<7;i++)a[i]=yd(t,(i+o)%7,n,"day");return a}function pF(e,t){return ck(e,t,"months")}function mF(e,t){return ck(e,t,"monthsShort")}function gF(e,t,r){return kv(e,t,r,"weekdays")}function vF(e,t,r){return kv(e,t,r,"weekdaysShort")}function yF(e,t,r){return kv(e,t,r,"weekdaysMin")}no("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=tt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ge.lang=Jr("moment.lang is deprecated. Use moment.locale instead.",no);ge.langData=Jr("moment.langData is deprecated. Use moment.localeData instead.",Ns);var es=Math.abs;function xF(){var e=this._data;return this._milliseconds=es(this._milliseconds),this._days=es(this._days),this._months=es(this._months),e.milliseconds=es(e.milliseconds),e.seconds=es(e.seconds),e.minutes=es(e.minutes),e.hours=es(e.hours),e.months=es(e.months),e.years=es(e.years),this}function uk(e,t,r,n){var s=bn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function wF(e,t){return uk(this,e,t,1)}function _F(e,t){return uk(this,e,t,-1)}function h0(e){return e<0?Math.floor(e):Math.ceil(e)}function bF(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=h0(qp(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Yr(e/1e3),n.seconds=s%60,o=Yr(s/60),n.minutes=o%60,i=Yr(o/60),n.hours=i%24,t+=Yr(i/24),l=Yr(dk(t)),r+=l,t-=h0(qp(l)),a=Yr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function dk(e){return e*4800/146097}function qp(e){return e*146097/4800}function SF(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=en(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+dk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(qp(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Rs(e){return function(){return this.as(e)}}var fk=Rs("ms"),kF=Rs("s"),CF=Rs("m"),EF=Rs("h"),TF=Rs("d"),jF=Rs("w"),NF=Rs("M"),RF=Rs("Q"),PF=Rs("y"),DF=fk;function AF(){return bn(this)}function OF(e){return e=en(e),this.isValid()?this[e+"s"]():NaN}function si(e){return function(){return this.isValid()?this._data[e]:NaN}}var MF=si("milliseconds"),IF=si("seconds"),LF=si("minutes"),FF=si("hours"),zF=si("days"),UF=si("months"),VF=si("years");function WF(){return Yr(this.days()/7)}var ss=Math.round,Di={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $F(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function BF(e,t,r,n){var s=bn(e).abs(),o=ss(s.as("s")),i=ss(s.as("m")),a=ss(s.as("h")),l=ss(s.as("d")),u=ss(s.as("M")),d=ss(s.as("w")),f=ss(s.as("y")),m=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||i<=1&&["m"]||i<r.m&&["mm",i]||a<=1&&["h"]||a<r.h&&["hh",a]||l<=1&&["d"]||l<r.d&&["dd",l];return r.w!=null&&(m=m||d<=1&&["w"]||d<r.w&&["ww",d]),m=m||u<=1&&["M"]||u<r.M&&["MM",u]||f<=1&&["y"]||["yy",f],m[2]=t,m[3]=+e>0,m[4]=n,$F.apply(null,m)}function HF(e){return e===void 0?ss:typeof e=="function"?(ss=e,!0):!1}function YF(e,t){return Di[e]===void 0?!1:t===void 0?Di[e]:(Di[e]=t,e==="s"&&(Di.ss=t-1),!0)}function ZF(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Di,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Di,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=BF(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Ph=Math.abs;function mi(e){return(e>0)-(e<0)||+e}function Cf(){if(!this.isValid())return this.localeData().invalidDate();var e=Ph(this._milliseconds)/1e3,t=Ph(this._days),r=Ph(this._months),n,s,o,i,a=this.asSeconds(),l,u,d,f;return a?(n=Yr(e/60),s=Yr(n/60),e%=60,n%=60,o=Yr(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=mi(this._months)!==mi(a)?"-":"",d=mi(this._days)!==mi(a)?"-":"",f=mi(this._milliseconds)!==mi(a)?"-":"",l+"P"+(o?u+o+"Y":"")+(r?u+r+"M":"")+(t?d+t+"D":"")+(s||n||e?"T":"")+(s?f+s+"H":"")+(n?f+n+"M":"")+(e?f+i+"S":"")):"P0D"}var st=Sf.prototype;st.isValid=UL;st.abs=xF;st.add=wF;st.subtract=_F;st.as=SF;st.asMilliseconds=fk;st.asSeconds=kF;st.asMinutes=CF;st.asHours=EF;st.asDays=TF;st.asWeeks=jF;st.asMonths=NF;st.asQuarters=RF;st.asYears=PF;st.valueOf=DF;st._bubble=bF;st.clone=AF;st.get=OF;st.milliseconds=MF;st.seconds=IF;st.minutes=LF;st.hours=FF;st.days=zF;st.weeks=WF;st.months=UF;st.years=VF;st.humanize=ZF;st.toISOString=Cf;st.toString=Cf;st.toJSON=Cf;st.locale=JS;st.localeData=tk;st.toIsoString=Jr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cf);st.lang=ek;Re("X",0,0,"unix");Re("x",0,0,"valueOf");we("x",xf);we("X",pI);mt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});mt("x",function(e,t,r){r._d=new Date(tt(e))});//! moment.js
ge.version="2.30.1";KM(bt);ge.fn=ae;ge.min=IL;ge.max=LL;ge.now=FL;ge.utc=Hn;ge.unix=fF;ge.months=pF;ge.isDate=gc;ge.locale=no;ge.invalid=mf;ge.duration=bn;ge.isMoment=yn;ge.weekdays=gF;ge.parseZone=hF;ge.localeData=Ns;ge.isDuration=Eu;ge.monthsShort=mF;ge.weekdaysMin=yF;ge.defineLocale=gv;ge.updateLocale=hL;ge.locales=pL;ge.weekdaysShort=vF;ge.normalizeUnits=en;ge.relativeTimeRounding=HF;ge.relativeTimeThreshold=YF;ge.calendarFormat=c4;ge.prototype=ae;ge.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const KF=async()=>await Nt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),xo=async e=>e.id?await Nt().collection("access").update(e.id,e):await Nt().collection("access").create(e),GF=async e=>(e.deleted=ge.utc().format("YYYY-MM-DD HH:mm:ss"),await Nt().collection("access").update(e.id,e)),qF=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(r=>r.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(r=>r.id===t.payload.id?t.payload:r)};default:return e}},hk=y.createContext({}),Zn=()=>y.useContext(hk),XF=({children:e})=>{const[t,r]=y.useReducer(qF,{accesses:[]});y.useEffect(()=>{(async()=>{const a=await KF();r({type:"SET_ACCESSES",payload:a})})()},[]);const n=y.useCallback(i=>{r({type:"DELETE_ACCESS",payload:i})},[]),s=y.useCallback(i=>{r({type:"ADD_ACCESS",payload:i})},[]),o=y.useCallback(i=>{r({type:"UPDATE_ACCESS",payload:i})},[]);return c.jsx(hk.Provider,{value:{config:{accesses:t.accesses},deleteAccess:n,addAccess:s,updateAccess:o},children:e&&e})},QF={theme:"system",setTheme:()=>null},pk=y.createContext(QF);function JF({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,o]=y.useState(()=>localStorage.getItem(r)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(r,a),o(a)}};return c.jsx(pk.Provider,{...n,value:i,children:e})}const e3=()=>{const e=y.useContext(pk);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function t3(){const{setTheme:e}=e3();return c.jsxs(qb,{children:[c.jsx(Xb,{asChild:!0,children:c.jsxs(ct,{variant:"outline",size:"icon",children:[c.jsx(YR,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(BR,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(Bg,{align:"end",children:[c.jsx($i,{onClick:()=>e("light"),children:"浅色"}),c.jsx($i,{onClick:()=>e("dark"),children:"暗黑"}),c.jsx($i,{onClick:()=>e("system"),children:"系统"})]})]})}var r3="Separator",p0="horizontal",n3=["horizontal","vertical"],mk=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=p0,...s}=e,o=s3(n)?n:p0,a=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return c.jsx(Ve.div,{"data-orientation":o,...a,...s,ref:t})});mk.displayName=r3;function s3(e){return n3.includes(e)}var gk=mk;const Yt=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>c.jsx(gk,{ref:s,decorative:r,orientation:t,className:me("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Yt.displayName=gk.displayName;function o3(){const e=wn(),t=Bn();if(!Nt().authStore.isValid||!Nt().authStore.isAdmin)return c.jsx(a1,{to:"/login"});const r=t.pathname,n=i=>(console.log(r),i==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{Nt().authStore.clear(),e("/login")},o=()=>{e("/setting/password")};return c.jsx(c.Fragment,{children:c.jsx(XF,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:c.jsxs(dr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(dr,{to:"/",className:me("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[c.jsx(Rx,{className:"h-4 w-4"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:me("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[c.jsx(Mp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:me("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[c.jsx(Dx,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:me("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[c.jsx(Nx,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(Qg,{children:[c.jsx(Jg,{asChild:!0,children:c.jsxs(ct,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx($R,{className:"h-5 w-5 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(pf,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(dr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(dr,{to:"/",className:me("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[c.jsx(Rx,{className:"h-5 w-5"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:me("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[c.jsx(Mp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:me("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/dns_provider")),children:[c.jsx(Dx,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:me("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[c.jsx(Nx,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsx(t3,{}),c.jsxs(qb,{children:[c.jsx(Xb,{asChild:!0,children:c.jsxs(ct,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(FR,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(Bg,{align:"end",children:[c.jsx(Qb,{children:"账户"}),c.jsx(Jb,{}),c.jsx($i,{onClick:o,children:"设置"}),c.jsx($i,{onClick:s,children:"退出"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(mg,{}),c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[c.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[c.jsx(OR,{size:16}),c.jsx("div",{className:"ml-1",children:"文档"})]}),c.jsx(Yt,{orientation:"vertical",className:"mx-2"}),c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.1.4"})]})]})]})]})]})})})}const Cv=({phase:e,phaseSuccess:t})=>{let r=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},vk=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:me("mx-auto flex w-full justify-center",e),...t});vk.displayName="Pagination";const yk=y.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,className:me("flex flex-row items-center gap-1",e),...t}));yk.displayName="PaginationContent";const Xp=y.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,className:me("",e),...t}));Xp.displayName="PaginationItem";const xk=({className:e,isActive:t,size:r="icon",...n})=>c.jsx("a",{"aria-current":t?"page":void 0,className:me(tf({variant:t?"outline":"ghost",size:r}),e),...n});xk.displayName="PaginationLink";const wk=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:me("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(UR,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});wk.displayName="PaginationEllipsis";const _k=({totalPages:e,currentPage:t,onPageChange:r})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),m=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<m-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(a,l,u=1)=>{let d=a;const f=[];for(;d<=l;)f.push(d),d+=u;return f},i=s();return c.jsx(c.Fragment,{children:c.jsx(vk,{className:"dark:text-stone-200 justify-end mt-3",children:c.jsx(yk,{children:i.map((a,l)=>a==="..."?c.jsx(Xp,{children:c.jsx(wk,{})},l):c.jsx(Xp,{children:c.jsx(xk,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},l))})})})},m0=({when:e,children:t,fallback:r})=>e?t:r;var bk="AlertDialog",[i3,v8]=Qr(bk,[tS]),Ps=tS(),Sk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ps(t);return c.jsx(Gg,{...n,...r,modal:!0})};Sk.displayName=bk;var a3="AlertDialogTrigger",kk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ps(r);return c.jsx(qg,{...s,...n,ref:t})});kk.displayName=a3;var l3="AlertDialogPortal",Ck=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ps(t);return c.jsx(Xg,{...n,...r})};Ck.displayName=l3;var c3="AlertDialogOverlay",Ek=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ps(r);return c.jsx(fc,{...s,...n,ref:t})});Ek.displayName=c3;var Ki="AlertDialogContent",[u3,d3]=i3(Ki),Tk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Ps(r),i=y.useRef(null),a=Xe(t,i),l=y.useRef(null);return c.jsx(SM,{contentName:Ki,titleName:jk,docsSlug:"alert-dialog",children:c.jsx(u3,{scope:r,cancelRef:l,children:c.jsxs(hc,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(xg,{children:n}),c.jsx(h3,{contentRef:i})]})})})});Tk.displayName=Ki;var jk="AlertDialogTitle",Nk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ps(r);return c.jsx(pc,{...s,...n,ref:t})});Nk.displayName=jk;var Rk="AlertDialogDescription",Pk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ps(r);return c.jsx(mc,{...s,...n,ref:t})});Pk.displayName=Rk;var f3="AlertDialogAction",Dk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ps(r);return c.jsx(hf,{...s,...n,ref:t})});Dk.displayName=f3;var Ak="AlertDialogCancel",Ok=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=d3(Ak,r),o=Ps(r),i=Xe(t,s);return c.jsx(hf,{...o,...n,ref:i})});Ok.displayName=Ak;var h3=({contentRef:e})=>{const t=`\`${Ki}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Ki}\` by passing a \`${Rk}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ki}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},p3=Sk,m3=kk,g3=Ck,Mk=Ek,Ik=Tk,Lk=Dk,Fk=Ok,zk=Nk,Uk=Pk;const v3=p3,y3=m3,x3=g3,Vk=y.forwardRef(({className:e,...t},r)=>c.jsx(Mk,{className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Vk.displayName=Mk.displayName;const Wk=y.forwardRef(({className:e,...t},r)=>c.jsxs(x3,{children:[c.jsx(Vk,{}),c.jsx(Ik,{ref:r,className:me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Wk.displayName=Ik.displayName;const $k=({className:e,...t})=>c.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",e),...t});$k.displayName="AlertDialogHeader";const Bk=({className:e,...t})=>c.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bk.displayName="AlertDialogFooter";const Hk=y.forwardRef(({className:e,...t},r)=>c.jsx(zk,{ref:r,className:me("text-lg font-semibold",e),...t}));Hk.displayName=zk.displayName;const Yk=y.forwardRef(({className:e,...t},r)=>c.jsx(Uk,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));Yk.displayName=Uk.displayName;const Zk=y.forwardRef(({className:e,...t},r)=>c.jsx(Lk,{ref:r,className:me(tf(),e),...t}));Zk.displayName=Lk.displayName;const Kk=y.forwardRef(({className:e,...t},r)=>c.jsx(Fk,{ref:r,className:me(tf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Kk.displayName=Fk.displayName;function Gk(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ev="Switch",[w3,y8]=Qr(Ev),[_3,b3]=w3(Ev),qk=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[f,m]=y.useState(null),h=Xe(t,p=>m(p)),x=y.useRef(!1),g=f?!!f.closest("form"):!0,[w=!1,v]=io({prop:s,defaultProp:o,onChange:u});return c.jsxs(_3,{scope:r,checked:w,disabled:a,children:[c.jsx(Ve.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":Jk(w),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:h,onClick:ue(e.onClick,p=>{v(_=>!_),g&&(x.current=p.isPropagationStopped(),x.current||p.stopPropagation())})}),g&&c.jsx(S3,{control:f,bubbles:!x.current,name:n,value:l,checked:w,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});qk.displayName=Ev;var Xk="SwitchThumb",Qk=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=b3(Xk,r);return c.jsx(Ve.span,{"data-state":Jk(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Qk.displayName=Xk;var S3=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=y.useRef(null),i=Gk(r),a=A1(t);return y.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==r&&f){const m=new Event("click",{bubbles:n});f.call(l,r),l.dispatchEvent(m)}},[i,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Jk(e){return e?"checked":"unchecked"}var eC=qk,k3=Qk;const tC=y.forwardRef(({className:e,...t},r)=>c.jsx(eC,{className:me("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:c.jsx(k3,{className:me("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));tC.displayName=eC.displayName;var C3="VisuallyHidden",wc=y.forwardRef((e,t)=>c.jsx(Ve.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wc.displayName=C3;var E3=wc,Tv="ToastProvider",[jv,T3,j3]=rf("Toast"),[rC,x8]=Qr("Toast",[j3]),[N3,Ef]=rC(Tv),nC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),m=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tv}\`. Expected non-empty \`string\`.`),c.jsx(jv.Provider,{scope:t,children:c.jsx(N3,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>d(h=>h+1),[]),onToastRemove:y.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:i})})};nC.displayName=Tv;var sC="ToastViewport",R3=["F8"],Qp="toast.viewportPause",Jp="toast.viewportResume",oC=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=R3,label:s="Notifications ({hotkey})",...o}=e,i=Ef(sC,r),a=T3(r),l=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),m=Xe(t,f,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;y.useEffect(()=>{const w=v=>{var _;n.every(C=>v[C]||v.code===C)&&((_=f.current)==null||_.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),y.useEffect(()=>{const w=l.current,v=f.current;if(x&&w&&v){const p=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Qp);v.dispatchEvent(T),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Jp);v.dispatchEvent(T),i.isClosePausedRef.current=!1}},C=T=>{!w.contains(T.relatedTarget)&&_()},E=()=>{w.contains(document.activeElement)||_()};return w.addEventListener("focusin",p),w.addEventListener("focusout",C),w.addEventListener("pointermove",p),w.addEventListener("pointerleave",E),window.addEventListener("blur",p),window.addEventListener("focus",_),()=>{w.removeEventListener("focusin",p),w.removeEventListener("focusout",C),w.removeEventListener("pointermove",p),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",p),window.removeEventListener("focus",_)}}},[x,i.isClosePausedRef]);const g=y.useCallback(({tabbingDirection:w})=>{const p=a().map(_=>{const C=_.ref.current,E=[C,...$3(C)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?p.reverse():p).flat()},[a]);return y.useEffect(()=>{const w=f.current;if(w){const v=p=>{var E,T,R;const _=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!_){const D=document.activeElement,P=p.shiftKey;if(p.target===w&&P){(E=u.current)==null||E.focus();return}const j=g({tabbingDirection:P?"backwards":"forwards"}),F=j.findIndex(b=>b===D);Dh(j.slice(F+1))?p.preventDefault():P?(T=u.current)==null||T.focus():(R=d.current)==null||R.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,g]),c.jsxs(BP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&c.jsx(em,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Dh(w)}}),c.jsx(jv.Slot,{scope:r,children:c.jsx(Ve.ol,{tabIndex:-1,...o,ref:m})}),x&&c.jsx(em,{ref:d,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Dh(w)}})]})});oC.displayName=sC;var iC="ToastFocusProxy",em=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Ef(iC,r);return c.jsx(wc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&n()}})});em.displayName=iC;var Tf="Toast",P3="toast.swipeStart",D3="toast.swipeMove",A3="toast.swipeCancel",O3="toast.swipeEnd",aC=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=io({prop:n,defaultProp:s,onChange:o});return c.jsx(Er,{present:r||a,children:c.jsx(L3,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:At(e.onPause),onResume:At(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});aC.displayName=Tf;var[M3,I3]=rC(Tf,{onClose(){}}),L3=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:h,...x}=e,g=Ef(Tf,r),[w,v]=y.useState(null),p=Xe(t,b=>v(b)),_=y.useRef(null),C=y.useRef(null),E=s||g.duration,T=y.useRef(0),R=y.useRef(E),D=y.useRef(0),{onToastAdd:P,onToastRemove:L}=g,q=At(()=>{var W;(w==null?void 0:w.contains(document.activeElement))&&((W=g.viewport)==null||W.focus()),i()}),j=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(D.current),T.current=new Date().getTime(),D.current=window.setTimeout(q,b))},[q]);y.useEffect(()=>{const b=g.viewport;if(b){const W=()=>{j(R.current),u==null||u()},te=()=>{const $=new Date().getTime()-T.current;R.current=R.current-$,window.clearTimeout(D.current),l==null||l()};return b.addEventListener(Qp,te),b.addEventListener(Jp,W),()=>{b.removeEventListener(Qp,te),b.removeEventListener(Jp,W)}}},[g.viewport,E,l,u,j]),y.useEffect(()=>{o&&!g.isClosePausedRef.current&&j(E)},[o,E,g.isClosePausedRef,j]),y.useEffect(()=>(P(),()=>L()),[P,L]);const F=y.useMemo(()=>w?pC(w):null,[w]);return g.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(F3,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(M3,{scope:r,onClose:q,children:Cs.createPortal(c.jsx(jv.ItemSlot,{scope:r,children:c.jsx($P,{asChild:!0,onEscapeKeyDown:ue(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||q(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Ve.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ue(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:ue(e.onPointerMove,b=>{if(!_.current)return;const W=b.clientX-_.current.x,te=b.clientY-_.current.y,$=!!C.current,Z=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Q=Z?I(0,W):0,z=Z?0:I(0,te),V=b.pointerType==="touch"?10:2,de={x:Q,y:z},ne={originalEvent:b,delta:de};$?(C.current=de,iu(D3,f,ne,{discrete:!1})):g0(de,g.swipeDirection,V)?(C.current=de,iu(P3,d,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs(W)>V||Math.abs(te)>V)&&(_.current=null)}),onPointerUp:ue(e.onPointerUp,b=>{const W=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,_.current=null,W){const $=b.currentTarget,Z={originalEvent:b,delta:W};g0(W,g.swipeDirection,g.swipeThreshold)?iu(O3,h,Z,{discrete:!0}):iu(A3,m,Z,{discrete:!0}),$.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),F3=e=>{const{__scopeToast:t,children:r,...n}=e,s=Ef(Tf,t),[o,i]=y.useState(!1),[a,l]=y.useState(!1);return V3(()=>i(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(cc,{asChild:!0,children:c.jsx(wc,{...n,children:o&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},z3="ToastTitle",lC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});lC.displayName=z3;var U3="ToastDescription",cC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Ve.div,{...n,ref:t})});cC.displayName=U3;var uC="ToastAction",dC=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(hC,{altText:r,asChild:!0,children:c.jsx(Nv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${uC}\`. Expected non-empty \`string\`.`),null)});dC.displayName=uC;var fC="ToastClose",Nv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=I3(fC,r);return c.jsx(hC,{asChild:!0,children:c.jsx(Ve.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,s.onClose)})})});Nv.displayName=fC;var hC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function pC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),W3(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...pC(n))}}),t}function iu(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?_g(s,o):s.dispatchEvent(o)}var g0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function V3(e=()=>{}){const t=At(e);nr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function W3(e){return e.nodeType===e.ELEMENT_NODE}function $3(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Dh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var B3=nC,mC=oC,gC=aC,vC=lC,yC=cC,xC=dC,wC=Nv;const H3=B3,_C=y.forwardRef(({className:e,...t},r)=>c.jsx(mC,{ref:r,className:me("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));_C.displayName=mC.displayName;const Y3=ac("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),bC=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(gC,{ref:n,className:me(Y3({variant:t}),e),...r}));bC.displayName=gC.displayName;const Z3=y.forwardRef(({className:e,...t},r)=>c.jsx(xC,{ref:r,className:me("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Z3.displayName=xC.displayName;const SC=y.forwardRef(({className:e,...t},r)=>c.jsx(wC,{ref:r,className:me("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(yg,{className:"h-4 w-4"})}));SC.displayName=wC.displayName;const kC=y.forwardRef(({className:e,...t},r)=>c.jsx(vC,{ref:r,className:me("text-sm font-semibold",e),...t}));kC.displayName=vC.displayName;const CC=y.forwardRef(({className:e,...t},r)=>c.jsx(yC,{ref:r,className:me("text-sm opacity-90",e),...t}));CC.displayName=yC.displayName;const K3=1,G3=1e6;let Ah=0;function q3(){return Ah=(Ah+1)%Number.MAX_SAFE_INTEGER,Ah.toString()}const Oh=new Map,v0=e=>{if(Oh.has(e))return;const t=setTimeout(()=>{Oh.delete(e),il({type:"REMOVE_TOAST",toastId:e})},G3);Oh.set(e,t)},X3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,K3)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?v0(r):e.toasts.forEach(n=>{v0(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},ju=[];let Nu={toasts:[]};function il(e){Nu=X3(Nu,e),ju.forEach(t=>{t(Nu)})}function Q3({...e}){const t=q3(),r=s=>il({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>il({type:"DISMISS_TOAST",toastId:t});return il({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function jf(){const[e,t]=y.useState(Nu);return y.useEffect(()=>(ju.push(t),()=>{const r=ju.indexOf(t);r>-1&&ju.splice(r,1)}),[e]),{...e,toast:Q3,dismiss:r=>il({type:"DISMISS_TOAST",toastId:r})}}function Rv(){const{toasts:e}=jf();return c.jsxs(H3,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return c.jsxs(bC,{...o,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(kC,{children:r}),n&&c.jsx(CC,{children:n})]}),s,c.jsx(SC,{})]},t)}),c.jsx(_C,{})]})}var[Nf,w8]=Qr("Tooltip",[xa]),Rf=xa(),EC="TooltipProvider",J3=700,tm="tooltip.open",[e5,Pv]=Nf(EC),TC=e=>{const{__scopeTooltip:t,delayDuration:r=J3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=y.useState(!0),l=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(e5,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};TC.displayName=EC;var Pf="Tooltip",[t5,Df]=Nf(Pf),jC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=Pv(Pf,e.__scopeTooltip),u=Rf(t),[d,f]=y.useState(null),m=Fn(),h=y.useRef(0),x=i??l.disableHoverableContent,g=a??l.delayDuration,w=y.useRef(!1),[v=!1,p]=io({prop:n,defaultProp:s,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(tm))):l.onClose(),o==null||o(R)}}),_=y.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),C=y.useCallback(()=>{window.clearTimeout(h.current),w.current=!1,p(!0)},[p]),E=y.useCallback(()=>{window.clearTimeout(h.current),p(!1)},[p]),T=y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return y.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.jsx(Pg,{...u,children:c.jsx(t5,{scope:t,contentId:m,open:v,stateAttribute:_,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?T():C()},[l.isOpenDelayed,T,C]),onTriggerLeave:y.useCallback(()=>{x?E():window.clearTimeout(h.current)},[E,x]),onOpen:C,onClose:E,disableHoverableContent:x,children:r})})};jC.displayName=Pf;var rm="TooltipTrigger",NC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Df(rm,r),o=Pv(rm,r),i=Rf(r),a=y.useRef(null),l=Xe(t,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(Dg,{asChild:!0,...i,children:c.jsx(Ve.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ue(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});NC.displayName=rm;var r5="TooltipPortal",[_8,n5]=Nf(r5,{forceMount:void 0}),sa="TooltipContent",Dv=y.forwardRef((e,t)=>{const r=n5(sa,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Df(sa,e.__scopeTooltip);return c.jsx(Er,{present:n||i.open,children:i.disableHoverableContent?c.jsx(RC,{side:s,...o,ref:t}):c.jsx(s5,{side:s,...o,ref:t})})}),s5=y.forwardRef((e,t)=>{const r=Df(sa,e.__scopeTooltip),n=Pv(sa,e.__scopeTooltip),s=y.useRef(null),o=Xe(t,s),[i,a]=y.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,m=y.useCallback(()=>{a(null),f(!1)},[f]),h=y.useCallback((x,g)=>{const w=x.currentTarget,v={x:x.clientX,y:x.clientY},p=l5(v,w.getBoundingClientRect()),_=c5(v,p),C=u5(g.getBoundingClientRect()),E=f5([..._,...C]);a(E),f(!0)},[f]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&d){const x=w=>h(w,d),g=w=>h(w,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[l,d,h,m]),y.useEffect(()=>{if(i){const x=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},p=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),_=!d5(v,i);p?m():_&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,u,m]),c.jsx(RC,{...e,ref:o})}),[o5,i5]=Nf(Pf,{isInside:!1}),RC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Df(sa,r),u=Rf(r),{onClose:d}=l;return y.useEffect(()=>(document.addEventListener(tm,d),()=>document.removeEventListener(tm,d)),[d]),y.useEffect(()=>{if(l.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(ga,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(Ag,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(xg,{children:n}),c.jsx(o5,{scope:r,isInside:!0,children:c.jsx(E3,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Dv.displayName=sa;var PC="TooltipArrow",a5=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Rf(r);return i5(PC,r).isInside?null:c.jsx(Og,{...s,...n,ref:t})});a5.displayName=PC;function l5(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function c5(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function u5(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function d5(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,u=t[i].x,d=t[i].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function f5(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),h5(t)}function h5(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var p5=jC,m5=NC,DC=Dv;const g5=p5,v5=m5,y5=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(DC,{ref:n,sideOffset:t,className:me("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));y5.displayName=DC.displayName;function au(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var AC={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function i(u,d){if(!s[u]){if(!n[u]){var f=typeof au=="function"&&au;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var h=s[u]={exports:{}};n[u][0].call(h.exports,function(x){var g=n[u][1][x];return i(g||x)},h,h.exports,r,n,s,o)}return s[u].exports}for(var a=typeof au=="function"&&au,l=0;l<o.length;l++)i(o[l]);return i}({1:[function(r,n,s){var o=r("./utils"),i=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(l){for(var u,d,f,m,h,x,g,w=[],v=0,p=l.length,_=p,C=o.getTypeOf(l)!=="string";v<l.length;)_=p-v,f=C?(u=l[v++],d=v<p?l[v++]:0,v<p?l[v++]:0):(u=l.charCodeAt(v++),d=v<p?l.charCodeAt(v++):0,v<p?l.charCodeAt(v++):0),m=u>>2,h=(3&u)<<4|d>>4,x=1<_?(15&d)<<2|f>>6:64,g=2<_?63&f:64,w.push(a.charAt(m)+a.charAt(h)+a.charAt(x)+a.charAt(g));return w.join("")},s.decode=function(l){var u,d,f,m,h,x,g=0,w=0,v="data:";if(l.substr(0,v.length)===v)throw new Error("Invalid base64 input, it looks like a data url.");var p,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=i.uint8array?new Uint8Array(0|_):new Array(0|_);g<l.length;)u=a.indexOf(l.charAt(g++))<<2|(m=a.indexOf(l.charAt(g++)))>>4,d=(15&m)<<4|(h=a.indexOf(l.charAt(g++)))>>2,f=(3&h)<<6|(x=a.indexOf(l.charAt(g++))),p[w++]=u,h!==64&&(p[w++]=d),x!==64&&(p[w++]=f);return p}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function u(d,f,m,h,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=h,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,m){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var o=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var o=r("./utils"),i=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,m){var h=i,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^h[255&(u^d[g])];return-1^u}(0|l,a,a.length,0):function(u,d,f,m){var h=i,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^h[255&(u^d.charCodeAt(g))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,m){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function o(h,x){var g,w="";for(g=0;g<x;g++)w+=String.fromCharCode(255&h),h>>>=8;return w}function i(h,x,g,w,v,p){var _,C,E=h.file,T=h.compression,R=p!==u.utf8encode,D=a.transformTo("string",p(E.name)),P=a.transformTo("string",u.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",p(L)),j=a.transformTo("string",u.utf8encode(L)),F=P.length!==E.name.length,b=j.length!==L.length,W="",te="",$="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};x&&!g||(Q.crc32=h.crc32,Q.compressedSize=h.compressedSize,Q.uncompressedSize=h.uncompressedSize);var z=0;x&&(z|=8),R||!F&&!b||(z|=2048);var V=0,de=0;Z&&(V|=16),v==="UNIX"?(de=798,V|=function(se,je){var fe=se;return se||(fe=je?16893:33204),(65535&fe)<<16}(E.unixPermissions,Z)):(de=20,V|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=o(1,1)+o(d(D),4)+P,W+="up"+o(te.length,2)+te),b&&($=o(1,1)+o(d(q),4)+j,W+="uc"+o($.length,2)+$);var ne="";return ne+=`
\0`,ne+=o(z,2),ne+=T.magic,ne+=o(_,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(D.length,2),ne+=o(W.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ne+D+W,dirRecord:f.CENTRAL_FILE_HEADER+o(de,2)+ne+o(q.length,2)+"\0\0\0\0"+o(V,4)+o(w,4)+D+W+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(h,x,g,w){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=w,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(h){var x=h.meta.percent||0,g=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,l.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-w-1))/g:100}}))},m.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var x=this.streamFiles&&!h.file.dir;if(x){var g=i(h,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(h){this.accumulate=!1;var x=this.streamFiles&&!h.file.dir,g=i(h,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var h=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var g=this.bytesWritten-h,w=function(v,p,_,C,E){var T=a.transformTo("string",E(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(v,2)+o(v,2)+o(p,4)+o(_,4)+o(T.length,2)+T}(this.dirRecords.length,g,h,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(h){this._sources.push(h);var x=this;return h.on("data",function(g){x.processChunk(g)}),h.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),h.on("error",function(g){x.error(g)}),this},m.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(h){var x=this._sources;if(!l.prototype.error.call(this,h))return!1;for(var g=0;g<x.length;g++)try{x[g].error(h)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var h=this._sources,x=0;x<h.length;x++)h[x].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,s){var o=r("../compressions"),i=r("./ZipFileWorker");s.generateWorker=function(a,l,u){var d=new i(l.streamFiles,u,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,h){f++;var x=function(p,_){var C=p||_,E=o[C];if(!E)throw new Error(C+" is not a valid compression method !");return E}(h.options.compression,l.compression),g=h.options.compressionOptions||l.compressionOptions||{},w=h.dir,v=h.date;h._compressWorker(x,g).withStreamInfo("file",{name:m,dir:w,date:v,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(o.prototype=r("./object")).loadAsync=r("./load"),o.support=r("./support"),o.defaults=r("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=r("./external"),n.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var o=r("./utils"),i=r("./external"),a=r("./utf8"),l=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new i.Promise(function(h,x){var g=m.decompressed.getContentWorker().pipe(new u);g.on("error",function(w){x(w)}).on("end",function(){g.streamInfo.crc32!==m.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}n.exports=function(m,h){var x=this;return h=o.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",m,!0,h.optimizedBinaryString,h.base64).then(function(g){var w=new l(h);return w.load(g),w}).then(function(g){var w=[i.Promise.resolve(g)],v=g.files;if(h.checkCRC32)for(var p=0;p<v.length;p++)w.push(f(v[p]));return i.Promise.all(w)}).then(function(g){for(var w=g.shift(),v=w.files,p=0;p<v.length;p++){var _=v[p],C=_.fileNameStr,E=o.resolve(_.fileNameStr);x.file(E,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:h.createFolders}),_.dir||(x.file(E).unsafeOriginalName=C)}return w.zipComment.length&&(x.comment=w.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,s){var o=r("../utils"),i=r("../stream/GenericWorker");function a(l,u){i.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(l){var u=this;(this._stream=l).pause(),l.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,s){var o=r("readable-stream").Readable;function i(a,l,u){o.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),u&&u(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},n.exports=i},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(r,n,s){function o(E,T,R){var D,P=a.getTypeOf(T),L=a.extend(R||{},d);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(E=v(E)),L.createFolders&&(D=w(E))&&p.call(this,D,!0);var q=P==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!q),(T instanceof f&&T.uncompressedSize===0||L.dir||!T||T.length===0)&&(L.base64=!1,L.binary=!0,T="",L.compression="STORE",P="string");var j=null;j=T instanceof f||T instanceof l?T:x.isNode&&x.isStream(T)?new g(E,T):a.prepareContent(E,T,L.binary,L.optimizedBinaryString,L.base64);var F=new m(E,j,L);this.files[E]=F}var i=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),h=r("./generate"),x=r("./nodejsUtils"),g=r("./nodejs/NodejsStreamInputAdapter"),w=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var T=E.lastIndexOf("/");return 0<T?E.substring(0,T):""},v=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},p=function(E,T){return T=T!==void 0?T:d.createFolders,E=v(E),this.files[E]||o.call(this,E,null,{dir:!0,createFolders:T}),this.files[E]};function _(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var T,R,D;for(T in this.files)D=this.files[T],(R=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&E(R,D)},filter:function(E){var T=[];return this.forEach(function(R,D){E(R,D)&&T.push(D)}),T},file:function(E,T,R){if(arguments.length!==1)return E=this.root+E,o.call(this,E,T,R),this;if(_(E)){var D=E;return this.filter(function(L,q){return!q.dir&&D.test(L)})}var P=this.files[this.root+E];return P&&!P.dir?P:null},folder:function(E){if(!E)return this;if(_(E))return this.filter(function(P,L){return L.dir&&E.test(P)});var T=this.root+E,R=p.call(this,T),D=this.clone();return D.root=R.name,D},remove:function(E){E=this.root+E;var T=this.files[E];if(T||(E.slice(-1)!=="/"&&(E+="/"),T=this.files[E]),T&&!T.dir)delete this.files[E];else for(var R=this.filter(function(P,L){return L.name.slice(0,E.length)===E}),D=0;D<R.length;D++)delete this.files[R[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var T,R={};try{if((R=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=R.type.toLowerCase(),R.compression=R.compression.toUpperCase(),R.type==="binarystring"&&(R.type="string"),!R.type)throw new Error("No output type specified.");a.checkSupport(R.type),R.platform!=="darwin"&&R.platform!=="freebsd"&&R.platform!=="linux"&&R.platform!=="sunos"||(R.platform="UNIX"),R.platform==="win32"&&(R.platform="DOS");var D=R.comment||this.comment||"";T=h.generateWorker(this,R,D)}catch(P){(T=new l("error")).error(P)}return new u(T,R.type||"string",R.mimeType)},generateAsync:function(E,T){return this.generateInternalStream(E).accumulate(T)},generateNodeStream:function(E,T){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(T)}};n.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,s){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&u===m[1]&&d===m[2]&&f===m[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var o=r("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,u=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=o.getTypeOf(f);return o.checkSupport(m),m!=="string"||i.uint8array?m==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}i.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:i.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=i(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,i),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}i.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var l=0;l<this._listeners[i].length;l++)this._listeners[i][l].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(l){a.processChunk(l)}),i.on("end",function(){a.end()}),i.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),u=r("../support"),d=r("../external"),f=null;if(u.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(x,g){return new d.Promise(function(w,v){var p=[],_=x._internalType,C=x._outputType,E=x._mimeType;x.on("data",function(T,R){p.push(T),g&&g(R)}).on("error",function(T){p=[],v(T)}).on("end",function(){try{var T=function(R,D,P){switch(R){case"blob":return o.newBlob(o.transformTo("arraybuffer",D),P);case"base64":return l.encode(D);default:return o.transformTo(R,D)}}(C,function(R,D){var P,L=0,q=null,j=0;for(P=0;P<D.length;P++)j+=D[P].length;switch(R){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(q=new Uint8Array(j),P=0;P<D.length;P++)q.set(D[P],L),L+=D[P].length;return q;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+R+"'")}}(_,p),E);w(T)}catch(R){v(R)}p=[]}).resume()})}function h(x,g,w){var v=g;switch(g){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=g,this._mimeType=w,o.checkSupport(v),this._worker=x.pipe(new i(v)),x.lock()}catch(p){this._worker=new a("error"),this._worker.error(p)}}h.prototype={accumulate:function(x){return m(this,x)},on:function(x,g){var w=this;return x==="data"?this._worker.on(x,function(v){g.call(w,v.data,v.meta)}):this._worker.on(x,function(){o.delay(g,arguments,w)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},n.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}s.utf8encode=function(h){return i.nodebuffer?a.newBufferFrom(h,"utf-8"):function(x){var g,w,v,p,_,C=x.length,E=0;for(p=0;p<C;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<C&&(64512&(v=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(v-56320),p++),E+=w<128?1:w<2048?2:w<65536?3:4;for(g=i.uint8array?new Uint8Array(E):new Array(E),p=_=0;_<E;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<C&&(64512&(v=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(v-56320),p++),w<128?g[_++]=w:(w<2048?g[_++]=192|w>>>6:(w<65536?g[_++]=224|w>>>12:(g[_++]=240|w>>>18,g[_++]=128|w>>>12&63),g[_++]=128|w>>>6&63),g[_++]=128|63&w);return g}(h)},s.utf8decode=function(h){return i.nodebuffer?o.transformTo("nodebuffer",h).toString("utf-8"):function(x){var g,w,v,p,_=x.length,C=new Array(2*_);for(g=w=0;g<_;)if((v=x[g++])<128)C[w++]=v;else if(4<(p=u[v]))C[w++]=65533,g+=p-1;else{for(v&=p===2?31:p===3?15:7;1<p&&g<_;)v=v<<6|63&x[g++],p--;1<p?C[w++]=65533:v<65536?C[w++]=v:(v-=65536,C[w++]=55296|v>>10&1023,C[w++]=56320|1023&v)}return C.length!==w&&(C.subarray?C=C.subarray(0,w):C.length=w),o.applyFromCharCode(C)}(h=o.transformTo(i.uint8array?"uint8array":"array",h))},o.inherits(f,l),f.prototype.processChunk=function(h){var x=o.transformTo(i.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var g=x;(x=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),x.set(g,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(p,_){var C;for((_=_||p.length)>p.length&&(_=p.length),C=_-1;0<=C&&(192&p[C])==128;)C--;return C<0||C===0?_:C+u[p[C]]>_?C:_}(x),v=x;w!==x.length&&(i.uint8array?(v=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(v=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(v),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(m,l),m.prototype.processChunk=function(h){this.push({data:s.utf8encode(h.data),meta:h.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function u(g){return g}function d(g,w){for(var v=0;v<g.length;++v)w[v]=255&g.charCodeAt(v);return w}r("setimmediate"),s.newBlob=function(g,w){s.checkSupport("blob");try{return new Blob([g],{type:w})}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(g),v.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,w,v){var p=[],_=0,C=g.length;if(C<=v)return String.fromCharCode.apply(null,g);for(;_<C;)w==="array"||w==="nodebuffer"?p.push(String.fromCharCode.apply(null,g.slice(_,Math.min(_+v,C)))):p.push(String.fromCharCode.apply(null,g.subarray(_,Math.min(_+v,C)))),_+=v;return p.join("")},stringifyByChar:function(g){for(var w="",v=0;v<g.length;v++)w+=String.fromCharCode(g[v]);return w},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function m(g){var w=65536,v=s.getTypeOf(g),p=!0;if(v==="uint8array"?p=f.applyCanBeUsed.uint8array:v==="nodebuffer"&&(p=f.applyCanBeUsed.nodebuffer),p)for(;1<w;)try{return f.stringifyByChunk(g,v,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(g)}function h(g,w){for(var v=0;v<g.length;v++)w[v]=g[v];return w}s.applyFromCharCode=m;var x={};x.string={string:u,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return x.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,a.allocBuffer(g.length))}},x.array={string:m,array:u,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(g)}},x.arraybuffer={string:function(g){return m(new Uint8Array(g))},array:function(g){return h(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:u,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(new Uint8Array(g))}},x.uint8array={string:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return a.newBufferFrom(g)}},x.nodebuffer={string:m,array:function(g){return h(g,new Array(g.length))},arraybuffer:function(g){return x.nodebuffer.uint8array(g).buffer},uint8array:function(g){return h(g,new Uint8Array(g.length))},nodebuffer:u},s.transformTo=function(g,w){if(w=w||"",!g)return w;s.checkSupport(g);var v=s.getTypeOf(w);return x[v][g](w)},s.resolve=function(g){for(var w=g.split("/"),v=[],p=0;p<w.length;p++){var _=w[p];_==="."||_===""&&p!==0&&p!==w.length-1||(_===".."?v.pop():v.push(_))}return v.join("/")},s.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(g)?"nodebuffer":o.uint8array&&g instanceof Uint8Array?"uint8array":o.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(g){if(!o[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(g){var w,v,p="";for(v=0;v<(g||"").length;v++)p+="\\x"+((w=g.charCodeAt(v))<16?"0":"")+w.toString(16).toUpperCase();return p},s.delay=function(g,w,v){setImmediate(function(){g.apply(v||null,w||[])})},s.inherits=function(g,w){function v(){}v.prototype=w.prototype,g.prototype=new v},s.extend=function(){var g,w,v={};for(g=0;g<arguments.length;g++)for(w in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],w)&&v[w]===void 0&&(v[w]=arguments[g][w]);return v},s.prepareContent=function(g,w,v,p,_){return l.Promise.resolve(w).then(function(C){return o.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,T){var R=new FileReader;R.onload=function(D){E(D.target.result)},R.onerror=function(D){T(D.target.error)},R.readAsArrayBuffer(C)}):C}).then(function(C){var E=s.getTypeOf(C);return E?(E==="arraybuffer"?C=s.transformTo("uint8array",C):E==="string"&&(_?C=i.decode(C):v&&p!==!0&&(C=function(T){return d(T,o.uint8array?new Uint8Array(T.length):new Array(T.length))}(C))),C):l.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),a=r("./signature"),l=r("./zipEntry"),u=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(m)+", expected "+i.pretty(f)+")")}},isSignature:function(f,m){var h=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===m;return this.reader.setIndex(h),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),m=u.uint8array?"uint8array":"array",h=i.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,m,h,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),m=this.reader.readInt(4),h=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var x=m-h;if(0<x)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),u=r("./utf8"),d=r("./compressions"),f=r("./support");function m(h,x){this.options=h,this.loadOptions=x}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var x,g;if(h.skip(22),this.fileNameLength=h.readInt(2),g=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(g),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(w){for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)&&d[v].magic===w)return d[v];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,x,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var x=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(x),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var x,g,w,v=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<v;)x=h.readInt(2),g=h.readInt(2),w=h.readData(g),this.extraFields[x]={id:x,length:g,value:w};h.setIndex(v)},handleUTF8:function(){var h=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var g=i.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var v=i.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var x=o(h.value);return x.readInt(1)!==1||l(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var x=o(h.value);return x.readInt(1)!==1||l(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(h.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,s){function o(x,g,w){this.name=x,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=g,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");o.prototype={internalStream:function(x){var g=null,w="string";try{if(!x)throw new Error("No output type specified.");var v=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),g=this._decompressWorker();var p=!this._dataBinary;p&&!v&&(g=g.pipe(new l.Utf8EncodeWorker)),!p&&v&&(g=g.pipe(new l.Utf8DecodeWorker))}catch(_){(g=new d("error")).error(_)}return new i(g,w,"")},async:function(x,g){return this.internalStream(x).accumulate(g)},nodeStream:function(x,g){return this.internalStream(x||"nodebuffer").toNodejsStream(g)},_compressWorker:function(x,g){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new l.Utf8EncodeWorker)),u.createWorkerFrom(w,x,g)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)o.prototype[f[h]]=m;n.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(o){var i,a,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var u=0,d=new l(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var g=o.document.createElement("script");g.onreadystatechange=function(){x(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},o.document.documentElement.appendChild(g)}:function(){setTimeout(x,0)};else{var m=new o.MessageChannel;m.port1.onmessage=x,i=function(){m.port2.postMessage(0)}}var h=[];function x(){var g,w;a=!0;for(var v=h.length;v;){for(w=h,h=[],g=-1;++g<v;)w[g]();v=h.length}a=!1}n.exports=function(g){h.push(g)!==1||a||i()}}).call(this,typeof Pc<"u"?Pc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var o=r("immediate");function i(){}var a={},l=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,v!==i&&g(this,v)}function m(v,p,_){this.promise=v,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function h(v,p,_){o(function(){var C;try{C=p(_)}catch(E){return a.reject(v,E)}C===v?a.reject(v,new TypeError("Cannot resolve promise with itself")):a.resolve(v,C)})}function x(v){var p=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof p=="function")return function(){p.apply(v,arguments)}}function g(v,p){var _=!1;function C(R){_||(_=!0,a.reject(v,R))}function E(R){_||(_=!0,a.resolve(v,R))}var T=w(function(){p(E,C)});T.status==="error"&&C(T.value)}function w(v,p){var _={};try{_.value=v(p),_.status="success"}catch(C){_.status="error",_.value=C}return _}(n.exports=f).prototype.finally=function(v){if(typeof v!="function")return this;var p=this.constructor;return this.then(function(_){return p.resolve(v()).then(function(){return _})},function(_){return p.resolve(v()).then(function(){throw _})})},f.prototype.catch=function(v){return this.then(null,v)},f.prototype.then=function(v,p){if(typeof v!="function"&&this.state===u||typeof p!="function"&&this.state===l)return this;var _=new this.constructor(i);return this.state!==d?h(_,this.state===u?v:p,this.outcome):this.queue.push(new m(_,v,p)),_},m.prototype.callFulfilled=function(v){a.resolve(this.promise,v)},m.prototype.otherCallFulfilled=function(v){h(this.promise,this.onFulfilled,v)},m.prototype.callRejected=function(v){a.reject(this.promise,v)},m.prototype.otherCallRejected=function(v){h(this.promise,this.onRejected,v)},a.resolve=function(v,p){var _=w(x,p);if(_.status==="error")return a.reject(v,_.value);var C=_.value;if(C)g(v,C);else{v.state=u,v.outcome=p;for(var E=-1,T=v.queue.length;++E<T;)v.queue[E].callFulfilled(p)}return v},a.reject=function(v,p){v.state=l,v.outcome=p;for(var _=-1,C=v.queue.length;++_<C;)v.queue[_].callRejected(p);return v},f.resolve=function(v){return v instanceof this?v:a.resolve(new this(i),v)},f.reject=function(v){var p=new this(i);return a.reject(p,v)},f.all=function(v){var p=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=v.length,C=!1;if(!_)return this.resolve([]);for(var E=new Array(_),T=0,R=-1,D=new this(i);++R<_;)P(v[R],R);return D;function P(L,q){p.resolve(L).then(function(j){E[q]=j,++T!==_||C||(C=!0,a.resolve(D,E))},function(j){C||(C=!0,a.reject(D,j))})}},f.race=function(v){var p=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=v.length,C=!1;if(!_)return this.resolve([]);for(var E=-1,T=new this(i);++E<_;)R=v[E],p.resolve(R).then(function(D){C||(C=!0,a.resolve(T,D))},function(D){C||(C=!0,a.reject(T,D))});var R;return T}},{immediate:36}],38:[function(r,n,s){var o={};(0,r("./lib/utils/common").assign)(o,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var o=r("./zlib/deflate"),i=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,h=0,x=8;function g(v){if(!(this instanceof g))return new g(v);this.options=i.assign({level:m,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},v||{});var p=this.options;p.raw&&0<p.windowBits?p.windowBits=-p.windowBits:p.gzip&&0<p.windowBits&&p.windowBits<16&&(p.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var _=o.deflateInit2(this.strm,p.level,p.method,p.windowBits,p.memLevel,p.strategy);if(_!==f)throw new Error(l[_]);if(p.header&&o.deflateSetHeader(this.strm,p.header),p.dictionary){var C;if(C=typeof p.dictionary=="string"?a.string2buf(p.dictionary):d.call(p.dictionary)==="[object ArrayBuffer]"?new Uint8Array(p.dictionary):p.dictionary,(_=o.deflateSetDictionary(this.strm,C))!==f)throw new Error(l[_]);this._dict_set=!0}}function w(v,p){var _=new g(p);if(_.push(v,!0),_.err)throw _.msg||l[_.err];return _.result}g.prototype.push=function(v,p){var _,C,E=this.strm,T=this.options.chunkSize;if(this.ended)return!1;C=p===~~p?p:p===!0?4:0,typeof v=="string"?E.input=a.string2buf(v):d.call(v)==="[object ArrayBuffer]"?E.input=new Uint8Array(v):E.input=v,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new i.Buf8(T),E.next_out=0,E.avail_out=T),(_=o.deflate(E,C))!==1&&_!==f)return this.onEnd(_),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(E.output,E.next_out))):this.onData(i.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&_!==1);return C===4?(_=o.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===f):C!==2||(this.onEnd(f),!(E.avail_out=0))},g.prototype.onData=function(v){this.chunks.push(v)},g.prototype.onEnd=function(v){v===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},s.Deflate=g,s.deflate=w,s.deflateRaw=function(v,p){return(p=p||{}).raw=!0,w(v,p)},s.gzip=function(v,p){return(p=p||{}).gzip=!0,w(v,p)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,s){var o=r("./zlib/inflate"),i=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function h(g){if(!(this instanceof h))return new h(g);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},g||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||g&&g.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&!(15&w.windowBits)&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var v=o.inflateInit2(this.strm,w.windowBits);if(v!==l.Z_OK)throw new Error(u[v]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(g,w){var v=new h(w);if(v.push(g,!0),v.err)throw v.msg||u[v.err];return v.result}h.prototype.push=function(g,w){var v,p,_,C,E,T,R=this.strm,D=this.options.chunkSize,P=this.options.dictionary,L=!1;if(this.ended)return!1;p=w===~~w?w:w===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof g=="string"?R.input=a.binstring2buf(g):m.call(g)==="[object ArrayBuffer]"?R.input=new Uint8Array(g):R.input=g,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new i.Buf8(D),R.next_out=0,R.avail_out=D),(v=o.inflate(R,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&P&&(T=typeof P=="string"?a.string2buf(P):m.call(P)==="[object ArrayBuffer]"?new Uint8Array(P):P,v=o.inflateSetDictionary(this.strm,T)),v===l.Z_BUF_ERROR&&L===!0&&(v=l.Z_OK,L=!1),v!==l.Z_STREAM_END&&v!==l.Z_OK)return this.onEnd(v),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&v!==l.Z_STREAM_END&&(R.avail_in!==0||p!==l.Z_FINISH&&p!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=a.utf8border(R.output,R.next_out),C=R.next_out-_,E=a.buf2string(R.output,_),R.next_out=C,R.avail_out=D-C,C&&i.arraySet(R.output,R.output,_,C,0),this.onData(E)):this.onData(i.shrinkBuf(R.output,R.next_out)))),R.avail_in===0&&R.avail_out===0&&(L=!0)}while((0<R.avail_in||R.avail_out===0)&&v!==l.Z_STREAM_END);return v===l.Z_STREAM_END&&(p=l.Z_FINISH),p===l.Z_FINISH?(v=o.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===l.Z_OK):p!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(R.avail_out=0))},h.prototype.onData=function(g){this.chunks.push(g)},h.prototype.onEnd=function(g){g===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Inflate=h,s.inflate=x,s.inflateRaw=function(g,w){return(w=w||{}).raw=!0,x(g,w)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(l){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},s.shrinkBuf=function(l,u){return l.length===u?l:l.subarray?l.subarray(0,u):(l.length=u,l)};var i={arraySet:function(l,u,d,f,m){if(u.subarray&&l.subarray)l.set(u.subarray(d,d+f),m);else for(var h=0;h<f;h++)l[m+h]=u[d+h]},flattenChunks:function(l){var u,d,f,m,h,x;for(u=f=0,d=l.length;u<d;u++)f+=l[u].length;for(x=new Uint8Array(f),u=m=0,d=l.length;u<d;u++)h=l[u],x.set(h,m),m+=h.length;return x}},a={arraySet:function(l,u,d,f,m){for(var h=0;h<f;h++)l[m+h]=u[d+h]},flattenChunks:function(l){return[].concat.apply([],l)}};s.setTyped=function(l){l?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(r,n,s){var o=r("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new o.Buf8(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,m));for(var h="",x=0;x<m;x++)h+=String.fromCharCode(f[x]);return h}l[254]=l[254]=1,s.string2buf=function(f){var m,h,x,g,w,v=f.length,p=0;for(g=0;g<v;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<v&&(64512&(x=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(x-56320),g++),p+=h<128?1:h<2048?2:h<65536?3:4;for(m=new o.Buf8(p),g=w=0;w<p;g++)(64512&(h=f.charCodeAt(g)))==55296&&g+1<v&&(64512&(x=f.charCodeAt(g+1)))==56320&&(h=65536+(h-55296<<10)+(x-56320),g++),h<128?m[w++]=h:(h<2048?m[w++]=192|h>>>6:(h<65536?m[w++]=224|h>>>12:(m[w++]=240|h>>>18,m[w++]=128|h>>>12&63),m[w++]=128|h>>>6&63),m[w++]=128|63&h);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new o.Buf8(f.length),h=0,x=m.length;h<x;h++)m[h]=f.charCodeAt(h);return m},s.buf2string=function(f,m){var h,x,g,w,v=m||f.length,p=new Array(2*v);for(h=x=0;h<v;)if((g=f[h++])<128)p[x++]=g;else if(4<(w=l[g]))p[x++]=65533,h+=w-1;else{for(g&=w===2?31:w===3?15:7;1<w&&h<v;)g=g<<6|63&f[h++],w--;1<w?p[x++]=65533:g<65536?p[x++]=g:(g-=65536,p[x++]=55296|g>>10&1023,p[x++]=56320|1023&g)}return d(p,x)},s.utf8border=function(f,m){var h;for((m=m||f.length)>f.length&&(m=f.length),h=m-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?m:h+l[f[h]]>m?h:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,l){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+i[l++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(r,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,s){var o=function(){for(var i,a=[],l=0;l<256;l++){i=l;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[l]=i}return a}();n.exports=function(i,a,l,u){var d=o,f=u+l;i^=-1;for(var m=u;m<f;m++)i=i>>>8^d[255&(i^a[m])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),a=r("./trees"),l=r("./adler32"),u=r("./crc32"),d=r("./messages"),f=0,m=4,h=0,x=-2,g=-1,w=4,v=2,p=8,_=9,C=286,E=30,T=19,R=2*C+1,D=15,P=3,L=258,q=L+P+1,j=42,F=113,b=1,W=2,te=3,$=4;function Z(k,J){return k.msg=d[J],J}function I(k){return(k<<1)-(4<k?9:0)}function Q(k){for(var J=k.length;0<=--J;)k[J]=0}function z(k){var J=k.state,K=J.pending;K>k.avail_out&&(K=k.avail_out),K!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,K,k.next_out),k.next_out+=K,J.pending_out+=K,k.total_out+=K,k.avail_out-=K,J.pending-=K,J.pending===0&&(J.pending_out=0))}function V(k,J){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,J),k.block_start=k.strstart,z(k.strm)}function de(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var K,A,S=k.max_chain_length,N=k.strstart,O=k.prev_length,Y=k.nice_match,M=k.strstart>k.w_size-q?k.strstart-(k.w_size-q):0,H=k.window,X=k.w_mask,ee=k.prev,he=k.strstart+L,Be=H[N+O-1],Fe=H[N+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(K=J)+O]===Fe&&H[K+O-1]===Be&&H[K]===H[N]&&H[++K]===H[N+1]){N+=2,K++;do;while(H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&N<he);if(A=L-(he-N),N=he-L,O<A){if(k.match_start=J,Y<=(O=A))break;Be=H[N+O-1],Fe=H[N+O]}}while((J=ee[J&X])>M&&--S!=0);return O<=k.lookahead?O:k.lookahead}function je(k){var J,K,A,S,N,O,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=K=k.hash_size;A=k.head[--J],k.head[J]=ee<=A?A-ee:0,--K;);for(J=K=ee;A=k.prev[--J],k.prev[J]=ee<=A?A-ee:0,--K;);S+=ee}if(k.strm.avail_in===0)break;if(O=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=O.avail_in,H<X&&(X=H),K=X===0?0:(O.avail_in-=X,i.arraySet(Y,O.input,O.next_in,X,M),O.state.wrap===1?O.adler=l(O.adler,Y,X,M):O.state.wrap===2&&(O.adler=u(O.adler,Y,X,M)),O.next_in+=X,O.total_in+=X,X),k.lookahead+=K,k.lookahead+k.insert>=P)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+P-1])&k.hash_mask,k.prev[N&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=N,N++,k.insert--,!(k.lookahead+k.insert<P)););}while(k.lookahead<q&&k.strm.avail_in!==0)}function fe(k,J){for(var K,A;;){if(k.lookahead<q){if(je(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=P&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+P-1])&k.hash_mask,K=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),K!==0&&k.strstart-K<=k.w_size-q&&(k.match_length=se(k,K)),k.match_length>=P)if(A=a._tr_tally(k,k.strstart-k.match_start,k.match_length-P),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=P){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+P-1])&k.hash_mask,K=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else A=a._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(A&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=k.strstart<P-1?k.strstart:P-1,J===m?(V(k,!0),k.strm.avail_out===0?te:$):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:W}function ve(k,J){for(var K,A,S;;){if(k.lookahead<q){if(je(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=P&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+P-1])&k.hash_mask,K=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=P-1,K!==0&&k.prev_length<k.max_lazy_match&&k.strstart-K<=k.w_size-q&&(k.match_length=se(k,K),k.match_length<=5&&(k.strategy===1||k.match_length===P&&4096<k.strstart-k.match_start)&&(k.match_length=P-1)),k.prev_length>=P&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-P,A=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-P),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=S&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+P-1])&k.hash_mask,K=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=P-1,k.strstart++,A&&(V(k,!1),k.strm.avail_out===0))return b}else if(k.match_available){if((A=a._tr_tally(k,0,k.window[k.strstart-1]))&&V(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return b}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(A=a._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<P-1?k.strstart:P-1,J===m?(V(k,!0),k.strm.avail_out===0?te:$):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:W}function Se(k,J,K,A,S){this.good_length=k,this.max_lazy=J,this.nice_length=K,this.max_chain=A,this.func=S}function Ie(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*R),this.dyn_dtree=new i.Buf16(2*(2*E+1)),this.bl_tree=new i.Buf16(2*(2*T+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(D+1),this.heap=new i.Buf16(2*C+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*C+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ne(k){var J;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=v,(J=k.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?j:F,k.adler=J.wrap===2?0:1,J.last_flush=f,a._tr_init(J),h):Z(k,x)}function ke(k){var J=Ne(k);return J===h&&function(K){K.window_size=2*K.w_size,Q(K.head),K.max_lazy_match=o[K.level].max_lazy,K.good_match=o[K.level].good_length,K.nice_match=o[K.level].nice_length,K.max_chain_length=o[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=P-1,K.match_available=0,K.ins_h=0}(k.state),J}function rt(k,J,K,A,S,N){if(!k)return x;var O=1;if(J===g&&(J=6),A<0?(O=0,A=-A):15<A&&(O=2,A-=16),S<1||_<S||K!==p||A<8||15<A||J<0||9<J||N<0||w<N)return Z(k,x);A===8&&(A=9);var Y=new Ie;return(k.state=Y).strm=k,Y.wrap=O,Y.gzhead=null,Y.w_bits=A,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=S+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+P-1)/P),Y.window=new i.Buf8(2*Y.w_size),Y.head=new i.Buf16(Y.hash_size),Y.prev=new i.Buf16(Y.w_size),Y.lit_bufsize=1<<S+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new i.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=J,Y.strategy=N,Y.method=K,ke(k)}o=[new Se(0,0,0,0,function(k,J){var K=65535;for(K>k.pending_buf_size-5&&(K=k.pending_buf_size-5);;){if(k.lookahead<=1){if(je(k),k.lookahead===0&&J===f)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var A=k.block_start+K;if((k.strstart===0||k.strstart>=A)&&(k.lookahead=k.strstart-A,k.strstart=A,V(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?(V(k,!0),k.strm.avail_out===0?te:$):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new Se(4,4,8,4,fe),new Se(4,5,16,8,fe),new Se(4,6,32,32,fe),new Se(4,4,16,16,ve),new Se(8,16,32,32,ve),new Se(8,16,128,128,ve),new Se(8,32,128,256,ve),new Se(32,128,258,1024,ve),new Se(32,258,258,4096,ve)],s.deflateInit=function(k,J){return rt(k,J,p,15,8,0)},s.deflateInit2=rt,s.deflateReset=ke,s.deflateResetKeep=Ne,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?x:(k.state.gzhead=J,h):x},s.deflate=function(k,J){var K,A,S,N;if(!k||!k.state||5<J||J<0)return k?Z(k,x):x;if(A=k.state,!k.output||!k.input&&k.avail_in!==0||A.status===666&&J!==m)return Z(k,k.avail_out===0?-5:x);if(A.strm=k,K=A.last_flush,A.last_flush=J,A.status===j)if(A.wrap===2)k.adler=0,de(A,31),de(A,139),de(A,8),A.gzhead?(de(A,(A.gzhead.text?1:0)+(A.gzhead.hcrc?2:0)+(A.gzhead.extra?4:0)+(A.gzhead.name?8:0)+(A.gzhead.comment?16:0)),de(A,255&A.gzhead.time),de(A,A.gzhead.time>>8&255),de(A,A.gzhead.time>>16&255),de(A,A.gzhead.time>>24&255),de(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),de(A,255&A.gzhead.os),A.gzhead.extra&&A.gzhead.extra.length&&(de(A,255&A.gzhead.extra.length),de(A,A.gzhead.extra.length>>8&255)),A.gzhead.hcrc&&(k.adler=u(k.adler,A.pending_buf,A.pending,0)),A.gzindex=0,A.status=69):(de(A,0),de(A,0),de(A,0),de(A,0),de(A,0),de(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),de(A,3),A.status=F);else{var O=p+(A.w_bits-8<<4)<<8;O|=(2<=A.strategy||A.level<2?0:A.level<6?1:A.level===6?2:3)<<6,A.strstart!==0&&(O|=32),O+=31-O%31,A.status=F,ne(A,O),A.strstart!==0&&(ne(A,k.adler>>>16),ne(A,65535&k.adler)),k.adler=1}if(A.status===69)if(A.gzhead.extra){for(S=A.pending;A.gzindex<(65535&A.gzhead.extra.length)&&(A.pending!==A.pending_buf_size||(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),z(k),S=A.pending,A.pending!==A.pending_buf_size));)de(A,255&A.gzhead.extra[A.gzindex]),A.gzindex++;A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),A.gzindex===A.gzhead.extra.length&&(A.gzindex=0,A.status=73)}else A.status=73;if(A.status===73)if(A.gzhead.name){S=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),z(k),S=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.name.length?255&A.gzhead.name.charCodeAt(A.gzindex++):0,de(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),N===0&&(A.gzindex=0,A.status=91)}else A.status=91;if(A.status===91)if(A.gzhead.comment){S=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),z(k),S=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.comment.length?255&A.gzhead.comment.charCodeAt(A.gzindex++):0,de(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),N===0&&(A.status=103)}else A.status=103;if(A.status===103&&(A.gzhead.hcrc?(A.pending+2>A.pending_buf_size&&z(k),A.pending+2<=A.pending_buf_size&&(de(A,255&k.adler),de(A,k.adler>>8&255),k.adler=0,A.status=F)):A.status=F),A.pending!==0){if(z(k),k.avail_out===0)return A.last_flush=-1,h}else if(k.avail_in===0&&I(J)<=I(K)&&J!==m)return Z(k,-5);if(A.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||A.lookahead!==0||J!==f&&A.status!==666){var Y=A.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(je(M),M.lookahead===0)){if(H===f)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:$):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:W}(A,J):A.strategy===3?function(M,H){for(var X,ee,he,Be,Fe=M.window;;){if(M.lookahead<=L){if(je(M),M.lookahead<=L&&H===f)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=P&&0<M.strstart&&(ee=Fe[he=M.strstart-1])===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]){Be=M.strstart+L;do;while(ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&ee===Fe[++he]&&he<Be);M.match_length=L-(Be-he),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=P?(X=a._tr_tally(M,1,M.match_length-P),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:$):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:W}(A,J):o[A.level].func(A,J);if(Y!==te&&Y!==$||(A.status=666),Y===b||Y===te)return k.avail_out===0&&(A.last_flush=-1),h;if(Y===W&&(J===1?a._tr_align(A):J!==5&&(a._tr_stored_block(A,0,0,!1),J===3&&(Q(A.head),A.lookahead===0&&(A.strstart=0,A.block_start=0,A.insert=0))),z(k),k.avail_out===0))return A.last_flush=-1,h}return J!==m?h:A.wrap<=0?1:(A.wrap===2?(de(A,255&k.adler),de(A,k.adler>>8&255),de(A,k.adler>>16&255),de(A,k.adler>>24&255),de(A,255&k.total_in),de(A,k.total_in>>8&255),de(A,k.total_in>>16&255),de(A,k.total_in>>24&255)):(ne(A,k.adler>>>16),ne(A,65535&k.adler)),z(k),0<A.wrap&&(A.wrap=-A.wrap),A.pending!==0?h:1)},s.deflateEnd=function(k){var J;return k&&k.state?(J=k.state.status)!==j&&J!==69&&J!==73&&J!==91&&J!==103&&J!==F&&J!==666?Z(k,x):(k.state=null,J===F?Z(k,-3):h):x},s.deflateSetDictionary=function(k,J){var K,A,S,N,O,Y,M,H,X=J.length;if(!k||!k.state||(N=(K=k.state).wrap)===2||N===1&&K.status!==j||K.lookahead)return x;for(N===1&&(k.adler=l(k.adler,J,X,0)),K.wrap=0,X>=K.w_size&&(N===0&&(Q(K.head),K.strstart=0,K.block_start=0,K.insert=0),H=new i.Buf8(K.w_size),i.arraySet(H,J,X-K.w_size,K.w_size,0),J=H,X=K.w_size),O=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,je(K);K.lookahead>=P;){for(A=K.strstart,S=K.lookahead-(P-1);K.ins_h=(K.ins_h<<K.hash_shift^K.window[A+P-1])&K.hash_mask,K.prev[A&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=A,A++,--S;);K.strstart=A,K.lookahead=P-1,je(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=P-1,K.match_available=0,k.next_in=Y,k.input=M,k.avail_in=O,K.wrap=N,h},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,s){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,n,s){n.exports=function(o,i){var a,l,u,d,f,m,h,x,g,w,v,p,_,C,E,T,R,D,P,L,q,j,F,b,W;a=o.state,l=o.next_in,b=o.input,u=l+(o.avail_in-5),d=o.next_out,W=o.output,f=d-(i-o.avail_out),m=d+(o.avail_out-257),h=a.dmax,x=a.wsize,g=a.whave,w=a.wnext,v=a.window,p=a.hold,_=a.bits,C=a.lencode,E=a.distcode,T=(1<<a.lenbits)-1,R=(1<<a.distbits)-1;e:do{_<15&&(p+=b[l++]<<_,_+=8,p+=b[l++]<<_,_+=8),D=C[p&T];t:for(;;){if(p>>>=P=D>>>24,_-=P,(P=D>>>16&255)===0)W[d++]=65535&D;else{if(!(16&P)){if(!(64&P)){D=C[(65535&D)+(p&(1<<P)-1)];continue t}if(32&P){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}L=65535&D,(P&=15)&&(_<P&&(p+=b[l++]<<_,_+=8),L+=p&(1<<P)-1,p>>>=P,_-=P),_<15&&(p+=b[l++]<<_,_+=8,p+=b[l++]<<_,_+=8),D=E[p&R];r:for(;;){if(p>>>=P=D>>>24,_-=P,!(16&(P=D>>>16&255))){if(!(64&P)){D=E[(65535&D)+(p&(1<<P)-1)];continue r}o.msg="invalid distance code",a.mode=30;break e}if(q=65535&D,_<(P&=15)&&(p+=b[l++]<<_,(_+=8)<P&&(p+=b[l++]<<_,_+=8)),h<(q+=p&(1<<P)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(p>>>=P,_-=P,(P=d-f)<q){if(g<(P=q-P)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(F=v,(j=0)===w){if(j+=x-P,P<L){for(L-=P;W[d++]=v[j++],--P;);j=d-q,F=W}}else if(w<P){if(j+=x+w-P,(P-=w)<L){for(L-=P;W[d++]=v[j++],--P;);if(j=0,w<L){for(L-=P=w;W[d++]=v[j++],--P;);j=d-q,F=W}}}else if(j+=w-P,P<L){for(L-=P;W[d++]=v[j++],--P;);j=d-q,F=W}for(;2<L;)W[d++]=F[j++],W[d++]=F[j++],W[d++]=F[j++],L-=3;L&&(W[d++]=F[j++],1<L&&(W[d++]=F[j++]))}else{for(j=d-q;W[d++]=W[j++],W[d++]=W[j++],W[d++]=W[j++],2<(L-=3););L&&(W[d++]=W[j++],1<L&&(W[d++]=W[j++]))}break}}break}}while(l<u&&d<m);l-=L=_>>3,p&=(1<<(_-=L<<3))-1,o.next_in=l,o.next_out=d,o.avail_in=l<u?u-l+5:5-(l-u),o.avail_out=d<m?m-d+257:257-(d-m),a.hold=p,a.bits=_}},{}],49:[function(r,n,s){var o=r("../utils/common"),i=r("./adler32"),a=r("./crc32"),l=r("./inffast"),u=r("./inftrees"),d=1,f=2,m=0,h=-2,x=1,g=852,w=592;function v(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(j){var F;return j&&j.state?(F=j.state,j.total_in=j.total_out=F.total=0,j.msg="",F.wrap&&(j.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(g),F.distcode=F.distdyn=new o.Buf32(w),F.sane=1,F.back=-1,m):h}function C(j){var F;return j&&j.state?((F=j.state).wsize=0,F.whave=0,F.wnext=0,_(j)):h}function E(j,F){var b,W;return j&&j.state?(W=j.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?h:(W.window!==null&&W.wbits!==F&&(W.window=null),W.wrap=b,W.wbits=F,C(j))):h}function T(j,F){var b,W;return j?(W=new p,(j.state=W).window=null,(b=E(j,F))!==m&&(j.state=null),b):h}var R,D,P=!0;function L(j){if(P){var F;for(R=new o.Buf32(512),D=new o.Buf32(32),F=0;F<144;)j.lens[F++]=8;for(;F<256;)j.lens[F++]=9;for(;F<280;)j.lens[F++]=7;for(;F<288;)j.lens[F++]=8;for(u(d,j.lens,0,288,R,0,j.work,{bits:9}),F=0;F<32;)j.lens[F++]=5;u(f,j.lens,0,32,D,0,j.work,{bits:5}),P=!1}j.lencode=R,j.lenbits=9,j.distcode=D,j.distbits=5}function q(j,F,b,W){var te,$=j.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new o.Buf8($.wsize)),W>=$.wsize?(o.arraySet($.window,F,b-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(W<(te=$.wsize-$.wnext)&&(te=W),o.arraySet($.window,F,b-W,te,$.wnext),(W-=te)?(o.arraySet($.window,F,b-W,W,0),$.wnext=W,$.whave=$.wsize):($.wnext+=te,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=te))),0}s.inflateReset=C,s.inflateReset2=E,s.inflateResetKeep=_,s.inflateInit=function(j){return T(j,15)},s.inflateInit2=T,s.inflate=function(j,F){var b,W,te,$,Z,I,Q,z,V,de,ne,se,je,fe,ve,Se,Ie,Ne,ke,rt,k,J,K,A,S=0,N=new o.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return h;(b=j.state).mode===12&&(b.mode=13),Z=j.next_out,te=j.output,Q=j.avail_out,$=j.next_in,W=j.input,I=j.avail_in,z=b.hold,V=b.bits,de=I,ne=Q,J=m;e:for(;;)switch(b.mode){case x:if(b.wrap===0){b.mode=13;break}for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(2&b.wrap&&z===35615){N[b.check=0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0),V=z=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",b.mode=30;break}if(V-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){j.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,j.adler=b.check=1,b.mode=512&z?10:12,V=z=0;break;case 2:for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(b.flags=z,(255&b.flags)!=8){j.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){j.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=z>>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=3;case 3:for(;V<32;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.head&&(b.head.time=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),V=z=0,b.mode=4;case 4:for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=5;case 5:if(1024&b.flags){for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(I<(se=b.length)&&(se=I),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),o.arraySet(b.head.extra,W,$,se,k)),512&b.flags&&(b.check=a(b.check,W,se,$)),I-=se,$+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(I===0)break e;for(se=0;k=W[$+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=a(b.check,W,se,$)),I-=se,$+=se,k)break e}else b.head&&(b.head.name=null);b.length=0,b.mode=8;case 8:if(4096&b.flags){if(I===0)break e;for(se=0;k=W[$+se++],b.head&&k&&b.length<65536&&(b.head.comment+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=a(b.check,W,se,$)),I-=se,$+=se,k)break e}else b.head&&(b.head.comment=null);b.mode=9;case 9:if(512&b.flags){for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(z!==(65535&b.check)){j.msg="header crc mismatch",b.mode=30;break}V=z=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),j.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}j.adler=b.check=v(z),V=z=0,b.mode=11;case 11:if(b.havedict===0)return j.next_out=Z,j.avail_out=Q,j.next_in=$,j.avail_in=I,b.hold=z,b.bits=V,2;j.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&V,V-=7&V,b.mode=27;break}for(;V<3;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}switch(b.last=1&z,V-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,V-=2;break e;case 2:b.mode=17;break;case 3:j.msg="invalid block type",b.mode=30}z>>>=2,V-=2;break;case 14:for(z>>>=7&V,V-=7&V;V<32;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,V=z=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(I<se&&(se=I),Q<se&&(se=Q),se===0)break e;o.arraySet(te,W,$,se,Z),I-=se,$+=se,Q-=se,Z+=se,b.length-=se;break}b.mode=12;break;case 17:for(;V<14;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(b.nlen=257+(31&z),z>>>=5,V-=5,b.ndist=1+(31&z),z>>>=5,V-=5,b.ncode=4+(15&z),z>>>=4,V-=4,286<b.nlen||30<b.ndist){j.msg="too many length or distance symbols",b.mode=30;break}b.have=0,b.mode=18;case 18:for(;b.have<b.ncode;){for(;V<3;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.lens[O[b.have++]]=7&z,z>>>=3,V-=3}for(;b.have<19;)b.lens[O[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,K={bits:b.lenbits},J=u(0,b.lens,0,19,b.lencode,0,b.work,K),b.lenbits=K.bits,J){j.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have<b.nlen+b.ndist;){for(;Se=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Ie=65535&S,!((ve=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(Ie<16)z>>>=ve,V-=ve,b.lens[b.have++]=Ie;else{if(Ie===16){for(A=ve+2;V<A;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(z>>>=ve,V-=ve,b.have===0){j.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,V-=2}else if(Ie===17){for(A=ve+3;V<A;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}V-=ve,k=0,se=3+(7&(z>>>=ve)),z>>>=3,V-=3}else{for(A=ve+7;V<A;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}V-=ve,k=0,se=11+(127&(z>>>=ve)),z>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){j.msg="invalid bit length repeat",b.mode=30;break}for(;se--;)b.lens[b.have++]=k}}if(b.mode===30)break;if(b.lens[256]===0){j.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,K={bits:b.lenbits},J=u(d,b.lens,0,b.nlen,b.lencode,0,b.work,K),b.lenbits=K.bits,J){j.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,K={bits:b.distbits},J=u(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,K),b.distbits=K.bits,J){j.msg="invalid distances set",b.mode=30;break}if(b.mode=20,F===6)break e;case 20:b.mode=21;case 21:if(6<=I&&258<=Q){j.next_out=Z,j.avail_out=Q,j.next_in=$,j.avail_in=I,b.hold=z,b.bits=V,l(j,ne),Z=j.next_out,te=j.output,Q=j.avail_out,$=j.next_in,W=j.input,I=j.avail_in,z=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;Se=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Ie=65535&S,!((ve=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(Se&&!(240&Se)){for(Ne=ve,ke=Se,rt=Ie;Se=(S=b.lencode[rt+((z&(1<<Ne+ke)-1)>>Ne)])>>>16&255,Ie=65535&S,!(Ne+(ve=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}z>>>=Ne,V-=Ne,b.back+=Ne}if(z>>>=ve,V-=ve,b.back+=ve,b.length=Ie,Se===0){b.mode=26;break}if(32&Se){b.back=-1,b.mode=12;break}if(64&Se){j.msg="invalid literal/length code",b.mode=30;break}b.extra=15&Se,b.mode=22;case 22:if(b.extra){for(A=b.extra;V<A;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.length+=z&(1<<b.extra)-1,z>>>=b.extra,V-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;Se=(S=b.distcode[z&(1<<b.distbits)-1])>>>16&255,Ie=65535&S,!((ve=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(!(240&Se)){for(Ne=ve,ke=Se,rt=Ie;Se=(S=b.distcode[rt+((z&(1<<Ne+ke)-1)>>Ne)])>>>16&255,Ie=65535&S,!(Ne+(ve=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}z>>>=Ne,V-=Ne,b.back+=Ne}if(z>>>=ve,V-=ve,b.back+=ve,64&Se){j.msg="invalid distance code",b.mode=30;break}b.offset=Ie,b.extra=15&Se,b.mode=24;case 24:if(b.extra){for(A=b.extra;V<A;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}b.offset+=z&(1<<b.extra)-1,z>>>=b.extra,V-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){j.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(Q===0)break e;if(se=ne-Q,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){j.msg="invalid distance too far back",b.mode=30;break}je=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),fe=b.window}else fe=te,je=Z-b.offset,se=b.length;for(Q<se&&(se=Q),Q-=se,b.length-=se;te[Z++]=fe[je++],--se;);b.length===0&&(b.mode=21);break;case 26:if(Q===0)break e;te[Z++]=b.length,Q--,b.mode=21;break;case 27:if(b.wrap){for(;V<32;){if(I===0)break e;I--,z|=W[$++]<<V,V+=8}if(ne-=Q,j.total_out+=ne,b.total+=ne,ne&&(j.adler=b.check=b.flags?a(b.check,te,ne,Z-ne):i(b.check,te,ne,Z-ne)),ne=Q,(b.flags?z:v(z))!==b.check){j.msg="incorrect data check",b.mode=30;break}V=z=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;V<32;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(z!==(4294967295&b.total)){j.msg="incorrect length check",b.mode=30;break}V=z=0}b.mode=29;case 29:J=1;break e;case 30:J=-3;break e;case 31:return-4;case 32:default:return h}return j.next_out=Z,j.avail_out=Q,j.next_in=$,j.avail_in=I,b.hold=z,b.bits=V,(b.wsize||ne!==j.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&q(j,j.output,j.next_out,ne-j.avail_out)?(b.mode=31,-4):(de-=j.avail_in,ne-=j.avail_out,j.total_in+=de,j.total_out+=ne,b.total+=ne,b.wrap&&ne&&(j.adler=b.check=b.flags?a(b.check,te,ne,j.next_out-ne):i(b.check,te,ne,j.next_out-ne)),j.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(de==0&&ne===0||F===4)&&J===m&&(J=-5),J)},s.inflateEnd=function(j){if(!j||!j.state)return h;var F=j.state;return F.window&&(F.window=null),j.state=null,m},s.inflateGetHeader=function(j,F){var b;return j&&j.state&&2&(b=j.state).wrap?((b.head=F).done=!1,m):h},s.inflateSetDictionary=function(j,F){var b,W=F.length;return j&&j.state?(b=j.state).wrap!==0&&b.mode!==11?h:b.mode===11&&i(1,F,W,0)!==b.check?-3:q(j,F,W,W)?(b.mode=31,-4):(b.havedict=1,m):h},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,s){var o=r("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(d,f,m,h,x,g,w,v){var p,_,C,E,T,R,D,P,L,q=v.bits,j=0,F=0,b=0,W=0,te=0,$=0,Z=0,I=0,Q=0,z=0,V=null,de=0,ne=new o.Buf16(16),se=new o.Buf16(16),je=null,fe=0;for(j=0;j<=15;j++)ne[j]=0;for(F=0;F<h;F++)ne[f[m+F]]++;for(te=q,W=15;1<=W&&ne[W]===0;W--);if(W<te&&(te=W),W===0)return x[g++]=20971520,x[g++]=20971520,v.bits=1,0;for(b=1;b<W&&ne[b]===0;b++);for(te<b&&(te=b),j=I=1;j<=15;j++)if(I<<=1,(I-=ne[j])<0)return-1;if(0<I&&(d===0||W!==1))return-1;for(se[1]=0,j=1;j<15;j++)se[j+1]=se[j]+ne[j];for(F=0;F<h;F++)f[m+F]!==0&&(w[se[f[m+F]]++]=F);if(R=d===0?(V=je=w,19):d===1?(V=i,de-=257,je=a,fe-=257,256):(V=l,je=u,-1),j=b,T=g,Z=F=z=0,C=-1,E=(Q=1<<($=te))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(D=j-Z,L=w[F]<R?(P=0,w[F]):w[F]>R?(P=je[fe+w[F]],V[de+w[F]]):(P=96,0),p=1<<j-Z,b=_=1<<$;x[T+(z>>Z)+(_-=p)]=D<<24|P<<16|L|0,_!==0;);for(p=1<<j-1;z&p;)p>>=1;if(p!==0?(z&=p-1,z+=p):z=0,F++,--ne[j]==0){if(j===W)break;j=f[m+w[F]]}if(te<j&&(z&E)!==C){for(Z===0&&(Z=te),T+=b,I=1<<($=j-Z);$+Z<W&&!((I-=ne[$+Z])<=0);)$++,I<<=1;if(Q+=1<<$,d===1&&852<Q||d===2&&592<Q)return 1;x[C=z&E]=te<<24|$<<16|T-g|0}}return z!==0&&(x[T+z]=j-Z<<24|64<<16|0),v.bits=te,0}},{"../utils/common":41}],51:[function(r,n,s){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,n,s){var o=r("../utils/common"),i=0,a=1;function l(S){for(var N=S.length;0<=--N;)S[N]=0}var u=0,d=29,f=256,m=f+1+d,h=30,x=19,g=2*m+1,w=15,v=16,p=7,_=256,C=16,E=17,T=18,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q=new Array(2*(m+2));l(q);var j=new Array(2*h);l(j);var F=new Array(512);l(F);var b=new Array(256);l(b);var W=new Array(d);l(W);var te,$,Z,I=new Array(h);function Q(S,N,O,Y,M){this.static_tree=S,this.extra_bits=N,this.extra_base=O,this.elems=Y,this.max_length=M,this.has_stree=S&&S.length}function z(S,N){this.dyn_tree=S,this.max_code=0,this.stat_desc=N}function V(S){return S<256?F[S]:F[256+(S>>>7)]}function de(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,O){S.bi_valid>v-O?(S.bi_buf|=N<<S.bi_valid&65535,de(S,S.bi_buf),S.bi_buf=N>>v-S.bi_valid,S.bi_valid+=O-v):(S.bi_buf|=N<<S.bi_valid&65535,S.bi_valid+=O)}function se(S,N,O){ne(S,O[2*N],O[2*N+1])}function je(S,N){for(var O=0;O|=1&S,S>>>=1,O<<=1,0<--N;);return O>>>1}function fe(S,N,O){var Y,M,H=new Array(w+1),X=0;for(Y=1;Y<=w;Y++)H[Y]=X=X+O[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=je(H[ee]++,ee))}}function ve(S){var N;for(N=0;N<m;N++)S.dyn_ltree[2*N]=0;for(N=0;N<h;N++)S.dyn_dtree[2*N]=0;for(N=0;N<x;N++)S.bl_tree[2*N]=0;S.dyn_ltree[2*_]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function Se(S){8<S.bi_valid?de(S,S.bi_buf):0<S.bi_valid&&(S.pending_buf[S.pending++]=S.bi_buf),S.bi_buf=0,S.bi_valid=0}function Ie(S,N,O,Y){var M=2*N,H=2*O;return S[M]<S[H]||S[M]===S[H]&&Y[N]<=Y[O]}function Ne(S,N,O){for(var Y=S.heap[O],M=O<<1;M<=S.heap_len&&(M<S.heap_len&&Ie(N,S.heap[M+1],S.heap[M],S.depth)&&M++,!Ie(N,Y,S.heap[M],S.depth));)S.heap[O]=S.heap[M],O=M,M<<=1;S.heap[O]=Y}function ke(S,N,O){var Y,M,H,X,ee=0;if(S.last_lit!==0)for(;Y=S.pending_buf[S.d_buf+2*ee]<<8|S.pending_buf[S.d_buf+2*ee+1],M=S.pending_buf[S.l_buf+ee],ee++,Y===0?se(S,M,N):(se(S,(H=b[M])+f+1,N),(X=R[H])!==0&&ne(S,M-=W[H],X),se(S,H=V(--Y),O),(X=D[H])!==0&&ne(S,Y-=I[H],X)),ee<S.last_lit;);se(S,_,N)}function rt(S,N){var O,Y,M,H=N.dyn_tree,X=N.stat_desc.static_tree,ee=N.stat_desc.has_stree,he=N.stat_desc.elems,Be=-1;for(S.heap_len=0,S.heap_max=g,O=0;O<he;O++)H[2*O]!==0?(S.heap[++S.heap_len]=Be=O,S.depth[O]=0):H[2*O+1]=0;for(;S.heap_len<2;)H[2*(M=S.heap[++S.heap_len]=Be<2?++Be:0)]=1,S.depth[M]=0,S.opt_len--,ee&&(S.static_len-=X[2*M+1]);for(N.max_code=Be,O=S.heap_len>>1;1<=O;O--)Ne(S,H,O);for(M=he;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Ne(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=O,S.heap[--S.heap_max]=Y,H[2*M]=H[2*O]+H[2*Y],S.depth[M]=(S.depth[O]>=S.depth[Y]?S.depth[O]:S.depth[Y])+1,H[2*O+1]=H[2*Y+1]=M,S.heap[1]=M++,Ne(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Fe,Ct){var Wr,Bt,Gn,ot,qn,Xn,$r=Ct.dyn_tree,kc=Ct.max_code,Cc=Ct.stat_desc.static_tree,oi=Ct.stat_desc.has_stree,Ec=Ct.stat_desc.extra_bits,ii=Ct.stat_desc.extra_base,En=Ct.stat_desc.max_length,Ds=0;for(ot=0;ot<=w;ot++)Fe.bl_count[ot]=0;for($r[2*Fe.heap[Fe.heap_max]+1]=0,Wr=Fe.heap_max+1;Wr<g;Wr++)En<(ot=$r[2*$r[2*(Bt=Fe.heap[Wr])+1]+1]+1)&&(ot=En,Ds++),$r[2*Bt+1]=ot,kc<Bt||(Fe.bl_count[ot]++,qn=0,ii<=Bt&&(qn=Ec[Bt-ii]),Xn=$r[2*Bt],Fe.opt_len+=Xn*(ot+qn),oi&&(Fe.static_len+=Xn*(Cc[2*Bt+1]+qn)));if(Ds!==0){do{for(ot=En-1;Fe.bl_count[ot]===0;)ot--;Fe.bl_count[ot]--,Fe.bl_count[ot+1]+=2,Fe.bl_count[En]--,Ds-=2}while(0<Ds);for(ot=En;ot!==0;ot--)for(Bt=Fe.bl_count[ot];Bt!==0;)kc<(Gn=Fe.heap[--Wr])||($r[2*Gn+1]!==ot&&(Fe.opt_len+=(ot-$r[2*Gn+1])*$r[2*Gn],$r[2*Gn+1]=ot),Bt--)}}(S,N),fe(H,Be,S.bl_count)}function k(S,N,O){var Y,M,H=-1,X=N[1],ee=0,he=7,Be=4;for(X===0&&(he=138,Be=3),N[2*(O+1)+1]=65535,Y=0;Y<=O;Y++)M=X,X=N[2*(Y+1)+1],++ee<he&&M===X||(ee<Be?S.bl_tree[2*M]+=ee:M!==0?(M!==H&&S.bl_tree[2*M]++,S.bl_tree[2*C]++):ee<=10?S.bl_tree[2*E]++:S.bl_tree[2*T]++,H=M,Be=(ee=0)===X?(he=138,3):M===X?(he=6,3):(he=7,4))}function J(S,N,O){var Y,M,H=-1,X=N[1],ee=0,he=7,Be=4;for(X===0&&(he=138,Be=3),Y=0;Y<=O;Y++)if(M=X,X=N[2*(Y+1)+1],!(++ee<he&&M===X)){if(ee<Be)for(;se(S,M,S.bl_tree),--ee!=0;);else M!==0?(M!==H&&(se(S,M,S.bl_tree),ee--),se(S,C,S.bl_tree),ne(S,ee-3,2)):ee<=10?(se(S,E,S.bl_tree),ne(S,ee-3,3)):(se(S,T,S.bl_tree),ne(S,ee-11,7));H=M,Be=(ee=0)===X?(he=138,3):M===X?(he=6,3):(he=7,4)}}l(I);var K=!1;function A(S,N,O,Y){ne(S,(u<<1)+(Y?1:0),3),function(M,H,X,ee){Se(M),de(M,X),de(M,~X),o.arraySet(M.pending_buf,M.window,H,X,M.pending),M.pending+=X}(S,N,O)}s._tr_init=function(S){K||(function(){var N,O,Y,M,H,X=new Array(w+1);for(M=Y=0;M<d-1;M++)for(W[M]=Y,N=0;N<1<<R[M];N++)b[Y++]=M;for(b[Y-1]=M,M=H=0;M<16;M++)for(I[M]=H,N=0;N<1<<D[M];N++)F[H++]=M;for(H>>=7;M<h;M++)for(I[M]=H<<7,N=0;N<1<<D[M]-7;N++)F[256+H++]=M;for(O=0;O<=w;O++)X[O]=0;for(N=0;N<=143;)q[2*N+1]=8,N++,X[8]++;for(;N<=255;)q[2*N+1]=9,N++,X[9]++;for(;N<=279;)q[2*N+1]=7,N++,X[7]++;for(;N<=287;)q[2*N+1]=8,N++,X[8]++;for(fe(q,m+1,X),N=0;N<h;N++)j[2*N+1]=5,j[2*N]=je(N,5);te=new Q(q,R,f+1,m,w),$=new Q(j,D,0,h,w),Z=new Q(new Array(0),P,0,x,p)}(),K=!0),S.l_desc=new z(S.dyn_ltree,te),S.d_desc=new z(S.dyn_dtree,$),S.bl_desc=new z(S.bl_tree,Z),S.bi_buf=0,S.bi_valid=0,ve(S)},s._tr_stored_block=A,s._tr_flush_block=function(S,N,O,Y){var M,H,X=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(ee){var he,Be=4093624447;for(he=0;he<=31;he++,Be>>>=1)if(1&Be&&ee.dyn_ltree[2*he]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(he=32;he<f;he++)if(ee.dyn_ltree[2*he]!==0)return a;return i}(S)),rt(S,S.l_desc),rt(S,S.d_desc),X=function(ee){var he;for(k(ee,ee.dyn_ltree,ee.l_desc.max_code),k(ee,ee.dyn_dtree,ee.d_desc.max_code),rt(ee,ee.bl_desc),he=x-1;3<=he&&ee.bl_tree[2*L[he]+1]===0;he--);return ee.opt_len+=3*(he+1)+5+5+4,he}(S),M=S.opt_len+3+7>>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=O+5,O+4<=M&&N!==-1?A(S,N,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),ke(S,q,j)):(ne(S,4+(Y?1:0),3),function(ee,he,Be,Fe){var Ct;for(ne(ee,he-257,5),ne(ee,Be-1,5),ne(ee,Fe-4,4),Ct=0;Ct<Fe;Ct++)ne(ee,ee.bl_tree[2*L[Ct]+1],3);J(ee,ee.dyn_ltree,he-1),J(ee,ee.dyn_dtree,Be-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,X+1),ke(S,S.dyn_ltree,S.dyn_dtree)),ve(S),Y&&Se(S)},s._tr_tally=function(S,N,O){return S.pending_buf[S.d_buf+2*S.last_lit]=N>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,N===0?S.dyn_ltree[2*O]++:(S.matches++,N--,S.dyn_ltree[2*(b[O]+f+1)]++,S.dyn_dtree[2*V(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,q),function(N){N.bi_valid===16?(de(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(o){(function(i,a){if(!i.setImmediate){var l,u,d,f,m=1,h={},x=!1,g=i.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(i);w=w&&w.setTimeout?w:i,l={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){p(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,E=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=E,C}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(C){i.postMessage(f+C,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){p(C.data)},function(C){d.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(C){var E=g.createElement("script");E.onreadystatechange=function(){p(C),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(C){setTimeout(p,0,C)},w.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),T=0;T<E.length;T++)E[T]=arguments[T+1];var R={callback:C,args:E};return h[m]=R,l(m),m++},w.clearImmediate=v}function v(C){delete h[C]}function p(C){if(x)setTimeout(p,0,C);else{var E=h[C];if(E){x=!0;try{(function(T){var R=T.callback,D=T.args;switch(D.length){case 0:R();break;case 1:R(D[0]);break;case 2:R(D[0],D[1]);break;case 3:R(D[0],D[1],D[2]);break;default:R.apply(a,D)}})(E)}finally{v(C),x=!1}}}}function _(C){C.source===i&&typeof C.data=="string"&&C.data.indexOf(f)===0&&p(+C.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Pc<"u"?Pc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(AC);var x5=AC.exports;const w5=gm(x5);function _5(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{n.result?t(n.result.toString()):r("No content found")},n.onerror=()=>r(n.error),n.readAsText(e)})}const b5=async(e,t)=>{const r=new w5;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},oa=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},S5=e=>oa(e).split(" ")[0];function OC(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const r=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${o}:${i}:${a}`}const k5=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=Nt();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:OC(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},C5=async()=>{const e=Nt(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:OC(15)})}),n=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:r.totalItems,enabled:n.totalItems,disabled:s.totalItems}},E5=async e=>await Nt().collection("domains").getOne(e),nm=async e=>e.id?await Nt().collection("domains").update(e.id,e):await Nt().collection("domains").create(e),T5=async e=>await Nt().collection("domains").delete(e),j5=(e,t)=>Nt().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),N5=e=>{Nt().collection("domains").unsubscribe(e)},R5=()=>{const e=jf(),t=wn(),r=Bn(),n=new URLSearchParams(r.search),s=n.get("page"),o=n.get("state"),[i,a]=y.useState(0),l=()=>{t("/edit")},u=p=>{n.set("page",p.toString()),t(`?${n.toString()}`)},d=p=>{t(`/edit?id=${p}`)},f=p=>{t(`/history?domain=${p}`)},m=async p=>{try{await T5(p),x(h.filter(_=>_.id!==p))}catch(_){console.error("Error deleting domain:",_)}},[h,x]=y.useState([]);y.useEffect(()=>{(async()=>{const _=await k5({page:s?Number(s):1,perPage:10,state:o||""});x(_.items),a(_.totalPages)})()},[s,o]);const g=async p=>{const _=h.filter(R=>R.id===p),C=_[0].enabled,E=_[0];E.enabled=!C,await nm(E);const T=h.map(R=>R.id===p?{...R,checked:!C}:R);x(T)},w=async p=>{try{N5(p.id),j5(p.id,_=>{console.log(_);const C=h.map(E=>E.id===_.id?{..._}:E);x(C)}),p.rightnow=!0,await nm(p),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(dr,{to:`/history?domain=${p.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},v=async p=>{const _=`${p.id}-${p.domain}.zip`,C=[{name:`${p.domain}.pem`,content:p.certificate?p.certificate:""},{name:`${p.domain}.key`,content:p.privateKey?p.privateKey:""}];await b5(_,C)};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Rv,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(ct,{onClick:l,children:"新增域名"})]}),h.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),h.map(p=>{var _,C,E,T,R,D;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:p.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:p.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[S5(p.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:p.lastDeployedAt&&((_=p.expand)!=null&&_.lastDeployment)?c.jsx(c.Fragment,{children:((C=p.expand.lastDeployment)==null?void 0:C.phase)==="deploy"&&((E=p.expand.lastDeployment)!=null&&E.phaseSuccess)?c.jsx(gg,{size:16,className:"text-green-700"}):c.jsx(vg,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:p.lastDeployedAt&&((T=p.expand)!=null&&T.lastDeployment)?c.jsx(Cv,{phase:(R=p.expand.lastDeployment)==null?void 0:R.phase,phaseSuccess:(D=p.expand.lastDeployment)==null?void 0:D.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:p.lastDeployedAt?oa(p.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(TC,{children:c.jsxs(g5,{children:[c.jsx(v5,{children:c.jsx(tC,{checked:p.enabled,onCheckedChange:()=>{g(p.id)}})}),c.jsx(Dv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:p.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(ct,{variant:"link",className:"p-0",onClick:()=>f(p.id),children:"部署历史"}),c.jsxs(m0,{when:!!p.enabled,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(ct,{variant:"link",className:"p-0",onClick:()=>w(p),children:"立即部署"})]}),c.jsxs(m0,{when:!!p.expiredAt,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(ct,{variant:"link",className:"p-0",onClick:()=>v(p),children:"下载"})]}),!p.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(v3,{children:[c.jsx(y3,{asChild:!0,children:c.jsx(ct,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(Wk,{children:[c.jsxs($k,{children:[c.jsx(Hk,{children:"删除域名"}),c.jsx(Yk,{children:"确定要删除域名吗?"})]}),c.jsxs(Bk,{children:[c.jsx(Kk,{children:"取消"}),c.jsx(Zk,{onClick:()=>{m(p.id)},children:"确认"})]})]})]}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(ct,{variant:"link",className:"p-0",onClick:()=>d(p.id),children:"编辑"})]})]})]},p.id)}),c.jsx(_k,{totalPages:i,currentPage:s?Number(s):1,onPageChange:p=>{u(p)}})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Mp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(ct,{onClick:l,className:"mt-3",children:"添加域名"})]})})]})})},ze=y.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",e),ref:n,...r}));ze.displayName="Input";var _c=e=>e.type==="checkbox",Ai=e=>e instanceof Date,hr=e=>e==null;const MC=e=>typeof e=="object";var qt=e=>!hr(e)&&!Array.isArray(e)&&MC(e)&&!Ai(e),IC=e=>qt(e)&&e.target?_c(e.target)?e.target.checked:e.target.value:e,P5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,LC=(e,t)=>e.has(P5(t)),D5=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},Av=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Av&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!D5(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=wr(e[n]));else return e;return t}var Af=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,le=(e,t,r)=>{if(!t||!qt(e))return r;const n=Af(t.split(/[,[\].]+?/)).reduce((s,o)=>hr(s)?s:s[o],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},An=e=>typeof e=="boolean",Ov=e=>/^\w*$/.test(e),FC=e=>Af(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let n=-1;const s=Ov(t)?[t]:FC(t),o=s.length,i=o-1;for(;++n<o;){const a=s[n];let l=r;if(n!==i){const u=e[a];l=qt(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const xd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ln={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ts={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},zC=et.createContext(null),Of=()=>et.useContext(zC),A5=e=>{const{children:t,...r}=e;return et.createElement(zC.Provider,{value:r},t)};var UC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==ln.all&&(t._proxyFormState[i]=!n||ln.all),r&&(r[i]=!0),e[i]}});return s},Nr=e=>qt(e)&&!Object.keys(e).length,VC=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Nr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||ln.all))},al=e=>Array.isArray(e)?e:[e],WC=(e,t,r)=>!e||!t||e===t||al(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Mv(e){const t=et.useRef(e);t.current=e,et.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function O5(e){const t=Of(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=et.useState(r._formState),l=et.useRef(!0),u=et.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=et.useRef(s);return d.current=s,Mv({disabled:n,next:f=>l.current&&WC(d.current,f.name,o)&&VC(f,u.current,r._updateFormState)&&a({...r._formState,...f}),subject:r._subjects.state}),et.useEffect(()=>(l.current=!0,u.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),UC(i,r,u.current,!1)}var Mn=e=>typeof e=="string",$C=(e,t,r,n,s)=>Mn(e)?(n&&t.watch.add(e),le(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),le(r,o))):(n&&(t.watchAll=!0),r);function M5(e){const t=Of(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=et.useRef(n);a.current=n,Mv({disabled:o,subject:r._subjects.values,next:d=>{WC(a.current,d.name,i)&&u(wr($C(a.current,r._names,d.values||r._formValues,!1,s)))}});const[l,u]=et.useState(r._getWatch(n,s));return et.useEffect(()=>r._removeUnmounted()),l}function I5(e){const t=Of(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=LC(s._names.array,r),a=M5({control:s,name:r,defaultValue:le(s._formValues,r,le(s._defaultValues,r,e.defaultValue)),exact:!0}),l=O5({control:s,name:r}),u=et.useRef(s.register(r,{...e.rules,value:a,...An(e.disabled)?{disabled:e.disabled}:{}}));return et.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(m,h)=>{const x=le(s._fields,m);x&&x._f&&(x._f.mount=h)};if(f(r,!0),d){const m=wr(le(s._options.defaultValues,r));dt(s._defaultValues,r,m),Ft(le(s._formValues,r))&&dt(s._formValues,r,m)}return()=>{(i?d&&!s._state.action:d)?s.unregister(r):f(r,!1)}},[r,s,i,o]),et.useEffect(()=>{le(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:le(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...An(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:et.useCallback(d=>u.current.onChange({target:{value:IC(d),name:r},type:xd.CHANGE}),[r]),onBlur:et.useCallback(()=>u.current.onBlur({target:{value:le(s._formValues,r),name:r},type:xd.BLUR}),[r,s]),ref:d=>{const f=le(s._fields,r);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:m=>d.setCustomValidity(m),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!le(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!le(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!le(l.validatingFields,r)},error:{enumerable:!0,get:()=>le(l.errors,r)}})}}const L5=e=>e.render(I5(e));var BC=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},y0=e=>({isOnSubmit:!e||e===ln.onSubmit,isOnBlur:e===ln.onBlur,isOnChange:e===ln.onChange,isOnAll:e===ln.all,isOnTouch:e===ln.onTouched}),x0=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const ll=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=le(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;ll(a,t)}else qt(a)&&ll(a,t)}}};var F5=(e,t,r)=>{const n=al(le(e,r));return dt(n,"root",t[r]),dt(e,r,n),e},Iv=e=>e.type==="file",Ks=e=>typeof e=="function",wd=e=>{if(!Av)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ru=e=>Mn(e),Lv=e=>e.type==="radio",_d=e=>e instanceof RegExp;const w0={value:!1,isValid:!1},_0={value:!0,isValid:!0};var HC=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?_0:{value:e[0].value,isValid:!0}:_0:w0}return w0};const b0={isValid:!1,value:null};var YC=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,b0):b0;function S0(e,t,r="validate"){if(Ru(e)||Array.isArray(e)&&e.every(Ru)||An(e)&&!e)return{type:r,message:Ru(e)?e:"",ref:t}}var gi=e=>qt(e)&&!_d(e)?e:{value:e,message:""},k0=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:u,min:d,max:f,pattern:m,validate:h,name:x,valueAsNumber:g,mount:w,disabled:v}=e._f,p=le(t,x);if(!w||v)return{};const _=i?i[0]:o,C=j=>{n&&_.reportValidity&&(_.setCustomValidity(An(j)?"":j||""),_.reportValidity())},E={},T=Lv(o),R=_c(o),D=T||R,P=(g||Iv(o))&&Ft(o.value)&&Ft(p)||wd(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,L=BC.bind(null,x,r,E),q=(j,F,b,W=ts.maxLength,te=ts.minLength)=>{const $=j?F:b;E[x]={type:j?W:te,message:$,ref:o,...L(j?W:te,$)}};if(s?!Array.isArray(p)||!p.length:a&&(!D&&(P||hr(p))||An(p)&&!p||R&&!HC(i).isValid||T&&!YC(i).isValid)){const{value:j,message:F}=Ru(a)?{value:!!a,message:a}:gi(a);if(j&&(E[x]={type:ts.required,message:F,ref:_,...L(ts.required,F)},!r))return C(F),E}if(!P&&(!hr(d)||!hr(f))){let j,F;const b=gi(f),W=gi(d);if(!hr(p)&&!isNaN(p)){const te=o.valueAsNumber||p&&+p;hr(b.value)||(j=te>b.value),hr(W.value)||(F=te<W.value)}else{const te=o.valueAsDate||new Date(p),$=Q=>new Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Mn(b.value)&&p&&(j=Z?$(p)>$(b.value):I?p>b.value:te>new Date(b.value)),Mn(W.value)&&p&&(F=Z?$(p)<$(W.value):I?p<W.value:te<new Date(W.value))}if((j||F)&&(q(!!j,b.message,W.message,ts.max,ts.min),!r))return C(E[x].message),E}if((l||u)&&!P&&(Mn(p)||s&&Array.isArray(p))){const j=gi(l),F=gi(u),b=!hr(j.value)&&p.length>+j.value,W=!hr(F.value)&&p.length<+F.value;if((b||W)&&(q(b,j.message,F.message),!r))return C(E[x].message),E}if(m&&!P&&Mn(p)){const{value:j,message:F}=gi(m);if(_d(j)&&!p.match(j)&&(E[x]={type:ts.pattern,message:F,ref:o,...L(ts.pattern,F)},!r))return C(F),E}if(h){if(Ks(h)){const j=await h(p,t),F=S0(j,_);if(F&&(E[x]={...F,...L(ts.validate,F.message)},!r))return C(F.message),E}else if(qt(h)){let j={};for(const F in h){if(!Nr(j)&&!r)break;const b=S0(await h[F](p,t),_,F);b&&(j={...b,...L(F,b.message)},C(b.message),r&&(E[x]=j))}if(!Nr(j)&&(E[x]={ref:_,...j},!r))return E}}return C(!0),E};function z5(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Ft(e)?n++:e[t[n++]];return e}function U5(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Ht(e,t){const r=Array.isArray(t)?t:Ov(t)?[t]:FC(t),n=r.length===1?e:z5(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(qt(n)&&Nr(n)||Array.isArray(n)&&U5(n))&&Ht(e,r.slice(0,-1)),e}var Mh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},bd=e=>hr(e)||!MC(e);function Mo(e,t){if(bd(e)||bd(t))return e===t;if(Ai(e)&&Ai(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ai(o)&&Ai(i)||qt(o)&&qt(i)||Array.isArray(o)&&Array.isArray(i)?!Mo(o,i):o!==i)return!1}}return!0}var ZC=e=>e.type==="select-multiple",V5=e=>Lv(e)||_c(e),Ih=e=>wd(e)&&e.isConnected,KC=e=>{for(const t in e)if(Ks(e[t]))return!0;return!1};function Sd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!KC(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Sd(e[n],t[n])):hr(e[n])||(t[n]=!0);return t}function GC(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!KC(e[s])?Ft(t)||bd(r[s])?r[s]=Array.isArray(e[s])?Sd(e[s],[]):{...Sd(e[s])}:GC(e[s],hr(t)?{}:t[s],r[s]):r[s]=!Mo(e[s],t[s]);return r}var lu=(e,t)=>GC(e,t,Sd(t)),qC=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&Mn(e)?new Date(e):n?n(e):e;function Lh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Iv(t)?t.files:Lv(t)?YC(e.refs).value:ZC(t)?[...t.selectedOptions].map(({value:r})=>r):_c(t)?HC(e.refs).value:qC(Ft(t.value)?e.ref.value:t.value,e)}var W5=(e,t,r,n)=>{const s={};for(const o of e){const i=le(t,o);i&&dt(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ua=e=>Ft(e)?e:_d(e)?e.source:qt(e)?_d(e.value)?e.value.source:e.value:e,$5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function C0(e,t,r){const n=le(e,r);if(n||Ov(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=le(t,o),a=le(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:r}}var B5=(e,t,r,n,s)=>s.isOnAll?!1:!r&&s.isOnTouch?!(t||e):(r?n.isOnBlur:s.isOnBlur)?!e:(r?n.isOnChange:s.isOnChange)?e:!0,H5=(e,t)=>!Af(le(e,t)).length&&Ht(e,t);const Y5={mode:ln.onSubmit,reValidateMode:ln.onChange,shouldFocusError:!0};function Z5(e={}){let t={...Y5,...e},r={submitCount:0,isDirty:!1,isLoading:Ks(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=qt(t.defaultValues)||qt(t.values)?wr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:wr(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Mh(),array:Mh(),state:Mh()},m=y0(t.mode),h=y0(t.reValidateMode),x=t.criteriaMode===ln.all,g=S=>N=>{clearTimeout(u),u=setTimeout(S,N)},w=async S=>{if(d.isValid||S){const N=t.resolver?Nr((await D()).errors):await L(n,!0);N!==r.isValid&&f.state.next({isValid:N})}},v=(S,N)=>{(d.isValidating||d.validatingFields)&&((S||Array.from(a.mount)).forEach(O=>{O&&(N?dt(r.validatingFields,O,N):Ht(r.validatingFields,O))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Nr(r.validatingFields)}))},p=(S,N=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(i.action=!0,H&&Array.isArray(le(n,S))){const X=O(le(n,S),Y.argA,Y.argB);M&&dt(n,S,X)}if(H&&Array.isArray(le(r.errors,S))){const X=O(le(r.errors,S),Y.argA,Y.argB);M&&dt(r.errors,S,X),H5(r.errors,S)}if(d.touchedFields&&H&&Array.isArray(le(r.touchedFields,S))){const X=O(le(r.touchedFields,S),Y.argA,Y.argB);M&&dt(r.touchedFields,S,X)}d.dirtyFields&&(r.dirtyFields=lu(s,o)),f.state.next({name:S,isDirty:j(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(o,S,N)},_=(S,N)=>{dt(r.errors,S,N),f.state.next({errors:r.errors})},C=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},E=(S,N,O,Y)=>{const M=le(n,S);if(M){const H=le(o,S,Ft(O)?le(s,S):O);Ft(H)||Y&&Y.defaultChecked||N?dt(o,S,N?H:Lh(M._f)):W(S,H),i.mount&&w()}},T=(S,N,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},he=!!(le(n,S)&&le(n,S)._f&&le(n,S)._f.disabled);if(!O||Y){d.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=j(),H=X!==ee.isDirty);const Be=he||Mo(le(s,S),N);X=!!(!he&&le(r.dirtyFields,S)),Be||he?Ht(r.dirtyFields,S):dt(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||d.dirtyFields&&X!==!Be}if(O){const Be=le(r.touchedFields,S);Be||(dt(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||d.touchedFields&&Be!==O)}return H&&M&&f.state.next(ee),H?ee:{}},R=(S,N,O,Y)=>{const M=le(r.errors,S),H=d.isValid&&An(N)&&r.isValid!==N;if(e.delayError&&O?(l=g(()=>_(S,O)),l(e.delayError)):(clearTimeout(u),l=null,O?dt(r.errors,S,O):Ht(r.errors,S)),(O?!Mo(M,O):M)||!Nr(Y)||H){const X={...Y,...H&&An(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},f.state.next(X)}},D=async S=>{v(S,!0);const N=await t.resolver(o,t.context,W5(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return v(S),N},P=async S=>{const{errors:N}=await D(S);if(S)for(const O of S){const Y=le(N,O);Y?dt(r.errors,O,Y):Ht(r.errors,O)}else r.errors=N;return N},L=async(S,N,O={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);v([Y],!0);const he=await k0(M,o,x,t.shouldUseNativeValidation&&!N,ee);if(v([Y]),he[H.name]&&(O.valid=!1,N))break;!N&&(le(he,H.name)?ee?F5(r.errors,he,H.name):dt(r.errors,H.name,he[H.name]):Ht(r.errors,H.name))}X&&await L(X,N,O)}}return O.valid},q=()=>{for(const S of a.unMount){const N=le(n,S);N&&(N._f.refs?N._f.refs.every(O=>!Ih(O)):!Ih(N._f.ref))&&je(S)}a.unMount=new Set},j=(S,N)=>(S&&N&&dt(o,S,N),!Mo(z(),s)),F=(S,N,O)=>$C(S,a,{...i.mount?o:Ft(N)?s:Mn(S)?{[S]:N}:N},O,N),b=S=>Af(le(i.mount?o:s,S,e.shouldUnregister?le(s,S,[]):[])),W=(S,N,O={})=>{const Y=le(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&dt(o,S,qC(N,H)),M=wd(H.ref)&&hr(N)?"":N,ZC(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?_c(H.ref)?H.refs.length>1?H.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(ee=>ee===X.value):M===X.value)):H.refs[0]&&(H.refs[0].checked=!!M):H.refs.forEach(X=>X.checked=X.value===M):Iv(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||f.values.next({name:S,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&T(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,N,O)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=le(n,H);(a.array.has(S)||!bd(M)||X&&!X._f)&&!Ai(M)?te(H,M,O):W(H,M,O)}},$=(S,N,O={})=>{const Y=le(n,S),M=a.array.has(S),H=wr(N);dt(o,S,H),M?(f.array.next({name:S,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:S,dirtyFields:lu(s,o),isDirty:j(S,H)})):Y&&!Y._f&&!hr(H)?te(S,H,O):W(S,H,O),x0(S,a)&&f.state.next({...r}),f.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const N=S.target;let O=N.name,Y=!0;const M=le(n,O),H=()=>N.type?Lh(M._f):IC(S),X=ee=>{Y=Number.isNaN(ee)||ee===le(o,O,ee)};if(M){let ee,he;const Be=H(),Fe=S.type===xd.BLUR||S.type===xd.FOCUS_OUT,Ct=!$5(M._f)&&!t.resolver&&!le(r.errors,O)&&!M._f.deps||B5(Fe,le(r.touchedFields,O),r.isSubmitted,h,m),Wr=x0(O,a,Fe);dt(o,O,Be),Fe?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Bt=T(O,Be,Fe,!1),Gn=!Nr(Bt)||Wr;if(!Fe&&f.values.next({name:O,type:S.type,values:{...o}}),Ct)return d.isValid&&w(),Gn&&f.state.next({name:O,...Wr?{}:Bt});if(!Fe&&Wr&&f.state.next({...r}),t.resolver){const{errors:ot}=await D([O]);if(X(Be),Y){const qn=C0(r.errors,n,O),Xn=C0(ot,n,qn.name||O);ee=Xn.error,O=Xn.name,he=Nr(ot)}}else v([O],!0),ee=(await k0(M,o,x,t.shouldUseNativeValidation))[O],v([O]),X(Be),Y&&(ee?he=!1:d.isValid&&(he=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),R(O,he,ee,Bt))}},I=(S,N)=>{if(le(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let O,Y;const M=al(S);if(t.resolver){const H=await P(Ft(S)?S:M);O=Nr(H),Y=S?!M.some(X=>le(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=le(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&w()):Y=O=await L(n);return f.state.next({...!Mn(S)||d.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),N.shouldFocus&&!Y&&ll(n,I,S?M:a.mount),Y},z=S=>{const N={...i.mount?o:s};return Ft(S)?N:Mn(S)?le(N,S):S.map(O=>le(N,O))},V=(S,N)=>({invalid:!!le((N||r).errors,S),isDirty:!!le((N||r).dirtyFields,S),error:le((N||r).errors,S),isValidating:!!le(r.validatingFields,S),isTouched:!!le((N||r).touchedFields,S)}),de=S=>{S&&al(S).forEach(N=>Ht(r.errors,N)),f.state.next({errors:S?r.errors:{}})},ne=(S,N,O)=>{const Y=(le(n,S,{_f:{}})._f||{}).ref,M=le(r.errors,S)||{},{ref:H,message:X,type:ee,...he}=M;dt(r.errors,S,{...he,...N,ref:Y}),f.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Ks(S)?f.values.subscribe({next:O=>S(F(void 0,N),O)}):F(S,N,!0),je=(S,N={})=>{for(const O of S?al(S):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(Ht(n,O),Ht(o,O)),!N.keepError&&Ht(r.errors,O),!N.keepDirty&&Ht(r.dirtyFields,O),!N.keepTouched&&Ht(r.touchedFields,O),!N.keepIsValidating&&Ht(r.validatingFields,O),!t.shouldUnregister&&!N.keepDefaultValue&&Ht(s,O);f.values.next({values:{...o}}),f.state.next({...r,...N.keepDirty?{isDirty:j()}:{}}),!N.keepIsValid&&w()},fe=({disabled:S,name:N,field:O,fields:Y,value:M})=>{if(An(S)&&i.mount||S){const H=S?void 0:Ft(M)?Lh(O?O._f:le(Y,N)._f):M;dt(o,N,H),T(N,H,!1,!1,!0)}},ve=(S,N={})=>{let O=le(n,S);const Y=An(N.disabled);return dt(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),O?fe({field:O,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Ua(N.min),max:Ua(N.max),minLength:Ua(N.minLength),maxLength:Ua(N.maxLength),pattern:Ua(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ve(S,N),O=le(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=V5(H),ee=O._f.refs||[];if(X?ee.find(he=>he===H):H===O._f.ref)return;dt(n,S,{_f:{...O._f,...X?{refs:[...ee.filter(Ih),H,...Array.isArray(le(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else O=le(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(LC(a.array,S)&&i.action)&&a.unMount.add(S)}}},Se=()=>t.shouldFocusError&&ll(n,I,a.mount),Ie=S=>{An(S)&&(f.state.next({disabled:S}),ll(n,(N,O)=>{const Y=le(n,O);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Ne=(S,N)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=wr(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await D();r.errors=H,M=X}else await L(n);if(Ht(r.errors,"root"),Nr(r.errors)){f.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else N&&await N({...r.errors},O),Se(),setTimeout(Se);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Nr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},ke=(S,N={})=>{le(n,S)&&(Ft(N.defaultValue)?$(S,wr(le(s,S))):($(S,N.defaultValue),dt(s,S,wr(N.defaultValue))),N.keepTouched||Ht(r.touchedFields,S),N.keepDirty||(Ht(r.dirtyFields,S),r.isDirty=N.defaultValue?j(S,wr(le(s,S))):j()),N.keepError||(Ht(r.errors,S),d.isValid&&w()),f.state.next({...r}))},rt=(S,N={})=>{const O=S?wr(S):s,Y=wr(O),M=Nr(S),H=M?s:Y;if(N.keepDefaultValues||(s=O),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)le(r.dirtyFields,X)?dt(H,X,le(o,X)):$(X,le(H,X));else{if(Av&&Ft(S))for(const X of a.mount){const ee=le(n,X);if(ee&&ee._f){const he=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(wd(he)){const Be=he.closest("form");if(Be){Be.reset();break}}}}n={}}o=e.shouldUnregister?N.keepDefaultValues?wr(s):{}:wr(H),f.array.next({values:{...H}}),f.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Mo(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&o?lu(s,o):r.dirtyFields:N.keepDefaultValues&&S?lu(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>rt(Ks(S)?S(o):S,N);return{control:{register:ve,unregister:je,getFieldState:V,handleSubmit:Ne,setError:ne,_executeSchema:D,_getWatch:F,_getDirty:j,_updateValid:w,_removeUnmounted:q,_updateFieldArray:p,_updateDisabledField:fe,_getFieldArray:b,_reset:rt,_resetDefaultValues:()=>Ks(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Ie,_subjects:f,_proxyFormState:d,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ve,handleSubmit:Ne,watch:se,setValue:$,getValues:z,reset:k,resetField:ke,clearErrors:de,unregister:je,setError:ne,setFocus:(S,N={})=>{const O=le(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function Sn(e={}){const t=et.useRef(),r=et.useRef(),[n,s]=et.useState({isDirty:!1,isValidating:!1,isLoading:Ks(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ks(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Z5(e),formState:n});const o=t.current.control;return o._options=e,Mv({subject:o._subjects.state,next:i=>{VC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),et.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),et.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),et.useEffect(()=>{e.values&&!Mo(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),et.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),et.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),et.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=UC(n,o),t.current}const E0=(e,t,r)=>{if(e&&"reportValidity"in e){const n=le(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},XC=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?E0(n.ref,r,e):n.refs&&n.refs.forEach(s=>E0(s,r,e))}},K5=(e,t)=>{t.shouldUseNativeValidation&&XC(e,t);const r={};for(const n in e){const s=le(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(G5(t.names||Object.keys(e),n)){const i=Object.assign({},le(r,n));dt(i,"root",o),dt(r,n,i)}else dt(r,n,o)}return r},G5=(e,t)=>e.some(r=>r.startsWith(t+"."));var q5=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=r[i].types,u=l&&l[n.code];r[i]=BC(i,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},kn=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return o.shouldUseNativeValidation&&XC({},o),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:K5(q5(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},nt;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(nt||(nt={}));var sm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(sm||(sm={}));const xe=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$s=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?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(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},ie=nt.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"]),X5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),n}static assert(t){if(!(t instanceof Lr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const ia=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===xe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,nt.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${nt.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${nt.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${nt.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ie.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ie.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,nt.assertNever(e)}return{message:r}};let QC=ia;function Q5(e){QC=e}function kd(){return QC}const Cd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},J5=[];function pe(e,t){const r=kd(),n=Cd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ia?void 0:ia].filter(s=>!!s)});e.common.issues.push(n)}class cr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return $e;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return cr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return $e;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const $e=Object.freeze({status:"aborted"}),Oi=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),om=e=>e.status==="aborted",im=e=>e.status==="dirty",Wl=e=>e.status==="valid",$l=e=>typeof Promise<"u"&&e instanceof Promise;function Ed(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function JC(e,t,r,n,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var Ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ee||(Ee={}));var Za,Ka;class Wn{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const T0=(e,t)=>{if(Wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Lr(e.common.issues);return this._error=r,this._error}}};function He(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??n)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class qe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return $s(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:$s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cr,ctx:{common:t.parent.common,data:t.data,parsedType:$s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if($l(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$s(t)},o=this._parseSync({data:t,path:s.path,parent:s});return T0(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$s(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await($l(s)?s:Promise.resolve(s));return T0(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ie.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new xn({schema:this,typeName:Ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zn.create(this,this._def)}nullable(){return po.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return hn.create(this,this._def)}promise(){return la.create(this,this._def)}or(t){return Zl.create([this,t],this._def)}and(t){return Kl.create(this,t,this._def)}transform(t){return new xn({...He(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Jl({...He(this._def),innerType:this,defaultValue:r,typeName:Ue.ZodDefault})}brand(){return new Fv({typeName:Ue.ZodBranded,type:this,...He(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new ec({...He(this._def),innerType:this,catchValue:r,typeName:Ue.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return bc.create(this,t)}readonly(){return tc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const e6=/^c[^\s-]{8,}$/i,t6=/^[0-9a-z]+$/,r6=/^[0-9A-HJKMNP-TV-Z]{26}$/,n6=/^[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,s6=/^[a-z0-9_-]{21}$/i,o6=/^[-+]?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)?)??$/,i6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,a6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fh;const l6=/^(?:(?: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])$/,c6=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,u6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eE="((\\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])))",d6=new RegExp(`^${eE}$`);function tE(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function f6(e){return new RegExp(`^${tE(e)}$`)}function rE(e){let t=`${eE}T${tE(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function h6(e,t){return!!((t==="v4"||!t)&&l6.test(e)||(t==="v6"||!t)&&c6.test(e))}class un extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:xe.string,received:o.parsedType}),$e}const n=new cr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&pe(s,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")i6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"email",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Fh||(Fh=new RegExp(a6,"u")),Fh.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"emoji",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")n6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"uuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")s6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"nanoid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")e6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"cuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")t6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"cuid2",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")r6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"ulid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),pe(s,{validation:"url",code:ie.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"regex",code:ie.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?rE(o).test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?d6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?f6(o).test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?o6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"duration",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?h6(t.data,o.version)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"ip",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?u6.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"base64",code:ie.invalid_string,message:o.message}),n.dirty()):nt.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:ie.invalid_string,...Ee.errToObj(n)})}_addCheck(t){return new un({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ee.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ee.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ee.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...Ee.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ee.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ee.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ee.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ee.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ee.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ee.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ee.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ee.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ee.errToObj(r)})}nonempty(t){return this.min(1,Ee.errToObj(t))}trim(){return new un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}un.create=e=>{var t;return new un({checks:[],typeName:Ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};function p6(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class uo extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:xe.number,received:o.parsedType}),$e}let n;const s=new cr;for(const o of this._def.checks)o.kind==="int"?nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?p6(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_finite,message:o.message}),s.dirty()):nt.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ee.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ee.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ee.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ee.toString(r))}setLimit(t,r,n,s){return new uo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ee.toString(s)}]})}_addCheck(t){return new uo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}uo.create=e=>new uo({checks:[],typeName:Ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class fo extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:xe.bigint,received:o.parsedType}),$e}let n;const s=new cr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):nt.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ee.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ee.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ee.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ee.toString(r))}setLimit(t,r,n,s){return new fo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ee.toString(s)}]})}_addCheck(t){return new fo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}fo.create=e=>{var t;return new fo({checks:[],typeName:Ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};class Bl extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.boolean,received:n.parsedType}),$e}return mr(t.data)}}Bl.create=e=>new Bl({typeName:Ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class qo extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:xe.date,received:o.parsedType}),$e}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_date}),$e}const n=new cr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):nt.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ee.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ee.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}qo.create=e=>new qo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ue.ZodDate,...He(e)});class Td extends qe{_parse(t){if(this._getType(t)!==xe.symbol){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.symbol,received:n.parsedType}),$e}return mr(t.data)}}Td.create=e=>new Td({typeName:Ue.ZodSymbol,...He(e)});class Hl extends qe{_parse(t){if(this._getType(t)!==xe.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.undefined,received:n.parsedType}),$e}return mr(t.data)}}Hl.create=e=>new Hl({typeName:Ue.ZodUndefined,...He(e)});class Yl extends qe{_parse(t){if(this._getType(t)!==xe.null){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.null,received:n.parsedType}),$e}return mr(t.data)}}Yl.create=e=>new Yl({typeName:Ue.ZodNull,...He(e)});class aa extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}aa.create=e=>new aa({typeName:Ue.ZodAny,...He(e)});class zo extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}zo.create=e=>new zo({typeName:Ue.ZodUnknown,...He(e)});class Ss extends qe{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ie.invalid_type,expected:xe.never,received:r.parsedType}),$e}}Ss.create=e=>new Ss({typeName:Ue.ZodNever,...He(e)});class jd extends qe{_parse(t){if(this._getType(t)!==xe.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.void,received:n.parsedType}),$e}return mr(t.data)}}jd.create=e=>new jd({typeName:Ue.ZodVoid,...He(e)});class hn extends qe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==xe.array)return pe(r,{code:ie.invalid_type,expected:xe.array,received:r.parsedType}),$e;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(pe(r,{code:i?ie.too_big:ie.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(pe(r,{code:ie.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(pe(r,{code:ie.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Wn(r,i,r.path,a)))).then(i=>cr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Wn(r,i,r.path,a)));return cr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new hn({...this._def,minLength:{value:t,message:Ee.toString(r)}})}max(t,r){return new hn({...this._def,maxLength:{value:t,message:Ee.toString(r)}})}length(t,r){return new hn({...this._def,exactLength:{value:t,message:Ee.toString(r)}})}nonempty(t){return this.min(1,t)}}hn.create=(e,t)=>new hn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...He(t)});function yi(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=zn.create(yi(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof hn?new hn({...e._def,type:yi(e.element)}):e instanceof zn?zn.create(yi(e.unwrap())):e instanceof po?po.create(yi(e.unwrap())):e instanceof $n?$n.create(e.items.map(t=>yi(t))):e}class Rt extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==xe.object){const u=this._getOrReturnCtx(t);return pe(u,{code:ie.invalid_type,expected:xe.object,received:u.parsedType}),$e}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ss&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const d=o[u],f=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Wn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Ss){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(pe(s,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Wn(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key,m=await d.value;u.push({key:f,value:m,alwaysSet:d.alwaysSet})}return u}).then(u=>cr.mergeObjectSync(n,u)):cr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ee.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ee.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ue.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}omit(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return yi(this)}partial(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Rt({...this._def,shape:()=>r})}required(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof zn;)o=o._def.innerType;r[n]=o}}),new Rt({...this._def,shape:()=>r})}keyof(){return nE(nt.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Ss.create(),typeName:Ue.ZodObject,...He(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Ss.create(),typeName:Ue.ZodObject,...He(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Ss.create(),typeName:Ue.ZodObject,...He(t)});class Zl extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Lr(a.ctx.common.issues));return pe(r,{code:ie.invalid_union,unionErrors:i}),$e}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Lr(l));return pe(r,{code:ie.invalid_union,unionErrors:a}),$e}}get options(){return this._def.options}}Zl.create=(e,t)=>new Zl({options:e,typeName:Ue.ZodUnion,...He(t)});const rs=e=>e instanceof ql?rs(e.schema):e instanceof xn?rs(e.innerType()):e instanceof Xl?[e.value]:e instanceof ho?e.options:e instanceof Ql?nt.objectValues(e.enum):e instanceof Jl?rs(e._def.innerType):e instanceof Hl?[void 0]:e instanceof Yl?[null]:e instanceof zn?[void 0,...rs(e.unwrap())]:e instanceof po?[null,...rs(e.unwrap())]:e instanceof Fv||e instanceof tc?rs(e.unwrap()):e instanceof ec?rs(e._def.innerType):[];class Mf extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return pe(r,{code:ie.invalid_type,expected:xe.object,received:r.parsedType}),$e;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),$e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=rs(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Mf({typeName:Ue.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}}function am(e,t){const r=$s(e),n=$s(t);if(e===t)return{valid:!0,data:e};if(r===xe.object&&n===xe.object){const s=nt.objectKeys(t),o=nt.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=am(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(r===xe.array&&n===xe.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],l=am(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===xe.date&&n===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Kl extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(om(o)||om(i))return $e;const a=am(o.value,i.value);return a.valid?((im(o)||im(i))&&r.dirty(),{status:r.value,value:a.data}):(pe(n,{code:ie.invalid_intersection_types}),$e)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Kl.create=(e,t,r)=>new Kl({left:e,right:t,typeName:Ue.ZodIntersection,...He(r)});class $n extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.array)return pe(n,{code:ie.invalid_type,expected:xe.array,received:n.parsedType}),$e;if(n.data.length<this._def.items.length)return pe(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$e;!this._def.rest&&n.data.length>this._def.items.length&&(pe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Wn(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>cr.mergeArray(r,i)):cr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new $n({...this._def,rest:t})}}$n.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $n({items:e,typeName:Ue.ZodTuple,rest:null,...He(t)})};class Gl extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return pe(n,{code:ie.invalid_type,expected:xe.object,received:n.parsedType}),$e;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Wn(n,a,n.path,a)),value:i._parse(new Wn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?cr.mergeObjectAsync(r,s):cr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof qe?new Gl({keyType:t,valueType:r,typeName:Ue.ZodRecord,...He(n)}):new Gl({keyType:un.create(),valueType:t,typeName:Ue.ZodRecord,...He(r)})}}class Nd extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.map)return pe(n,{code:ie.invalid_type,expected:xe.map,received:n.parsedType}),$e;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Wn(n,a,n.path,[u,"key"])),value:o._parse(new Wn(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return $e;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return $e;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}}Nd.create=(e,t,r)=>new Nd({valueType:t,keyType:e,typeName:Ue.ZodMap,...He(r)});class Xo extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.set)return pe(n,{code:ie.invalid_type,expected:xe.set,received:n.parsedType}),$e;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(pe(n,{code:ie.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(pe(n,{code:ie.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const u=new Set;for(const d of l){if(d.status==="aborted")return $e;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>o._parse(new Wn(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,r){return new Xo({...this._def,minSize:{value:t,message:Ee.toString(r)}})}max(t,r){return new Xo({...this._def,maxSize:{value:t,message:Ee.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Xo.create=(e,t)=>new Xo({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...He(t)});class Gi extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.function)return pe(r,{code:ie.invalid_type,expected:xe.function,received:r.parsedType}),$e;function n(a,l){return Cd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kd(),ia].filter(u=>!!u),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function s(a,l){return Cd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,kd(),ia].filter(u=>!!u),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof la){const a=this;return mr(async function(...l){const u=new Lr([]),d=await a._def.args.parseAsync(l,o).catch(h=>{throw u.addIssue(n(l,h)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(h=>{throw u.addIssue(s(f,h)),u})})}else{const a=this;return mr(function(...l){const u=a._def.args.safeParse(l,o);if(!u.success)throw new Lr([n(l,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Lr([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Gi({...this._def,args:$n.create(t).rest(zo.create())})}returns(t){return new Gi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Gi({args:t||$n.create([]).rest(zo.create()),returns:r||zo.create(),typeName:Ue.ZodFunction,...He(n)})}}class ql extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ql.create=(e,t)=>new ql({getter:e,typeName:Ue.ZodLazy,...He(t)});class Xl extends qe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),$e}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xl.create=(e,t)=>new Xl({value:e,typeName:Ue.ZodLiteral,...He(t)});function nE(e,t){return new ho({values:e,typeName:Ue.ZodEnum,...He(t)})}class ho extends qe{constructor(){super(...arguments),Za.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{expected:nt.joinValues(n),received:r.parsedType,code:ie.invalid_type}),$e}if(Ed(this,Za)||JC(this,Za,new Set(this._def.values)),!Ed(this,Za).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),$e}return mr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return ho.create(t,{...this._def,...r})}exclude(t,r=this._def){return ho.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Za=new WeakMap;ho.create=nE;class Ql extends qe{constructor(){super(...arguments),Ka.set(this,void 0)}_parse(t){const r=nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==xe.string&&n.parsedType!==xe.number){const s=nt.objectValues(r);return pe(n,{expected:nt.joinValues(s),received:n.parsedType,code:ie.invalid_type}),$e}if(Ed(this,Ka)||JC(this,Ka,new Set(nt.getValidEnumValues(this._def.values))),!Ed(this,Ka).has(t.data)){const s=nt.objectValues(r);return pe(n,{received:n.data,code:ie.invalid_enum_value,options:s}),$e}return mr(t.data)}get enum(){return this._def.values}}Ka=new WeakMap;Ql.create=(e,t)=>new Ql({values:e,typeName:Ue.ZodNativeEnum,...He(t)});class la extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.promise&&r.common.async===!1)return pe(r,{code:ie.invalid_type,expected:xe.promise,received:r.parsedType}),$e;const n=r.parsedType===xe.promise?r.data:Promise.resolve(r.data);return mr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}la.create=(e,t)=>new la({type:e,typeName:Ue.ZodPromise,...He(t)});class xn extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{pe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return $e;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?$e:l.status==="dirty"||r.value==="dirty"?Oi(l.value):l});{if(r.value==="aborted")return $e;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?$e:a.status==="dirty"||r.value==="dirty"?Oi(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?$e:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?$e:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Wl(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Wl(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);nt.assertNever(s)}}xn.create=(e,t,r)=>new xn({schema:e,typeName:Ue.ZodEffects,effect:t,...He(r)});xn.createWithPreprocess=(e,t,r)=>new xn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...He(r)});class zn extends qe{_parse(t){return this._getType(t)===xe.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:Ue.ZodOptional,...He(t)});class po extends qe{_parse(t){return this._getType(t)===xe.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}po.create=(e,t)=>new po({innerType:e,typeName:Ue.ZodNullable,...He(t)});class Jl extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===xe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Jl.create=(e,t)=>new Jl({innerType:e,typeName:Ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});class ec extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return $l(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ec.create=(e,t)=>new ec({innerType:e,typeName:Ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});class Rd extends qe{_parse(t){if(this._getType(t)!==xe.nan){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:xe.nan,received:n.parsedType}),$e}return{status:"valid",value:t.data}}}Rd.create=e=>new Rd({typeName:Ue.ZodNaN,...He(e)});const m6=Symbol("zod_brand");class Fv extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class bc extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?$e:o.status==="dirty"?(r.dirty(),Oi(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?$e:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new bc({in:t,out:r,typeName:Ue.ZodPipeline})}}class tc extends qe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Wl(s)&&(s.value=Object.freeze(s.value)),s);return $l(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}tc.create=(e,t)=>new tc({innerType:e,typeName:Ue.ZodReadonly,...He(t)});function sE(e,t={},r){return e?aa.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):aa.create()}const g6={object:Rt.lazycreate};var Ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ue||(Ue={}));const v6=(e,t={message:`Input not instance of ${e.name}`})=>sE(r=>r instanceof e,t),oE=un.create,iE=uo.create,y6=Rd.create,x6=fo.create,aE=Bl.create,w6=qo.create,_6=Td.create,b6=Hl.create,S6=Yl.create,k6=aa.create,C6=zo.create,E6=Ss.create,T6=jd.create,j6=hn.create,N6=Rt.create,R6=Rt.strictCreate,P6=Zl.create,D6=Mf.create,A6=Kl.create,O6=$n.create,M6=Gl.create,I6=Nd.create,L6=Xo.create,F6=Gi.create,z6=ql.create,U6=Xl.create,V6=ho.create,W6=Ql.create,$6=la.create,j0=xn.create,B6=zn.create,H6=po.create,Y6=xn.createWithPreprocess,Z6=bc.create,K6=()=>oE().optional(),G6=()=>iE().optional(),q6=()=>aE().optional(),X6={string:e=>un.create({...e,coerce:!0}),number:e=>uo.create({...e,coerce:!0}),boolean:e=>Bl.create({...e,coerce:!0}),bigint:e=>fo.create({...e,coerce:!0}),date:e=>qo.create({...e,coerce:!0})},Q6=$e;var be=Object.freeze({__proto__:null,defaultErrorMap:ia,setErrorMap:Q5,getErrorMap:kd,makeIssue:Cd,EMPTY_PATH:J5,addIssueToContext:pe,ParseStatus:cr,INVALID:$e,DIRTY:Oi,OK:mr,isAborted:om,isDirty:im,isValid:Wl,isAsync:$l,get util(){return nt},get objectUtil(){return sm},ZodParsedType:xe,getParsedType:$s,ZodType:qe,datetimeRegex:rE,ZodString:un,ZodNumber:uo,ZodBigInt:fo,ZodBoolean:Bl,ZodDate:qo,ZodSymbol:Td,ZodUndefined:Hl,ZodNull:Yl,ZodAny:aa,ZodUnknown:zo,ZodNever:Ss,ZodVoid:jd,ZodArray:hn,ZodObject:Rt,ZodUnion:Zl,ZodDiscriminatedUnion:Mf,ZodIntersection:Kl,ZodTuple:$n,ZodRecord:Gl,ZodMap:Nd,ZodSet:Xo,ZodFunction:Gi,ZodLazy:ql,ZodLiteral:Xl,ZodEnum:ho,ZodNativeEnum:Ql,ZodPromise:la,ZodEffects:xn,ZodTransformer:xn,ZodOptional:zn,ZodNullable:po,ZodDefault:Jl,ZodCatch:ec,ZodNaN:Rd,BRAND:m6,ZodBranded:Fv,ZodPipeline:bc,ZodReadonly:tc,custom:sE,Schema:qe,ZodSchema:qe,late:g6,get ZodFirstPartyTypeKind(){return Ue},coerce:X6,any:k6,array:j6,bigint:x6,boolean:aE,date:w6,discriminatedUnion:D6,effect:j0,enum:V6,function:F6,instanceof:v6,intersection:A6,lazy:z6,literal:U6,map:I6,nan:y6,nativeEnum:W6,never:E6,null:S6,nullable:H6,number:iE,object:N6,oboolean:q6,onumber:G6,optional:B6,ostring:K6,pipeline:Z6,preprocess:Y6,promise:$6,record:M6,set:L6,strictObject:R6,string:oE,symbol:_6,transformer:j0,tuple:O6,undefined:b6,union:P6,unknown:C6,void:T6,NEVER:Q6,ZodIssueCode:ie,quotelessJson:X5,ZodError:Lr}),J6="Label",lE=y.forwardRef((e,t)=>c.jsx(Ve.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));lE.displayName=J6;var cE=lE;const ez=ac("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),zv=y.forwardRef(({className:e,...t},r)=>c.jsx(cE,{ref:r,className:me(ez(),e),...t}));zv.displayName=cE.displayName;const Cn=A5,uE=y.createContext({}),Me=({...e})=>c.jsx(uE.Provider,{value:{name:e.name},children:c.jsx(L5,{...e})}),If=()=>{const e=y.useContext(uE),t=y.useContext(dE),{getFieldState:r,formState:n}=Of(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},dE=y.createContext({}),Pe=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return c.jsx(dE.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:me("space-y-2",e),...t})})});Pe.displayName="FormItem";const De=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=If();return c.jsx(zv,{ref:r,className:me(n&&"text-destructive",e),htmlFor:s,...t})});De.displayName="FormLabel";const Ae=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=If();return c.jsx(xs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});Ae.displayName="FormControl";const tz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=If();return c.jsx("p",{ref:r,id:n,className:me("text-sm text-muted-foreground",e),...t})});tz.displayName="FormDescription";const Te=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=If(),i=s?String(s==null?void 0:s.message):t;return i?c.jsx("p",{ref:n,id:o,className:me("text-sm font-medium text-destructive",e),...r,children:i}):null});Te.displayName="FormMessage";function lm(e,[t,r]){return Math.min(r,Math.max(t,e))}var rz=[" ","Enter","ArrowUp","ArrowDown"],nz=[" ","Enter"],Sc="Select",[Lf,Ff,sz]=rf(Sc),[Sa,b8]=Qr(Sc,[sz,xa]),zf=xa(),[oz,wo]=Sa(Sc),[iz,az]=Sa(Sc),fE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:m,required:h}=e,x=zf(t),[g,w]=y.useState(null),[v,p]=y.useState(null),[_,C]=y.useState(!1),E=nf(u),[T=!1,R]=io({prop:n,defaultProp:s,onChange:o}),[D,P]=io({prop:i,defaultProp:a,onChange:l}),L=y.useRef(null),q=g?!!g.closest("form"):!0,[j,F]=y.useState(new Set),b=Array.from(j).map(W=>W.props.value).join(";");return c.jsx(Pg,{...x,children:c.jsxs(oz,{required:h,scope:t,trigger:g,onTriggerChange:w,valueNode:v,onValueNodeChange:p,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Fn(),value:D,onValueChange:P,open:T,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:m,children:[c.jsx(Lf.Provider,{scope:t,children:c.jsx(iz,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(W=>{F(te=>new Set(te).add(W))},[]),onNativeOptionRemove:y.useCallback(W=>{F(te=>{const $=new Set(te);return $.delete(W),$})},[]),children:r})}),q?c.jsxs(FE,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:W=>P(W.target.value),disabled:m,children:[D===void 0?c.jsx("option",{value:""}):null,Array.from(j)]},b):null]})})};fE.displayName=Sc;var hE="SelectTrigger",pE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=zf(r),i=wo(hE,r),a=i.disabled||n,l=Xe(t,i.onTriggerChange),u=Ff(r),[d,f,m]=zE(x=>{const g=u().filter(p=>!p.disabled),w=g.find(p=>p.value===i.value),v=UE(g,x,w);v!==void 0&&i.onValueChange(v.value)}),h=()=>{a||(i.onOpenChange(!0),m())};return c.jsx(Dg,{asChild:!0,...o,children:c.jsx(Ve.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":LE(i.value)?"":void 0,...s,ref:l,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(h(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&rz.includes(x.key)&&(h(),x.preventDefault())})})})});pE.displayName=hE;var mE="SelectValue",gE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,l=wo(mE,r),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=Xe(t,l.onValueNodeChange);return nr(()=>{u(d)},[u,d]),c.jsx(Ve.span,{...a,ref:f,style:{pointerEvents:"none"},children:LE(l.value)?c.jsx(c.Fragment,{children:i}):o})});gE.displayName=mE;var lz="SelectIcon",vE=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Ve.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});vE.displayName=lz;var cz="SelectPortal",yE=e=>c.jsx(cc,{asChild:!0,...e});yE.displayName=cz;var Qo="SelectContent",xE=y.forwardRef((e,t)=>{const r=wo(Qo,e.__scopeSelect),[n,s]=y.useState();if(nr(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Cs.createPortal(c.jsx(wE,{scope:e.__scopeSelect,children:c.jsx(Lf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),o):null}return c.jsx(_E,{...e,ref:t})});xE.displayName=Qo;var os=10,[wE,_o]=Sa(Qo),uz="SelectContentImpl",_E=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:x,hideWhenDetached:g,avoidCollisions:w,...v}=e,p=wo(Qo,r),[_,C]=y.useState(null),[E,T]=y.useState(null),R=Xe(t,fe=>C(fe)),[D,P]=y.useState(null),[L,q]=y.useState(null),j=Ff(r),[F,b]=y.useState(!1),W=y.useRef(!1);y.useEffect(()=>{if(_)return Mg(_)},[_]),bg();const te=y.useCallback(fe=>{const[ve,...Se]=j().map(ke=>ke.ref.current),[Ie]=Se.slice(-1),Ne=document.activeElement;for(const ke of fe)if(ke===Ne||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===ve&&E&&(E.scrollTop=0),ke===Ie&&E&&(E.scrollTop=E.scrollHeight),ke==null||ke.focus(),document.activeElement!==Ne))return},[j,E]),$=y.useCallback(()=>te([D,_]),[te,D,_]);y.useEffect(()=>{F&&$()},[F,$]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=p;y.useEffect(()=>{if(_){let fe={x:0,y:0};const ve=Ie=>{var Ne,ke;fe={x:Math.abs(Math.round(Ie.pageX)-(((Ne=I.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(Ie.pageY)-(((ke=I.current)==null?void 0:ke.y)??0))}},Se=Ie=>{fe.x<=10&&fe.y<=10?Ie.preventDefault():_.contains(Ie.target)||Z(!1),document.removeEventListener("pointermove",ve),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ve),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",Se,{capture:!0})}}},[_,Z,I]),y.useEffect(()=>{const fe=()=>Z(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[Z]);const[Q,z]=zE(fe=>{const ve=j().filter(Ne=>!Ne.disabled),Se=ve.find(Ne=>Ne.ref.current===document.activeElement),Ie=UE(ve,fe,Se);Ie&&setTimeout(()=>Ie.ref.current.focus())}),V=y.useCallback((fe,ve,Se)=>{const Ie=!W.current&&!Se;(p.value!==void 0&&p.value===ve||Ie)&&(P(fe),Ie&&(W.current=!0))},[p.value]),de=y.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=y.useCallback((fe,ve,Se)=>{const Ie=!W.current&&!Se;(p.value!==void 0&&p.value===ve||Ie)&&q(fe)},[p.value]),se=n==="popper"?cm:bE,je=se===cm?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:x,hideWhenDetached:g,avoidCollisions:w}:{};return c.jsx(wE,{scope:r,content:_,viewport:E,onViewportChange:T,itemRefCallback:V,selectedItem:D,onItemLeave:de,itemTextRefCallback:ne,focusSelectedItem:$,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:c.jsx(uf,{as:xs,allowPinchZoom:!0,children:c.jsx(sf,{asChild:!0,trapped:p.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:ue(s,fe=>{var ve;(ve=p.trigger)==null||ve.focus({preventScroll:!0}),fe.preventDefault()}),children:c.jsx(ga,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:fe=>fe.preventDefault(),...v,...je,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ue(v.onKeyDown,fe=>{const ve=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ve&&fe.key.length===1&&z(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Ie=j().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Ie=Ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Ne=fe.target,ke=Ie.indexOf(Ne);Ie=Ie.slice(ke+1)}setTimeout(()=>te(Ie)),fe.preventDefault()}})})})})})})});_E.displayName=uz;var dz="SelectItemAlignedPosition",bE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=wo(Qo,r),i=_o(Qo,r),[a,l]=y.useState(null),[u,d]=y.useState(null),f=Xe(t,R=>d(R)),m=Ff(r),h=y.useRef(!1),x=y.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:v,focusSelectedItem:p}=i,_=y.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&g&&w&&v){const R=o.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),P=o.valueNode.getBoundingClientRect(),L=v.getBoundingClientRect();if(o.dir!=="rtl"){const Ne=L.left-D.left,ke=P.left-Ne,rt=R.left-ke,k=R.width+rt,J=Math.max(k,D.width),K=window.innerWidth-os,A=lm(ke,[os,K-J]);a.style.minWidth=k+"px",a.style.left=A+"px"}else{const Ne=D.right-L.right,ke=window.innerWidth-P.right-Ne,rt=window.innerWidth-R.right-ke,k=R.width+rt,J=Math.max(k,D.width),K=window.innerWidth-os,A=lm(ke,[os,K-J]);a.style.minWidth=k+"px",a.style.right=A+"px"}const q=m(),j=window.innerHeight-os*2,F=g.scrollHeight,b=window.getComputedStyle(u),W=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),$=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=W+te+F+Z+$,Q=Math.min(w.offsetHeight*5,I),z=window.getComputedStyle(g),V=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-os,se=j-ne,je=w.offsetHeight/2,fe=w.offsetTop+je,ve=W+te+fe,Se=I-ve;if(ve<=ne){const Ne=w===q[q.length-1].ref.current;a.style.bottom="0px";const ke=u.clientHeight-g.offsetTop-g.offsetHeight,rt=Math.max(se,je+(Ne?de:0)+ke+$),k=ve+rt;a.style.height=k+"px"}else{const Ne=w===q[0].ref.current;a.style.top="0px";const rt=Math.max(ne,W+g.offsetTop+(Ne?V:0)+je)+Se;a.style.height=rt+"px",g.scrollTop=ve-ne+g.offsetTop}a.style.margin=`${os}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=j+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[m,o.trigger,o.valueNode,a,u,g,w,v,o.dir,n]);nr(()=>_(),[_]);const[C,E]=y.useState();nr(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const T=y.useCallback(R=>{R&&x.current===!0&&(_(),p==null||p(),x.current=!1)},[_,p]);return c.jsx(hz,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Ve.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});bE.displayName=dz;var fz="SelectPopperPosition",cm=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=os,...o}=e,i=zf(r);return c.jsx(Ag,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});cm.displayName=fz;var[hz,Uv]=Sa(Qo,{}),um="SelectViewport",SE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=_o(um,r),i=Uv(um,r),a=Xe(t,o.onViewportChange),l=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Lf.Slot,{scope:r,children:c.jsx(Ve.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&f){const h=Math.abs(l.current-d.scrollTop);if(h>0){const x=window.innerHeight-os*2,g=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),v=Math.max(g,w);if(v<x){const p=v+h,_=Math.min(x,p),C=p-_;f.style.height=_+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});SE.displayName=um;var kE="SelectGroup",[pz,mz]=Sa(kE),CE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Fn();return c.jsx(pz,{scope:r,id:s,children:c.jsx(Ve.div,{role:"group","aria-labelledby":s,...n,ref:t})})});CE.displayName=kE;var EE="SelectLabel",TE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=mz(EE,r);return c.jsx(Ve.div,{id:s.id,...n,ref:t})});TE.displayName=EE;var Pd="SelectItem",[gz,jE]=Sa(Pd),NE=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=wo(Pd,r),l=_o(Pd,r),u=a.value===n,[d,f]=y.useState(o??""),[m,h]=y.useState(!1),x=Xe(t,v=>{var p;return(p=l.itemRefCallback)==null?void 0:p.call(l,v,n,s)}),g=Fn(),w=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(gz,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:y.useCallback(v=>{f(p=>p||((v==null?void 0:v.textContent)??"").trim())},[]),children:c.jsx(Lf.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:c.jsx(Ve.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>h(!0)),onBlur:ue(i.onBlur,()=>h(!1)),onPointerUp:ue(i.onPointerUp,w),onPointerMove:ue(i.onPointerMove,v=>{var p;s?(p=l.onItemLeave)==null||p.call(l):v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,v=>{var p;v.currentTarget===document.activeElement&&((p=l.onItemLeave)==null||p.call(l))}),onKeyDown:ue(i.onKeyDown,v=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&v.key===" "||(nz.includes(v.key)&&w(),v.key===" "&&v.preventDefault())})})})})});NE.displayName=Pd;var Ga="SelectItemText",RE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=wo(Ga,r),a=_o(Ga,r),l=jE(Ga,r),u=az(Ga,r),[d,f]=y.useState(null),m=Xe(t,v=>f(v),l.onItemTextChange,v=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,v,l.value,l.disabled)}),h=d==null?void 0:d.textContent,x=y.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return nr(()=>(g(x),()=>w(x)),[g,w,x]),c.jsxs(c.Fragment,{children:[c.jsx(Ve.span,{id:l.textId,...o,ref:m}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Cs.createPortal(o.children,i.valueNode):null]})});RE.displayName=Ga;var PE="SelectItemIndicator",DE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return jE(PE,r).isSelected?c.jsx(Ve.span,{"aria-hidden":!0,...n,ref:t}):null});DE.displayName=PE;var dm="SelectScrollUpButton",AE=y.forwardRef((e,t)=>{const r=_o(dm,e.__scopeSelect),n=Uv(dm,e.__scopeSelect),[s,o]=y.useState(!1),i=Xe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;o(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(ME,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});AE.displayName=dm;var fm="SelectScrollDownButton",OE=y.forwardRef((e,t)=>{const r=_o(fm,e.__scopeSelect),n=Uv(fm,e.__scopeSelect),[s,o]=y.useState(!1),i=Xe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;o(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(ME,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});OE.displayName=fm;var ME=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=_o("SelectScrollButton",r),i=y.useRef(null),a=Ff(r),l=y.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),nr(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(Ve.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{l()})})}),vz="SelectSeparator",IE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Ve.div,{"aria-hidden":!0,...n,ref:t})});IE.displayName=vz;var hm="SelectArrow",yz=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=zf(r),o=wo(hm,r),i=_o(hm,r);return o.open&&i.position==="popper"?c.jsx(Og,{...s,...n,ref:t}):null});yz.displayName=hm;function LE(e){return e===""||e===void 0}var FE=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),o=Xe(t,s),i=Gk(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&d){const f=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(f)}},[i,r]),c.jsx(wc,{asChild:!0,children:c.jsx("select",{...n,ref:o,defaultValue:r})})});FE.displayName="BubbleSelect";function zE(e){const t=At(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(i=>{const a=r.current+i;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function UE(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=xz(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const l=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function xz(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var wz=fE,VE=pE,_z=gE,bz=vE,Sz=yE,WE=xE,kz=SE,Cz=CE,$E=TE,BE=NE,Ez=RE,Tz=DE,HE=AE,YE=OE,ZE=IE;const Pu=wz,Du=Cz,Au=_z,cl=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(VE,{ref:n,className:me("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,c.jsx(bz,{asChild:!0,children:c.jsx(u1,{className:"h-4 w-4 opacity-50"})})]}));cl.displayName=VE.displayName;const KE=y.forwardRef(({className:e,...t},r)=>c.jsx(HE,{ref:r,className:me("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(LR,{className:"h-4 w-4"})}));KE.displayName=HE.displayName;const GE=y.forwardRef(({className:e,...t},r)=>c.jsx(YE,{ref:r,className:me("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(u1,{className:"h-4 w-4"})}));GE.displayName=YE.displayName;const ul=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(Sz,{children:c.jsxs(WE,{ref:s,className:me("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(KE,{}),c.jsx(kz,{className:me("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(GE,{})]})}));ul.displayName=WE.displayName;const dl=y.forwardRef(({className:e,...t},r)=>c.jsx($E,{ref:r,className:me("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));dl.displayName=$E.displayName;const fl=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(BE,{ref:n,className:me("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Tz,{children:c.jsx(c1,{className:"h-4 w-4"})})}),c.jsx(Ez,{children:t})]}));fl.displayName=BE.displayName;const jz=y.forwardRef(({className:e,...t},r)=>c.jsx(ZE,{ref:r,className:me("-mx-1 my-1 h-px bg-muted",e),...t}));jz.displayName=ZE.displayName;const pm=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["tencent-cdn",["腾讯云-CDN","/imgs/providers/tencent.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["qiniu-cdn",["七牛云-CDN","/imgs/providers/qiniu.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),Nz=Array.from(pm.keys()),Rz=Gg,Pz=qg,Dz=Xg,qE=y.forwardRef(({className:e,...t},r)=>c.jsx(fc,{ref:r,className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qE.displayName=fc.displayName;const XE=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Dz,{children:[c.jsx(qE,{}),c.jsxs(hc,{ref:n,className:me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,c.jsxs(hf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(yg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));XE.displayName=hc.displayName;const QE=({className:e,...t})=>c.jsx("div",{className:me("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});QE.displayName="DialogHeader";const JE=y.forwardRef(({className:e,...t},r)=>c.jsx(pc,{ref:r,className:me("text-lg font-semibold leading-none tracking-tight",e),...t}));JE.displayName=pc.displayName;const Az=y.forwardRef(({className:e,...t},r)=>c.jsx(mc,{ref:r,className:me("text-sm text-muted-foreground",e),...t}));Az.displayName=mc.displayName;function Oz(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Vv="ScrollArea",[eT,S8]=Qr(Vv),[Mz,tn]=eT(Vv),tT=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=y.useState(null),[u,d]=y.useState(null),[f,m]=y.useState(null),[h,x]=y.useState(null),[g,w]=y.useState(null),[v,p]=y.useState(0),[_,C]=y.useState(0),[E,T]=y.useState(!1),[R,D]=y.useState(!1),P=Xe(t,q=>l(q)),L=nf(s);return c.jsx(Mz,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:h,onScrollbarXChange:x,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:R,onScrollbarYEnabledChange:D,onCornerWidthChange:p,onCornerHeightChange:C,children:c.jsx(Ve.div,{dir:L,...i,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});tT.displayName=Vv;var rT="ScrollAreaViewport",nT=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=tn(rT,r),a=y.useRef(null),l=Xe(t,a,i.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(Ve.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});nT.displayName=rT;var Kn="ScrollAreaScrollbar",Wv=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=tn(Kn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?c.jsx(Iz,{...n,ref:t,forceMount:r}):s.type==="scroll"?c.jsx(Lz,{...n,ref:t,forceMount:r}):s.type==="auto"?c.jsx(sT,{...n,ref:t,forceMount:r}):s.type==="always"?c.jsx($v,{...n,ref:t}):null});Wv.displayName=Kn;var Iz=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=tn(Kn,e.__scopeScrollArea),[o,i]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(Er,{present:r||o,children:c.jsx(sT,{"data-state":o?"visible":"hidden",...n,ref:t})})}),Lz=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=tn(Kn,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Vf(()=>l("SCROLL_END"),100),[a,l]=Oz("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const h=u[d];f!==h&&(l("SCROLL"),i()),f=h};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,o,l,i]),c.jsx(Er,{present:r||a!=="hidden",children:c.jsx($v,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),sT=y.forwardRef((e,t)=>{const r=tn(Kn,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=y.useState(!1),a=e.orientation==="horizontal",l=Vf(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(a?u:d)}},10);return ca(r.viewport,l),ca(r.content,l),c.jsx(Er,{present:n||o,children:c.jsx($v,{"data-state":o?"visible":"hidden",...s,ref:t})})}),$v=y.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=tn(Kn,e.__scopeScrollArea),o=y.useRef(null),i=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=cT(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function f(m,h){return $z(m,i.current,a,h)}return r==="horizontal"?c.jsx(Fz,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollLeft,h=N0(m,a,s.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,s.dir))}}):r==="vertical"?c.jsx(zz,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollTop,h=N0(m,a);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null}),Fz=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=tn(Kn,e.__scopeScrollArea),[i,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,o.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(iT,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Uf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),dT(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ad(i.paddingLeft),paddingEnd:Ad(i.paddingRight)}})}})}),zz=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=tn(Kn,e.__scopeScrollArea),[i,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,o.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(iT,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Uf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const m=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),dT(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ad(i.paddingTop),paddingEnd:Ad(i.paddingBottom)}})}})}),[Uz,oT]=eT(Kn),iT=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,h=tn(Kn,r),[x,g]=y.useState(null),w=Xe(t,P=>g(P)),v=y.useRef(null),p=y.useRef(""),_=h.viewport,C=n.content-n.viewport,E=At(d),T=At(l),R=Vf(f,10);function D(P){if(v.current){const L=P.clientX-v.current.left,q=P.clientY-v.current.top;u({x:L,y:q})}}return y.useEffect(()=>{const P=L=>{const q=L.target;(x==null?void 0:x.contains(q))&&E(L,C)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[_,x,C,E]),y.useEffect(T,[n,T]),ca(x,R),ca(h.content,R),c.jsx(Uz,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:At(o),onThumbPointerUp:At(i),onThumbPositionChange:T,onThumbPointerDown:At(a),children:c.jsx(Ve.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:ue(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),v.current=x.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),D(P))}),onPointerMove:ue(e.onPointerMove,D),onPointerUp:ue(e.onPointerUp,P=>{const L=P.target;L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=p.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})})}),Dd="ScrollAreaThumb",aT=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=oT(Dd,e.__scopeScrollArea);return c.jsx(Er,{present:r||s.hasThumb,children:c.jsx(Vz,{ref:t,...n})})}),Vz=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=tn(Dd,r),i=oT(Dd,r),{onThumbPositionChange:a}=i,l=Xe(t,f=>i.onThumbChange(f)),u=y.useRef(),d=Vf(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const m=()=>{if(d(),!u.current){const h=Bz(f,a);u.current=h,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[o.viewport,d,a]),c.jsx(Ve.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),x=f.clientX-h.left,g=f.clientY-h.top;i.onThumbPointerDown({x,y:g})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});aT.displayName=Dd;var Bv="ScrollAreaCorner",lT=y.forwardRef((e,t)=>{const r=tn(Bv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(Wz,{...e,ref:t}):null});lT.displayName=Bv;var Wz=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=tn(Bv,r),[o,i]=y.useState(0),[a,l]=y.useState(0),u=!!(o&&a);return ca(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),ca(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?c.jsx(Ve.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ad(e){return e?parseInt(e,10):0}function cT(e,t){const r=e/t;return isNaN(r)?0:r}function Uf(e){const t=cT(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function $z(e,t,r,n="ltr"){const s=Uf(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return uT([l,u],f)(e)}function N0(e,t,r="ltr"){const n=Uf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],u=lm(e,l);return uT([0,i],[0,a])(u)}function uT(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function dT(e,t){return e>0&&e<t}var Bz=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Vf(e,t){const r=At(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ca(e,t){const r=At(t);nr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var fT=tT,Hz=nT,Yz=lT;const Hv=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fT,{ref:n,className:me("relative overflow-hidden",e),...r,children:[c.jsx(Hz,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(hT,{}),c.jsx(Yz,{})]}));Hv.displayName=fT.displayName;const hT=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(Wv,{ref:n,orientation:t,className:me("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(aT,{className:"relative flex-1 rounded-full bg-border"})}));hT.displayName=Wv.displayName;const Uo=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["cloudflare",["Cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["Namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["GoDaddy","/imgs/providers/godaddy.svg"]],["qiniu",["七牛云","/imgs/providers/qiniu.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),bo=be.union([be.literal("aliyun"),be.literal("tencent"),be.literal("ssh"),be.literal("webhook"),be.literal("cloudflare"),be.literal("qiniu"),be.literal("namesilo"),be.literal("godaddy")],{message:"请选择云服务商"}),So=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},Zz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,secretId:be.string().min(1).max(64),secretKey:be.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"secretId",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"SecretId"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入SecretId",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"secretKey",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"SecretKey"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入SecretKey",...l})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},Kz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,accessKeyId:be.string().min(1).max(64),accessSecretId:be.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"accessKeyId",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"AccessKeyId"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"accessSecretId",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"AccessKeySecret"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Te,{})]})}),c.jsx(Te,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},pT=y.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:me("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",e),ref:r,...t}));pT.displayName="Textarea";const Gz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=y.useRef(null),[o,i]=y.useState(""),a=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,host:be.string().ip({message:"请输入合法的IP地址"}),port:be.string().min(1).max(5),username:be.string().min(1).max(64),password:be.string().min(0).max(64),key:be.string().min(0).max(20480),keyFile:be.any().optional(),command:be.string().min(1).max(2048),certPath:be.string().min(0).max(2048),keyPath:be.string().min(0).max(2048)});let l={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(l=e.config);const u=Sn({resolver:kn(a),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:l.host,port:l.port,username:l.username,password:l.password,key:l.key,keyFile:l.keyFile,certPath:l.certPath,keyPath:l.keyPath,command:l.command}}),d=async h=>{console.log(h);const x={id:h.id,name:h.name,configType:h.configType,usage:So(h.configType),config:{host:h.host,port:h.port,username:h.username,password:h.password,key:h.key,command:h.command,certPath:h.certPath,keyPath:h.keyPath}};try{const g=await xo(x);if(t(),x.id=g.id,x.created=g.created,x.updated=g.updated,h.id){n(x);return}r(x)}catch(g){Object.entries(g.response.data).forEach(([v,p])=>{u.setError(v,{type:"manual",message:p.message})});return}},f=async h=>{var v;const x=(v=h.target.files)==null?void 0:v[0];if(!x)return;const g=x;i(g.name);const w=await _5(g);u.setValue("key",w)},m=()=>{var h;console.log(s.current),(h=s.current)==null||h.click()};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...u,children:c.jsxs("form",{onSubmit:h=>{h.stopPropagation(),u.handleSubmit(d)(h)},className:"space-y-3",children:[c.jsx(Me,{control:u.control,name:"name",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"id",render:({field:h})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"configType",render:({field:h})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...h})}),c.jsx(Te,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(Me,{control:u.control,name:"host",render:({field:h})=>c.jsxs(Pe,{className:"grow",children:[c.jsx(De,{children:"服务器IP"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入Host",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"port",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"SSH端口"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入Port",...h,type:"number"})}),c.jsx(Te,{})]})})]}),c.jsx(Me,{control:u.control,name:"username",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"用户名"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入用户名",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"password",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"密码"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入密码",...h,type:"password"})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"key",render:({field:h})=>c.jsxs(Pe,{hidden:!0,children:[c.jsx(De,{children:"Key使用证书登录"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入Key",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"keyFile",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"Key使用证书登录"}),c.jsx(Ae,{children:c.jsxs("div",{children:[c.jsx(ct,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:m,children:o||"请选择文件"}),c.jsx(ze,{placeholder:"请输入Key",...h,ref:s,className:"hidden",hidden:!0,type:"file",onChange:f})]})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"certPath",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"证书上传路径"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入证书上传路径",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"keyPath",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"私钥上传路径"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入私钥上传路径",...h})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:u.control,name:"command",render:({field:h})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"Command"}),c.jsx(Ae,{children:c.jsx(pT,{placeholder:"请输入要执行的命令",...h})}),c.jsx(Te,{})]})}),c.jsx(Te,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},qz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,url:be.string().url()});let o={url:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:o.url}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{url:l.url}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"url",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"Webhook Url"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入Webhook Url",...l})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},Xz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,dnsApiToken:be.string().min(1).max(64)});let o={dnsApiToken:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:o.dnsApiToken}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{dnsApiToken:l.dnsApiToken}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"dnsApiToken",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"CLOUD_DNS_API_TOKEN"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},Qz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,accessKey:be.string().min(1).max(64),secretKey:be.string().min(1).max(64)});let o={accessKey:"",secretKey:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:o.accessKey,secretKey:o.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{accessKey:l.accessKey,secretKey:l.secretKey}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"accessKey",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"AccessKey"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入AccessKey",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"secretKey",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"SecretKey"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入SecretKey",...l})}),c.jsx(Te,{})]})}),c.jsx(Te,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},Jz=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,apiKey:be.string().min(1).max(64)});let o={apiKey:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:o.apiKey}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{apiKey:l.apiKey}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"apiKey",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"NAMESILO_API_KEY"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入NAMESILO_API_KEY",...l})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})},e8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zn(),s=be.object({id:be.string().optional(),name:be.string().min(1).max(64),configType:bo,apiKey:be.string().min(1).max(64),apiSecret:be.string().min(1).max(64)});let o={apiKey:"",apiSecret:""};e&&(o=e.config);const i=Sn({resolver:kn(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:o.apiKey,apiSecret:o.apiSecret}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:So(l.configType),config:{apiKey:l.apiKey,apiSecret:l.apiSecret}};try{const d=await xo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,h])=>{i.setError(m,{type:"manual",message:h.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...i,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Me,{control:i.control,name:"name",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"名称"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入授权名称",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"id",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"configType",render:({field:l})=>c.jsxs(Pe,{className:"hidden",children:[c.jsx(De,{children:"配置类型"}),c.jsx(Ae,{children:c.jsx(ze,{...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"apiKey",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"GODADDY_API_KEY"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入GODADDY_API_KEY",...l})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:i.control,name:"apiSecret",render:({field:l})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"GODADDY_API_SECRET"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入GODADDY_API_SECRET",...l})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})})};function hl({trigger:e,op:t,data:r,className:n}){const[s,o]=y.useState(!1),i=Array.from(Uo.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(Zz,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":u=c.jsx(Kz,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":u=c.jsx(Gz,{data:r,onAfterReq:()=>{o(!1)}});break;case"webhook":u=c.jsx(qz,{data:r,onAfterReq:()=>{o(!1)}});break;case"cloudflare":u=c.jsx(Xz,{data:r,onAfterReq:()=>{o(!1)}});break;case"qiniu":u=c.jsx(Qz,{data:r,onAfterReq:()=>{o(!1)}});break;case"namesilo":u=c.jsx(Jz,{data:r,onAfterReq:()=>{o(!1)}});break;case"godaddy":u=c.jsx(e8,{data:r,onAfterReq:()=>{o(!1)}});break}const d=f=>f==a?"border-primary":"";return c.jsxs(Rz,{onOpenChange:o,open:s,children:[c.jsx(Pz,{asChild:!0,className:me(n),children:e}),c.jsxs(XE,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(QE,{children:c.jsxs(JE,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsx(Hv,{className:"max-h-[80vh]",children:c.jsxs("div",{className:"container py-3",children:[c.jsx(zv,{children:"服务商"}),c.jsxs(Pu,{onValueChange:f=>{console.log(f),l(f)},defaultValue:a,children:[c.jsx(cl,{className:"mt-3",children:c.jsx(Au,{placeholder:"请选择服务商"})}),c.jsx(ul,{children:c.jsxs(Du,{children:[c.jsx(dl,{children:"服务商"}),i.map(f=>{var m,h;return c.jsx(fl,{value:f,children:c.jsxs("div",{className:me("flex items-center space-x-2 rounded cursor-pointer",d(f)),children:[c.jsx("img",{src:(m=Uo.get(f))==null?void 0:m[1],className:"h-6 w-6"}),c.jsx("div",{children:(h=Uo.get(f))==null?void 0:h[0]})]})},f)})]})})]}),u]})})]})]})}const t8=()=>{const{config:{accesses:e}}=Zn(),[t,r]=y.useState(),n=Bn();y.useEffect(()=>{const h=new URLSearchParams(n.search).get("id");h&&(async()=>{const g=await E5(h);r(g)})()},[n.search]);const s=be.object({id:be.string().optional(),domain:be.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),access:be.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:be.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:be.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=Sn({resolver:kn(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});y.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=y.useState(t?t.targetType:""),l=e.filter(m=>{if(m.usage=="apply")return!1;if(i=="")return!0;const h=o.getValues().targetType.split("-");return m.configType===h[0]}),{toast:u}=jf(),d=wn(),f=async m=>{const h={id:m.id,crontab:"0 0 * * *",domain:m.domain,access:m.access,targetAccess:m.targetAccess,targetType:m.targetType};try{await nm(h);let x="域名编辑成功";h.id==""&&(x="域名添加成功"),u({title:"成功",description:x}),d("/domains")}catch(x){Object.entries(x.response.data).forEach(([w,v])=>{o.setError(w,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Rv,{}),c.jsxs("div",{className:"border-b dark:border-stone-500 h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Cn,{...o,children:c.jsxs("form",{onSubmit:o.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Me,{control:o.control,name:"domain",render:({field:m})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"域名"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"请输入域名",...m})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:o.control,name:"access",render:({field:m})=>c.jsxs(Pe,{children:[c.jsxs(De,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(hl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Px,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Ae,{children:c.jsxs(Pu,{...m,value:m.value,onValueChange:h=>{o.setValue("access",h)},children:[c.jsx(cl,{children:c.jsx(Au,{placeholder:"请选择授权配置"})}),c.jsx(ul,{children:c.jsxs(Du,{children:[c.jsx(dl,{children:"服务商授权配置"}),e.filter(h=>h.usage!="deploy").map(h=>{var x;return c.jsx(fl,{value:h.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(x=Uo.get(h.configType))==null?void 0:x[1]}),c.jsx("div",{children:h.name})]})},h.id)})]})})]})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:o.control,name:"targetType",render:({field:m})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"部署服务类型"}),c.jsx(Ae,{children:c.jsxs(Pu,{...m,onValueChange:h=>{a(h),o.setValue("targetType",h)},children:[c.jsx(cl,{children:c.jsx(Au,{placeholder:"请选择部署服务类型"})}),c.jsx(ul,{children:c.jsxs(Du,{children:[c.jsx(dl,{children:"部署服务类型"}),Nz.map(h=>{var x,g;return c.jsx(fl,{value:h,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(x=pm.get(h))==null?void 0:x[1]}),c.jsx("div",{children:(g=pm.get(h))==null?void 0:g[0]})]})},h)})]})})]})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:o.control,name:"targetAccess",render:({field:m})=>c.jsxs(Pe,{children:[c.jsxs(De,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(hl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Px,{size:14}),"新增"]}),op:"add"})]}),c.jsx(Ae,{children:c.jsxs(Pu,{...m,onValueChange:h=>{o.setValue("targetAccess",h)},children:[c.jsx(cl,{children:c.jsx(Au,{placeholder:"请选择授权配置"})}),c.jsx(ul,{children:c.jsxs(Du,{children:[c.jsx(dl,{children:"服务商授权配置"}),l.map(h=>{var x;return c.jsx(fl,{value:h.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(x=Uo.get(h.configType))==null?void 0:x[1]}),c.jsx("div",{children:h.name})]})},h.id)})]})})]})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"保存"})})]})})})]})})},r8=()=>{const{config:e,deleteAccess:t}=Zn(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),o=wn(),i=Bn(),a=new URLSearchParams(i.search),l=a.get("page"),u=l?Number(l):1,d=(u-1)*n,f=d+n,m=async h=>{const x=await GF(h);t(x.id)};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),c.jsx(hl,{trigger:c.jsx(ct,{children:"添加授权"}),op:"add"})]}),r.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(VR,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(hl,{trigger:c.jsx(ct,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.slice(d,f).map(h=>{var x,g;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:h.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(x=Uo.get(h.configType))==null?void 0:x[1],className:"w-6"}),c.jsx("div",{children:(g=Uo.get(h.configType))==null?void 0:g[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",h.created&&oa(h.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",h.updated&&oa(h.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(hl,{trigger:c.jsx(ct,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:h}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(ct,{variant:"link",className:"p-0",onClick:()=>{m(h)},children:"删除"})]})]},h.id)}),c.jsx(_k,{totalPages:s,currentPage:u,onPageChange:h=>{a.set("page",h.toString()),o({search:a.toString()})}})]})]})},n8=ac("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Yv=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:me(n8({variant:t}),e),...r}));Yv.displayName="Alert";const Zv=y.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:me("mb-1 font-medium leading-none tracking-tight",e),...t}));Zv.displayName="AlertTitle";const Kv=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:me("text-sm [&_p]:leading-relaxed",e),...t}));Kv.displayName="AlertDescription";const mT=async e=>{let t=1;e.page&&(t=e.page);let r=50;e.perPage&&(r=e.perPage);let n="domain!=null";return e.domain&&(n=`domain="${e.domain}"`),await Nt().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},s8=()=>{const e=wn(),[t,r]=y.useState(),[n]=NR(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await mT(i);r(a.items)})()},[s]),c.jsxs(Hv,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?c.jsx(gg,{size:16,className:"text-green-700"}):c.jsx(vg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Cv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:oa(o.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(Qg,{children:[c.jsx(Jg,{asChild:!0,children:c.jsx(ct,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(pf,{className:"sm:max-w-5xl",children:[c.jsx(ev,{children:c.jsxs(tv,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&c.jsx(c.Fragment,{children:o.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&c.jsx(c.Fragment,{children:o.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&c.jsx(c.Fragment,{children:o.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(Yv,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(Zv,{children:"暂无数据"}),c.jsxs(Kv,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(d1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(ct,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},mm=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",o8=be.object({username:be.string().email({message:"请输入正确的邮箱地址"}),password:be.string().min(10,{message:"密码至少10个字符"})}),i8=()=>{const e=Sn({resolver:kn(o8),defaultValues:{username:"",password:""}}),t=async n=>{try{await Nt().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=mm(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=wn();return c.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(Cn,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Me,{control:e.control,name:"username",render:({field:n})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"用户名"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"email",...n})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:e.control,name:"password",render:({field:n})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"密码"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"shadcn",...n,type:"password"})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"登录"})})]})})]})},a8=()=>Nt().authStore.isValid&&Nt().authStore.isAdmin?c.jsx(a1,{to:"/"}):c.jsx("div",{className:"container",children:c.jsx(mg,{})}),l8=be.object({oldPassword:be.string().min(10,{message:"密码至少10个字符"}),newPassword:be.string().min(10,{message:"密码至少10个字符"}),confirmPassword:be.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),c8=()=>{const{toast:e}=jf(),t=wn(),r=Sn({resolver:kn(l8),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await Nt().admins.authWithPassword((o=Nt().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const l=mm(a);r.setError("oldPassword",{message:l})}try{await Nt().admins.update((i=Nt().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),Nt().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=mm(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx(Cn,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Me,{control:r.control,name:"oldPassword",render:({field:s})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"当前密码"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"当前密码",...s,type:"password"})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:r.control,name:"newPassword",render:({field:s})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"新密码"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"newPassword",...s,type:"password"})}),c.jsx(Te,{})]})}),c.jsx(Me,{control:r.control,name:"confirmPassword",render:({field:s})=>c.jsxs(Pe,{children:[c.jsx(De,{children:"确认密码"}),c.jsx(Ae,{children:c.jsx(ze,{placeholder:"confirmPassword",...s,type:"password"})}),c.jsx(Te,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(ct,{type:"submit",children:"确认修改"})})]})})})},u8=()=>c.jsxs("div",{children:[c.jsx(Rv,{}),c.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"设置密码"}),c.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:c.jsx(mg,{})})]}),d8=()=>{const[e,t]=y.useState(),[r,n]=y.useState(),s=wn();return y.useEffect(()=>{(async()=>{const i=await C5();t(i)})()},[]),y.useEffect(()=>{(async()=>{const a=await mT({perPage:8});n(a.items)})()},[]),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"flex justify-between items-center",children:c.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),c.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(HR,{size:48,strokeWidth:1,className:"text-blue-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?c.jsx(dr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(MR,{size:48,strokeWidth:1,className:"text-red-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?c.jsx(dr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(WR,{size:48,strokeWidth:1,className:"text-green-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?c.jsx(dr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(AR,{size:48,strokeWidth:1,className:"text-gray-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?c.jsx(dr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?c.jsx(c.Fragment,{children:c.jsxs(Yv,{className:"max-w-[40em] mt-10",children:[c.jsx(Zv,{children:"暂无数据"}),c.jsxs(Kv,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(d1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(ct,{onClick:()=>{s("/")},children:"添加域名"})})]})]})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(o=>{var i,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?c.jsx(gg,{size:16,className:"text-green-700"}):c.jsx(vg,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Cv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:oa(o.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(Qg,{children:[c.jsx(Jg,{asChild:!0,children:c.jsx(ct,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(pf,{className:"sm:max-w-5xl",children:[c.jsx(ev,{children:c.jsxs(tv,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&c.jsx(c.Fragment,{children:o.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&c.jsx(c.Fragment,{children:o.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&c.jsx(c.Fragment,{children:o.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]})]})]})},f8=pR([{path:"/",element:c.jsx(o3,{}),children:[{path:"/",element:c.jsx(d8,{})},{path:"/domains",element:c.jsx(R5,{})},{path:"/edit",element:c.jsx(t8,{})},{path:"/access",element:c.jsx(r8,{})},{path:"/history",element:c.jsx(s8,{})},{path:"/setting",element:c.jsx(u8,{}),children:[{path:"/setting/password",element:c.jsx(c8,{})}]}]},{path:"/login",element:c.jsx(a8,{}),children:[{path:"/login",element:c.jsx(i8,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);zh.createRoot(document.getElementById("root")).render(c.jsx(et.StrictMode,{children:c.jsx(JF,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:c.jsx(SR,{router:f8})})}))});export default h8();