certimate/ui/dist/assets/index-B-WSkv0U.js

309 lines
749 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 HN=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var y$=HN((P$,Gu)=>{function _w(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 Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bw={exports:{}},Xd={},Sw={exports:{}},tt={};/**
* @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 gc=Symbol.for("react.element"),YN=Symbol.for("react.portal"),ZN=Symbol.for("react.fragment"),KN=Symbol.for("react.strict_mode"),GN=Symbol.for("react.profiler"),qN=Symbol.for("react.provider"),XN=Symbol.for("react.context"),QN=Symbol.for("react.forward_ref"),JN=Symbol.for("react.suspense"),eT=Symbol.for("react.memo"),tT=Symbol.for("react.lazy"),zy=Symbol.iterator;function rT(e){return e===null||typeof e!="object"?null:(e=zy&&e[zy]||e["@@iterator"],typeof e=="function"?e:null)}var kw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cw=Object.assign,jw={};function _a(e,t,r){this.props=e,this.context=t,this.refs=jw,this.updater=r||kw}_a.prototype.isReactComponent={};_a.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")};_a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ew(){}Ew.prototype=_a.prototype;function Fm(e,t,r){this.props=e,this.context=t,this.refs=jw,this.updater=r||kw}var zm=Fm.prototype=new Ew;zm.constructor=Fm;Cw(zm,_a.prototype);zm.isPureReactComponent=!0;var Uy=Array.isArray,Nw=Object.prototype.hasOwnProperty,Um={current:null},Tw={key:!0,ref:!0,__self:!0,__source:!0};function Rw(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)Nw.call(t,n)&&!Tw.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:gc,type:e,key:o,ref:i,props:s,_owner:Um.current}}function nT(e,t){return{$$typeof:gc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $m(e){return typeof e=="object"&&e!==null&&e.$$typeof===gc}function sT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var $y=/\/+/g;function uh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?sT(""+e.key):t.toString(36)}function ju(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 gc:case YN:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+uh(i,0):n,Uy(s)?(r="",e!=null&&(r=e.replace($y,"$&/")+"/"),ju(s,t,r,"",function(u){return u})):s!=null&&($m(s)&&(s=nT(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace($y,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Uy(e))for(var a=0;a<e.length;a++){o=e[a];var c=n+uh(o,a);i+=ju(o,t,r,c,s)}else if(c=rT(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=n+uh(o,a++),i+=ju(o,t,r,c,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 Gc(e,t,r){if(e==null)return e;var n=[],s=0;return ju(e,n,"","",function(o){return t.call(r,o,s++)}),n}function oT(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 vr={current:null},Eu={transition:null},iT={ReactCurrentDispatcher:vr,ReactCurrentBatchConfig:Eu,ReactCurrentOwner:Um};function Pw(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:Gc,forEach:function(e,t,r){Gc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Gc(e,function(){t++}),t},toArray:function(e){return Gc(e,function(t){return t})||[]},only:function(e){if(!$m(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tt.Component=_a;tt.Fragment=ZN;tt.Profiler=GN;tt.PureComponent=Fm;tt.StrictMode=KN;tt.Suspense=JN;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iT;tt.act=Pw;tt.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=Cw({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Um.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)Nw.call(t,c)&&!Tw.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:gc,type:e.type,key:s,ref:o,props:n,_owner:i}};tt.createContext=function(e){return e={$$typeof:XN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qN,_context:e},e.Consumer=e};tt.createElement=Rw;tt.createFactory=function(e){var t=Rw.bind(null,e);return t.type=e,t};tt.createRef=function(){return{current:null}};tt.forwardRef=function(e){return{$$typeof:QN,render:e}};tt.isValidElement=$m;tt.lazy=function(e){return{$$typeof:tT,_payload:{_status:-1,_result:e},_init:oT}};tt.memo=function(e,t){return{$$typeof:eT,type:e,compare:t===void 0?null:t}};tt.startTransition=function(e){var t=Eu.transition;Eu.transition={};try{e()}finally{Eu.transition=t}};tt.unstable_act=Pw;tt.useCallback=function(e,t){return vr.current.useCallback(e,t)};tt.useContext=function(e){return vr.current.useContext(e)};tt.useDebugValue=function(){};tt.useDeferredValue=function(e){return vr.current.useDeferredValue(e)};tt.useEffect=function(e,t){return vr.current.useEffect(e,t)};tt.useId=function(){return vr.current.useId()};tt.useImperativeHandle=function(e,t,r){return vr.current.useImperativeHandle(e,t,r)};tt.useInsertionEffect=function(e,t){return vr.current.useInsertionEffect(e,t)};tt.useLayoutEffect=function(e,t){return vr.current.useLayoutEffect(e,t)};tt.useMemo=function(e,t){return vr.current.useMemo(e,t)};tt.useReducer=function(e,t,r){return vr.current.useReducer(e,t,r)};tt.useRef=function(e){return vr.current.useRef(e)};tt.useState=function(e){return vr.current.useState(e)};tt.useSyncExternalStore=function(e,t,r){return vr.current.useSyncExternalStore(e,t,r)};tt.useTransition=function(){return vr.current.useTransition()};tt.version="18.3.1";Sw.exports=tt;var v=Sw.exports;const We=Lm(v),Aw=_w({__proto__:null,default:We},[v]);/**
* @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 aT=v,lT=Symbol.for("react.element"),cT=Symbol.for("react.fragment"),uT=Object.prototype.hasOwnProperty,dT=aT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fT={key:!0,ref:!0,__self:!0,__source:!0};function Dw(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)&&!fT.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:lT,type:e,key:o,ref:i,props:s,_owner:dT.current}}Xd.Fragment=cT;Xd.jsx=Dw;Xd.jsxs=Dw;bw.exports=Xd;var l=bw.exports,ip={},Ow={exports:{}},Hr={},Mw={exports:{}},Iw={};/**
* @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,$=Z[z];if(0<s($,I))Z[z]=I,Z[Q]=$,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,$=Z.length,fe=$>>>1;z<fe;){var ne=2*(z+1)-1,se=Z[ne],Oe=ne+1,he=Z[Oe];if(0>s(se,Q))Oe<$&&0>s(he,se)?(Z[z]=he,Z[Oe]=Q,z=Oe):(Z[z]=se,Z[ne]=Q,z=ne);else if(Oe<$&&0>s(he,Q))Z[z]=he,Z[Oe]=Q,z=Oe;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 c=[],u=[],d=1,f=null,m=3,y=!1,x=!1,g=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(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(c,I);else break;I=r(u)}}function C(Z){if(g=!1,w(Z),!x)if(r(c)!==null)x=!0,te(j);else{var I=r(u);I!==null&&W(C,I.startTime-Z)}}function j(Z,I){x=!1,g&&(g=!1,p(P),P=-1),y=!0;var Q=m;try{for(w(I),f=r(c);f!==null&&(!(f.expirationTime>I)||Z&&!q());){var z=f.callback;if(typeof z=="function"){f.callback=null,m=f.priorityLevel;var $=z(f.expirationTime<=I);I=e.unstable_now(),typeof $=="function"?f.callback=$:f===r(c)&&n(c),w(I)}else n(c);f=r(c)}if(f!==null)var fe=!0;else{var ne=r(u);ne!==null&&W(C,ne.startTime-I),fe=!1}return fe}finally{f=null,m=Q,y=!1}}var E=!1,R=null,P=-1,A=5,L=-1;function q(){return!(e.unstable_now()-L<A)}function N(){if(R!==null){var Z=e.unstable_now();L=Z;var I=!0;try{I=R(!0,Z)}finally{I?F():(E=!1,R=null)}}else E=!1}var F;if(typeof h=="function")F=function(){h(N)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,V=b.port2;b.port1.onmessage=N,F=function(){V.postMessage(null)}}else F=function(){_(N,0)};function te(Z){R=Z,E||(E=!0,F())}function W(Z,I){P=_(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||y||(x=!0,te(j))},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"):A=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},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 $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=Q+$,Z={id:d++,callback:I,priorityLevel:Z,startTime:Q,expirationTime:$,sortIndex:-1},Q>z?(Z.sortIndex=Q,t(u,Z),r(c)===null&&Z===r(u)&&(g?(p(P),P=-1):g=!0,W(C,Q-z))):(Z.sortIndex=$,t(c,Z),x||y||(x=!0,te(j))),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}}}})(Iw);Mw.exports=Iw;var hT=Mw.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 pT=v,Br=hT;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 Lw=new Set,El={};function ai(e,t){aa(e,t),aa(e+"Capture",t)}function aa(e,t){for(El[e]=t,e=0;e<t.length;e++)Lw.add(t[e])}var ys=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ap=Object.prototype.hasOwnProperty,mT=/^[: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]*$/,Vy={},Wy={};function gT(e){return ap.call(Wy,e)?!0:ap.call(Vy,e)?!1:mT.test(e)?Wy[e]=!0:(Vy[e]=!0,!1)}function vT(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 yT(e,t,r,n){if(t===null||typeof t>"u"||vT(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 yr(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 nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new yr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nr[t]=new yr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new yr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new yr(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){nr[e]=new yr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new yr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new yr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new yr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new yr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vm=/[\-:]([a-z])/g;function Wm(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(Vm,Wm);nr[t]=new yr(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(Vm,Wm);nr[t]=new yr(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(Vm,Wm);nr[t]=new yr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new yr(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new yr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bm(e,t,r,n){var s=nr.hasOwnProperty(t)?nr[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(yT(t,r,s,n)&&(r=null),n||s===null?gT(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 Es=pT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qc=Symbol.for("react.element"),Ei=Symbol.for("react.portal"),Ni=Symbol.for("react.fragment"),Hm=Symbol.for("react.strict_mode"),lp=Symbol.for("react.profiler"),Fw=Symbol.for("react.provider"),zw=Symbol.for("react.context"),Ym=Symbol.for("react.forward_ref"),cp=Symbol.for("react.suspense"),up=Symbol.for("react.suspense_list"),Zm=Symbol.for("react.memo"),Ws=Symbol.for("react.lazy"),Uw=Symbol.for("react.offscreen"),By=Symbol.iterator;function Fa(e){return e===null||typeof e!="object"?null:(e=By&&e[By]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,dh;function el(e){if(dh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);dh=t&&t[1]||""}return`
`+dh+e}var fh=!1;function hh(e,t){if(!e||fh)return"";fh=!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 c=`
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{fh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?el(e):""}function xT(e){switch(e.tag){case 5:return el(e.type);case 16:return el("Lazy");case 13:return el("Suspense");case 19:return el("SuspenseList");case 0:case 2:case 15:return e=hh(e.type,!1),e;case 11:return e=hh(e.type.render,!1),e;case 1:return e=hh(e.type,!0),e;default:return""}}function dp(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 Ni:return"Fragment";case Ei:return"Portal";case lp:return"Profiler";case Hm:return"StrictMode";case cp:return"Suspense";case up:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zw:return(e.displayName||"Context")+".Consumer";case Fw:return(e._context.displayName||"Context")+".Provider";case Ym:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zm:return t=e.displayName||null,t!==null?t:dp(e.type)||"Memo";case Ws:t=e._payload,e=e._init;try{return dp(e(t))}catch{}}return null}function wT(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 dp(t);case 8:return t===Hm?"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 fo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $w(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _T(e){var t=$w(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 Xc(e){e._valueTracker||(e._valueTracker=_T(e))}function Vw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=$w(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function qu(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 fp(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Hy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=fo(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 Ww(e,t){t=t.checked,t!=null&&Bm(e,"checked",t,!1)}function hp(e,t){Ww(e,t);var r=fo(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")?pp(e,t.type,r):t.hasOwnProperty("defaultValue")&&pp(e,t.type,fo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yy(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 pp(e,t,r){(t!=="number"||qu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var tl=Array.isArray;function Bi(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=""+fo(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 mp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(oe(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Zy(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(tl(r)){if(1<r.length)throw Error(oe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:fo(r)}}function Bw(e,t){var r=fo(t.value),n=fo(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 Ky(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Hw(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Hw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qc,Yw=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(Qc=Qc||document.createElement("div"),Qc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var hl={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},bT=["Webkit","ms","Moz","O"];Object.keys(hl).forEach(function(e){bT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hl[t]=hl[e]})});function Zw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||hl.hasOwnProperty(e)&&hl[e]?(""+t).trim():t+"px"}function Kw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Zw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var ST=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 vp(e,t){if(t){if(ST[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 yp(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 xp=null;function Km(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wp=null,Hi=null,Yi=null;function Gy(e){if(e=xc(e)){if(typeof wp!="function")throw Error(oe(280));var t=e.stateNode;t&&(t=rf(t),wp(e.stateNode,e.type,t))}}function Gw(e){Hi?Yi?Yi.push(e):Yi=[e]:Hi=e}function qw(){if(Hi){var e=Hi,t=Yi;if(Yi=Hi=null,Gy(e),t)for(e=0;e<t.length;e++)Gy(t[e])}}function Xw(e,t){return e(t)}function Qw(){}var ph=!1;function Jw(e,t,r){if(ph)return e(t,r);ph=!0;try{return Xw(e,t,r)}finally{ph=!1,(Hi!==null||Yi!==null)&&(Qw(),qw())}}function Tl(e,t){var r=e.stateNode;if(r===null)return null;var n=rf(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 _p=!1;if(ys)try{var za={};Object.defineProperty(za,"passive",{get:function(){_p=!0}}),window.addEventListener("test",za,za),window.removeEventListener("test",za,za)}catch{_p=!1}function kT(e,t,r,n,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var pl=!1,Xu=null,Qu=!1,bp=null,CT={onError:function(e){pl=!0,Xu=e}};function jT(e,t,r,n,s,o,i,a,c){pl=!1,Xu=null,kT.apply(CT,arguments)}function ET(e,t,r,n,s,o,i,a,c){if(jT.apply(this,arguments),pl){if(pl){var u=Xu;pl=!1,Xu=null}else throw Error(oe(198));Qu||(Qu=!0,bp=u)}}function li(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 e_(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 qy(e){if(li(e)!==e)throw Error(oe(188))}function NT(e){var t=e.alternate;if(!t){if(t=li(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 qy(s),e;if(o===n)return qy(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 t_(e){return e=NT(e),e!==null?r_(e):null}function r_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=r_(e);if(t!==null)return t;e=e.sibling}return null}var n_=Br.unstable_scheduleCallback,Xy=Br.unstable_cancelCallback,TT=Br.unstable_shouldYield,RT=Br.unstable_requestPaint,Ut=Br.unstable_now,PT=Br.unstable_getCurrentPriorityLevel,Gm=Br.unstable_ImmediatePriority,s_=Br.unstable_UserBlockingPriority,Ju=Br.unstable_NormalPriority,AT=Br.unstable_LowPriority,o_=Br.unstable_IdlePriority,Qd=null,$n=null;function DT(e){if($n&&typeof $n.onCommitFiberRoot=="function")try{$n.onCommitFiberRoot(Qd,e,void 0,(e.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:IT,OT=Math.log,MT=Math.LN2;function IT(e){return e>>>=0,e===0?32:31-(OT(e)/MT|0)|0}var Jc=64,eu=4194304;function rl(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 ed(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=rl(a):(o&=i,o!==0&&(n=rl(o)))}else i=r&~s,i!==0?n=rl(i):o!==0&&(n=rl(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-xn(t),s=1<<r,n|=e[r],t&=~s;return n}function LT(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 FT(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-xn(o),a=1<<i,c=s[i];c===-1?(!(a&r)||a&n)&&(s[i]=LT(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function Sp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function i_(){var e=Jc;return Jc<<=1,!(Jc&4194240)&&(Jc=64),e}function mh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xn(t),e[t]=r}function zT(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-xn(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function qm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-xn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var pt=0;function a_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var l_,Xm,c_,u_,d_,kp=!1,tu=[],to=null,ro=null,no=null,Rl=new Map,Pl=new Map,Hs=[],UT="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 Qy(e,t){switch(e){case"focusin":case"focusout":to=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":Rl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(t.pointerId)}}function Ua(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=xc(t),t!==null&&Xm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function $T(e,t,r,n,s){switch(t){case"focusin":return to=Ua(to,e,t,r,n,s),!0;case"dragenter":return ro=Ua(ro,e,t,r,n,s),!0;case"mouseover":return no=Ua(no,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Rl.set(o,Ua(Rl.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Pl.set(o,Ua(Pl.get(o)||null,e,t,r,n,s)),!0}return!1}function f_(e){var t=Lo(e.target);if(t!==null){var r=li(t);if(r!==null){if(t=r.tag,t===13){if(t=e_(r),t!==null){e.blockedOn=t,d_(e.priority,function(){c_(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 Nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);xp=n,r.target.dispatchEvent(n),xp=null}else return t=xc(r),t!==null&&Xm(t),e.blockedOn=r,!1;t.shift()}return!0}function Jy(e,t,r){Nu(e)&&r.delete(t)}function VT(){kp=!1,to!==null&&Nu(to)&&(to=null),ro!==null&&Nu(ro)&&(ro=null),no!==null&&Nu(no)&&(no=null),Rl.forEach(Jy),Pl.forEach(Jy)}function $a(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,Br.unstable_scheduleCallback(Br.unstable_NormalPriority,VT)))}function Al(e){function t(s){return $a(s,e)}if(0<tu.length){$a(tu[0],e);for(var r=1;r<tu.length;r++){var n=tu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(to!==null&&$a(to,e),ro!==null&&$a(ro,e),no!==null&&$a(no,e),Rl.forEach(t),Pl.forEach(t),r=0;r<Hs.length;r++)n=Hs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Hs.length&&(r=Hs[0],r.blockedOn===null);)f_(r),r.blockedOn===null&&Hs.shift()}var Zi=Es.ReactCurrentBatchConfig,td=!0;function WT(e,t,r,n){var s=pt,o=Zi.transition;Zi.transition=null;try{pt=1,Qm(e,t,r,n)}finally{pt=s,Zi.transition=o}}function BT(e,t,r,n){var s=pt,o=Zi.transition;Zi.transition=null;try{pt=4,Qm(e,t,r,n)}finally{pt=s,Zi.transition=o}}function Qm(e,t,r,n){if(td){var s=Cp(e,t,r,n);if(s===null)Ch(e,t,n,rd,r),Qy(e,n);else if($T(s,e,t,r,n))n.stopPropagation();else if(Qy(e,n),t&4&&-1<UT.indexOf(e)){for(;s!==null;){var o=xc(s);if(o!==null&&l_(o),o=Cp(e,t,r,n),o===null&&Ch(e,t,n,rd,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Ch(e,t,n,null,r)}}var rd=null;function Cp(e,t,r,n){if(rd=null,e=Km(n),e=Lo(e),e!==null)if(t=li(e),t===null)e=null;else if(r=t.tag,r===13){if(e=e_(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 rd=e,null}function h_(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(PT()){case Gm:return 1;case s_:return 4;case Ju:case AT:return 16;case o_:return 536870912;default:return 16}default:return 16}}var qs=null,Jm=null,Tu=null;function p_(){if(Tu)return Tu;var e,t=Jm,r=t.length,n,s="value"in qs?qs.value:qs.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 Tu=s.slice(e,1<n?1-n:void 0)}function Ru(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 ru(){return!0}function ex(){return!1}function Yr(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)?ru:ex,this.isPropagationStopped=ex,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=ru)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),t}var ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Yr(ba),yc=Mt({},ba,{view:0,detail:0}),HT=Yr(yc),gh,vh,Va,Jd=Mt({},yc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,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!==Va&&(Va&&e.type==="mousemove"?(gh=e.screenX-Va.screenX,vh=e.screenY-Va.screenY):vh=gh=0,Va=e),gh)},movementY:function(e){return"movementY"in e?e.movementY:vh}}),tx=Yr(Jd),YT=Mt({},Jd,{dataTransfer:0}),ZT=Yr(YT),KT=Mt({},yc,{relatedTarget:0}),yh=Yr(KT),GT=Mt({},ba,{animationName:0,elapsedTime:0,pseudoElement:0}),qT=Yr(GT),XT=Mt({},ba,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QT=Yr(XT),JT=Mt({},ba,{data:0}),rx=Yr(JT),e2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t2={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"},r2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=r2[e])?!!t[e]:!1}function tg(){return n2}var s2=Mt({},yc,{key:function(e){if(e.key){var t=e2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ru(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Ru(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ru(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),o2=Yr(s2),i2=Mt({},Jd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nx=Yr(i2),a2=Mt({},yc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),l2=Yr(a2),c2=Mt({},ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),u2=Yr(c2),d2=Mt({},Jd,{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}),f2=Yr(d2),h2=[9,13,27,32],rg=ys&&"CompositionEvent"in window,ml=null;ys&&"documentMode"in document&&(ml=document.documentMode);var p2=ys&&"TextEvent"in window&&!ml,m_=ys&&(!rg||ml&&8<ml&&11>=ml),sx=" ",ox=!1;function g_(e,t){switch(e){case"keyup":return h2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ti=!1;function m2(e,t){switch(e){case"compositionend":return v_(t);case"keypress":return t.which!==32?null:(ox=!0,sx);case"textInput":return e=t.data,e===sx&&ox?null:e;default:return null}}function g2(e,t){if(Ti)return e==="compositionend"||!rg&&g_(e,t)?(e=p_(),Tu=Jm=qs=null,Ti=!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 m_&&t.locale!=="ko"?null:t.data;default:return null}}var v2={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 ix(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v2[e.type]:t==="textarea"}function y_(e,t,r,n){Gw(n),t=nd(t,"onChange"),0<t.length&&(r=new eg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var gl=null,Dl=null;function y2(e){T_(e,0)}function ef(e){var t=Ai(e);if(Vw(t))return e}function x2(e,t){if(e==="change")return t}var x_=!1;if(ys){var xh;if(ys){var wh="oninput"in document;if(!wh){var ax=document.createElement("div");ax.setAttribute("oninput","return;"),wh=typeof ax.oninput=="function"}xh=wh}else xh=!1;x_=xh&&(!document.documentMode||9<document.documentMode)}function lx(){gl&&(gl.detachEvent("onpropertychange",w_),Dl=gl=null)}function w_(e){if(e.propertyName==="value"&&ef(Dl)){var t=[];y_(t,Dl,e,Km(e)),Jw(y2,t)}}function w2(e,t,r){e==="focusin"?(lx(),gl=t,Dl=r,gl.attachEvent("onpropertychange",w_)):e==="focusout"&&lx()}function _2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ef(Dl)}function b2(e,t){if(e==="click")return ef(t)}function S2(e,t){if(e==="input"||e==="change")return ef(t)}function k2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bn=typeof Object.is=="function"?Object.is:k2;function Ol(e,t){if(bn(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(!ap.call(t,s)||!bn(e[s],t[s]))return!1}return!0}function cx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ux(e,t){var r=cx(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=cx(r)}}function __(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?__(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function b_(){for(var e=window,t=qu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qu(e.document)}return t}function ng(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 C2(e){var t=b_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&__(r.ownerDocument.documentElement,r)){if(n!==null&&ng(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=ux(r,o);var i=ux(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 j2=ys&&"documentMode"in document&&11>=document.documentMode,Ri=null,jp=null,vl=null,Ep=!1;function dx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ep||Ri==null||Ri!==qu(n)||(n=Ri,"selectionStart"in n&&ng(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}),vl&&Ol(vl,n)||(vl=n,n=nd(jp,"onSelect"),0<n.length&&(t=new eg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ri)))}function nu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Pi={animationend:nu("Animation","AnimationEnd"),animationiteration:nu("Animation","AnimationIteration"),animationstart:nu("Animation","AnimationStart"),transitionend:nu("Transition","TransitionEnd")},_h={},S_={};ys&&(S_=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function tf(e){if(_h[e])return _h[e];if(!Pi[e])return e;var t=Pi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in S_)return _h[e]=t[r];return e}var k_=tf("animationend"),C_=tf("animationiteration"),j_=tf("animationstart"),E_=tf("transitionend"),N_=new Map,fx="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 bo(e,t){N_.set(e,t),ai(t,[e])}for(var bh=0;bh<fx.length;bh++){var Sh=fx[bh],E2=Sh.toLowerCase(),N2=Sh[0].toUpperCase()+Sh.slice(1);bo(E2,"on"+N2)}bo(k_,"onAnimationEnd");bo(C_,"onAnimationIteration");bo(j_,"onAnimationStart");bo("dblclick","onDoubleClick");bo("focusin","onFocus");bo("focusout","onBlur");bo(E_,"onTransitionEnd");aa("onMouseEnter",["mouseout","mouseover"]);aa("onMouseLeave",["mouseout","mouseover"]);aa("onPointerEnter",["pointerout","pointerover"]);aa("onPointerLeave",["pointerout","pointerover"]);ai("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ai("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ai("onBeforeInput",["compositionend","keypress","textInput","paste"]);ai("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ai("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ai("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nl="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(" "),T2=new Set("cancel close invalid load scroll toggle".split(" ").concat(nl));function hx(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,ET(n,t,void 0,e),e.currentTarget=null}function T_(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],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;hx(s,a,u),o=c}else for(i=0;i<n.length;i++){if(a=n[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;hx(s,a,u),o=c}}}if(Qu)throw e=bp,Qu=!1,bp=null,e}function bt(e,t){var r=t[Ap];r===void 0&&(r=t[Ap]=new Set);var n=e+"__bubble";r.has(n)||(R_(t,e,2,!1),r.add(n))}function kh(e,t,r){var n=0;t&&(n|=4),R_(r,e,n,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function Ml(e){if(!e[su]){e[su]=!0,Lw.forEach(function(r){r!=="selectionchange"&&(T2.has(r)||kh(r,!1,e),kh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,kh("selectionchange",!1,t))}}function R_(e,t,r,n){switch(h_(t)){case 1:var s=WT;break;case 4:s=BT;break;default:s=Qm}r=s.bind(null,t,r,e),s=void 0,!_p||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 Ch(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 c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Lo(a),i===null)return;if(c=i.tag,c===5||c===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Jw(function(){var u=o,d=Km(r),f=[];e:{var m=N_.get(e);if(m!==void 0){var y=eg,x=e;switch(e){case"keypress":if(Ru(r)===0)break e;case"keydown":case"keyup":y=o2;break;case"focusin":x="focus",y=yh;break;case"focusout":x="blur",y=yh;break;case"beforeblur":case"afterblur":y=yh;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":y=tx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=ZT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=l2;break;case k_:case C_:case j_:y=qT;break;case E_:y=u2;break;case"scroll":y=HT;break;case"wheel":y=f2;break;case"copy":case"cut":case"paste":y=QT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=nx}var g=(t&4)!==0,_=!g&&e==="scroll",p=g?m!==null?m+"Capture":null:m;g=[];for(var h=u,w;h!==null;){w=h;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,p!==null&&(C=Tl(h,p),C!=null&&g.push(Il(h,C,w)))),_)break;h=h.return}0<g.length&&(m=new y(m,x,null,r,d),f.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&r!==xp&&(x=r.relatedTarget||r.fromElement)&&(Lo(x)||x[xs]))break e;if((y||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,y?(x=r.relatedTarget||r.toElement,y=u,x=x?Lo(x):null,x!==null&&(_=li(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=u),y!==x)){if(g=tx,C="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(g=nx,C="onPointerLeave",p="onPointerEnter",h="pointer"),_=y==null?m:Ai(y),w=x==null?m:Ai(x),m=new g(C,h+"leave",y,r,d),m.target=_,m.relatedTarget=w,C=null,Lo(d)===u&&(g=new g(p,h+"enter",x,r,d),g.target=w,g.relatedTarget=_,C=g),_=C,y&&x)t:{for(g=y,p=x,h=0,w=g;w;w=yi(w))h++;for(w=0,C=p;C;C=yi(C))w++;for(;0<h-w;)g=yi(g),h--;for(;0<w-h;)p=yi(p),w--;for(;h--;){if(g===p||p!==null&&g===p.alternate)break t;g=yi(g),p=yi(p)}g=null}else g=null;y!==null&&px(f,m,y,g,!1),x!==null&&_!==null&&px(f,_,x,g,!0)}}e:{if(m=u?Ai(u):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var j=x2;else if(ix(m))if(x_)j=S2;else{j=_2;var E=w2}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(j=b2);if(j&&(j=j(e,u))){y_(f,j,r,d);break e}E&&E(e,m,u),e==="focusout"&&(E=m._wrapperState)&&E.controlled&&m.type==="number"&&pp(m,"number",m.value)}switch(E=u?Ai(u):window,e){case"focusin":(ix(E)||E.contentEditable==="true")&&(Ri=E,jp=u,vl=null);break;case"focusout":vl=jp=Ri=null;break;case"mousedown":Ep=!0;break;case"contextmenu":case"mouseup":case"dragend":Ep=!1,dx(f,r,d);break;case"selectionchange":if(j2)break;case"keydown":case"keyup":dx(f,r,d)}var R;if(rg)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Ti?g_(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(m_&&r.locale!=="ko"&&(Ti||P!=="onCompositionStart"?P==="onCompositionEnd"&&Ti&&(R=p_()):(qs=d,Jm="value"in qs?qs.value:qs.textContent,Ti=!0)),E=nd(u,P),0<E.length&&(P=new rx(P,e,null,r,d),f.push({event:P,listeners:E}),R?P.data=R:(R=v_(r),R!==null&&(P.data=R)))),(R=p2?m2(e,r):g2(e,r))&&(u=nd(u,"onBeforeInput"),0<u.length&&(d=new rx("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=R))}T_(f,t)})}function Il(e,t,r){return{instance:e,listener:t,currentTarget:r}}function nd(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Tl(e,r),o!=null&&n.unshift(Il(e,o,s)),o=Tl(e,t),o!=null&&n.push(Il(e,o,s))),e=e.return}return n}function yi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function px(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,c=a.alternate,u=a.stateNode;if(c!==null&&c===n)break;a.tag===5&&u!==null&&(a=u,s?(c=Tl(r,o),c!=null&&i.unshift(Il(r,c,a))):s||(c=Tl(r,o),c!=null&&i.push(Il(r,c,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var R2=/\r\n?/g,P2=/\u0000|\uFFFD/g;function mx(e){return(typeof e=="string"?e:""+e).replace(R2,`
`).replace(P2,"")}function ou(e,t,r){if(t=mx(t),mx(e)!==t&&r)throw Error(oe(425))}function sd(){}var Np=null,Tp=null;function Rp(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 Pp=typeof setTimeout=="function"?setTimeout:void 0,A2=typeof clearTimeout=="function"?clearTimeout:void 0,gx=typeof Promise=="function"?Promise:void 0,D2=typeof queueMicrotask=="function"?queueMicrotask:typeof gx<"u"?function(e){return gx.resolve(null).then(e).catch(O2)}:Pp;function O2(e){setTimeout(function(){throw e})}function jh(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),Al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Al(t)}function so(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 vx(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 Sa=Math.random().toString(36).slice(2),Mn="__reactFiber$"+Sa,Ll="__reactProps$"+Sa,xs="__reactContainer$"+Sa,Ap="__reactEvents$"+Sa,M2="__reactListeners$"+Sa,I2="__reactHandles$"+Sa;function Lo(e){var t=e[Mn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[xs]||r[Mn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=vx(e);e!==null;){if(r=e[Mn])return r;e=vx(e)}return t}e=r,r=e.parentNode}return null}function xc(e){return e=e[Mn]||e[xs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ai(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(oe(33))}function rf(e){return e[Ll]||null}var Dp=[],Di=-1;function So(e){return{current:e}}function St(e){0>Di||(e.current=Dp[Di],Dp[Di]=null,Di--)}function wt(e,t){Di++,Dp[Di]=e.current,e.current=t}var ho={},lr=So(ho),Cr=So(!1),Go=ho;function la(e,t){var r=e.type.contextTypes;if(!r)return ho;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 jr(e){return e=e.childContextTypes,e!=null}function od(){St(Cr),St(lr)}function yx(e,t,r){if(lr.current!==ho)throw Error(oe(168));wt(lr,t),wt(Cr,r)}function P_(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,wT(e)||"Unknown",s));return Mt({},r,n)}function id(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ho,Go=lr.current,wt(lr,e),wt(Cr,Cr.current),!0}function xx(e,t,r){var n=e.stateNode;if(!n)throw Error(oe(169));r?(e=P_(e,t,Go),n.__reactInternalMemoizedMergedChildContext=e,St(Cr),St(lr),wt(lr,e)):St(Cr),wt(Cr,r)}var cs=null,nf=!1,Eh=!1;function A_(e){cs===null?cs=[e]:cs.push(e)}function L2(e){nf=!0,A_(e)}function ko(){if(!Eh&&cs!==null){Eh=!0;var e=0,t=pt;try{var r=cs;for(pt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}cs=null,nf=!1}catch(s){throw cs!==null&&(cs=cs.slice(e+1)),n_(Gm,ko),s}finally{pt=t,Eh=!1}}return null}var Oi=[],Mi=0,ad=null,ld=0,Xr=[],Qr=0,qo=null,us=1,ds="";function Ao(e,t){Oi[Mi++]=ld,Oi[Mi++]=ad,ad=e,ld=t}function D_(e,t,r){Xr[Qr++]=us,Xr[Qr++]=ds,Xr[Qr++]=qo,qo=e;var n=us;e=ds;var s=32-xn(n)-1;n&=~(1<<s),r+=1;var o=32-xn(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,us=1<<32-xn(t)+s|r<<s|n,ds=o+e}else us=1<<o|r<<s|n,ds=e}function sg(e){e.return!==null&&(Ao(e,1),D_(e,1,0))}function og(e){for(;e===ad;)ad=Oi[--Mi],Oi[Mi]=null,ld=Oi[--Mi],Oi[Mi]=null;for(;e===qo;)qo=Xr[--Qr],Xr[Qr]=null,ds=Xr[--Qr],Xr[Qr]=null,us=Xr[--Qr],Xr[Qr]=null}var zr=null,Fr=null,Tt=!1,mn=null;function O_(e,t){var r=en(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 wx(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,zr=e,Fr=so(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,zr=e,Fr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=qo!==null?{id:us,overflow:ds}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=en(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,zr=e,Fr=null,!0):!1;default:return!1}}function Op(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mp(e){if(Tt){var t=Fr;if(t){var r=t;if(!wx(e,t)){if(Op(e))throw Error(oe(418));t=so(r.nextSibling);var n=zr;t&&wx(e,t)?O_(n,r):(e.flags=e.flags&-4097|2,Tt=!1,zr=e)}}else{if(Op(e))throw Error(oe(418));e.flags=e.flags&-4097|2,Tt=!1,zr=e}}}function _x(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;zr=e}function iu(e){if(e!==zr)return!1;if(!Tt)return _x(e),Tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Rp(e.type,e.memoizedProps)),t&&(t=Fr)){if(Op(e))throw M_(),Error(oe(418));for(;t;)O_(e,t),t=so(t.nextSibling)}if(_x(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){Fr=so(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Fr=null}}else Fr=zr?so(e.stateNode.nextSibling):null;return!0}function M_(){for(var e=Fr;e;)e=so(e.nextSibling)}function ca(){Fr=zr=null,Tt=!1}function ig(e){mn===null?mn=[e]:mn.push(e)}var F2=Es.ReactCurrentBatchConfig;function Wa(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 au(e,t){throw e=Object.prototype.toString.call(t),Error(oe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bx(e){var t=e._init;return t(e._payload)}function I_(e){function t(p,h){if(e){var w=p.deletions;w===null?(p.deletions=[h],p.flags|=16):w.push(h)}}function r(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function n(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function s(p,h){return p=lo(p,h),p.index=0,p.sibling=null,p}function o(p,h,w){return p.index=w,e?(w=p.alternate,w!==null?(w=w.index,w<h?(p.flags|=2,h):w):(p.flags|=2,h)):(p.flags|=1048576,h)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,h,w,C){return h===null||h.tag!==6?(h=Oh(w,p.mode,C),h.return=p,h):(h=s(h,w),h.return=p,h)}function c(p,h,w,C){var j=w.type;return j===Ni?d(p,h,w.props.children,C,w.key):h!==null&&(h.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ws&&bx(j)===h.type)?(C=s(h,w.props),C.ref=Wa(p,h,w),C.return=p,C):(C=Lu(w.type,w.key,w.props,null,p.mode,C),C.ref=Wa(p,h,w),C.return=p,C)}function u(p,h,w,C){return h===null||h.tag!==4||h.stateNode.containerInfo!==w.containerInfo||h.stateNode.implementation!==w.implementation?(h=Mh(w,p.mode,C),h.return=p,h):(h=s(h,w.children||[]),h.return=p,h)}function d(p,h,w,C,j){return h===null||h.tag!==7?(h=Yo(w,p.mode,C,j),h.return=p,h):(h=s(h,w),h.return=p,h)}function f(p,h,w){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Oh(""+h,p.mode,w),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case qc:return w=Lu(h.type,h.key,h.props,null,p.mode,w),w.ref=Wa(p,null,h),w.return=p,w;case Ei:return h=Mh(h,p.mode,w),h.return=p,h;case Ws:var C=h._init;return f(p,C(h._payload),w)}if(tl(h)||Fa(h))return h=Yo(h,p.mode,w,null),h.return=p,h;au(p,h)}return null}function m(p,h,w,C){var j=h!==null?h.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:a(p,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case qc:return w.key===j?c(p,h,w,C):null;case Ei:return w.key===j?u(p,h,w,C):null;case Ws:return j=w._init,m(p,h,j(w._payload),C)}if(tl(w)||Fa(w))return j!==null?null:d(p,h,w,C,null);au(p,w)}return null}function y(p,h,w,C,j){if(typeof C=="string"&&C!==""||typeof C=="number")return p=p.get(w)||null,a(h,p,""+C,j);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case qc:return p=p.get(C.key===null?w:C.key)||null,c(h,p,C,j);case Ei:return p=p.get(C.key===null?w:C.key)||null,u(h,p,C,j);case Ws:var E=C._init;return y(p,h,w,E(C._payload),j)}if(tl(C)||Fa(C))return p=p.get(w)||null,d(h,p,C,j,null);au(h,C)}return null}function x(p,h,w,C){for(var j=null,E=null,R=h,P=h=0,A=null;R!==null&&P<w.length;P++){R.index>P?(A=R,R=null):A=R.sibling;var L=m(p,R,w[P],C);if(L===null){R===null&&(R=A);break}e&&R&&L.alternate===null&&t(p,R),h=o(L,h,P),E===null?j=L:E.sibling=L,E=L,R=A}if(P===w.length)return r(p,R),Tt&&Ao(p,P),j;if(R===null){for(;P<w.length;P++)R=f(p,w[P],C),R!==null&&(h=o(R,h,P),E===null?j=R:E.sibling=R,E=R);return Tt&&Ao(p,P),j}for(R=n(p,R);P<w.length;P++)A=y(R,p,P,w[P],C),A!==null&&(e&&A.alternate!==null&&R.delete(A.key===null?P:A.key),h=o(A,h,P),E===null?j=A:E.sibling=A,E=A);return e&&R.forEach(function(q){return t(p,q)}),Tt&&Ao(p,P),j}function g(p,h,w,C){var j=Fa(w);if(typeof j!="function")throw Error(oe(150));if(w=j.call(w),w==null)throw Error(oe(151));for(var E=j=null,R=h,P=h=0,A=null,L=w.next();R!==null&&!L.done;P++,L=w.next()){R.index>P?(A=R,R=null):A=R.sibling;var q=m(p,R,L.value,C);if(q===null){R===null&&(R=A);break}e&&R&&q.alternate===null&&t(p,R),h=o(q,h,P),E===null?j=q:E.sibling=q,E=q,R=A}if(L.done)return r(p,R),Tt&&Ao(p,P),j;if(R===null){for(;!L.done;P++,L=w.next())L=f(p,L.value,C),L!==null&&(h=o(L,h,P),E===null?j=L:E.sibling=L,E=L);return Tt&&Ao(p,P),j}for(R=n(p,R);!L.done;P++,L=w.next())L=y(R,p,P,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?P:L.key),h=o(L,h,P),E===null?j=L:E.sibling=L,E=L);return e&&R.forEach(function(N){return t(p,N)}),Tt&&Ao(p,P),j}function _(p,h,w,C){if(typeof w=="object"&&w!==null&&w.type===Ni&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case qc:e:{for(var j=w.key,E=h;E!==null;){if(E.key===j){if(j=w.type,j===Ni){if(E.tag===7){r(p,E.sibling),h=s(E,w.props.children),h.return=p,p=h;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ws&&bx(j)===E.type){r(p,E.sibling),h=s(E,w.props),h.ref=Wa(p,E,w),h.return=p,p=h;break e}r(p,E);break}else t(p,E);E=E.sibling}w.type===Ni?(h=Yo(w.props.children,p.mode,C,w.key),h.return=p,p=h):(C=Lu(w.type,w.key,w.props,null,p.mode,C),C.ref=Wa(p,h,w),C.return=p,p=C)}return i(p);case Ei:e:{for(E=w.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===w.containerInfo&&h.stateNode.implementation===w.implementation){r(p,h.sibling),h=s(h,w.children||[]),h.return=p,p=h;break e}else{r(p,h);break}else t(p,h);h=h.sibling}h=Mh(w,p.mode,C),h.return=p,p=h}return i(p);case Ws:return E=w._init,_(p,h,E(w._payload),C)}if(tl(w))return x(p,h,w,C);if(Fa(w))return g(p,h,w,C);au(p,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,h!==null&&h.tag===6?(r(p,h.sibling),h=s(h,w),h.return=p,p=h):(r(p,h),h=Oh(w,p.mode,C),h.return=p,p=h),i(p)):r(p,h)}return _}var ua=I_(!0),L_=I_(!1),cd=So(null),ud=null,Ii=null,ag=null;function lg(){ag=Ii=ud=null}function cg(e){var t=cd.current;St(cd),e._currentValue=t}function Ip(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 Ki(e,t){ud=e,ag=Ii=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(kr=!0),e.firstContext=null)}function nn(e){var t=e._currentValue;if(ag!==e)if(e={context:e,memoizedValue:t,next:null},Ii===null){if(ud===null)throw Error(oe(308));Ii=e,ud.dependencies={lanes:0,firstContext:e}}else Ii=Ii.next=e;return t}var Fo=null;function ug(e){Fo===null?Fo=[e]:Fo.push(e)}function F_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,ug(t)):(r.next=s.next,s.next=r),t.interleaved=r,ws(e,n)}function ws(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 Bs=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z_(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 ps(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function oo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,lt&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ws(e,r)}return s=n.interleaved,s===null?(t.next=t,ug(n)):(t.next=s.next,s.next=t),n.interleaved=t,ws(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,qm(e,r)}}function Sx(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 dd(e,t,r,n){var s=e.updateQueue;Bs=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,a=o;do{var m=a.lane,y=a.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,g=a;switch(m=t,y=r,g.tag){case 1:if(x=g.payload,typeof x=="function"){f=x.call(y,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(y,f,m):x,m==null)break e;f=Mt({},f,m);break e;case 2:Bs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else y={eventTime:y,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,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&&(c=f),s.baseState=c,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);Qo|=i,e.lanes=i,e.memoizedState=f}}function kx(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 wc={},Vn=So(wc),Fl=So(wc),zl=So(wc);function zo(e){if(e===wc)throw Error(oe(174));return e}function fg(e,t){switch(wt(zl,t),wt(Fl,e),wt(Vn,wc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}St(Vn),wt(Vn,t)}function da(){St(Vn),St(Fl),St(zl)}function U_(e){zo(zl.current);var t=zo(Vn.current),r=gp(t,e.type);t!==r&&(wt(Fl,e),wt(Vn,r))}function hg(e){Fl.current===e&&(St(Vn),St(Fl))}var At=So(0);function fd(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 Nh=[];function pg(){for(var e=0;e<Nh.length;e++)Nh[e]._workInProgressVersionPrimary=null;Nh.length=0}var Au=Es.ReactCurrentDispatcher,Th=Es.ReactCurrentBatchConfig,Xo=0,Ot=null,Zt=null,Xt=null,hd=!1,yl=!1,Ul=0,z2=0;function sr(){throw Error(oe(321))}function mg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!bn(e[r],t[r]))return!1;return!0}function gg(e,t,r,n,s,o){if(Xo=o,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Au.current=e===null||e.memoizedState===null?W2:B2,e=r(n,s),yl){o=0;do{if(yl=!1,Ul=0,25<=o)throw Error(oe(301));o+=1,Xt=Zt=null,t.updateQueue=null,Au.current=H2,e=r(n,s)}while(yl)}if(Au.current=pd,t=Zt!==null&&Zt.next!==null,Xo=0,Xt=Zt=Ot=null,hd=!1,t)throw Error(oe(300));return e}function vg(){var e=Ul!==0;return Ul=0,e}function On(){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 sn(){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 $l(e,t){return typeof t=="function"?t(e):t}function Rh(e){var t=sn(),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,c=null,u=o;do{var d=u.lane;if((Xo&d)===d)c!==null&&(c=c.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};c===null?(a=c=f,i=n):c=c.next=f,Ot.lanes|=d,Qo|=d}u=u.next}while(u!==null&&u!==o);c===null?i=n:c.next=a,bn(n,t.memoizedState)||(kr=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ot.lanes|=o,Qo|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ph(e){var t=sn(),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);bn(o,t.memoizedState)||(kr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function $_(){}function V_(e,t){var r=Ot,n=sn(),s=t(),o=!bn(n.memoizedState,s);if(o&&(n.memoizedState=s,kr=!0),n=n.queue,yg(H_.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Xt!==null&&Xt.memoizedState.tag&1){if(r.flags|=2048,Vl(9,B_.bind(null,r,n,s,t),void 0,null),Qt===null)throw Error(oe(349));Xo&30||W_(r,t,s)}return s}function W_(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 B_(e,t,r,n){t.value=r,t.getSnapshot=n,Y_(t)&&Z_(e)}function H_(e,t,r){return r(function(){Y_(t)&&Z_(e)})}function Y_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!bn(e,r)}catch{return!0}}function Z_(e){var t=ws(e,1);t!==null&&wn(t,e,1,-1)}function Cx(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:e},t.queue=e,e=e.dispatch=V2.bind(null,Ot,e),[t.memoizedState,e]}function Vl(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 K_(){return sn().memoizedState}function Du(e,t,r,n){var s=On();Ot.flags|=e,s.memoizedState=Vl(1|t,r,void 0,n===void 0?null:n)}function sf(e,t,r,n){var s=sn();n=n===void 0?null:n;var o=void 0;if(Zt!==null){var i=Zt.memoizedState;if(o=i.destroy,n!==null&&mg(n,i.deps)){s.memoizedState=Vl(t,r,o,n);return}}Ot.flags|=e,s.memoizedState=Vl(1|t,r,o,n)}function jx(e,t){return Du(8390656,8,e,t)}function yg(e,t){return sf(2048,8,e,t)}function G_(e,t){return sf(4,2,e,t)}function q_(e,t){return sf(4,4,e,t)}function X_(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 Q_(e,t,r){return r=r!=null?r.concat([e]):null,sf(4,4,X_.bind(null,t,e),r)}function xg(){}function J_(e,t){var r=sn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&mg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function e1(e,t){var r=sn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&mg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function t1(e,t,r){return Xo&21?(bn(r,t)||(r=i_(),Ot.lanes|=r,Qo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,kr=!0),e.memoizedState=r)}function U2(e,t){var r=pt;pt=r!==0&&4>r?r:4,e(!0);var n=Th.transition;Th.transition={};try{e(!1),t()}finally{pt=r,Th.transition=n}}function r1(){return sn().memoizedState}function $2(e,t,r){var n=ao(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},n1(e))s1(t,r);else if(r=F_(e,t,r,n),r!==null){var s=mr();wn(r,e,n,s),o1(r,t,n)}}function V2(e,t,r){var n=ao(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(n1(e))s1(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,bn(a,i)){var c=t.interleaved;c===null?(s.next=s,ug(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=F_(e,t,s,n),r!==null&&(s=mr(),wn(r,e,n,s),o1(r,t,n))}}function n1(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function s1(e,t){yl=hd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function o1(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,qm(e,r)}}var pd={readContext:nn,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},W2={readContext:nn,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:nn,useEffect:jx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Du(4194308,4,X_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Du(4194308,4,e,t)},useInsertionEffect:function(e,t){return Du(4,2,e,t)},useMemo:function(e,t){var r=On();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=On();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=$2.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:Cx,useDebugValue:xg,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=Cx(!1),t=e[0];return e=U2.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=On();if(Tt){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=t(),Qt===null)throw Error(oe(349));Xo&30||W_(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,jx(H_.bind(null,n,o,e),[e]),n.flags|=2048,Vl(9,B_.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=On(),t=Qt.identifierPrefix;if(Tt){var r=ds,n=us;r=(n&~(1<<32-xn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ul++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=z2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},B2={readContext:nn,useCallback:J_,useContext:nn,useEffect:yg,useImperativeHandle:Q_,useInsertionEffect:G_,useLayoutEffect:q_,useMemo:e1,useReducer:Rh,useRef:K_,useState:function(){return Rh($l)},useDebugValue:xg,useDeferredValue:function(e){var t=sn();return t1(t,Zt.memoizedState,e)},useTransition:function(){var e=Rh($l)[0],t=sn().memoizedState;return[e,t]},useMutableSource:$_,useSyncExternalStore:V_,useId:r1,unstable_isNewReconciler:!1},H2={readContext:nn,useCallback:J_,useContext:nn,useEffect:yg,useImperativeHandle:Q_,useInsertionEffect:G_,useLayoutEffect:q_,useMemo:e1,useReducer:Ph,useRef:K_,useState:function(){return Ph($l)},useDebugValue:xg,useDeferredValue:function(e){var t=sn();return Zt===null?t.memoizedState=e:t1(t,Zt.memoizedState,e)},useTransition:function(){var e=Ph($l)[0],t=sn().memoizedState;return[e,t]},useMutableSource:$_,useSyncExternalStore:V_,useId:r1,unstable_isNewReconciler:!1};function dn(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 Lp(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 of={isMounted:function(e){return(e=e._reactInternals)?li(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=mr(),s=ao(e),o=ps(n,s);o.payload=t,r!=null&&(o.callback=r),t=oo(e,o,s),t!==null&&(wn(t,e,s,n),Pu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=mr(),s=ao(e),o=ps(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=oo(e,o,s),t!==null&&(wn(t,e,s,n),Pu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=mr(),n=ao(e),s=ps(r,n);s.tag=2,t!=null&&(s.callback=t),t=oo(e,s,n),t!==null&&(wn(t,e,n,r),Pu(t,e,n))}};function Ex(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?!Ol(r,n)||!Ol(s,o):!0}function i1(e,t,r){var n=!1,s=ho,o=t.contextType;return typeof o=="object"&&o!==null?o=nn(o):(s=jr(t)?Go:lr.current,n=t.contextTypes,o=(n=n!=null)?la(e,s):ho),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=of,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Nx(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&&of.enqueueReplaceState(t,t.state,null)}function Fp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},dg(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=nn(o):(o=jr(t)?Go:lr.current,s.context=la(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Lp(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&&of.enqueueReplaceState(s,s.state,null),dd(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function fa(e,t){try{var r="",n=t;do r+=xT(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 Ah(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function zp(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Y2=typeof WeakMap=="function"?WeakMap:Map;function a1(e,t,r){r=ps(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){gd||(gd=!0,Gp=n),zp(e,t)},r}function l1(e,t,r){r=ps(-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(){zp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){zp(e,t),typeof n!="function"&&(io===null?io=new Set([this]):io.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Tx(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Y2;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=iR.bind(null,e,t,r),t.then(e,e))}function Rx(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 Px(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=ps(-1,1),t.tag=2,oo(r,t,1))),r.lanes|=1),e)}var Z2=Es.ReactCurrentOwner,kr=!1;function hr(e,t,r,n){t.child=e===null?L_(t,null,r,n):ua(t,e.child,r,n)}function Ax(e,t,r,n,s){r=r.render;var o=t.ref;return Ki(t,s),n=gg(e,t,r,n,o,s),r=vg(),e!==null&&!kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_s(e,t,s)):(Tt&&r&&sg(t),t.flags|=1,hr(e,t,n,s),t.child)}function Dx(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!Eg(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,c1(e,t,o,n,s)):(e=Lu(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:Ol,r(i,n)&&e.ref===t.ref)return _s(e,t,s)}return t.flags|=1,e=lo(o,n),e.ref=t.ref,e.return=t,t.child=e}function c1(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ol(o,n)&&e.ref===t.ref)if(kr=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(kr=!0);else return t.lanes=e.lanes,_s(e,t,s)}return Up(e,t,r,n,s)}function u1(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},wt(Fi,Mr),Mr|=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,wt(Fi,Mr),Mr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,wt(Fi,Mr),Mr|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,wt(Fi,Mr),Mr|=n;return hr(e,t,s,r),t.child}function d1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Up(e,t,r,n,s){var o=jr(r)?Go:lr.current;return o=la(t,o),Ki(t,s),r=gg(e,t,r,n,o,s),n=vg(),e!==null&&!kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_s(e,t,s)):(Tt&&n&&sg(t),t.flags|=1,hr(e,t,r,s),t.child)}function Ox(e,t,r,n,s){if(jr(r)){var o=!0;id(t)}else o=!1;if(Ki(t,s),t.stateNode===null)Ou(e,t),i1(t,r,n),Fp(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=nn(u):(u=jr(r)?Go:lr.current,u=la(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||c!==u)&&Nx(t,i,n,u),Bs=!1;var m=t.memoizedState;i.state=m,dd(t,n,i,s),c=t.memoizedState,a!==n||m!==c||Cr.current||Bs?(typeof d=="function"&&(Lp(t,r,d,n),c=t.memoizedState),(a=Bs||Ex(t,r,a,n,m,c,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=c),i.props=n,i.state=c,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,z_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:dn(t.type,a),i.props=u,f=t.pendingProps,m=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=nn(c):(c=jr(r)?Go:lr.current,c=la(t,c));var y=r.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||m!==c)&&Nx(t,i,n,c),Bs=!1,m=t.memoizedState,i.state=m,dd(t,n,i,s);var x=t.memoizedState;a!==f||m!==x||Cr.current||Bs?(typeof y=="function"&&(Lp(t,r,y,n),x=t.memoizedState),(u=Bs||Ex(t,r,u,n,m,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,c)),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=c,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 $p(e,t,r,n,o,s)}function $p(e,t,r,n,s,o){d1(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&xx(t,r,!1),_s(e,t,o);n=t.stateNode,Z2.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=ua(t,e.child,null,o),t.child=ua(t,null,a,o)):hr(e,t,a,o),t.memoizedState=n.state,s&&xx(t,r,!0),t.child}function f1(e){var t=e.stateNode;t.pendingContext?yx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yx(e,t.context,!1),fg(e,t.containerInfo)}function Mx(e,t,r,n,s){return ca(),ig(s),t.flags|=256,hr(e,t,r,n),t.child}var Vp={dehydrated:null,treeContext:null,retryLane:0};function Wp(e){return{baseLanes:e,cachePool:null,transitions:null}}function h1(e,t,r){var n=t.pendingProps,s=At.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),wt(At,s&1),e===null)return Mp(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=cf(i,n,0,null),e=Yo(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Wp(r),t.memoizedState=Vp,e):wg(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return K2(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=lo(s,c),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=lo(a,o):(o=Yo(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?Wp(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=Vp,n}return o=e.child,e=o.sibling,n=lo(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 wg(e,t){return t=cf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function lu(e,t,r,n){return n!==null&&ig(n),ua(t,e.child,null,r),e=wg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function K2(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Ah(Error(oe(422))),lu(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=cf({mode:"visible",children:n.children},s,0,null),o=Yo(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&ua(t,e.child,null,i),t.child.memoizedState=Wp(i),t.memoizedState=Vp,o);if(!(t.mode&1))return lu(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=Ah(o,n,void 0),lu(e,t,i,n)}if(a=(i&e.childLanes)!==0,kr||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,ws(e,s),wn(n,e,s,-1))}return jg(),n=Ah(Error(oe(421))),lu(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=aR.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Fr=so(s.nextSibling),zr=t,Tt=!0,mn=null,e!==null&&(Xr[Qr++]=us,Xr[Qr++]=ds,Xr[Qr++]=qo,us=e.id,ds=e.overflow,qo=t),t=wg(t,n.children),t.flags|=4096,t)}function Ix(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ip(e.return,t,r)}function Dh(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 p1(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(hr(e,t,n.children,r),n=At.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&&Ix(e,r,t);else if(e.tag===19)Ix(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(wt(At,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&&fd(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Dh(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&&fd(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Dh(t,!0,r,null,o);break;case"together":Dh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ou(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _s(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Qo|=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=lo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=lo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function G2(e,t,r){switch(t.tag){case 3:f1(t),ca();break;case 5:U_(t);break;case 1:jr(t.type)&&id(t);break;case 4:fg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;wt(cd,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(wt(At,At.current&1),t.flags|=128,null):r&t.child.childLanes?h1(e,t,r):(wt(At,At.current&1),e=_s(e,t,r),e!==null?e.sibling:null);wt(At,At.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return p1(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),wt(At,At.current),n)break;return null;case 22:case 23:return t.lanes=0,u1(e,t,r)}return _s(e,t,r)}var m1,Bp,g1,v1;m1=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}};Bp=function(){};g1=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,zo(Vn.current);var o=null;switch(r){case"input":s=fp(e,s),n=fp(e,n),o=[];break;case"select":s=Mt({},s,{value:void 0}),n=Mt({},n,{value:void 0}),o=[];break;case"textarea":s=mp(e,s),n=mp(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=sd)}vp(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"&&(El.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var c=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(o||(o=[]),o.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(El.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&bt("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};v1=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ba(e,t){if(!Tt)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 q2(e,t,r){var n=t.pendingProps;switch(og(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 jr(t.type)&&od(),or(t),null;case 3:return n=t.stateNode,da(),St(Cr),St(lr),pg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(iu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mn!==null&&(Qp(mn),mn=null))),Bp(e,t),or(t),null;case 5:hg(t);var s=zo(zl.current);if(r=t.type,e!==null&&t.stateNode!=null)g1(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=zo(Vn.current),iu(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Mn]=t,n[Ll]=o,e=(t.mode&1)!==0,r){case"dialog":bt("cancel",n),bt("close",n);break;case"iframe":case"object":case"embed":bt("load",n);break;case"video":case"audio":for(s=0;s<nl.length;s++)bt(nl[s],n);break;case"source":bt("error",n);break;case"img":case"image":case"link":bt("error",n),bt("load",n);break;case"details":bt("toggle",n);break;case"input":Hy(n,o),bt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},bt("invalid",n);break;case"textarea":Zy(n,o),bt("invalid",n)}vp(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&&ou(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ou(n.textContent,a,e),s=["children",""+a]):El.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&bt("scroll",n)}switch(r){case"input":Xc(n),Yy(n,o,!0);break;case"textarea":Xc(n),Ky(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=sd)}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=Hw(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[Mn]=t,e[Ll]=n,m1(e,t,!1,!1),t.stateNode=e;e:{switch(i=yp(r,n),r){case"dialog":bt("cancel",e),bt("close",e),s=n;break;case"iframe":case"object":case"embed":bt("load",e),s=n;break;case"video":case"audio":for(s=0;s<nl.length;s++)bt(nl[s],e);s=n;break;case"source":bt("error",e),s=n;break;case"img":case"image":case"link":bt("error",e),bt("load",e),s=n;break;case"details":bt("toggle",e),s=n;break;case"input":Hy(e,n),s=fp(e,n),bt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Mt({},n,{value:void 0}),bt("invalid",e);break;case"textarea":Zy(e,n),s=mp(e,n),bt("invalid",e);break;default:s=n}vp(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?Kw(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Yw(e,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Nl(e,c):typeof c=="number"&&Nl(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(El.hasOwnProperty(o)?c!=null&&o==="onScroll"&&bt("scroll",e):c!=null&&Bm(e,o,c,i))}switch(r){case"input":Xc(e),Yy(e,n,!1);break;case"textarea":Xc(e),Ky(e);break;case"option":n.value!=null&&e.setAttribute("value",""+fo(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Bi(e,!!n.multiple,o,!1):n.defaultValue!=null&&Bi(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=sd)}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)v1(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(oe(166));if(r=zo(zl.current),zo(Vn.current),iu(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mn]=t,(o=n.nodeValue!==r)&&(e=zr,e!==null))switch(e.tag){case 3:ou(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ou(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mn]=t,t.stateNode=n}return or(t),null;case 13:if(St(At),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Tt&&Fr!==null&&t.mode&1&&!(t.flags&128))M_(),ca(),t.flags|=98560,o=!1;else if(o=iu(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[Mn]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;or(t),o=!1}else mn!==null&&(Qp(mn),mn=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||At.current&1?Kt===0&&(Kt=3):jg())),t.updateQueue!==null&&(t.flags|=4),or(t),null);case 4:return da(),Bp(e,t),e===null&&Ml(t.stateNode.containerInfo),or(t),null;case 10:return cg(t.type._context),or(t),null;case 17:return jr(t.type)&&od(),or(t),null;case 19:if(St(At),o=t.memoizedState,o===null)return or(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Ba(o,!1);else{if(Kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=fd(e),i!==null){for(t.flags|=128,Ba(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 wt(At,At.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>ha&&(t.flags|=128,n=!0,Ba(o,!1),t.lanes=4194304)}else{if(!n)if(e=fd(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ba(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Tt)return or(t),null}else 2*Ut()-o.renderingStartTime>ha&&r!==1073741824&&(t.flags|=128,n=!0,Ba(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=At.current,wt(At,n?r&1|2:r&1),t):(or(t),null);case 22:case 23:return Cg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Mr&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 X2(e,t){switch(og(t),t.tag){case 1:return jr(t.type)&&od(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return da(),St(Cr),St(lr),pg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hg(t),null;case 13:if(St(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(oe(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(At),null;case 4:return da(),null;case 10:return cg(t.type._context),null;case 22:case 23:return Cg(),null;case 24:return null;default:return null}}var cu=!1,ir=!1,Q2=typeof WeakSet=="function"?WeakSet:Set,be=null;function Li(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 Hp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var Lx=!1;function J2(e,t){if(Np=td,e=b_(),ng(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,c=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var y;f!==r||s!==0&&f.nodeType!==3||(a=i+s),f!==o||n!==0&&f.nodeType!==3||(c=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)m=f,f=y;for(;;){if(f===e)break t;if(m===r&&++u===s&&(a=i),m===o&&++d===n&&(c=i),(y=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=y}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Tp={focusedElem:e,selectionRange:r},td=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;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,_=x.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:dn(t.type,g),_);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.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,be=e;break}be=t.return}return x=Lx,Lx=!1,x}function xl(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&&Hp(t,r,o)}s=s.next}while(s!==n)}}function af(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 Yp(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 y1(e){var t=e.alternate;t!==null&&(e.alternate=null,y1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mn],delete t[Ll],delete t[Ap],delete t[M2],delete t[I2])),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 x1(e){return e.tag===5||e.tag===3||e.tag===4}function Fx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||x1(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 Zp(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=sd));else if(n!==4&&(e=e.child,e!==null))for(Zp(e,t,r),e=e.sibling;e!==null;)Zp(e,t,r),e=e.sibling}function Kp(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(Kp(e,t,r),e=e.sibling;e!==null;)Kp(e,t,r),e=e.sibling}var tr=null,fn=!1;function Fs(e,t,r){for(r=r.child;r!==null;)w1(e,t,r),r=r.sibling}function w1(e,t,r){if($n&&typeof $n.onCommitFiberUnmount=="function")try{$n.onCommitFiberUnmount(Qd,r)}catch{}switch(r.tag){case 5:ir||Li(r,t);case 6:var n=tr,s=fn;tr=null,Fs(e,t,r),tr=n,fn=s,tr!==null&&(fn?(e=tr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):tr.removeChild(r.stateNode));break;case 18:tr!==null&&(fn?(e=tr,r=r.stateNode,e.nodeType===8?jh(e.parentNode,r):e.nodeType===1&&jh(e,r),Al(e)):jh(tr,r.stateNode));break;case 4:n=tr,s=fn,tr=r.stateNode.containerInfo,fn=!0,Fs(e,t,r),tr=n,fn=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)&&Hp(r,t,i),s=s.next}while(s!==n)}Fs(e,t,r);break;case 1:if(!ir&&(Li(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)}Fs(e,t,r);break;case 21:Fs(e,t,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,Fs(e,t,r),ir=n):Fs(e,t,r);break;default:Fs(e,t,r)}}function zx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Q2),t.forEach(function(n){var s=lR.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function un(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:tr=a.stateNode,fn=!1;break e;case 3:tr=a.stateNode.containerInfo,fn=!0;break e;case 4:tr=a.stateNode.containerInfo,fn=!0;break e}a=a.return}if(tr===null)throw Error(oe(160));w1(o,i,s),tr=null,fn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_1(t,e),t=t.sibling}function _1(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),Dn(e),n&4){try{xl(3,e,e.return),af(3,e)}catch(g){Lt(e,e.return,g)}try{xl(5,e,e.return)}catch(g){Lt(e,e.return,g)}}break;case 1:un(t,e),Dn(e),n&512&&r!==null&&Li(r,r.return);break;case 5:if(un(t,e),Dn(e),n&512&&r!==null&&Li(r,r.return),e.flags&32){var s=e.stateNode;try{Nl(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,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Ww(s,o),yp(a,i);var u=yp(a,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?Kw(s,f):d==="dangerouslySetInnerHTML"?Yw(s,f):d==="children"?Nl(s,f):Bm(s,d,f,u)}switch(a){case"input":hp(s,o);break;case"textarea":Bw(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?Bi(s,!!o.multiple,y,!1):m!==!!o.multiple&&(o.defaultValue!=null?Bi(s,!!o.multiple,o.defaultValue,!0):Bi(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ll]=o}catch(g){Lt(e,e.return,g)}}break;case 6:if(un(t,e),Dn(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(un(t,e),Dn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Al(t.containerInfo)}catch(g){Lt(e,e.return,g)}break;case 4:un(t,e),Dn(e);break;case 13:un(t,e),Dn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Sg=Ut())),n&4&&zx(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(ir=(u=ir)||d,un(t,e),ir=u):un(t,e),Dn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(be=e,d=e.child;d!==null;){for(f=be=d;be!==null;){switch(m=be,y=m.child,m.tag){case 0:case 11:case 14:case 15:xl(4,m,m.return);break;case 1:Li(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:Li(m,m.return);break;case 22:if(m.memoizedState!==null){$x(f);continue}}y!==null?(y.return=m,be=y):$x(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,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=Zw("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:un(t,e),Dn(e),n&4&&zx(e);break;case 21:break;default:un(t,e),Dn(e)}}function Dn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(x1(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&&(Nl(s,""),n.flags&=-33);var o=Fx(e);Kp(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Fx(e);Zp(e,a,i);break;default:throw Error(oe(161))}}catch(c){Lt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eR(e,t,r){be=e,b1(e)}function b1(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var s=be,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||cu;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||ir;a=cu;var u=ir;if(cu=i,(ir=c)&&!u)for(be=s;be!==null;)i=be,c=i.child,i.tag===22&&i.memoizedState!==null?Vx(s):c!==null?(c.return=i,be=c):Vx(s);for(;o!==null;)be=o,b1(o),o=o.sibling;be=s,cu=a,ir=u}Ux(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,be=o):Ux(e)}}function Ux(e){for(;be!==null;){var t=be;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ir||af(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:dn(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&kx(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}kx(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.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&&Al(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(oe(163))}ir||t.flags&512&&Yp(t)}catch(m){Lt(t,t.return,m)}}if(t===e){be=null;break}if(r=t.sibling,r!==null){r.return=t.return,be=r;break}be=t.return}}function $x(e){for(;be!==null;){var t=be;if(t===e){be=null;break}var r=t.sibling;if(r!==null){r.return=t.return,be=r;break}be=t.return}}function Vx(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{af(4,t)}catch(c){Lt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){Lt(t,s,c)}}var o=t.return;try{Yp(t)}catch(c){Lt(t,o,c)}break;case 5:var i=t.return;try{Yp(t)}catch(c){Lt(t,i,c)}}}catch(c){Lt(t,t.return,c)}if(t===e){be=null;break}var a=t.sibling;if(a!==null){a.return=t.return,be=a;break}be=t.return}}var tR=Math.ceil,md=Es.ReactCurrentDispatcher,_g=Es.ReactCurrentOwner,tn=Es.ReactCurrentBatchConfig,lt=0,Qt=null,Bt=null,rr=0,Mr=0,Fi=So(0),Kt=0,Wl=null,Qo=0,lf=0,bg=0,wl=null,Sr=null,Sg=0,ha=1/0,is=null,gd=!1,Gp=null,io=null,uu=!1,Xs=null,vd=0,_l=0,qp=null,Mu=-1,Iu=0;function mr(){return lt&6?Ut():Mu!==-1?Mu:Mu=Ut()}function ao(e){return e.mode&1?lt&2&&rr!==0?rr&-rr:F2.transition!==null?(Iu===0&&(Iu=i_()),Iu):(e=pt,e!==0||(e=window.event,e=e===void 0?16:h_(e.type)),e):1}function wn(e,t,r,n){if(50<_l)throw _l=0,qp=null,Error(oe(185));vc(e,r,n),(!(lt&2)||e!==Qt)&&(e===Qt&&(!(lt&2)&&(lf|=r),Kt===4&&Ys(e,rr)),Er(e,n),r===1&&lt===0&&!(t.mode&1)&&(ha=Ut()+500,nf&&ko()))}function Er(e,t){var r=e.callbackNode;FT(e,t);var n=ed(e,e===Qt?rr:0);if(n===0)r!==null&&Xy(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Xy(r),t===1)e.tag===0?L2(Wx.bind(null,e)):A_(Wx.bind(null,e)),D2(function(){!(lt&6)&&ko()}),r=null;else{switch(a_(n)){case 1:r=Gm;break;case 4:r=s_;break;case 16:r=Ju;break;case 536870912:r=o_;break;default:r=Ju}r=R1(r,S1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function S1(e,t){if(Mu=-1,Iu=0,lt&6)throw Error(oe(327));var r=e.callbackNode;if(Gi()&&e.callbackNode!==r)return null;var n=ed(e,e===Qt?rr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=yd(e,n);else{t=n;var s=lt;lt|=2;var o=C1();(Qt!==e||rr!==t)&&(is=null,ha=Ut()+500,Ho(e,t));do try{sR();break}catch(a){k1(e,a)}while(!0);lg(),md.current=o,lt=s,Bt!==null?t=0:(Qt=null,rr=0,t=Kt)}if(t!==0){if(t===2&&(s=Sp(e),s!==0&&(n=s,t=Xp(e,s))),t===1)throw r=Wl,Ho(e,0),Ys(e,n),Er(e,Ut()),r;if(t===6)Ys(e,n);else{if(s=e.current.alternate,!(n&30)&&!rR(s)&&(t=yd(e,n),t===2&&(o=Sp(e),o!==0&&(n=o,t=Xp(e,o))),t===1))throw r=Wl,Ho(e,0),Ys(e,n),Er(e,Ut()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(oe(345));case 2:Do(e,Sr,is);break;case 3:if(Ys(e,n),(n&130023424)===n&&(t=Sg+500-Ut(),10<t)){if(ed(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){mr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Pp(Do.bind(null,e,Sr,is),t);break}Do(e,Sr,is);break;case 4:if(Ys(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-xn(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*tR(n/1960))-n,10<n){e.timeoutHandle=Pp(Do.bind(null,e,Sr,is),n);break}Do(e,Sr,is);break;case 5:Do(e,Sr,is);break;default:throw Error(oe(329))}}}return Er(e,Ut()),e.callbackNode===r?S1.bind(null,e):null}function Xp(e,t){var r=wl;return e.current.memoizedState.isDehydrated&&(Ho(e,t).flags|=256),e=yd(e,t),e!==2&&(t=Sr,Sr=r,t!==null&&Qp(t)),e}function Qp(e){Sr===null?Sr=e:Sr.push.apply(Sr,e)}function rR(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(!bn(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 Ys(e,t){for(t&=~bg,t&=~lf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-xn(t),n=1<<r;e[r]=-1,t&=~n}}function Wx(e){if(lt&6)throw Error(oe(327));Gi();var t=ed(e,0);if(!(t&1))return Er(e,Ut()),null;var r=yd(e,t);if(e.tag!==0&&r===2){var n=Sp(e);n!==0&&(t=n,r=Xp(e,n))}if(r===1)throw r=Wl,Ho(e,0),Ys(e,t),Er(e,Ut()),r;if(r===6)throw Error(oe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Do(e,Sr,is),Er(e,Ut()),null}function kg(e,t){var r=lt;lt|=1;try{return e(t)}finally{lt=r,lt===0&&(ha=Ut()+500,nf&&ko())}}function Jo(e){Xs!==null&&Xs.tag===0&&!(lt&6)&&Gi();var t=lt;lt|=1;var r=tn.transition,n=pt;try{if(tn.transition=null,pt=1,e)return e()}finally{pt=n,tn.transition=r,lt=t,!(lt&6)&&ko()}}function Cg(){Mr=Fi.current,St(Fi)}function Ho(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,A2(r)),Bt!==null)for(r=Bt.return;r!==null;){var n=r;switch(og(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&od();break;case 3:da(),St(Cr),St(lr),pg();break;case 5:hg(n);break;case 4:da();break;case 13:St(At);break;case 19:St(At);break;case 10:cg(n.type._context);break;case 22:case 23:Cg()}r=r.return}if(Qt=e,Bt=e=lo(e.current,null),rr=Mr=t,Kt=0,Wl=null,bg=lf=Qo=0,Sr=wl=null,Fo!==null){for(t=0;t<Fo.length;t++)if(r=Fo[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}Fo=null}return e}function k1(e,t){do{var r=Bt;try{if(lg(),Au.current=pd,hd){for(var n=Ot.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}hd=!1}if(Xo=0,Xt=Zt=Ot=null,yl=!1,Ul=0,_g.current=null,r===null||r.return===null){Kt=1,Wl=t,Bt=null;break}e:{var o=e,i=r.return,a=r,c=t;if(t=rr,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,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 y=Rx(i);if(y!==null){y.flags&=-257,Px(y,i,a,o,t),y.mode&1&&Tx(o,u,t),t=y,c=u;var x=t.updateQueue;if(x===null){var g=new Set;g.add(c),t.updateQueue=g}else x.add(c);break e}else{if(!(t&1)){Tx(o,u,t),jg();break e}c=Error(oe(426))}}else if(Tt&&a.mode&1){var _=Rx(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Px(_,i,a,o,t),ig(fa(c,a));break e}}o=c=fa(c,a),Kt!==4&&(Kt=2),wl===null?wl=[o]:wl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=a1(o,c,t);Sx(o,p);break e;case 1:a=c;var h=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof h.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(io===null||!io.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var C=l1(o,a,t);Sx(o,C);break e}}o=o.return}while(o!==null)}E1(r)}catch(j){t=j,Bt===r&&r!==null&&(Bt=r=r.return);continue}break}while(!0)}function C1(){var e=md.current;return md.current=pd,e===null?pd:e}function jg(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),Qt===null||!(Qo&268435455)&&!(lf&268435455)||Ys(Qt,rr)}function yd(e,t){var r=lt;lt|=2;var n=C1();(Qt!==e||rr!==t)&&(is=null,Ho(e,t));do try{nR();break}catch(s){k1(e,s)}while(!0);if(lg(),lt=r,md.current=n,Bt!==null)throw Error(oe(261));return Qt=null,rr=0,Kt}function nR(){for(;Bt!==null;)j1(Bt)}function sR(){for(;Bt!==null&&!TT();)j1(Bt)}function j1(e){var t=T1(e.alternate,e,Mr);e.memoizedProps=e.pendingProps,t===null?E1(e):Bt=t,_g.current=null}function E1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=X2(r,t),r!==null){r.flags&=32767,Bt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kt=6,Bt=null;return}}else if(r=q2(r,t,Mr),r!==null){Bt=r;return}if(t=t.sibling,t!==null){Bt=t;return}Bt=t=e}while(t!==null);Kt===0&&(Kt=5)}function Do(e,t,r){var n=pt,s=tn.transition;try{tn.transition=null,pt=1,oR(e,t,r,n)}finally{tn.transition=s,pt=n}return null}function oR(e,t,r,n){do Gi();while(Xs!==null);if(lt&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(zT(e,o),e===Qt&&(Bt=Qt=null,rr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||uu||(uu=!0,R1(Ju,function(){return Gi(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=tn.transition,tn.transition=null;var i=pt;pt=1;var a=lt;lt|=4,_g.current=null,J2(e,r),_1(r,e),C2(Tp),td=!!Np,Tp=Np=null,e.current=r,eR(r),RT(),lt=a,pt=i,tn.transition=o}else e.current=r;if(uu&&(uu=!1,Xs=e,vd=s),o=e.pendingLanes,o===0&&(io=null),DT(r.stateNode),Er(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(gd)throw gd=!1,e=Gp,Gp=null,e;return vd&1&&e.tag!==0&&Gi(),o=e.pendingLanes,o&1?e===qp?_l++:(_l=0,qp=e):_l=0,ko(),null}function Gi(){if(Xs!==null){var e=a_(vd),t=tn.transition,r=pt;try{if(tn.transition=null,pt=16>e?16:e,Xs===null)var n=!1;else{if(e=Xs,Xs=null,vd=0,lt&6)throw Error(oe(331));var s=lt;for(lt|=4,be=e.current;be!==null;){var o=be,i=o.child;if(be.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(be=u;be!==null;){var d=be;switch(d.tag){case 0:case 11:case 15:xl(8,d,o)}var f=d.child;if(f!==null)f.return=d,be=f;else for(;be!==null;){d=be;var m=d.sibling,y=d.return;if(y1(d),d===u){be=null;break}if(m!==null){m.return=y,be=m;break}be=y}}}var x=o.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}be=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,be=i;else e:for(;be!==null;){if(o=be,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xl(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,be=p;break e}be=o.return}}var h=e.current;for(be=h;be!==null;){i=be;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,be=w;else e:for(i=h;be!==null;){if(a=be,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:af(9,a)}}catch(j){Lt(a,a.return,j)}if(a===i){be=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,be=C;break e}be=a.return}}if(lt=s,ko(),$n&&typeof $n.onPostCommitFiberRoot=="function")try{$n.onPostCommitFiberRoot(Qd,e)}catch{}n=!0}return n}finally{pt=r,tn.transition=t}}return!1}function Bx(e,t,r){t=fa(r,t),t=a1(e,t,1),e=oo(e,t,1),t=mr(),e!==null&&(vc(e,1,t),Er(e,t))}function Lt(e,t,r){if(e.tag===3)Bx(e,e,r);else for(;t!==null;){if(t.tag===3){Bx(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(io===null||!io.has(n))){e=fa(r,e),e=l1(t,e,1),t=oo(t,e,1),e=mr(),t!==null&&(vc(t,1,e),Er(t,e));break}}t=t.return}}function iR(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=mr(),e.pingedLanes|=e.suspendedLanes&r,Qt===e&&(rr&r)===r&&(Kt===4||Kt===3&&(rr&130023424)===rr&&500>Ut()-Sg?Ho(e,0):bg|=r),Er(e,t)}function N1(e,t){t===0&&(e.mode&1?(t=eu,eu<<=1,!(eu&130023424)&&(eu=4194304)):t=1);var r=mr();e=ws(e,t),e!==null&&(vc(e,t,r),Er(e,r))}function aR(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),N1(e,r)}function lR(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),N1(e,r)}var T1;T1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cr.current)kr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return kr=!1,G2(e,t,r);kr=!!(e.flags&131072)}else kr=!1,Tt&&t.flags&1048576&&D_(t,ld,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ou(e,t),e=t.pendingProps;var s=la(t,lr.current);Ki(t,r),s=gg(null,t,n,e,s,r);var o=vg();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,jr(n)?(o=!0,id(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,dg(t),s.updater=of,t.stateNode=s,s._reactInternals=t,Fp(t,n,e,r),t=$p(null,t,n,!0,o,r)):(t.tag=0,Tt&&o&&sg(t),hr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ou(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=uR(n),e=dn(n,e),s){case 0:t=Up(null,t,n,e,r);break e;case 1:t=Ox(null,t,n,e,r);break e;case 11:t=Ax(null,t,n,e,r);break e;case 14:t=Dx(null,t,n,dn(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:dn(n,s),Up(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Ox(e,t,n,s,r);case 3:e:{if(f1(t),e===null)throw Error(oe(387));n=t.pendingProps,o=t.memoizedState,s=o.element,z_(e,t),dd(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=fa(Error(oe(423)),t),t=Mx(e,t,n,r,s);break e}else if(n!==s){s=fa(Error(oe(424)),t),t=Mx(e,t,n,r,s);break e}else for(Fr=so(t.stateNode.containerInfo.firstChild),zr=t,Tt=!0,mn=null,r=L_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ca(),n===s){t=_s(e,t,r);break e}hr(e,t,n,r)}t=t.child}return t;case 5:return U_(t),e===null&&Mp(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Rp(n,s)?i=null:o!==null&&Rp(n,o)&&(t.flags|=32),d1(e,t),hr(e,t,i,r),t.child;case 6:return e===null&&Mp(t),null;case 13:return h1(e,t,r);case 4:return fg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ua(t,null,n,r):hr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Ax(e,t,n,s,r);case 7:return hr(e,t,t.pendingProps,r),t.child;case 8:return hr(e,t,t.pendingProps.children,r),t.child;case 12:return hr(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,wt(cd,n._currentValue),n._currentValue=i,o!==null)if(bn(o.value,i)){if(o.children===s.children&&!Cr.current){t=_s(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 c=a.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=ps(-1,r&-r),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),Ip(o.return,r,t),a.lanes|=r;break}c=c.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),Ip(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}hr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ki(t,r),s=nn(s),n=n(s),t.flags|=1,hr(e,t,n,r),t.child;case 14:return n=t.type,s=dn(n,t.pendingProps),s=dn(n.type,s),Dx(e,t,n,s,r);case 15:return c1(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Ou(e,t),t.tag=1,jr(n)?(e=!0,id(t)):e=!1,Ki(t,r),i1(t,n,s),Fp(t,n,s,r),$p(null,t,n,!0,e,r);case 19:return p1(e,t,r);case 22:return u1(e,t,r)}throw Error(oe(156,t.tag))};function R1(e,t){return n_(e,t)}function cR(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 en(e,t,r,n){return new cR(e,t,r,n)}function Eg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uR(e){if(typeof e=="function")return Eg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ym)return 11;if(e===Zm)return 14}return 2}function lo(e,t){var r=e.alternate;return r===null?(r=en(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 Lu(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")Eg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ni:return Yo(r.children,s,o,t);case Hm:i=8,s|=8;break;case lp:return e=en(12,r,t,s|2),e.elementType=lp,e.lanes=o,e;case cp:return e=en(13,r,t,s),e.elementType=cp,e.lanes=o,e;case up:return e=en(19,r,t,s),e.elementType=up,e.lanes=o,e;case Uw:return cf(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fw:i=10;break e;case zw:i=9;break e;case Ym:i=11;break e;case Zm:i=14;break e;case Ws:i=16,n=null;break e}throw Error(oe(130,e==null?e:typeof e,""))}return t=en(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Yo(e,t,r,n){return e=en(7,e,n,t),e.lanes=r,e}function cf(e,t,r,n){return e=en(22,e,n,t),e.elementType=Uw,e.lanes=r,e.stateNode={isHidden:!1},e}function Oh(e,t,r){return e=en(6,e,null,t),e.lanes=r,e}function Mh(e,t,r){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dR(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=mh(0),this.expirationTimes=mh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ng(e,t,r,n,s,o,i,a,c){return e=new dR(e,t,r,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=en(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(o),e}function fR(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ei,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function P1(e){if(!e)return ho;e=e._reactInternals;e:{if(li(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(jr(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(jr(r))return P_(e,r,t)}return t}function A1(e,t,r,n,s,o,i,a,c){return e=Ng(r,n,!0,e,s,o,i,a,c),e.context=P1(null),r=e.current,n=mr(),s=ao(r),o=ps(n,s),o.callback=t??null,oo(r,o,s),e.current.lanes=s,vc(e,s,n),Er(e,n),e}function uf(e,t,r,n){var s=t.current,o=mr(),i=ao(s);return r=P1(r),t.context===null?t.context=r:t.pendingContext=r,t=ps(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=oo(s,t,i),e!==null&&(wn(e,s,i,o),Pu(e,s,i)),i}function xd(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 Hx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Tg(e,t){Hx(e,t),(e=e.alternate)&&Hx(e,t)}function hR(){return null}var D1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rg(e){this._internalRoot=e}df.prototype.render=Rg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(oe(409));uf(e,t,null,null)};df.prototype.unmount=Rg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jo(function(){uf(null,e,null,null)}),t[xs]=null}};function df(e){this._internalRoot=e}df.prototype.unstable_scheduleHydration=function(e){if(e){var t=u_();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Hs.length&&t!==0&&t<Hs[r].priority;r++);Hs.splice(r,0,e),r===0&&f_(e)}};function Pg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ff(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yx(){}function pR(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=xd(i);o.call(u)}}var i=A1(t,n,e,0,null,!1,!1,"",Yx);return e._reactRootContainer=i,e[xs]=i.current,Ml(e.nodeType===8?e.parentNode:e),Jo(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=xd(c);a.call(u)}}var c=Ng(e,0,!1,null,null,!1,!1,"",Yx);return e._reactRootContainer=c,e[xs]=c.current,Ml(e.nodeType===8?e.parentNode:e),Jo(function(){uf(t,c,r,n)}),c}function hf(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=xd(i);a.call(c)}}uf(t,i,e,s)}else i=pR(r,t,e,s,n);return xd(i)}l_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=rl(t.pendingLanes);r!==0&&(qm(t,r|1),Er(t,Ut()),!(lt&6)&&(ha=Ut()+500,ko()))}break;case 13:Jo(function(){var n=ws(e,1);if(n!==null){var s=mr();wn(n,e,1,s)}}),Tg(e,1)}};Xm=function(e){if(e.tag===13){var t=ws(e,134217728);if(t!==null){var r=mr();wn(t,e,134217728,r)}Tg(e,134217728)}};c_=function(e){if(e.tag===13){var t=ao(e),r=ws(e,t);if(r!==null){var n=mr();wn(r,e,t,n)}Tg(e,t)}};u_=function(){return pt};d_=function(e,t){var r=pt;try{return pt=e,t()}finally{pt=r}};wp=function(e,t,r){switch(t){case"input":if(hp(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=rf(n);if(!s)throw Error(oe(90));Vw(n),hp(n,s)}}}break;case"textarea":Bw(e,r);break;case"select":t=r.value,t!=null&&Bi(e,!!r.multiple,t,!1)}};Xw=kg;Qw=Jo;var mR={usingClientEntryPoint:!1,Events:[xc,Ai,rf,Gw,qw,kg]},Ha={findFiberByHostInstance:Lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gR={bundleType:Ha.bundleType,version:Ha.version,rendererPackageName:Ha.rendererPackageName,rendererConfig:Ha.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Es.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=t_(e),e===null?null:e.stateNode},findFiberByHostInstance:Ha.findFiberByHostInstance||hR,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 du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Qd=du.inject(gR),$n=du}catch{}}Hr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mR;Hr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pg(t))throw Error(oe(200));return fR(e,t,null,r)};Hr.createRoot=function(e,t){if(!Pg(e))throw Error(oe(299));var r=!1,n="",s=D1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ng(e,1,!1,null,null,r,!1,n,s),e[xs]=t.current,Ml(e.nodeType===8?e.parentNode:e),new Rg(t)};Hr.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=t_(t),e=e===null?null:e.stateNode,e};Hr.flushSync=function(e){return Jo(e)};Hr.hydrate=function(e,t,r){if(!ff(t))throw Error(oe(200));return hf(null,e,t,!0,r)};Hr.hydrateRoot=function(e,t,r){if(!Pg(e))throw Error(oe(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=D1;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=A1(t,null,e,1,r??null,s,!1,o,i),e[xs]=t.current,Ml(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 df(t)};Hr.render=function(e,t,r){if(!ff(t))throw Error(oe(200));return hf(null,e,t,!1,r)};Hr.unmountComponentAtNode=function(e){if(!ff(e))throw Error(oe(40));return e._reactRootContainer?(Jo(function(){hf(null,null,e,!1,function(){e._reactRootContainer=null,e[xs]=null})}),!0):!1};Hr.unstable_batchedUpdates=kg;Hr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!ff(r))throw Error(oe(200));if(e==null||e._reactInternals===void 0)throw Error(oe(38));return hf(e,t,r,!1,n)};Hr.version="18.3.1-next-f1338f8080-20240426";function O1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O1)}catch(e){console.error(e)}}O1(),Ow.exports=Hr;var Ns=Ow.exports;const M1=Lm(Ns),vR=_w({__proto__:null,default:M1},[Ns]);var Zx=Ns;ip.createRoot=Zx.createRoot,ip.hydrateRoot=Zx.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 Vt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vt||(Vt={}));const Kx="popstate";function yR(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:c=""}=Ts(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Bl("",{pathname:i,search:a,hash:c},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 c=s.location.href,u=c.indexOf("#");a=u===-1?c:c.slice(0,u)}return a+"#"+(typeof o=="string"?o:ti(o))}function n(s,o){ei(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return wR(t,r,n,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xR(){return Math.random().toString(36).substr(2,8)}function Gx(e,t){return{usr:e.state,key:e.key,idx:t}}function Bl(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ts(t):t,{state:r,key:t&&t.key||n||xR()})}function ti(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 Ts(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 wR(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=Vt.Pop,c=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=Vt.Pop;let _=d(),p=_==null?null:_-u;u=_,c&&c({action:a,location:g.location,delta:p})}function m(_,p){a=Vt.Push;let h=Bl(g.location,_,p);r&&r(h,_),u=d()+1;let w=Gx(h,u),C=g.createHref(h);try{i.pushState(w,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(C)}o&&c&&c({action:a,location:g.location,delta:1})}function y(_,p){a=Vt.Replace;let h=Bl(g.location,_,p);r&&r(h,_),u=d();let w=Gx(h,u),C=g.createHref(h);i.replaceState(w,"",C),o&&c&&c({action:a,location:g.location,delta:0})}function x(_){let p=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof _=="string"?_:ti(_);return h=h.replace(/ $/,"%20"),et(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let g={get action(){return a},get location(){return e(s,i)},listen(_){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Kx,f),c=_,()=>{s.removeEventListener(Kx,f),c=null}},createHref(_){return t(s,_)},createURL:x,encodeLocation(_){let p=x(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:m,replace:y,go(_){return i.go(_)}};return g}var xt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xt||(xt={}));const _R=new Set(["lazy","caseSensitive","path","id","index","children"]);function bR(e){return e.index===!0}function Hl(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(et(s.index!==!0||!s.children,"Cannot specify children on an index route"),et(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),bR(s)){let c=Pt({},s,t(s),{id:a});return n[a]=c,c}else{let c=Pt({},s,t(s),{id:a,children:void 0});return n[a]=c,s.children&&(c.children=Hl(s.children,t,i,n)),c}})}function Oo(e,t,r){return r===void 0&&(r="/"),Fu(e,t,r,!1)}function Fu(e,t,r,n){let s=typeof t=="string"?Ts(t):t,o=ka(s.pathname||"/",r);if(o==null)return null;let i=I1(e);kR(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=MR(o);a=DR(i[c],u,n)}return a}function SR(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 I1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(et(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=ms([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),I1(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:PR(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 c of L1(o.path))s(o,i,c)}),t}function L1(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=L1(n.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function kR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:AR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const CR=/^:[\w-]+$/,jR=3,ER=2,NR=1,TR=10,RR=-2,qx=e=>e==="*";function PR(e,t){let r=e.split("/"),n=r.length;return r.some(qx)&&(n+=RR),t&&(n+=ER),r.filter(s=>!qx(s)).reduce((s,o)=>s+(CR.test(o)?jR:o===""?NR:TR),n)}function AR(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 DR(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let c=n[a],u=a===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Xx({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Xx({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:ms([o,f.pathname]),pathnameBase:FR(ms([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=ms([o,f.pathnameBase]))}return i}function Xx(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=OR(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:y}=d;if(m==="*"){let g=a[f]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[f];return y&&!x?u[m]=void 0:u[m]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function OR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ei(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,c)=>(n.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function MR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ei(!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 ka(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 IR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ts(e):e;return{pathname:r?r.startsWith("/")?r:LR(r,t):t,search:zR(n),hash:UR(s)}}function LR(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 Ih(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 F1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function pf(e,t){let r=F1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function mf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ts(e):(s=Pt({},e),et(!s.pathname||!s.pathname.includes("?"),Ih("?","pathname","search",s)),et(!s.pathname||!s.pathname.includes("#"),Ih("#","pathname","hash",s)),et(!s.search||!s.search.includes("#"),Ih("#","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 c=IR(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ms=e=>e.join("/").replace(/\/\/+/g,"/"),FR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ag{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 gf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const z1=["post","put","patch","delete"],$R=new Set(z1),VR=["get",...z1],WR=new Set(VR),BR=new Set([301,302,303,307,308]),HR=new Set([307,308]),Lh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},YR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ya={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Dg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ZR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),U1="remix-router-transitions";function KR(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;et(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=ZR;let o={},i=Hl(e.routes,s,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||JR,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,y=new Set,x=null,g=null,_=null,p=e.hydrationData!=null,h=Oo(i,e.history.location,c),w=null;if(h==null&&!d){let U=dr(404,{pathname:e.history.location.pathname}),{matches:B,route:G}=a0(i);h=B,w={[G.id]:U}}h&&d&&!e.hydrationData&&ch(h,i,e.history.location.pathname).active&&(h=null);let C;if(!h)C=!1,h=[];else if(h.some(U=>U.route.lazy))C=!1;else if(!h.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=h.findIndex(xe=>B[xe.route.id]!==void 0);C=h.slice(0,re+1).every(G)}else C=h.every(G)}else C=e.hydrationData!=null;let j,E={historyAction:e.history.action,location:e.history.location,matches:h,initialized:C,navigation:Lh,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||w,fetchers:new Map,blockers:new Map},R=Vt.Pop,P=!1,A,L=!1,q=new Map,N=null,F=!1,b=!1,V=[],te=[],W=new Map,Z=0,I=-1,Q=new Map,z=new Set,$=new Map,fe=new Map,ne=new Set,se=new Map,Oe=new Map,he=new Map,ye=!1;function ke(){if(m=e.history.listen(U=>{let{action:B,location:G,delta:re}=U;if(ye){ye=!1;return}ei(Oe.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 xe=Wc({currentLocation:E.location,nextLocation:G,historyAction:B});if(xe&&re!=null){ye=!0,e.history.go(re*-1),hi(xe,{state:"blocked",location:G,proceed(){hi(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(re)},reset(){let Ae=new Map(E.blockers);Ae.set(xe,Ya),Pe({blockers:Ae})}});return}return K(B,G)}),r){fP(t,q);let U=()=>hP(t,q);t.addEventListener("pagehide",U),N=()=>t.removeEventListener("pagehide",U)}return E.initialized||K(Vt.Pop,E.location,{initialHydration:!0}),j}function Fe(){m&&m(),N&&N(),y.clear(),A&&A.abort(),E.fetchers.forEach((U,B)=>Ht(B)),E.blockers.forEach((U,B)=>Vc(B))}function Me(U){return y.add(U),()=>y.delete(U)}function Pe(U,B){B===void 0&&(B={}),E=Pt({},E,U);let G=[],re=[];f.v7_fetcherPersist&&E.fetchers.forEach((xe,Ae)=>{xe.state==="idle"&&(ne.has(Ae)?re.push(Ae):G.push(Ae))}),[...y].forEach(xe=>xe(E,{deletedFetchers:re,unstable_viewTransitionOpts:B.viewTransitionOpts,unstable_flushSync:B.flushSync===!0})),f.v7_fetcherPersist&&(G.forEach(xe=>E.fetchers.delete(xe)),re.forEach(xe=>Ht(xe)))}function nt(U,B,G){var re,xe;let{flushSync:Ae}=G===void 0?{}:G,Ve=E.actionData!=null&&E.navigation.formMethod!=null&&hn(E.navigation.formMethod)&&E.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,de;B.actionData?Object.keys(B.actionData).length>0?de=B.actionData:de=null:Ve?de=E.actionData:de=null;let Ge=B.loaderData?o0(E.loaderData,B.loaderData,B.matches||[],B.errors):E.loaderData,Le=E.blockers;Le.size>0&&(Le=new Map(Le),Le.forEach((ht,yt)=>Le.set(yt,Ya)));let ze=P===!0||E.navigation.formMethod!=null&&hn(E.navigation.formMethod)&&((xe=U.state)==null?void 0:xe._isRedirect)!==!0;a&&(i=a,a=void 0),F||R===Vt.Pop||(R===Vt.Push?e.history.push(U,U.state):R===Vt.Replace&&e.history.replace(U,U.state));let gt;if(R===Vt.Pop){let ht=q.get(E.location.pathname);ht&&ht.has(U.pathname)?gt={currentLocation:E.location,nextLocation:U}:q.has(U.pathname)&&(gt={currentLocation:U,nextLocation:E.location})}else if(L){let ht=q.get(E.location.pathname);ht?ht.add(U.pathname):(ht=new Set([U.pathname]),q.set(E.location.pathname,ht)),gt={currentLocation:E.location,nextLocation:U}}Pe(Pt({},B,{actionData:de,loaderData:Ge,historyAction:R,location:U,initialized:!0,navigation:Lh,revalidation:"idle",restoreScrollPosition:Ly(U,B.matches||E.matches),preventScrollReset:ze,blockers:Le}),{viewTransitionOpts:gt,flushSync:Ae===!0}),R=Vt.Pop,P=!1,L=!1,F=!1,b=!1,V=[],te=[]}async function k(U,B){if(typeof U=="number"){e.history.go(U);return}let G=Jp(E.location,E.matches,c,f.v7_prependBasename,U,f.v7_relativeSplatPath,B==null?void 0:B.fromRouteId,B==null?void 0:B.relative),{path:re,submission:xe,error:Ae}=Qx(f.v7_normalizeFormMethod,!1,G,B),Ve=E.location,de=Bl(E.location,re,B&&B.state);de=Pt({},de,e.history.encodeLocation(de));let Ge=B&&B.replace!=null?B.replace:void 0,Le=Vt.Push;Ge===!0?Le=Vt.Replace:Ge===!1||xe!=null&&hn(xe.formMethod)&&xe.formAction===E.location.pathname+E.location.search&&(Le=Vt.Replace);let ze=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,gt=(B&&B.unstable_flushSync)===!0,ht=Wc({currentLocation:Ve,nextLocation:de,historyAction:Le});if(ht){hi(ht,{state:"blocked",location:de,proceed(){hi(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:de}),k(U,B)},reset(){let yt=new Map(E.blockers);yt.set(ht,Ya),Pe({blockers:yt})}});return}return await K(Le,de,{submission:xe,pendingError:Ae,preventScrollReset:ze,replace:B&&B.replace,enableViewTransition:B&&B.unstable_viewTransition,flushSync:gt})}function J(){if(Ye(),Pe({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){K(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}K(R||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}}async function K(U,B,G){A&&A.abort(),A=null,R=U,F=(G&&G.startUninterruptedRevalidation)===!0,$N(E.location,E.matches),P=(G&&G.preventScrollReset)===!0,L=(G&&G.enableViewTransition)===!0;let re=a||i,xe=G&&G.overrideNavigation,Ae=Oo(re,B,c),Ve=(G&&G.flushSync)===!0,de=ch(Ae,re,B.pathname);if(de.active&&de.matches&&(Ae=de.matches),!Ae){let{error:dt,notFoundMatches:er,route:$t}=pi(B.pathname);nt(B,{matches:er,loaderData:{},errors:{[$t.id]:dt}},{flushSync:Ve});return}if(E.initialized&&!b&&oP(E.location,B)&&!(G&&G.submission&&hn(G.submission.formMethod))){nt(B,{matches:Ae},{flushSync:Ve});return}A=new AbortController;let Ge=xi(e.history,B,A.signal,G&&G.submission),Le;if(G&&G.pendingError)Le=[zi(Ae).route.id,{type:xt.error,error:G.pendingError}];else if(G&&G.submission&&hn(G.submission.formMethod)){let dt=await D(Ge,B,G.submission,Ae,de.active,{replace:G.replace,flushSync:Ve});if(dt.shortCircuited)return;if(dt.pendingActionResult){let[er,$t]=dt.pendingActionResult;if(Ir($t)&&gf($t.error)&&$t.error.status===404){A=null,nt(B,{matches:dt.matches,loaderData:{},errors:{[er]:$t.error}});return}}Ae=dt.matches||Ae,Le=dt.pendingActionResult,xe=Fh(B,G.submission),Ve=!1,de.active=!1,Ge=xi(e.history,Ge.url,Ge.signal)}let{shortCircuited:ze,matches:gt,loaderData:ht,errors:yt}=await S(Ge,B,Ae,de.active,xe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,Ve,Le);ze||(A=null,nt(B,Pt({matches:gt||Ae},i0(Le),{loaderData:ht,errors:yt})))}async function D(U,B,G,re,xe,Ae){Ae===void 0&&(Ae={}),Ye();let Ve=uP(B,G);if(Pe({navigation:Ve},{flushSync:Ae.flushSync===!0}),xe){let Le=await Bc(re,B.pathname,U.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){let{boundaryId:ze,error:gt}=Pn(B.pathname,Le);return{matches:Le.partialMatches,pendingActionResult:[ze,{type:xt.error,error:gt}]}}else if(Le.matches)re=Le.matches;else{let{notFoundMatches:ze,error:gt,route:ht}=pi(B.pathname);return{matches:ze,pendingActionResult:[ht.id,{type:xt.error,error:gt}]}}}let de,Ge=sl(re,B);if(!Ge.route.action&&!Ge.route.lazy)de={type:xt.error,error:dr(405,{method:U.method,pathname:B.pathname,routeId:Ge.route.id})};else if(de=(await ee("action",U,[Ge],re))[0],U.signal.aborted)return{shortCircuited:!0};if($o(de)){let Le;return Ae&&Ae.replace!=null?Le=Ae.replace:Le=r0(de.response.headers.get("Location"),new URL(U.url),c)===E.location.pathname+E.location.search,await X(U,de,{submission:G,replace:Le}),{shortCircuited:!0}}if(Uo(de))throw dr(400,{type:"defer-action"});if(Ir(de)){let Le=zi(re,Ge.route.id);return(Ae&&Ae.replace)!==!0&&(R=Vt.Push),{matches:re,pendingActionResult:[Le.route.id,de]}}return{matches:re,pendingActionResult:[Ge.route.id,de]}}async function S(U,B,G,re,xe,Ae,Ve,de,Ge,Le,ze){let gt=xe||Fh(B,Ae),ht=Ae||Ve||u0(gt),yt=!F&&(!f.v7_partialHydration||!Ge);if(re){if(yt){let It=T(ze);Pe(Pt({navigation:gt},It!==void 0?{actionData:It}:{}),{flushSync:Le})}let Qe=await Bc(G,B.pathname,U.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){let{boundaryId:It,error:Ar}=Pn(B.pathname,Qe);return{matches:Qe.partialMatches,loaderData:{},errors:{[It]:Ar}}}else if(Qe.matches)G=Qe.matches;else{let{error:It,notFoundMatches:Ar,route:Et}=pi(B.pathname);return{matches:Ar,loaderData:{},errors:{[Et.id]:It}}}}let dt=a||i,[er,$t]=Jx(e.history,E,G,ht,B,f.v7_partialHydration&&Ge===!0,f.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,dt,c,ze);if(Is(Qe=>!(G&&G.some(It=>It.route.id===Qe))||er&&er.some(It=>It.route.id===Qe)),I=++Z,er.length===0&&$t.length===0){let Qe=es();return nt(B,Pt({matches:G,loaderData:{},errors:ze&&Ir(ze[1])?{[ze[0]]:ze[1].error}:null},i0(ze),Qe?{fetchers:new Map(E.fetchers)}:{}),{flushSync:Le}),{shortCircuited:!0}}if(yt){let Qe={};if(!re){Qe.navigation=gt;let It=T(ze);It!==void 0&&(Qe.actionData=It)}$t.length>0&&(Qe.fetchers=O($t)),Pe(Qe,{flushSync:Le})}$t.forEach(Qe=>{W.has(Qe.key)&&at(Qe.key),Qe.controller&&W.set(Qe.key,Qe.controller)});let La=()=>$t.forEach(Qe=>at(Qe.key));A&&A.signal.addEventListener("abort",La);let{loaderResults:Ls,fetcherResults:mi}=await me(E.matches,G,er,$t,U);if(U.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",La),$t.forEach(Qe=>W.delete(Qe.key));let gi=l0([...Ls,...mi]);if(gi){if(gi.idx>=er.length){let Qe=$t[gi.idx-er.length].key;z.add(Qe)}return await X(U,gi.result,{replace:de}),{shortCircuited:!0}}let{loaderData:vi,errors:An}=s0(E,G,er,Ls,ze,$t,mi,se);se.forEach((Qe,It)=>{Qe.subscribe(Ar=>{(Ar||Qe.done)&&se.delete(It)})}),f.v7_partialHydration&&Ge&&E.errors&&Object.entries(E.errors).filter(Qe=>{let[It]=Qe;return!er.some(Ar=>Ar.route.id===It)}).forEach(Qe=>{let[It,Ar]=Qe;An=Object.assign(An||{},{[It]:Ar})});let Hc=es(),Yc=qr(I),Zc=Hc||Yc||$t.length>0;return Pt({matches:G,loaderData:vi,errors:An},Zc?{fetchers:new Map(E.fetchers)}:{})}function T(U){if(U&&!Ir(U[1]))return{[U[0]]:U[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function O(U){return U.forEach(B=>{let G=E.fetchers.get(B.key),re=Za(void 0,G?G.data:void 0);E.fetchers.set(B.key,re)}),new Map(E.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.");W.has(U)&&at(U);let xe=(re&&re.unstable_flushSync)===!0,Ae=a||i,Ve=Jp(E.location,E.matches,c,f.v7_prependBasename,G,f.v7_relativeSplatPath,B,re==null?void 0:re.relative),de=Oo(Ae,Ve,c),Ge=ch(de,Ae,Ve);if(Ge.active&&Ge.matches&&(de=Ge.matches),!de){jt(U,B,dr(404,{pathname:Ve}),{flushSync:xe});return}let{path:Le,submission:ze,error:gt}=Qx(f.v7_normalizeFormMethod,!0,Ve,re);if(gt){jt(U,B,gt,{flushSync:xe});return}let ht=sl(de,Le);if(P=(re&&re.preventScrollReset)===!0,ze&&hn(ze.formMethod)){M(U,B,Le,ht,de,Ge.active,xe,ze);return}$.set(U,{routeId:B,path:Le}),H(U,B,Le,ht,de,Ge.active,xe,ze)}async function M(U,B,G,re,xe,Ae,Ve,de){Ye(),$.delete(U);function Ge(Et){if(!Et.route.action&&!Et.route.lazy){let ts=dr(405,{method:de.formMethod,pathname:G,routeId:B});return jt(U,B,ts,{flushSync:Ve}),!0}return!1}if(!Ae&&Ge(re))return;let Le=E.fetchers.get(U);Ue(U,dP(de,Le),{flushSync:Ve});let ze=new AbortController,gt=xi(e.history,G,ze.signal,de);if(Ae){let Et=await Bc(xe,G,gt.signal);if(Et.type==="aborted")return;if(Et.type==="error"){let{error:ts}=Pn(G,Et);jt(U,B,ts,{flushSync:Ve});return}else if(Et.matches){if(xe=Et.matches,re=sl(xe,G),Ge(re))return}else{jt(U,B,dr(404,{pathname:G}),{flushSync:Ve});return}}W.set(U,ze);let ht=Z,dt=(await ee("action",gt,[re],xe))[0];if(gt.signal.aborted){W.get(U)===ze&&W.delete(U);return}if(f.v7_fetcherPersist&&ne.has(U)){if($o(dt)||Ir(dt)){Ue(U,$s(void 0));return}}else{if($o(dt))if(W.delete(U),I>ht){Ue(U,$s(void 0));return}else return z.add(U),Ue(U,Za(de)),X(gt,dt,{fetcherSubmission:de});if(Ir(dt)){jt(U,B,dt.error);return}}if(Uo(dt))throw dr(400,{type:"defer-action"});let er=E.navigation.location||E.location,$t=xi(e.history,er,ze.signal),La=a||i,Ls=E.navigation.state!=="idle"?Oo(La,E.navigation.location,c):E.matches;et(Ls,"Didn't find any matches after fetcher action");let mi=++Z;Q.set(U,mi);let gi=Za(de,dt.data);E.fetchers.set(U,gi);let[vi,An]=Jx(e.history,E,Ls,de,er,!1,f.v7_skipActionErrorRevalidation,b,V,te,ne,$,z,La,c,[re.route.id,dt]);An.filter(Et=>Et.key!==U).forEach(Et=>{let ts=Et.key,Fy=E.fetchers.get(ts),BN=Za(void 0,Fy?Fy.data:void 0);E.fetchers.set(ts,BN),W.has(ts)&&at(ts),Et.controller&&W.set(ts,Et.controller)}),Pe({fetchers:new Map(E.fetchers)});let Hc=()=>An.forEach(Et=>at(Et.key));ze.signal.addEventListener("abort",Hc);let{loaderResults:Yc,fetcherResults:Zc}=await me(E.matches,Ls,vi,An,$t);if(ze.signal.aborted)return;ze.signal.removeEventListener("abort",Hc),Q.delete(U),W.delete(U),An.forEach(Et=>W.delete(Et.key));let Qe=l0([...Yc,...Zc]);if(Qe){if(Qe.idx>=vi.length){let Et=An[Qe.idx-vi.length].key;z.add(Et)}return X($t,Qe.result)}let{loaderData:It,errors:Ar}=s0(E,E.matches,vi,Yc,void 0,An,Zc,se);if(E.fetchers.has(U)){let Et=$s(dt.data);E.fetchers.set(U,Et)}qr(mi),E.navigation.state==="loading"&&mi>I?(et(R,"Expected pending action"),A&&A.abort(),nt(E.navigation.location,{matches:Ls,loaderData:It,errors:Ar,fetchers:new Map(E.fetchers)})):(Pe({errors:Ar,loaderData:o0(E.loaderData,It,Ls,Ar),fetchers:new Map(E.fetchers)}),b=!1)}async function H(U,B,G,re,xe,Ae,Ve,de){let Ge=E.fetchers.get(U);Ue(U,Za(de,Ge?Ge.data:void 0),{flushSync:Ve});let Le=new AbortController,ze=xi(e.history,G,Le.signal);if(Ae){let dt=await Bc(xe,G,ze.signal);if(dt.type==="aborted")return;if(dt.type==="error"){let{error:er}=Pn(G,dt);jt(U,B,er,{flushSync:Ve});return}else if(dt.matches)xe=dt.matches,re=sl(xe,G);else{jt(U,B,dr(404,{pathname:G}),{flushSync:Ve});return}}W.set(U,Le);let gt=Z,yt=(await ee("loader",ze,[re],xe))[0];if(Uo(yt)&&(yt=await H1(yt,ze.signal,!0)||yt),W.get(U)===Le&&W.delete(U),!ze.signal.aborted){if(ne.has(U)){Ue(U,$s(void 0));return}if($o(yt))if(I>gt){Ue(U,$s(void 0));return}else{z.add(U),await X(ze,yt);return}if(Ir(yt)){jt(U,B,yt.error);return}et(!Uo(yt),"Unhandled fetcher deferred data"),Ue(U,$s(yt.data))}}async function X(U,B,G){let{submission:re,fetcherSubmission:xe,replace:Ae}=G===void 0?{}:G;B.response.headers.has("X-Remix-Revalidate")&&(b=!0);let Ve=B.response.headers.get("Location");et(Ve,"Expected a Location header on the redirect Response"),Ve=r0(Ve,new URL(U.url),c);let de=Bl(E.location,Ve,{_isRedirect:!0});if(r){let yt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(Dg.test(Ve)){const dt=e.history.createURL(Ve);yt=dt.origin!==t.location.origin||ka(dt.pathname,c)==null}if(yt){Ae?t.location.replace(Ve):t.location.assign(Ve);return}}A=null;let Ge=Ae===!0?Vt.Replace:Vt.Push,{formMethod:Le,formAction:ze,formEncType:gt}=E.navigation;!re&&!xe&&Le&&ze&&gt&&(re=u0(E.navigation));let ht=re||xe;if(HR.has(B.response.status)&&ht&&hn(ht.formMethod))await K(Ge,de,{submission:Pt({},ht,{formAction:Ve}),preventScrollReset:P});else{let yt=Fh(de,re);await K(Ge,de,{overrideNavigation:yt,fetcherSubmission:xe,preventScrollReset:P})}}async function ee(U,B,G,re){try{let xe=await eP(u,U,B,G,re,o,s);return await Promise.all(xe.map((Ae,Ve)=>{if(aP(Ae)){let de=Ae.result;return{type:xt.redirect,response:nP(de,B,G[Ve].route.id,re,c,f.v7_relativeSplatPath)}}return rP(Ae)}))}catch(xe){return G.map(()=>({type:xt.error,error:xe}))}}async function me(U,B,G,re,xe){let[Ae,...Ve]=await Promise.all([G.length?ee("loader",xe,G,B):[],...re.map(de=>{if(de.matches&&de.match&&de.controller){let Ge=xi(e.history,de.path,de.controller.signal);return ee("loader",Ge,[de.match],de.matches).then(Le=>Le[0])}else return Promise.resolve({type:xt.error,error:dr(404,{pathname:de.path})})})]);return await Promise.all([c0(U,G,Ae,Ae.map(()=>xe.signal),!1,E.loaderData),c0(U,re.map(de=>de.match),Ve,re.map(de=>de.controller?de.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Ve}}function Ye(){b=!0,V.push(...Is()),$.forEach((U,B)=>{W.has(B)&&(te.push(B),at(B))})}function Ue(U,B,G){G===void 0&&(G={}),E.fetchers.set(U,B),Pe({fetchers:new Map(E.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function jt(U,B,G,re){re===void 0&&(re={});let xe=zi(E.matches,B);Ht(U),Pe({errors:{[xe.route.id]:G},fetchers:new Map(E.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Gr(U){return f.v7_fetcherPersist&&(fe.set(U,(fe.get(U)||0)+1),ne.has(U)&&ne.delete(U)),E.fetchers.get(U)||YR}function Ht(U){let B=E.fetchers.get(U);W.has(U)&&!(B&&B.state==="loading"&&Q.has(U))&&at(U),$.delete(U),Q.delete(U),z.delete(U),ne.delete(U),E.fetchers.delete(U)}function Qn(U){if(f.v7_fetcherPersist){let B=(fe.get(U)||0)-1;B<=0?(fe.delete(U),ne.add(U)):fe.set(U,B)}else Ht(U);Pe({fetchers:new Map(E.fetchers)})}function at(U){let B=W.get(U);et(B,"Expected fetch controller: "+U),B.abort(),W.delete(U)}function Jn(U){for(let B of U){let G=Gr(B),re=$s(G.data);E.fetchers.set(B,re)}}function es(){let U=[],B=!1;for(let G of z){let re=E.fetchers.get(G);et(re,"Expected fetcher: "+G),re.state==="loading"&&(z.delete(G),U.push(G),B=!0)}return Jn(U),B}function qr(U){let B=[];for(let[G,re]of Q)if(re<U){let xe=E.fetchers.get(G);et(xe,"Expected fetcher: "+G),xe.state==="loading"&&(at(G),Q.delete(G),B.push(G))}return Jn(B),B.length>0}function $c(U,B){let G=E.blockers.get(U)||Ya;return Oe.get(U)!==B&&Oe.set(U,B),G}function Vc(U){E.blockers.delete(U),Oe.delete(U)}function hi(U,B){let G=E.blockers.get(U)||Ya;et(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(E.blockers);re.set(U,B),Pe({blockers:re})}function Wc(U){let{currentLocation:B,nextLocation:G,historyAction:re}=U;if(Oe.size===0)return;Oe.size>1&&ei(!1,"A router only supports one blocker at a time");let xe=Array.from(Oe.entries()),[Ae,Ve]=xe[xe.length-1],de=E.blockers.get(Ae);if(!(de&&de.state==="proceeding")&&Ve({currentLocation:B,nextLocation:G,historyAction:re}))return Ae}function pi(U){let B=dr(404,{pathname:U}),G=a||i,{matches:re,route:xe}=a0(G);return Is(),{notFoundMatches:re,route:xe,error:B}}function Pn(U,B){return{boundaryId:zi(B.partialMatches).route.id,error:dr(400,{type:"route-discovery",pathname:U,message:B.error!=null&&"message"in B.error?B.error:String(B.error)})}}function Is(U){let B=[];return se.forEach((G,re)=>{(!U||U(re))&&(G.cancel(),B.push(re),se.delete(re))}),B}function UN(U,B,G){if(x=U,_=B,g=G||null,!p&&E.navigation===Lh){p=!0;let re=Ly(E.location,E.matches);re!=null&&Pe({restoreScrollPosition:re})}return()=>{x=null,_=null,g=null}}function Iy(U,B){return g&&g(U,B.map(re=>SR(re,E.loaderData)))||U.key}function $N(U,B){if(x&&_){let G=Iy(U,B);x[G]=_()}}function Ly(U,B){if(x){let G=Iy(U,B),re=x[G];if(typeof re=="number")return re}return null}function ch(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:Fu(B,G,c,!0)}}else return{active:!0,matches:Fu(B,G,c,!0)||[]};return{active:!1,matches:null}}async function Bc(U,B,G){let re=U,xe=re.length>0?re[re.length-1].route:null;for(;;){let Ae=a==null,Ve=a||i;try{await QR(d,B,re,Ve,o,s,he,G)}catch(ze){return{type:"error",error:ze,partialMatches:re}}finally{Ae&&(i=[...i])}if(G.aborted)return{type:"aborted"};let de=Oo(Ve,B,c),Ge=!1;if(de){let ze=de[de.length-1].route;if(ze.index)return{type:"success",matches:de};if(ze.path&&ze.path.length>0)if(ze.path==="*")Ge=!0;else return{type:"success",matches:de}}let Le=Fu(Ve,B,c,!0);if(!Le||re.map(ze=>ze.route.id).join("-")===Le.map(ze=>ze.route.id).join("-"))return{type:"success",matches:Ge?de:null};if(re=Le,xe=re[re.length-1].route,xe.path==="*")return{type:"success",matches:re}}}function VN(U){o={},a=Hl(U,s,void 0,o)}function WN(U,B){let G=a==null;V1(U,B,a||i,o,s),G&&(i=[...i],Pe({}))}return j={get basename(){return c},get future(){return f},get state(){return E},get routes(){return i},get window(){return t},initialize:ke,subscribe:Me,enableScrollRestoration:UN,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Gr,deleteFetcher:Qn,dispose:Fe,getBlocker:$c,deleteBlocker:Vc,patchRoutes:WN,_internalFetchControllers:W,_internalActiveDeferreds:se,_internalSetRoutes:VN},j}function GR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Jp(e,t,r,n,s,o,i,a){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=mf(s||".",pf(c,o),ka(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&&!Og(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:ms([r,d.pathname])),ti(d)}function Qx(e,t,r,n){if(!n||!GR(n))return{path:r};if(n.formMethod&&!cP(n.formMethod))return{path:r,error:dr(405,{method:n.formMethod})};let s=()=>({path:r,error:dr(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=W1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!hn(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((y,x)=>{let[g,_]=x;return""+y+g+"="+_+`
`},""):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(!hn(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()}}}et(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=em(n.formData),u=n.formData;else if(n.body instanceof FormData)c=em(n.body),u=n.body;else if(n.body instanceof URLSearchParams)c=n.body,u=n0(c);else if(n.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(n.body),u=n0(c)}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(hn(d.formMethod))return{path:r,submission:d};let f=Ts(r);return t&&f.search&&Og(f.search)&&c.append("index",""),f.search="?"+c,{path:ti(f),submission:d}}function qR(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 Jx(e,t,r,n,s,o,i,a,c,u,d,f,m,y,x,g){let _=g?Ir(g[1])?g[1].error:g[1].data:void 0,p=e.createURL(t.location),h=e.createURL(s),w=g&&Ir(g[1])?g[0]:void 0,C=w?qR(r,w):r,j=g?g[1].statusCode:void 0,E=i&&j&&j>=400,R=C.filter((A,L)=>{let{route:q}=A;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(XR(t.loaderData,t.matches[L],A)||c.some(b=>b===A.route.id))return!0;let N=t.matches[L],F=A;return e0(A,Pt({currentUrl:p,currentParams:N.params,nextUrl:h,nextParams:F.params},n,{actionResult:_,actionStatus:j,defaultShouldRevalidate:E?!1:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||$1(N,F)}))}),P=[];return f.forEach((A,L)=>{if(o||!r.some(V=>V.route.id===A.routeId)||d.has(L))return;let q=Oo(y,A.path,x);if(!q){P.push({key:L,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(L),F=sl(q,A.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:N&&N.state!=="idle"&&N.data===void 0?b=a:b=e0(F,Pt({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:_,actionStatus:j,defaultShouldRevalidate:E?!1:a})),b&&P.push({key:L,routeId:A.routeId,path:A.path,matches:q,match:F,controller:new AbortController})}),[R,P]}function XR(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function $1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function e0(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function QR(e,t,r,n,s,o,i,a){let c=[t,...r.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:r,patch:(d,f)=>{a.aborted||V1(d,f,n,s,o)}}),i.set(c,u)),u&&iP(u)&&await u}finally{i.delete(c)}}function V1(e,t,r,n,s){if(e){var o;let i=n[e];et(i,"No route found to patch children into: routeId = "+e);let a=Hl(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=Hl(t,s,["patch",String(r.length||"0")],n);r.push(...i)}}async function t0(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];et(s,"No route found in manifest");let o={};for(let i in n){let c=s[i]!==void 0&&i!=="hasErrorBoundary";ei(!c,'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.')),!c&&!_R.has(i)&&(o[i]=n[i])}Object.assign(s,o),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function JR(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function eP(e,t,r,n,s,o,i,a){let c=n.reduce((f,m)=>f.add(m.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let m=c.has(f.route.id);return Pt({},f,{shouldLoad:m,resolve:x=>(u.add(f.route.id),m?tP(t,r,f,o,i,x,a):Promise.resolve({type:xt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(f=>et(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)=>c.has(s[m].route.id))}async function tP(e,t,r,n,s,o,i){let a,c,u=d=>{let f,m=new Promise((g,_)=>f=_);c=()=>f(),t.signal.addEventListener("abort",c);let y=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=>y(g)):x=(async()=>{try{return{type:"data",result:await y()}}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(y=>{f=y}),t0(r.route,s,n)]);if(f!==void 0)throw f;a=m}else if(await t0(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 dr(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:xt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),m=f.pathname+f.search;throw dr(404,{pathname:m})}et(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:xt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function rP(e){let{result:t,type:r,status:n}=e;if(B1(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:xt.error,error:a}}return r===xt.error?{type:xt.error,error:new Ag(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:xt.data,data:i,statusCode:t.status,headers:t.headers}}if(r===xt.error)return{type:xt.error,error:t,statusCode:gf(t)?t.status:n};if(lP(t)){var s,o;return{type:xt.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:xt.data,data:t,statusCode:n}}function nP(e,t,r,n,s,o){let i=e.headers.get("Location");if(et(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Dg.test(i)){let a=n.slice(0,n.findIndex(c=>c.route.id===r)+1);i=Jp(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function r0(e,t,r){if(Dg.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=ka(s.pathname,r)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function xi(e,t,r,n){let s=e.createURL(W1(t)).toString(),o={signal:r};if(n&&hn(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=em(n.formData):o.body=n.formData}return new Request(s,o)}function em(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function n0(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function sP(e,t,r,n,s,o){let i={},a=null,c,u=!1,d={},f=n&&Ir(n[1])?n[1].error:void 0;return r.forEach((m,y)=>{let x=t[y].route.id;if(et(!$o(m),"Cannot handle redirect results in processLoaderData"),Ir(m)){let g=m.error;f!==void 0&&(g=f,f=void 0),a=a||{};{let _=zi(e,x);a[_.route.id]==null&&(a[_.route.id]=g)}i[x]=void 0,u||(u=!0,c=gf(m.error)?m.error.status:500),m.headers&&(d[x]=m.headers)}else Uo(m)?(s.set(x,m.deferredData),i[x]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(c=m.statusCode),m.headers&&(d[x]=m.headers)):(i[x]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(c=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:c||200,loaderHeaders:d}}function s0(e,t,r,n,s,o,i,a){let{loaderData:c,errors:u}=sP(t,r,n,s,a);for(let d=0;d<o.length;d++){let{key:f,match:m,controller:y}=o[d];et(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(y&&y.signal.aborted))if(Ir(x)){let g=zi(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($o(x))et(!1,"Unhandled fetcher revalidation redirect");else if(Uo(x))et(!1,"Unhandled fetcher deferred data");else{let g=$s(x.data);e.fetchers.set(f,g)}}return{loaderData:c,errors:u}}function o0(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 i0(e){return e?Ir(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function zi(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 a0(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 dr(e,t){let{pathname:r,routeId:n,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&r&&n?c="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"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",c='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?c="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&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Ag(e||500,a,new Error(c),!0)}function l0(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if($o(r))return{result:r,idx:t}}}function W1(e){let t=typeof e=="string"?Ts(e):e;return ti(Pt({},t,{hash:""}))}function oP(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function iP(e){return typeof e=="object"&&e!=null&&"then"in e}function aP(e){return B1(e.result)&&BR.has(e.result.status)}function Uo(e){return e.type===xt.deferred}function Ir(e){return e.type===xt.error}function $o(e){return(e&&e.type)===xt.redirect}function lP(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 B1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function cP(e){return WR.has(e.toLowerCase())}function hn(e){return $R.has(e.toLowerCase())}async function c0(e,t,r,n,s,o){for(let i=0;i<r.length;i++){let a=r[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!$1(u,c)&&(o&&o[c.route.id])!==void 0;if(Uo(a)&&(s||d)){let f=n[i];et(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await H1(a,f,s).then(m=>{m&&(r[i]=m||r[i])})}}}async function H1(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:xt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:xt.error,error:s}}return{type:xt.data,data:e.deferredData.data}}}function Og(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function sl(e,t){let r=typeof t=="string"?Ts(t).search:t.search;if(e[e.length-1].route.index&&Og(r||""))return e[e.length-1];let n=F1(e);return n[n.length-1]}function u0(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 Fh(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 uP(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 Za(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 dP(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 $s(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 fP(e,t){try{let r=e.sessionStorage.getItem(U1);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 hP(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(U1,JSON.stringify(r))}catch(n){ei(!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 wd(){return wd=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},wd.apply(this,arguments)}const vf=v.createContext(null),Y1=v.createContext(null),Co=v.createContext(null),Mg=v.createContext(null),Rs=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Z1=v.createContext(null);function pP(e,t){let{relative:r}=t===void 0?{}:t;Ca()||et(!1);let{basename:n,navigator:s}=v.useContext(Co),{hash:o,pathname:i,search:a}=G1(e,{relative:r}),c=i;return n!=="/"&&(c=i==="/"?n:ms([n,i])),s.createHref({pathname:c,search:a,hash:o})}function Ca(){return v.useContext(Mg)!=null}function Nn(){return Ca()||et(!1),v.useContext(Mg).location}function K1(e){v.useContext(Co).static||v.useLayoutEffect(e)}function Nr(){let{isDataRoute:e}=v.useContext(Rs);return e?NP():mP()}function mP(){Ca()||et(!1);let e=v.useContext(vf),{basename:t,future:r,navigator:n}=v.useContext(Co),{matches:s}=v.useContext(Rs),{pathname:o}=Nn(),i=JSON.stringify(pf(s,r.v7_relativeSplatPath)),a=v.useRef(!1);return K1(()=>{a.current=!0}),v.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=mf(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ms([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,i,o,e])}const gP=v.createContext(null);function vP(e){let t=v.useContext(Rs).outlet;return t&&v.createElement(gP.Provider,{value:e},t)}function G1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(Co),{matches:s}=v.useContext(Rs),{pathname:o}=Nn(),i=JSON.stringify(pf(s,n.v7_relativeSplatPath));return v.useMemo(()=>mf(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function yP(e,t,r,n){Ca()||et(!1);let{navigator:s}=v.useContext(Co),{matches:o}=v.useContext(Rs),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Nn(),d;d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let g=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=Oo(e,{pathname:m});return SP(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:ms([c,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?c:ms([c,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r,n)}function xP(){let e=EP(),t=gf(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 v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:s},r):null,null)}const wP=v.createElement(xP,null);class _P extends v.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?v.createElement(Rs.Provider,{value:this.props.routeContext},v.createElement(Z1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bP(e){let{routeContext:t,match:r,children:n}=e,s=v.useContext(vf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(Rs.Provider,{value:t},n)}function SP(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||et(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!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:y}=r,x=f.route.loader&&m[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,m)=>{let y,x=!1,g=null,_=null;r&&(y=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||wP,c&&(u<0&&m===0?(TP("route-fallback"),x=!0,_=null):u===m&&(x=!0,_=f.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,m+1)),h=()=>{let w;return y?w=g:x?w=_:f.route.Component?w=v.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,v.createElement(bP,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?v.createElement(_P,{location:r.location,revalidation:r.revalidation,component:g,error:y,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var q1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(q1||{}),_d=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}(_d||{});function kP(e){let t=v.useContext(vf);return t||et(!1),t}function CP(e){let t=v.useContext(Y1);return t||et(!1),t}function jP(e){let t=v.useContext(Rs);return t||et(!1),t}function X1(e){let t=jP(),r=t.matches[t.matches.length-1];return r.route.id||et(!1),r.route.id}function EP(){var e;let t=v.useContext(Z1),r=CP(_d.UseRouteError),n=X1(_d.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function NP(){let{router:e}=kP(q1.UseNavigateStable),t=X1(_d.UseNavigateStable),r=v.useRef(!1);return K1(()=>{r.current=!0}),v.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,wd({fromRouteId:t},o)))},[e,t])}const d0={};function TP(e,t,r){d0[e]||(d0[e]=!0)}function Q1(e){let{to:t,replace:r,state:n,relative:s}=e;Ca()||et(!1);let{future:o,static:i}=v.useContext(Co),{matches:a}=v.useContext(Rs),{pathname:c}=Nn(),u=Nr(),d=mf(t,pf(a,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return v.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function Ig(e){return vP(e.context)}function RP(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Vt.Pop,navigator:o,static:i=!1,future:a}=e;Ca()&&et(!1);let c=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:c,navigator:o,static:i,future:wd({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof n=="string"&&(n=Ts(n));let{pathname:d="/",search:f="",hash:m="",state:y=null,key:x="default"}=n,g=v.useMemo(()=>{let _=ka(d,c);return _==null?null:{location:{pathname:_,search:f,hash:m,state:y,key:x},navigationType:s}},[c,d,f,m,y,x,s]);return g==null?null:v.createElement(Co.Provider,{value:u},v.createElement(Mg.Provider,{children:r,value:g}))}new Promise(()=>{});function PP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:v.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:v.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 Yl(){return Yl=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},Yl.apply(this,arguments)}function AP(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 DP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OP(e,t){return e.button===0&&(!t||t==="_self")&&!DP(e)}function tm(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 MP(e,t){let r=tm(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const IP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],LP="6";try{window.__reactRouterVersion=LP}catch{}function FP(e,t){return KR({basename:void 0,future:Yl({},void 0,{v7_prependBasename:!0}),history:yR({window:void 0}),hydrationData:zP(),routes:e,mapRouteProperties:PP,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function zP(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Yl({},t,{errors:UP(t.errors)})),t}function UP(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 Ag(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 $P=v.createContext({isTransitioning:!1}),VP=v.createContext(new Map),WP="startTransition",f0=Aw[WP],BP="flushSync",h0=vR[BP];function HP(e){f0?f0(e):e()}function Ka(e){h0?h0(e):e()}class YP{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 ZP(e){let{fallbackElement:t,router:r,future:n}=e,[s,o]=v.useState(r.state),[i,a]=v.useState(),[c,u]=v.useState({isTransitioning:!1}),[d,f]=v.useState(),[m,y]=v.useState(),[x,g]=v.useState(),_=v.useRef(new Map),{v7_startTransition:p}=n||{},h=v.useCallback(P=>{p?HP(P):P()},[p]),w=v.useCallback((P,A)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:N}=A;L.forEach(b=>_.current.delete(b)),P.fetchers.forEach((b,V)=>{b.data!==void 0&&_.current.set(V,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!N||F){q?Ka(()=>o(P)):h(()=>o(P));return}if(q){Ka(()=>{m&&(d&&d.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let b=r.window.document.startViewTransition(()=>{Ka(()=>o(P))});b.finished.finally(()=>{Ka(()=>{f(void 0),y(void 0),a(void 0),u({isTransitioning:!1})})}),Ka(()=>y(b));return}m?(d&&d.resolve(),m.skipTransition(),g({state:P,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(P),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[r.window,m,d,_,h]);v.useLayoutEffect(()=>r.subscribe(w),[r,w]),v.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new YP)},[c]),v.useEffect(()=>{if(d&&i&&r.window){let P=i,A=d.promise,L=r.window.document.startViewTransition(async()=>{h(()=>o(P)),await A});L.finished.finally(()=>{f(void 0),y(void 0),a(void 0),u({isTransitioning:!1})}),y(L)}},[h,i,d,r.window]),v.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,m,s.location,i]),v.useEffect(()=>{!c.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),g(void 0))},[c.isTransitioning,x]),v.useEffect(()=>{},[]);let C=v.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:P=>r.navigate(P),push:(P,A,L)=>r.navigate(P,{state:A,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(P,A,L)=>r.navigate(P,{replace:!0,state:A,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),j=r.basename||"/",E=v.useMemo(()=>({router:r,navigator:C,static:!1,basename:j}),[r,C,j]),R=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.createElement(v.Fragment,null,v.createElement(vf.Provider,{value:E},v.createElement(Y1.Provider,{value:s},v.createElement(VP.Provider,{value:_.current},v.createElement($P.Provider,{value:c},v.createElement(RP,{basename:j,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?v.createElement(KP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const KP=v.memo(GP);function GP(e){let{routes:t,future:r,state:n}=e;return yP(t,void 0,n,r)}const qP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fr=v.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,m=AP(t,IP),{basename:y}=v.useContext(Co),x,g=!1;if(typeof u=="string"&&XP.test(u)&&(x=u,qP))try{let w=new URL(window.location.href),C=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=ka(C.pathname,y);C.origin===w.origin&&j!=null?u=j+C.search+C.hash:g=!0}catch{}let _=pP(u,{relative:s}),p=QP(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function h(w){n&&n(w),w.defaultPrevented||p(w)}return v.createElement("a",Yl({},m,{href:x||_,onClick:g||o?n:h,ref:r,target:c}))});var p0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p0||(p0={}));var m0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(m0||(m0={}));function QP(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,c=Nr(),u=Nn(),d=G1(e,{relative:i});return v.useCallback(f=>{if(OP(f,r)){f.preventDefault();let m=n!==void 0?n:ti(u)===ti(d);c(e,{replace:m,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,c,d,n,s,r,e,o,i,a])}function JP(e){let t=v.useRef(tm(e)),r=v.useRef(!1),n=Nn(),s=v.useMemo(()=>MP(n.search,r.current?null:t.current),[n.search]),o=Nr(),i=v.useCallback((a,c)=>{const u=tm(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,c)},[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 eA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J1=(...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 tA={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 rA=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},c)=>v.createElement("svg",{ref:c,...tA,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:J1("lucide",s),...a},[...i.map(([u,d])=>v.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 mt=(e,t)=>{const r=v.forwardRef(({className:n,...s},o)=>v.createElement(rA,{ref:o,iconNode:t,className:J1(`lucide-${eA(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 nA=mt("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 sA=mt("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 oA=mt("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 eb=mt("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 Lg=mt("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 iA=mt("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 aA=mt("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 lA=mt("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 cA=mt("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 g0=mt("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 uA=mt("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 rm=mt("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 dA=mt("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 v0=mt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
* @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 y0=mt("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 x0=mt("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 fA=mt("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @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 hA=mt("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 pA=mt("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 mA=mt("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @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 gA=mt("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 vA=mt("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 zu=mt("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 w0=mt("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 tb=mt("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 yA=mt("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 xA=mt("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 wA=mt("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @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 Fg=mt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function _A(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yf(...e){return t=>e.forEach(r=>_A(r,t))}function Ke(...e){return v.useCallback(yf(...e),e)}var bs=v.forwardRef((e,t)=>{const{children:r,...n}=e,s=v.Children.toArray(r),o=s.find(bA);if(o){const i=o.props.children,a=s.map(c=>c===o?v.Children.count(i)>1?v.Children.only(null):v.isValidElement(i)?i.props.children:null:c);return l.jsx(nm,{...n,ref:t,children:v.isValidElement(i)?v.cloneElement(i,void 0,a):null})}return l.jsx(nm,{...n,ref:t,children:r})});bs.displayName="Slot";var nm=v.forwardRef((e,t)=>{const{children:r,...n}=e;if(v.isValidElement(r)){const s=kA(r);return v.cloneElement(r,{...SA(n,r.props),ref:t?yf(t,s):s})}return v.Children.count(r)>1?v.Children.only(null):null});nm.displayName="SlotClone";var zg=({children:e})=>l.jsx(l.Fragment,{children:e});function bA(e){return v.isValidElement(e)&&e.type===zg}function SA(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 kA(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 rb(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=rb(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function CA(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=rb(e))&&(n&&(n+=" "),n+=t);return n}const _0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,b0=CA,_c=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return b0(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=_0(d)||_0(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},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:m,...y}=d;return Object.entries(y).every(x=>{let[g,_]=x;return Array.isArray(_)?_.includes({...o,...a}[g]):{...o,...a}[g]===_})?[...u,f,m]:u},[]);return b0(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)};function nb(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=nb(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function jA(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=nb(e))&&(n&&(n+=" "),n+=t);return n}const Ug="-";function EA(e){const t=TA(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function s(i){const a=i.split(Ug);return a[0]===""&&a.length!==1&&a.shift(),sb(a,t)||NA(i)}function o(i,a){const c=r[i]||[];return a&&n[i]?[...c,...n[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function sb(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?sb(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Ug);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const S0=/^\[(.+)\]$/;function NA(e){if(S0.test(e)){const t=S0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function TA(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return PA(Object.entries(e.classGroups),r).forEach(([o,i])=>{sm(i,n,o,t)}),n}function sm(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:k0(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(RA(s)){sm(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{sm(i,k0(t,o),r,n)})})}function k0(e,t){let r=e;return t.split(Ug).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function RA(e){return e.isThemeGetter}function PA(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 AA(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 ob="!";function DA(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length;function i(a){const c=[];let u=0,d=0,f;for(let _=0;_<a.length;_++){let p=a[_];if(u===0){if(p===s&&(n||a.slice(_,_+o)===t)){c.push(a.slice(d,_)),d=_+o;continue}if(p==="/"){f=_;continue}}p==="["?u++:p==="]"&&u--}const m=c.length===0?a:a.substring(d),y=m.startsWith(ob),x=y?m.substring(1):m,g=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:g}}return r?function(c){return r({className:c,parseClassName:i})}:i}function OA(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 MA(e){return{cache:AA(e.cacheSize),parseClassName:DA(e),...EA(e)}}const IA=/\s+/;function LA(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(IA).map(i=>{const{modifiers:a,hasImportantModifier:c,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 y=OA(a).join(":");return{isTailwindClass:!0,modifierId:c?y+ob:y,classGroupId:m,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:u}=i,d=a+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function FA(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ib(t))&&(n&&(n+=" "),n+=r);return n}function ib(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ib(e[n]))&&(r&&(r+=" "),r+=t);return r}function zA(e,...t){let r,n,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return r=MA(u),n=r.cache.get,s=r.cache.set,o=a,a(c)}function a(c){const u=n(c);if(u)return u;const d=LA(c,r);return s(c,d),d}return function(){return o(FA.apply(null,arguments))}}function _t(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const ab=/^\[(?:([a-z-]+):)?(.+)\]$/i,UA=/^\d+\/\d+$/,$A=new Set(["px","full","screen"]),VA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WA=/\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$/,BA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,HA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function rs(e){return Vo(e)||$A.has(e)||UA.test(e)}function zs(e){return ja(e,"length",eD)}function Vo(e){return!!e&&!Number.isNaN(Number(e))}function fu(e){return ja(e,"number",Vo)}function Ga(e){return!!e&&Number.isInteger(Number(e))}function ZA(e){return e.endsWith("%")&&Vo(e.slice(0,-1))}function qe(e){return ab.test(e)}function Us(e){return VA.test(e)}const KA=new Set(["length","size","percentage"]);function GA(e){return ja(e,KA,lb)}function qA(e){return ja(e,"position",lb)}const XA=new Set(["image","url"]);function QA(e){return ja(e,XA,rD)}function JA(e){return ja(e,"",tD)}function qa(){return!0}function ja(e,t,r){const n=ab.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function eD(e){return WA.test(e)&&!BA.test(e)}function lb(){return!1}function tD(e){return HA.test(e)}function rD(e){return YA.test(e)}function nD(){const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),a=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),m=_t("gap"),y=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),g=_t("inset"),_=_t("margin"),p=_t("opacity"),h=_t("padding"),w=_t("saturate"),C=_t("scale"),j=_t("sepia"),E=_t("skew"),R=_t("space"),P=_t("translate"),A=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",qe,t],N=()=>[qe,t],F=()=>["",rs,zs],b=()=>["auto",Vo,qe],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],W=()=>["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",qe],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Vo,fu],$=()=>[Vo,qe];return{cacheSize:500,separator:":",theme:{colors:[qa],spacing:[rs,zs],blur:["none","",Us,qe],brightness:z(),borderColor:[e],borderRadius:["none","","full",Us,qe],borderSpacing:N(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:$(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ZA,zs],inset:q(),margin:q(),opacity:z(),padding:N(),saturate:z(),scale:z(),sepia:I(),skew:$(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[Us]}],"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:[...V(),qe]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",Ga,qe]}],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",qe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Ga,qe]}],"grid-cols":[{"grid-cols":[qa]}],"col-start-end":[{col:["auto",{span:["full",Ga,qe]},qe]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[qa]}],"row-start-end":[{row:["auto",{span:[Ga,qe]},qe]}],"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",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],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:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"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",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[Us]},Us]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Us,zs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fu]}],"font-family":[{font:[qa]}],"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",qe]}],"line-clamp":[{"line-clamp":["none",Vo,fu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rs,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rs,zs]}],"underline-offset":[{"underline-offset":["auto",rs,qe]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],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",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),qA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],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":[p]}],"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":[p]}],"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":[rs,qe]}],"outline-w":[{outline:[rs,zs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[rs,zs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Us,JA]}],"shadow-color":[{shadow:[qa]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Us,qe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"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",qe]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Ga,qe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],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",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rs,zs,fu]}],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 sD=zA(nD);function ae(...e){return sD(jA(e))}const xf=_c("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"}}),He=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?bs:"button";return l.jsx(i,{className:ae(xf({variant:t,size:r,className:e})),ref:o,...s})});He.displayName="Button";function ce(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 oD(e,t){const r=v.createContext(t);function n(o){const{children:i,...a}=o,c=v.useMemo(()=>a,Object.values(a));return l.jsx(r.Provider,{value:c,children:i})}function s(o){const i=v.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 xr(e,t=[]){let r=[];function n(o,i){const a=v.createContext(i),c=r.length;r=[...r,i];function u(f){const{scope:m,children:y,...x}=f,g=(m==null?void 0:m[e][c])||a,_=v.useMemo(()=>x,Object.values(x));return l.jsx(g.Provider,{value:_,children:y})}function d(f,m){const y=(m==null?void 0:m[e][c])||a,x=v.useContext(y);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=>v.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[n,iD(s,...t)]}function iD(...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:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Dt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function on({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=aD({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,a=Dt(r),c=v.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,c]}function aD({defaultProp:e,onChange:t}){const r=v.useState(e),[n]=r,s=v.useRef(n),o=Dt(t);return v.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var lD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=lD.reduce((e,t)=>{const r=v.forwardRef((n,s)=>{const{asChild:o,...i}=n,a=o?bs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $g(e,t){e&&Ns.flushSync(()=>e.dispatchEvent(t))}function bc(e){const t=e+"CollectionProvider",[r,n]=xr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:g}=y,_=We.useRef(null),p=We.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:p,collectionRef:_,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=We.forwardRef((y,x)=>{const{scope:g,children:_}=y,p=o(a,g),h=Ke(x,p.collectionRef);return l.jsx(bs,{ref:h,children:_})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=We.forwardRef((y,x)=>{const{scope:g,children:_,...p}=y,h=We.useRef(null),w=Ke(x,h),C=o(u,g);return We.useEffect(()=>(C.itemMap.set(h,{ref:h,...p}),()=>void C.itemMap.delete(h))),l.jsx(bs,{[d]:"",ref:w,children:_})});f.displayName=u;function m(y){const x=o(e+"CollectionConsumer",y);return We.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const p=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,j)=>p.indexOf(C.ref.current)-p.indexOf(j.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},m,n]}var cD=v.createContext(void 0);function Ea(e){const t=v.useContext(cD);return e||t||"ltr"}function uD(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);v.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 dD="DismissableLayer",om="dismissableLayer.update",fD="dismissableLayer.pointerDownOutside",hD="dismissableLayer.focusOutside",C0,cb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Na=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=v.useContext(cb),[d,f]=v.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),x=Ke(t,R=>f(R)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(_),h=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=h>=p,j=mD(R=>{const P=R.target,A=[...u.branches].some(L=>L.contains(P));!C||A||(s==null||s(R),i==null||i(R),R.defaultPrevented||a==null||a())},m),E=gD(R=>{const P=R.target;[...u.branches].some(L=>L.contains(P))||(o==null||o(R),i==null||i(R),R.defaultPrevented||a==null||a())},m);return uD(R=>{h===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),v.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(C0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),j0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=C0)}},[d,m,r,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),j0())},[d,u]),v.useEffect(()=>{const R=()=>y({});return document.addEventListener(om,R),()=>document.removeEventListener(om,R)},[]),l.jsx(Re.div,{...c,ref:x,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,j.onPointerDownCapture)})});Na.displayName=dD;var pD="DismissableLayerBranch",ub=v.forwardRef((e,t)=>{const r=v.useContext(cb),n=v.useRef(null),s=Ke(t,n);return v.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(Re.div,{...e,ref:s})});ub.displayName=pD;function mD(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let c=function(){db(fD,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}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 gD(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=v.useRef(!1);return v.useEffect(()=>{const s=o=>{o.target&&!n.current&&db(hD,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 j0(){const e=new CustomEvent(om);document.dispatchEvent(e)}function db(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 vD=Na,yD=ub,zh=0;function Vg(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??E0()),document.body.insertAdjacentElement("beforeend",e[1]??E0()),zh++,()=>{zh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zh--}},[])}function E0(){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 Uh="focusScope.autoFocusOnMount",$h="focusScope.autoFocusOnUnmount",N0={bubbles:!1,cancelable:!0},xD="FocusScope",wf=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=v.useState(null),u=Dt(s),d=Dt(o),f=v.useRef(null),m=Ke(t,g=>c(g)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let g=function(w){if(y.paused||!a)return;const C=w.target;a.contains(C)?f.current=C:Vs(f.current,{select:!0})},_=function(w){if(y.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||Vs(f.current,{select:!0}))},p=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&Vs(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",_);const h=new MutationObserver(p);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",_),h.disconnect()}}},[n,a,y.paused]),v.useEffect(()=>{if(a){R0.add(y);const g=document.activeElement;if(!a.contains(g)){const p=new CustomEvent(Uh,N0);a.addEventListener(Uh,u),a.dispatchEvent(p),p.defaultPrevented||(wD(CD(fb(a)),{select:!0}),document.activeElement===g&&Vs(a))}return()=>{a.removeEventListener(Uh,u),setTimeout(()=>{const p=new CustomEvent($h,N0);a.addEventListener($h,d),a.dispatchEvent(p),p.defaultPrevented||Vs(g??document.body,{select:!0}),a.removeEventListener($h,d),R0.remove(y)},0)}}},[a,u,d,y]);const x=v.useCallback(g=>{if(!r&&!n||y.paused)return;const _=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(_&&p){const h=g.currentTarget,[w,C]=_D(h);w&&C?!g.shiftKey&&p===C?(g.preventDefault(),r&&Vs(w,{select:!0})):g.shiftKey&&p===w&&(g.preventDefault(),r&&Vs(C,{select:!0})):p===h&&g.preventDefault()}},[r,n,y.paused]);return l.jsx(Re.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});wf.displayName=xD;function wD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Vs(n,{select:t}),document.activeElement!==r)return}function _D(e){const t=fb(e),r=T0(t,e),n=T0(t.reverse(),e);return[r,n]}function fb(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 T0(e,t){for(const r of e)if(!bD(r,{upTo:t}))return r}function bD(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 SD(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&SD(e)&&t&&e.select()}}var R0=kD();function kD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=P0(e,t),e.unshift(t)},remove(t){var r;e=P0(e,t),(r=e[0])==null||r.resume()}}}function P0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function CD(e){return e.filter(t=>t.tagName!=="A")}var Jt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},jD=Aw.useId||(()=>{}),ED=0;function Ur(e){const[t,r]=v.useState(jD());return Jt(()=>{r(n=>n??String(ED++))},[e]),t?`radix-${t}`:""}const ND=["top","right","bottom","left"],zn=Math.min,Lr=Math.max,bd=Math.round,hu=Math.floor,po=e=>({x:e,y:e}),TD={left:"right",right:"left",bottom:"top",top:"bottom"},RD={start:"end",end:"start"};function im(e,t,r){return Lr(e,zn(t,r))}function Ss(e,t){return typeof e=="function"?e(t):e}function ks(e){return e.split("-")[0]}function Ta(e){return e.split("-")[1]}function Wg(e){return e==="x"?"y":"x"}function Bg(e){return e==="y"?"height":"width"}function mo(e){return["top","bottom"].includes(ks(e))?"y":"x"}function Hg(e){return Wg(mo(e))}function PD(e,t,r){r===void 0&&(r=!1);const n=Ta(e),s=Hg(e),o=Bg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Sd(i)),[i,Sd(i)]}function AD(e){const t=Sd(e);return[am(e),t,am(t)]}function am(e){return e.replace(/start|end/g,t=>RD[t])}function DD(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 OD(e,t,r,n){const s=Ta(e);let o=DD(ks(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(am)))),o}function Sd(e){return e.replace(/left|right|bottom|top/g,t=>TD[t])}function MD(e){return{top:0,right:0,bottom:0,left:0,...e}}function hb(e){return typeof e!="number"?MD(e):{top:e,right:e,bottom:e,left:e}}function kd(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 A0(e,t,r){let{reference:n,floating:s}=e;const o=mo(t),i=Hg(t),a=Bg(i),c=ks(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 y;switch(c){case"top":y={x:d,y:n.y-s.height};break;case"bottom":y={x:d,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:f};break;case"left":y={x:n.x-s.width,y:f};break;default:y={x:n.x,y:n.y}}switch(Ta(t)){case"start":y[i]-=m*(r&&u?-1:1);break;case"end":y[i]+=m*(r&&u?-1:1);break}return y}const ID=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=A0(u,n,c),m=n,y={},x=0;for(let g=0;g<a.length;g++){const{name:_,fn:p}=a[g],{x:h,y:w,data:C,reset:j}=await p({x:d,y:f,initialPlacement:n,placement:m,strategy:s,middlewareData:y,rects:u,platform:i,elements:{reference:e,floating:t}});d=h??d,f=w??f,y={...y,[_]:{...y[_],...C}},j&&x<=50&&(x++,typeof j=="object"&&(j.placement&&(m=j.placement),j.rects&&(u=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:f}=A0(u,m,c)),g=-1)}return{x:d,y:f,placement:m,strategy:s,middlewareData:y}};async function Zl(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:y=0}=Ss(t,e),x=hb(y),_=a[m?f==="floating"?"reference":"floating":f],p=kd(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(_)))==null||r?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),h=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},j=kd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:w,strategy:c}):h);return{top:(p.top-j.top+x.top)/C.y,bottom:(j.bottom-p.bottom+x.bottom)/C.y,left:(p.left-j.left+x.left)/C.x,right:(j.right-p.right+x.right)/C.x}}const LD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ss(e,t)||{};if(u==null)return{};const f=hb(d),m={x:r,y:n},y=Hg(s),x=Bg(y),g=await i.getDimensions(u),_=y==="y",p=_?"top":"left",h=_?"bottom":"right",w=_?"clientHeight":"clientWidth",C=o.reference[x]+o.reference[y]-m[y]-o.floating[x],j=m[y]-o.reference[y],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let R=E?E[w]:0;(!R||!await(i.isElement==null?void 0:i.isElement(E)))&&(R=a.floating[w]||o.floating[x]);const P=C/2-j/2,A=R/2-g[x]/2-1,L=zn(f[p],A),q=zn(f[h],A),N=L,F=R-g[x]-q,b=R/2-g[x]/2+P,V=im(N,b,F),te=!c.arrow&&Ta(s)!=null&&b!==V&&o.reference[x]/2-(b<N?L:q)-g[x]/2<0,W=te?b<N?b-N:b-F:0;return{[y]:m[y]+W,data:{[y]:V,centerOffset:b-V-W,...te&&{alignmentOffset:W}},reset:te}}}),FD=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:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,..._}=Ss(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const p=ks(s),h=mo(a),w=ks(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=m||(w||!g?[Sd(a)]:AD(a)),E=x!=="none";!m&&E&&j.push(...OD(a,g,x,C));const R=[a,...j],P=await Zl(t,_),A=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&A.push(P[p]),f){const b=PD(s,i,C);A.push(P[b[0]],P[b[1]])}if(L=[...L,{placement:s,overflows:A}],!A.every(b=>b<=0)){var q,N;const b=(((q=o.flip)==null?void 0:q.index)||0)+1,V=R[b];if(V)return{data:{index:b,overflows:L},reset:{placement:V}};let te=(N=L.filter(W=>W.overflows[0]<=0).sort((W,Z)=>W.overflows[1]-Z.overflows[1])[0])==null?void 0:N.placement;if(!te)switch(y){case"bestFit":{var F;const W=(F=L.filter(Z=>{if(E){const I=mo(Z.placement);return I===h||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];W&&(te=W);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function D0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O0(e){return ND.some(t=>e[t]>=0)}const zD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Ss(e,t);switch(n){case"referenceHidden":{const o=await Zl(t,{...s,elementContext:"reference"}),i=D0(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:O0(i)}}}case"escaped":{const o=await Zl(t,{...s,altBoundary:!0}),i=D0(o,r.floating);return{data:{escapedOffsets:i,escaped:O0(i)}}}default:return{}}}}};async function UD(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=ks(r),a=Ta(r),c=mo(r)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ss(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(y=a==="end"?x*-1:x),c?{x:y*d,y:m*u}:{x:m*u,y:y*d}}const $D=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,c=await UD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},VD=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:_=>{let{x:p,y:h}=_;return{x:p,y:h}}},...c}=Ss(e,t),u={x:r,y:n},d=await Zl(t,c),f=mo(ks(s)),m=Wg(f);let y=u[m],x=u[f];if(o){const _=m==="y"?"top":"left",p=m==="y"?"bottom":"right",h=y+d[_],w=y-d[p];y=im(h,y,w)}if(i){const _=f==="y"?"top":"left",p=f==="y"?"bottom":"right",h=x+d[_],w=x-d[p];x=im(h,x,w)}const g=a.fn({...t,[m]:y,[f]:x});return{...g,data:{x:g.x-r,y:g.y-n}}}}},WD=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:c=!0,crossAxis:u=!0}=Ss(e,t),d={x:r,y:n},f=mo(s),m=Wg(f);let y=d[m],x=d[f];const g=Ss(a,t),_=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=m==="y"?"height":"width",C=o.reference[m]-o.floating[w]+_.mainAxis,j=o.reference[m]+o.reference[w]-_.mainAxis;y<C?y=C:y>j&&(y=j)}if(u){var p,h;const w=m==="y"?"width":"height",C=["top","left"].includes(ks(s)),j=o.reference[f]-o.floating[w]+(C&&((p=i.offset)==null?void 0:p[f])||0)+(C?0:_.crossAxis),E=o.reference[f]+o.reference[w]+(C?0:((h=i.offset)==null?void 0:h[f])||0)-(C?_.crossAxis:0);x<j?x=j:x>E&&(x=E)}return{[m]:y,[f]:x}}}},BD=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}=Ss(e,t),c=await Zl(t,a),u=ks(r),d=Ta(r),f=mo(r)==="y",{width:m,height:y}=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 _=y-c.top-c.bottom,p=m-c.left-c.right,h=zn(y-c[x],_),w=zn(m-c[g],p),C=!t.middlewareData.shift;let j=h,E=w;if(f?E=d||C?zn(w,p):p:j=d||C?zn(h,_):_,C&&!d){const P=Lr(c.left,0),A=Lr(c.right,0),L=Lr(c.top,0),q=Lr(c.bottom,0);f?E=m-2*(P!==0||A!==0?P+A:Lr(c.left,c.right)):j=y-2*(L!==0||q!==0?L+q:Lr(c.top,c.bottom))}await i({...t,availableWidth:E,availableHeight:j});const R=await s.getDimensions(o.floating);return m!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function Ra(e){return pb(e)?(e.nodeName||"").toLowerCase():"#document"}function $r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ps(e){var t;return(t=(pb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pb(e){return e instanceof Node||e instanceof $r(e).Node}function Sn(e){return e instanceof Element||e instanceof $r(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof $r(e).HTMLElement}function M0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $r(e).ShadowRoot}function Sc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=kn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function HD(e){return["table","td","th"].includes(Ra(e))}function _f(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yg(e){const t=Zg(),r=Sn(e)?kn(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=go(e);for(;Bn(t)&&!pa(t);){if(Yg(t))return t;if(_f(t))return null;t=go(t)}return null}function Zg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pa(e){return["html","body","#document"].includes(Ra(e))}function kn(e){return $r(e).getComputedStyle(e)}function bf(e){return Sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function go(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||M0(e)&&e.host||Ps(e);return M0(t)?t.host:t}function mb(e){const t=go(e);return pa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&Sc(t)?t:mb(t)}function Kl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=mb(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=$r(s);return o?t.concat(i,i.visualViewport||[],Sc(s)?s:[],i.frameElement&&r?Kl(i.frameElement):[]):t.concat(s,Kl(s,[],r))}function gb(e){const t=kn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Bn(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=bd(r)!==o||bd(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function Kg(e){return Sn(e)?e:e.contextElement}function qi(e){const t=Kg(e);if(!Bn(t))return po(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=gb(t);let i=(o?bd(r.width):r.width)/n,a=(o?bd(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ZD=po(0);function vb(e){const t=$r(e);return!Zg()||!t.visualViewport?ZD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$r(e)?!1:t}function ri(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Kg(e);let i=po(1);t&&(n?Sn(n)&&(i=qi(n)):i=qi(e));const a=KD(o,r,n)?vb(o):po(0);let c=(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=$r(o),y=n&&Sn(n)?$r(n):n;let x=m,g=x.frameElement;for(;g&&n&&y!==x;){const _=qi(g),p=g.getBoundingClientRect(),h=kn(g),w=p.left+(g.clientLeft+parseFloat(h.paddingLeft))*_.x,C=p.top+(g.clientTop+parseFloat(h.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,f*=_.y,c+=w,u+=C,x=$r(g),g=x.frameElement}}return kd({width:d,height:f,x:c,y:u})}function GD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=Ps(n),a=t?_f(t.floating):!1;if(n===i||a&&o)return r;let c={scrollLeft:0,scrollTop:0},u=po(1);const d=po(0),f=Bn(n);if((f||!f&&!o)&&((Ra(n)!=="body"||Sc(i))&&(c=bf(n)),Bn(n))){const m=ri(n);u=qi(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-c.scrollLeft*u.x+d.x,y:r.y*u.y-c.scrollTop*u.y+d.y}}function qD(e){return Array.from(e.getClientRects())}function yb(e){return ri(Ps(e)).left+bf(e).scrollLeft}function XD(e){const t=Ps(e),r=bf(e),n=e.ownerDocument.body,s=Lr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Lr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+yb(e);const a=-r.scrollTop;return kn(n).direction==="rtl"&&(i+=Lr(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function QD(e,t){const r=$r(e),n=Ps(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=Zg();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}function JD(e,t){const r=ri(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Bn(e)?qi(e):po(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=n*o.y;return{width:i,height:a,x:c,y:u}}function I0(e,t,r){let n;if(t==="viewport")n=QD(e,r);else if(t==="document")n=XD(Ps(e));else if(Sn(t))n=JD(t,r);else{const s=vb(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return kd(n)}function xb(e,t){const r=go(e);return r===t||!Sn(r)||pa(r)?!1:kn(r).position==="fixed"||xb(r,t)}function eO(e,t){const r=t.get(e);if(r)return r;let n=Kl(e,[],!1).filter(a=>Sn(a)&&Ra(a)!=="body"),s=null;const o=kn(e).position==="fixed";let i=o?go(e):e;for(;Sn(i)&&!pa(i);){const a=kn(i),c=Yg(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Sc(i)&&!c&&xb(e,i))?n=n.filter(d=>d!==i):s=a,i=go(i)}return t.set(e,n),n}function tO(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?_f(t)?[]:eO(t,this._c):[].concat(r),n],a=i[0],c=i.reduce((u,d)=>{const f=I0(t,d,s);return u.top=Lr(f.top,u.top),u.right=zn(f.right,u.right),u.bottom=zn(f.bottom,u.bottom),u.left=Lr(f.left,u.left),u},I0(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function rO(e){const{width:t,height:r}=gb(e);return{width:t,height:r}}function nO(e,t,r){const n=Bn(t),s=Ps(t),o=r==="fixed",i=ri(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=po(0);if(n||!n&&!o)if((Ra(t)!=="body"||Sc(s))&&(a=bf(t)),n){const f=ri(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=yb(s));const u=i.left+a.scrollLeft-c.x,d=i.top+a.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Vh(e){return kn(e).position==="static"}function L0(e,t){return!Bn(e)||kn(e).position==="fixed"?null:t?t(e):e.offsetParent}function wb(e,t){const r=$r(e);if(_f(e))return r;if(!Bn(e)){let s=go(e);for(;s&&!pa(s);){if(Sn(s)&&!Vh(s))return s;s=go(s)}return r}let n=L0(e,t);for(;n&&HD(n)&&Vh(n);)n=L0(n,t);return n&&pa(n)&&Vh(n)&&!Yg(n)?r:n||YD(e)||r}const sO=async function(e){const t=this.getOffsetParent||wb,r=this.getDimensions,n=await r(e.floating);return{reference:nO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function oO(e){return kn(e).direction==="rtl"}const iO={convertOffsetParentRelativeRectToViewportRelativeRect:GD,getDocumentElement:Ps,getClippingRect:tO,getOffsetParent:wb,getElementRects:sO,getClientRects:qD,getDimensions:rO,getScale:qi,isElement:Sn,isRTL:oO};function aO(e,t){let r=null,n;const s=Ps(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const y=hu(d),x=hu(s.clientWidth-(u+f)),g=hu(s.clientHeight-(d+m)),_=hu(u),h={rootMargin:-y+"px "+-x+"px "+-g+"px "+-_+"px",threshold:Lr(0,zn(1,c))||1};let w=!0;function C(j){const E=j[0].intersectionRatio;if(E!==c){if(!w)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(C,{...h,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,h)}r.observe(e)}return i(!0),o}function lO(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:c=!1}=n,u=Kg(e),d=s||o?[...u?Kl(u):[],...Kl(t)]:[];d.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),o&&p.addEventListener("resize",r)});const f=u&&a?aO(u,r):null;let m=-1,y=null;i&&(y=new ResizeObserver(p=>{let[h]=p;h&&h.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),r()}),u&&!c&&y.observe(u),y.observe(t));let x,g=c?ri(e):null;c&&_();function _(){const p=ri(e);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&r(),g=p,x=requestAnimationFrame(_)}return r(),()=>{var p;d.forEach(h=>{s&&h.removeEventListener("scroll",r),o&&h.removeEventListener("resize",r)}),f==null||f(),(p=y)==null||p.disconnect(),y=null,c&&cancelAnimationFrame(x)}}const cO=$D,uO=VD,dO=FD,fO=BD,hO=zD,F0=LD,pO=WD,mO=(e,t,r)=>{const n=new Map,s={platform:iO,...r},o={...s.platform,_c:n};return ID(e,t,{...s,platform:o})};var Uu=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Cd(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(!Cd(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)&&!Cd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function _b(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function z0(e,t){const r=_b(e);return Math.round(t*r)/r}function U0(e){const t=v.useRef(e);return Uu(()=>{t.current=e}),t}function gO(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:c,open:u}=e,[d,f]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=v.useState(n);Cd(m,n)||y(n);const[x,g]=v.useState(null),[_,p]=v.useState(null),h=v.useCallback(W=>{W!==E.current&&(E.current=W,g(W))},[]),w=v.useCallback(W=>{W!==R.current&&(R.current=W,p(W))},[]),C=o||x,j=i||_,E=v.useRef(null),R=v.useRef(null),P=v.useRef(d),A=c!=null,L=U0(c),q=U0(s),N=v.useCallback(()=>{if(!E.current||!R.current)return;const W={placement:t,strategy:r,middleware:m};q.current&&(W.platform=q.current),mO(E.current,R.current,W).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!Cd(P.current,I)&&(P.current=I,Ns.flushSync(()=>{f(I)}))})},[m,t,r,q]);Uu(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const F=v.useRef(!1);Uu(()=>(F.current=!0,()=>{F.current=!1}),[]),Uu(()=>{if(C&&(E.current=C),j&&(R.current=j),C&&j){if(L.current)return L.current(C,j,N);N()}},[C,j,N,L,A]);const b=v.useMemo(()=>({reference:E,floating:R,setReference:h,setFloating:w}),[h,w]),V=v.useMemo(()=>({reference:C,floating:j}),[C,j]),te=v.useMemo(()=>{const W={position:r,left:0,top:0};if(!V.floating)return W;const Z=z0(V.floating,d.x),I=z0(V.floating,d.y);return a?{...W,transform:"translate("+Z+"px, "+I+"px)",..._b(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,V.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:N,refs:b,elements:V,floatingStyles:te}),[d,N,b,V,te])}const vO=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?F0({element:n.current,padding:s}).fn(r):{}:n?F0({element:n,padding:s}).fn(r):{}}}},yO=(e,t)=>({...cO(e),options:[e,t]}),xO=(e,t)=>({...uO(e),options:[e,t]}),wO=(e,t)=>({...pO(e),options:[e,t]}),_O=(e,t)=>({...dO(e),options:[e,t]}),bO=(e,t)=>({...fO(e),options:[e,t]}),SO=(e,t)=>({...hO(e),options:[e,t]}),kO=(e,t)=>({...vO(e),options:[e,t]});var CO="Arrow",bb=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return l.jsx(Re.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});bb.displayName=CO;var jO=bb;function Sb(e){const[t,r]=v.useState(void 0);return Jt(()=>{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 c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;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 Gg="Popper",[kb,Pa]=xr(Gg),[EO,Cb]=kb(Gg),jb=e=>{const{__scopePopper:t,children:r}=e,[n,s]=v.useState(null);return l.jsx(EO,{scope:t,anchor:n,onAnchorChange:s,children:r})};jb.displayName=Gg;var Eb="PopperAnchor",Nb=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Cb(Eb,r),i=v.useRef(null),a=Ke(t,i);return v.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:l.jsx(Re.div,{...s,ref:a})});Nb.displayName=Eb;var qg="PopperContent",[NO,TO]=kb(qg),Tb=v.forwardRef((e,t)=>{var he,ye,ke,Fe,Me,Pe;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:y="optimized",onPlaced:x,...g}=e,_=Cb(qg,r),[p,h]=v.useState(null),w=Ke(t,nt=>h(nt)),[C,j]=v.useState(null),E=Sb(C),R=(E==null?void 0:E.width)??0,P=(E==null?void 0:E.height)??0,A=n+(o!=="center"?"-"+o:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],N=q.length>0,F={padding:L,boundary:q.filter(PO),altBoundary:N},{refs:b,floatingStyles:V,placement:te,isPositioned:W,middlewareData:Z}=gO({strategy:"fixed",placement:A,whileElementsMounted:(...nt)=>lO(...nt,{animationFrame:y==="always"}),elements:{reference:_.anchor},middleware:[yO({mainAxis:s+P,alignmentAxis:i}),c&&xO({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?wO():void 0,...F}),c&&_O({...F}),bO({...F,apply:({elements:nt,rects:k,availableWidth:J,availableHeight:K})=>{const{width:D,height:S}=k.reference,T=nt.floating.style;T.setProperty("--radix-popper-available-width",`${J}px`),T.setProperty("--radix-popper-available-height",`${K}px`),T.setProperty("--radix-popper-anchor-width",`${D}px`),T.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&kO({element:C,padding:a}),AO({arrowWidth:R,arrowHeight:P}),m&&SO({strategy:"referenceHidden",...F})]}),[I,Q]=Ab(te),z=Dt(x);Jt(()=>{W&&(z==null||z())},[W,z]);const $=(he=Z.arrow)==null?void 0:he.x,fe=(ye=Z.arrow)==null?void 0:ye.y,ne=((ke=Z.arrow)==null?void 0:ke.centerOffset)!==0,[se,Oe]=v.useState();return Jt(()=>{p&&Oe(window.getComputedStyle(p).zIndex)},[p]),l.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:W?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Fe=Z.transformOrigin)==null?void 0:Fe.x,(Me=Z.transformOrigin)==null?void 0:Me.y].join(" "),...((Pe=Z.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(NO,{scope:r,placedSide:I,onArrowChange:j,arrowX:$,arrowY:fe,shouldHideArrow:ne,children:l.jsx(Re.div,{"data-side":I,"data-align":Q,...g,ref:w,style:{...g.style,animation:W?void 0:"none"}})})})});Tb.displayName=qg;var Rb="PopperArrow",RO={top:"bottom",right:"left",bottom:"top",left:"right"},Pb=v.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=TO(Rb,n),i=RO[o.placedSide];return l.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:l.jsx(jO,{...s,ref:r,style:{...s.style,display:"block"}})})});Pb.displayName=Rb;function PO(e){return e!==null}var AO=e=>({name:"transformOrigin",options:e,fn(t){var _,p,h;const{placement:r,rects:n,middlewareData:s}=t,i=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Ab(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,y=(((h=s.arrow)==null?void 0:h.y)??0)+c/2;let x="",g="";return u==="bottom"?(x=i?f:`${m}px`,g=`${-c}px`):u==="top"?(x=i?f:`${m}px`,g=`${n.floating.height+c}px`):u==="right"?(x=`${-c}px`,g=i?f:`${y}px`):u==="left"&&(x=`${n.floating.width+c}px`,g=i?f:`${y}px`),{data:{x,y:g}}}});function Ab(e){const[t,r="center"]=e.split("-");return[t,r]}var Xg=jb,Qg=Nb,Jg=Tb,ev=Pb,DO="Portal",kc=v.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=v.useState(!1);Jt(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?M1.createPortal(l.jsx(Re.div,{...n,ref:t}),i):null});kc.displayName=DO;function OO(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var ur=e=>{const{present:t,children:r}=e,n=MO(t),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=Ke(n.ref,IO(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:o}):null};ur.displayName="Presence";function MO(e){const[t,r]=v.useState(),n=v.useRef({}),s=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[a,c]=OO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=pu(n.current);o.current=a==="mounted"?u:"none"},[a]),Jt(()=>{const u=n.current,d=s.current;if(d!==e){const m=o.current,y=pu(u);e?c("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Jt(()=>{if(t){const u=f=>{const y=pu(n.current).includes(f.animationName);f.target===t&&y&&Ns.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=pu(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 c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function pu(e){return(e==null?void 0:e.animationName)||"none"}function IO(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 Wh="rovingFocusGroup.onEntryFocus",LO={bubbles:!1,cancelable:!0},Sf="RovingFocusGroup",[lm,Db,FO]=bc(Sf),[zO,kf]=xr(Sf,[FO]),[UO,$O]=zO(Sf),Ob=v.forwardRef((e,t)=>l.jsx(lm.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(lm.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(VO,{...e,ref:t})})}));Ob.displayName=Sf;var VO=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=v.useRef(null),y=Ke(t,m),x=Ea(o),[g=null,_]=on({prop:i,defaultProp:a,onChange:c}),[p,h]=v.useState(!1),w=Dt(u),C=Db(r),j=v.useRef(!1),[E,R]=v.useState(0);return v.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(Wh,w),()=>P.removeEventListener(Wh,w)},[w]),l.jsx(UO,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:g,onItemFocus:v.useCallback(P=>_(P),[_]),onItemShiftTab:v.useCallback(()=>h(!0),[]),onFocusableItemAdd:v.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>R(P=>P-1),[]),children:l.jsx(Re.div,{tabIndex:p||E===0?-1:0,"data-orientation":n,...f,ref:y,style:{outline:"none",...e.style},onMouseDown:ce(e.onMouseDown,()=>{j.current=!0}),onFocus:ce(e.onFocus,P=>{const A=!j.current;if(P.target===P.currentTarget&&A&&!p){const L=new CustomEvent(Wh,LO);if(P.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),N=q.find(te=>te.active),F=q.find(te=>te.id===g),V=[N,F,...q].filter(Boolean).map(te=>te.ref.current);Lb(V,d)}}j.current=!1}),onBlur:ce(e.onBlur,()=>h(!1))})})}),Mb="RovingFocusGroupItem",Ib=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,...i}=e,a=Ur(),c=o||a,u=$O(Mb,r),d=u.currentTabStopId===c,f=Db(r),{onFocusableItemAdd:m,onFocusableItemRemove:y}=u;return v.useEffect(()=>{if(n)return m(),()=>y()},[n,m,y]),l.jsx(lm.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:l.jsx(Re.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ce(e.onMouseDown,x=>{n?u.onItemFocus(c):x.preventDefault()}),onFocus:ce(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ce(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=HO(x,u.orientation,u.dir);if(g!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let p=f().filter(h=>h.focusable).map(h=>h.ref.current);if(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const h=p.indexOf(x.currentTarget);p=u.loop?YO(p,h+1):p.slice(h+1)}setTimeout(()=>Lb(p))}})})})});Ib.displayName=Mb;var WO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function BO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HO(e,t,r){const n=BO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return WO[n]}function Lb(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function YO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Fb=Ob,zb=Ib,ZO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wi=new WeakMap,mu=new WeakMap,gu={},Bh=0,Ub=function(e){return e&&(e.host||Ub(e.parentNode))},KO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ub(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})},GO=function(e,t,r,n){var s=KO(t,Array.isArray(e)?e:[e]);gu[r]||(gu[r]=new WeakMap);var o=gu[r],i=[],a=new Set,c=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var y=m.getAttribute(n),x=y!==null&&y!=="false",g=(wi.get(m)||0)+1,_=(o.get(m)||0)+1;wi.set(m,g),o.set(m,_),i.push(m),g===1&&x&&mu.set(m,!0),_===1&&m.setAttribute(r,"true"),x||m.setAttribute(n,"true")}catch(p){console.error("aria-hidden: cannot operate on ",m,p)}})};return d(t),a.clear(),Bh++,function(){i.forEach(function(f){var m=wi.get(f)-1,y=o.get(f)-1;wi.set(f,m),o.set(f,y),m||(mu.has(f)||f.removeAttribute(n),mu.delete(f)),y||f.removeAttribute(r)}),Bh--,Bh||(wi=new WeakMap,wi=new WeakMap,mu=new WeakMap,gu={})}},tv=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=ZO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),GO(n,s,r,"aria-hidden")):function(){return null}},In=function(){return In=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},In.apply(this,arguments)};function $b(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 qO(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 $u="right-scroll-bar-position",Vu="width-before-scroll-bar",XO="with-scroll-bars-hidden",QO="--removed-body-scroll-bar-size";function Hh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function JO(e,t){var r=v.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 eM=typeof window<"u"?v.useLayoutEffect:v.useEffect,$0=new WeakMap;function tM(e,t){var r=JO(null,function(n){return e.forEach(function(s){return Hh(s,n)})});return eM(function(){var n=$0.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||Hh(a,null)}),o.forEach(function(a){s.has(a)||Hh(a,i)})}$0.set(r,e)},[e]),r}function rM(e){return e}function nM(e,t){t===void 0&&(t=rM);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 c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return s}function sM(e){e===void 0&&(e={});var t=nM(null);return t.options=In({async:!0,ssr:!1},e),t}var Vb=function(e){var t=e.sideCar,r=$b(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 v.createElement(n,In({},r))};Vb.isSideCarExport=!0;function oM(e,t){return e.useMedium(t),Vb}var Wb=sM(),Yh=function(){},Cf=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Yh,onWheelCapture:Yh,onTouchMoveCapture:Yh}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,y=e.noIsolation,x=e.inert,g=e.allowPinchZoom,_=e.as,p=_===void 0?"div":_,h=e.gapMode,w=$b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,j=tM([r,t]),E=In(In({},w),s);return v.createElement(v.Fragment,null,d&&v.createElement(C,{sideCar:Wb,removeScrollBar:u,shards:f,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!g,lockRef:r,gapMode:h}),i?v.cloneElement(v.Children.only(a),In(In({},E),{ref:j})):v.createElement(p,In({},E,{className:c,ref:j}),a))});Cf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Cf.classNames={fullWidth:Vu,zeroRight:$u};var iM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iM();return t&&e.setAttribute("nonce",t),e}function lM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uM=function(){var e=0,t=null;return{add:function(r){e==0&&(t=aM())&&(lM(t,r),cM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dM=function(){var e=uM();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Bb=function(){var e=dM(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},fM={left:0,top:0,right:0,gap:0},Zh=function(e){return parseInt(e||"",10)||0},hM=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[Zh(r),Zh(n),Zh(s)]},pM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fM;var t=hM(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])}},mM=Bb(),Xi="data-scroll-locked",gM=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(XO,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(a,"px ").concat(n,`;
}
body[`).concat(Xi,`] {
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($u,` {
right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Vu,` {
margin-right: `).concat(a,"px ").concat(n,`;
}
.`).concat($u," .").concat($u,` {
right: 0 `).concat(n,`;
}
.`).concat(Vu," .").concat(Vu,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Xi,`] {
`).concat(QO,": ").concat(a,`px;
}
`)},V0=function(){var e=parseInt(document.body.getAttribute(Xi)||"0",10);return isFinite(e)?e:0},vM=function(){v.useEffect(function(){return document.body.setAttribute(Xi,(V0()+1).toString()),function(){var e=V0()-1;e<=0?document.body.removeAttribute(Xi):document.body.setAttribute(Xi,e.toString())}},[])},yM=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;vM();var o=v.useMemo(function(){return pM(s)},[s]);return v.createElement(mM,{styles:gM(o,!t,s,r?"":"!important")})},cm=!1;if(typeof window<"u")try{var vu=Object.defineProperty({},"passive",{get:function(){return cm=!0,!0}});window.addEventListener("test",vu,vu),window.removeEventListener("test",vu,vu)}catch{cm=!1}var _i=cm?{passive:!1}:!1,xM=function(e){return e.tagName==="TEXTAREA"},Hb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xM(e)&&r[t]==="visible")},wM=function(e){return Hb(e,"overflowY")},_M=function(e){return Hb(e,"overflowX")},W0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Yb(e,n);if(s){var o=Zb(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},bM=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},SM=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Yb=function(e,t){return e==="v"?wM(t):_M(t)},Zb=function(e,t){return e==="v"?bM(t):SM(t)},kM=function(e,t){return e==="h"&&t==="rtl"?-1:1},CM=function(e,t,r,n,s){var o=kM(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,c=t.contains(a),u=!1,d=i>0,f=0,m=0;do{var y=Zb(e,a),x=y[0],g=y[1],_=y[2],p=g-_-o*x;(x||p)&&Yb(e,a)&&(f+=p,m+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},yu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B0=function(e){return[e.deltaX,e.deltaY]},H0=function(e){return e&&"current"in e?e.current:e},jM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},EM=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},NM=0,bi=[];function TM(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(NM++)[0],o=v.useState(Bb)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=qO([e.lockRef.current],(e.shards||[]).map(H0),!0).filter(Boolean);return g.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(g,_){if("touches"in g&&g.touches.length===2)return!i.current.allowPinchZoom;var p=yu(g),h=r.current,w="deltaX"in g?g.deltaX:h[0]-p[0],C="deltaY"in g?g.deltaY:h[1]-p[1],j,E=g.target,R=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&E.type==="range")return!1;var P=W0(R,E);if(!P)return!0;if(P?j=R:(j=R==="v"?"h":"v",P=W0(R,E)),!P)return!1;if(!n.current&&"changedTouches"in g&&(w||C)&&(n.current=j),!j)return!0;var A=n.current||j;return CM(A,_,g,A==="h"?w:C,!0)},[]),c=v.useCallback(function(g){var _=g;if(!(!bi.length||bi[bi.length-1]!==o)){var p="deltaY"in _?B0(_):yu(_),h=t.current.filter(function(j){return j.name===_.type&&(j.target===_.target||_.target===j.shadowParent)&&jM(j.delta,p)})[0];if(h&&h.should){_.cancelable&&_.preventDefault();return}if(!h){var w=(i.current.shards||[]).map(H0).filter(Boolean).filter(function(j){return j.contains(_.target)}),C=w.length>0?a(_,w[0]):!i.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),u=v.useCallback(function(g,_,p,h){var w={name:g,delta:_,target:p,should:h,shadowParent:RM(p)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=v.useCallback(function(g){r.current=yu(g),n.current=void 0},[]),f=v.useCallback(function(g){u(g.type,B0(g),g.target,a(g,e.lockRef.current))},[]),m=v.useCallback(function(g){u(g.type,yu(g),g.target,a(g,e.lockRef.current))},[]);v.useEffect(function(){return bi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,_i),document.addEventListener("touchmove",c,_i),document.addEventListener("touchstart",d,_i),function(){bi=bi.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,_i),document.removeEventListener("touchmove",c,_i),document.removeEventListener("touchstart",d,_i)}},[]);var y=e.removeScrollBar,x=e.inert;return v.createElement(v.Fragment,null,x?v.createElement(o,{styles:EM(s)}):null,y?v.createElement(yM,{gapMode:e.gapMode}):null)}function RM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const PM=oM(Wb,TM);var jf=v.forwardRef(function(e,t){return v.createElement(Cf,In({},e,{ref:t,sideCar:PM}))});jf.classNames=Cf.classNames;var um=["Enter"," "],AM=["ArrowDown","PageUp","Home"],Kb=["ArrowUp","PageDown","End"],DM=[...AM,...Kb],OM={ltr:[...um,"ArrowRight"],rtl:[...um,"ArrowLeft"]},MM={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cc="Menu",[Gl,IM,LM]=bc(Cc),[ci,Gb]=xr(Cc,[LM,Pa,kf]),Ef=Pa(),qb=kf(),[FM,ui]=ci(Cc),[zM,jc]=ci(Cc),Xb=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,a=Ef(t),[c,u]=v.useState(null),d=v.useRef(!1),f=Dt(o),m=Ea(s);return v.useEffect(()=>{const y=()=>{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",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),l.jsx(Xg,{...a,children:l.jsx(FM,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(zM,{scope:t,onClose:v.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:i,children:n})})})};Xb.displayName=Cc;var UM="MenuAnchor",rv=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=Ef(r);return l.jsx(Qg,{...s,...n,ref:t})});rv.displayName=UM;var nv="MenuPortal",[$M,Qb]=ci(nv,{forceMount:void 0}),Jb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=ui(nv,t);return l.jsx($M,{scope:t,forceMount:r,children:l.jsx(ur,{present:r||o.open,children:l.jsx(kc,{asChild:!0,container:s,children:n})})})};Jb.displayName=nv;var rn="MenuContent",[VM,sv]=ci(rn),eS=v.forwardRef((e,t)=>{const r=Qb(rn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=ui(rn,e.__scopeMenu),i=jc(rn,e.__scopeMenu);return l.jsx(Gl.Provider,{scope:e.__scopeMenu,children:l.jsx(ur,{present:n||o.open,children:l.jsx(Gl.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(WM,{...s,ref:t}):l.jsx(BM,{...s,ref:t})})})})}),WM=v.forwardRef((e,t)=>{const r=ui(rn,e.__scopeMenu),n=v.useRef(null),s=Ke(t,n);return v.useEffect(()=>{const o=n.current;if(o)return tv(o)},[]),l.jsx(ov,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),BM=v.forwardRef((e,t)=>{const r=ui(rn,e.__scopeMenu);return l.jsx(ov,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),ov=v.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:y,disableOutsideScroll:x,...g}=e,_=ui(rn,r),p=jc(rn,r),h=Ef(r),w=qb(r),C=IM(r),[j,E]=v.useState(null),R=v.useRef(null),P=Ke(t,R,_.onContentChange),A=v.useRef(0),L=v.useRef(""),q=v.useRef(0),N=v.useRef(null),F=v.useRef("right"),b=v.useRef(0),V=x?jf:v.Fragment,te=x?{as:bs,allowPinchZoom:!0}:void 0,W=I=>{var he,ye;const Q=L.current+I,z=C().filter(ke=>!ke.disabled),$=document.activeElement,fe=(he=z.find(ke=>ke.ref.current===$))==null?void 0:he.textValue,ne=z.map(ke=>ke.textValue),se=rI(ne,Q,fe),Oe=(ye=z.find(ke=>ke.textValue===se))==null?void 0:ye.ref.current;(function ke(Fe){L.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>ke(""),1e3))})(Q),Oe&&setTimeout(()=>Oe.focus())};v.useEffect(()=>()=>window.clearTimeout(A.current),[]),Vg();const Z=v.useCallback(I=>{var z,$;return F.current===((z=N.current)==null?void 0:z.side)&&sI(I,($=N.current)==null?void 0:$.area)},[]);return l.jsx(VM,{scope:r,searchRef:L,onItemEnter:v.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:v.useCallback(I=>{var Q;Z(I)||((Q=R.current)==null||Q.focus(),E(null))},[Z]),onTriggerLeave:v.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:v.useCallback(I=>{N.current=I},[]),children:l.jsx(V,{...te,children:l.jsx(wf,{asChild:!0,trapped:s,onMountAutoFocus:ce(o,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Na,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:y,children:l.jsx(Fb,{asChild:!0,...w,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:E,onEntryFocus:ce(c,I=>{p.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Jg,{role:"menu","aria-orientation":"vertical","data-state":gS(_.open),"data-radix-menu-content":"",dir:p.dir,...h,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:ce(g.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,$=I.ctrlKey||I.altKey||I.metaKey,fe=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!$&&fe&&W(I.key));const ne=R.current;if(I.target!==ne||!DM.includes(I.key))return;I.preventDefault();const Oe=C().filter(he=>!he.disabled).map(he=>he.ref.current);Kb.includes(I.key)&&Oe.reverse(),eI(Oe)}),onBlur:ce(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),L.current="")}),onPointerMove:ce(e.onPointerMove,ql(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const $=I.clientX>b.current?"right":"left";F.current=$,b.current=I.clientX}}))})})})})})})});eS.displayName=rn;var HM="MenuGroup",iv=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(Re.div,{role:"group",...n,ref:t})});iv.displayName=HM;var YM="MenuLabel",tS=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(Re.div,{...n,ref:t})});tS.displayName=YM;var jd="MenuItem",Y0="menu.itemSelect",Nf=v.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=v.useRef(null),i=jc(jd,e.__scopeMenu),a=sv(jd,e.__scopeMenu),c=Ke(t,o),u=v.useRef(!1),d=()=>{const f=o.current;if(!r&&f){const m=new CustomEvent(Y0,{bubbles:!0,cancelable:!0});f.addEventListener(Y0,y=>n==null?void 0:n(y),{once:!0}),$g(f,m),m.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(rS,{...s,ref:c,disabled:r,onClick:ce(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:ce(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:ce(e.onKeyDown,f=>{const m=a.searchRef.current!=="";r||m&&f.key===" "||um.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Nf.displayName=jd;var rS=v.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=sv(jd,r),a=qb(r),c=v.useRef(null),u=Ke(t,c),[d,f]=v.useState(!1),[m,y]=v.useState("");return v.useEffect(()=>{const x=c.current;x&&y((x.textContent??"").trim())},[o.children]),l.jsx(Gl.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:l.jsx(zb,{asChild:!0,...a,focusable:!n,children:l.jsx(Re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:ce(e.onPointerMove,ql(x=>{n?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(e.onPointerLeave,ql(x=>i.onItemLeave(x))),onFocus:ce(e.onFocus,()=>f(!0)),onBlur:ce(e.onBlur,()=>f(!1))})})})}),ZM="MenuCheckboxItem",nS=v.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return l.jsx(lS,{scope:e.__scopeMenu,checked:r,children:l.jsx(Nf,{role:"menuitemcheckbox","aria-checked":Ed(r)?"mixed":r,...s,ref:t,"data-state":lv(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(Ed(r)?!0:!r),{checkForDefaultPrevented:!1})})})});nS.displayName=ZM;var sS="MenuRadioGroup",[KM,GM]=ci(sS,{value:void 0,onValueChange:()=>{}}),oS=v.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=Dt(n);return l.jsx(KM,{scope:e.__scopeMenu,value:r,onValueChange:o,children:l.jsx(iv,{...s,ref:t})})});oS.displayName=sS;var iS="MenuRadioItem",aS=v.forwardRef((e,t)=>{const{value:r,...n}=e,s=GM(iS,e.__scopeMenu),o=r===s.value;return l.jsx(lS,{scope:e.__scopeMenu,checked:o,children:l.jsx(Nf,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":lv(o),onSelect:ce(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});aS.displayName=iS;var av="MenuItemIndicator",[lS,qM]=ci(av,{checked:!1}),cS=v.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=qM(av,r);return l.jsx(ur,{present:n||Ed(o.checked)||o.checked===!0,children:l.jsx(Re.span,{...s,ref:t,"data-state":lv(o.checked)})})});cS.displayName=av;var XM="MenuSeparator",uS=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});uS.displayName=XM;var QM="MenuArrow",dS=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=Ef(r);return l.jsx(ev,{...s,...n,ref:t})});dS.displayName=QM;var JM="MenuSub",[w$,fS]=ci(JM),ol="MenuSubTrigger",hS=v.forwardRef((e,t)=>{const r=ui(ol,e.__scopeMenu),n=jc(ol,e.__scopeMenu),s=fS(ol,e.__scopeMenu),o=sv(ol,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=v.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return v.useEffect(()=>d,[d]),v.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(rv,{asChild:!0,...u,children:l.jsx(rS,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":gS(r.open),...e,ref:yf(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:ce(e.onPointerMove,ql(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:ce(e.onPointerLeave,ql(f=>{var y,x;d();const m=(y=r.content)==null?void 0:y.getBoundingClientRect();if(m){const g=(x=r.content)==null?void 0:x.dataset.side,_=g==="right",p=_?-5:5,h=m[_?"left":"right"],w=m[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:h,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:h,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:ce(e.onKeyDown,f=>{var y;const m=o.searchRef.current!=="";e.disabled||m&&f.key===" "||OM[n.dir].includes(f.key)&&(r.onOpenChange(!0),(y=r.content)==null||y.focus(),f.preventDefault())})})})});hS.displayName=ol;var pS="MenuSubContent",mS=v.forwardRef((e,t)=>{const r=Qb(rn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=ui(rn,e.__scopeMenu),i=jc(rn,e.__scopeMenu),a=fS(pS,e.__scopeMenu),c=v.useRef(null),u=Ke(t,c);return l.jsx(Gl.Provider,{scope:e.__scopeMenu,children:l.jsx(ur,{present:n||o.open,children:l.jsx(Gl.Slot,{scope:e.__scopeMenu,children:l.jsx(ov,{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=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ce(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ce(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ce(e.onKeyDown,d=>{var y;const f=d.currentTarget.contains(d.target),m=MM[i.dir].includes(d.key);f&&m&&(o.onOpenChange(!1),(y=a.trigger)==null||y.focus(),d.preventDefault())})})})})})});mS.displayName=pS;function gS(e){return e?"open":"closed"}function Ed(e){return e==="indeterminate"}function lv(e){return Ed(e)?"indeterminate":e?"checked":"unchecked"}function eI(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function tI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rI(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=tI(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function nI(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,c=t[o].y,u=t[i].x,d=t[i].y;c>n!=d>n&&r<(u-a)*(n-c)/(d-c)+a&&(s=!s)}return s}function sI(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return nI(r,t)}function ql(e){return t=>t.pointerType==="mouse"?e(t):void 0}var oI=Xb,iI=rv,aI=Jb,lI=eS,cI=iv,uI=tS,dI=Nf,fI=nS,hI=oS,pI=aS,mI=cS,gI=uS,vI=dS,yI=hS,xI=mS,cv="DropdownMenu",[wI,_$]=xr(cv,[Gb]),wr=Gb(),[_I,vS]=wI(cv),yS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=wr(t),u=v.useRef(null),[d=!1,f]=on({prop:s,defaultProp:o,onChange:i});return l.jsx(_I,{scope:t,triggerId:Ur(),triggerRef:u,contentId:Ur(),open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(m=>!m),[f]),modal:a,children:l.jsx(oI,{...c,open:d,onOpenChange:f,dir:n,modal:a,children:r})})};yS.displayName=cv;var xS="DropdownMenuTrigger",wS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=vS(xS,r),i=wr(r);return l.jsx(iI,{asChild:!0,...i,children:l.jsx(Re.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:yf(t,o.triggerRef),onPointerDown:ce(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ce(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});wS.displayName=xS;var bI="DropdownMenuPortal",_S=e=>{const{__scopeDropdownMenu:t,...r}=e,n=wr(t);return l.jsx(aI,{...n,...r})};_S.displayName=bI;var bS="DropdownMenuContent",SS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vS(bS,r),o=wr(r),i=v.useRef(!1);return l.jsx(lI,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:ce(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ce(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.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)"}})});SS.displayName=bS;var SI="DropdownMenuGroup",kI=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(cI,{...s,...n,ref:t})});kI.displayName=SI;var CI="DropdownMenuLabel",kS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(uI,{...s,...n,ref:t})});kS.displayName=CI;var jI="DropdownMenuItem",CS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(dI,{...s,...n,ref:t})});CS.displayName=jI;var EI="DropdownMenuCheckboxItem",jS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(fI,{...s,...n,ref:t})});jS.displayName=EI;var NI="DropdownMenuRadioGroup",TI=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(hI,{...s,...n,ref:t})});TI.displayName=NI;var RI="DropdownMenuRadioItem",ES=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(pI,{...s,...n,ref:t})});ES.displayName=RI;var PI="DropdownMenuItemIndicator",NS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(mI,{...s,...n,ref:t})});NS.displayName=PI;var AI="DropdownMenuSeparator",TS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(gI,{...s,...n,ref:t})});TS.displayName=AI;var DI="DropdownMenuArrow",OI=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(vI,{...s,...n,ref:t})});OI.displayName=DI;var MI="DropdownMenuSubTrigger",RS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(yI,{...s,...n,ref:t})});RS.displayName=MI;var II="DropdownMenuSubContent",PS=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=wr(r);return l.jsx(xI,{...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)"}})});PS.displayName=II;var LI=yS,FI=wS,zI=_S,AS=SS,DS=kS,OS=CS,MS=jS,IS=ES,LS=NS,FS=TS,zS=RS,US=PS;const $S=LI,VS=FI,UI=v.forwardRef(({className:e,inset:t,children:r,...n},s)=>l.jsxs(zS,{ref:s,className:ae("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,l.jsx(iA,{className:"ml-auto h-4 w-4"})]}));UI.displayName=zS.displayName;const $I=v.forwardRef(({className:e,...t},r)=>l.jsx(US,{ref:r,className:ae("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}));$I.displayName=US.displayName;const uv=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(zI,{children:l.jsx(AS,{ref:n,sideOffset:t,className:ae("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})}));uv.displayName=AS.displayName;const Qi=v.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(OS,{ref:n,className:ae("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}));Qi.displayName=OS.displayName;const VI=v.forwardRef(({className:e,children:t,checked:r,...n},s)=>l.jsxs(MS,{ref:s,className:ae("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:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(LS,{children:l.jsx(eb,{className:"h-4 w-4"})})}),t]}));VI.displayName=MS.displayName;const WI=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(IS,{ref:n,className:ae("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:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(LS,{children:l.jsx(uA,{className:"h-2 w-2 fill-current"})})}),t]}));WI.displayName=IS.displayName;const WS=v.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(DS,{ref:n,className:ae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));WS.displayName=DS.displayName;const BS=v.forwardRef(({className:e,...t},r)=>l.jsx(FS,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));BS.displayName=FS.displayName;var dv="Dialog",[HS,YS]=xr(dv),[BI,Tn]=HS(dv),ZS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=v.useRef(null),c=v.useRef(null),[u=!1,d]=on({prop:n,defaultProp:s,onChange:o});return l.jsx(BI,{scope:t,triggerRef:a,contentRef:c,contentId:Ur(),titleId:Ur(),descriptionId:Ur(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(f=>!f),[d]),modal:i,children:r})};ZS.displayName=dv;var KS="DialogTrigger",GS=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(KS,r),o=Ke(t,s.triggerRef);return l.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":pv(s.open),...n,ref:o,onClick:ce(e.onClick,s.onOpenToggle)})});GS.displayName=KS;var fv="DialogPortal",[HI,qS]=HS(fv,{forceMount:void 0}),XS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Tn(fv,t);return l.jsx(HI,{scope:t,forceMount:r,children:v.Children.map(n,i=>l.jsx(ur,{present:r||o.open,children:l.jsx(kc,{asChild:!0,container:s,children:i})}))})};XS.displayName=fv;var Nd="DialogOverlay",QS=v.forwardRef((e,t)=>{const r=qS(Nd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tn(Nd,e.__scopeDialog);return o.modal?l.jsx(ur,{present:n||o.open,children:l.jsx(YI,{...s,ref:t})}):null});QS.displayName=Nd;var YI=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(Nd,r);return l.jsx(jf,{as:bs,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Re.div,{"data-state":pv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ni="DialogContent",JS=v.forwardRef((e,t)=>{const r=qS(ni,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Tn(ni,e.__scopeDialog);return l.jsx(ur,{present:n||o.open,children:o.modal?l.jsx(ZI,{...s,ref:t}):l.jsx(KI,{...s,ref:t})})});JS.displayName=ni;var ZI=v.forwardRef((e,t)=>{const r=Tn(ni,e.__scopeDialog),n=v.useRef(null),s=Ke(t,r.contentRef,n);return v.useEffect(()=>{const o=n.current;if(o)return tv(o)},[]),l.jsx(ek,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,o=>o.preventDefault())})}),KI=v.forwardRef((e,t)=>{const r=Tn(ni,e.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return l.jsx(ek,{...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 c,u;(c=e.onInteractOutside)==null||c.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()}})}),ek=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Tn(ni,r),c=v.useRef(null),u=Ke(t,c);return Vg(),l.jsxs(l.Fragment,{children:[l.jsx(wf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx(Na,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pv(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(qI,{titleId:a.titleId}),l.jsx(QI,{contentRef:c,descriptionId:a.descriptionId})]})]})}),hv="DialogTitle",tk=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(hv,r);return l.jsx(Re.h2,{id:s.titleId,...n,ref:t})});tk.displayName=hv;var rk="DialogDescription",nk=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(rk,r);return l.jsx(Re.p,{id:s.descriptionId,...n,ref:t})});nk.displayName=rk;var sk="DialogClose",ok=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(sk,r);return l.jsx(Re.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,()=>s.onOpenChange(!1))})});ok.displayName=sk;function pv(e){return e?"open":"closed"}var ik="DialogTitleWarning",[GI,ak]=oD(ik,{contentName:ni,titleName:hv,docsSlug:"dialog"}),qI=({titleId:e})=>{const t=ak(ik),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 v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},XI="DialogDescriptionWarning",QI=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ak(XI).contentName}}.`;return v.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},mv=ZS,gv=GS,vv=XS,Ec=QS,Nc=JS,Tc=tk,Rc=nk,Tf=ok;const yv=mv,xv=gv,JI=vv,lk=v.forwardRef(({className:e,...t},r)=>l.jsx(Ec,{className:ae("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}));lk.displayName=Ec.displayName;const eL=_c("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"}}),Rf=v.forwardRef(({side:e="right",className:t,children:r,...n},s)=>l.jsxs(JI,{children:[l.jsx(lk,{}),l.jsxs(Nc,{ref:s,className:ae(eL({side:e}),t),...n,children:[r,l.jsxs(Tf,{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:[l.jsx(Fg,{className:"h-4 w-4 dark:text-stone-200"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Rf.displayName=Nc.displayName;const wv=({className:e,...t})=>l.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});wv.displayName="SheetHeader";const _v=v.forwardRef(({className:e,...t},r)=>l.jsx(Tc,{ref:r,className:ae("text-lg font-semibold text-foreground",e),...t}));_v.displayName=Tc.displayName;const tL=v.forwardRef(({className:e,...t},r)=>l.jsx(Rc,{ref:r,className:ae("text-sm text-muted-foreground",e),...t}));tL.displayName=Rc.displayName;class Vr 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,Vr.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 Vr||(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 xu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function rL(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||nL;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 c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{r[a]=n(c)}catch{r[a]=c}}s=i+1}return r}function Z0(e,t,r){const n=Object.assign({},r||{}),s=n.encode||sL;if(!xu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!xu.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(!xu.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!xu.test(n.path))throw new TypeError("option path is invalid");i+="; Path="+n.path}if(n.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c 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 nL(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function sL(e){return encodeURIComponent(e)}const oL=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let ck;function Ji(e){if(e)try{const t=decodeURIComponent(ck(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function uk(e,t=0){let r=Ji(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}ck=typeof atob!="function"||oL?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 K0="pb_auth";class iL{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!uk(this.token)}get isAdmin(){return Ji(this.token).type==="admin"}get isAuthRecord(){return Ji(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=K0){const n=rL(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=K0){var c,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ji(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=Z0(r,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.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=Z0(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 aL extends iL{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 di{constructor(t){this.client=t}}class lL extends di{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 bv extends di{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 Vr({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 Vr({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 Dr(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 Kh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class cL extends bv{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=Dr("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||Kh(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){Kh(u);const y=u.beforeSend,x=u.authStore.model,g=u.authStore.onChange((_,p)=>{(!_||(p==null?void 0:p.id)!=(x==null?void 0:x.id)||(p!=null&&p.collectionId||x!=null&&x.collectionId)&&(p==null?void 0:p.collectionId)!=(x==null?void 0:x.collectionId))&&Kh(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=y,delete u._resetAutoRefresh},u.beforeSend=async(_,p)=>{var j;const h=u.authStore.token;if((j=p.query)!=null&&j.autoRefresh)return y?y(_,p):{url:_,sendOptions:p};let w=u.authStore.isValid;if(w&&uk(u.authStore.token,d))try{await f()}catch{w=!1}w||await m();const C=p.headers||{};for(let E in C)if(E.toLowerCase()=="authorization"&&h==C[E]&&u.authStore.token){C[E]=u.authStore.token;break}return p.headers=C,y?y(_,p):{url:_,sendOptions:p}}}(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=Dr("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=Dr("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=Dr("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 uL=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function dk(e){if(e){e.query=e.query||{};for(let t in e)uL.includes(t)||(e.query[t]=e[t],delete e[t])}}class fk extends di{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){dk(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const c=a;let u;try{u=JSON.parse(c==null?void 0:c.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 c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===r&&(a=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,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 Vr(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 dL extends bv{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=Dr("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 c={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:o}};return c=Dr("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).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=G0(void 0));const s=new fk(this.client);function o(){n==null||n.close(),s.unsubscribe()}const i={},a=r.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(c=>{var m;const u=c.authProviders.find(y=>y.name===r.provider);if(!u)throw new Vr(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(y,x)=>{var g;try{await s.subscribe("@oauth2",async w=>{var j;const C=s.clientId;try{if(!w.state||C!==w.state)throw new Error("State parameters don't match.");if(w.error||!w.code)throw new Error("OAuth2 redirect error or missing code: "+w.error);const E=Object.assign({},r);delete E.provider,delete E.scopes,delete E.createData,delete E.urlCallback,(j=f==null?void 0:f.signal)!=null&&j.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,w.code,u.codeVerifier,d,r.createData,E);y(R)}catch(E){x(new Vr(E))}o()});const _={state:s.clientId};(g=r.scopes)!=null&&g.length&&(_.scope=r.scopes.join(" "));const p=this._replaceQueryParams(u.authUrl+d,_);await(r.urlCallback||function(w){n?n.location.href=w:n=G0(w)})(p)}catch(_){o(),x(new Vr(_))}})}).catch(c=>{throw o(),c})}async authRefresh(t,r){let n={method:"POST"};return n=Dr("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=Dr("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=Dr("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=Dr("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=Dr("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=Ji(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=Dr("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=Dr("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=Ji(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 c=a.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[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 G0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Vr(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 fL extends bv{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 hL extends di{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 Vr({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 pL extends di{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class mL extends di{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 gL extends di{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 vL{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new aL,this.admins=new cL(this),this.collections=new fL(this),this.files=new mL(this),this.logs=new hL(this),this.settings=new lL(this),this.realtime=new fk(this),this.health=new pL(this),this.backups=new gL(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new dL(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 Vr({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Vr(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),dk(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 yL={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const xL=yL.VITE_API_DOMAIN;console.log(xL);let wu;const st=()=>wu||(wu=new vL("/"),wu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var hk;function ve(){return hk.apply(null,arguments)}function wL(e){hk=e}function Cn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Zo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ct(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Sv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ct(e,t))return!1;return!0}function _r(e){return e===void 0}function Cs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Pc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pk(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function Qs(e,t){for(var r in t)ct(t,r)&&(e[r]=t[r]);return ct(t,"toString")&&(e.toString=t.toString),ct(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Kn(e,t,r,n){return Lk(e,t,r,n,!0).utc()}function _L(){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 Xe(e){return e._pf==null&&(e._pf=_L()),e._pf}var dm;Array.prototype.some?dm=Array.prototype.some:dm=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 kv(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Xe(e),r=dm.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 Pf(e){var t=Kn(NaN);return e!=null?Qs(Xe(t),e):Xe(t).userInvalidated=!0,t}var q0=ve.momentProperties=[],Gh=!1;function Cv(e,t){var r,n,s,o=q0.length;if(_r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),_r(t._i)||(e._i=t._i),_r(t._f)||(e._f=t._f),_r(t._l)||(e._l=t._l),_r(t._strict)||(e._strict=t._strict),_r(t._tzm)||(e._tzm=t._tzm),_r(t._isUTC)||(e._isUTC=t._isUTC),_r(t._offset)||(e._offset=t._offset),_r(t._pf)||(e._pf=Xe(t)),_r(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)n=q0[r],s=t[n],_r(s)||(e[n]=s);return e}function Ac(e){Cv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Gh===!1&&(Gh=!0,ve.updateOffset(this),Gh=!1)}function jn(e){return e instanceof Ac||e!=null&&e._isAMomentObject!=null}function mk(e){ve.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function an(e,t){var r=!0;return Qs(function(){if(ve.deprecationHandler!=null&&ve.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])ct(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];n.push(s)}mk(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var X0={};function gk(e,t){ve.deprecationHandler!=null&&ve.deprecationHandler(e,t),X0[e]||(mk(t),X0[e]=!0)}ve.suppressDeprecationWarnings=!1;ve.deprecationHandler=null;function Gn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function bL(e){var t,r;for(r in e)ct(e,r)&&(t=e[r],Gn(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 fm(e,t){var r=Qs({},e),n;for(n in t)ct(t,n)&&(Zo(e[n])&&Zo(t[n])?(r[n]={},Qs(r[n],e[n]),Qs(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)ct(e,n)&&!ct(t,n)&&Zo(e[n])&&(r[n]=Qs({},r[n]));return r}function jv(e){e!=null&&this.set(e)}var hm;Object.keys?hm=Object.keys:hm=function(e){var t,r=[];for(t in e)ct(e,t)&&r.push(t);return r};var SL={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function kL(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Gn(n)?n.call(t,r):n}function Hn(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 Ev=/(\[[^\[]*\])|(\\)?([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,_u=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qh={},ea={};function Ie(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(ea[e]=s),t&&(ea[t[0]]=function(){return Hn(s.apply(this,arguments),t[1],t[2])}),r&&(ea[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function CL(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function jL(e){var t=e.match(Ev),r,n;for(r=0,n=t.length;r<n;r++)ea[t[r]]?t[r]=ea[t[r]]:t[r]=CL(t[r]);return function(s){var o="",i;for(i=0;i<n;i++)o+=Gn(t[i])?t[i].call(s,e):t[i];return o}}function Wu(e,t){return e.isValid()?(t=vk(t,e.localeData()),qh[t]=qh[t]||jL(t),qh[t](e)):e.localeData().invalidDate()}function vk(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(_u.lastIndex=0;r>=0&&_u.test(e);)e=e.replace(_u,n),_u.lastIndex=0,r-=1;return e}var EL={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 NL(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Ev).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var TL="Invalid date";function RL(){return this._invalidDate}var PL="%d",AL=/\d{1,2}/;function DL(e){return this._ordinal.replace("%d",e)}var OL={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 ML(e,t,r,n){var s=this._relativeTime[r];return Gn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function IL(e,t){var r=this._relativeTime[e>0?"future":"past"];return Gn(r)?r(t):r.replace(/%s/i,t)}var Q0={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 ln(e){return typeof e=="string"?Q0[e]||Q0[e.toLowerCase()]:void 0}function Nv(e){var t={},r,n;for(n in e)ct(e,n)&&(r=ln(n),r&&(t[r]=e[n]));return t}var LL={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 FL(e){var t=[],r;for(r in e)ct(e,r)&&t.push({unit:r,priority:LL[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var yk=/\d/,Zr=/\d\d/,xk=/\d{3}/,Tv=/\d{4}/,Af=/[+-]?\d{6}/,Ct=/\d\d?/,wk=/\d\d\d\d?/,_k=/\d\d\d\d\d\d?/,Df=/\d{1,3}/,Rv=/\d{1,4}/,Of=/[+-]?\d{1,6}/,Aa=/\d+/,Mf=/[+-]?\d+/,zL=/Z|[+-]\d\d:?\d\d/gi,If=/Z|[+-]\d\d(?::?\d\d)?/gi,UL=/[+-]?\d+(\.\d{1,3})?/,Dc=/[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,Da=/^[1-9]\d?/,Pv=/^([1-9]\d|\d)/,Td;Td={};function _e(e,t,r){Td[e]=Gn(t)?t:function(n,s){return n&&r?r:t}}function $L(e,t){return ct(Td,e)?Td[e](t._strict,t._locale):new RegExp(VL(e))}function VL(e){return gs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function gs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Jr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Jr(t)),r}var pm={};function vt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),Cs(t)&&(n=function(o,i){i[t]=rt(o)}),s=e.length,r=0;r<s;r++)pm[e[r]]=n}function Oc(e,t){vt(e,function(r,n,s,o){s._w=s._w||{},t(r,s._w,s,o)})}function WL(e,t,r){t!=null&&ct(pm,e)&&pm[e](t,r._a,r,e)}function Lf(e){return e%4===0&&e%100!==0||e%400===0}var ar=0,fs=1,Ln=2,Gt=3,vn=4,hs=5,Wo=6,BL=7,HL=8;Ie("Y",0,0,function(){var e=this.year();return e<=9999?Hn(e,4):"+"+e});Ie(0,["YY",2],0,function(){return this.year()%100});Ie(0,["YYYY",4],0,"year");Ie(0,["YYYYY",5],0,"year");Ie(0,["YYYYYY",6,!0],0,"year");_e("Y",Mf);_e("YY",Ct,Zr);_e("YYYY",Rv,Tv);_e("YYYYY",Of,Af);_e("YYYYYY",Of,Af);vt(["YYYYY","YYYYYY"],ar);vt("YYYY",function(e,t){t[ar]=e.length===2?ve.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[ar]=ve.parseTwoDigitYear(e)});vt("Y",function(e,t){t[ar]=parseInt(e,10)});function bl(e){return Lf(e)?366:365}ve.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var bk=Oa("FullYear",!0);function YL(){return Lf(this.year())}function Oa(e,t){return function(r){return r!=null?(Sk(this,e,r),ve.updateOffset(this,t),this):Xl(this,e)}}function Xl(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 Sk(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&&!Lf(o)?28:a,s?n.setUTCFullYear(o,i,a):n.setFullYear(o,i,a)}}function ZL(e){return e=ln(e),Gn(this[e])?this[e]():this}function KL(e,t){if(typeof e=="object"){e=Nv(e);var r=FL(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=ln(e),Gn(this[e]))return this[e](t);return this}function GL(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 Av(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=GL(t,12);return e+=(t-r)/12,r===1?Lf(e)?29:28:31-r%7%2}Ie("M",["MM",2],"Mo",function(){return this.month()+1});Ie("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Ie("MMMM",0,0,function(e){return this.localeData().months(this,e)});_e("M",Ct,Da);_e("MM",Ct,Zr);_e("MMM",function(e,t){return t.monthsShortRegex(e)});_e("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[fs]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[fs]=s:Xe(r).invalidMonth=e});var qL="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kk="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ck=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,XL=Dc,QL=Dc;function JL(e,t){return e?Cn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ck).test(t)?"format":"standalone"][e.month()]:Cn(this._months)?this._months:this._months.standalone}function e4(e,t){return e?Cn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ck.test(t)?"format":"standalone"][e.month()]:Cn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function t4(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=Kn([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 r4(e,t,r){var n,s,o;if(this._monthsParseExact)return t4.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Kn([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 jk(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!Cs(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Av(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Ek(e){return e!=null?(jk(this,e),ve.updateOffset(this,!0),this):Xl(this,"Month")}function n4(){return Av(this.year(),this.month())}function s4(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||Nk.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ct(this,"_monthsShortRegex")||(this._monthsShortRegex=XL),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function o4(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||Nk.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ct(this,"_monthsRegex")||(this._monthsRegex=QL),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Nk(){function e(c,u){return u.length-c.length}var t=[],r=[],n=[],s,o,i,a;for(s=0;s<12;s++)o=Kn([2e3,s]),i=gs(this.monthsShort(o,"")),a=gs(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 i4(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 Ql(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 Rd(e,t,r){var n=7+t-r,s=(7+Ql(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Tk(e,t,r,n,s){var o=(7+r-n)%7,i=Rd(e,n,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=bl(c)+a):a>bl(e)?(c=e+1,u=a-bl(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Jl(e,t,r){var n=Rd(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+vs(i,t,r)):s>vs(e.year(),t,r)?(o=s-vs(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function vs(e,t,r){var n=Rd(e,t,r),s=Rd(e+1,t,r);return(bl(e)-n+s)/7}Ie("w",["ww",2],"wo","week");Ie("W",["WW",2],"Wo","isoWeek");_e("w",Ct,Da);_e("ww",Ct,Zr);_e("W",Ct,Da);_e("WW",Ct,Zr);Oc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function a4(e){return Jl(e,this._week.dow,this._week.doy).week}var l4={dow:0,doy:6};function c4(){return this._week.dow}function u4(){return this._week.doy}function d4(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function f4(e){var t=Jl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ie("d",0,"do","day");Ie("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ie("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ie("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ie("e",0,0,"weekday");Ie("E",0,0,"isoWeekday");_e("d",Ct);_e("e",Ct);_e("E",Ct);_e("dd",function(e,t){return t.weekdaysMinRegex(e)});_e("ddd",function(e,t){return t.weekdaysShortRegex(e)});_e("dddd",function(e,t){return t.weekdaysRegex(e)});Oc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Xe(r).invalidWeekday=e});Oc(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function h4(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function p4(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Dv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var m4="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rk="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),g4="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),v4=Dc,y4=Dc,x4=Dc;function w4(e,t){var r=Cn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Dv(r,this._week.dow):e?r[e.day()]:r}function _4(e){return e===!0?Dv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function b4(e){return e===!0?Dv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function S4(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=Kn([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 k4(e,t,r){var n,s,o;if(this._weekdaysParseExact)return S4.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Kn([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 C4(e){if(!this.isValid())return e!=null?this:NaN;var t=Xl(this,"Day");return e!=null?(e=h4(e,this.localeData()),this.add(e-t,"d")):t}function j4(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 E4(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=p4(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function N4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Ov.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ct(this,"_weekdaysRegex")||(this._weekdaysRegex=v4),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function T4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Ov.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ct(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=y4),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function R4(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||Ov.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ct(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=x4),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ov(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=Kn([2e3,1]).day(o),a=gs(this.weekdaysMin(i,"")),c=gs(this.weekdaysShort(i,"")),u=gs(this.weekdays(i,"")),t.push(a),r.push(c),n.push(u),s.push(a),s.push(c),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 P4(){return this.hours()||24}Ie("H",["HH",2],0,"hour");Ie("h",["hh",2],0,Mv);Ie("k",["kk",2],0,P4);Ie("hmm",0,0,function(){return""+Mv.apply(this)+Hn(this.minutes(),2)});Ie("hmmss",0,0,function(){return""+Mv.apply(this)+Hn(this.minutes(),2)+Hn(this.seconds(),2)});Ie("Hmm",0,0,function(){return""+this.hours()+Hn(this.minutes(),2)});Ie("Hmmss",0,0,function(){return""+this.hours()+Hn(this.minutes(),2)+Hn(this.seconds(),2)});function Pk(e,t){Ie(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Pk("a",!0);Pk("A",!1);function Ak(e,t){return t._meridiemParse}_e("a",Ak);_e("A",Ak);_e("H",Ct,Pv);_e("h",Ct,Da);_e("k",Ct,Da);_e("HH",Ct,Zr);_e("hh",Ct,Zr);_e("kk",Ct,Zr);_e("hmm",wk);_e("hmmss",_k);_e("Hmm",wk);_e("Hmmss",_k);vt(["H","HH"],Gt);vt(["k","kk"],function(e,t,r){var n=rt(e);t[Gt]=n===24?0:n});vt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});vt(["h","hh"],function(e,t,r){t[Gt]=rt(e),Xe(r).bigHour=!0});vt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n)),Xe(r).bigHour=!0});vt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n,2)),t[hs]=rt(e.substr(s)),Xe(r).bigHour=!0});vt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n))});vt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[vn]=rt(e.substr(n,2)),t[hs]=rt(e.substr(s))});function A4(e){return(e+"").toLowerCase().charAt(0)==="p"}var D4=/[ap]\.?m?\.?/i,O4=Oa("Hours",!0);function M4(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dk={calendar:SL,longDateFormat:EL,invalidDate:TL,ordinal:PL,dayOfMonthOrdinalParse:AL,relativeTime:OL,months:qL,monthsShort:kk,week:l4,weekdays:m4,weekdaysMin:g4,weekdaysShort:Rk,meridiemParse:D4},Nt={},Xa={},ec;function I4(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 J0(e){return e&&e.toLowerCase().replace("_","-")}function L4(e){for(var t=0,r,n,s,o;t<e.length;){for(o=J0(e[t]).split("-"),r=o.length,n=J0(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Ff(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&I4(o,n)>=r-1)break;r--}t++}return ec}function F4(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ff(e){var t=null,r;if(Nt[e]===void 0&&typeof Gu<"u"&&Gu&&Gu.exports&&F4(e))try{t=ec._abbr,r=require,r("./locale/"+e),co(t)}catch{Nt[e]=null}return Nt[e]}function co(e,t){var r;return e&&(_r(t)?r=As(e):r=Iv(e,t),r?ec=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ec._abbr}function Iv(e,t){if(t!==null){var r,n=Dk;if(t.abbr=e,Nt[e]!=null)gk("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=Nt[e]._config;else if(t.parentLocale!=null)if(Nt[t.parentLocale]!=null)n=Nt[t.parentLocale]._config;else if(r=Ff(t.parentLocale),r!=null)n=r._config;else return Xa[t.parentLocale]||(Xa[t.parentLocale]=[]),Xa[t.parentLocale].push({name:e,config:t}),null;return Nt[e]=new jv(fm(n,t)),Xa[e]&&Xa[e].forEach(function(s){Iv(s.name,s.config)}),co(e),Nt[e]}else return delete Nt[e],null}function z4(e,t){if(t!=null){var r,n,s=Dk;Nt[e]!=null&&Nt[e].parentLocale!=null?Nt[e].set(fm(Nt[e]._config,t)):(n=Ff(e),n!=null&&(s=n._config),t=fm(s,t),n==null&&(t.abbr=e),r=new jv(t),r.parentLocale=Nt[e],Nt[e]=r),co(e)}else Nt[e]!=null&&(Nt[e].parentLocale!=null?(Nt[e]=Nt[e].parentLocale,e===co()&&co(e)):Nt[e]!=null&&delete Nt[e]);return Nt[e]}function As(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ec;if(!Cn(e)){if(t=Ff(e),t)return t;e=[e]}return L4(e)}function U4(){return hm(Nt)}function Lv(e){var t,r=e._a;return r&&Xe(e).overflow===-2&&(t=r[fs]<0||r[fs]>11?fs:r[Ln]<1||r[Ln]>Av(r[ar],r[fs])?Ln:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[vn]!==0||r[hs]!==0||r[Wo]!==0)?Gt:r[vn]<0||r[vn]>59?vn:r[hs]<0||r[hs]>59?hs:r[Wo]<0||r[Wo]>999?Wo:-1,Xe(e)._overflowDayOfYear&&(t<ar||t>Ln)&&(t=Ln),Xe(e)._overflowWeeks&&t===-1&&(t=BL),Xe(e)._overflowWeekday&&t===-1&&(t=HL),Xe(e).overflow=t),e}var $4=/^\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)?)?$/,V4=/^\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)?)?$/,W4=/Z|[+-]\d\d(?::?\d\d)?/,bu=[["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]],Xh=[["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/]],B4=/^\/?Date\((-?\d+)/i,H4=/^(?:(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}))$/,Y4={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 Ok(e){var t,r,n=e._i,s=$4.exec(n)||V4.exec(n),o,i,a,c,u=bu.length,d=Xh.length;if(s){for(Xe(e).iso=!0,t=0,r=u;t<r;t++)if(bu[t][1].exec(s[1])){i=bu[t][0],o=bu[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=d;t<r;t++)if(Xh[t][1].exec(s[3])){a=(s[2]||" ")+Xh[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(W4.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),zv(e)}else e._isValid=!1}function Z4(e,t,r,n,s,o){var i=[K4(e),kk.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function K4(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function G4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function q4(e,t,r){if(e){var n=Rk.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Xe(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function X4(e,t,r){if(e)return Y4[e];if(t)return 0;var n=parseInt(r,10),s=n%100,o=(n-s)/100;return o*60+s}function Mk(e){var t=H4.exec(G4(e._i)),r;if(t){if(r=Z4(t[4],t[3],t[2],t[5],t[6],t[7]),!q4(t[1],r,e))return;e._a=r,e._tzm=X4(t[8],t[9],t[10]),e._d=Ql.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Xe(e).rfc2822=!0}else e._isValid=!1}function Q4(e){var t=B4.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Ok(e),e._isValid===!1)delete e._isValid;else return;if(Mk(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ve.createFromInputFallback(e)}ve.createFromInputFallback=an("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 Ci(e,t,r){return e??t??r}function J4(e){var t=new Date(ve.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fv(e){var t,r,n=[],s,o,i;if(!e._d){for(s=J4(e),e._w&&e._a[Ln]==null&&e._a[fs]==null&&e5(e),e._dayOfYear!=null&&(i=Ci(e._a[ar],s[ar]),(e._dayOfYear>bl(i)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),r=Ql(i,0,e._dayOfYear),e._a[fs]=r.getUTCMonth(),e._a[Ln]=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[vn]===0&&e._a[hs]===0&&e._a[Wo]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?Ql:i4).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&&(Xe(e).weekdayMismatch=!0)}}function e5(e){var t,r,n,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=Ci(t.GG,e._a[ar],Jl(kt(),1,4).year),n=Ci(t.W,1),s=Ci(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Jl(kt(),o,i),r=Ci(t.gg,e._a[ar],u.year),n=Ci(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),n<1||n>vs(r,o,i)?Xe(e)._overflowWeeks=!0:c!=null?Xe(e)._overflowWeekday=!0:(a=Tk(r,n,s,o,i),e._a[ar]=a.year,e._dayOfYear=a.dayOfYear)}ve.ISO_8601=function(){};ve.RFC_2822=function(){};function zv(e){if(e._f===ve.ISO_8601){Ok(e);return}if(e._f===ve.RFC_2822){Mk(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,r,n,s,o,i,a=t.length,c=0,u,d;for(s=vk(e._f,e._locale).match(Ev)||[],d=s.length,r=0;r<d;r++)o=s[r],n=(t.match($L(o,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&Xe(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),c+=n.length),ea[o]?(n?Xe(e).empty=!1:Xe(e).unusedTokens.push(o),WL(o,n,e)):e._strict&&!n&&Xe(e).unusedTokens.push(o);Xe(e).charsLeftOver=a-c,t.length>0&&Xe(e).unusedInput.push(t),e._a[Gt]<=12&&Xe(e).bigHour===!0&&e._a[Gt]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[Gt]=t5(e._locale,e._a[Gt],e._meridiem),u=Xe(e).era,u!==null&&(e._a[ar]=e._locale.erasConvertYear(u,e._a[ar])),Fv(e),Lv(e)}function t5(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 r5(e){var t,r,n,s,o,i,a=!1,c=e._f.length;if(c===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Cv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],zv(t),kv(t)&&(i=!0),o+=Xe(t).charsLeftOver,o+=Xe(t).unusedTokens.length*10,Xe(t).score=o,a?o<n&&(n=o,r=t):(n==null||o<n||i)&&(n=o,r=t,i&&(a=!0));Qs(e,r||t)}function n5(e){if(!e._d){var t=Nv(e._i),r=t.day===void 0?t.date:t.day;e._a=pk([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Fv(e)}}function s5(e){var t=new Ac(Lv(Ik(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ik(e){var t=e._i,r=e._f;return e._locale=e._locale||As(e._l),t===null||r===void 0&&t===""?Pf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),jn(t)?new Ac(Lv(t)):(Pc(t)?e._d=t:Cn(r)?r5(e):r?zv(e):o5(e),kv(e)||(e._d=null),e))}function o5(e){var t=e._i;_r(t)?e._d=new Date(ve.now()):Pc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Q4(e):Cn(t)?(e._a=pk(t.slice(0),function(r){return parseInt(r,10)}),Fv(e)):Zo(t)?n5(e):Cs(t)?e._d=new Date(t):ve.createFromInputFallback(e)}function Lk(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),(Zo(e)&&Sv(e)||Cn(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,s5(o)}function kt(e,t,r,n){return Lk(e,t,r,n,!1)}var i5=an("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Pf()}),a5=an("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Pf()});function Fk(e,t){var r,n;if(t.length===1&&Cn(t[0])&&(t=t[0]),!t.length)return kt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function l5(){var e=[].slice.call(arguments,0);return Fk("isBefore",e)}function c5(){var e=[].slice.call(arguments,0);return Fk("isAfter",e)}var u5=function(){return Date.now?Date.now():+new Date},Qa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function d5(e){var t,r=!1,n,s=Qa.length;for(t in e)if(ct(e,t)&&!(zt.call(Qa,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Qa[n]]){if(r)return!1;parseFloat(e[Qa[n]])!==rt(e[Qa[n]])&&(r=!0)}return!0}function f5(){return this._isValid}function h5(){return Rn(NaN)}function zf(e){var t=Nv(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,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=d5(t),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+n*3+r*12,this._data={},this._locale=As(),this._bubble()}function Bu(e){return e instanceof zf}function mm(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function p5(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++)rt(e[i])!==rt(t[i])&&o++;return o+s}function zk(e,t){Ie(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Hn(~~(r/60),2)+t+Hn(~~r%60,2)})}zk("Z",":");zk("ZZ","");_e("Z",If);_e("ZZ",If);vt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Uv(If,e)});var m5=/([\+\-]|\d\d)/gi;function Uv(e,t){var r=(t||"").match(e),n,s,o;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(m5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function $v(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(jn(e)||Pc(e)?e.valueOf():kt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ve.updateOffset(r,!1),r):kt(e).local()}function gm(e){return-Math.round(e._d.getTimezoneOffset())}ve.updateOffset=function(){};function g5(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=Uv(If,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=gm(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Vk(this,Rn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ve.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:gm(this)}function v5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function y5(e){return this.utcOffset(0,e)}function x5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gm(this),"m")),this}function w5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Uv(zL,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function _5(e){return this.isValid()?(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function b5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function S5(){if(!_r(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Cv(e,this),e=Ik(e),e._a?(t=e._isUTC?Kn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&p5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function k5(){return this.isValid()?!this._isUTC:!1}function C5(){return this.isValid()?this._isUTC:!1}function Uk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var j5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,E5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Rn(e,t){var r=e,n=null,s,o,i;return Bu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Cs(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=j5.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[Ln])*s,h:rt(n[Gt])*s,m:rt(n[vn])*s,s:rt(n[hs])*s,ms:rt(mm(n[Wo]*1e3))*s}):(n=E5.exec(e))?(s=n[1]==="-"?-1:1,r={y:Po(n[2],s),M:Po(n[3],s),w:Po(n[4],s),d:Po(n[5],s),h:Po(n[6],s),m:Po(n[7],s),s:Po(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=N5(kt(r.from),kt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new zf(r),Bu(e)&&ct(e,"_locale")&&(o._locale=e._locale),Bu(e)&&ct(e,"_isValid")&&(o._isValid=e._isValid),o}Rn.fn=zf.prototype;Rn.invalid=h5;function Po(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function ew(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 N5(e,t){var r;return e.isValid()&&t.isValid()?(t=$v(t,e),e.isBefore(t)?r=ew(e,t):(r=ew(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function $k(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(gk(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=Rn(r,n),Vk(this,s,e),this}}function Vk(e,t,r,n){var s=t._milliseconds,o=mm(t._days),i=mm(t._months);e.isValid()&&(n=n??!0,i&&jk(e,Xl(e,"Month")+i*r),o&&Sk(e,"Date",Xl(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ve.updateOffset(e,o||i))}var T5=$k(1,"add"),R5=$k(-1,"subtract");function Wk(e){return typeof e=="string"||e instanceof String}function P5(e){return jn(e)||Pc(e)||Wk(e)||Cs(e)||D5(e)||A5(e)||e===null||e===void 0}function A5(e){var t=Zo(e)&&!Sv(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||ct(e,o);return t&&r}function D5(e){var t=Cn(e),r=!1;return t&&(r=e.filter(function(n){return!Cs(n)&&Wk(e)}).length===0),t&&r}function O5(e){var t=Zo(e)&&!Sv(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||ct(e,o);return t&&r}function M5(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 I5(e,t){arguments.length===1&&(arguments[0]?P5(arguments[0])?(e=arguments[0],t=void 0):O5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||kt(),n=$v(r,this).startOf("day"),s=ve.calendarFormat(this,n)||"sameElse",o=t&&(Gn(t[s])?t[s].call(this,r):t[s]);return this.format(o||this.localeData().calendar(s,this,kt(r)))}function L5(){return new Ac(this)}function F5(e,t){var r=jn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=ln(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function z5(e,t){var r=jn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=ln(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function U5(e,t,r,n){var s=jn(e)?e:kt(e),o=jn(t)?t:kt(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 $5(e,t){var r=jn(e)?e:kt(e),n;return this.isValid()&&r.isValid()?(t=ln(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 V5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function W5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function B5(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=ln(t),t){case"year":o=Hu(this,n)/12;break;case"month":o=Hu(this,n);break;case"quarter":o=Hu(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:Jr(o)}function Hu(e,t){if(e.date()<t.date())return-Hu(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}ve.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ve.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function H5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Y5(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Wu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Gn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Wu(r,"Z")):Wu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Z5(){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 K5(e){e||(e=this.isUtc()?ve.defaultFormatUtc:ve.defaultFormat);var t=Wu(this,e);return this.localeData().postformat(t)}function G5(e,t){return this.isValid()&&(jn(e)&&e.isValid()||kt(e).isValid())?Rn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function q5(e){return this.from(kt(),e)}function X5(e,t){return this.isValid()&&(jn(e)&&e.isValid()||kt(e).isValid())?Rn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Q5(e){return this.to(kt(),e)}function Bk(e){var t;return e===void 0?this._locale._abbr:(t=As(e),t!=null&&(this._locale=t),this)}var Hk=an("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 Yk(){return this._locale}var Pd=1e3,ta=60*Pd,Ad=60*ta,Zk=(365*400+97)*24*Ad;function ra(e,t){return(e%t+t)%t}function Kk(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Zk:new Date(e,t,r).valueOf()}function Gk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Zk:Date.UTC(e,t,r)}function J5(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Gk:Kk,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-=ra(t+(this._isUTC?0:this.utcOffset()*ta),Ad);break;case"minute":t=this._d.valueOf(),t-=ra(t,ta);break;case"second":t=this._d.valueOf(),t-=ra(t,Pd);break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function eF(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Gk:Kk,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+=Ad-ra(t+(this._isUTC?0:this.utcOffset()*ta),Ad)-1;break;case"minute":t=this._d.valueOf(),t+=ta-ra(t,ta)-1;break;case"second":t=this._d.valueOf(),t+=Pd-ra(t,Pd)-1;break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function tF(){return this._d.valueOf()-(this._offset||0)*6e4}function rF(){return Math.floor(this.valueOf()/1e3)}function nF(){return new Date(this.valueOf())}function sF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function oF(){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 iF(){return this.isValid()?this.toISOString():null}function aF(){return kv(this)}function lF(){return Qs({},Xe(this))}function cF(){return Xe(this).overflow}function uF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ie("N",0,0,"eraAbbr");Ie("NN",0,0,"eraAbbr");Ie("NNN",0,0,"eraAbbr");Ie("NNNN",0,0,"eraName");Ie("NNNNN",0,0,"eraNarrow");Ie("y",["y",1],"yo","eraYear");Ie("y",["yy",2],0,"eraYear");Ie("y",["yyy",3],0,"eraYear");Ie("y",["yyyy",4],0,"eraYear");_e("N",Vv);_e("NN",Vv);_e("NNN",Vv);_e("NNNN",_F);_e("NNNNN",bF);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Xe(r).era=s:Xe(r).invalidEra=e});_e("y",Aa);_e("yy",Aa);_e("yyy",Aa);_e("yyyy",Aa);_e("yo",SF);vt(["y","yy","yyy","yyyy"],ar);vt(["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 dF(e,t){var r,n,s,o=this._eras||As("en")._eras;for(r=0,n=o.length;r<n;++r){switch(typeof o[r].since){case"string":s=ve(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=ve(o[r].until).startOf("day").valueOf(),o[r].until=s.valueOf();break}}return o}function fF(e,t,r){var n,s,o=this.eras(),i,a,c;for(e=e.toUpperCase(),n=0,s=o.length;n<s;++n)if(i=o[n].name.toUpperCase(),a=o[n].abbr.toUpperCase(),c=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(c===e)return o[n];break}else if([i,a,c].indexOf(e)>=0)return o[n]}function hF(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ve(e.since).year():ve(e.since).year()+(t-e.offset)*r}function pF(){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 mF(){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 gF(){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 vF(){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()-ve(s[e].since).year())*r+s[e].offset;return this.year()}function yF(e){return ct(this,"_erasNameRegex")||Wv.call(this),e?this._erasNameRegex:this._erasRegex}function xF(e){return ct(this,"_erasAbbrRegex")||Wv.call(this),e?this._erasAbbrRegex:this._erasRegex}function wF(e){return ct(this,"_erasNarrowRegex")||Wv.call(this),e?this._erasNarrowRegex:this._erasRegex}function Vv(e,t){return t.erasAbbrRegex(e)}function _F(e,t){return t.erasNameRegex(e)}function bF(e,t){return t.erasNarrowRegex(e)}function SF(e,t){return t._eraYearOrdinalRegex||Aa}function Wv(){var e=[],t=[],r=[],n=[],s,o,i,a,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=gs(u[s].name),a=gs(u[s].abbr),c=gs(u[s].narrow),t.push(i),e.push(a),r.push(c),n.push(i),n.push(a),n.push(c);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")}Ie(0,["gg",2],0,function(){return this.weekYear()%100});Ie(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Uf(e,t){Ie(0,[e,e.length],0,t)}Uf("gggg","weekYear");Uf("ggggg","weekYear");Uf("GGGG","isoWeekYear");Uf("GGGGG","isoWeekYear");_e("G",Mf);_e("g",Mf);_e("GG",Ct,Zr);_e("gg",Ct,Zr);_e("GGGG",Rv,Tv);_e("gggg",Rv,Tv);_e("GGGGG",Of,Af);_e("ggggg",Of,Af);Oc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=rt(e)});Oc(["gg","GG"],function(e,t,r,n){t[n]=ve.parseTwoDigitYear(e)});function kF(e){return qk.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function CF(e){return qk.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function jF(){return vs(this.year(),1,4)}function EF(){return vs(this.isoWeekYear(),1,4)}function NF(){var e=this.localeData()._week;return vs(this.year(),e.dow,e.doy)}function TF(){var e=this.localeData()._week;return vs(this.weekYear(),e.dow,e.doy)}function qk(e,t,r,n,s){var o;return e==null?Jl(this,n,s).year:(o=vs(e,n,s),t>o&&(t=o),RF.call(this,e,t,r,n,s))}function RF(e,t,r,n,s){var o=Tk(e,t,r,n,s),i=Ql(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Ie("Q",0,"Qo","quarter");_e("Q",yk);vt("Q",function(e,t){t[fs]=(rt(e)-1)*3});function PF(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ie("D",["DD",2],"Do","date");_e("D",Ct,Da);_e("DD",Ct,Zr);_e("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Ln);vt("Do",function(e,t){t[Ln]=rt(e.match(Ct)[0])});var Xk=Oa("Date",!0);Ie("DDD",["DDDD",3],"DDDo","dayOfYear");_e("DDD",Df);_e("DDDD",xk);vt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function AF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ie("m",["mm",2],0,"minute");_e("m",Ct,Pv);_e("mm",Ct,Zr);vt(["m","mm"],vn);var DF=Oa("Minutes",!1);Ie("s",["ss",2],0,"second");_e("s",Ct,Pv);_e("ss",Ct,Zr);vt(["s","ss"],hs);var OF=Oa("Seconds",!1);Ie("S",0,0,function(){return~~(this.millisecond()/100)});Ie(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ie(0,["SSS",3],0,"millisecond");Ie(0,["SSSS",4],0,function(){return this.millisecond()*10});Ie(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ie(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ie(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ie(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ie(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});_e("S",Df,yk);_e("SS",Df,Zr);_e("SSS",Df,xk);var Js,Qk;for(Js="SSSS";Js.length<=9;Js+="S")_e(Js,Aa);function MF(e,t){t[Wo]=rt(("0."+e)*1e3)}for(Js="S";Js.length<=9;Js+="S")vt(Js,MF);Qk=Oa("Milliseconds",!1);Ie("z",0,0,"zoneAbbr");Ie("zz",0,0,"zoneName");function IF(){return this._isUTC?"UTC":""}function LF(){return this._isUTC?"Coordinated Universal Time":""}var le=Ac.prototype;le.add=T5;le.calendar=I5;le.clone=L5;le.diff=B5;le.endOf=eF;le.format=K5;le.from=G5;le.fromNow=q5;le.to=X5;le.toNow=Q5;le.get=ZL;le.invalidAt=cF;le.isAfter=F5;le.isBefore=z5;le.isBetween=U5;le.isSame=$5;le.isSameOrAfter=V5;le.isSameOrBefore=W5;le.isValid=aF;le.lang=Hk;le.locale=Bk;le.localeData=Yk;le.max=a5;le.min=i5;le.parsingFlags=lF;le.set=KL;le.startOf=J5;le.subtract=R5;le.toArray=sF;le.toObject=oF;le.toDate=nF;le.toISOString=Y5;le.inspect=Z5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=iF;le.toString=H5;le.unix=rF;le.valueOf=tF;le.creationData=uF;le.eraName=pF;le.eraNarrow=mF;le.eraAbbr=gF;le.eraYear=vF;le.year=bk;le.isLeapYear=YL;le.weekYear=kF;le.isoWeekYear=CF;le.quarter=le.quarters=PF;le.month=Ek;le.daysInMonth=n4;le.week=le.weeks=d4;le.isoWeek=le.isoWeeks=f4;le.weeksInYear=NF;le.weeksInWeekYear=TF;le.isoWeeksInYear=jF;le.isoWeeksInISOWeekYear=EF;le.date=Xk;le.day=le.days=C4;le.weekday=j4;le.isoWeekday=E4;le.dayOfYear=AF;le.hour=le.hours=O4;le.minute=le.minutes=DF;le.second=le.seconds=OF;le.millisecond=le.milliseconds=Qk;le.utcOffset=g5;le.utc=y5;le.local=x5;le.parseZone=w5;le.hasAlignedHourOffset=_5;le.isDST=b5;le.isLocal=k5;le.isUtcOffset=C5;le.isUtc=Uk;le.isUTC=Uk;le.zoneAbbr=IF;le.zoneName=LF;le.dates=an("dates accessor is deprecated. Use date instead.",Xk);le.months=an("months accessor is deprecated. Use month instead",Ek);le.years=an("years accessor is deprecated. Use year instead",bk);le.zone=an("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",v5);le.isDSTShifted=an("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",S5);function FF(e){return kt(e*1e3)}function zF(){return kt.apply(null,arguments).parseZone()}function Jk(e){return e}var ut=jv.prototype;ut.calendar=kL;ut.longDateFormat=NL;ut.invalidDate=RL;ut.ordinal=DL;ut.preparse=Jk;ut.postformat=Jk;ut.relativeTime=ML;ut.pastFuture=IL;ut.set=bL;ut.eras=dF;ut.erasParse=fF;ut.erasConvertYear=hF;ut.erasAbbrRegex=xF;ut.erasNameRegex=yF;ut.erasNarrowRegex=wF;ut.months=JL;ut.monthsShort=e4;ut.monthsParse=r4;ut.monthsRegex=o4;ut.monthsShortRegex=s4;ut.week=a4;ut.firstDayOfYear=u4;ut.firstDayOfWeek=c4;ut.weekdays=w4;ut.weekdaysMin=b4;ut.weekdaysShort=_4;ut.weekdaysParse=k4;ut.weekdaysRegex=N4;ut.weekdaysShortRegex=T4;ut.weekdaysMinRegex=R4;ut.isPM=A4;ut.meridiem=M4;function Dd(e,t,r,n){var s=As(),o=Kn().set(n,t);return s[r](o,e)}function eC(e,t,r){if(Cs(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Dd(e,n,r,"month");return s}function Bv(e,t,r,n){typeof e=="boolean"?(Cs(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Cs(t)&&(r=t,t=void 0),t=t||"");var s=As(),o=e?s._week.dow:0,i,a=[];if(r!=null)return Dd(t,(r+o)%7,n,"day");for(i=0;i<7;i++)a[i]=Dd(t,(i+o)%7,n,"day");return a}function UF(e,t){return eC(e,t,"months")}function $F(e,t){return eC(e,t,"monthsShort")}function VF(e,t,r){return Bv(e,t,r,"weekdays")}function WF(e,t,r){return Bv(e,t,r,"weekdaysShort")}function BF(e,t,r){return Bv(e,t,r,"weekdaysMin")}co("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=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ve.lang=an("moment.lang is deprecated. Use moment.locale instead.",co);ve.langData=an("moment.langData is deprecated. Use moment.localeData instead.",As);var ns=Math.abs;function HF(){var e=this._data;return this._milliseconds=ns(this._milliseconds),this._days=ns(this._days),this._months=ns(this._months),e.milliseconds=ns(e.milliseconds),e.seconds=ns(e.seconds),e.minutes=ns(e.minutes),e.hours=ns(e.hours),e.months=ns(e.months),e.years=ns(e.years),this}function tC(e,t,r,n){var s=Rn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function YF(e,t){return tC(this,e,t,1)}function ZF(e,t){return tC(this,e,t,-1)}function tw(e){return e<0?Math.floor(e):Math.ceil(e)}function KF(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,a,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=tw(vm(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Jr(e/1e3),n.seconds=s%60,o=Jr(s/60),n.minutes=o%60,i=Jr(o/60),n.hours=i%24,t+=Jr(i/24),c=Jr(rC(t)),r+=c,t-=tw(vm(c)),a=Jr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function rC(e){return e*4800/146097}function vm(e){return e*146097/4800}function GF(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=ln(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+rC(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(vm(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 Ds(e){return function(){return this.as(e)}}var nC=Ds("ms"),qF=Ds("s"),XF=Ds("m"),QF=Ds("h"),JF=Ds("d"),e3=Ds("w"),t3=Ds("M"),r3=Ds("Q"),n3=Ds("y"),s3=nC;function o3(){return Rn(this)}function i3(e){return e=ln(e),this.isValid()?this[e+"s"]():NaN}function fi(e){return function(){return this.isValid()?this._data[e]:NaN}}var a3=fi("milliseconds"),l3=fi("seconds"),c3=fi("minutes"),u3=fi("hours"),d3=fi("days"),f3=fi("months"),h3=fi("years");function p3(){return Jr(this.days()/7)}var as=Math.round,Ui={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function m3(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function g3(e,t,r,n){var s=Rn(e).abs(),o=as(s.as("s")),i=as(s.as("m")),a=as(s.as("h")),c=as(s.as("d")),u=as(s.as("M")),d=as(s.as("w")),f=as(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]||c<=1&&["d"]||c<r.d&&["dd",c];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,m3.apply(null,m)}function v3(e){return e===void 0?as:typeof e=="function"?(as=e,!0):!1}function y3(e,t){return Ui[e]===void 0?!1:t===void 0?Ui[e]:(Ui[e]=t,e==="s"&&(Ui.ss=t-1),!0)}function x3(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Ui,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Ui,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=g3(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Qh=Math.abs;function Si(e){return(e>0)-(e<0)||+e}function $f(){if(!this.isValid())return this.localeData().invalidDate();var e=Qh(this._milliseconds)/1e3,t=Qh(this._days),r=Qh(this._months),n,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(n=Jr(e/60),s=Jr(n/60),e%=60,n%=60,o=Jr(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Si(this._months)!==Si(a)?"-":"",d=Si(this._days)!==Si(a)?"-":"",f=Si(this._milliseconds)!==Si(a)?"-":"",c+"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 it=zf.prototype;it.isValid=f5;it.abs=HF;it.add=YF;it.subtract=ZF;it.as=GF;it.asMilliseconds=nC;it.asSeconds=qF;it.asMinutes=XF;it.asHours=QF;it.asDays=JF;it.asWeeks=e3;it.asMonths=t3;it.asQuarters=r3;it.asYears=n3;it.valueOf=s3;it._bubble=KF;it.clone=o3;it.get=i3;it.milliseconds=a3;it.seconds=l3;it.minutes=c3;it.hours=u3;it.days=d3;it.weeks=p3;it.months=f3;it.years=h3;it.humanize=x3;it.toISOString=$f;it.toString=$f;it.toJSON=$f;it.locale=Bk;it.localeData=Yk;it.toIsoString=an("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$f);it.lang=Hk;Ie("X",0,0,"unix");Ie("x",0,0,"valueOf");_e("x",Mf);_e("X",UL);vt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,r){r._d=new Date(rt(e))});//! moment.js
ve.version="2.30.1";wL(kt);ve.fn=le;ve.min=l5;ve.max=c5;ve.now=u5;ve.utc=Kn;ve.unix=FF;ve.months=UF;ve.isDate=Pc;ve.locale=co;ve.invalid=Pf;ve.duration=Rn;ve.isMoment=jn;ve.weekdays=VF;ve.parseZone=zF;ve.localeData=As;ve.isDuration=Bu;ve.monthsShort=$F;ve.weekdaysMin=BF;ve.defineLocale=Iv;ve.updateLocale=z4;ve.locales=U4;ve.weekdaysShort=WF;ve.normalizeUnits=ln;ve.relativeTimeRounding=v3;ve.relativeTimeThreshold=y3;ve.calendarFormat=M5;ve.prototype=le;ve.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 w3=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),jo=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),_3=async e=>(e.deleted=ve.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),rw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),b3=async e=>{const t=st();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},S3=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},nw=async e=>await st().collection("access_groups").update(e.id,e),k3=(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)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},C3=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},sC=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Mc=async e=>{const t=st();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},oC=v.createContext({}),Kr=()=>v.useContext(oC),j3=({children:e})=>{const[t,r]=v.useReducer(k3,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await w3();r({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await C3();r({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await rw();r({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const n=v.useCallback(async()=>{const u=await rw();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),o=v.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),i=v.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(oC.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:n},children:e&&e})},E3={theme:"system",setTheme:()=>null},iC=v.createContext(E3);function N3({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,o]=v.useState(()=>localStorage.getItem(r)||t);v.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(r,a),o(a)}};return l.jsx(iC.Provider,{...n,value:i,children:e})}const T3=()=>{const e=v.useContext(iC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function R3(){const{setTheme:e}=T3();return l.jsxs($S,{children:[l.jsx(VS,{asChild:!0,children:l.jsxs(He,{variant:"outline",size:"icon",children:[l.jsx(xA,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(vA,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(uv,{align:"end",children:[l.jsx(Qi,{onClick:()=>e("light"),children:"浅色"}),l.jsx(Qi,{onClick:()=>e("dark"),children:"暗黑"}),l.jsx(Qi,{onClick:()=>e("system"),children:"系统"})]})]})}var P3="Separator",sw="horizontal",A3=["horizontal","vertical"],aC=v.forwardRef((e,t)=>{const{decorative:r,orientation:n=sw,...s}=e,o=D3(n)?n:sw,a=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":o,...a,...s,ref:t})});aC.displayName=P3;function D3(e){return A3.includes(e)}var lC=aC;const Wt=v.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>l.jsx(lC,{ref:s,decorative:r,orientation:t,className:ae("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Wt.displayName=lC.displayName;const O3="Certimate v0.1.11",cC=()=>l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(sA,{size:16}),l.jsx("div",{className:"ml-1",children:"文档"})]}),l.jsx(Wt,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:O3})]})]});function M3(){const e=Nr(),t=Nn();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(Q1,{to:"/login"});const r=t.pathname,n=i=>(console.log(r),i==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(j3,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(fr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(fr,{to:"/",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[l.jsx(x0,{className:"h-4 w-4"}),"控制面板"]}),l.jsxs(fr,{to:"/domains",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[l.jsx(rm,{className:"h-4 w-4"}),"域名列表"]}),l.jsxs(fr,{to:"/access",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[l.jsx(w0,{className:"h-4 w-4"}),"授权管理"]}),l.jsxs(fr,{to:"/history",className:ae("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[l.jsx(y0,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.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:[l.jsxs(yv,{children:[l.jsx(xv,{asChild:!0,children:l.jsxs(He,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(gA,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(Rf,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(fr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(fr,{to:"/",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[l.jsx(x0,{className:"h-5 w-5"}),"控制面板"]}),l.jsxs(fr,{to:"/domains",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[l.jsx(rm,{className:"h-5 w-5"}),"域名列表"]}),l.jsxs(fr,{to:"/access",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[l.jsx(w0,{className:"h-5 w-5"}),"授权管理"]}),l.jsxs(fr,{to:"/history",className:ae("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[l.jsx(y0,{className:"h-5 w-5"}),"部署历史"]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(R3,{}),l.jsxs($S,{children:[l.jsx(VS,{asChild:!0,children:l.jsxs(He,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(cA,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(uv,{align:"end",children:[l.jsx(WS,{children:"账户"}),l.jsx(BS,{}),l.jsx(Qi,{onClick:o,children:"偏好设置"}),l.jsx(Qi,{onClick:s,children:"退出"})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(Ig,{}),l.jsx(cC,{})]})]})]})})})}const Hv=({phase:e,phaseSuccess:t})=>{let r=l.jsx(l.Fragment,{children:" "});return e==="check"&&(t?r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),l.jsx(Wt,{className:"h-1 grow"}),l.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),l.jsx(Wt,{className:"h-1 grow bg-green-600"}),l.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r};var I3="VisuallyHidden",Ic=v.forwardRef((e,t)=>l.jsx(Re.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}}));Ic.displayName=I3;var L3=Ic,[Vf,b$]=xr("Tooltip",[Pa]),Wf=Pa(),uC="TooltipProvider",F3=700,ym="tooltip.open",[z3,Yv]=Vf(uC),Zv=e=>{const{__scopeTooltip:t,delayDuration:r=F3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(z3,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};Zv.displayName=uC;var Bf="Tooltip",[U3,Hf]=Vf(Bf),dC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=Yv(Bf,e.__scopeTooltip),u=Wf(t),[d,f]=v.useState(null),m=Ur(),y=v.useRef(0),x=i??c.disableHoverableContent,g=a??c.delayDuration,_=v.useRef(!1),[p=!1,h]=on({prop:n,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(ym))):c.onClose(),o==null||o(R)}}),w=v.useMemo(()=>p?_.current?"delayed-open":"instant-open":"closed",[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),_.current=!1,h(!0)},[h]),j=v.useCallback(()=>{window.clearTimeout(y.current),h(!1)},[h]),E=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{_.current=!0,h(!0)},g)},[g,h]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(Xg,{...u,children:l.jsx(U3,{scope:t,contentId:m,open:p,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?E():C()},[c.isOpenDelayed,E,C]),onTriggerLeave:v.useCallback(()=>{x?j():window.clearTimeout(y.current)},[j,x]),onOpen:C,onClose:j,disableHoverableContent:x,children:r})})};dC.displayName=Bf;var xm="TooltipTrigger",fC=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Hf(xm,r),o=Yv(xm,r),i=Wf(r),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(Qg,{asChild:!0,...i,children:l.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ce(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ce(e.onBlur,s.onClose),onClick:ce(e.onClick,s.onClose)})})});fC.displayName=xm;var $3="TooltipPortal",[S$,V3]=Vf($3,{forceMount:void 0}),ma="TooltipContent",Kv=v.forwardRef((e,t)=>{const r=V3(ma,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Hf(ma,e.__scopeTooltip);return l.jsx(ur,{present:n||i.open,children:i.disableHoverableContent?l.jsx(hC,{side:s,...o,ref:t}):l.jsx(W3,{side:s,...o,ref:t})})}),W3=v.forwardRef((e,t)=>{const r=Hf(ma,e.__scopeTooltip),n=Yv(ma,e.__scopeTooltip),s=v.useRef(null),o=Ke(t,s),[i,a]=v.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,m=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const _=x.currentTarget,p={x:x.clientX,y:x.clientY},h=Z3(p,_.getBoundingClientRect()),w=K3(p,h),C=G3(g.getBoundingClientRect()),j=X3([...w,...C]);a(j),f(!0)},[f]);return v.useEffect(()=>()=>m(),[m]),v.useEffect(()=>{if(c&&d){const x=_=>y(_,d),g=_=>y(_,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,m]),v.useEffect(()=>{if(i){const x=g=>{const _=g.target,p={x:g.clientX,y:g.clientY},h=(c==null?void 0:c.contains(_))||(d==null?void 0:d.contains(_)),w=!q3(p,i);h?m():w&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,m]),l.jsx(hC,{...e,ref:o})}),[B3,H3]=Vf(Bf,{isInside:!1}),hC=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Hf(ma,r),u=Wf(r),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(ym,d),()=>document.removeEventListener(ym,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=m=>{const y=m.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Na,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Jg,{"data-state":c.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:[l.jsx(zg,{children:n}),l.jsx(B3,{scope:r,isInside:!0,children:l.jsx(L3,{id:c.contentId,role:"tooltip",children:s||n})})]})})});Kv.displayName=ma;var pC="TooltipArrow",Y3=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Wf(r);return H3(pC,r).isInside?null:l.jsx(ev,{...s,...n,ref:t})});Y3.displayName=pC;function Z3(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 K3(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 G3(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 q3(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,c=t[o].y,u=t[i].x,d=t[i].y;c>n!=d>n&&r<(u-a)*(n-c)/(d-c)+a&&(s=!s)}return s}function X3(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),Q3(t)}function Q3(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 J3=Zv,e6=dC,t6=fC,mC=Kv;const r6=J3,gC=e6,vC=t6,yC=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(mC,{ref:n,sideOffset:t,className:ae("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}));yC.displayName=mC.displayName;const Gv=({deployment:e})=>{const t=r=>e.log[r]?e.log[r][e.log[r].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(lA,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(r6,{children:l.jsxs(gC,{children:[l.jsx(vC,{asChild:!0,className:"cursor-pointer",children:l.jsx(g0,{size:16,className:"text-red-700"})}),l.jsx(yC,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(g0,{size:16,className:"text-red-700"})})})},xC=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:ae("mx-auto flex w-full justify-center",e),...t});xC.displayName="Pagination";const wC=v.forwardRef(({className:e,...t},r)=>l.jsx("ul",{ref:r,className:ae("flex flex-row items-center gap-1",e),...t}));wC.displayName="PaginationContent";const wm=v.forwardRef(({className:e,...t},r)=>l.jsx("li",{ref:r,className:ae("",e),...t}));wm.displayName="PaginationItem";const _C=({className:e,isActive:t,size:r="icon",...n})=>l.jsx("a",{"aria-current":t?"page":void 0,className:ae(xf({variant:t?"outline":"ghost",size:r}),e),...n});_C.displayName="PaginationLink";const bC=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:ae("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(dA,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});bC.displayName="PaginationEllipsis";const SC=({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,c,u=1)=>{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(xC,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(wC,{children:i.map((a,c)=>a==="..."?l.jsx(wm,{children:l.jsx(bC,{})},c):l.jsx(wm,{children:l.jsx(_C,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},c))})})})},na=({when:e,children:t,fallback:r})=>e?t:r;var kC="AlertDialog",[n6,k$]=xr(kC,[YS]),Os=YS(),CC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Os(t);return l.jsx(mv,{...n,...r,modal:!0})};CC.displayName=kC;var s6="AlertDialogTrigger",jC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Os(r);return l.jsx(gv,{...s,...n,ref:t})});jC.displayName=s6;var o6="AlertDialogPortal",EC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Os(t);return l.jsx(vv,{...n,...r})};EC.displayName=o6;var i6="AlertDialogOverlay",NC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Os(r);return l.jsx(Ec,{...s,...n,ref:t})});NC.displayName=i6;var sa="AlertDialogContent",[a6,l6]=n6(sa),TC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Os(r),i=v.useRef(null),a=Ke(t,i),c=v.useRef(null);return l.jsx(GI,{contentName:sa,titleName:RC,docsSlug:"alert-dialog",children:l.jsx(a6,{scope:r,cancelRef:c,children:l.jsxs(Nc,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ce(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(zg,{children:n}),l.jsx(u6,{contentRef:i})]})})})});TC.displayName=sa;var RC="AlertDialogTitle",PC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Os(r);return l.jsx(Tc,{...s,...n,ref:t})});PC.displayName=RC;var AC="AlertDialogDescription",DC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Os(r);return l.jsx(Rc,{...s,...n,ref:t})});DC.displayName=AC;var c6="AlertDialogAction",OC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Os(r);return l.jsx(Tf,{...s,...n,ref:t})});OC.displayName=c6;var MC="AlertDialogCancel",IC=v.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=l6(MC,r),o=Os(r),i=Ke(t,s);return l.jsx(Tf,{...o,...n,ref:i})});IC.displayName=MC;var u6=({contentRef:e})=>{const t=`\`${sa}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${sa}\` by passing a \`${AC}\` 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 \`${sa}\`. 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 v.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},d6=CC,f6=jC,h6=EC,LC=NC,FC=TC,zC=OC,UC=IC,$C=PC,VC=DC;const WC=d6,BC=f6,p6=h6,HC=v.forwardRef(({className:e,...t},r)=>l.jsx(LC,{className:ae("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}));HC.displayName=LC.displayName;const qv=v.forwardRef(({className:e,...t},r)=>l.jsxs(p6,{children:[l.jsx(HC,{}),l.jsx(FC,{ref:r,className:ae("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})]}));qv.displayName=FC.displayName;const Xv=({className:e,...t})=>l.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});Xv.displayName="AlertDialogHeader";const Qv=({className:e,...t})=>l.jsx("div",{className:ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qv.displayName="AlertDialogFooter";const Jv=v.forwardRef(({className:e,...t},r)=>l.jsx($C,{ref:r,className:ae("text-lg font-semibold",e),...t}));Jv.displayName=$C.displayName;const ey=v.forwardRef(({className:e,...t},r)=>l.jsx(VC,{ref:r,className:ae("text-sm text-muted-foreground",e),...t}));ey.displayName=VC.displayName;const ty=v.forwardRef(({className:e,...t},r)=>l.jsx(zC,{ref:r,className:ae(xf(),e),...t}));ty.displayName=zC.displayName;const ry=v.forwardRef(({className:e,...t},r)=>l.jsx(UC,{ref:r,className:ae(xf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ry.displayName=UC.displayName;function YC(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ny="Switch",[m6,C$]=xr(ny),[g6,v6]=m6(ny),ZC=v.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,m]=v.useState(null),y=Ke(t,h=>m(h)),x=v.useRef(!1),g=f?!!f.closest("form"):!0,[_=!1,p]=on({prop:s,defaultProp:o,onChange:u});return l.jsxs(g6,{scope:r,checked:_,disabled:a,children:[l.jsx(Re.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":qC(_),"data-disabled":a?"":void 0,disabled:a,value:c,...d,ref:y,onClick:ce(e.onClick,h=>{p(w=>!w),g&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})}),g&&l.jsx(y6,{control:f,bubbles:!x.current,name:n,value:c,checked:_,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});ZC.displayName=ny;var KC="SwitchThumb",GC=v.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=v6(KC,r);return l.jsx(Re.span,{"data-state":qC(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});GC.displayName=KC;var y6=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=v.useRef(null),i=YC(r),a=Sb(t);return v.useEffect(()=>{const c=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(c,r),c.dispatchEvent(m)}},[i,r,n]),l.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 qC(e){return e?"checked":"unchecked"}var XC=ZC,x6=GC;const Lc=v.forwardRef(({className:e,...t},r)=>l.jsx(XC,{className:ae("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:l.jsx(x6,{className:ae("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")})}));Lc.displayName=XC.displayName;var sy="ToastProvider",[oy,w6,_6]=bc("Toast"),[QC,j$]=xr("Toast",[_6]),[b6,Yf]=QC(sy),JC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=v.useState(null),[u,d]=v.useState(0),f=v.useRef(!1),m=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${sy}\`. Expected non-empty \`string\`.`),l.jsx(oy.Provider,{scope:t,children:l.jsx(b6,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:v.useCallback(()=>d(y=>y+1),[]),onToastRemove:v.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:i})})};JC.displayName=sy;var ej="ToastViewport",S6=["F8"],_m="toast.viewportPause",bm="toast.viewportResume",tj=v.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=S6,label:s="Notifications ({hotkey})",...o}=e,i=Yf(ej,r),a=w6(r),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),m=Ke(t,f,i.onViewportChange),y=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;v.useEffect(()=>{const _=p=>{var w;n.every(C=>p[C]||p.code===C)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[n]),v.useEffect(()=>{const _=c.current,p=f.current;if(x&&_&&p){const h=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(_m);p.dispatchEvent(E),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(bm);p.dispatchEvent(E),i.isClosePausedRef.current=!1}},C=E=>{!_.contains(E.relatedTarget)&&w()},j=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",h),_.addEventListener("focusout",C),_.addEventListener("pointermove",h),_.addEventListener("pointerleave",j),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",h),_.removeEventListener("focusout",C),_.removeEventListener("pointermove",h),_.removeEventListener("pointerleave",j),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const g=v.useCallback(({tabbingDirection:_})=>{const h=a().map(w=>{const C=w.ref.current,j=[C,...I6(C)];return _==="forwards"?j:j.reverse()});return(_==="forwards"?h.reverse():h).flat()},[a]);return v.useEffect(()=>{const _=f.current;if(_){const p=h=>{var j,E,R;const w=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!w){const P=document.activeElement,A=h.shiftKey;if(h.target===_&&A){(j=u.current)==null||j.focus();return}const N=g({tabbingDirection:A?"backwards":"forwards"}),F=N.findIndex(b=>b===P);Jh(N.slice(F+1))?h.preventDefault():A?(E=u.current)==null||E.focus():(R=d.current)==null||R.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[a,g]),l.jsxs(yD,{ref:c,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(Sm,{ref:u,onFocusFromOutsideViewport:()=>{const _=g({tabbingDirection:"forwards"});Jh(_)}}),l.jsx(oy.Slot,{scope:r,children:l.jsx(Re.ol,{tabIndex:-1,...o,ref:m})}),x&&l.jsx(Sm,{ref:d,onFocusFromOutsideViewport:()=>{const _=g({tabbingDirection:"backwards"});Jh(_)}})]})});tj.displayName=ej;var rj="ToastFocusProxy",Sm=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Yf(rj,r);return l.jsx(Ic,{"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()}})});Sm.displayName=rj;var Zf="Toast",k6="toast.swipeStart",C6="toast.swipeMove",j6="toast.swipeCancel",E6="toast.swipeEnd",nj=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,c]=on({prop:n,defaultProp:s,onChange:o});return l.jsx(ur,{present:r||a,children:l.jsx(R6,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(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:ce(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:ce(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`),c(!1)})})})});nj.displayName=Zf;var[N6,T6]=QC(Zf,{onClose(){}}),R6=v.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:y,...x}=e,g=Yf(Zf,r),[_,p]=v.useState(null),h=Ke(t,b=>p(b)),w=v.useRef(null),C=v.useRef(null),j=s||g.duration,E=v.useRef(0),R=v.useRef(j),P=v.useRef(0),{onToastAdd:A,onToastRemove:L}=g,q=Dt(()=>{var V;(_==null?void 0:_.contains(document.activeElement))&&((V=g.viewport)==null||V.focus()),i()}),N=v.useCallback(b=>{!b||b===1/0||(window.clearTimeout(P.current),E.current=new Date().getTime(),P.current=window.setTimeout(q,b))},[q]);v.useEffect(()=>{const b=g.viewport;if(b){const V=()=>{N(R.current),u==null||u()},te=()=>{const W=new Date().getTime()-E.current;R.current=R.current-W,window.clearTimeout(P.current),c==null||c()};return b.addEventListener(_m,te),b.addEventListener(bm,V),()=>{b.removeEventListener(_m,te),b.removeEventListener(bm,V)}}},[g.viewport,j,c,u,N]),v.useEffect(()=>{o&&!g.isClosePausedRef.current&&N(j)},[o,j,g.isClosePausedRef,N]),v.useEffect(()=>(A(),()=>L()),[A,L]);const F=v.useMemo(()=>_?uj(_):null,[_]);return g.viewport?l.jsxs(l.Fragment,{children:[F&&l.jsx(P6,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),l.jsx(N6,{scope:r,onClose:q,children:Ns.createPortal(l.jsx(oy.ItemSlot,{scope:r,children:l.jsx(vD,{asChild:!0,onEscapeKeyDown:ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||q(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ce(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ce(e.onPointerDown,b=>{b.button===0&&(w.current={x:b.clientX,y:b.clientY})}),onPointerMove:ce(e.onPointerMove,b=>{if(!w.current)return;const V=b.clientX-w.current.x,te=b.clientY-w.current.y,W=!!C.current,Z=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Q=Z?I(0,V):0,z=Z?0:I(0,te),$=b.pointerType==="touch"?10:2,fe={x:Q,y:z},ne={originalEvent:b,delta:fe};W?(C.current=fe,Su(C6,f,ne,{discrete:!1})):ow(fe,g.swipeDirection,$)?(C.current=fe,Su(k6,d,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs(V)>$||Math.abs(te)>$)&&(w.current=null)}),onPointerUp:ce(e.onPointerUp,b=>{const V=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,w.current=null,V){const W=b.currentTarget,Z={originalEvent:b,delta:V};ow(V,g.swipeDirection,g.swipeThreshold)?Su(E6,y,Z,{discrete:!0}):Su(j6,m,Z,{discrete:!0}),W.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),P6=e=>{const{__scopeToast:t,children:r,...n}=e,s=Yf(Zf,t),[o,i]=v.useState(!1),[a,c]=v.useState(!1);return O6(()=>i(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(kc,{asChild:!0,children:l.jsx(Ic,{...n,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",r]})})})},A6="ToastTitle",sj=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(Re.div,{...n,ref:t})});sj.displayName=A6;var D6="ToastDescription",oj=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(Re.div,{...n,ref:t})});oj.displayName=D6;var ij="ToastAction",aj=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?l.jsx(cj,{altText:r,asChild:!0,children:l.jsx(iy,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ij}\`. Expected non-empty \`string\`.`),null)});aj.displayName=ij;var lj="ToastClose",iy=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=T6(lj,r);return l.jsx(cj,{asChild:!0,children:l.jsx(Re.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,s.onClose)})})});iy.displayName=lj;var cj=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return l.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function uj(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),M6(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(...uj(n))}}),t}function Su(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 ow=(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 O6(e=()=>{}){const t=Dt(e);Jt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function M6(e){return e.nodeType===e.ELEMENT_NODE}function I6(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 Jh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var L6=JC,dj=tj,fj=nj,hj=sj,pj=oj,mj=aj,gj=iy;const F6=L6,vj=v.forwardRef(({className:e,...t},r)=>l.jsx(dj,{ref:r,className:ae("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}));vj.displayName=dj.displayName;const z6=_c("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"}}),yj=v.forwardRef(({className:e,variant:t,...r},n)=>l.jsx(fj,{ref:n,className:ae(z6({variant:t}),e),...r}));yj.displayName=fj.displayName;const U6=v.forwardRef(({className:e,...t},r)=>l.jsx(mj,{ref:r,className:ae("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}));U6.displayName=mj.displayName;const xj=v.forwardRef(({className:e,...t},r)=>l.jsx(gj,{ref:r,className:ae("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:l.jsx(Fg,{className:"h-4 w-4"})}));xj.displayName=gj.displayName;const wj=v.forwardRef(({className:e,...t},r)=>l.jsx(hj,{ref:r,className:ae("text-sm font-semibold",e),...t}));wj.displayName=hj.displayName;const _j=v.forwardRef(({className:e,...t},r)=>l.jsx(pj,{ref:r,className:ae("text-sm opacity-90",e),...t}));_j.displayName=pj.displayName;const $6=1,V6=1e6;let ep=0;function W6(){return ep=(ep+1)%Number.MAX_SAFE_INTEGER,ep.toString()}const tp=new Map,iw=e=>{if(tp.has(e))return;const t=setTimeout(()=>{tp.delete(e),Sl({type:"REMOVE_TOAST",toastId:e})},V6);tp.set(e,t)},B6=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$6)};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?iw(r):e.toasts.forEach(n=>{iw(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)}}},Yu=[];let Zu={toasts:[]};function Sl(e){Zu=B6(Zu,e),Yu.forEach(t=>{t(Zu)})}function H6({...e}){const t=W6(),r=s=>Sl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>Sl({type:"DISMISS_TOAST",toastId:t});return Sl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function qn(){const[e,t]=v.useState(Zu);return v.useEffect(()=>(Yu.push(t),()=>{const r=Yu.indexOf(t);r>-1&&Yu.splice(r,1)}),[e]),{...e,toast:H6,dismiss:r=>Sl({type:"DISMISS_TOAST",toastId:r})}}function ay(){const{toasts:e}=qn();return l.jsxs(F6,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return l.jsxs(yj,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(wj,{children:r}),n&&l.jsx(_j,{children:n})]}),s,l.jsx(xj,{})]},t)}),l.jsx(vj,{})]})}function ku(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 bj={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 ku=="function"&&ku;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 y=s[u]={exports:{}};n[u][0].call(y.exports,function(x){var g=n[u][1][x];return i(g||x)},y,y.exports,r,n,s,o)}return s[u].exports}for(var a=typeof ku=="function"&&ku,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(r,n,s){var o=r("./utils"),i=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,m,y,x,g,_=[],p=0,h=c.length,w=h,C=o.getTypeOf(c)!=="string";p<c.length;)w=h-p,f=C?(u=c[p++],d=p<h?c[p++]:0,p<h?c[p++]:0):(u=c.charCodeAt(p++),d=p<h?c.charCodeAt(p++):0,p<h?c.charCodeAt(p++):0),m=u>>2,y=(3&u)<<4|d>>4,x=1<w?(15&d)<<2|f>>6:64,g=2<w?63&f:64,_.push(a.charAt(m)+a.charAt(y)+a.charAt(x)+a.charAt(g));return _.join("")},s.decode=function(c){var u,d,f,m,y,x,g=0,_=0,p="data:";if(c.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var h,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&w--,c.charAt(c.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|w):new Array(0|w);g<c.length;)u=a.indexOf(c.charAt(g++))<<2|(m=a.indexOf(c.charAt(g++)))>>4,d=(15&m)<<4|(y=a.indexOf(c.charAt(g++)))>>2,f=(3&y)<<6|(x=a.indexOf(c.charAt(g++))),h[_++]=u,y!==64&&(h[_++]=d),x!==64&&(h[_++]=f);return h}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function u(d,f,m,y,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=y,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("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 c("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new c("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,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();n.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,m){var y=i,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^y[255&(u^d[g])];return-1^u}(0|c,a,a.length,0):function(u,d,f,m){var y=i,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^y[255&(u^d.charCodeAt(g))];return-1^u}(0|c,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"),c=r("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,m){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(d,c),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(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.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(y,x){var g,_="";for(g=0;g<x;g++)_+=String.fromCharCode(255&y),y>>>=8;return _}function i(y,x,g,_,p,h){var w,C,j=y.file,E=y.compression,R=h!==u.utf8encode,P=a.transformTo("string",h(j.name)),A=a.transformTo("string",u.utf8encode(j.name)),L=j.comment,q=a.transformTo("string",h(L)),N=a.transformTo("string",u.utf8encode(L)),F=A.length!==j.name.length,b=N.length!==L.length,V="",te="",W="",Z=j.dir,I=j.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};x&&!g||(Q.crc32=y.crc32,Q.compressedSize=y.compressedSize,Q.uncompressedSize=y.uncompressedSize);var z=0;x&&(z|=8),R||!F&&!b||(z|=2048);var $=0,fe=0;Z&&($|=16),p==="UNIX"?(fe=798,$|=function(se,Oe){var he=se;return se||(he=Oe?16893:33204),(65535&he)<<16}(j.unixPermissions,Z)):(fe=20,$|=function(se){return 63&(se||0)}(j.dosPermissions)),w=I.getUTCHours(),w<<=6,w|=I.getUTCMinutes(),w<<=5,w|=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(P),4)+A,V+="up"+o(te.length,2)+te),b&&(W=o(1,1)+o(d(q),4)+N,V+="uc"+o(W.length,2)+W);var ne="";return ne+=`
\0`,ne+=o(z,2),ne+=E.magic,ne+=o(w,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(P.length,2),ne+=o(V.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ne+P+V,dirRecord:f.CENTRAL_FILE_HEADER+o(fe,2)+ne+o(q.length,2)+"\0\0\0\0"+o($,4)+o(_,4)+P+V+q}}var a=r("../utils"),c=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(y,x,g,_){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=_,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,c),m.prototype.push=function(y){var x=y.meta.percent||0,g=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,c.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-_-1))/g:100}}))},m.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var x=this.streamFiles&&!y.file.dir;if(x){var g=i(y,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(y){this.accumulate=!1;var x=this.streamFiles&&!y.file.dir,g=i(y,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(_){return f.DATA_DESCRIPTOR+o(_.crc32,4)+o(_.compressedSize,4)+o(_.uncompressedSize,4)}(y),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 y=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var g=this.bytesWritten-y,_=function(p,h,w,C,j){var E=a.transformTo("string",j(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(p,2)+o(p,2)+o(h,4)+o(w,4)+o(E.length,2)+E}(this.dirRecords.length,g,y,this.zipComment,this.encodeFileName);this.push({data:_,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(y){this._sources.push(y);var x=this;return y.on("data",function(g){x.processChunk(g)}),y.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),y.on("error",function(g){x.error(g)}),this},m.prototype.resume=function(){return!!c.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(y){var x=this._sources;if(!c.prototype.error.call(this,y))return!1;for(var g=0;g<x.length;g++)try{x[g].error(y)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var y=this._sources,x=0;x<y.length;x++)y[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,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{a.forEach(function(m,y){f++;var x=function(h,w){var C=h||w,j=o[C];if(!j)throw new Error(C+" is not a valid compression method !");return j}(y.options.compression,c.compression),g=y.options.compressionOptions||c.compressionOptions||{},_=y.dir,p=y.date;y._compressWorker(x,g).withStreamInfo("file",{name:m,dir:_,date:p,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.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"),c=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new i.Promise(function(y,x){var g=m.decompressed.getContentWorker().pipe(new u);g.on("error",function(_){x(_)}).on("end",function(){g.streamInfo.crc32!==m.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}n.exports=function(m,y){var x=this;return y=o.extend(y||{},{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,y.optimizedBinaryString,y.base64).then(function(g){var _=new c(y);return _.load(g),_}).then(function(g){var _=[i.Promise.resolve(g)],p=g.files;if(y.checkCRC32)for(var h=0;h<p.length;h++)_.push(f(p[h]));return i.Promise.all(_)}).then(function(g){for(var _=g.shift(),p=_.files,h=0;h<p.length;h++){var w=p[h],C=w.fileNameStr,j=o.resolve(w.fileNameStr);x.file(j,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:y.createFolders}),w.dir||(x.file(j).unsafeOriginalName=C)}return _.zipComment.length&&(x.comment=_.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(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.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,c,u){o.call(this,c),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(j,E,R){var P,A=a.getTypeOf(E),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&&(j=p(j)),L.createFolders&&(P=_(j))&&h.call(this,P,!0);var q=A==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!q),(E instanceof f&&E.uncompressedSize===0||L.dir||!E||E.length===0)&&(L.base64=!1,L.binary=!0,E="",L.compression="STORE",A="string");var N=null;N=E instanceof f||E instanceof c?E:x.isNode&&x.isStream(E)?new g(j,E):a.prepareContent(j,E,L.binary,L.optimizedBinaryString,L.base64);var F=new m(j,N,L);this.files[j]=F}var i=r("./utf8"),a=r("./utils"),c=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),y=r("./generate"),x=r("./nodejsUtils"),g=r("./nodejs/NodejsStreamInputAdapter"),_=function(j){j.slice(-1)==="/"&&(j=j.substring(0,j.length-1));var E=j.lastIndexOf("/");return 0<E?j.substring(0,E):""},p=function(j){return j.slice(-1)!=="/"&&(j+="/"),j},h=function(j,E){return E=E!==void 0?E:d.createFolders,j=p(j),this.files[j]||o.call(this,j,null,{dir:!0,createFolders:E}),this.files[j]};function w(j){return Object.prototype.toString.call(j)==="[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(j){var E,R,P;for(E in this.files)P=this.files[E],(R=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&j(R,P)},filter:function(j){var E=[];return this.forEach(function(R,P){j(R,P)&&E.push(P)}),E},file:function(j,E,R){if(arguments.length!==1)return j=this.root+j,o.call(this,j,E,R),this;if(w(j)){var P=j;return this.filter(function(L,q){return!q.dir&&P.test(L)})}var A=this.files[this.root+j];return A&&!A.dir?A:null},folder:function(j){if(!j)return this;if(w(j))return this.filter(function(A,L){return L.dir&&j.test(A)});var E=this.root+j,R=h.call(this,E),P=this.clone();return P.root=R.name,P},remove:function(j){j=this.root+j;var E=this.files[j];if(E||(j.slice(-1)!=="/"&&(j+="/"),E=this.files[j]),E&&!E.dir)delete this.files[j];else for(var R=this.filter(function(A,L){return L.name.slice(0,j.length)===j}),P=0;P<R.length;P++)delete this.files[R[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(j){var E,R={};try{if((R=a.extend(j||{},{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 P=R.comment||this.comment||"";E=y.generateWorker(this,R,P)}catch(A){(E=new c("error")).error(A)}return new u(E,R.type||"string",R.mimeType)},generateAsync:function(j,E){return this.generateInternalStream(j).accumulate(E)},generateNodeStream:function(j,E){return(j=j||{}).type||(j.type="nodebuffer"),this.generateInternalStream(j).toNodejsStream(E)}};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 c=0;c<this.data.length;c++)a[c]=255&a[c]}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=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]===c&&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 c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return c===m[0]&&u===m[1]&&d===m[2]&&f===m[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},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 c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);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 c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},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 c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},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 c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),c=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 c(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(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.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(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.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 c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,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 c=0;c<this._listeners[i].length;c++)this._listeners[i][c].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(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),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"),c=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(_,p){var h=[],w=x._internalType,C=x._outputType,j=x._mimeType;x.on("data",function(E,R){h.push(E),g&&g(R)}).on("error",function(E){h=[],p(E)}).on("end",function(){try{var E=function(R,P,A){switch(R){case"blob":return o.newBlob(o.transformTo("arraybuffer",P),A);case"base64":return c.encode(P);default:return o.transformTo(R,P)}}(C,function(R,P){var A,L=0,q=null,N=0;for(A=0;A<P.length;A++)N+=P[A].length;switch(R){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(q=new Uint8Array(N),A=0;A<P.length;A++)q.set(P[A],L),L+=P[A].length;return q;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+R+"'")}}(w,h),j);_(E)}catch(R){p(R)}h=[]}).resume()})}function y(x,g,_){var p=g;switch(g){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=g,this._mimeType=_,o.checkSupport(p),this._worker=x.pipe(new i(p)),x.lock()}catch(h){this._worker=new a("error"),this._worker.error(h)}}y.prototype={accumulate:function(x){return m(this,x)},on:function(x,g){var _=this;return x==="data"?this._worker.on(x,function(p){g.call(_,p.data,p.meta)}):this._worker.on(x,function(){o.delay(g,arguments,_)}),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=y},{"../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"),c=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(){c.call(this,"utf-8 decode"),this.leftOver=null}function m(){c.call(this,"utf-8 encode")}s.utf8encode=function(y){return i.nodebuffer?a.newBufferFrom(y,"utf-8"):function(x){var g,_,p,h,w,C=x.length,j=0;for(h=0;h<C;h++)(64512&(_=x.charCodeAt(h)))==55296&&h+1<C&&(64512&(p=x.charCodeAt(h+1)))==56320&&(_=65536+(_-55296<<10)+(p-56320),h++),j+=_<128?1:_<2048?2:_<65536?3:4;for(g=i.uint8array?new Uint8Array(j):new Array(j),h=w=0;w<j;h++)(64512&(_=x.charCodeAt(h)))==55296&&h+1<C&&(64512&(p=x.charCodeAt(h+1)))==56320&&(_=65536+(_-55296<<10)+(p-56320),h++),_<128?g[w++]=_:(_<2048?g[w++]=192|_>>>6:(_<65536?g[w++]=224|_>>>12:(g[w++]=240|_>>>18,g[w++]=128|_>>>12&63),g[w++]=128|_>>>6&63),g[w++]=128|63&_);return g}(y)},s.utf8decode=function(y){return i.nodebuffer?o.transformTo("nodebuffer",y).toString("utf-8"):function(x){var g,_,p,h,w=x.length,C=new Array(2*w);for(g=_=0;g<w;)if((p=x[g++])<128)C[_++]=p;else if(4<(h=u[p]))C[_++]=65533,g+=h-1;else{for(p&=h===2?31:h===3?15:7;1<h&&g<w;)p=p<<6|63&x[g++],h--;1<h?C[_++]=65533:p<65536?C[_++]=p:(p-=65536,C[_++]=55296|p>>10&1023,C[_++]=56320|1023&p)}return C.length!==_&&(C.subarray?C=C.subarray(0,_):C.length=_),o.applyFromCharCode(C)}(y=o.transformTo(i.uint8array?"uint8array":"array",y))},o.inherits(f,c),f.prototype.processChunk=function(y){var x=o.transformTo(i.uint8array?"uint8array":"array",y.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 _=function(h,w){var C;for((w=w||h.length)>h.length&&(w=h.length),C=w-1;0<=C&&(192&h[C])==128;)C--;return C<0||C===0?w:C+u[h[C]]>w?C:w}(x),p=x;_!==x.length&&(i.uint8array?(p=x.subarray(0,_),this.leftOver=x.subarray(_,x.length)):(p=x.slice(0,_),this.leftOver=x.slice(_,x.length))),this.push({data:s.utf8decode(p),meta:y.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,c),m.prototype.processChunk=function(y){this.push({data:s.utf8encode(y.data),meta:y.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"),c=r("./external");function u(g){return g}function d(g,_){for(var p=0;p<g.length;++p)_[p]=255&g.charCodeAt(p);return _}r("setimmediate"),s.newBlob=function(g,_){s.checkSupport("blob");try{return new Blob([g],{type:_})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(g),p.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,_,p){var h=[],w=0,C=g.length;if(C<=p)return String.fromCharCode.apply(null,g);for(;w<C;)_==="array"||_==="nodebuffer"?h.push(String.fromCharCode.apply(null,g.slice(w,Math.min(w+p,C)))):h.push(String.fromCharCode.apply(null,g.subarray(w,Math.min(w+p,C)))),w+=p;return h.join("")},stringifyByChar:function(g){for(var _="",p=0;p<g.length;p++)_+=String.fromCharCode(g[p]);return _},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 _=65536,p=s.getTypeOf(g),h=!0;if(p==="uint8array"?h=f.applyCanBeUsed.uint8array:p==="nodebuffer"&&(h=f.applyCanBeUsed.nodebuffer),h)for(;1<_;)try{return f.stringifyByChunk(g,p,_)}catch{_=Math.floor(_/2)}return f.stringifyByChar(g)}function y(g,_){for(var p=0;p<g.length;p++)_[p]=g[p];return _}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 y(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 y(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 y(g,new Array(g.length))},arraybuffer:function(g){return x.nodebuffer.uint8array(g).buffer},uint8array:function(g){return y(g,new Uint8Array(g.length))},nodebuffer:u},s.transformTo=function(g,_){if(_=_||"",!g)return _;s.checkSupport(g);var p=s.getTypeOf(_);return x[p][g](_)},s.resolve=function(g){for(var _=g.split("/"),p=[],h=0;h<_.length;h++){var w=_[h];w==="."||w===""&&h!==0&&h!==_.length-1||(w===".."?p.pop():p.push(w))}return p.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 _,p,h="";for(p=0;p<(g||"").length;p++)h+="\\x"+((_=g.charCodeAt(p))<16?"0":"")+_.toString(16).toUpperCase();return h},s.delay=function(g,_,p){setImmediate(function(){g.apply(p||null,_||[])})},s.inherits=function(g,_){function p(){}p.prototype=_.prototype,g.prototype=new p},s.extend=function(){var g,_,p={};for(g=0;g<arguments.length;g++)for(_ in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],_)&&p[_]===void 0&&(p[_]=arguments[g][_]);return p},s.prepareContent=function(g,_,p,h,w){return c.Promise.resolve(_).then(function(C){return o.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new c.Promise(function(j,E){var R=new FileReader;R.onload=function(P){j(P.target.result)},R.onerror=function(P){E(P.target.error)},R.readAsArrayBuffer(C)}):C}).then(function(C){var j=s.getTypeOf(C);return j?(j==="arraybuffer"?C=s.transformTo("uint8array",C):j==="string"&&(w?C=i.decode(C):p&&h!==!0&&(C=function(E){return d(E,o.uint8array?new Uint8Array(E.length):new Array(E.length))}(C))),C):c.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"),c=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 y=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===m;return this.reader.setIndex(y),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",y=i.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(y)},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,y,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),m=this.reader.readInt(4),y=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:y}},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 c({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 y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var x=m-y;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"),c=r("./crc32"),u=r("./utf8"),d=r("./compressions"),f=r("./support");function m(y,x){this.options=y,this.loadOptions=x}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var x,g;if(y.skip(22),this.fileNameLength=y.readInt(2),g=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.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(_){for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&d[p].magic===_)return d[p];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,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var x=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(x),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var x,g,_,p=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<p;)x=y.readInt(2),g=y.readInt(2),_=y.readData(g),this.extraFields[x]={id:x,length:g,value:_};y.setIndex(p)},handleUTF8:function(){var y=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(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var p=i.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var x=o(y.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var x=o(y.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(y.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,_){this.name=x,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=g,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var i=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),c=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");o.prototype={internalStream:function(x){var g=null,_="string";try{if(!x)throw new Error("No output type specified.");var p=(_=x.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),g=this._decompressWorker();var h=!this._dataBinary;h&&!p&&(g=g.pipe(new c.Utf8EncodeWorker)),!h&&p&&(g=g.pipe(new c.Utf8DecodeWorker))}catch(w){(g=new d("error")).error(w)}return new i(g,_,"")},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 _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(_,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.")},y=0;y<f.length;y++)o.prototype[f[y]]=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,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(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 y=[];function x(){var g,_;a=!0;for(var p=y.length;p;){for(_=y,y=[],g=-1;++g<p;)_[g]();p=y.length}a=!1}n.exports=function(g){y.push(g)!==1||a||i()}}).call(this,typeof Kc<"u"?Kc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var o=r("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,p!==i&&g(this,p)}function m(p,h,w){this.promise=p,typeof h=="function"&&(this.onFulfilled=h,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function y(p,h,w){o(function(){var C;try{C=h(w)}catch(j){return a.reject(p,j)}C===p?a.reject(p,new TypeError("Cannot resolve promise with itself")):a.resolve(p,C)})}function x(p){var h=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof h=="function")return function(){h.apply(p,arguments)}}function g(p,h){var w=!1;function C(R){w||(w=!0,a.reject(p,R))}function j(R){w||(w=!0,a.resolve(p,R))}var E=_(function(){h(j,C)});E.status==="error"&&C(E.value)}function _(p,h){var w={};try{w.value=p(h),w.status="success"}catch(C){w.status="error",w.value=C}return w}(n.exports=f).prototype.finally=function(p){if(typeof p!="function")return this;var h=this.constructor;return this.then(function(w){return h.resolve(p()).then(function(){return w})},function(w){return h.resolve(p()).then(function(){throw w})})},f.prototype.catch=function(p){return this.then(null,p)},f.prototype.then=function(p,h){if(typeof p!="function"&&this.state===u||typeof h!="function"&&this.state===c)return this;var w=new this.constructor(i);return this.state!==d?y(w,this.state===u?p:h,this.outcome):this.queue.push(new m(w,p,h)),w},m.prototype.callFulfilled=function(p){a.resolve(this.promise,p)},m.prototype.otherCallFulfilled=function(p){y(this.promise,this.onFulfilled,p)},m.prototype.callRejected=function(p){a.reject(this.promise,p)},m.prototype.otherCallRejected=function(p){y(this.promise,this.onRejected,p)},a.resolve=function(p,h){var w=_(x,h);if(w.status==="error")return a.reject(p,w.value);var C=w.value;if(C)g(p,C);else{p.state=u,p.outcome=h;for(var j=-1,E=p.queue.length;++j<E;)p.queue[j].callFulfilled(h)}return p},a.reject=function(p,h){p.state=c,p.outcome=h;for(var w=-1,C=p.queue.length;++w<C;)p.queue[w].callRejected(h);return p},f.resolve=function(p){return p instanceof this?p:a.resolve(new this(i),p)},f.reject=function(p){var h=new this(i);return a.reject(h,p)},f.all=function(p){var h=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=p.length,C=!1;if(!w)return this.resolve([]);for(var j=new Array(w),E=0,R=-1,P=new this(i);++R<w;)A(p[R],R);return P;function A(L,q){h.resolve(L).then(function(N){j[q]=N,++E!==w||C||(C=!0,a.resolve(P,j))},function(N){C||(C=!0,a.reject(P,N))})}},f.race=function(p){var h=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=p.length,C=!1;if(!w)return this.resolve([]);for(var j=-1,E=new this(i);++j<w;)R=p[j],h.resolve(R).then(function(P){C||(C=!0,a.resolve(E,P))},function(P){C||(C=!0,a.reject(E,P))});var R;return E}},{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"),c=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,y=0,x=8;function g(p){if(!(this instanceof g))return new g(p);this.options=i.assign({level:m,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},p||{});var h=this.options;h.raw&&0<h.windowBits?h.windowBits=-h.windowBits:h.gzip&&0<h.windowBits&&h.windowBits<16&&(h.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var w=o.deflateInit2(this.strm,h.level,h.method,h.windowBits,h.memLevel,h.strategy);if(w!==f)throw new Error(c[w]);if(h.header&&o.deflateSetHeader(this.strm,h.header),h.dictionary){var C;if(C=typeof h.dictionary=="string"?a.string2buf(h.dictionary):d.call(h.dictionary)==="[object ArrayBuffer]"?new Uint8Array(h.dictionary):h.dictionary,(w=o.deflateSetDictionary(this.strm,C))!==f)throw new Error(c[w]);this._dict_set=!0}}function _(p,h){var w=new g(h);if(w.push(p,!0),w.err)throw w.msg||c[w.err];return w.result}g.prototype.push=function(p,h){var w,C,j=this.strm,E=this.options.chunkSize;if(this.ended)return!1;C=h===~~h?h:h===!0?4:0,typeof p=="string"?j.input=a.string2buf(p):d.call(p)==="[object ArrayBuffer]"?j.input=new Uint8Array(p):j.input=p,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new i.Buf8(E),j.next_out=0,j.avail_out=E),(w=o.deflate(j,C))!==1&&w!==f)return this.onEnd(w),!(this.ended=!0);j.avail_out!==0&&(j.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(j.output,j.next_out))):this.onData(i.shrinkBuf(j.output,j.next_out)))}while((0<j.avail_in||j.avail_out===0)&&w!==1);return C===4?(w=o.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===f):C!==2||(this.onEnd(f),!(j.avail_out=0))},g.prototype.onData=function(p){this.chunks.push(p)},g.prototype.onEnd=function(p){p===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Deflate=g,s.deflate=_,s.deflateRaw=function(p,h){return(h=h||{}).raw=!0,_(p,h)},s.gzip=function(p,h){return(h=h||{}).gzip=!0,_(p,h)}},{"./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"),c=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function y(g){if(!(this instanceof y))return new y(g);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},g||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||g&&g.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&!(15&_.windowBits)&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var p=o.inflateInit2(this.strm,_.windowBits);if(p!==c.Z_OK)throw new Error(u[p]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(g,_){var p=new y(_);if(p.push(g,!0),p.err)throw p.msg||u[p.err];return p.result}y.prototype.push=function(g,_){var p,h,w,C,j,E,R=this.strm,P=this.options.chunkSize,A=this.options.dictionary,L=!1;if(this.ended)return!1;h=_===~~_?_:_===!0?c.Z_FINISH:c.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(P),R.next_out=0,R.avail_out=P),(p=o.inflate(R,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(E=typeof A=="string"?a.string2buf(A):m.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,p=o.inflateSetDictionary(this.strm,E)),p===c.Z_BUF_ERROR&&L===!0&&(p=c.Z_OK,L=!1),p!==c.Z_STREAM_END&&p!==c.Z_OK)return this.onEnd(p),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&p!==c.Z_STREAM_END&&(R.avail_in!==0||h!==c.Z_FINISH&&h!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(R.output,R.next_out),C=R.next_out-w,j=a.buf2string(R.output,w),R.next_out=C,R.avail_out=P-C,C&&i.arraySet(R.output,R.output,w,C,0),this.onData(j)):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)&&p!==c.Z_STREAM_END);return p===c.Z_STREAM_END&&(h=c.Z_FINISH),h===c.Z_FINISH?(p=o.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===c.Z_OK):h!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(R.avail_out=0))},y.prototype.onData=function(g){this.chunks.push(g)},y.prototype.onEnd=function(g){g===c.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=y,s.inflate=x,s.inflateRaw=function(g,_){return(_=_||{}).raw=!0,x(g,_)},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(c){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)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,m){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),m);else for(var y=0;y<f;y++)c[m+y]=u[d+y]},flattenChunks:function(c){var u,d,f,m,y,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=m=0,d=c.length;u<d;u++)y=c[u],x.set(y,m),m+=y.length;return x}},a={arraySet:function(c,u,d,f,m){for(var y=0;y<f;y++)c[m+y]=u[d+y]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(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 c=new o.Buf8(256),u=0;u<256;u++)c[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 y="",x=0;x<m;x++)y+=String.fromCharCode(f[x]);return y}c[254]=c[254]=1,s.string2buf=function(f){var m,y,x,g,_,p=f.length,h=0;for(g=0;g<p;g++)(64512&(y=f.charCodeAt(g)))==55296&&g+1<p&&(64512&(x=f.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),g++),h+=y<128?1:y<2048?2:y<65536?3:4;for(m=new o.Buf8(h),g=_=0;_<h;g++)(64512&(y=f.charCodeAt(g)))==55296&&g+1<p&&(64512&(x=f.charCodeAt(g+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),g++),y<128?m[_++]=y:(y<2048?m[_++]=192|y>>>6:(y<65536?m[_++]=224|y>>>12:(m[_++]=240|y>>>18,m[_++]=128|y>>>12&63),m[_++]=128|y>>>6&63),m[_++]=128|63&y);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new o.Buf8(f.length),y=0,x=m.length;y<x;y++)m[y]=f.charCodeAt(y);return m},s.buf2string=function(f,m){var y,x,g,_,p=m||f.length,h=new Array(2*p);for(y=x=0;y<p;)if((g=f[y++])<128)h[x++]=g;else if(4<(_=c[g]))h[x++]=65533,y+=_-1;else{for(g&=_===2?31:_===3?15:7;1<_&&y<p;)g=g<<6|63&f[y++],_--;1<_?h[x++]=65533:g<65536?h[x++]=g:(g-=65536,h[x++]=55296|g>>10&1023,h[x++]=56320|1023&g)}return d(h,x)},s.utf8border=function(f,m){var y;for((m=m||f.length)>f.length&&(m=f.length),y=m-1;0<=y&&(192&f[y])==128;)y--;return y<0||y===0?m:y+c[f[y]]>m?y:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,c){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[c++]|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=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a}();n.exports=function(i,a,c,u){var d=o,f=u+c;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"),c=r("./adler32"),u=r("./crc32"),d=r("./messages"),f=0,m=4,y=0,x=-2,g=-1,_=4,p=2,h=8,w=9,C=286,j=30,E=19,R=2*C+1,P=15,A=3,L=258,q=L+A+1,N=42,F=113,b=1,V=2,te=3,W=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 $(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 fe(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,D,S=k.max_chain_length,T=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,me=k.strstart+L,Ye=H[T+O-1],Ue=H[T+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(K=J)+O]===Ue&&H[K+O-1]===Ye&&H[K]===H[T]&&H[++K]===H[T+1]){T+=2,K++;do;while(H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&H[++T]===H[++K]&&T<me);if(D=L-(me-T),T=me-L,O<D){if(k.match_start=J,Y<=(O=D))break;Ye=H[T+O-1],Ue=H[T+O]}}while((J=ee[J&X])>M&&--S!=0);return O<=k.lookahead?O:k.lookahead}function Oe(k){var J,K,D,S,T,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;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--K;);for(J=K=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-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=c(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>=A)for(T=k.strstart-k.insert,k.ins_h=k.window[T],k.ins_h=(k.ins_h<<k.hash_shift^k.window[T+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[T+A-1])&k.hash_mask,k.prev[T&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=T,T++,k.insert--,!(k.lookahead+k.insert<A)););}while(k.lookahead<q&&k.strm.avail_in!==0)}function he(k,J){for(var K,D;;){if(k.lookahead<q){if(Oe(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-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>=A)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-A),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=A){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-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 D=a._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(D&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=k.strstart<A-1?k.strstart:A-1,J===m?($(k,!0),k.strm.avail_out===0?te:W):k.last_lit&&($(k,!1),k.strm.avail_out===0)?b:V}function ye(k,J){for(var K,D,S;;){if(k.lookahead<q){if(Oe(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-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=A-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===A&&4096<k.strstart-k.match_start)&&(k.match_length=A-1)),k.prev_length>=A&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-A,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-A),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+A-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=A-1,k.strstart++,D&&($(k,!1),k.strm.avail_out===0))return b}else if(k.match_available){if((D=a._tr_tally(k,0,k.window[k.strstart-1]))&&$(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&&(D=a._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<A-1?k.strstart:A-1,J===m?($(k,!0),k.strm.avail_out===0?te:W):k.last_lit&&($(k,!1),k.strm.avail_out===0)?b:V}function ke(k,J,K,D,S){this.good_length=k,this.max_lazy=J,this.nice_length=K,this.max_chain=D,this.func=S}function Fe(){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=h,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*j+1)),this.bl_tree=new i.Buf16(2*(2*E+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(P+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 Me(k){var J;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=p,(J=k.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?N:F,k.adler=J.wrap===2?0:1,J.last_flush=f,a._tr_init(J),y):Z(k,x)}function Pe(k){var J=Me(k);return J===y&&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=A-1,K.match_available=0,K.ins_h=0}(k.state),J}function nt(k,J,K,D,S,T){if(!k)return x;var O=1;if(J===g&&(J=6),D<0?(O=0,D=-D):15<D&&(O=2,D-=16),S<1||w<S||K!==h||D<8||15<D||J<0||9<J||T<0||_<T)return Z(k,x);D===8&&(D=9);var Y=new Fe;return(k.state=Y).strm=k,Y.wrap=O,Y.gzhead=null,Y.w_bits=D,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+A-1)/A),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=T,Y.method=K,Pe(k)}o=[new ke(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(Oe(k),k.lookahead===0&&J===f)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+K;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&($(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?($(k,!0),k.strm.avail_out===0?te:W):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),b)}),new ke(4,4,8,4,he),new ke(4,5,16,8,he),new ke(4,6,32,32,he),new ke(4,4,16,16,ye),new ke(8,16,32,32,ye),new ke(8,16,128,128,ye),new ke(8,32,128,256,ye),new ke(32,128,258,1024,ye),new ke(32,258,258,4096,ye)],s.deflateInit=function(k,J){return nt(k,J,h,15,8,0)},s.deflateInit2=nt,s.deflateReset=Pe,s.deflateResetKeep=Me,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?x:(k.state.gzhead=J,y):x},s.deflate=function(k,J){var K,D,S,T;if(!k||!k.state||5<J||J<0)return k?Z(k,x):x;if(D=k.state,!k.output||!k.input&&k.avail_in!==0||D.status===666&&J!==m)return Z(k,k.avail_out===0?-5:x);if(D.strm=k,K=D.last_flush,D.last_flush=J,D.status===N)if(D.wrap===2)k.adler=0,fe(D,31),fe(D,139),fe(D,8),D.gzhead?(fe(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),fe(D,255&D.gzhead.time),fe(D,D.gzhead.time>>8&255),fe(D,D.gzhead.time>>16&255),fe(D,D.gzhead.time>>24&255),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(fe(D,255&D.gzhead.extra.length),fe(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=u(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,3),D.status=F);else{var O=h+(D.w_bits-8<<4)<<8;O|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(O|=32),O+=31-O%31,D.status=F,ne(D,O),D.strstart!==0&&(ne(D,k.adler>>>16),ne(D,65535&k.adler)),k.adler=1}if(D.status===69)if(D.gzhead.extra){for(S=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)fe(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){T=1;break}T=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,fe(D,T)}while(T!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),T===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){S=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending===D.pending_buf_size)){T=1;break}T=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,fe(D,T)}while(T!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),T===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&z(k),D.pending+2<=D.pending_buf_size&&(fe(D,255&k.adler),fe(D,k.adler>>8&255),k.adler=0,D.status=F)):D.status=F),D.pending!==0){if(z(k),k.avail_out===0)return D.last_flush=-1,y}else if(k.avail_in===0&&I(J)<=I(K)&&J!==m)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(k,-5);if(k.avail_in!==0||D.lookahead!==0||J!==f&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Oe(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&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):D.strategy===3?function(M,H){for(var X,ee,me,Ye,Ue=M.window;;){if(M.lookahead<=L){if(Oe(M),M.lookahead<=L&&H===f)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=A&&0<M.strstart&&(ee=Ue[me=M.strstart-1])===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]){Ye=M.strstart+L;do;while(ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&ee===Ue[++me]&&me<Ye);M.match_length=L-(Ye-me),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=A?(X=a._tr_tally(M,1,M.match_length-A),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&&($(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?($(M,!0),M.strm.avail_out===0?te:W):M.last_lit&&($(M,!1),M.strm.avail_out===0)?b:V}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==W||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),y;if(Y===V&&(J===1?a._tr_align(D):J!==5&&(a._tr_stored_block(D,0,0,!1),J===3&&(Q(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),z(k),k.avail_out===0))return D.last_flush=-1,y}return J!==m?y:D.wrap<=0?1:(D.wrap===2?(fe(D,255&k.adler),fe(D,k.adler>>8&255),fe(D,k.adler>>16&255),fe(D,k.adler>>24&255),fe(D,255&k.total_in),fe(D,k.total_in>>8&255),fe(D,k.total_in>>16&255),fe(D,k.total_in>>24&255)):(ne(D,k.adler>>>16),ne(D,65535&k.adler)),z(k),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?y:1)},s.deflateEnd=function(k){var J;return k&&k.state?(J=k.state.status)!==N&&J!==69&&J!==73&&J!==91&&J!==103&&J!==F&&J!==666?Z(k,x):(k.state=null,J===F?Z(k,-3):y):x},s.deflateSetDictionary=function(k,J){var K,D,S,T,O,Y,M,H,X=J.length;if(!k||!k.state||(T=(K=k.state).wrap)===2||T===1&&K.status!==N||K.lookahead)return x;for(T===1&&(k.adler=c(k.adler,J,X,0)),K.wrap=0,X>=K.w_size&&(T===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,Oe(K);K.lookahead>=A;){for(D=K.strstart,S=K.lookahead-(A-1);K.ins_h=(K.ins_h<<K.hash_shift^K.window[D+A-1])&K.hash_mask,K.prev[D&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=D,D++,--S;);K.strstart=D,K.lookahead=A-1,Oe(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=A-1,K.match_available=0,k.next_in=Y,k.input=M,k.avail_in=O,K.wrap=T,y},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,c,u,d,f,m,y,x,g,_,p,h,w,C,j,E,R,P,A,L,q,N,F,b,V;a=o.state,c=o.next_in,b=o.input,u=c+(o.avail_in-5),d=o.next_out,V=o.output,f=d-(i-o.avail_out),m=d+(o.avail_out-257),y=a.dmax,x=a.wsize,g=a.whave,_=a.wnext,p=a.window,h=a.hold,w=a.bits,C=a.lencode,j=a.distcode,E=(1<<a.lenbits)-1,R=(1<<a.distbits)-1;e:do{w<15&&(h+=b[c++]<<w,w+=8,h+=b[c++]<<w,w+=8),P=C[h&E];t:for(;;){if(h>>>=A=P>>>24,w-=A,(A=P>>>16&255)===0)V[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=C[(65535&P)+(h&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}L=65535&P,(A&=15)&&(w<A&&(h+=b[c++]<<w,w+=8),L+=h&(1<<A)-1,h>>>=A,w-=A),w<15&&(h+=b[c++]<<w,w+=8,h+=b[c++]<<w,w+=8),P=j[h&R];r:for(;;){if(h>>>=A=P>>>24,w-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=j[(65535&P)+(h&(1<<A)-1)];continue r}o.msg="invalid distance code",a.mode=30;break e}if(q=65535&P,w<(A&=15)&&(h+=b[c++]<<w,(w+=8)<A&&(h+=b[c++]<<w,w+=8)),y<(q+=h&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(h>>>=A,w-=A,(A=d-f)<q){if(g<(A=q-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(F=p,(N=0)===_){if(N+=x-A,A<L){for(L-=A;V[d++]=p[N++],--A;);N=d-q,F=V}}else if(_<A){if(N+=x+_-A,(A-=_)<L){for(L-=A;V[d++]=p[N++],--A;);if(N=0,_<L){for(L-=A=_;V[d++]=p[N++],--A;);N=d-q,F=V}}}else if(N+=_-A,A<L){for(L-=A;V[d++]=p[N++],--A;);N=d-q,F=V}for(;2<L;)V[d++]=F[N++],V[d++]=F[N++],V[d++]=F[N++],L-=3;L&&(V[d++]=F[N++],1<L&&(V[d++]=F[N++]))}else{for(N=d-q;V[d++]=V[N++],V[d++]=V[N++],V[d++]=V[N++],2<(L-=3););L&&(V[d++]=V[N++],1<L&&(V[d++]=V[N++]))}break}}break}}while(c<u&&d<m);c-=L=w>>3,h&=(1<<(w-=L<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<m?m-d+257:257-(d-m),a.hold=h,a.bits=w}},{}],49:[function(r,n,s){var o=r("../utils/common"),i=r("./adler32"),a=r("./crc32"),c=r("./inffast"),u=r("./inftrees"),d=1,f=2,m=0,y=-2,x=1,g=852,_=592;function p(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function h(){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 w(N){var F;return N&&N.state?(F=N.state,N.total_in=N.total_out=F.total=0,N.msg="",F.wrap&&(N.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(_),F.sane=1,F.back=-1,m):y}function C(N){var F;return N&&N.state?((F=N.state).wsize=0,F.whave=0,F.wnext=0,w(N)):y}function j(N,F){var b,V;return N&&N.state?(V=N.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?y:(V.window!==null&&V.wbits!==F&&(V.window=null),V.wrap=b,V.wbits=F,C(N))):y}function E(N,F){var b,V;return N?(V=new h,(N.state=V).window=null,(b=j(N,F))!==m&&(N.state=null),b):y}var R,P,A=!0;function L(N){if(A){var F;for(R=new o.Buf32(512),P=new o.Buf32(32),F=0;F<144;)N.lens[F++]=8;for(;F<256;)N.lens[F++]=9;for(;F<280;)N.lens[F++]=7;for(;F<288;)N.lens[F++]=8;for(u(d,N.lens,0,288,R,0,N.work,{bits:9}),F=0;F<32;)N.lens[F++]=5;u(f,N.lens,0,32,P,0,N.work,{bits:5}),A=!1}N.lencode=R,N.lenbits=9,N.distcode=P,N.distbits=5}function q(N,F,b,V){var te,W=N.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new o.Buf8(W.wsize)),V>=W.wsize?(o.arraySet(W.window,F,b-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(V<(te=W.wsize-W.wnext)&&(te=V),o.arraySet(W.window,F,b-V,te,W.wnext),(V-=te)?(o.arraySet(W.window,F,b-V,V,0),W.wnext=V,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=te))),0}s.inflateReset=C,s.inflateReset2=j,s.inflateResetKeep=w,s.inflateInit=function(N){return E(N,15)},s.inflateInit2=E,s.inflate=function(N,F){var b,V,te,W,Z,I,Q,z,$,fe,ne,se,Oe,he,ye,ke,Fe,Me,Pe,nt,k,J,K,D,S=0,T=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(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return y;(b=N.state).mode===12&&(b.mode=13),Z=N.next_out,te=N.output,Q=N.avail_out,W=N.next_in,V=N.input,I=N.avail_in,z=b.hold,$=b.bits,fe=I,ne=Q,J=m;e:for(;;)switch(b.mode){case x:if(b.wrap===0){b.mode=13;break}for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(2&b.wrap&&z===35615){T[b.check=0]=255&z,T[1]=z>>>8&255,b.check=a(b.check,T,2,0),$=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){N.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){N.msg="unknown compression method",b.mode=30;break}if($-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){N.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,N.adler=b.check=1,b.mode=512&z?10:12,$=z=0;break;case 2:for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(b.flags=z,(255&b.flags)!=8){N.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){N.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=z>>8&1),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=a(b.check,T,2,0)),$=z=0,b.mode=3;case 3:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.time=z),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,T[2]=z>>>16&255,T[3]=z>>>24&255,b.check=a(b.check,T,4,0)),$=z=0,b.mode=4;case 4:for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=a(b.check,T,2,0)),$=z=0,b.mode=5;case 5:if(1024&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(T[0]=255&z,T[1]=z>>>8&255,b.check=a(b.check,T,2,0)),$=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,V,W,se,k)),512&b.flags&&(b.check=a(b.check,V,se,W)),I-=se,W+=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=V[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,V,se,W)),I-=se,W+=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=V[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,V,se,W)),I-=se,W+=se,k)break e}else b.head&&(b.head.comment=null);b.mode=9;case 9:if(512&b.flags){for(;$<16;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(z!==(65535&b.check)){N.msg="header crc mismatch",b.mode=30;break}$=z=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),N.adler=b.check=0,b.mode=12;break;case 10:for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}N.adler=b.check=p(z),$=z=0,b.mode=11;case 11:if(b.havedict===0)return N.next_out=Z,N.avail_out=Q,N.next_in=W,N.avail_in=I,b.hold=z,b.bits=$,2;N.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&$,$-=7&$,b.mode=27;break}for(;$<3;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}switch(b.last=1&z,$-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,$-=2;break e;case 2:b.mode=17;break;case 3:N.msg="invalid block type",b.mode=30}z>>>=2,$-=2;break;case 14:for(z>>>=7&$,$-=7&$;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if((65535&z)!=(z>>>16^65535)){N.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,$=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,V,W,se,Z),I-=se,W+=se,Q-=se,Z+=se,b.length-=se;break}b.mode=12;break;case 17:for(;$<14;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(b.nlen=257+(31&z),z>>>=5,$-=5,b.ndist=1+(31&z),z>>>=5,$-=5,b.ncode=4+(15&z),z>>>=4,$-=4,286<b.nlen||30<b.ndist){N.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(;$<3;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.lens[O[b.have++]]=7&z,z>>>=3,$-=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){N.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(;ke=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(Fe<16)z>>>=ye,$-=ye,b.lens[b.have++]=Fe;else{if(Fe===16){for(D=ye+2;$<D;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(z>>>=ye,$-=ye,b.have===0){N.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,$-=2}else if(Fe===17){for(D=ye+3;$<D;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}$-=ye,k=0,se=3+(7&(z>>>=ye)),z>>>=3,$-=3}else{for(D=ye+7;$<D;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}$-=ye,k=0,se=11+(127&(z>>>=ye)),z>>>=7,$-=7}if(b.have+se>b.nlen+b.ndist){N.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){N.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){N.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){N.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){N.next_out=Z,N.avail_out=Q,N.next_in=W,N.avail_in=I,b.hold=z,b.bits=$,c(N,ne),Z=N.next_out,te=N.output,Q=N.avail_out,W=N.next_in,V=N.input,I=N.avail_in,z=b.hold,$=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;ke=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(ke&&!(240&ke)){for(Me=ye,Pe=ke,nt=Fe;ke=(S=b.lencode[nt+((z&(1<<Me+Pe)-1)>>Me)])>>>16&255,Fe=65535&S,!(Me+(ye=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Me,$-=Me,b.back+=Me}if(z>>>=ye,$-=ye,b.back+=ye,b.length=Fe,ke===0){b.mode=26;break}if(32&ke){b.back=-1,b.mode=12;break}if(64&ke){N.msg="invalid literal/length code",b.mode=30;break}b.extra=15&ke,b.mode=22;case 22:if(b.extra){for(D=b.extra;$<D;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.length+=z&(1<<b.extra)-1,z>>>=b.extra,$-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;ke=(S=b.distcode[z&(1<<b.distbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(!(240&ke)){for(Me=ye,Pe=ke,nt=Fe;ke=(S=b.distcode[nt+((z&(1<<Me+Pe)-1)>>Me)])>>>16&255,Fe=65535&S,!(Me+(ye=S>>>24)<=$);){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}z>>>=Me,$-=Me,b.back+=Me}if(z>>>=ye,$-=ye,b.back+=ye,64&ke){N.msg="invalid distance code",b.mode=30;break}b.offset=Fe,b.extra=15&ke,b.mode=24;case 24:if(b.extra){for(D=b.extra;$<D;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}b.offset+=z&(1<<b.extra)-1,z>>>=b.extra,$-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){N.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){N.msg="invalid distance too far back",b.mode=30;break}Oe=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),he=b.window}else he=te,Oe=Z-b.offset,se=b.length;for(Q<se&&(se=Q),Q-=se,b.length-=se;te[Z++]=he[Oe++],--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(;$<32;){if(I===0)break e;I--,z|=V[W++]<<$,$+=8}if(ne-=Q,N.total_out+=ne,b.total+=ne,ne&&(N.adler=b.check=b.flags?a(b.check,te,ne,Z-ne):i(b.check,te,ne,Z-ne)),ne=Q,(b.flags?z:p(z))!==b.check){N.msg="incorrect data check",b.mode=30;break}$=z=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;$<32;){if(I===0)break e;I--,z+=V[W++]<<$,$+=8}if(z!==(4294967295&b.total)){N.msg="incorrect length check",b.mode=30;break}$=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 y}return N.next_out=Z,N.avail_out=Q,N.next_in=W,N.avail_in=I,b.hold=z,b.bits=$,(b.wsize||ne!==N.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&q(N,N.output,N.next_out,ne-N.avail_out)?(b.mode=31,-4):(fe-=N.avail_in,ne-=N.avail_out,N.total_in+=fe,N.total_out+=ne,b.total+=ne,b.wrap&&ne&&(N.adler=b.check=b.flags?a(b.check,te,ne,N.next_out-ne):i(b.check,te,ne,N.next_out-ne)),N.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(fe==0&&ne===0||F===4)&&J===m&&(J=-5),J)},s.inflateEnd=function(N){if(!N||!N.state)return y;var F=N.state;return F.window&&(F.window=null),N.state=null,m},s.inflateGetHeader=function(N,F){var b;return N&&N.state&&2&(b=N.state).wrap?((b.head=F).done=!1,m):y},s.inflateSetDictionary=function(N,F){var b,V=F.length;return N&&N.state?(b=N.state).wrap!==0&&b.mode!==11?y:b.mode===11&&i(1,F,V,0)!==b.check?-3:q(N,F,V,V)?(b.mode=31,-4):(b.havedict=1,m):y},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],c=[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,y,x,g,_,p){var h,w,C,j,E,R,P,A,L,q=p.bits,N=0,F=0,b=0,V=0,te=0,W=0,Z=0,I=0,Q=0,z=0,$=null,fe=0,ne=new o.Buf16(16),se=new o.Buf16(16),Oe=null,he=0;for(N=0;N<=15;N++)ne[N]=0;for(F=0;F<y;F++)ne[f[m+F]]++;for(te=q,V=15;1<=V&&ne[V]===0;V--);if(V<te&&(te=V),V===0)return x[g++]=20971520,x[g++]=20971520,p.bits=1,0;for(b=1;b<V&&ne[b]===0;b++);for(te<b&&(te=b),N=I=1;N<=15;N++)if(I<<=1,(I-=ne[N])<0)return-1;if(0<I&&(d===0||V!==1))return-1;for(se[1]=0,N=1;N<15;N++)se[N+1]=se[N]+ne[N];for(F=0;F<y;F++)f[m+F]!==0&&(_[se[f[m+F]]++]=F);if(R=d===0?($=Oe=_,19):d===1?($=i,fe-=257,Oe=a,he-=257,256):($=c,Oe=u,-1),N=b,E=g,Z=F=z=0,C=-1,j=(Q=1<<(W=te))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(P=N-Z,L=_[F]<R?(A=0,_[F]):_[F]>R?(A=Oe[he+_[F]],$[fe+_[F]]):(A=96,0),h=1<<N-Z,b=w=1<<W;x[E+(z>>Z)+(w-=h)]=P<<24|A<<16|L|0,w!==0;);for(h=1<<N-1;z&h;)h>>=1;if(h!==0?(z&=h-1,z+=h):z=0,F++,--ne[N]==0){if(N===V)break;N=f[m+_[F]]}if(te<N&&(z&j)!==C){for(Z===0&&(Z=te),E+=b,I=1<<(W=N-Z);W+Z<V&&!((I-=ne[W+Z])<=0);)W++,I<<=1;if(Q+=1<<W,d===1&&852<Q||d===2&&592<Q)return 1;x[C=z&j]=te<<24|W<<16|E-g|0}}return z!==0&&(x[E+z]=N-Z<<24|64<<16|0),p.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 c(S){for(var T=S.length;0<=--T;)S[T]=0}var u=0,d=29,f=256,m=f+1+d,y=30,x=19,g=2*m+1,_=15,p=16,h=7,w=256,C=16,j=17,E=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],P=[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],A=[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));c(q);var N=new Array(2*y);c(N);var F=new Array(512);c(F);var b=new Array(256);c(b);var V=new Array(d);c(V);var te,W,Z,I=new Array(y);function Q(S,T,O,Y,M){this.static_tree=S,this.extra_bits=T,this.extra_base=O,this.elems=Y,this.max_length=M,this.has_stree=S&&S.length}function z(S,T){this.dyn_tree=S,this.max_code=0,this.stat_desc=T}function $(S){return S<256?F[S]:F[256+(S>>>7)]}function fe(S,T){S.pending_buf[S.pending++]=255&T,S.pending_buf[S.pending++]=T>>>8&255}function ne(S,T,O){S.bi_valid>p-O?(S.bi_buf|=T<<S.bi_valid&65535,fe(S,S.bi_buf),S.bi_buf=T>>p-S.bi_valid,S.bi_valid+=O-p):(S.bi_buf|=T<<S.bi_valid&65535,S.bi_valid+=O)}function se(S,T,O){ne(S,O[2*T],O[2*T+1])}function Oe(S,T){for(var O=0;O|=1&S,S>>>=1,O<<=1,0<--T;);return O>>>1}function he(S,T,O){var Y,M,H=new Array(_+1),X=0;for(Y=1;Y<=_;Y++)H[Y]=X=X+O[Y-1]<<1;for(M=0;M<=T;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Oe(H[ee]++,ee))}}function ye(S){var T;for(T=0;T<m;T++)S.dyn_ltree[2*T]=0;for(T=0;T<y;T++)S.dyn_dtree[2*T]=0;for(T=0;T<x;T++)S.bl_tree[2*T]=0;S.dyn_ltree[2*w]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function ke(S){8<S.bi_valid?fe(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 Fe(S,T,O,Y){var M=2*T,H=2*O;return S[M]<S[H]||S[M]===S[H]&&Y[T]<=Y[O]}function Me(S,T,O){for(var Y=S.heap[O],M=O<<1;M<=S.heap_len&&(M<S.heap_len&&Fe(T,S.heap[M+1],S.heap[M],S.depth)&&M++,!Fe(T,Y,S.heap[M],S.depth));)S.heap[O]=S.heap[M],O=M,M<<=1;S.heap[O]=Y}function Pe(S,T,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,T):(se(S,(H=b[M])+f+1,T),(X=R[H])!==0&&ne(S,M-=V[H],X),se(S,H=$(--Y),O),(X=P[H])!==0&&ne(S,Y-=I[H],X)),ee<S.last_lit;);se(S,w,T)}function nt(S,T){var O,Y,M,H=T.dyn_tree,X=T.stat_desc.static_tree,ee=T.stat_desc.has_stree,me=T.stat_desc.elems,Ye=-1;for(S.heap_len=0,S.heap_max=g,O=0;O<me;O++)H[2*O]!==0?(S.heap[++S.heap_len]=Ye=O,S.depth[O]=0):H[2*O+1]=0;for(;S.heap_len<2;)H[2*(M=S.heap[++S.heap_len]=Ye<2?++Ye:0)]=1,S.depth[M]=0,S.opt_len--,ee&&(S.static_len-=X[2*M+1]);for(T.max_code=Ye,O=S.heap_len>>1;1<=O;O--)Me(S,H,O);for(M=me;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Me(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++,Me(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Ue,jt){var Gr,Ht,Qn,at,Jn,es,qr=jt.dyn_tree,$c=jt.max_code,Vc=jt.stat_desc.static_tree,hi=jt.stat_desc.has_stree,Wc=jt.stat_desc.extra_bits,pi=jt.stat_desc.extra_base,Pn=jt.stat_desc.max_length,Is=0;for(at=0;at<=_;at++)Ue.bl_count[at]=0;for(qr[2*Ue.heap[Ue.heap_max]+1]=0,Gr=Ue.heap_max+1;Gr<g;Gr++)Pn<(at=qr[2*qr[2*(Ht=Ue.heap[Gr])+1]+1]+1)&&(at=Pn,Is++),qr[2*Ht+1]=at,$c<Ht||(Ue.bl_count[at]++,Jn=0,pi<=Ht&&(Jn=Wc[Ht-pi]),es=qr[2*Ht],Ue.opt_len+=es*(at+Jn),hi&&(Ue.static_len+=es*(Vc[2*Ht+1]+Jn)));if(Is!==0){do{for(at=Pn-1;Ue.bl_count[at]===0;)at--;Ue.bl_count[at]--,Ue.bl_count[at+1]+=2,Ue.bl_count[Pn]--,Is-=2}while(0<Is);for(at=Pn;at!==0;at--)for(Ht=Ue.bl_count[at];Ht!==0;)$c<(Qn=Ue.heap[--Gr])||(qr[2*Qn+1]!==at&&(Ue.opt_len+=(at-qr[2*Qn+1])*qr[2*Qn],qr[2*Qn+1]=at),Ht--)}}(S,T),he(H,Ye,S.bl_count)}function k(S,T,O){var Y,M,H=-1,X=T[1],ee=0,me=7,Ye=4;for(X===0&&(me=138,Ye=3),T[2*(O+1)+1]=65535,Y=0;Y<=O;Y++)M=X,X=T[2*(Y+1)+1],++ee<me&&M===X||(ee<Ye?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*j]++:S.bl_tree[2*E]++,H=M,Ye=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4))}function J(S,T,O){var Y,M,H=-1,X=T[1],ee=0,me=7,Ye=4;for(X===0&&(me=138,Ye=3),Y=0;Y<=O;Y++)if(M=X,X=T[2*(Y+1)+1],!(++ee<me&&M===X)){if(ee<Ye)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,j,S.bl_tree),ne(S,ee-3,3)):(se(S,E,S.bl_tree),ne(S,ee-11,7));H=M,Ye=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4)}}c(I);var K=!1;function D(S,T,O,Y){ne(S,(u<<1)+(Y?1:0),3),function(M,H,X,ee){ke(M),fe(M,X),fe(M,~X),o.arraySet(M.pending_buf,M.window,H,X,M.pending),M.pending+=X}(S,T,O)}s._tr_init=function(S){K||(function(){var T,O,Y,M,H,X=new Array(_+1);for(M=Y=0;M<d-1;M++)for(V[M]=Y,T=0;T<1<<R[M];T++)b[Y++]=M;for(b[Y-1]=M,M=H=0;M<16;M++)for(I[M]=H,T=0;T<1<<P[M];T++)F[H++]=M;for(H>>=7;M<y;M++)for(I[M]=H<<7,T=0;T<1<<P[M]-7;T++)F[256+H++]=M;for(O=0;O<=_;O++)X[O]=0;for(T=0;T<=143;)q[2*T+1]=8,T++,X[8]++;for(;T<=255;)q[2*T+1]=9,T++,X[9]++;for(;T<=279;)q[2*T+1]=7,T++,X[7]++;for(;T<=287;)q[2*T+1]=8,T++,X[8]++;for(he(q,m+1,X),T=0;T<y;T++)N[2*T+1]=5,N[2*T]=Oe(T,5);te=new Q(q,R,f+1,m,_),W=new Q(N,P,0,y,_),Z=new Q(new Array(0),A,0,x,h)}(),K=!0),S.l_desc=new z(S.dyn_ltree,te),S.d_desc=new z(S.dyn_dtree,W),S.bl_desc=new z(S.bl_tree,Z),S.bi_buf=0,S.bi_valid=0,ye(S)},s._tr_stored_block=D,s._tr_flush_block=function(S,T,O,Y){var M,H,X=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(ee){var me,Ye=4093624447;for(me=0;me<=31;me++,Ye>>>=1)if(1&Ye&&ee.dyn_ltree[2*me]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(me=32;me<f;me++)if(ee.dyn_ltree[2*me]!==0)return a;return i}(S)),nt(S,S.l_desc),nt(S,S.d_desc),X=function(ee){var me;for(k(ee,ee.dyn_ltree,ee.l_desc.max_code),k(ee,ee.dyn_dtree,ee.d_desc.max_code),nt(ee,ee.bl_desc),me=x-1;3<=me&&ee.bl_tree[2*L[me]+1]===0;me--);return ee.opt_len+=3*(me+1)+5+5+4,me}(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&&T!==-1?D(S,T,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Pe(S,q,N)):(ne(S,4+(Y?1:0),3),function(ee,me,Ye,Ue){var jt;for(ne(ee,me-257,5),ne(ee,Ye-1,5),ne(ee,Ue-4,4),jt=0;jt<Ue;jt++)ne(ee,ee.bl_tree[2*L[jt]+1],3);J(ee,ee.dyn_ltree,me-1),J(ee,ee.dyn_dtree,Ye-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,X+1),Pe(S,S.dyn_ltree,S.dyn_dtree)),ye(S),Y&&ke(S)},s._tr_tally=function(S,T,O){return S.pending_buf[S.d_buf+2*S.last_lit]=T>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&T,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,T===0?S.dyn_ltree[2*O]++:(S.matches++,T--,S.dyn_ltree[2*(b[O]+f+1)]++,S.dyn_dtree[2*$(T)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,w,q),function(T){T.bi_valid===16?(fe(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):8<=T.bi_valid&&(T.pending_buf[T.pending++]=255&T.bi_buf,T.bi_buf>>=8,T.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 c,u,d,f,m=1,y={},x=!1,g=i.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(i);_=_&&_.setTimeout?_:i,c={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,j=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=j,C}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",w,!1):i.attachEvent("onmessage",w),function(C){i.postMessage(f+C,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){d.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(C){var j=g.createElement("script");j.onreadystatechange=function(){h(C),j.onreadystatechange=null,u.removeChild(j),j=null},u.appendChild(j)}):function(C){setTimeout(h,0,C)},_.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var j=new Array(arguments.length-1),E=0;E<j.length;E++)j[E]=arguments[E+1];var R={callback:C,args:j};return y[m]=R,c(m),m++},_.clearImmediate=p}function p(C){delete y[C]}function h(C){if(x)setTimeout(h,0,C);else{var j=y[C];if(j){x=!0;try{(function(E){var R=E.callback,P=E.args;switch(P.length){case 0:R();break;case 1:R(P[0]);break;case 2:R(P[0],P[1]);break;case 3:R(P[0],P[1],P[2]);break;default:R.apply(a,P)}})(j)}finally{p(C),x=!1}}}}function w(C){C.source===i&&typeof C.data=="string"&&C.data.indexOf(f)===0&&h(+C.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Kc<"u"?Kc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(bj);var Y6=bj.exports;const Z6=Lm(Y6);function K6(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 G6=async(e,t)=>{const r=new Z6;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()},ga=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)},q6=e=>ga(e).split(" ")[0];function Sj(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 X6=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=st();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:Sj(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},Q6=async()=>{const e=st(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:Sj(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}},J6=async e=>await st().collection("domains").getOne(e),km=async e=>e.id?await st().collection("domains").update(e.id,e):await st().collection("domains").create(e),ez=async e=>await st().collection("domains").delete(e),tz=(e,t)=>st().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),rz=e=>{st().collection("domains").unsubscribe(e)},nz=()=>{const e=qn(),t=Nr(),r=Nn(),n=new URLSearchParams(r.search),s=n.get("page"),o=n.get("state"),[i,a]=v.useState(0),c=()=>{t("/edit")},u=w=>{n.set("page",w.toString()),t(`?${n.toString()}`)},d=w=>{t(`/edit?id=${w}`)},f=w=>{t(`/history?domain=${w}`)},m=async w=>{try{await ez(w),x(y.filter(C=>C.id!==w))}catch(C){console.error("Error deleting domain:",C)}},[y,x]=v.useState([]);v.useEffect(()=>{(async()=>{const C=await X6({page:s?Number(s):1,perPage:10,state:o||""});x(C.items),a(C.totalPages)})()},[s,o]);const g=async w=>{const C=y.filter(P=>P.id===w),j=C[0].enabled,E=C[0];E.enabled=!j,await km(E);const R=y.map(P=>P.id===w?{...P,checked:!j}:P);x(R)},_=async w=>{try{rz(w.id),tz(w.id,C=>{console.log(C);const j=y.map(E=>E.id===C.id?{...C}:E);x(j)}),w.rightnow=!0,await km(w),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:l.jsxs(l.Fragment,{children:["执行失败,请查看",l.jsx(fr,{to:`/history?domain=${w.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},p=async w=>{await _({...w,deployed:!1})},h=async w=>{const C=`${w.id}-${w.domain}.zip`,j=[{name:`${w.domain}.pem`,content:w.certificate?w.certificate:""},{name:`${w.domain}.key`,content:w.privateKey?w.privateKey:""}];await G6(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(ay,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),l.jsx(He,{onClick:c,children:"新增域名"})]}),y.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-36",children:"域名"}),l.jsx("div",{className:"w-40",children:"有效期限"}),l.jsx("div",{className:"w-32",children:"最近执行状态"}),l.jsx("div",{className:"w-64",children:"最近执行阶段"}),l.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),l.jsx("div",{className:"w-24",children:"是否启用"}),l.jsx("div",{className:"grow",children:"操作"})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),y.map(w=>{var C,j,E,R;return l.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:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center",children:w.domain}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:w.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"有效期90天"}),l.jsxs("div",{children:[q6(w.expiredAt),"到期"]})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:w.lastDeployedAt&&((C=w.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Gv,{deployment:w.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:w.lastDeployedAt&&((j=w.expand)!=null&&j.lastDeployment)?l.jsx(Hv,{phase:(E=w.expand.lastDeployment)==null?void 0:E.phase,phaseSuccess:(R=w.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:w.lastDeployedAt?ga(w.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(Zv,{children:l.jsxs(gC,{children:[l.jsx(vC,{children:l.jsx(Lc,{checked:w.enabled,onCheckedChange:()=>{g(w.id)}})}),l.jsx(Kv,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:w.enabled?"禁用":"启用"})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(He,{variant:"link",className:"p-0",onClick:()=>f(w.id),children:"部署历史"}),l.jsxs(na,{when:!!w.enabled,children:[l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(He,{variant:"link",className:"p-0",onClick:()=>_(w),children:"立即部署"})]}),l.jsxs(na,{when:!!(w.enabled&&w.deployed),children:[l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(He,{variant:"link",className:"p-0",onClick:()=>p(w),children:"强行部署"})]}),l.jsxs(na,{when:!!w.expiredAt,children:[l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(He,{variant:"link",className:"p-0",onClick:()=>h(w),children:"下载"})]}),!w.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(WC,{children:[l.jsx(BC,{asChild:!0,children:l.jsx(He,{variant:"link",className:"p-0",children:"删除"})}),l.jsxs(qv,{children:[l.jsxs(Xv,{children:[l.jsx(Jv,{children:"删除域名"}),l.jsx(ey,{children:"确定要删除域名吗?"})]}),l.jsxs(Qv,{children:[l.jsx(ry,{children:"取消"}),l.jsx(ty,{onClick:()=>{m(w.id)},children:"确认"})]})]})]}),l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(He,{variant:"link",className:"p-0",onClick:()=>d(w.id),children:"编辑"})]})]})]},w.id)}),l.jsx(SC,{totalPages:i,currentPage:s?Number(s):1,onPageChange:w=>{u(w)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(rm,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),l.jsx(He,{onClick:c,className:"mt-3",children:"添加域名"})]})})]})})},Te=v.forwardRef(({className:e,type:t,...r},n)=>l.jsx("input",{type:t,className:ae("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}));Te.displayName="Input";var Fc=e=>e.type==="checkbox",$i=e=>e instanceof Date,pr=e=>e==null;const kj=e=>typeof e=="object";var qt=e=>!pr(e)&&!Array.isArray(e)&&kj(e)&&!$i(e),Cj=e=>qt(e)&&e.target?Fc(e.target)?e.target.checked:e.target.value:e,sz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,jj=(e,t)=>e.has(sz(t)),oz=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},ly=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function br(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(!(ly&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!oz(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=br(e[n]));else return e;return t}var Kf=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,ue=(e,t,r)=>{if(!t||!qt(e))return r;const n=Kf(t.split(/[,[\].]+?/)).reduce((s,o)=>pr(s)?s:s[o],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},Fn=e=>typeof e=="boolean",cy=e=>/^\w*$/.test(e),Ej=e=>Kf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ft=(e,t,r)=>{let n=-1;const s=cy(t)?[t]:Ej(t),o=s.length,i=o-1;for(;++n<o;){const a=s[n];let c=r;if(n!==i){const u=e[a];c=qt(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(a==="__proto__")return;e[a]=c,e=e[a]}return e};const Od={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},gn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ss={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Nj=We.createContext(null),Gf=()=>We.useContext(Nj),iz=e=>{const{children:t,...r}=e;return We.createElement(Nj.Provider,{value:r},t)};var Tj=(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]!==gn.all&&(t._proxyFormState[i]=!n||gn.all),r&&(r[i]=!0),e[i]}});return s},Or=e=>qt(e)&&!Object.keys(e).length,Rj=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Or(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||gn.all))},kl=e=>Array.isArray(e)?e:[e],Pj=(e,t,r)=>!e||!t||e===t||kl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function uy(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function az(e){const t=Gf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=We.useState(r._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,uy({disabled:n,next:f=>c.current&&Pj(d.current,f.name,o)&&Rj(f,u.current,r._updateFormState)&&a({...r._formState,...f}),subject:r._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),Tj(i,r,u.current,!1)}var Un=e=>typeof e=="string",Aj=(e,t,r,n,s)=>Un(e)?(n&&t.watch.add(e),ue(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),ue(r,o))):(n&&(t.watchAll=!0),r);function lz(e){const t=Gf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=We.useRef(n);a.current=n,uy({disabled:o,subject:r._subjects.values,next:d=>{Pj(a.current,d.name,i)&&u(br(Aj(a.current,r._names,d.values||r._formValues,!1,s)))}});const[c,u]=We.useState(r._getWatch(n,s));return We.useEffect(()=>r._removeUnmounted()),c}function cz(e){const t=Gf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=jj(s._names.array,r),a=lz({control:s,name:r,defaultValue:ue(s._formValues,r,ue(s._defaultValues,r,e.defaultValue)),exact:!0}),c=az({control:s,name:r}),u=We.useRef(s.register(r,{...e.rules,value:a,...Fn(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(m,y)=>{const x=ue(s._fields,m);x&&x._f&&(x._f.mount=y)};if(f(r,!0),d){const m=br(ue(s._options.defaultValues,r));ft(s._defaultValues,r,m),Ft(ue(s._formValues,r))&&ft(s._formValues,r,m)}return()=>{(i?d&&!s._state.action:d)?s.unregister(r):f(r,!1)}},[r,s,i,o]),We.useEffect(()=>{ue(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ue(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Fn(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:Cj(d),name:r},type:Od.CHANGE}),[r]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:ue(s._formValues,r),name:r},type:Od.BLUR}),[r,s]),ref:d=>{const f=ue(s._fields,r);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:m=>d.setCustomValidity(m),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ue(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!ue(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ue(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ue(c.validatingFields,r)},error:{enumerable:!0,get:()=>ue(c.errors,r)}})}}const uz=e=>e.render(cz(e));var Dj=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},aw=e=>({isOnSubmit:!e||e===gn.onSubmit,isOnBlur:e===gn.onBlur,isOnChange:e===gn.onChange,isOnAll:e===gn.all,isOnTouch:e===gn.onTouched}),lw=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Cl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=ue(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;Cl(a,t)}else qt(a)&&Cl(a,t)}}};var dz=(e,t,r)=>{const n=kl(ue(e,r));return ft(n,"root",t[r]),ft(e,r,n),e},dy=e=>e.type==="file",eo=e=>typeof e=="function",Md=e=>{if(!ly)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ku=e=>Un(e),fy=e=>e.type==="radio",Id=e=>e instanceof RegExp;const cw={value:!1,isValid:!1},uw={value:!0,isValid:!0};var Oj=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===""?uw:{value:e[0].value,isValid:!0}:uw:cw}return cw};const dw={isValid:!1,value:null};var Mj=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,dw):dw;function fw(e,t,r="validate"){if(Ku(e)||Array.isArray(e)&&e.every(Ku)||Fn(e)&&!e)return{type:r,message:Ku(e)?e:"",ref:t}}var ki=e=>qt(e)&&!Id(e)?e:{value:e,message:""},hw=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:m,validate:y,name:x,valueAsNumber:g,mount:_,disabled:p}=e._f,h=ue(t,x);if(!_||p)return{};const w=i?i[0]:o,C=N=>{n&&w.reportValidity&&(w.setCustomValidity(Fn(N)?"":N||""),w.reportValidity())},j={},E=fy(o),R=Fc(o),P=E||R,A=(g||dy(o))&&Ft(o.value)&&Ft(h)||Md(o)&&o.value===""||h===""||Array.isArray(h)&&!h.length,L=Dj.bind(null,x,r,j),q=(N,F,b,V=ss.maxLength,te=ss.minLength)=>{const W=N?F:b;j[x]={type:N?V:te,message:W,ref:o,...L(N?V:te,W)}};if(s?!Array.isArray(h)||!h.length:a&&(!P&&(A||pr(h))||Fn(h)&&!h||R&&!Oj(i).isValid||E&&!Mj(i).isValid)){const{value:N,message:F}=Ku(a)?{value:!!a,message:a}:ki(a);if(N&&(j[x]={type:ss.required,message:F,ref:w,...L(ss.required,F)},!r))return C(F),j}if(!A&&(!pr(d)||!pr(f))){let N,F;const b=ki(f),V=ki(d);if(!pr(h)&&!isNaN(h)){const te=o.valueAsNumber||h&&+h;pr(b.value)||(N=te>b.value),pr(V.value)||(F=te<V.value)}else{const te=o.valueAsDate||new Date(h),W=Q=>new Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Un(b.value)&&h&&(N=Z?W(h)>W(b.value):I?h>b.value:te>new Date(b.value)),Un(V.value)&&h&&(F=Z?W(h)<W(V.value):I?h<V.value:te<new Date(V.value))}if((N||F)&&(q(!!N,b.message,V.message,ss.max,ss.min),!r))return C(j[x].message),j}if((c||u)&&!A&&(Un(h)||s&&Array.isArray(h))){const N=ki(c),F=ki(u),b=!pr(N.value)&&h.length>+N.value,V=!pr(F.value)&&h.length<+F.value;if((b||V)&&(q(b,N.message,F.message),!r))return C(j[x].message),j}if(m&&!A&&Un(h)){const{value:N,message:F}=ki(m);if(Id(N)&&!h.match(N)&&(j[x]={type:ss.pattern,message:F,ref:o,...L(ss.pattern,F)},!r))return C(F),j}if(y){if(eo(y)){const N=await y(h,t),F=fw(N,w);if(F&&(j[x]={...F,...L(ss.validate,F.message)},!r))return C(F.message),j}else if(qt(y)){let N={};for(const F in y){if(!Or(N)&&!r)break;const b=fw(await y[F](h,t),w,F);b&&(N={...b,...L(F,b.message)},C(b.message),r&&(j[x]=N))}if(!Or(N)&&(j[x]={ref:w,...N},!r))return j}}return C(!0),j};function fz(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 hz(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Yt(e,t){const r=Array.isArray(t)?t:cy(t)?[t]:Ej(t),n=r.length===1?e:fz(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(qt(n)&&Or(n)||Array.isArray(n)&&hz(n))&&Yt(e,r.slice(0,-1)),e}var rp=()=>{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=[]}}},Ld=e=>pr(e)||!kj(e);function Bo(e,t){if(Ld(e)||Ld(t))return e===t;if($i(e)&&$i(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($i(o)&&$i(i)||qt(o)&&qt(i)||Array.isArray(o)&&Array.isArray(i)?!Bo(o,i):o!==i)return!1}}return!0}var Ij=e=>e.type==="select-multiple",pz=e=>fy(e)||Fc(e),np=e=>Md(e)&&e.isConnected,Lj=e=>{for(const t in e)if(eo(e[t]))return!0;return!1};function Fd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!Lj(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Fd(e[n],t[n])):pr(e[n])||(t[n]=!0);return t}function Fj(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!Lj(e[s])?Ft(t)||Ld(r[s])?r[s]=Array.isArray(e[s])?Fd(e[s],[]):{...Fd(e[s])}:Fj(e[s],pr(t)?{}:t[s],r[s]):r[s]=!Bo(e[s],t[s]);return r}var Cu=(e,t)=>Fj(e,t,Fd(t)),zj=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&Un(e)?new Date(e):n?n(e):e;function sp(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return dy(t)?t.files:fy(t)?Mj(e.refs).value:Ij(t)?[...t.selectedOptions].map(({value:r})=>r):Fc(t)?Oj(e.refs).value:zj(Ft(t.value)?e.ref.value:t.value,e)}var mz=(e,t,r,n)=>{const s={};for(const o of e){const i=ue(t,o);i&&ft(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ja=e=>Ft(e)?e:Id(e)?e.source:qt(e)?Id(e.value)?e.value.source:e.value:e,gz=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function pw(e,t,r){const n=ue(e,r);if(n||cy(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=ue(t,o),a=ue(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 vz=(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,yz=(e,t)=>!Kf(ue(e,t)).length&&Yt(e,t);const xz={mode:gn.onSubmit,reValidateMode:gn.onChange,shouldFocusError:!0};function wz(e={}){let t={...xz,...e},r={submitCount:0,isDirty:!1,isLoading:eo(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)?br(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:br(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:rp(),array:rp(),state:rp()},m=aw(t.mode),y=aw(t.reValidateMode),x=t.criteriaMode===gn.all,g=S=>T=>{clearTimeout(u),u=setTimeout(S,T)},_=async S=>{if(d.isValid||S){const T=t.resolver?Or((await P()).errors):await L(n,!0);T!==r.isValid&&f.state.next({isValid:T})}},p=(S,T)=>{(d.isValidating||d.validatingFields)&&((S||Array.from(a.mount)).forEach(O=>{O&&(T?ft(r.validatingFields,O,T):Yt(r.validatingFields,O))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Or(r.validatingFields)}))},h=(S,T=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(i.action=!0,H&&Array.isArray(ue(n,S))){const X=O(ue(n,S),Y.argA,Y.argB);M&&ft(n,S,X)}if(H&&Array.isArray(ue(r.errors,S))){const X=O(ue(r.errors,S),Y.argA,Y.argB);M&&ft(r.errors,S,X),yz(r.errors,S)}if(d.touchedFields&&H&&Array.isArray(ue(r.touchedFields,S))){const X=O(ue(r.touchedFields,S),Y.argA,Y.argB);M&&ft(r.touchedFields,S,X)}d.dirtyFields&&(r.dirtyFields=Cu(s,o)),f.state.next({name:S,isDirty:N(S,T),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ft(o,S,T)},w=(S,T)=>{ft(r.errors,S,T),f.state.next({errors:r.errors})},C=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},j=(S,T,O,Y)=>{const M=ue(n,S);if(M){const H=ue(o,S,Ft(O)?ue(s,S):O);Ft(H)||Y&&Y.defaultChecked||T?ft(o,S,T?H:sp(M._f)):V(S,H),i.mount&&_()}},E=(S,T,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},me=!!(ue(n,S)&&ue(n,S)._f&&ue(n,S)._f.disabled);if(!O||Y){d.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=N(),H=X!==ee.isDirty);const Ye=me||Bo(ue(s,S),T);X=!!(!me&&ue(r.dirtyFields,S)),Ye||me?Yt(r.dirtyFields,S):ft(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||d.dirtyFields&&X!==!Ye}if(O){const Ye=ue(r.touchedFields,S);Ye||(ft(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||d.touchedFields&&Ye!==O)}return H&&M&&f.state.next(ee),H?ee:{}},R=(S,T,O,Y)=>{const M=ue(r.errors,S),H=d.isValid&&Fn(T)&&r.isValid!==T;if(e.delayError&&O?(c=g(()=>w(S,O)),c(e.delayError)):(clearTimeout(u),c=null,O?ft(r.errors,S,O):Yt(r.errors,S)),(O?!Bo(M,O):M)||!Or(Y)||H){const X={...Y,...H&&Fn(T)?{isValid:T}:{},errors:r.errors,name:S};r={...r,...X},f.state.next(X)}},P=async S=>{p(S,!0);const T=await t.resolver(o,t.context,mz(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return p(S),T},A=async S=>{const{errors:T}=await P(S);if(S)for(const O of S){const Y=ue(T,O);Y?ft(r.errors,O,Y):Yt(r.errors,O)}else r.errors=T;return T},L=async(S,T,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);p([Y],!0);const me=await hw(M,o,x,t.shouldUseNativeValidation&&!T,ee);if(p([Y]),me[H.name]&&(O.valid=!1,T))break;!T&&(ue(me,H.name)?ee?dz(r.errors,me,H.name):ft(r.errors,H.name,me[H.name]):Yt(r.errors,H.name))}X&&await L(X,T,O)}}return O.valid},q=()=>{for(const S of a.unMount){const T=ue(n,S);T&&(T._f.refs?T._f.refs.every(O=>!np(O)):!np(T._f.ref))&&Oe(S)}a.unMount=new Set},N=(S,T)=>(S&&T&&ft(o,S,T),!Bo(z(),s)),F=(S,T,O)=>Aj(S,a,{...i.mount?o:Ft(T)?s:Un(S)?{[S]:T}:T},O,T),b=S=>Kf(ue(i.mount?o:s,S,e.shouldUnregister?ue(s,S,[]):[])),V=(S,T,O={})=>{const Y=ue(n,S);let M=T;if(Y){const H=Y._f;H&&(!H.disabled&&ft(o,S,zj(T,H)),M=Md(H.ref)&&pr(T)?"":T,Ij(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?Fc(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):dy(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||f.values.next({name:S,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&E(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,T,O)=>{for(const Y in T){const M=T[Y],H=`${S}.${Y}`,X=ue(n,H);(a.array.has(S)||!Ld(M)||X&&!X._f)&&!$i(M)?te(H,M,O):V(H,M,O)}},W=(S,T,O={})=>{const Y=ue(n,S),M=a.array.has(S),H=br(T);ft(o,S,H),M?(f.array.next({name:S,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:S,dirtyFields:Cu(s,o),isDirty:N(S,H)})):Y&&!Y._f&&!pr(H)?te(S,H,O):V(S,H,O),lw(S,a)&&f.state.next({...r}),f.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const T=S.target;let O=T.name,Y=!0;const M=ue(n,O),H=()=>T.type?sp(M._f):Cj(S),X=ee=>{Y=Number.isNaN(ee)||ee===ue(o,O,ee)};if(M){let ee,me;const Ye=H(),Ue=S.type===Od.BLUR||S.type===Od.FOCUS_OUT,jt=!gz(M._f)&&!t.resolver&&!ue(r.errors,O)&&!M._f.deps||vz(Ue,ue(r.touchedFields,O),r.isSubmitted,y,m),Gr=lw(O,a,Ue);ft(o,O,Ye),Ue?(M._f.onBlur&&M._f.onBlur(S),c&&c(0)):M._f.onChange&&M._f.onChange(S);const Ht=E(O,Ye,Ue,!1),Qn=!Or(Ht)||Gr;if(!Ue&&f.values.next({name:O,type:S.type,values:{...o}}),jt)return d.isValid&&_(),Qn&&f.state.next({name:O,...Gr?{}:Ht});if(!Ue&&Gr&&f.state.next({...r}),t.resolver){const{errors:at}=await P([O]);if(X(Ye),Y){const Jn=pw(r.errors,n,O),es=pw(at,n,Jn.name||O);ee=es.error,O=es.name,me=Or(at)}}else p([O],!0),ee=(await hw(M,o,x,t.shouldUseNativeValidation))[O],p([O]),X(Ye),Y&&(ee?me=!1:d.isValid&&(me=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),R(O,me,ee,Ht))}},I=(S,T)=>{if(ue(r.errors,T)&&S.focus)return S.focus(),1},Q=async(S,T={})=>{let O,Y;const M=kl(S);if(t.resolver){const H=await A(Ft(S)?S:M);O=Or(H),Y=S?!M.some(X=>ue(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=ue(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&_()):Y=O=await L(n);return f.state.next({...!Un(S)||d.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),T.shouldFocus&&!Y&&Cl(n,I,S?M:a.mount),Y},z=S=>{const T={...i.mount?o:s};return Ft(S)?T:Un(S)?ue(T,S):S.map(O=>ue(T,O))},$=(S,T)=>({invalid:!!ue((T||r).errors,S),isDirty:!!ue((T||r).dirtyFields,S),error:ue((T||r).errors,S),isValidating:!!ue(r.validatingFields,S),isTouched:!!ue((T||r).touchedFields,S)}),fe=S=>{S&&kl(S).forEach(T=>Yt(r.errors,T)),f.state.next({errors:S?r.errors:{}})},ne=(S,T,O)=>{const Y=(ue(n,S,{_f:{}})._f||{}).ref,M=ue(r.errors,S)||{},{ref:H,message:X,type:ee,...me}=M;ft(r.errors,S,{...me,...T,ref:Y}),f.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,T)=>eo(S)?f.values.subscribe({next:O=>S(F(void 0,T),O)}):F(S,T,!0),Oe=(S,T={})=>{for(const O of S?kl(S):a.mount)a.mount.delete(O),a.array.delete(O),T.keepValue||(Yt(n,O),Yt(o,O)),!T.keepError&&Yt(r.errors,O),!T.keepDirty&&Yt(r.dirtyFields,O),!T.keepTouched&&Yt(r.touchedFields,O),!T.keepIsValidating&&Yt(r.validatingFields,O),!t.shouldUnregister&&!T.keepDefaultValue&&Yt(s,O);f.values.next({values:{...o}}),f.state.next({...r,...T.keepDirty?{isDirty:N()}:{}}),!T.keepIsValid&&_()},he=({disabled:S,name:T,field:O,fields:Y,value:M})=>{if(Fn(S)&&i.mount||S){const H=S?void 0:Ft(M)?sp(O?O._f:ue(Y,T)._f):M;ft(o,T,H),E(T,H,!1,!1,!0)}},ye=(S,T={})=>{let O=ue(n,S);const Y=Fn(T.disabled);return ft(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...T}}),a.mount.add(S),O?he({field:O,disabled:T.disabled,name:S,value:T.value}):j(S,!0,T.value),{...Y?{disabled:T.disabled}:{},...t.progressive?{required:!!T.required,min:Ja(T.min),max:Ja(T.max),minLength:Ja(T.minLength),maxLength:Ja(T.maxLength),pattern:Ja(T.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ye(S,T),O=ue(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=pz(H),ee=O._f.refs||[];if(X?ee.find(me=>me===H):H===O._f.ref)return;ft(n,S,{_f:{...O._f,...X?{refs:[...ee.filter(np),H,...Array.isArray(ue(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),j(S,!1,void 0,H)}else O=ue(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||T.shouldUnregister)&&!(jj(a.array,S)&&i.action)&&a.unMount.add(S)}}},ke=()=>t.shouldFocusError&&Cl(n,I,a.mount),Fe=S=>{Fn(S)&&(f.state.next({disabled:S}),Cl(n,(T,O)=>{const Y=ue(n,O);Y&&(T.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},Me=(S,T)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=br(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await P();r.errors=H,M=X}else await L(n);if(Yt(r.errors,"root"),Or(r.errors)){f.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else T&&await T({...r.errors},O),ke(),setTimeout(ke);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Or(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Pe=(S,T={})=>{ue(n,S)&&(Ft(T.defaultValue)?W(S,br(ue(s,S))):(W(S,T.defaultValue),ft(s,S,br(T.defaultValue))),T.keepTouched||Yt(r.touchedFields,S),T.keepDirty||(Yt(r.dirtyFields,S),r.isDirty=T.defaultValue?N(S,br(ue(s,S))):N()),T.keepError||(Yt(r.errors,S),d.isValid&&_()),f.state.next({...r}))},nt=(S,T={})=>{const O=S?br(S):s,Y=br(O),M=Or(S),H=M?s:Y;if(T.keepDefaultValues||(s=O),!T.keepValues){if(T.keepDirtyValues)for(const X of a.mount)ue(r.dirtyFields,X)?ft(H,X,ue(o,X)):W(X,ue(H,X));else{if(ly&&Ft(S))for(const X of a.mount){const ee=ue(n,X);if(ee&&ee._f){const me=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(Md(me)){const Ye=me.closest("form");if(Ye){Ye.reset();break}}}}n={}}o=e.shouldUnregister?T.keepDefaultValues?br(s):{}:br(H),f.array.next({values:{...H}}),f.values.next({values:{...H}})}a={mount:T.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!T.keepIsValid||!!T.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:T.keepSubmitCount?r.submitCount:0,isDirty:M?!1:T.keepDirty?r.isDirty:!!(T.keepDefaultValues&&!Bo(S,s)),isSubmitted:T.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:T.keepDirtyValues?T.keepDefaultValues&&o?Cu(s,o):r.dirtyFields:T.keepDefaultValues&&S?Cu(s,S):T.keepDirty?r.dirtyFields:{},touchedFields:T.keepTouched?r.touchedFields:{},errors:T.keepErrors?r.errors:{},isSubmitSuccessful:T.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,T)=>nt(eo(S)?S(o):S,T);return{control:{register:ye,unregister:Oe,getFieldState:$,handleSubmit:Me,setError:ne,_executeSchema:P,_getWatch:F,_getDirty:N,_updateValid:_,_removeUnmounted:q,_updateFieldArray:h,_updateDisabledField:he,_getFieldArray:b,_reset:nt,_resetDefaultValues:()=>eo(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Fe,_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:ye,handleSubmit:Me,watch:se,setValue:W,getValues:z,reset:k,resetField:Pe,clearErrors:fe,unregister:Oe,setError:ne,setFocus:(S,T={})=>{const O=ue(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),T.shouldSelect&&M.select())}},getFieldState:$}}function Tr(e={}){const t=We.useRef(),r=We.useRef(),[n,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:eo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:eo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...wz(e),formState:n});const o=t.current.control;return o._options=e,uy({subject:o._subjects.state,next:i=>{Rj(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),We.useEffect(()=>{e.values&&!Bo(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),We.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),We.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()}),We.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=Tj(n,o),t.current}const mw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ue(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Uj=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?mw(n.ref,r,e):n.refs&&n.refs.forEach(s=>mw(s,r,e))}},_z=(e,t)=>{t.shouldUseNativeValidation&&Uj(e,t);const r={};for(const n in e){const s=ue(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(bz(t.names||Object.keys(e),n)){const i=Object.assign({},ue(r,n));ft(i,"root",o),ft(r,n,i)}else ft(r,n,o)}return r},bz=(e,t)=>e.some(r=>r.startsWith(t+"."));var Sz=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 c=r[i].types,u=c&&c[n.code];r[i]=Dj(i,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},Rr=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return o.shouldUseNativeValidation&&Uj({},o),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:_z(Sz(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},ot;(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})(ot||(ot={}));var Cm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Cm||(Cm={}));const we=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zs=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},ie=ot.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"]),kz=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Wr 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,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof Wr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.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()}}Wr.create=e=>new Wr(e);const va=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===we.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${ot.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}"`:ot.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,ot.assertNever(e)}return{message:r}};let $j=va;function Cz(e){$j=e}function zd(){return $j}const Ud=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 c=n.filter(u=>!!u).slice().reverse();for(const u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},jz=[];function ge(e,t){const r=zd(),n=Ud({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===va?void 0:va].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 Be;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 Be;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 Be=Object.freeze({status:"aborted"}),Vi=e=>({status:"dirty",value:e}),gr=e=>({status:"valid",value:e}),jm=e=>e.status==="aborted",Em=e=>e.status==="dirty",tc=e=>e.status==="valid",rc=e=>typeof Promise<"u"&&e instanceof Promise;function $d(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 Vj(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 De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(De||(De={}));var il,al;class Yn{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 gw=(e,t)=>{if(tc(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 Wr(e.common.issues);return this._error=r,this._error}}};function Ze(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 c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??n)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Je{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 Zs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Zs(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:Zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(rc(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:Zs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return gw(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:Zs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(rc(s)?s:Promise.resolve(s));return gw(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(c=>c?!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 En({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Wn.create(this,this._def)}nullable(){return wo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _n.create(this,this._def)}promise(){return xa.create(this,this._def)}or(t){return ic.create([this,t],this._def)}and(t){return ac.create(this,t,this._def)}transform(t){return new En({...Ze(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new fc({...Ze(this._def),innerType:this,defaultValue:r,typeName:$e.ZodDefault})}brand(){return new hy({typeName:$e.ZodBranded,type:this,...Ze(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new hc({...Ze(this._def),innerType:this,catchValue:r,typeName:$e.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return zc.create(this,t)}readonly(){return pc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ez=/^c[^\s-]{8,}$/i,Nz=/^[0-9a-z]+$/,Tz=/^[0-9A-HJKMNP-TV-Z]{26}$/,Rz=/^[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,Pz=/^[a-z0-9_-]{21}$/i,Az=/^[-+]?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)?)??$/,Dz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Oz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let op;const Mz=/^(?:(?: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])$/,Iz=/^(([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})))$/,Lz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wj="((\\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])))",Fz=new RegExp(`^${Wj}$`);function Bj(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 zz(e){return new RegExp(`^${Bj(e)}$`)}function Hj(e){let t=`${Wj}T${Bj(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 Uz(e,t){return!!((t==="v4"||!t)&&Mz.test(e)||(t==="v6"||!t)&&Iz.test(e))}class yn extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const o=this._getOrReturnCtx(t);return ge(o,{code:ie.invalid_type,expected:we.string,received:o.parsedType}),Be}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),ge(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),ge(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?ge(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ge(s,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Dz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"email",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")op||(op=new RegExp(Oz,"u")),op.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"emoji",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Rz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"uuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Pz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"nanoid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Ez.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Nz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid2",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Tz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(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),ge(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),ge(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),ge(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),ge(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),ge(s,{code:ie.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Hj(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ie.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Fz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ie.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?zz(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ie.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Az.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"duration",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Uz(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ip",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Lz.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64",code:ie.invalid_string,message:o.message}),n.dirty()):ot.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,...De.errToObj(n)})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.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,...De.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,...De.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...De.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...De.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...De.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...De.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...De.errToObj(r)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new yn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yn({...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}}yn.create=e=>{var t;return new yn({checks:[],typeName:$e.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function $z(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 vo extends Je{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)!==we.number){const o=this._getOrReturnCtx(t);return ge(o,{code:ie.invalid_type,expected:we.number,received:o.parsedType}),Be}let n;const s=new cr;for(const o of this._def.checks)o.kind==="int"?ot.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(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),ge(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),ge(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?$z(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(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),ge(n,{code:ie.not_finite,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,De.toString(r))}gt(t,r){return this.setLimit("min",t,!1,De.toString(r))}lte(t,r){return this.setLimit("max",t,!0,De.toString(r))}lt(t,r){return this.setLimit("max",t,!1,De.toString(r))}setLimit(t,r,n,s){return new vo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:De.toString(s)}]})}_addCheck(t){return new vo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.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"&&ot.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)}}vo.create=e=>new vo({checks:[],typeName:$e.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class yo extends Je{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)!==we.bigint){const o=this._getOrReturnCtx(t);return ge(o,{code:ie.invalid_type,expected:we.bigint,received:o.parsedType}),Be}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),ge(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),ge(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),ge(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):ot.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,De.toString(r))}gt(t,r){return this.setLimit("min",t,!1,De.toString(r))}lte(t,r){return this.setLimit("max",t,!0,De.toString(r))}lt(t,r){return this.setLimit("max",t,!1,De.toString(r))}setLimit(t,r,n,s){return new yo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:De.toString(s)}]})}_addCheck(t){return new yo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:De.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}}yo.create=e=>{var t;return new yo({checks:[],typeName:$e.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class nc extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.boolean,received:n.parsedType}),Be}return gr(t.data)}}nc.create=e=>new nc({typeName:$e.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class si extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const o=this._getOrReturnCtx(t);return ge(o,{code:ie.invalid_type,expected:we.date,received:o.parsedType}),Be}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ge(o,{code:ie.invalid_date}),Be}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),ge(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),ge(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):ot.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new si({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:De.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}}si.create=e=>new si({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:$e.ZodDate,...Ze(e)});class Vd extends Je{_parse(t){if(this._getType(t)!==we.symbol){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.symbol,received:n.parsedType}),Be}return gr(t.data)}}Vd.create=e=>new Vd({typeName:$e.ZodSymbol,...Ze(e)});class sc extends Je{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.undefined,received:n.parsedType}),Be}return gr(t.data)}}sc.create=e=>new sc({typeName:$e.ZodUndefined,...Ze(e)});class oc extends Je{_parse(t){if(this._getType(t)!==we.null){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.null,received:n.parsedType}),Be}return gr(t.data)}}oc.create=e=>new oc({typeName:$e.ZodNull,...Ze(e)});class ya extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return gr(t.data)}}ya.create=e=>new ya({typeName:$e.ZodAny,...Ze(e)});class Ko extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gr(t.data)}}Ko.create=e=>new Ko({typeName:$e.ZodUnknown,...Ze(e)});class js extends Je{_parse(t){const r=this._getOrReturnCtx(t);return ge(r,{code:ie.invalid_type,expected:we.never,received:r.parsedType}),Be}}js.create=e=>new js({typeName:$e.ZodNever,...Ze(e)});class Wd extends Je{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.void,received:n.parsedType}),Be}return gr(t.data)}}Wd.create=e=>new Wd({typeName:$e.ZodVoid,...Ze(e)});class _n extends Je{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==we.array)return ge(r,{code:ie.invalid_type,expected:we.array,received:r.parsedType}),Be;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(ge(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&&(ge(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&&(ge(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 Yn(r,i,r.path,a)))).then(i=>cr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Yn(r,i,r.path,a)));return cr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new _n({...this._def,minLength:{value:t,message:De.toString(r)}})}max(t,r){return new _n({...this._def,maxLength:{value:t,message:De.toString(r)}})}length(t,r){return new _n({...this._def,exactLength:{value:t,message:De.toString(r)}})}nonempty(t){return this.min(1,t)}}_n.create=(e,t)=>new _n({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...Ze(t)});function ji(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Wn.create(ji(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof _n?new _n({...e._def,type:ji(e.element)}):e instanceof Wn?Wn.create(ji(e.unwrap())):e instanceof wo?wo.create(ji(e.unwrap())):e instanceof Zn?Zn.create(e.items.map(t=>ji(t))):e}class Rt extends Je{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=ot.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==we.object){const u=this._getOrReturnCtx(t);return ge(u,{code:ie.invalid_type,expected:we.object,received:u.parsedType}),Be}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof js&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Yn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof js){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ge(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];c.push({key:{status:"valid",value:d},value:u._parse(new Yn(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){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,c)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const c=(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=De.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}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:$e.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return ot.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 ot.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return ji(this)}partial(t){const r={};return ot.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 ot.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Wn;)o=o._def.innerType;r[n]=o}}),new Rt({...this._def,shape:()=>r})}keyof(){return Yj(ot.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:js.create(),typeName:$e.ZodObject,...Ze(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:js.create(),typeName:$e.ZodObject,...Ze(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:js.create(),typeName:$e.ZodObject,...Ze(t)});class ic extends Je{_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 Wr(a.ctx.common.issues));return ge(r,{code:ie.invalid_union,unionErrors:i}),Be}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 c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._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(c=>new Wr(c));return ge(r,{code:ie.invalid_union,unionErrors:a}),Be}}get options(){return this._def.options}}ic.create=(e,t)=>new ic({options:e,typeName:$e.ZodUnion,...Ze(t)});const os=e=>e instanceof cc?os(e.schema):e instanceof En?os(e.innerType()):e instanceof uc?[e.value]:e instanceof xo?e.options:e instanceof dc?ot.objectValues(e.enum):e instanceof fc?os(e._def.innerType):e instanceof sc?[void 0]:e instanceof oc?[null]:e instanceof Wn?[void 0,...os(e.unwrap())]:e instanceof wo?[null,...os(e.unwrap())]:e instanceof hy||e instanceof pc?os(e.unwrap()):e instanceof hc?os(e._def.innerType):[];class qf extends Je{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ge(r,{code:ie.invalid_type,expected:we.object,received:r.parsedType}),Be;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}):(ge(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Be)}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=os(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 qf({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ze(n)})}}function Nm(e,t){const r=Zs(e),n=Zs(t);if(e===t)return{valid:!0,data:e};if(r===we.object&&n===we.object){const s=ot.objectKeys(t),o=ot.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const c=Nm(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===we.array&&n===we.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],c=Nm(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===we.date&&n===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ac extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(jm(o)||jm(i))return Be;const a=Nm(o.value,i.value);return a.valid?((Em(o)||Em(i))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:ie.invalid_intersection_types}),Be)};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}))}}ac.create=(e,t,r)=>new ac({left:e,right:t,typeName:$e.ZodIntersection,...Ze(r)});class Zn extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.array)return ge(n,{code:ie.invalid_type,expected:we.array,received:n.parsedType}),Be;if(n.data.length<this._def.items.length)return ge(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&n.data.length>this._def.items.length&&(ge(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 c=this._def.items[a]||this._def.rest;return c?c._parse(new Yn(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 Zn({...this._def,rest:t})}}Zn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zn({items:e,typeName:$e.ZodTuple,rest:null,...Ze(t)})};class lc extends Je{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!==we.object)return ge(n,{code:ie.invalid_type,expected:we.object,received:n.parsedType}),Be;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Yn(n,a,n.path,a)),value:i._parse(new Yn(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 Je?new lc({keyType:t,valueType:r,typeName:$e.ZodRecord,...Ze(n)}):new lc({keyType:yn.create(),valueType:t,typeName:$e.ZodRecord,...Ze(r)})}}class Bd extends Je{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!==we.map)return ge(n,{code:ie.invalid_type,expected:we.map,received:n.parsedType}),Be;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Yn(n,a,n.path,[u,"key"])),value:o._parse(new Yn(n,c,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Be;(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 c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Be;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}}Bd.create=(e,t,r)=>new Bd({valueType:t,keyType:e,typeName:$e.ZodMap,...Ze(r)});class oi extends Je{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.set)return ge(n,{code:ie.invalid_type,expected:we.set,received:n.parsedType}),Be;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ge(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&&(ge(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(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Be;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((c,u)=>o._parse(new Yn(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new oi({...this._def,minSize:{value:t,message:De.toString(r)}})}max(t,r){return new oi({...this._def,maxSize:{value:t,message:De.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}oi.create=(e,t)=>new oi({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...Ze(t)});class oa extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.function)return ge(r,{code:ie.invalid_type,expected:we.function,received:r.parsedType}),Be;function n(a,c){return Ud({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zd(),va].filter(u=>!!u),issueData:{code:ie.invalid_arguments,argumentsError:c}})}function s(a,c){return Ud({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zd(),va].filter(u=>!!u),issueData:{code:ie.invalid_return_type,returnTypeError:c}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof xa){const a=this;return gr(async function(...c){const u=new Wr([]),d=await a._def.args.parseAsync(c,o).catch(y=>{throw u.addIssue(n(c,y)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(y=>{throw u.addIssue(s(f,y)),u})})}else{const a=this;return gr(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Wr([n(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Wr([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new oa({...this._def,args:Zn.create(t).rest(Ko.create())})}returns(t){return new oa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new oa({args:t||Zn.create([]).rest(Ko.create()),returns:r||Ko.create(),typeName:$e.ZodFunction,...Ze(n)})}}class cc extends Je{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})}}cc.create=(e,t)=>new cc({getter:e,typeName:$e.ZodLazy,...Ze(t)});class uc extends Je{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}uc.create=(e,t)=>new uc({value:e,typeName:$e.ZodLiteral,...Ze(t)});function Yj(e,t){return new xo({values:e,typeName:$e.ZodEnum,...Ze(t)})}class xo extends Je{constructor(){super(...arguments),il.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:ot.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Be}if($d(this,il)||Vj(this,il,new Set(this._def.values)),!$d(this,il).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Be}return gr(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 xo.create(t,{...this._def,...r})}exclude(t,r=this._def){return xo.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}il=new WeakMap;xo.create=Yj;class dc extends Je{constructor(){super(...arguments),al.set(this,void 0)}_parse(t){const r=ot.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==we.string&&n.parsedType!==we.number){const s=ot.objectValues(r);return ge(n,{expected:ot.joinValues(s),received:n.parsedType,code:ie.invalid_type}),Be}if($d(this,al)||Vj(this,al,new Set(ot.getValidEnumValues(this._def.values))),!$d(this,al).has(t.data)){const s=ot.objectValues(r);return ge(n,{received:n.data,code:ie.invalid_enum_value,options:s}),Be}return gr(t.data)}get enum(){return this._def.values}}al=new WeakMap;dc.create=(e,t)=>new dc({values:e,typeName:$e.ZodNativeEnum,...Ze(t)});class xa extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.promise&&r.common.async===!1)return ge(r,{code:ie.invalid_type,expected:we.promise,received:r.parsedType}),Be;const n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return gr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}xa.create=(e,t)=>new xa({type:e,typeName:$e.ZodPromise,...Ze(t)});class En extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.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=>{ge(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 Be;const c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Be:c.status==="dirty"||r.value==="dirty"?Vi(c.value):c});{if(r.value==="aborted")return Be;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?Be:a.status==="dirty"||r.value==="dirty"?Vi(a.value):a}}if(s.type==="refinement"){const i=a=>{const c=s.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c 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"?Be:(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"?Be:(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(!tc(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=>tc(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);ot.assertNever(s)}}En.create=(e,t,r)=>new En({schema:e,typeName:$e.ZodEffects,effect:t,...Ze(r)});En.createWithPreprocess=(e,t,r)=>new En({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...Ze(r)});class Wn extends Je{_parse(t){return this._getType(t)===we.undefined?gr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wn.create=(e,t)=>new Wn({innerType:e,typeName:$e.ZodOptional,...Ze(t)});class wo extends Je{_parse(t){return this._getType(t)===we.null?gr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wo.create=(e,t)=>new wo({innerType:e,typeName:$e.ZodNullable,...Ze(t)});class fc extends Je{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}fc.create=(e,t)=>new fc({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class hc extends Je{_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 rc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Wr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Wr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}hc.create=(e,t)=>new hc({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class Hd extends Je{_parse(t){if(this._getType(t)!==we.nan){const n=this._getOrReturnCtx(t);return ge(n,{code:ie.invalid_type,expected:we.nan,received:n.parsedType}),Be}return{status:"valid",value:t.data}}}Hd.create=e=>new Hd({typeName:$e.ZodNaN,...Ze(e)});const Vz=Symbol("zod_brand");class hy extends Je{_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 zc extends Je{_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"?Be:o.status==="dirty"?(r.dirty(),Vi(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"?Be: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 zc({in:t,out:r,typeName:$e.ZodPipeline})}}class pc extends Je{_parse(t){const r=this._def.innerType._parse(t),n=s=>(tc(s)&&(s.value=Object.freeze(s.value)),s);return rc(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}pc.create=(e,t)=>new pc({innerType:e,typeName:$e.ZodReadonly,...Ze(t)});function Zj(e,t={},r){return e?ya.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(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:c})}}):ya.create()}const Wz={object:Rt.lazycreate};var $e;(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"})($e||($e={}));const Bz=(e,t={message:`Input not instance of ${e.name}`})=>Zj(r=>r instanceof e,t),Kj=yn.create,Gj=vo.create,Hz=Hd.create,Yz=yo.create,qj=nc.create,Zz=si.create,Kz=Vd.create,Gz=sc.create,qz=oc.create,Xz=ya.create,Qz=Ko.create,Jz=js.create,e8=Wd.create,t8=_n.create,r8=Rt.create,n8=Rt.strictCreate,s8=ic.create,o8=qf.create,i8=ac.create,a8=Zn.create,l8=lc.create,c8=Bd.create,u8=oi.create,d8=oa.create,f8=cc.create,h8=uc.create,p8=xo.create,m8=dc.create,g8=xa.create,vw=En.create,v8=Wn.create,y8=wo.create,x8=En.createWithPreprocess,w8=zc.create,_8=()=>Kj().optional(),b8=()=>Gj().optional(),S8=()=>qj().optional(),k8={string:e=>yn.create({...e,coerce:!0}),number:e=>vo.create({...e,coerce:!0}),boolean:e=>nc.create({...e,coerce:!0}),bigint:e=>yo.create({...e,coerce:!0}),date:e=>si.create({...e,coerce:!0})},C8=Be;var pe=Object.freeze({__proto__:null,defaultErrorMap:va,setErrorMap:Cz,getErrorMap:zd,makeIssue:Ud,EMPTY_PATH:jz,addIssueToContext:ge,ParseStatus:cr,INVALID:Be,DIRTY:Vi,OK:gr,isAborted:jm,isDirty:Em,isValid:tc,isAsync:rc,get util(){return ot},get objectUtil(){return Cm},ZodParsedType:we,getParsedType:Zs,ZodType:Je,datetimeRegex:Hj,ZodString:yn,ZodNumber:vo,ZodBigInt:yo,ZodBoolean:nc,ZodDate:si,ZodSymbol:Vd,ZodUndefined:sc,ZodNull:oc,ZodAny:ya,ZodUnknown:Ko,ZodNever:js,ZodVoid:Wd,ZodArray:_n,ZodObject:Rt,ZodUnion:ic,ZodDiscriminatedUnion:qf,ZodIntersection:ac,ZodTuple:Zn,ZodRecord:lc,ZodMap:Bd,ZodSet:oi,ZodFunction:oa,ZodLazy:cc,ZodLiteral:uc,ZodEnum:xo,ZodNativeEnum:dc,ZodPromise:xa,ZodEffects:En,ZodTransformer:En,ZodOptional:Wn,ZodNullable:wo,ZodDefault:fc,ZodCatch:hc,ZodNaN:Hd,BRAND:Vz,ZodBranded:hy,ZodPipeline:zc,ZodReadonly:pc,custom:Zj,Schema:Je,ZodSchema:Je,late:Wz,get ZodFirstPartyTypeKind(){return $e},coerce:k8,any:Xz,array:t8,bigint:Yz,boolean:qj,date:Zz,discriminatedUnion:o8,effect:vw,enum:p8,function:d8,instanceof:Bz,intersection:i8,lazy:f8,literal:h8,map:c8,nan:Hz,nativeEnum:m8,never:Jz,null:qz,nullable:y8,number:Gj,object:r8,oboolean:S8,onumber:b8,optional:v8,ostring:_8,pipeline:w8,preprocess:x8,promise:g8,record:l8,set:u8,strictObject:n8,string:Kj,symbol:Kz,transformer:vw,tuple:a8,undefined:Gz,union:s8,unknown:Qz,void:e8,NEVER:C8,ZodIssueCode:ie,quotelessJson:kz,ZodError:Wr}),j8="Label",Xj=v.forwardRef((e,t)=>l.jsx(Re.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())}}));Xj.displayName=j8;var Qj=Xj;const E8=_c("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ma=v.forwardRef(({className:e,...t},r)=>l.jsx(Qj,{ref:r,className:ae(E8(),e),...t}));Ma.displayName=Qj.displayName;const Pr=iz,Jj=v.createContext({}),Ne=({...e})=>l.jsx(Jj.Provider,{value:{name:e.name},children:l.jsx(uz,{...e})}),Xf=()=>{const e=v.useContext(Jj),t=v.useContext(eE),{getFieldState:r,formState:n}=Gf(),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}},eE=v.createContext({}),Ce=v.forwardRef(({className:e,...t},r)=>{const n=v.useId();return l.jsx(eE.Provider,{value:{id:n},children:l.jsx("div",{ref:r,className:ae("space-y-2",e),...t})})});Ce.displayName="FormItem";const je=v.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Xf();return l.jsx(Ma,{ref:r,className:ae(n&&"text-destructive",e),htmlFor:s,...t})});je.displayName="FormLabel";const Ee=v.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Xf();return l.jsx(bs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});Ee.displayName="FormControl";const N8=v.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Xf();return l.jsx("p",{ref:r,id:n,className:ae("text-sm text-muted-foreground",e),...t})});N8.displayName="FormDescription";const Se=v.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Xf(),i=s?String(s==null?void 0:s.message):t;return i?l.jsx("p",{ref:n,id:o,className:ae("text-sm font-medium text-destructive",e),...r,children:i}):null});Se.displayName="FormMessage";function Tm(e,[t,r]){return Math.min(r,Math.max(t,e))}var T8=[" ","Enter","ArrowUp","ArrowDown"],R8=[" ","Enter"],Uc="Select",[Qf,Jf,P8]=bc(Uc),[Ia,E$]=xr(Uc,[P8,Pa]),eh=Pa(),[A8,Eo]=Ia(Uc),[D8,O8]=Ia(Uc),tE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:y}=e,x=eh(t),[g,_]=v.useState(null),[p,h]=v.useState(null),[w,C]=v.useState(!1),j=Ea(u),[E=!1,R]=on({prop:n,defaultProp:s,onChange:o}),[P,A]=on({prop:i,defaultProp:a,onChange:c}),L=v.useRef(null),q=g?!!g.closest("form"):!0,[N,F]=v.useState(new Set),b=Array.from(N).map(V=>V.props.value).join(";");return l.jsx(Xg,{...x,children:l.jsxs(A8,{required:y,scope:t,trigger:g,onTriggerChange:_,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ur(),value:P,onValueChange:A,open:E,onOpenChange:R,dir:j,triggerPointerDownPosRef:L,disabled:m,children:[l.jsx(Qf.Provider,{scope:t,children:l.jsx(D8,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(V=>{F(te=>new Set(te).add(V))},[]),onNativeOptionRemove:v.useCallback(V=>{F(te=>{const W=new Set(te);return W.delete(V),W})},[]),children:r})}),q?l.jsxs(EE,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:V=>A(V.target.value),disabled:m,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},b):null]})})};tE.displayName=Uc;var rE="SelectTrigger",nE=v.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=eh(r),i=Eo(rE,r),a=i.disabled||n,c=Ke(t,i.onTriggerChange),u=Jf(r),[d,f,m]=NE(x=>{const g=u().filter(h=>!h.disabled),_=g.find(h=>h.value===i.value),p=TE(g,x,_);p!==void 0&&i.onValueChange(p.value)}),y=()=>{a||(i.onOpenChange(!0),m())};return l.jsx(Qg,{asChild:!0,...o,children:l.jsx(Re.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":jE(i.value)?"":void 0,...s,ref:c,onClick:ce(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ce(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&T8.includes(x.key)&&(y(),x.preventDefault())})})})});nE.displayName=rE;var sE="SelectValue",oE=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,c=Eo(sE,r),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ke(t,c.onValueNodeChange);return Jt(()=>{u(d)},[u,d]),l.jsx(Re.span,{...a,ref:f,style:{pointerEvents:"none"},children:jE(c.value)?l.jsx(l.Fragment,{children:i}):o})});oE.displayName=sE;var M8="SelectIcon",iE=v.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return l.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});iE.displayName=M8;var I8="SelectPortal",aE=e=>l.jsx(kc,{asChild:!0,...e});aE.displayName=I8;var ii="SelectContent",lE=v.forwardRef((e,t)=>{const r=Eo(ii,e.__scopeSelect),[n,s]=v.useState();if(Jt(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?Ns.createPortal(l.jsx(cE,{scope:e.__scopeSelect,children:l.jsx(Qf.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(uE,{...e,ref:t})});lE.displayName=ii;var ls=10,[cE,No]=Ia(ii),L8="SelectContentImpl",uE=v.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:_,...p}=e,h=Eo(ii,r),[w,C]=v.useState(null),[j,E]=v.useState(null),R=Ke(t,he=>C(he)),[P,A]=v.useState(null),[L,q]=v.useState(null),N=Jf(r),[F,b]=v.useState(!1),V=v.useRef(!1);v.useEffect(()=>{if(w)return tv(w)},[w]),Vg();const te=v.useCallback(he=>{const[ye,...ke]=N().map(Pe=>Pe.ref.current),[Fe]=ke.slice(-1),Me=document.activeElement;for(const Pe of he)if(Pe===Me||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===ye&&j&&(j.scrollTop=0),Pe===Fe&&j&&(j.scrollTop=j.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==Me))return},[N,j]),W=v.useCallback(()=>te([P,w]),[te,P,w]);v.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=h;v.useEffect(()=>{if(w){let he={x:0,y:0};const ye=Fe=>{var Me,Pe;he={x:Math.abs(Math.round(Fe.pageX)-(((Me=I.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Pe=I.current)==null?void 0:Pe.y)??0))}},ke=Fe=>{he.x<=10&&he.y<=10?Fe.preventDefault():w.contains(Fe.target)||Z(!1),document.removeEventListener("pointermove",ye),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",ke,{capture:!0})}}},[w,Z,I]),v.useEffect(()=>{const he=()=>Z(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[Z]);const[Q,z]=NE(he=>{const ye=N().filter(Me=>!Me.disabled),ke=ye.find(Me=>Me.ref.current===document.activeElement),Fe=TE(ye,he,ke);Fe&&setTimeout(()=>Fe.ref.current.focus())}),$=v.useCallback((he,ye,ke)=>{const Fe=!V.current&&!ke;(h.value!==void 0&&h.value===ye||Fe)&&(A(he),Fe&&(V.current=!0))},[h.value]),fe=v.useCallback(()=>w==null?void 0:w.focus(),[w]),ne=v.useCallback((he,ye,ke)=>{const Fe=!V.current&&!ke;(h.value!==void 0&&h.value===ye||Fe)&&q(he)},[h.value]),se=n==="popper"?Rm:dE,Oe=se===Rm?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:_}:{};return l.jsx(cE,{scope:r,content:w,viewport:j,onViewportChange:E,itemRefCallback:$,selectedItem:P,onItemLeave:fe,itemTextRefCallback:ne,focusSelectedItem:W,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:l.jsx(jf,{as:bs,allowPinchZoom:!0,children:l.jsx(wf,{asChild:!0,trapped:h.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:ce(s,he=>{var ye;(ye=h.trigger)==null||ye.focus({preventScroll:!0}),he.preventDefault()}),children:l.jsx(Na,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:l.jsx(se,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:he=>he.preventDefault(),...p,...Oe,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:ce(p.onKeyDown,he=>{const ye=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ye&&he.key.length===1&&z(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Fe=N().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const Me=he.target,Pe=Fe.indexOf(Me);Fe=Fe.slice(Pe+1)}setTimeout(()=>te(Fe)),he.preventDefault()}})})})})})})});uE.displayName=L8;var F8="SelectItemAlignedPosition",dE=v.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=Eo(ii,r),i=No(ii,r),[a,c]=v.useState(null),[u,d]=v.useState(null),f=Ke(t,R=>d(R)),m=Jf(r),y=v.useRef(!1),x=v.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:p,focusSelectedItem:h}=i,w=v.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&g&&_&&p){const R=o.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),L=p.getBoundingClientRect();if(o.dir!=="rtl"){const Me=L.left-P.left,Pe=A.left-Me,nt=R.left-Pe,k=R.width+nt,J=Math.max(k,P.width),K=window.innerWidth-ls,D=Tm(Pe,[ls,K-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const Me=P.right-L.right,Pe=window.innerWidth-A.right-Me,nt=window.innerWidth-R.right-Pe,k=R.width+nt,J=Math.max(k,P.width),K=window.innerWidth-ls,D=Tm(Pe,[ls,K-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=m(),N=window.innerHeight-ls*2,F=g.scrollHeight,b=window.getComputedStyle(u),V=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),W=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=V+te+F+Z+W,Q=Math.min(_.offsetHeight*5,I),z=window.getComputedStyle(g),$=parseInt(z.paddingTop,10),fe=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-ls,se=N-ne,Oe=_.offsetHeight/2,he=_.offsetTop+Oe,ye=V+te+he,ke=I-ye;if(ye<=ne){const Me=_===q[q.length-1].ref.current;a.style.bottom="0px";const Pe=u.clientHeight-g.offsetTop-g.offsetHeight,nt=Math.max(se,Oe+(Me?fe:0)+Pe+W),k=ye+nt;a.style.height=k+"px"}else{const Me=_===q[0].ref.current;a.style.top="0px";const nt=Math.max(ne,V+g.offsetTop+(Me?$:0)+Oe)+ke;a.style.height=nt+"px",g.scrollTop=ye-ne+g.offsetTop}a.style.margin=`${ls}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=N+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[m,o.trigger,o.valueNode,a,u,g,_,p,o.dir,n]);Jt(()=>w(),[w]);const[C,j]=v.useState();Jt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const E=v.useCallback(R=>{R&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return l.jsx(U8,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:E,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:l.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});dE.displayName=F8;var z8="SelectPopperPosition",Rm=v.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=ls,...o}=e,i=eh(r);return l.jsx(Jg,{...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)"}})});Rm.displayName=z8;var[U8,py]=Ia(ii,{}),Pm="SelectViewport",fE=v.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=No(Pm,r),i=py(Pm,r),a=Ke(t,o.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.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}),l.jsx(Qf.Slot,{scope:r,children:l.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&f){const y=Math.abs(c.current-d.scrollTop);if(y>0){const x=window.innerHeight-ls*2,g=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),p=Math.max(g,_);if(p<x){const h=p+y,w=Math.min(x,h),C=h-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});fE.displayName=Pm;var hE="SelectGroup",[$8,V8]=Ia(hE),pE=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Ur();return l.jsx($8,{scope:r,id:s,children:l.jsx(Re.div,{role:"group","aria-labelledby":s,...n,ref:t})})});pE.displayName=hE;var mE="SelectLabel",gE=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=V8(mE,r);return l.jsx(Re.div,{id:s.id,...n,ref:t})});gE.displayName=mE;var Yd="SelectItem",[W8,vE]=Ia(Yd),yE=v.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=Eo(Yd,r),c=No(Yd,r),u=a.value===n,[d,f]=v.useState(o??""),[m,y]=v.useState(!1),x=Ke(t,p=>{var h;return(h=c.itemRefCallback)==null?void 0:h.call(c,p,n,s)}),g=Ur(),_=()=>{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 l.jsx(W8,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:v.useCallback(p=>{f(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:l.jsx(Qf.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:l.jsx(Re.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:ce(i.onFocus,()=>y(!0)),onBlur:ce(i.onBlur,()=>y(!1)),onPointerUp:ce(i.onPointerUp,_),onPointerMove:ce(i.onPointerMove,p=>{var h;s?(h=c.onItemLeave)==null||h.call(c):p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(i.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=c.onItemLeave)==null||h.call(c))}),onKeyDown:ce(i.onKeyDown,p=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&p.key===" "||(R8.includes(p.key)&&_(),p.key===" "&&p.preventDefault())})})})})});yE.displayName=Yd;var ll="SelectItemText",xE=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=Eo(ll,r),a=No(ll,r),c=vE(ll,r),u=O8(ll,r),[d,f]=v.useState(null),m=Ke(t,p=>f(p),c.onItemTextChange,p=>{var h;return(h=a.itemTextRefCallback)==null?void 0:h.call(a,p,c.value,c.disabled)}),y=d==null?void 0:d.textContent,x=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=u;return Jt(()=>(g(x),()=>_(x)),[g,_,x]),l.jsxs(l.Fragment,{children:[l.jsx(Re.span,{id:c.textId,...o,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ns.createPortal(o.children,i.valueNode):null]})});xE.displayName=ll;var wE="SelectItemIndicator",_E=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return vE(wE,r).isSelected?l.jsx(Re.span,{"aria-hidden":!0,...n,ref:t}):null});_E.displayName=wE;var Am="SelectScrollUpButton",bE=v.forwardRef((e,t)=>{const r=No(Am,e.__scopeSelect),n=py(Am,e.__scopeSelect),[s,o]=v.useState(!1),i=Ke(t,n.onScrollButtonChange);return Jt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?l.jsx(kE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});bE.displayName=Am;var Dm="SelectScrollDownButton",SE=v.forwardRef((e,t)=>{const r=No(Dm,e.__scopeSelect),n=py(Dm,e.__scopeSelect),[s,o]=v.useState(!1),i=Ke(t,n.onScrollButtonChange);return Jt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?l.jsx(kE,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});SE.displayName=Dm;var kE=v.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=No("SelectScrollButton",r),i=v.useRef(null),a=Jf(r),c=v.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Jt(()=>{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]),l.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{c()})})}),B8="SelectSeparator",CE=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return l.jsx(Re.div,{"aria-hidden":!0,...n,ref:t})});CE.displayName=B8;var Om="SelectArrow",H8=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=eh(r),o=Eo(Om,r),i=No(Om,r);return o.open&&i.position==="popper"?l.jsx(ev,{...s,...n,ref:t}):null});H8.displayName=Om;function jE(e){return e===""||e===void 0}var EE=v.forwardRef((e,t)=>{const{value:r,...n}=e,s=v.useRef(null),o=Ke(t,s),i=YC(r);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==r&&d){const f=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(f)}},[i,r]),l.jsx(Ic,{asChild:!0,children:l.jsx("select",{...n,ref:o,defaultValue:r})})});EE.displayName="BubbleSelect";function NE(e){const t=Dt(e),r=v.useRef(""),n=v.useRef(0),s=v.useCallback(i=>{const a=r.current+i;t(a),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function TE(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=Y8(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==r));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function Y8(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Z8=tE,RE=nE,K8=oE,G8=iE,q8=aE,PE=lE,X8=fE,Q8=pE,AE=gE,DE=yE,J8=xE,eU=_E,OE=bE,ME=SE,IE=CE;const Mo=Z8,cl=Q8,Io=K8,Ks=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(RE,{ref:n,className:ae("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,l.jsx(G8,{asChild:!0,children:l.jsx(Lg,{className:"h-4 w-4 opacity-50"})})]}));Ks.displayName=RE.displayName;const LE=v.forwardRef(({className:e,...t},r)=>l.jsx(OE,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(aA,{className:"h-4 w-4"})}));LE.displayName=OE.displayName;const FE=v.forwardRef(({className:e,...t},r)=>l.jsx(ME,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Lg,{className:"h-4 w-4"})}));FE.displayName=ME.displayName;const Gs=v.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>l.jsx(q8,{children:l.jsxs(PE,{ref:s,className:ae("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:[l.jsx(LE,{}),l.jsx(X8,{className:ae("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(FE,{})]})}));Gs.displayName=PE.displayName;const Wi=v.forwardRef(({className:e,...t},r)=>l.jsx(AE,{ref:r,className:ae("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Wi.displayName=AE.displayName;const pn=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(DE,{ref:n,className:ae("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:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(eU,{children:l.jsx(eb,{className:"h-4 w-4"})})}),l.jsx(J8,{children:t})]}));pn.displayName=DE.displayName;const tU=v.forwardRef(({className:e,...t},r)=>l.jsx(IE,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));tU.displayName=IE.displayName;const Mm=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["阿里云-DCDN","/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"]]]),rU=Array.from(Mm.keys()),my=mv,gy=gv,nU=vv,zE=v.forwardRef(({className:e,...t},r)=>l.jsx(Ec,{ref:r,className:ae("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}));zE.displayName=Ec.displayName;const th=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(nU,{children:[l.jsx(zE,{}),l.jsxs(Nc,{ref:n,className:ae("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,l.jsxs(Tf,{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:[l.jsx(Fg,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));th.displayName=Nc.displayName;const rh=({className:e,...t})=>l.jsx("div",{className:ae("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rh.displayName="DialogHeader";const nh=v.forwardRef(({className:e,...t},r)=>l.jsx(Tc,{ref:r,className:ae("text-lg font-semibold leading-none tracking-tight",e),...t}));nh.displayName=Tc.displayName;const sU=v.forwardRef(({className:e,...t},r)=>l.jsx(Rc,{ref:r,className:ae("text-sm text-muted-foreground",e),...t}));sU.displayName=Rc.displayName;function oU(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var vy="ScrollArea",[UE,N$]=xr(vy),[iU,cn]=UE(vy),$E=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,c]=v.useState(null),[u,d]=v.useState(null),[f,m]=v.useState(null),[y,x]=v.useState(null),[g,_]=v.useState(null),[p,h]=v.useState(0),[w,C]=v.useState(0),[j,E]=v.useState(!1),[R,P]=v.useState(!1),A=Ke(t,q=>c(q)),L=Ea(s);return l.jsx(iU,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:j,onScrollbarXEnabledChange:E,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:R,onScrollbarYEnabledChange:P,onCornerWidthChange:h,onCornerHeightChange:C,children:l.jsx(Re.div,{dir:L,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});$E.displayName=vy;var VE="ScrollAreaViewport",WE=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=cn(VE,r),a=v.useRef(null),c=Ke(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.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}),l.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});WE.displayName=VE;var Xn="ScrollAreaScrollbar",yy=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return v.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?l.jsx(aU,{...n,ref:t,forceMount:r}):s.type==="scroll"?l.jsx(lU,{...n,ref:t,forceMount:r}):s.type==="auto"?l.jsx(BE,{...n,ref:t,forceMount:r}):s.type==="always"?l.jsx(xy,{...n,ref:t}):null});yy.displayName=Xn;var aU=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),[o,i]=v.useState(!1);return v.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(ur,{present:r||o,children:l.jsx(BE,{"data-state":o?"visible":"hidden",...n,ref:t})})}),lU=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Xn,e.__scopeScrollArea),o=e.orientation==="horizontal",i=oh(()=>c("SCROLL_END"),100),[a,c]=oU("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 v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),v.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const y=u[d];f!==y&&(c("SCROLL"),i()),f=y};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,o,c,i]),l.jsx(ur,{present:r||a!=="hidden",children:l.jsx(xy,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),BE=v.forwardRef((e,t)=>{const r=cn(Xn,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=v.useState(!1),a=e.orientation==="horizontal",c=oh(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(a?u:d)}},10);return wa(r.viewport,c),wa(r.content,c),l.jsx(ur,{present:n||o,children:l.jsx(xy,{"data-state":o?"visible":"hidden",...s,ref:t})})}),xy=v.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=cn(Xn,e.__scopeScrollArea),o=v.useRef(null),i=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=GE(a.viewport,a.content),d={...n,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function f(m,y){return pU(m,i.current,a,y)}return r==="horizontal"?l.jsx(cU,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollLeft,y=yw(m,a,s.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,s.dir))}}):r==="vertical"?l.jsx(uU,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const m=s.viewport.scrollTop,y=yw(m,a);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null}),cU=v.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=cn(Xn,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,o.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(YE,{"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":sh(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),XE(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Kd(i.paddingLeft),paddingEnd:Kd(i.paddingRight)}})}})}),uU=v.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=cn(Xn,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,o.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(YE,{"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":sh(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),XE(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Kd(i.paddingTop),paddingEnd:Kd(i.paddingBottom)}})}})}),[dU,HE]=UE(Xn),YE=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,y=cn(Xn,r),[x,g]=v.useState(null),_=Ke(t,A=>g(A)),p=v.useRef(null),h=v.useRef(""),w=y.viewport,C=n.content-n.viewport,j=Dt(d),E=Dt(c),R=oh(f,10);function P(A){if(p.current){const L=A.clientX-p.current.left,q=A.clientY-p.current.top;u({x:L,y:q})}}return v.useEffect(()=>{const A=L=>{const q=L.target;(x==null?void 0:x.contains(q))&&j(L,C)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[w,x,C,j]),v.useEffect(E,[n,E]),wa(x,R),wa(y.content,R),l.jsx(dU,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:Dt(o),onThumbPointerUp:Dt(i),onThumbPositionChange:E,onThumbPointerDown:Dt(a),children:l.jsx(Re.div,{...m,ref:_,style:{position:"absolute",...m.style},onPointerDown:ce(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),p.current=x.getBoundingClientRect(),h.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),P(A))}),onPointerMove:ce(e.onPointerMove,P),onPointerUp:ce(e.onPointerUp,A=>{const L=A.target;L.hasPointerCapture(A.pointerId)&&L.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=h.current,y.viewport&&(y.viewport.style.scrollBehavior=""),p.current=null})})})}),Zd="ScrollAreaThumb",ZE=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=HE(Zd,e.__scopeScrollArea);return l.jsx(ur,{present:r||s.hasThumb,children:l.jsx(fU,{ref:t,...n})})}),fU=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=cn(Zd,r),i=HE(Zd,r),{onThumbPositionChange:a}=i,c=Ke(t,f=>i.onThumbChange(f)),u=v.useRef(),d=oh(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const f=o.viewport;if(f){const m=()=>{if(d(),!u.current){const y=mU(f,a);u.current=y,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[o.viewport,d,a]),l.jsx(Re.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ce(e.onPointerDownCapture,f=>{const y=f.target.getBoundingClientRect(),x=f.clientX-y.left,g=f.clientY-y.top;i.onThumbPointerDown({x,y:g})}),onPointerUp:ce(e.onPointerUp,i.onThumbPointerUp)})});ZE.displayName=Zd;var wy="ScrollAreaCorner",KE=v.forwardRef((e,t)=>{const r=cn(wy,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?l.jsx(hU,{...e,ref:t}):null});KE.displayName=wy;var hU=v.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=cn(wy,r),[o,i]=v.useState(0),[a,c]=v.useState(0),u=!!(o&&a);return wa(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),wa(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?l.jsx(Re.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 Kd(e){return e?parseInt(e,10):0}function GE(e,t){const r=e/t;return isNaN(r)?0:r}function sh(e){const t=GE(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function pU(e,t,r,n="ltr"){const s=sh(r),o=s/2,i=t||o,a=s-i,c=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 qE([c,u],f)(e)}function yw(e,t,r="ltr"){const n=sh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,c=r==="ltr"?[0,i]:[i*-1,0],u=Tm(e,c);return qE([0,i],[0,a])(u)}function qE(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 XE(e,t){return e>0&&e<t}var mU=(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 oh(e,t){const r=Dt(e),n=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),v.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function wa(e,t){const r=Dt(t);Jt(()=>{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 QE=$E,gU=WE,vU=KE;const ih=v.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(QE,{ref:n,className:ae("relative overflow-hidden",e),...r,children:[l.jsx(gU,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(JE,{}),l.jsx(vU,{})]}));ih.displayName=QE.displayName;const JE=v.forwardRef(({className:e,orientation:t="vertical",...r},n)=>l.jsx(yy,{ref:n,orientation:t,className:ae("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:l.jsx(ZE,{className:"relative flex-1 rounded-full bg-border"})}));JE.displayName=yy.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"]]]),xw=e=>uo.get(e),To=pe.union([pe.literal("aliyun"),pe.literal("tencent"),pe.literal("ssh"),pe.literal("webhook"),pe.literal("cloudflare"),pe.literal("qiniu"),pe.literal("namesilo"),pe.literal("godaddy")],{message:"请选择云服务商"}),Ro=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"}},yU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,secretId:pe.string().min(1).max(64),secretKey:pe.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=Tr({resolver:Rr(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 c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{secretId:c.secretId,secretKey:c.secretKey}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"secretId",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"SecretId"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入SecretId",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"secretKey",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"SecretKey"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入SecretKey",...c})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},xU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,accessKeyId:pe.string().min(1).max(64),accessSecretId:pe.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=Tr({resolver:Rr(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 c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{accessKeyId:c.accessKeyId,accessKeySecret:c.accessSecretId}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"accessKeyId",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"AccessKeyId"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入AccessKeyId",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"accessSecretId",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"AccessKeySecret"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入AccessKeySecret",...c})}),l.jsx(Se,{})]})}),l.jsx(Se,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},mc=v.forwardRef(({className:e,...t},r)=>l.jsx("textarea",{className:ae("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}));mc.displayName="Textarea";const _y=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=Kr(),[n,s]=v.useState(!1),o=pe.object({name:pe.string().min(1).max(64)}),i=Tr({resolver:Rr(o),defaultValues:{name:""}}),a=async c=>{try{await S3({name:c.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([f,m])=>{i.setError(f,{type:"manual",message:m.message})})}};return l.jsxs(my,{onOpenChange:s,open:n,children:[l.jsx(gy,{asChild:!0,className:ae(e),children:t}),l.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(rh,{children:l.jsx(nh,{children:"添加分组"})}),l.jsx("div",{className:"container py-3",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"组名"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入组名",...c,type:"text"})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})},wU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:o}}=Kr(),i=v.useRef(null),[a,c]=v.useState(""),u=e&&e.group?e.group:"",d=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,f=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,m=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,host:pe.string().refine(h=>f.test(h)||d.test(h),{message:"请输入正确的域名或IP"}),group:pe.string().optional(),port:pe.string().min(1).max(5),username:pe.string().min(1).max(64),password:pe.string().min(0).max(64),key:pe.string().min(0).max(20480),keyFile:pe.any().optional(),command:pe.string().min(1).max(2048),certPath:pe.string().min(0).max(2048),keyPath:pe.string().min(0).max(2048)});let y={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&&(y=e.config);const x=Tr({resolver:Rr(m),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",group:e==null?void 0:e.group,host:y.host,port:y.port,username:y.username,password:y.password,key:y.key,keyFile:y.keyFile,certPath:y.certPath,keyPath:y.keyPath,command:y.command}}),g=async h=>{console.log(h);let w=h.group;w=="emptyId"&&(w="");const C={id:h.id,name:h.name,configType:h.configType,usage:Ro(h.configType),group:w,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 j=await jo(C);t(),C.id=j.id,C.created=j.created,C.updated=j.updated,h.id?n(C):r(C),w!=u&&(u&&await nw({id:u,"access-":C.id}),w&&await nw({id:w,"access+":C.id})),s()}catch(j){Object.entries(j.response.data).forEach(([R,P])=>{x.setError(R,{type:"manual",message:P.message})});return}},_=async h=>{var E;const w=(E=h.target.files)==null?void 0:E[0];if(!w)return;const C=w;c(C.name);const j=await K6(C);x.setValue("key",j)},p=()=>{var h;console.log(i.current),(h=i.current)==null||h.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...x,children:l.jsxs("form",{onSubmit:h=>{h.stopPropagation(),x.handleSubmit(g)(h)},className:"space-y-3",children:[l.jsx(Ne,{control:x.control,name:"name",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"group",render:({field:h})=>l.jsxs(Ce,{children:[l.jsxs(je,{className:"w-full flex justify-between",children:[l.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),l.jsx(_y,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(zu,{size:14}),"新增"]})})]}),l.jsx(Ee,{children:l.jsxs(Mo,{...h,value:h.value,defaultValue:"emptyId",onValueChange:w=>{x.setValue("group",w)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择分组"})}),l.jsxs(Gs,{children:[l.jsx(pn,{value:"emptyId",children:l.jsx("div",{className:ae("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),o.map(w=>l.jsx(pn,{value:w.id?w.id:"",children:l.jsx("div",{className:ae("flex items-center space-x-2 rounded cursor-pointer"),children:w.name})},w.id))]})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"id",render:({field:h})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"configType",render:({field:h})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...h})}),l.jsx(Se,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Ne,{control:x.control,name:"host",render:({field:h})=>l.jsxs(Ce,{className:"grow",children:[l.jsx(je,{children:"服务器HOST"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入Host",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"port",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"SSH端口"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入Port",...h,type:"number"})}),l.jsx(Se,{})]})})]}),l.jsx(Ne,{control:x.control,name:"username",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"用户名"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入用户名",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"password",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"密码"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入密码",...h,type:"password"})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"key",render:({field:h})=>l.jsxs(Ce,{hidden:!0,children:[l.jsx(je,{children:"Key使用证书登录"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入Key",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"keyFile",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"Key使用证书登录"}),l.jsx(Ee,{children:l.jsxs("div",{children:[l.jsx(He,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:p,children:a||"请选择文件"}),l.jsx(Te,{placeholder:"请输入Key",...h,ref:i,className:"hidden",hidden:!0,type:"file",onChange:_})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"certPath",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"证书上传路径"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入证书上传路径",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"keyPath",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"私钥上传路径"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入私钥上传路径",...h})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:x.control,name:"command",render:({field:h})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"Command"}),l.jsx(Ee,{children:l.jsx(mc,{placeholder:"请输入要执行的命令",...h})}),l.jsx(Se,{})]})}),l.jsx(Se,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},_U=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,url:pe.string().url()});let o={url:""};e&&(o=e.config);const i=Tr({resolver:Rr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:o.url}}),a=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{url:c.url}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"url",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"Webhook Url"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入Webhook Url",...c})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},bU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,dnsApiToken:pe.string().min(1).max(64)});let o={dnsApiToken:""};e&&(o=e.config);const i=Tr({resolver:Rr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:o.dnsApiToken}}),a=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{dnsApiToken:c.dnsApiToken}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"dnsApiToken",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"CLOUD_DNS_API_TOKEN"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...c})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},SU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,accessKey:pe.string().min(1).max(64),secretKey:pe.string().min(1).max(64)});let o={accessKey:"",secretKey:""};e&&(o=e.config);const i=Tr({resolver:Rr(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 c=>{const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{accessKey:c.accessKey,secretKey:c.secretKey}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"accessKey",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"AccessKey"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入AccessKey",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"secretKey",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"SecretKey"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入SecretKey",...c})}),l.jsx(Se,{})]})}),l.jsx(Se,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},kU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,apiKey:pe.string().min(1).max(64)});let o={apiKey:""};e&&(o=e.config);const i=Tr({resolver:Rr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:o.apiKey}}),a=async c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{apiKey:c.apiKey}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"apiKey",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"NAMESILO_API_KEY"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入NAMESILO_API_KEY",...c})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})},CU=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Kr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:To,apiKey:pe.string().min(1).max(64),apiSecret:pe.string().min(1).max(64)});let o={apiKey:"",apiSecret:""};e&&(o=e.config);const i=Tr({resolver:Rr(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 c=>{console.log(c);const u={id:c.id,name:c.name,configType:c.configType,usage:Ro(c.configType),config:{apiKey:c.apiKey,apiSecret:c.apiSecret}};try{const d=await jo(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,c.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,y])=>{i.setError(m,{type:"manual",message:y.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(Pr,{...i,children:l.jsxs("form",{onSubmit:c=>{console.log(c),c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-8",children:[l.jsx(Ne,{control:i.control,name:"name",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"名称"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入授权名称",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"id",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"configType",render:({field:c})=>l.jsxs(Ce,{className:"hidden",children:[l.jsx(je,{children:"配置类型"}),l.jsx(Ee,{children:l.jsx(Te,{...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"apiKey",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"GODADDY_API_KEY"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入GODADDY_API_KEY",...c})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:i.control,name:"apiSecret",render:({field:c})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"GODADDY_API_SECRET"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入GODADDY_API_SECRET",...c})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})})};function jl({trigger:e,op:t,data:r,className:n}){const[s,o]=v.useState(!1),i=Array.from(uo.keys()),[a,c]=v.useState((r==null?void 0:r.configType)||"");let u=l.jsx(l.Fragment,{children:" "});switch(a){case"tencent":u=l.jsx(yU,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":u=l.jsx(xU,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":u=l.jsx(wU,{data:r,onAfterReq:()=>{o(!1)}});break;case"webhook":u=l.jsx(_U,{data:r,onAfterReq:()=>{o(!1)}});break;case"cloudflare":u=l.jsx(bU,{data:r,onAfterReq:()=>{o(!1)}});break;case"qiniu":u=l.jsx(SU,{data:r,onAfterReq:()=>{o(!1)}});break;case"namesilo":u=l.jsx(kU,{data:r,onAfterReq:()=>{o(!1)}});break;case"godaddy":u=l.jsx(CU,{data:r,onAfterReq:()=>{o(!1)}});break}const d=f=>f==a?"border-primary":"";return l.jsxs(my,{onOpenChange:o,open:s,children:[l.jsx(gy,{asChild:!0,className:ae(n),children:e}),l.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(rh,{children:l.jsxs(nh,{children:[t=="add"?"添加":"编辑","授权"]})}),l.jsx(ih,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Ma,{children:"服务商"}),l.jsxs(Mo,{onValueChange:f=>{console.log(f),c(f)},defaultValue:a,children:[l.jsx(Ks,{className:"mt-3",children:l.jsx(Io,{placeholder:"请选择服务商"})}),l.jsx(Gs,{children:l.jsxs(cl,{children:[l.jsx(Wi,{children:"服务商"}),i.map(f=>{var m,y;return l.jsx(pn,{value:f,children:l.jsxs("div",{className:ae("flex items-center space-x-2 rounded cursor-pointer",d(f)),children:[l.jsx("img",{src:(m=uo.get(f))==null?void 0:m[1],className:"h-6 w-6"}),l.jsx("div",{children:(y=uo.get(f))==null?void 0:y[0]})]})},f)})]})})]}),u]})})]})]})}const jU=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=Kr(),[s,o]=v.useState(!1),i=pe.object({email:pe.string().email()}),a=Tr({resolver:Rr(i),defaultValues:{email:""}}),c=async u=>{if(r.content.emails.includes(u.email)){a.setError("email",{message:"邮箱已存在"});return}const d=[...r.content.emails,u.email];try{const f=await Mc({...r,name:"emails",content:{emails:d}});n(f),a.reset(),a.clearErrors(),o(!1)}catch(f){Object.entries(f.response.data).forEach(([y,x])=>{a.setError(y,{type:"manual",message:x.message})})}};return l.jsxs(my,{onOpenChange:o,open:s,children:[l.jsx(gy,{asChild:!0,className:ae(e),children:t}),l.jsxs(th,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(rh,{children:l.jsx(nh,{children:"添加邮箱"})}),l.jsx("div",{className:"container py-3",children:l.jsx(Pr,{...a,children:l.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(Ne,{control:a.control,name:"email",render:({field:u})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"邮箱"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入邮箱",...u,type:"email"})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})},EU=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=Kr(),[n,s]=v.useState(),o=Nn(),[i,a]=v.useState("base"),[c,u]=v.useState(n?n.targetType:"");v.useEffect(()=>{const p=new URLSearchParams(o.search).get("id");p&&(async()=>{const w=await J6(p);s(w),u(w.targetType)})()},[o.search]);const d=pe.object({id:pe.string().optional(),domain:pe.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:pe.string().email().optional(),access:pe.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:pe.string().optional(),targetType:pe.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:pe.string().optional(),group:pe.string().optional(),nameservers:pe.string().optional()}),f=Tr({resolver:Rr(d),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});v.useEffect(()=>{n&&f.reset({id:n.id,domain:n.domain,email:n.email,access:n.access,targetAccess:n.targetAccess,targetType:n.targetType,variables:n.variables,group:n.group,nameservers:n.nameservers})},[n,f]);const m=e.filter(_=>{if(_.usage=="apply")return!1;if(c=="")return!0;const p=c.split("-");return _.configType===p[0]}),{toast:y}=qn(),x=Nr(),g=async _=>{const p=_.group=="emptyId"?"":_.group,h=_.targetAccess==="emptyId"?"":_.targetAccess;if(p==""&&h==""){f.setError("group",{type:"manual",message:"部署授权和部署授权组至少选一个"}),f.setError("targetAccess",{type:"manual",message:"部署授权和部署授权组至少选一个"});return}const w={id:_.id,crontab:"0 0 * * *",domain:_.domain,email:_.email,access:_.access,group:p,targetAccess:h,targetType:_.targetType,variables:_.variables,nameservers:_.nameservers};try{await km(w);let C="域名编辑成功";w.id==""&&(C="域名添加成功"),y({title:"成功",description:C}),x("/domains")}catch(C){Object.entries(C.response.data).forEach(([E,R])=>{f.setError(E,{type:"manual",message:R.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(ay,{}),l.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[l.jsx("div",{className:ae("cursor-pointer text-right",i==="base"?"text-primary":""),onClick:()=>{a("base")},children:"基础设置"}),l.jsx("div",{className:ae("cursor-pointer text-right",i==="advance"?"text-primary":""),onClick:()=>{a("advance")},children:"高级设置"})]}),l.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:l.jsx(Pr,{...f,children:l.jsxs("form",{onSubmit:f.handleSubmit(g),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Ne,{control:f.control,name:"domain",render:({field:_})=>l.jsxs(Ce,{hidden:i!="base",children:[l.jsx(je,{children:"域名"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入域名",..._})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"email",render:({field:_})=>l.jsxs(Ce,{hidden:i!="base",children:[l.jsxs(je,{className:"flex w-full justify-between",children:[l.jsx("div",{children:"Email申请证书需要提供邮箱"}),l.jsx(jU,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(zu,{size:14}),"新增"]})})]}),l.jsx(Ee,{children:l.jsxs(Mo,{..._,value:_.value,onValueChange:p=>{f.setValue("email",p)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择邮箱"})}),l.jsx(Gs,{children:l.jsxs(cl,{children:[l.jsx(Wi,{children:"邮箱列表"}),t.content.emails.map(p=>l.jsx(pn,{value:p,children:l.jsx("div",{children:p})},p))]})})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"access",render:({field:_})=>l.jsxs(Ce,{hidden:i!="base",children:[l.jsxs(je,{className:"flex w-full justify-between",children:[l.jsx("div",{children:"DNS 服务商授权配置"}),l.jsx(jl,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(zu,{size:14}),"新增"]}),op:"add"})]}),l.jsx(Ee,{children:l.jsxs(Mo,{..._,value:_.value,onValueChange:p=>{f.setValue("access",p)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择授权配置"})}),l.jsx(Gs,{children:l.jsxs(cl,{children:[l.jsx(Wi,{children:"服务商授权配置"}),e.filter(p=>p.usage!="deploy").map(p=>{var h;return l.jsx(pn,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(h=uo.get(p.configType))==null?void 0:h[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"targetType",render:({field:_})=>l.jsxs(Ce,{hidden:i!="base",children:[l.jsx(je,{children:"部署服务类型"}),l.jsx(Ee,{children:l.jsxs(Mo,{..._,onValueChange:p=>{u(p),f.setValue("targetType",p)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择部署服务类型"})}),l.jsx(Gs,{children:l.jsxs(cl,{children:[l.jsx(Wi,{children:"部署服务类型"}),rU.map(p=>{var h,w;return l.jsx(pn,{value:p,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(h=Mm.get(p))==null?void 0:h[1]}),l.jsx("div",{children:(w=Mm.get(p))==null?void 0:w[0]})]})},p)})]})})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"targetAccess",render:({field:_})=>l.jsxs(Ce,{hidden:i!="base",children:[l.jsxs(je,{className:"w-full flex justify-between",children:[l.jsx("div",{children:"部署服务商授权配置"}),l.jsx(jl,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(zu,{size:14}),"新增"]}),op:"add"})]}),l.jsx(Ee,{children:l.jsxs(Mo,{..._,onValueChange:p=>{f.setValue("targetAccess",p)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择授权配置"})}),l.jsx(Gs,{children:l.jsxs(cl,{children:[l.jsxs(Wi,{children:["服务商授权配置",f.getValues().targetAccess]}),l.jsx(pn,{value:"emptyId",children:l.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(p=>{var h;return l.jsx(pn,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(h=uo.get(p.configType))==null?void 0:h[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"group",render:({field:_})=>l.jsxs(Ce,{hidden:i!="advance"||c!="ssh",children:[l.jsx(je,{className:"w-full flex justify-between",children:l.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),l.jsx(Ee,{children:l.jsxs(Mo,{..._,value:_.value,defaultValue:"emptyId",onValueChange:p=>{f.setValue("group",p)},children:[l.jsx(Ks,{children:l.jsx(Io,{placeholder:"请选择分组"})}),l.jsxs(Gs,{children:[l.jsx(pn,{value:"emptyId",children:l.jsx("div",{className:ae("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),r.filter(p=>{var h;return p.expand&&((h=p.expand)==null?void 0:h.access.length)>0}).map(p=>l.jsx(pn,{value:p.id?p.id:"",children:l.jsx("div",{className:ae("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"variables",render:({field:_})=>l.jsxs(Ce,{hidden:i!="advance",children:[l.jsx(je,{children:"变量"}),l.jsx(Ee,{children:l.jsx(mc,{placeholder:`可在SSH部署中使用,形如:
key=val;
key2=val2;`,..._,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:f.control,name:"nameservers",render:({field:_})=>l.jsxs(Ce,{hidden:i!="advance",children:[l.jsx(je,{children:"域名服务器"}),l.jsx(Ee,{children:l.jsx(mc,{placeholder:`自定义域名服务器,多个用分号隔开,如:
8.8.8.8;
8.8.4.4;`,..._,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"保存"})})]})})})]})]})})},eN=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:ae("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));eN.displayName="Card";const tN=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:ae("flex flex-col space-y-1.5 p-6",e),...t}));tN.displayName="CardHeader";const rN=v.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:ae("text-2xl font-semibold leading-none tracking-tight",e),...t}));rN.displayName="CardTitle";const nN=v.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:ae("text-sm text-muted-foreground",e),...t}));nN.displayName="CardDescription";const sN=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:ae("p-6 pt-0",e),...t}));sN.displayName="CardContent";const oN=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:ae("flex items-center p-6 pt-0",e),...t}));oN.displayName="CardFooter";const _o=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",NU=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Kr(),{toast:r}=qn(),n=Nr(),s=async i=>{try{await b3(i),t()}catch(a){r({title:"删除失败",description:_o(a),variant:"destructive"});return}},o=()=>{n("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(na,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(v0,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),l.jsx(_y,{trigger:l.jsx(He,{children:"新增授权组"}),className:"mt-3"})]})})}),l.jsx(ih,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(i=>l.jsxs(eN,{className:"w-full md:w-[350px]",children:[l.jsxs(tN,{children:[l.jsx(rN,{children:i.name}),l.jsxs(nN,{children:["共有",i.expand?i.expand.access.length:0,"个部署授权配置"]})]}),l.jsx(sN,{className:"min-h-[180px]",children:i.expand?l.jsx(l.Fragment,{children:i.expand.access.slice(0,3).map(a=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:xw(a.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:a.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:xw(a.configType)[0]})]})]})},a.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(v0,{size:40})}),l.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),l.jsx(oN,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(na,{when:!!(i.expand&&i.expand.access.length>0),children:l.jsx("div",{children:l.jsx(He,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${i.id}&tab=access`,{replace:!0})},children:"所有授权"})})}),l.jsx(na,{when:!i.expand||i.expand.access.length==0,children:l.jsx("div",{children:l.jsx(He,{size:"sm",onClick:o,children:"新增授权"})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(WC,{children:[l.jsx(BC,{asChild:!0,children:l.jsx(He,{variant:"destructive",size:"sm",children:"删除"})}),l.jsxs(qv,{children:[l.jsxs(Xv,{children:[l.jsx(Jv,{className:"dark:text-gray-200",children:"删除组"}),l.jsx(ey,{children:"确定要删除部署授权组吗?"})]}),l.jsxs(Qv,{children:[l.jsx(ry,{className:"dark:text-gray-200",children:"取消"}),l.jsx(ty,{onClick:()=>{s(i.id?i.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})};var by="Tabs",[TU,T$]=xr(by,[kf]),iN=kf(),[RU,Sy]=TU(by),aN=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Ea(a),[f,m]=on({prop:n,onChange:s,defaultProp:o});return l.jsx(RU,{scope:r,baseId:Ur(),value:f,onValueChange:m,orientation:i,dir:d,activationMode:c,children:l.jsx(Re.div,{dir:d,"data-orientation":i,...u,ref:t})})});aN.displayName=by;var lN="TabsList",cN=v.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,o=Sy(lN,r),i=iN(r);return l.jsx(Fb,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:n,children:l.jsx(Re.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});cN.displayName=lN;var uN="TabsTrigger",dN=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=e,i=Sy(uN,r),a=iN(r),c=pN(i.baseId,n),u=mN(i.baseId,n),d=n===i.value;return l.jsx(zb,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ce(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:ce(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:ce(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(n)})})})});dN.displayName=uN;var fN="TabsContent",hN=v.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...i}=e,a=Sy(fN,r),c=pN(a.baseId,n),u=mN(a.baseId,n),d=n===a.value,f=v.useRef(d);return v.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(ur,{present:s||d,children:({present:m})=>l.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&o})})});hN.displayName=fN;function pN(e,t){return`${e}-trigger-${t}`}function mN(e,t){return`${e}-content-${t}`}var PU=aN,gN=cN,vN=dN,yN=hN;const xN=PU,ky=v.forwardRef(({className:e,...t},r)=>l.jsx(gN,{ref:r,className:ae("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ky.displayName=gN.displayName;const ia=v.forwardRef(({className:e,...t},r)=>l.jsx(vN,{ref:r,className:ae("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));ia.displayName=vN.displayName;const Gd=v.forwardRef(({className:e,...t},r)=>l.jsx(yN,{ref:r,className:ae("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Gd.displayName=yN.displayName;const AU=()=>{const{config:e,deleteAccess:t}=Kr(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),o=Nr(),i=Nn(),a=new URLSearchParams(i.search),c=a.get("page"),u=c?Number(c):1,d=a.get("tab"),f=a.get("accessGroupId"),m=(u-1)*n,y=m+n,x=async _=>{const p=await _3(_);t(p.id)},g=_=>{a.set("tab",_),o({search:a.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),d!="access_group"?l.jsx(jl,{trigger:l.jsx(He,{children:"添加授权"}),op:"add"}):l.jsx(_y,{trigger:l.jsx(He,{children:"添加授权组"})})]}),l.jsxs(xN,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[l.jsxs(ky,{className:"space-x-5 px-3",children:[l.jsx(ia,{value:"access",onClick:()=>{g("access")},children:"授权管理"}),l.jsx(ia,{value:"access_group",onClick:()=>{g("access_group")},children:"授权组管理"})]}),l.jsx(Gd,{value:"access",children:r.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(hA,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),l.jsx(jl,{trigger:l.jsx(He,{children:"添加授权"}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:"名称"}),l.jsx("div",{className:"w-48",children:"服务商"}),l.jsx("div",{className:"w-52",children:"创建时间"}),l.jsx("div",{className:"w-52",children:"更新时间"}),l.jsx("div",{className:"grow",children:"操作"})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.filter(_=>f?_.group==f:!0).slice(m,y).map(_=>{var p,h;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:_.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(p=uo.get(_.configType))==null?void 0:p[1],className:"w-6"}),l.jsx("div",{children:(h=uo.get(_.configType))==null?void 0:h[0]})]}),l.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于"," ",_.created&&ga(_.created)]}),l.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于"," ",_.updated&&ga(_.updated)]}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(jl,{trigger:l.jsx(He,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:_}),l.jsx(Wt,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(He,{variant:"link",className:"p-0",onClick:()=>{x(_)},children:"删除"})]})]},_.id)}),l.jsx(SC,{totalPages:s,currentPage:u,onPageChange:_=>{a.set("page",_.toString()),o({search:a.toString()})}})]})}),l.jsx(Gd,{value:"access_group",children:l.jsx(NU,{})})]})]})},DU=_c("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"}}),Cy=v.forwardRef(({className:e,variant:t,...r},n)=>l.jsx("div",{ref:n,role:"alert",className:ae(DU({variant:t}),e),...r}));Cy.displayName="Alert";const jy=v.forwardRef(({className:e,...t},r)=>l.jsx("h5",{ref:r,className:ae("mb-1 font-medium leading-none tracking-tight",e),...t}));jy.displayName="AlertTitle";const Ey=v.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:ae("text-sm [&_p]:leading-relaxed",e),...t}));Ey.displayName="AlertDescription";const wN=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 st().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},OU=()=>{const e=Nr(),[t,r]=v.useState(),[n]=JP(),s=n.get("domain");return v.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await wN(i);r(a.items)})()},[s]),l.jsxs(ih,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:"域名"}),l.jsx("div",{className:"w-24",children:"状态"}),l.jsx("div",{className:"w-56",children:"阶段"}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),l.jsx("div",{className:"grow",children:"操作"})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return l.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:[l.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}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Gv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Hv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ga(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(yv,{children:[l.jsx(xv,{asChild:!0,children:l.jsx(He,{variant:"link",className:"p-0",children:"日志"})}),l.jsxs(Rf,{className:"sm:max-w-5xl",children:[l.jsx(wv,{children:l.jsxs(_v,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.info&&c.info.map(u=>l.jsx("div",{className:"mt-1 text-green-600",children:u})),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))})]})]})]})})]},o.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(Cy,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(jy,{children:"暂无数据"}),l.jsxs(Ey,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(tb,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(He,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},MU=pe.object({username:pe.string().email({message:"请输入正确的邮箱地址"}),password:pe.string().min(10,{message:"密码至少10个字符"})}),IU=()=>{const e=Tr({resolver:Rr(MU),defaultValues:{username:"",password:""}}),t=async n=>{try{await st().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=_o(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=Nr();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(Pr,{...e,children:l.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Ne,{control:e.control,name:"username",render:({field:n})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"用户名"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"email",...n})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:e.control,name:"password",render:({field:n})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"密码"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"shadcn",...n,type:"password"})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"登录"})})]})})]})},LU=()=>st().authStore.isValid&&st().authStore.isAdmin?l.jsx(Q1,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(Ig,{}),l.jsx(cC,{})]}),FU=pe.object({oldPassword:pe.string().min(10,{message:"密码至少10个字符"}),newPassword:pe.string().min(10,{message:"密码至少10个字符"}),confirmPassword:pe.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),zU=()=>{const{toast:e}=qn(),t=Nr(),r=Tr({resolver:Rr(FU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await st().admins.authWithPassword((o=st().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const c=_o(a);r.setError("oldPassword",{message:c})}try{await st().admins.update((i=st().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),st().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const c=_o(a);e({title:"修改密码失败",description:c,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(Pr,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Ne,{control:r.control,name:"oldPassword",render:({field:s})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"当前密码"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"当前密码",...s,type:"password"})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:r.control,name:"newPassword",render:({field:s})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"新密码"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"newPassword",...s,type:"password"})}),l.jsx(Se,{})]})}),l.jsx(Ne,{control:r.control,name:"confirmPassword",render:({field:s})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"确认密码"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"confirmPassword",...s,type:"password"})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(He,{type:"submit",children:"确认修改"})})]})})})})},UU=()=>{const e=Nn(),[t,r]=v.useState("account"),n=Nr();return v.useEffect(()=>{const o=e.pathname.split("/")[2];r(o)},[e]),l.jsxs("div",{children:[l.jsx(ay,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"偏好设置"}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(xN,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(ky,{className:"mx-auto",children:[l.jsxs(ia,{value:"account",onClick:()=>{n("/setting/account")},className:"px-5",children:[l.jsx(wA,{size:14}),l.jsx("div",{className:"ml-1",children:"账户"})]}),l.jsxs(ia,{value:"password",onClick:()=>{n("/setting/password")},className:"px-5",children:[l.jsx(fA,{size:14}),l.jsx("div",{className:"ml-1",children:"密码"})]}),l.jsxs(ia,{value:"notify",onClick:()=>{n("/setting/notify")},className:"px-5",children:[l.jsx(mA,{size:14}),l.jsx("div",{className:"ml-1",children:"消息推送"})]})]}),l.jsx(Gd,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(Ig,{})})})]})})]})},$U=()=>{const[e,t]=v.useState(),[r,n]=v.useState(),s=Nr();return v.useEffect(()=>{(async()=>{const i=await Q6();t(i)})()},[]),v.useEffect(()=>{(async()=>{const a=await wN({perPage:8});n(a.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(yA,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(fr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(oA,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(fr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(pA,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(fr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(nA,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(fr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?l.jsx(l.Fragment,{children:l.jsxs(Cy,{className:"max-w-[40em] mt-10",children:[l.jsx(jy,{children:"暂无数据"}),l.jsxs(Ey,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(tb,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(He,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:"域名"}),l.jsx("div",{className:"w-24",children:"状态"}),l.jsx("div",{className:"w-56",children:"阶段"}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),l.jsx("div",{className:"grow",children:"操作"})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(o=>{var i,a;return l.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:[l.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}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Gv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Hv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ga(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(yv,{children:[l.jsx(xv,{asChild:!0,children:l.jsx(He,{variant:"link",className:"p-0",children:"日志"})}),l.jsxs(Rf,{className:"sm:max-w-5xl",children:[l.jsx(wv,{children:l.jsxs(_v,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.info&&c.info.map(u=>l.jsx("div",{className:"mt-1 text-green-600",children:u})),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(c=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",c.time,"]"]}),l.jsx("div",{className:"ml-2",children:c.message})]}),c.error&&l.jsx("div",{className:"mt-1 text-red-600",children:c.error})]}))})]})]})]})})]},o.id)})]})]})]})},VU=pe.object({email:pe.string().email("请输入正确的邮箱")}),WU=()=>{var i;const{toast:e}=qn(),t=Nr(),[r,n]=v.useState(!1),s=Tr({resolver:Rr(VU),defaultValues:{email:(i=st().authStore.model)==null?void 0:i.email}}),o=async a=>{var c;try{await st().admins.update((c=st().authStore.model)==null?void 0:c.id,{email:a.email}),st().authStore.clear(),e({title:"修改账户邮箱功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(u){const d=_o(u);e({title:"修改账户邮箱失败",description:d,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(Pr,{...s,children:l.jsxs("form",{onSubmit:s.handleSubmit(o),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Ne,{control:s.control,name:"email",render:({field:a})=>l.jsxs(Ce,{children:[l.jsx(je,{children:"邮箱"}),l.jsx(Ee,{children:l.jsx(Te,{placeholder:"请输入邮箱",...a,type:"email",onChange:c=>{n(!0),s.setValue("email",c.target.value)}})}),l.jsx(Se,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(He,{type:"submit",children:"确认修改"}):l.jsx(He,{type:"submit",disabled:!0,variant:"secondary",children:"确认修改"})})]})})})})},BU=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const r=t.payload.channel;return{...e,content:{...e.content,[r]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},_N=v.createContext({}),Ny=()=>v.useContext(_N),HU=({children:e})=>{const[t,r]=v.useReducer(BU,{});v.useEffect(()=>{(async()=>{const i=await sC("notifyChannels");r({type:"SET_CHANNELS",payload:i})})()},[]);const n=v.useCallback(o=>{r({type:"SET_CHANNEL",payload:o})},[]),s=v.useCallback(o=>{r({type:"SET_CHANNELS",payload:o})},[]);return l.jsx(_N.Provider,{value:{config:t,setChannel:n,setChannels:s},children:e})},YU=()=>{const{config:e,setChannels:t}=Ny(),[r,n]=v.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});v.useEffect(()=>{const a=(()=>{const c={accessToken:"",secret:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.dingtalk?u.dingtalk:c})();n({id:e.id??"",name:"dingtalk",data:a})},[e]);const{toast:s}=qn(),o=async()=>{try{const i=await Mc({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const a=_o(i);s({title:"保存失败",description:"配置保存失败:"+a,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Te,{placeholder:"AccessToken",value:r.data.accessToken,onChange:i=>{n({...r,data:{...r.data,accessToken:i.target.value}})}}),l.jsx(Te,{placeholder:"加签的签名",className:"mt-2",value:r.data.secret,onChange:i=>{n({...r,data:{...r.data,secret:i.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Lc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ma,{htmlFor:"airplane-mode",children:"是否启用"})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(He,{onClick:()=>{o()},children:"保存"})})]})},ZU={title:"您有{COUNT}张证书即将过期",content:"有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!"},KU=()=>{const[e,t]=v.useState(""),[r,n]=v.useState([ZU]),{toast:s}=qn();v.useEffect(()=>{(async()=>{const u=await sC("templates");u.content&&(n(u.content.notifyTemplates),t(u.id?u.id:""))})()},[]);const o=c=>{const u=r[0];n([{...u,title:c}])},i=c=>{const u=r[0];n([{...u,content:c}])},a=async()=>{const c=await Mc({id:e,content:{notifyTemplates:r},name:"templates"});c.id&&t(c.id),s({title:"保存成功",description:"通知模板保存成功"})};return l.jsxs("div",{children:[l.jsx(Te,{value:r[0].title,onChange:c=>{o(c.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:"可选的变量, COUNT:即将过期张数"}),l.jsx(mc,{className:"mt-2",value:r[0].content,onChange:c=>{i(c.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:"可选的变量, COUNT:即将过期张数DOMAINS:域名列表"}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(He,{onClick:a,children:"保存"})})]})},GU=()=>{const{config:e,setChannels:t}=Ny(),[r,n]=v.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});v.useEffect(()=>{const a=(()=>{const c={apiToken:"",chatId:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.telegram?u.telegram:c})();n({id:e.id??"",name:"telegram",data:a})},[e]);const{toast:s}=qn(),o=async()=>{try{const i=await Mc({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const a=_o(i);s({title:"保存失败",description:"配置保存失败:"+a,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Te,{placeholder:"ApiToken",value:r.data.apiToken,onChange:i=>{n({...r,data:{...r.data,apiToken:i.target.value}})}}),l.jsx(Te,{placeholder:"ChatId",value:r.data.chatId,onChange:i=>{n({...r,data:{...r.data,chatId:i.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Lc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ma,{htmlFor:"airplane-mode",children:"是否启用"})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(He,{onClick:()=>{o()},children:"保存"})})]})};function qU(e){try{return new URL(e),!0}catch{return!1}}const XU=()=>{const{config:e,setChannels:t}=Ny(),[r,n]=v.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});v.useEffect(()=>{const a=(()=>{const c={url:"",enabled:!1};if(!e.content)return c;const u=e.content;return u.webhook?u.webhook:c})();n({id:e.id??"",name:"webhook",data:a})},[e]);const{toast:s}=qn(),o=async()=>{try{if(r.data.url=r.data.url.trim(),!qU(r.data.url)){s({title:"保存失败",description:"Url格式不正确",variant:"destructive"});return}const i=await Mc({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(i),s({title:"保存成功",description:"配置保存成功"})}catch(i){const a=_o(i);s({title:"保存失败",description:"配置保存失败:"+a,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Te,{placeholder:"Url",value:r.data.url,onChange:i=>{n({...r,data:{...r.data,url:i.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Lc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{n({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ma,{htmlFor:"airplane-mode",children:"是否启用"})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(He,{onClick:()=>{o()},children:"保存"})})]})};var Ty="Collapsible",[QU,bN]=xr(Ty),[JU,Ry]=QU(Ty),SN=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=on({prop:n,defaultProp:s,onChange:i});return l.jsx(JU,{scope:r,disabled:o,contentId:Ur(),open:c,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Re.div,{"data-state":Ay(c),"data-disabled":o?"":void 0,...a,ref:t})})});SN.displayName=Ty;var kN="CollapsibleTrigger",CN=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=Ry(kN,r);return l.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Ay(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:ce(e.onClick,s.onOpenToggle)})});CN.displayName=kN;var Py="CollapsibleContent",jN=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Ry(Py,e.__scopeCollapsible);return l.jsx(ur,{present:r||s.open,children:({present:o})=>l.jsx(e$,{...n,ref:t,present:o})})});jN.displayName=Py;var e$=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,i=Ry(Py,r),[a,c]=v.useState(n),u=v.useRef(null),d=Ke(t,u),f=v.useRef(0),m=f.current,y=v.useRef(0),x=y.current,g=i.open||a,_=v.useRef(g),p=v.useRef();return v.useEffect(()=>{const h=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(h)},[]),Jt(()=>{const h=u.current;if(h){p.current=p.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const w=h.getBoundingClientRect();f.current=w.height,y.current=w.width,_.current||(h.style.transitionDuration=p.current.transitionDuration,h.style.animationName=p.current.animationName),c(n)}},[i.open,n]),l.jsx(Re.div,{"data-state":Ay(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...o,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&s})});function Ay(e){return e?"open":"closed"}var t$=SN,r$=CN,n$=jN,Ms="Accordion",s$=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Dy,o$,i$]=bc(Ms),[ah,R$]=xr(Ms,[i$,bN]),Oy=bN(),EN=We.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return l.jsx(Dy.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?l.jsx(u$,{...o,ref:t}):l.jsx(c$,{...s,ref:t})})});EN.displayName=Ms;var[NN,a$]=ah(Ms),[TN,l$]=ah(Ms,{collapsible:!1}),c$=We.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=on({prop:r,defaultProp:n,onChange:s});return l.jsx(NN,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(TN,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(RN,{...i,ref:t})})})}),u$=We.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[i=[],a]=on({prop:r,defaultProp:n,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(m=>m!==d)),[a]);return l.jsx(NN,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(TN,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(RN,{...o,ref:t})})})}),[d$,lh]=ah(Ms),RN=We.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...i}=e,a=We.useRef(null),c=Ke(a,t),u=o$(r),f=Ea(s)==="ltr",m=ce(e.onKeyDown,y=>{var P;if(!s$.includes(y.key))return;const x=y.target,g=u().filter(A=>{var L;return!((L=A.ref.current)!=null&&L.disabled)}),_=g.findIndex(A=>A.ref.current===x),p=g.length;if(_===-1)return;y.preventDefault();let h=_;const w=0,C=p-1,j=()=>{h=_+1,h>C&&(h=w)},E=()=>{h=_-1,h<w&&(h=C)};switch(y.key){case"Home":h=w;break;case"End":h=C;break;case"ArrowRight":o==="horizontal"&&(f?j():E());break;case"ArrowDown":o==="vertical"&&j();break;case"ArrowLeft":o==="horizontal"&&(f?E():j());break;case"ArrowUp":o==="vertical"&&E();break}const R=h%p;(P=g[R].ref.current)==null||P.focus()});return l.jsx(d$,{scope:r,disabled:n,direction:s,orientation:o,children:l.jsx(Dy.Slot,{scope:r,children:l.jsx(Re.div,{...i,"data-orientation":o,ref:c,onKeyDown:n?void 0:m})})})}),qd="AccordionItem",[f$,My]=ah(qd),PN=We.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=lh(qd,r),i=a$(qd,r),a=Oy(r),c=Ur(),u=n&&i.value.includes(n)||!1,d=o.disabled||e.disabled;return l.jsx(f$,{scope:r,open:u,disabled:d,triggerId:c,children:l.jsx(t$,{"data-orientation":o.orientation,"data-state":LN(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(n):i.onItemClose(n)}})})});PN.displayName=qd;var AN="AccordionHeader",DN=We.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(Ms,r),o=My(AN,r);return l.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":LN(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});DN.displayName=AN;var Im="AccordionTrigger",ON=We.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(Ms,r),o=My(Im,r),i=l$(Im,r),a=Oy(r);return l.jsx(Dy.ItemSlot,{scope:r,children:l.jsx(r$,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...n,ref:t})})});ON.displayName=Im;var MN="AccordionContent",IN=We.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=lh(Ms,r),o=My(MN,r),i=Oy(r);return l.jsx(n$,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});IN.displayName=MN;function LN(e){return e?"open":"closed"}var h$=EN,p$=PN,m$=DN,FN=ON,zN=IN;const ww=h$,ul=v.forwardRef(({className:e,...t},r)=>l.jsx(p$,{ref:r,className:ae("border-b",e),...t}));ul.displayName="AccordionItem";const dl=v.forwardRef(({className:e,children:t,...r},n)=>l.jsx(m$,{className:"flex",children:l.jsxs(FN,{ref:n,className:ae("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,l.jsx(Lg,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));dl.displayName=FN.displayName;const fl=v.forwardRef(({className:e,children:t,...r},n)=>l.jsx(zN,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:l.jsx("div",{className:ae("pb-4 pt-0",e),children:t})}));fl.displayName=zN.displayName;const g$=()=>l.jsx(l.Fragment,{children:l.jsxs(HU,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(ww,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs(ul,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(dl,{children:"模板"}),l.jsx(fl,{children:l.jsx(KU,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(ww,{type:"single",className:"dark:text-stone-200",children:[l.jsxs(ul,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(dl,{children:"钉钉"}),l.jsx(fl,{children:l.jsx(YU,{})})]}),l.jsxs(ul,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(dl,{children:"Telegram"}),l.jsx(fl,{children:l.jsx(GU,{})})]}),l.jsxs(ul,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(dl,{children:"Webhook"}),l.jsx(fl,{children:l.jsx(XU,{})})]})]})})]})}),v$=FP([{path:"/",element:l.jsx(M3,{}),children:[{path:"/",element:l.jsx($U,{})},{path:"/domains",element:l.jsx(nz,{})},{path:"/edit",element:l.jsx(EU,{})},{path:"/access",element:l.jsx(AU,{})},{path:"/history",element:l.jsx(OU,{})},{path:"/setting",element:l.jsx(UU,{}),children:[{path:"/setting/password",element:l.jsx(zU,{})},{path:"/setting/account",element:l.jsx(WU,{})},{path:"/setting/notify",element:l.jsx(g$,{})}]}]},{path:"/login",element:l.jsx(LU,{}),children:[{path:"/login",element:l.jsx(IU,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]);ip.createRoot(document.getElementById("root")).render(l.jsx(We.StrictMode,{children:l.jsx(N3,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(ZP,{router:v$})})}))});export default y$();