certimate/ui/dist/assets/index-CvMrzdp7.js
2024-09-17 19:29:30 +08:00

292 lines
733 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 lT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var lU=lT((wU,zu)=>{function ow(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 i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{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 i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aw={exports:{}},Vd={},lw={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 ic=Symbol.for("react.element"),cT=Symbol.for("react.portal"),uT=Symbol.for("react.fragment"),dT=Symbol.for("react.strict_mode"),fT=Symbol.for("react.profiler"),hT=Symbol.for("react.provider"),pT=Symbol.for("react.context"),mT=Symbol.for("react.forward_ref"),gT=Symbol.for("react.suspense"),vT=Symbol.for("react.memo"),yT=Symbol.for("react.lazy"),Ty=Symbol.iterator;function xT(e){return e===null||typeof e!="object"?null:(e=Ty&&e[Ty]||e["@@iterator"],typeof e=="function"?e:null)}var cw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uw=Object.assign,dw={};function pa(e,t,r){this.props=e,this.context=t,this.refs=dw,this.updater=r||cw}pa.prototype.isReactComponent={};pa.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")};pa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fw(){}fw.prototype=pa.prototype;function Om(e,t,r){this.props=e,this.context=t,this.refs=dw,this.updater=r||cw}var Mm=Om.prototype=new fw;Mm.constructor=Om;uw(Mm,pa.prototype);Mm.isPureReactComponent=!0;var Ny=Array.isArray,hw=Object.prototype.hasOwnProperty,Im={current:null},pw={key:!0,ref:!0,__self:!0,__source:!0};function mw(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)hw.call(t,n)&&!pw.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:ic,type:e,key:i,ref:o,props:s,_owner:Im.current}}function wT(e,t){return{$$typeof:ic,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lm(e){return typeof e=="object"&&e!==null&&e.$$typeof===ic}function _T(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ry=/\/+/g;function th(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_T(""+e.key):t.toString(36)}function gu(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ic:case cT:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+th(o,0):n,Ny(s)?(r="",e!=null&&(r=e.replace(Ry,"$&/")+"/"),gu(s,t,r,"",function(u){return u})):s!=null&&(Lm(s)&&(s=wT(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ry,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Ny(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+th(i,a);o+=gu(i,t,r,l,s)}else if(l=xT(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+th(i,a++),o+=gu(i,t,r,l,s);else if(i==="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 o}function zc(e,t,r){if(e==null)return e;var n=[],s=0;return gu(e,n,"","",function(i){return t.call(r,i,s++)}),n}function bT(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 yr={current:null},vu={transition:null},ST={ReactCurrentDispatcher:yr,ReactCurrentBatchConfig:vu,ReactCurrentOwner:Im};function gw(){throw Error("act(...) is not supported in production builds of React.")}tt.Children={map:zc,forEach:function(e,t,r){zc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return zc(e,function(){t++}),t},toArray:function(e){return zc(e,function(t){return t})||[]},only:function(e){if(!Lm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};tt.Component=pa;tt.Fragment=uT;tt.Profiler=fT;tt.PureComponent=Om;tt.StrictMode=dT;tt.Suspense=gT;tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ST;tt.act=gw;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=uw({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Im.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)hw.call(t,l)&&!pw.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:ic,type:e.type,key:s,ref:i,props:n,_owner:o}};tt.createContext=function(e){return e={$$typeof:pT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hT,_context:e},e.Consumer=e};tt.createElement=mw;tt.createFactory=function(e){var t=mw.bind(null,e);return t.type=e,t};tt.createRef=function(){return{current:null}};tt.forwardRef=function(e){return{$$typeof:mT,render:e}};tt.isValidElement=Lm;tt.lazy=function(e){return{$$typeof:yT,_payload:{_status:-1,_result:e},_init:bT}};tt.memo=function(e,t){return{$$typeof:vT,type:e,compare:t===void 0?null:t}};tt.startTransition=function(e){var t=vu.transition;vu.transition={};try{e()}finally{vu.transition=t}};tt.unstable_act=gw;tt.useCallback=function(e,t){return yr.current.useCallback(e,t)};tt.useContext=function(e){return yr.current.useContext(e)};tt.useDebugValue=function(){};tt.useDeferredValue=function(e){return yr.current.useDeferredValue(e)};tt.useEffect=function(e,t){return yr.current.useEffect(e,t)};tt.useId=function(){return yr.current.useId()};tt.useImperativeHandle=function(e,t,r){return yr.current.useImperativeHandle(e,t,r)};tt.useInsertionEffect=function(e,t){return yr.current.useInsertionEffect(e,t)};tt.useLayoutEffect=function(e,t){return yr.current.useLayoutEffect(e,t)};tt.useMemo=function(e,t){return yr.current.useMemo(e,t)};tt.useReducer=function(e,t,r){return yr.current.useReducer(e,t,r)};tt.useRef=function(e){return yr.current.useRef(e)};tt.useState=function(e){return yr.current.useState(e)};tt.useSyncExternalStore=function(e,t,r){return yr.current.useSyncExternalStore(e,t,r)};tt.useTransition=function(){return yr.current.useTransition()};tt.version="18.3.1";lw.exports=tt;var y=lw.exports;const et=Dm(y),vw=ow({__proto__:null,default:et},[y]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kT=y,CT=Symbol.for("react.element"),ET=Symbol.for("react.fragment"),jT=Object.prototype.hasOwnProperty,TT=kT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NT={key:!0,ref:!0,__self:!0,__source:!0};function yw(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)jT.call(t,n)&&!NT.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:CT,type:e,key:i,ref:o,props:s,_owner:TT.current}}Vd.Fragment=ET;Vd.jsx=yw;Vd.jsxs=yw;aw.exports=Vd;var c=aw.exports,Jh={},xw={exports:{}},Vr={},ww={exports:{}},_w={};/**
* @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(Y,O){var X=Y.length;Y.push(O);e:for(;0<X;){var U=X-1>>>1,V=Y[U];if(0<s(V,O))Y[U]=O,Y[X]=V,X=U;else break e}}function r(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var O=Y[0],X=Y.pop();if(X!==O){Y[0]=X;e:for(var U=0,V=Y.length,ue=V>>>1;U<ue;){var ne=2*(U+1)-1,se=Y[ne],Pe=ne+1,ce=Y[Pe];if(0>s(se,X))Pe<V&&0>s(ce,se)?(Y[U]=ce,Y[Pe]=X,U=Pe):(Y[U]=se,Y[ne]=X,U=ne);else if(Pe<V&&0>s(ce,X))Y[U]=ce,Y[Pe]=X,U=Pe;else break e}}return O}function s(Y,O){var X=Y.sortIndex-O.sortIndex;return X!==0?X:Y.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,f=null,m=3,g=!1,w=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Y){for(var O=r(u);O!==null;){if(O.callback===null)n(u);else if(O.startTime<=Y)n(u),O.sortIndex=O.expirationTime,t(l,O);else break;O=r(u)}}function C(Y){if(v=!1,_(Y),!w)if(r(l)!==null)w=!0,ee(E);else{var O=r(u);O!==null&&Z(C,O.startTime-Y)}}function E(Y,O){w=!1,v&&(v=!1,h(j),j=-1),g=!0;var X=m;try{for(_(O),f=r(l);f!==null&&(!(f.expirationTime>O)||Y&&!K());){var U=f.callback;if(typeof U=="function"){f.callback=null,m=f.priorityLevel;var V=U(f.expirationTime<=O);O=e.unstable_now(),typeof V=="function"?f.callback=V:f===r(l)&&n(l),_(O)}else n(l);f=r(l)}if(f!==null)var ue=!0;else{var ne=r(u);ne!==null&&Z(C,ne.startTime-O),ue=!1}return ue}finally{f=null,m=X,g=!1}}var P=!1,R=null,j=-1,D=5,L=-1;function K(){return!(e.unstable_now()-L<D)}function T(){if(R!==null){var Y=e.unstable_now();L=Y;var O=!0;try{O=R(!0,Y)}finally{O?F():(P=!1,R=null)}}else P=!1}var F;if(typeof p=="function")F=function(){p(T)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,$=b.port2;b.port1.onmessage=T,F=function(){$.postMessage(null)}}else F=function(){x(T,0)};function ee(Y){R=Y,P||(P=!0,F())}function Z(Y,O){j=x(function(){Y(e.unstable_now())},O)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){w||g||(w=!0,ee(E))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(Y){switch(m){case 1:case 2:case 3:var O=3;break;default:O=m}var X=m;m=O;try{return Y()}finally{m=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,O){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var X=m;m=Y;try{return O()}finally{m=X}},e.unstable_scheduleCallback=function(Y,O,X){var U=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?U+X:U):X=U,Y){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=X+V,Y={id:d++,callback:O,priorityLevel:Y,startTime:X,expirationTime:V,sortIndex:-1},X>U?(Y.sortIndex=X,t(u,Y),r(l)===null&&Y===r(u)&&(v?(h(j),j=-1):v=!0,Z(C,X-U))):(Y.sortIndex=V,t(l,Y),w||g||(w=!0,ee(E))),Y},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(Y){var O=m;return function(){var X=m;m=O;try{return Y.apply(this,arguments)}finally{m=X}}}})(_w);ww.exports=_w;var RT=ww.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=y,Ur=RT;function ie(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 bw=new Set,vl={};function so(e,t){ea(e,t),ea(e+"Capture",t)}function ea(e,t){for(vl[e]=t,e=0;e<t.length;e++)bw.add(t[e])}var gs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ep=Object.prototype.hasOwnProperty,AT=/^[: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]*$/,Py={},Ay={};function DT(e){return ep.call(Ay,e)?!0:ep.call(Py,e)?!1:AT.test(e)?Ay[e]=!0:(Py[e]=!0,!1)}function OT(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 MT(e,t,r,n){if(t===null||typeof t>"u"||OT(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 xr(e,t,r,n,s,i,o){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=i,this.removeEmptyString=o}var nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new xr(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 xr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new xr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new xr(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 xr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new xr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new xr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new xr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new xr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fm=/[\-:]([a-z])/g;function zm(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(Fm,zm);nr[t]=new xr(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(Fm,zm);nr[t]=new xr(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(Fm,zm);nr[t]=new xr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new xr(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new xr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new xr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Um(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")&&(MT(t,r,s,n)&&(r=null),n||s===null?DT(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,Uc=Symbol.for("react.element"),_o=Symbol.for("react.portal"),bo=Symbol.for("react.fragment"),Vm=Symbol.for("react.strict_mode"),tp=Symbol.for("react.profiler"),Sw=Symbol.for("react.provider"),kw=Symbol.for("react.context"),$m=Symbol.for("react.forward_ref"),rp=Symbol.for("react.suspense"),np=Symbol.for("react.suspense_list"),Wm=Symbol.for("react.memo"),$s=Symbol.for("react.lazy"),Cw=Symbol.for("react.offscreen"),Dy=Symbol.iterator;function Ra(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var Ot=Object.assign,rh;function Ya(e){if(rh===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);rh=t&&t[1]||""}return`
`+rh+e}var nh=!1;function sh(e,t){if(!e||nh)return"";nh=!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(`
`),i=n.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{nh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ya(e):""}function IT(e){switch(e.tag){case 5:return Ya(e.type);case 16:return Ya("Lazy");case 13:return Ya("Suspense");case 19:return Ya("SuspenseList");case 0:case 2:case 15:return e=sh(e.type,!1),e;case 11:return e=sh(e.type.render,!1),e;case 1:return e=sh(e.type,!0),e;default:return""}}function sp(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 bo:return"Fragment";case _o:return"Portal";case tp:return"Profiler";case Vm:return"StrictMode";case rp:return"Suspense";case np:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kw:return(e.displayName||"Context")+".Consumer";case Sw:return(e._context.displayName||"Context")+".Provider";case $m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wm:return t=e.displayName||null,t!==null?t:sp(e.type)||"Memo";case $s:t=e._payload,e=e._init;try{return sp(e(t))}catch{}}return null}function LT(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 sp(t);case 8:return t===Vm?"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 di(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ew(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FT(e){var t=Ew(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,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vc(e){e._valueTracker||(e._valueTracker=FT(e))}function jw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Ew(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Uu(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 ip(e,t){var r=t.checked;return Ot({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Oy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=di(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 Tw(e,t){t=t.checked,t!=null&&Um(e,"checked",t,!1)}function op(e,t){Tw(e,t);var r=di(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")?ap(e,t.type,r):t.hasOwnProperty("defaultValue")&&ap(e,t.type,di(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function My(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 ap(e,t,r){(t!=="number"||Uu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Za=Array.isArray;function Fo(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=""+di(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 lp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Ot({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Iy(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(Za(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:di(r)}}function Nw(e,t){var r=di(t.value),n=di(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 Ly(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Rw(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 cp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Rw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $c,Pw=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($c=$c||document.createElement("div"),$c.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$c.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var rl={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},zT=["Webkit","ms","Moz","O"];Object.keys(rl).forEach(function(e){zT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rl[t]=rl[e]})});function Aw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||rl.hasOwnProperty(e)&&rl[e]?(""+t).trim():t+"px"}function Dw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Aw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var UT=Ot({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 up(e,t){if(t){if(UT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function dp(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 fp=null;function Bm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hp=null,zo=null,Uo=null;function Fy(e){if(e=lc(e)){if(typeof hp!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Yd(t),hp(e.stateNode,e.type,t))}}function Ow(e){zo?Uo?Uo.push(e):Uo=[e]:zo=e}function Mw(){if(zo){var e=zo,t=Uo;if(Uo=zo=null,Fy(e),t)for(e=0;e<t.length;e++)Fy(t[e])}}function Iw(e,t){return e(t)}function Lw(){}var ih=!1;function Fw(e,t,r){if(ih)return e(t,r);ih=!0;try{return Iw(e,t,r)}finally{ih=!1,(zo!==null||Uo!==null)&&(Lw(),Mw())}}function xl(e,t){var r=e.stateNode;if(r===null)return null;var n=Yd(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(ie(231,t,typeof r));return r}var pp=!1;if(gs)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){pp=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{pp=!1}function VT(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var nl=!1,Vu=null,$u=!1,mp=null,$T={onError:function(e){nl=!0,Vu=e}};function WT(e,t,r,n,s,i,o,a,l){nl=!1,Vu=null,VT.apply($T,arguments)}function BT(e,t,r,n,s,i,o,a,l){if(WT.apply(this,arguments),nl){if(nl){var u=Vu;nl=!1,Vu=null}else throw Error(ie(198));$u||($u=!0,mp=u)}}function io(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 zw(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 zy(e){if(io(e)!==e)throw Error(ie(188))}function HT(e){var t=e.alternate;if(!t){if(t=io(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return zy(s),e;if(i===n)return zy(s),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function Uw(e){return e=HT(e),e!==null?Vw(e):null}function Vw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Vw(e);if(t!==null)return t;e=e.sibling}return null}var $w=Ur.unstable_scheduleCallback,Uy=Ur.unstable_cancelCallback,YT=Ur.unstable_shouldYield,ZT=Ur.unstable_requestPaint,Ut=Ur.unstable_now,KT=Ur.unstable_getCurrentPriorityLevel,Hm=Ur.unstable_ImmediatePriority,Ww=Ur.unstable_UserBlockingPriority,Wu=Ur.unstable_NormalPriority,GT=Ur.unstable_LowPriority,Bw=Ur.unstable_IdlePriority,$d=null,Fn=null;function qT(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot($d,e,void 0,(e.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:JT,XT=Math.log,QT=Math.LN2;function JT(e){return e>>>=0,e===0?32:31-(XT(e)/QT|0)|0}var Wc=64,Bc=4194304;function Ka(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 Bu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Ka(a):(i&=o,i!==0&&(n=Ka(i)))}else o=r&~s,o!==0?n=Ka(o):i!==0&&(n=Ka(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&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 eN(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 tN(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-xn(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=eN(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function gp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hw(){var e=Wc;return Wc<<=1,!(Wc&4194240)&&(Wc=64),e}function oh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function oc(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 rN(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),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Ym(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 mt=0;function Yw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zw,Zm,Kw,Gw,qw,vp=!1,Hc=[],ti=null,ri=null,ni=null,wl=new Map,_l=new Map,Bs=[],nN="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 Vy(e,t){switch(e){case"focusin":case"focusout":ti=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ni=null;break;case"pointerover":case"pointerout":wl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_l.delete(t.pointerId)}}function Aa(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=lc(t),t!==null&&Zm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function sN(e,t,r,n,s){switch(t){case"focusin":return ti=Aa(ti,e,t,r,n,s),!0;case"dragenter":return ri=Aa(ri,e,t,r,n,s),!0;case"mouseover":return ni=Aa(ni,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return wl.set(i,Aa(wl.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,_l.set(i,Aa(_l.get(i)||null,e,t,r,n,s)),!0}return!1}function Xw(e){var t=Li(e.target);if(t!==null){var r=io(t);if(r!==null){if(t=r.tag,t===13){if(t=zw(r),t!==null){e.blockedOn=t,qw(e.priority,function(){Kw(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 yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=yp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);fp=n,r.target.dispatchEvent(n),fp=null}else return t=lc(r),t!==null&&Zm(t),e.blockedOn=r,!1;t.shift()}return!0}function $y(e,t,r){yu(e)&&r.delete(t)}function iN(){vp=!1,ti!==null&&yu(ti)&&(ti=null),ri!==null&&yu(ri)&&(ri=null),ni!==null&&yu(ni)&&(ni=null),wl.forEach($y),_l.forEach($y)}function Da(e,t){e.blockedOn===t&&(e.blockedOn=null,vp||(vp=!0,Ur.unstable_scheduleCallback(Ur.unstable_NormalPriority,iN)))}function bl(e){function t(s){return Da(s,e)}if(0<Hc.length){Da(Hc[0],e);for(var r=1;r<Hc.length;r++){var n=Hc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ti!==null&&Da(ti,e),ri!==null&&Da(ri,e),ni!==null&&Da(ni,e),wl.forEach(t),_l.forEach(t),r=0;r<Bs.length;r++)n=Bs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Bs.length&&(r=Bs[0],r.blockedOn===null);)Xw(r),r.blockedOn===null&&Bs.shift()}var Vo=Es.ReactCurrentBatchConfig,Hu=!0;function oN(e,t,r,n){var s=mt,i=Vo.transition;Vo.transition=null;try{mt=1,Km(e,t,r,n)}finally{mt=s,Vo.transition=i}}function aN(e,t,r,n){var s=mt,i=Vo.transition;Vo.transition=null;try{mt=4,Km(e,t,r,n)}finally{mt=s,Vo.transition=i}}function Km(e,t,r,n){if(Hu){var s=yp(e,t,r,n);if(s===null)gh(e,t,n,Yu,r),Vy(e,n);else if(sN(s,e,t,r,n))n.stopPropagation();else if(Vy(e,n),t&4&&-1<nN.indexOf(e)){for(;s!==null;){var i=lc(s);if(i!==null&&Zw(i),i=yp(e,t,r,n),i===null&&gh(e,t,n,Yu,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else gh(e,t,n,null,r)}}var Yu=null;function yp(e,t,r,n){if(Yu=null,e=Bm(n),e=Li(e),e!==null)if(t=io(e),t===null)e=null;else if(r=t.tag,r===13){if(e=zw(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 Yu=e,null}function Qw(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(KT()){case Hm:return 1;case Ww:return 4;case Wu:case GT:return 16;case Bw:return 536870912;default:return 16}default:return 16}}var qs=null,Gm=null,xu=null;function Jw(){if(xu)return xu;var e,t=Gm,r=t.length,n,s="value"in qs?qs.value:qs.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return xu=s.slice(e,1<n?1-n:void 0)}function wu(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 Yc(){return!0}function Wy(){return!1}function $r(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Yc:Wy,this.isPropagationStopped=Wy,this}return Ot(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=Yc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Yc)},persist:function(){},isPersistent:Yc}),t}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qm=$r(ma),ac=Ot({},ma,{view:0,detail:0}),lN=$r(ac),ah,lh,Oa,Wd=Ot({},ac,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xm,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!==Oa&&(Oa&&e.type==="mousemove"?(ah=e.screenX-Oa.screenX,lh=e.screenY-Oa.screenY):lh=ah=0,Oa=e),ah)},movementY:function(e){return"movementY"in e?e.movementY:lh}}),By=$r(Wd),cN=Ot({},Wd,{dataTransfer:0}),uN=$r(cN),dN=Ot({},ac,{relatedTarget:0}),ch=$r(dN),fN=Ot({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),hN=$r(fN),pN=Ot({},ma,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mN=$r(pN),gN=Ot({},ma,{data:0}),Hy=$r(gN),vN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xN[e])?!!t[e]:!1}function Xm(){return wN}var _N=Ot({},ac,{key:function(e){if(e.key){var t=vN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xm,charCode:function(e){return e.type==="keypress"?wu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bN=$r(_N),SN=Ot({},Wd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yy=$r(SN),kN=Ot({},ac,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xm}),CN=$r(kN),EN=Ot({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),jN=$r(EN),TN=Ot({},Wd,{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}),NN=$r(TN),RN=[9,13,27,32],Qm=gs&&"CompositionEvent"in window,sl=null;gs&&"documentMode"in document&&(sl=document.documentMode);var PN=gs&&"TextEvent"in window&&!sl,e_=gs&&(!Qm||sl&&8<sl&&11>=sl),Zy=" ",Ky=!1;function t_(e,t){switch(e){case"keyup":return RN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=!1;function AN(e,t){switch(e){case"compositionend":return r_(t);case"keypress":return t.which!==32?null:(Ky=!0,Zy);case"textInput":return e=t.data,e===Zy&&Ky?null:e;default:return null}}function DN(e,t){if(So)return e==="compositionend"||!Qm&&t_(e,t)?(e=Jw(),xu=Gm=qs=null,So=!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 e_&&t.locale!=="ko"?null:t.data;default:return null}}var ON={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 Gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ON[e.type]:t==="textarea"}function n_(e,t,r,n){Ow(n),t=Zu(t,"onChange"),0<t.length&&(r=new qm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var il=null,Sl=null;function MN(e){p_(e,0)}function Bd(e){var t=Eo(e);if(jw(t))return e}function IN(e,t){if(e==="change")return t}var s_=!1;if(gs){var uh;if(gs){var dh="oninput"in document;if(!dh){var qy=document.createElement("div");qy.setAttribute("oninput","return;"),dh=typeof qy.oninput=="function"}uh=dh}else uh=!1;s_=uh&&(!document.documentMode||9<document.documentMode)}function Xy(){il&&(il.detachEvent("onpropertychange",i_),Sl=il=null)}function i_(e){if(e.propertyName==="value"&&Bd(Sl)){var t=[];n_(t,Sl,e,Bm(e)),Fw(MN,t)}}function LN(e,t,r){e==="focusin"?(Xy(),il=t,Sl=r,il.attachEvent("onpropertychange",i_)):e==="focusout"&&Xy()}function FN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bd(Sl)}function zN(e,t){if(e==="click")return Bd(t)}function UN(e,t){if(e==="input"||e==="change")return Bd(t)}function VN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:VN;function kl(e,t){if(Sn(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(!ep.call(t,s)||!Sn(e[s],t[s]))return!1}return!0}function Qy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jy(e,t){var r=Qy(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=Qy(r)}}function o_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?o_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function a_(){for(var e=window,t=Uu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Uu(e.document)}return t}function Jm(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 $N(e){var t=a_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&o_(r.ownerDocument.documentElement,r)){if(n!==null&&Jm(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,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Jy(r,i);var o=Jy(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 WN=gs&&"documentMode"in document&&11>=document.documentMode,ko=null,xp=null,ol=null,wp=!1;function ex(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wp||ko==null||ko!==Uu(n)||(n=ko,"selectionStart"in n&&Jm(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}),ol&&kl(ol,n)||(ol=n,n=Zu(xp,"onSelect"),0<n.length&&(t=new qm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ko)))}function Zc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Co={animationend:Zc("Animation","AnimationEnd"),animationiteration:Zc("Animation","AnimationIteration"),animationstart:Zc("Animation","AnimationStart"),transitionend:Zc("Transition","TransitionEnd")},fh={},l_={};gs&&(l_=document.createElement("div").style,"AnimationEvent"in window||(delete Co.animationend.animation,delete Co.animationiteration.animation,delete Co.animationstart.animation),"TransitionEvent"in window||delete Co.transitionend.transition);function Hd(e){if(fh[e])return fh[e];if(!Co[e])return e;var t=Co[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in l_)return fh[e]=t[r];return e}var c_=Hd("animationend"),u_=Hd("animationiteration"),d_=Hd("animationstart"),f_=Hd("transitionend"),h_=new Map,tx="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 _i(e,t){h_.set(e,t),so(t,[e])}for(var hh=0;hh<tx.length;hh++){var ph=tx[hh],BN=ph.toLowerCase(),HN=ph[0].toUpperCase()+ph.slice(1);_i(BN,"on"+HN)}_i(c_,"onAnimationEnd");_i(u_,"onAnimationIteration");_i(d_,"onAnimationStart");_i("dblclick","onDoubleClick");_i("focusin","onFocus");_i("focusout","onBlur");_i(f_,"onTransitionEnd");ea("onMouseEnter",["mouseout","mouseover"]);ea("onMouseLeave",["mouseout","mouseover"]);ea("onPointerEnter",["pointerout","pointerover"]);ea("onPointerLeave",["pointerout","pointerover"]);so("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));so("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));so("onBeforeInput",["compositionend","keypress","textInput","paste"]);so("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));so("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));so("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ga="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(" "),YN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ga));function rx(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,BT(n,t,void 0,e),e.currentTarget=null}function p_(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 i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;rx(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;rx(s,a,u),i=l}}}if($u)throw e=mp,$u=!1,mp=null,e}function bt(e,t){var r=t[Cp];r===void 0&&(r=t[Cp]=new Set);var n=e+"__bubble";r.has(n)||(m_(t,e,2,!1),r.add(n))}function mh(e,t,r){var n=0;t&&(n|=4),m_(r,e,n,t)}var Kc="_reactListening"+Math.random().toString(36).slice(2);function Cl(e){if(!e[Kc]){e[Kc]=!0,bw.forEach(function(r){r!=="selectionchange"&&(YN.has(r)||mh(r,!1,e),mh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kc]||(t[Kc]=!0,mh("selectionchange",!1,t))}}function m_(e,t,r,n){switch(Qw(t)){case 1:var s=oN;break;case 4:s=aN;break;default:s=Km}r=s.bind(null,t,r,e),s=void 0,!pp||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 gh(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Li(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Fw(function(){var u=i,d=Bm(r),f=[];e:{var m=h_.get(e);if(m!==void 0){var g=qm,w=e;switch(e){case"keypress":if(wu(r)===0)break e;case"keydown":case"keyup":g=bN;break;case"focusin":w="focus",g=ch;break;case"focusout":w="blur",g=ch;break;case"beforeblur":case"afterblur":g=ch;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":g=By;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=uN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=CN;break;case c_:case u_:case d_:g=hN;break;case f_:g=jN;break;case"scroll":g=lN;break;case"wheel":g=NN;break;case"copy":case"cut":case"paste":g=mN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Yy}var v=(t&4)!==0,x=!v&&e==="scroll",h=v?m!==null?m+"Capture":null:m;v=[];for(var p=u,_;p!==null;){_=p;var C=_.stateNode;if(_.tag===5&&C!==null&&(_=C,h!==null&&(C=xl(p,h),C!=null&&v.push(El(p,C,_)))),x)break;p=p.return}0<v.length&&(m=new g(m,w,null,r,d),f.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&r!==fp&&(w=r.relatedTarget||r.fromElement)&&(Li(w)||w[vs]))break e;if((g||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,g?(w=r.relatedTarget||r.toElement,g=u,w=w?Li(w):null,w!==null&&(x=io(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(g=null,w=u),g!==w)){if(v=By,C="onMouseLeave",h="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=Yy,C="onPointerLeave",h="onPointerEnter",p="pointer"),x=g==null?m:Eo(g),_=w==null?m:Eo(w),m=new v(C,p+"leave",g,r,d),m.target=x,m.relatedTarget=_,C=null,Li(d)===u&&(v=new v(h,p+"enter",w,r,d),v.target=_,v.relatedTarget=x,C=v),x=C,g&&w)t:{for(v=g,h=w,p=0,_=v;_;_=fo(_))p++;for(_=0,C=h;C;C=fo(C))_++;for(;0<p-_;)v=fo(v),p--;for(;0<_-p;)h=fo(h),_--;for(;p--;){if(v===h||h!==null&&v===h.alternate)break t;v=fo(v),h=fo(h)}v=null}else v=null;g!==null&&nx(f,m,g,v,!1),w!==null&&x!==null&&nx(f,x,w,v,!0)}}e:{if(m=u?Eo(u):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var E=IN;else if(Gy(m))if(s_)E=UN;else{E=FN;var P=LN}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=zN);if(E&&(E=E(e,u))){n_(f,E,r,d);break e}P&&P(e,m,u),e==="focusout"&&(P=m._wrapperState)&&P.controlled&&m.type==="number"&&ap(m,"number",m.value)}switch(P=u?Eo(u):window,e){case"focusin":(Gy(P)||P.contentEditable==="true")&&(ko=P,xp=u,ol=null);break;case"focusout":ol=xp=ko=null;break;case"mousedown":wp=!0;break;case"contextmenu":case"mouseup":case"dragend":wp=!1,ex(f,r,d);break;case"selectionchange":if(WN)break;case"keydown":case"keyup":ex(f,r,d)}var R;if(Qm)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else So?t_(e,r)&&(j="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(j="onCompositionStart");j&&(e_&&r.locale!=="ko"&&(So||j!=="onCompositionStart"?j==="onCompositionEnd"&&So&&(R=Jw()):(qs=d,Gm="value"in qs?qs.value:qs.textContent,So=!0)),P=Zu(u,j),0<P.length&&(j=new Hy(j,e,null,r,d),f.push({event:j,listeners:P}),R?j.data=R:(R=r_(r),R!==null&&(j.data=R)))),(R=PN?AN(e,r):DN(e,r))&&(u=Zu(u,"onBeforeInput"),0<u.length&&(d=new Hy("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=R))}p_(f,t)})}function El(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zu(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=xl(e,r),i!=null&&n.unshift(El(e,i,s)),i=xl(e,t),i!=null&&n.push(El(e,i,s))),e=e.return}return n}function fo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nx(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=xl(r,i),l!=null&&o.unshift(El(r,l,a))):s||(l=xl(r,i),l!=null&&o.push(El(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var ZN=/\r\n?/g,KN=/\u0000|\uFFFD/g;function sx(e){return(typeof e=="string"?e:""+e).replace(ZN,`
`).replace(KN,"")}function Gc(e,t,r){if(t=sx(t),sx(e)!==t&&r)throw Error(ie(425))}function Ku(){}var _p=null,bp=null;function Sp(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 kp=typeof setTimeout=="function"?setTimeout:void 0,GN=typeof clearTimeout=="function"?clearTimeout:void 0,ix=typeof Promise=="function"?Promise:void 0,qN=typeof queueMicrotask=="function"?queueMicrotask:typeof ix<"u"?function(e){return ix.resolve(null).then(e).catch(XN)}:kp;function XN(e){setTimeout(function(){throw e})}function vh(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),bl(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);bl(t)}function si(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 ox(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 ga=Math.random().toString(36).slice(2),On="__reactFiber$"+ga,jl="__reactProps$"+ga,vs="__reactContainer$"+ga,Cp="__reactEvents$"+ga,QN="__reactListeners$"+ga,JN="__reactHandles$"+ga;function Li(e){var t=e[On];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vs]||r[On]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ox(e);e!==null;){if(r=e[On])return r;e=ox(e)}return t}e=r,r=e.parentNode}return null}function lc(e){return e=e[On]||e[vs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Eo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Yd(e){return e[jl]||null}var Ep=[],jo=-1;function bi(e){return{current:e}}function St(e){0>jo||(e.current=Ep[jo],Ep[jo]=null,jo--)}function yt(e,t){jo++,Ep[jo]=e.current,e.current=t}var fi={},cr=bi(fi),jr=bi(!1),Yi=fi;function ta(e,t){var r=e.type.contextTypes;if(!r)return fi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Tr(e){return e=e.childContextTypes,e!=null}function Gu(){St(jr),St(cr)}function ax(e,t,r){if(cr.current!==fi)throw Error(ie(168));yt(cr,t),yt(jr,r)}function g_(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(ie(108,LT(e)||"Unknown",s));return Ot({},r,n)}function qu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fi,Yi=cr.current,yt(cr,e),yt(jr,jr.current),!0}function lx(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=g_(e,t,Yi),n.__reactInternalMemoizedMergedChildContext=e,St(jr),St(cr),yt(cr,e)):St(jr),yt(jr,r)}var os=null,Zd=!1,yh=!1;function v_(e){os===null?os=[e]:os.push(e)}function e2(e){Zd=!0,v_(e)}function Si(){if(!yh&&os!==null){yh=!0;var e=0,t=mt;try{var r=os;for(mt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}os=null,Zd=!1}catch(s){throw os!==null&&(os=os.slice(e+1)),$w(Hm,Si),s}finally{mt=t,yh=!1}}return null}var To=[],No=0,Xu=null,Qu=0,Xr=[],Qr=0,Zi=null,as=1,ls="";function Ai(e,t){To[No++]=Qu,To[No++]=Xu,Xu=e,Qu=t}function y_(e,t,r){Xr[Qr++]=as,Xr[Qr++]=ls,Xr[Qr++]=Zi,Zi=e;var n=as;e=ls;var s=32-xn(n)-1;n&=~(1<<s),r+=1;var i=32-xn(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,as=1<<32-xn(t)+s|r<<s|n,ls=i+e}else as=1<<i|r<<s|n,ls=e}function eg(e){e.return!==null&&(Ai(e,1),y_(e,1,0))}function tg(e){for(;e===Xu;)Xu=To[--No],To[No]=null,Qu=To[--No],To[No]=null;for(;e===Zi;)Zi=Xr[--Qr],Xr[Qr]=null,ls=Xr[--Qr],Xr[Qr]=null,as=Xr[--Qr],Xr[Qr]=null}var Ir=null,Mr=null,Tt=!1,mn=null;function x_(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 cx(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,Ir=e,Mr=si(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ir=e,Mr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Zi!==null?{id:as,overflow:ls}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=en(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ir=e,Mr=null,!0):!1;default:return!1}}function jp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Tp(e){if(Tt){var t=Mr;if(t){var r=t;if(!cx(e,t)){if(jp(e))throw Error(ie(418));t=si(r.nextSibling);var n=Ir;t&&cx(e,t)?x_(n,r):(e.flags=e.flags&-4097|2,Tt=!1,Ir=e)}}else{if(jp(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Tt=!1,Ir=e}}}function ux(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ir=e}function qc(e){if(e!==Ir)return!1;if(!Tt)return ux(e),Tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sp(e.type,e.memoizedProps)),t&&(t=Mr)){if(jp(e))throw w_(),Error(ie(418));for(;t;)x_(e,t),t=si(t.nextSibling)}if(ux(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Mr=si(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Mr=null}}else Mr=Ir?si(e.stateNode.nextSibling):null;return!0}function w_(){for(var e=Mr;e;)e=si(e.nextSibling)}function ra(){Mr=Ir=null,Tt=!1}function rg(e){mn===null?mn=[e]:mn.push(e)}var t2=Es.ReactCurrentBatchConfig;function Ma(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(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function Xc(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dx(e){var t=e._init;return t(e._payload)}function __(e){function t(h,p){if(e){var _=h.deletions;_===null?(h.deletions=[p],h.flags|=16):_.push(p)}}function r(h,p){if(!e)return null;for(;p!==null;)t(h,p),p=p.sibling;return null}function n(h,p){for(h=new Map;p!==null;)p.key!==null?h.set(p.key,p):h.set(p.index,p),p=p.sibling;return h}function s(h,p){return h=li(h,p),h.index=0,h.sibling=null,h}function i(h,p,_){return h.index=_,e?(_=h.alternate,_!==null?(_=_.index,_<p?(h.flags|=2,p):_):(h.flags|=2,p)):(h.flags|=1048576,p)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,p,_,C){return p===null||p.tag!==6?(p=Ch(_,h.mode,C),p.return=h,p):(p=s(p,_),p.return=h,p)}function l(h,p,_,C){var E=_.type;return E===bo?d(h,p,_.props.children,C,_.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$s&&dx(E)===p.type)?(C=s(p,_.props),C.ref=Ma(h,p,_),C.return=h,C):(C=ju(_.type,_.key,_.props,null,h.mode,C),C.ref=Ma(h,p,_),C.return=h,C)}function u(h,p,_,C){return p===null||p.tag!==4||p.stateNode.containerInfo!==_.containerInfo||p.stateNode.implementation!==_.implementation?(p=Eh(_,h.mode,C),p.return=h,p):(p=s(p,_.children||[]),p.return=h,p)}function d(h,p,_,C,E){return p===null||p.tag!==7?(p=Wi(_,h.mode,C,E),p.return=h,p):(p=s(p,_),p.return=h,p)}function f(h,p,_){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Ch(""+p,h.mode,_),p.return=h,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Uc:return _=ju(p.type,p.key,p.props,null,h.mode,_),_.ref=Ma(h,null,p),_.return=h,_;case _o:return p=Eh(p,h.mode,_),p.return=h,p;case $s:var C=p._init;return f(h,C(p._payload),_)}if(Za(p)||Ra(p))return p=Wi(p,h.mode,_,null),p.return=h,p;Xc(h,p)}return null}function m(h,p,_,C){var E=p!==null?p.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:a(h,p,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Uc:return _.key===E?l(h,p,_,C):null;case _o:return _.key===E?u(h,p,_,C):null;case $s:return E=_._init,m(h,p,E(_._payload),C)}if(Za(_)||Ra(_))return E!==null?null:d(h,p,_,C,null);Xc(h,_)}return null}function g(h,p,_,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return h=h.get(_)||null,a(p,h,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Uc:return h=h.get(C.key===null?_:C.key)||null,l(p,h,C,E);case _o:return h=h.get(C.key===null?_:C.key)||null,u(p,h,C,E);case $s:var P=C._init;return g(h,p,_,P(C._payload),E)}if(Za(C)||Ra(C))return h=h.get(_)||null,d(p,h,C,E,null);Xc(p,C)}return null}function w(h,p,_,C){for(var E=null,P=null,R=p,j=p=0,D=null;R!==null&&j<_.length;j++){R.index>j?(D=R,R=null):D=R.sibling;var L=m(h,R,_[j],C);if(L===null){R===null&&(R=D);break}e&&R&&L.alternate===null&&t(h,R),p=i(L,p,j),P===null?E=L:P.sibling=L,P=L,R=D}if(j===_.length)return r(h,R),Tt&&Ai(h,j),E;if(R===null){for(;j<_.length;j++)R=f(h,_[j],C),R!==null&&(p=i(R,p,j),P===null?E=R:P.sibling=R,P=R);return Tt&&Ai(h,j),E}for(R=n(h,R);j<_.length;j++)D=g(R,h,j,_[j],C),D!==null&&(e&&D.alternate!==null&&R.delete(D.key===null?j:D.key),p=i(D,p,j),P===null?E=D:P.sibling=D,P=D);return e&&R.forEach(function(K){return t(h,K)}),Tt&&Ai(h,j),E}function v(h,p,_,C){var E=Ra(_);if(typeof E!="function")throw Error(ie(150));if(_=E.call(_),_==null)throw Error(ie(151));for(var P=E=null,R=p,j=p=0,D=null,L=_.next();R!==null&&!L.done;j++,L=_.next()){R.index>j?(D=R,R=null):D=R.sibling;var K=m(h,R,L.value,C);if(K===null){R===null&&(R=D);break}e&&R&&K.alternate===null&&t(h,R),p=i(K,p,j),P===null?E=K:P.sibling=K,P=K,R=D}if(L.done)return r(h,R),Tt&&Ai(h,j),E;if(R===null){for(;!L.done;j++,L=_.next())L=f(h,L.value,C),L!==null&&(p=i(L,p,j),P===null?E=L:P.sibling=L,P=L);return Tt&&Ai(h,j),E}for(R=n(h,R);!L.done;j++,L=_.next())L=g(R,h,j,L.value,C),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?j:L.key),p=i(L,p,j),P===null?E=L:P.sibling=L,P=L);return e&&R.forEach(function(T){return t(h,T)}),Tt&&Ai(h,j),E}function x(h,p,_,C){if(typeof _=="object"&&_!==null&&_.type===bo&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Uc:e:{for(var E=_.key,P=p;P!==null;){if(P.key===E){if(E=_.type,E===bo){if(P.tag===7){r(h,P.sibling),p=s(P,_.props.children),p.return=h,h=p;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$s&&dx(E)===P.type){r(h,P.sibling),p=s(P,_.props),p.ref=Ma(h,P,_),p.return=h,h=p;break e}r(h,P);break}else t(h,P);P=P.sibling}_.type===bo?(p=Wi(_.props.children,h.mode,C,_.key),p.return=h,h=p):(C=ju(_.type,_.key,_.props,null,h.mode,C),C.ref=Ma(h,p,_),C.return=h,h=C)}return o(h);case _o:e:{for(P=_.key;p!==null;){if(p.key===P)if(p.tag===4&&p.stateNode.containerInfo===_.containerInfo&&p.stateNode.implementation===_.implementation){r(h,p.sibling),p=s(p,_.children||[]),p.return=h,h=p;break e}else{r(h,p);break}else t(h,p);p=p.sibling}p=Eh(_,h.mode,C),p.return=h,h=p}return o(h);case $s:return P=_._init,x(h,p,P(_._payload),C)}if(Za(_))return w(h,p,_,C);if(Ra(_))return v(h,p,_,C);Xc(h,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,p!==null&&p.tag===6?(r(h,p.sibling),p=s(p,_),p.return=h,h=p):(r(h,p),p=Ch(_,h.mode,C),p.return=h,h=p),o(h)):r(h,p)}return x}var na=__(!0),b_=__(!1),Ju=bi(null),ed=null,Ro=null,ng=null;function sg(){ng=Ro=ed=null}function ig(e){var t=Ju.current;St(Ju),e._currentValue=t}function Np(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 $o(e,t){ed=e,ng=Ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Er=!0),e.firstContext=null)}function nn(e){var t=e._currentValue;if(ng!==e)if(e={context:e,memoizedValue:t,next:null},Ro===null){if(ed===null)throw Error(ie(308));Ro=e,ed.dependencies={lanes:0,firstContext:e}}else Ro=Ro.next=e;return t}var Fi=null;function og(e){Fi===null?Fi=[e]:Fi.push(e)}function S_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,og(t)):(r.next=s.next,s.next=r),t.interleaved=r,ys(e,n)}function ys(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 Ws=!1;function ag(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function k_(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 fs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ii(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ot&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ys(e,r)}return s=n.interleaved,s===null?(t.next=t,og(n)):(t.next=s.next,s.next=t),n.interleaved=t,ys(e,r)}function _u(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,Ym(e,r)}}function fx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 td(e,t,r,n){var s=e.updateQueue;Ws=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,d=u=l=null,a=i;do{var m=a.lane,g=a.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,v=a;switch(m=t,g=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){f=w.call(g,f,m);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,m=typeof w=="function"?w.call(g,f,m):w,m==null)break e;f=Ot({},f,m);break e;case 2:Ws=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else g={eventTime:g,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=g,l=f):d=d.next=g,o|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Gi|=o,e.lanes=o,e.memoizedState=f}}function hx(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(ie(191,s));s.call(n)}}}var cc={},zn=bi(cc),Tl=bi(cc),Nl=bi(cc);function zi(e){if(e===cc)throw Error(ie(174));return e}function lg(e,t){switch(yt(Nl,t),yt(Tl,e),yt(zn,cc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cp(t,e)}St(zn),yt(zn,t)}function sa(){St(zn),St(Tl),St(Nl)}function C_(e){zi(Nl.current);var t=zi(zn.current),r=cp(t,e.type);t!==r&&(yt(Tl,e),yt(zn,r))}function cg(e){Tl.current===e&&(St(zn),St(Tl))}var Pt=bi(0);function rd(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 xh=[];function ug(){for(var e=0;e<xh.length;e++)xh[e]._workInProgressVersionPrimary=null;xh.length=0}var bu=Es.ReactCurrentDispatcher,wh=Es.ReactCurrentBatchConfig,Ki=0,Dt=null,Zt=null,Jt=null,nd=!1,al=!1,Rl=0,r2=0;function ir(){throw Error(ie(321))}function dg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Sn(e[r],t[r]))return!1;return!0}function fg(e,t,r,n,s,i){if(Ki=i,Dt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bu.current=e===null||e.memoizedState===null?o2:a2,e=r(n,s),al){i=0;do{if(al=!1,Rl=0,25<=i)throw Error(ie(301));i+=1,Jt=Zt=null,t.updateQueue=null,bu.current=l2,e=r(n,s)}while(al)}if(bu.current=sd,t=Zt!==null&&Zt.next!==null,Ki=0,Jt=Zt=Dt=null,nd=!1,t)throw Error(ie(300));return e}function hg(){var e=Rl!==0;return Rl=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Dt.memoizedState=Jt=e:Jt=Jt.next=e,Jt}function sn(){if(Zt===null){var e=Dt.alternate;e=e!==null?e.memoizedState:null}else e=Zt.next;var t=Jt===null?Dt.memoizedState:Jt.next;if(t!==null)Jt=t,Zt=e;else{if(e===null)throw Error(ie(310));Zt=e,e={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},Jt===null?Dt.memoizedState=Jt=e:Jt=Jt.next=e}return Jt}function Pl(e,t){return typeof t=="function"?t(e):t}function _h(e){var t=sn(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Zt,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((Ki&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=n):l=l.next=f,Dt.lanes|=d,Gi|=d}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,Sn(n,t.memoizedState)||(Er=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,Dt.lanes|=i,Gi|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function bh(e){var t=sn(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Sn(i,t.memoizedState)||(Er=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function E_(){}function j_(e,t){var r=Dt,n=sn(),s=t(),i=!Sn(n.memoizedState,s);if(i&&(n.memoizedState=s,Er=!0),n=n.queue,pg(R_.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,Al(9,N_.bind(null,r,n,s,t),void 0,null),er===null)throw Error(ie(349));Ki&30||T_(r,t,s)}return s}function T_(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Dt.updateQueue,t===null?(t={lastEffect:null,stores:null},Dt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function N_(e,t,r,n){t.value=r,t.getSnapshot=n,P_(t)&&A_(e)}function R_(e,t,r){return r(function(){P_(t)&&A_(e)})}function P_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Sn(e,r)}catch{return!0}}function A_(e){var t=ys(e,1);t!==null&&wn(t,e,1,-1)}function px(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pl,lastRenderedState:e},t.queue=e,e=e.dispatch=i2.bind(null,Dt,e),[t.memoizedState,e]}function Al(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Dt.updateQueue,t===null?(t={lastEffect:null,stores:null},Dt.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 D_(){return sn().memoizedState}function Su(e,t,r,n){var s=Dn();Dt.flags|=e,s.memoizedState=Al(1|t,r,void 0,n===void 0?null:n)}function Kd(e,t,r,n){var s=sn();n=n===void 0?null:n;var i=void 0;if(Zt!==null){var o=Zt.memoizedState;if(i=o.destroy,n!==null&&dg(n,o.deps)){s.memoizedState=Al(t,r,i,n);return}}Dt.flags|=e,s.memoizedState=Al(1|t,r,i,n)}function mx(e,t){return Su(8390656,8,e,t)}function pg(e,t){return Kd(2048,8,e,t)}function O_(e,t){return Kd(4,2,e,t)}function M_(e,t){return Kd(4,4,e,t)}function I_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function L_(e,t,r){return r=r!=null?r.concat([e]):null,Kd(4,4,I_.bind(null,t,e),r)}function mg(){}function F_(e,t){var r=sn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&dg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function z_(e,t){var r=sn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&dg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function U_(e,t,r){return Ki&21?(Sn(r,t)||(r=Hw(),Dt.lanes|=r,Gi|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Er=!0),e.memoizedState=r)}function n2(e,t){var r=mt;mt=r!==0&&4>r?r:4,e(!0);var n=wh.transition;wh.transition={};try{e(!1),t()}finally{mt=r,wh.transition=n}}function V_(){return sn().memoizedState}function s2(e,t,r){var n=ai(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},$_(e))W_(t,r);else if(r=S_(e,t,r,n),r!==null){var s=gr();wn(r,e,n,s),B_(r,t,n)}}function i2(e,t,r){var n=ai(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if($_(e))W_(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Sn(a,o)){var l=t.interleaved;l===null?(s.next=s,og(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=S_(e,t,s,n),r!==null&&(s=gr(),wn(r,e,n,s),B_(r,t,n))}}function $_(e){var t=e.alternate;return e===Dt||t!==null&&t===Dt}function W_(e,t){al=nd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function B_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ym(e,r)}}var sd={readContext:nn,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},o2={readContext:nn,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:nn,useEffect:mx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Su(4194308,4,I_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){return Su(4,2,e,t)},useMemo:function(e,t){var r=Dn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dn();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=s2.bind(null,Dt,e),[n.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:px,useDebugValue:mg,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=px(!1),t=e[0];return e=n2.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Dt,s=Dn();if(Tt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),er===null)throw Error(ie(349));Ki&30||T_(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,mx(R_.bind(null,n,i,e),[e]),n.flags|=2048,Al(9,N_.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Dn(),t=er.identifierPrefix;if(Tt){var r=ls,n=as;r=(n&~(1<<32-xn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Rl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=r2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},a2={readContext:nn,useCallback:F_,useContext:nn,useEffect:pg,useImperativeHandle:L_,useInsertionEffect:O_,useLayoutEffect:M_,useMemo:z_,useReducer:_h,useRef:D_,useState:function(){return _h(Pl)},useDebugValue:mg,useDeferredValue:function(e){var t=sn();return U_(t,Zt.memoizedState,e)},useTransition:function(){var e=_h(Pl)[0],t=sn().memoizedState;return[e,t]},useMutableSource:E_,useSyncExternalStore:j_,useId:V_,unstable_isNewReconciler:!1},l2={readContext:nn,useCallback:F_,useContext:nn,useEffect:pg,useImperativeHandle:L_,useInsertionEffect:O_,useLayoutEffect:M_,useMemo:z_,useReducer:bh,useRef:D_,useState:function(){return bh(Pl)},useDebugValue:mg,useDeferredValue:function(e){var t=sn();return Zt===null?t.memoizedState=e:U_(t,Zt.memoizedState,e)},useTransition:function(){var e=bh(Pl)[0],t=sn().memoizedState;return[e,t]},useMutableSource:E_,useSyncExternalStore:j_,useId:V_,unstable_isNewReconciler:!1};function dn(e,t){if(e&&e.defaultProps){t=Ot({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Rp(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ot({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gd={isMounted:function(e){return(e=e._reactInternals)?io(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=gr(),s=ai(e),i=fs(n,s);i.payload=t,r!=null&&(i.callback=r),t=ii(e,i,s),t!==null&&(wn(t,e,s,n),_u(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=gr(),s=ai(e),i=fs(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ii(e,i,s),t!==null&&(wn(t,e,s,n),_u(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=gr(),n=ai(e),s=fs(r,n);s.tag=2,t!=null&&(s.callback=t),t=ii(e,s,n),t!==null&&(wn(t,e,n,r),_u(t,e,n))}};function gx(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!kl(r,n)||!kl(s,i):!0}function H_(e,t,r){var n=!1,s=fi,i=t.contextType;return typeof i=="object"&&i!==null?i=nn(i):(s=Tr(t)?Yi:cr.current,n=t.contextTypes,i=(n=n!=null)?ta(e,s):fi),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function vx(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&&Gd.enqueueReplaceState(t,t.state,null)}function Pp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},ag(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=nn(i):(i=Tr(t)?Yi:cr.current,s.context=ta(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Rp(e,t,i,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&&Gd.enqueueReplaceState(s,s.state,null),td(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ia(e,t){try{var r="",n=t;do r+=IT(n),n=n.return;while(n);var s=r}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Sh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ap(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var c2=typeof WeakMap=="function"?WeakMap:Map;function Y_(e,t,r){r=fs(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){od||(od=!0,$p=n),Ap(e,t)},r}function Z_(e,t,r){r=fs(-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(){Ap(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ap(e,t),typeof n!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function yx(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new c2;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=S2.bind(null,e,t,r),t.then(e,e))}function xx(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 wx(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=fs(-1,1),t.tag=2,ii(r,t,1))),r.lanes|=1),e)}var u2=Es.ReactCurrentOwner,Er=!1;function pr(e,t,r,n){t.child=e===null?b_(t,null,r,n):na(t,e.child,r,n)}function _x(e,t,r,n,s){r=r.render;var i=t.ref;return $o(t,s),n=fg(e,t,r,n,i,s),r=hg(),e!==null&&!Er?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Tt&&r&&eg(t),t.flags|=1,pr(e,t,n,s),t.child)}function bx(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Sg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,K_(e,t,i,n,s)):(e=ju(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:kl,r(o,n)&&e.ref===t.ref)return xs(e,t,s)}return t.flags|=1,e=li(i,n),e.ref=t.ref,e.return=t,t.child=e}function K_(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(kl(i,n)&&e.ref===t.ref)if(Er=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Er=!0);else return t.lanes=e.lanes,xs(e,t,s)}return Dp(e,t,r,n,s)}function G_(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Ao,Ar),Ar|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yt(Ao,Ar),Ar|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,yt(Ao,Ar),Ar|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,yt(Ao,Ar),Ar|=n;return pr(e,t,s,r),t.child}function q_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Dp(e,t,r,n,s){var i=Tr(r)?Yi:cr.current;return i=ta(t,i),$o(t,s),r=fg(e,t,r,n,i,s),n=hg(),e!==null&&!Er?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Tt&&n&&eg(t),t.flags|=1,pr(e,t,r,s),t.child)}function Sx(e,t,r,n,s){if(Tr(r)){var i=!0;qu(t)}else i=!1;if($o(t,s),t.stateNode===null)ku(e,t),H_(t,r,n),Pp(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=nn(u):(u=Tr(r)?Yi:cr.current,u=ta(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&vx(t,o,n,u),Ws=!1;var m=t.memoizedState;o.state=m,td(t,n,o,s),l=t.memoizedState,a!==n||m!==l||jr.current||Ws?(typeof d=="function"&&(Rp(t,r,d,n),l=t.memoizedState),(a=Ws||gx(t,r,a,n,m,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,k_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:dn(t.type,a),o.props=u,f=t.pendingProps,m=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=nn(l):(l=Tr(r)?Yi:cr.current,l=ta(t,l));var g=r.getDerivedStateFromProps;(d=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||m!==l)&&vx(t,o,n,l),Ws=!1,m=t.memoizedState,o.state=m,td(t,n,o,s);var w=t.memoizedState;a!==f||m!==w||jr.current||Ws?(typeof g=="function"&&(Rp(t,r,g,n),w=t.memoizedState),(u=Ws||gx(t,r,u,n,m,w,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),o.props=n,o.state=w,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return Op(e,t,r,n,i,s)}function Op(e,t,r,n,s,i){q_(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&lx(t,r,!1),xs(e,t,i);n=t.stateNode,u2.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=na(t,e.child,null,i),t.child=na(t,null,a,i)):pr(e,t,a,i),t.memoizedState=n.state,s&&lx(t,r,!0),t.child}function X_(e){var t=e.stateNode;t.pendingContext?ax(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ax(e,t.context,!1),lg(e,t.containerInfo)}function kx(e,t,r,n,s){return ra(),rg(s),t.flags|=256,pr(e,t,r,n),t.child}var Mp={dehydrated:null,treeContext:null,retryLane:0};function Ip(e){return{baseLanes:e,cachePool:null,transitions:null}}function Q_(e,t,r){var n=t.pendingProps,s=Pt.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),yt(Pt,s&1),e===null)return Tp(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):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Qd(o,n,0,null),e=Wi(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ip(r),t.memoizedState=Mp,e):gg(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return d2(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=li(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=li(a,i):(i=Wi(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Ip(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Mp,n}return i=e.child,e=i.sibling,n=li(i,{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 gg(e,t){return t=Qd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qc(e,t,r,n){return n!==null&&rg(n),na(t,e.child,null,r),e=gg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d2(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=Sh(Error(ie(422))),Qc(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=Qd({mode:"visible",children:n.children},s,0,null),i=Wi(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&na(t,e.child,null,o),t.child.memoizedState=Ip(o),t.memoizedState=Mp,i);if(!(t.mode&1))return Qc(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(ie(419)),n=Sh(i,n,void 0),Qc(e,t,o,n)}if(a=(o&e.childLanes)!==0,Er||a){if(n=er,n!==null){switch(o&-o){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|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ys(e,s),wn(n,e,s,-1))}return bg(),n=Sh(Error(ie(421))),Qc(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=k2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Mr=si(s.nextSibling),Ir=t,Tt=!0,mn=null,e!==null&&(Xr[Qr++]=as,Xr[Qr++]=ls,Xr[Qr++]=Zi,as=e.id,ls=e.overflow,Zi=t),t=gg(t,n.children),t.flags|=4096,t)}function Cx(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Np(e.return,t,r)}function kh(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function J_(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(pr(e,t,n.children,r),n=Pt.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&&Cx(e,r,t);else if(e.tag===19)Cx(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(yt(Pt,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&&rd(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),kh(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&rd(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}kh(t,!0,r,null,i);break;case"together":kh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ku(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Gi|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=li(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=li(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function f2(e,t,r){switch(t.tag){case 3:X_(t),ra();break;case 5:C_(t);break;case 1:Tr(t.type)&&qu(t);break;case 4:lg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;yt(Ju,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(yt(Pt,Pt.current&1),t.flags|=128,null):r&t.child.childLanes?Q_(e,t,r):(yt(Pt,Pt.current&1),e=xs(e,t,r),e!==null?e.sibling:null);yt(Pt,Pt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return J_(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),yt(Pt,Pt.current),n)break;return null;case 22:case 23:return t.lanes=0,G_(e,t,r)}return xs(e,t,r)}var e1,Lp,t1,r1;e1=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}};Lp=function(){};t1=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,zi(zn.current);var i=null;switch(r){case"input":s=ip(e,s),n=ip(e,n),i=[];break;case"select":s=Ot({},s,{value:void 0}),n=Ot({},n,{value:void 0}),i=[];break;case"textarea":s=lp(e,s),n=lp(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ku)}up(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(vl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(vl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&bt("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};r1=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ia(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 h2(e,t,r){var n=t.pendingProps;switch(tg(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 Tr(t.type)&&Gu(),or(t),null;case 3:return n=t.stateNode,sa(),St(jr),St(cr),ug(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mn!==null&&(Hp(mn),mn=null))),Lp(e,t),or(t),null;case 5:cg(t);var s=zi(Nl.current);if(r=t.type,e!==null&&t.stateNode!=null)t1(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return or(t),null}if(e=zi(zn.current),qc(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[On]=t,n[jl]=i,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<Ga.length;s++)bt(Ga[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":Oy(n,i),bt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},bt("invalid",n);break;case"textarea":Iy(n,i),bt("invalid",n)}up(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Gc(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Gc(n.textContent,a,e),s=["children",""+a]):vl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&bt("scroll",n)}switch(r){case"input":Vc(n),My(n,i,!0);break;case"textarea":Vc(n),Ly(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Ku)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Rw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[On]=t,e[jl]=n,e1(e,t,!1,!1),t.stateNode=e;e:{switch(o=dp(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<Ga.length;s++)bt(Ga[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":Oy(e,n),s=ip(e,n),bt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Ot({},n,{value:void 0}),bt("invalid",e);break;case"textarea":Iy(e,n),s=lp(e,n),bt("invalid",e);break;default:s=n}up(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Dw(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Pw(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&yl(e,l):typeof l=="number"&&yl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(vl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&bt("scroll",e):l!=null&&Um(e,i,l,o))}switch(r){case"input":Vc(e),My(e,n,!1);break;case"textarea":Vc(e),Ly(e);break;case"option":n.value!=null&&e.setAttribute("value",""+di(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Fo(e,!!n.multiple,i,!1):n.defaultValue!=null&&Fo(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ku)}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)r1(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=zi(Nl.current),zi(zn.current),qc(t)){if(n=t.stateNode,r=t.memoizedProps,n[On]=t,(i=n.nodeValue!==r)&&(e=Ir,e!==null))switch(e.tag){case 3:Gc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gc(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[On]=t,t.stateNode=n}return or(t),null;case 13:if(St(Pt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Tt&&Mr!==null&&t.mode&1&&!(t.flags&128))w_(),ra(),t.flags|=98560,i=!1;else if(i=qc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[On]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;or(t),i=!1}else mn!==null&&(Hp(mn),mn=null),i=!0;if(!i)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||Pt.current&1?Kt===0&&(Kt=3):bg())),t.updateQueue!==null&&(t.flags|=4),or(t),null);case 4:return sa(),Lp(e,t),e===null&&Cl(t.stateNode.containerInfo),or(t),null;case 10:return ig(t.type._context),or(t),null;case 17:return Tr(t.type)&&Gu(),or(t),null;case 19:if(St(Pt),i=t.memoizedState,i===null)return or(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Ia(i,!1);else{if(Kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=rd(e),o!==null){for(t.flags|=128,Ia(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return yt(Pt,Pt.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ut()>oa&&(t.flags|=128,n=!0,Ia(i,!1),t.lanes=4194304)}else{if(!n)if(e=rd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ia(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Tt)return or(t),null}else 2*Ut()-i.renderingStartTime>oa&&r!==1073741824&&(t.flags|=128,n=!0,Ia(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ut(),t.sibling=null,r=Pt.current,yt(Pt,n?r&1|2:r&1),t):(or(t),null);case 22:case 23:return _g(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ar&1073741824&&(or(t),t.subtreeFlags&6&&(t.flags|=8192)):or(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function p2(e,t){switch(tg(t),t.tag){case 1:return Tr(t.type)&&Gu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sa(),St(jr),St(cr),ug(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cg(t),null;case 13:if(St(Pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(Pt),null;case 4:return sa(),null;case 10:return ig(t.type._context),null;case 22:case 23:return _g(),null;case 24:return null;default:return null}}var Jc=!1,ar=!1,m2=typeof WeakSet=="function"?WeakSet:Set,be=null;function Po(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 Fp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var Ex=!1;function g2(e,t){if(_p=Hu,e=a_(),Jm(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,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var g;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)m=f,f=g;for(;;){if(f===e)break t;if(m===r&&++u===s&&(a=o),m===i&&++d===n&&(l=o),(g=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=g}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(bp={focusedElem:e,selectionRange:r},Hu=!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 w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,x=w.memoizedState,h=t.stateNode,p=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:dn(t.type,v),x);h.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(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 w=Ex,Ex=!1,w}function ll(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 i=s.destroy;s.destroy=void 0,i!==void 0&&Fp(t,r,i)}s=s.next}while(s!==n)}}function qd(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 zp(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 n1(e){var t=e.alternate;t!==null&&(e.alternate=null,n1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[On],delete t[jl],delete t[Cp],delete t[QN],delete t[JN])),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 s1(e){return e.tag===5||e.tag===3||e.tag===4}function jx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||s1(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 Up(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=Ku));else if(n!==4&&(e=e.child,e!==null))for(Up(e,t,r),e=e.sibling;e!==null;)Up(e,t,r),e=e.sibling}function Vp(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(Vp(e,t,r),e=e.sibling;e!==null;)Vp(e,t,r),e=e.sibling}var tr=null,fn=!1;function Ls(e,t,r){for(r=r.child;r!==null;)i1(e,t,r),r=r.sibling}function i1(e,t,r){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount($d,r)}catch{}switch(r.tag){case 5:ar||Po(r,t);case 6:var n=tr,s=fn;tr=null,Ls(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?vh(e.parentNode,r):e.nodeType===1&&vh(e,r),bl(e)):vh(tr,r.stateNode));break;case 4:n=tr,s=fn,tr=r.stateNode.containerInfo,fn=!0,Ls(e,t,r),tr=n,fn=s;break;case 0:case 11:case 14:case 15:if(!ar&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Fp(r,t,o),s=s.next}while(s!==n)}Ls(e,t,r);break;case 1:if(!ar&&(Po(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)}Ls(e,t,r);break;case 21:Ls(e,t,r);break;case 22:r.mode&1?(ar=(n=ar)||r.memoizedState!==null,Ls(e,t,r),ar=n):Ls(e,t,r);break;default:Ls(e,t,r)}}function Tx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new m2),t.forEach(function(n){var s=C2.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 i=e,o=t,a=o;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(ie(160));i1(i,o,s),tr=null,fn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Lt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)o1(t,e),t=t.sibling}function o1(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),An(e),n&4){try{ll(3,e,e.return),qd(3,e)}catch(v){Lt(e,e.return,v)}try{ll(5,e,e.return)}catch(v){Lt(e,e.return,v)}}break;case 1:un(t,e),An(e),n&512&&r!==null&&Po(r,r.return);break;case 5:if(un(t,e),An(e),n&512&&r!==null&&Po(r,r.return),e.flags&32){var s=e.stateNode;try{yl(s,"")}catch(v){Lt(e,e.return,v)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Tw(s,i),dp(a,o);var u=dp(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?Dw(s,f):d==="dangerouslySetInnerHTML"?Pw(s,f):d==="children"?yl(s,f):Um(s,d,f,u)}switch(a){case"input":op(s,i);break;case"textarea":Nw(s,i);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Fo(s,!!i.multiple,g,!1):m!==!!i.multiple&&(i.defaultValue!=null?Fo(s,!!i.multiple,i.defaultValue,!0):Fo(s,!!i.multiple,i.multiple?[]:"",!1))}s[jl]=i}catch(v){Lt(e,e.return,v)}}break;case 6:if(un(t,e),An(e),n&4){if(e.stateNode===null)throw Error(ie(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){Lt(e,e.return,v)}}break;case 3:if(un(t,e),An(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{bl(t.containerInfo)}catch(v){Lt(e,e.return,v)}break;case 4:un(t,e),An(e);break;case 13:un(t,e),An(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(xg=Ut())),n&4&&Tx(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(ar=(u=ar)||d,un(t,e),ar=u):un(t,e),An(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,g=m.child,m.tag){case 0:case 11:case 14:case 15:ll(4,m,m.return);break;case 1:Po(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Lt(n,r,v)}}break;case 5:Po(m,m.return);break;case 22:if(m.memoizedState!==null){Rx(f);continue}}g!==null?(g.return=m,be=g):Rx(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Aw("display",o))}catch(v){Lt(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){Lt(e,e.return,v)}}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),An(e),n&4&&Tx(e);break;case 21:break;default:un(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(s1(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(yl(s,""),n.flags&=-33);var i=jx(e);Vp(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=jx(e);Up(e,a,o);break;default:throw Error(ie(161))}}catch(l){Lt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v2(e,t,r){be=e,a1(e)}function a1(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var s=be,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Jc;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ar;a=Jc;var u=ar;if(Jc=o,(ar=l)&&!u)for(be=s;be!==null;)o=be,l=o.child,o.tag===22&&o.memoizedState!==null?Px(s):l!==null?(l.return=o,be=l):Px(s);for(;i!==null;)be=i,a1(i),i=i.sibling;be=s,Jc=a,ar=u}Nx(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,be=i):Nx(e)}}function Nx(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:ar||qd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ar)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 i=t.updateQueue;i!==null&&hx(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}hx(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&bl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}ar||t.flags&512&&zp(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 Rx(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 Px(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{qd(4,t)}catch(l){Lt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Lt(t,s,l)}}var i=t.return;try{zp(t)}catch(l){Lt(t,i,l)}break;case 5:var o=t.return;try{zp(t)}catch(l){Lt(t,o,l)}}}catch(l){Lt(t,t.return,l)}if(t===e){be=null;break}var a=t.sibling;if(a!==null){a.return=t.return,be=a;break}be=t.return}}var y2=Math.ceil,id=Es.ReactCurrentDispatcher,vg=Es.ReactCurrentOwner,tn=Es.ReactCurrentBatchConfig,ot=0,er=null,Wt=null,rr=0,Ar=0,Ao=bi(0),Kt=0,Dl=null,Gi=0,Xd=0,yg=0,cl=null,Cr=null,xg=0,oa=1/0,ns=null,od=!1,$p=null,oi=null,eu=!1,Xs=null,ad=0,ul=0,Wp=null,Cu=-1,Eu=0;function gr(){return ot&6?Ut():Cu!==-1?Cu:Cu=Ut()}function ai(e){return e.mode&1?ot&2&&rr!==0?rr&-rr:t2.transition!==null?(Eu===0&&(Eu=Hw()),Eu):(e=mt,e!==0||(e=window.event,e=e===void 0?16:Qw(e.type)),e):1}function wn(e,t,r,n){if(50<ul)throw ul=0,Wp=null,Error(ie(185));oc(e,r,n),(!(ot&2)||e!==er)&&(e===er&&(!(ot&2)&&(Xd|=r),Kt===4&&Hs(e,rr)),Nr(e,n),r===1&&ot===0&&!(t.mode&1)&&(oa=Ut()+500,Zd&&Si()))}function Nr(e,t){var r=e.callbackNode;tN(e,t);var n=Bu(e,e===er?rr:0);if(n===0)r!==null&&Uy(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Uy(r),t===1)e.tag===0?e2(Ax.bind(null,e)):v_(Ax.bind(null,e)),qN(function(){!(ot&6)&&Si()}),r=null;else{switch(Yw(n)){case 1:r=Hm;break;case 4:r=Ww;break;case 16:r=Wu;break;case 536870912:r=Bw;break;default:r=Wu}r=m1(r,l1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function l1(e,t){if(Cu=-1,Eu=0,ot&6)throw Error(ie(327));var r=e.callbackNode;if(Wo()&&e.callbackNode!==r)return null;var n=Bu(e,e===er?rr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=ld(e,n);else{t=n;var s=ot;ot|=2;var i=u1();(er!==e||rr!==t)&&(ns=null,oa=Ut()+500,$i(e,t));do try{_2();break}catch(a){c1(e,a)}while(!0);sg(),id.current=i,ot=s,Wt!==null?t=0:(er=null,rr=0,t=Kt)}if(t!==0){if(t===2&&(s=gp(e),s!==0&&(n=s,t=Bp(e,s))),t===1)throw r=Dl,$i(e,0),Hs(e,n),Nr(e,Ut()),r;if(t===6)Hs(e,n);else{if(s=e.current.alternate,!(n&30)&&!x2(s)&&(t=ld(e,n),t===2&&(i=gp(e),i!==0&&(n=i,t=Bp(e,i))),t===1))throw r=Dl,$i(e,0),Hs(e,n),Nr(e,Ut()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:Di(e,Cr,ns);break;case 3:if(Hs(e,n),(n&130023424)===n&&(t=xg+500-Ut(),10<t)){if(Bu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){gr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=kp(Di.bind(null,e,Cr,ns),t);break}Di(e,Cr,ns);break;case 4:if(Hs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-xn(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}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*y2(n/1960))-n,10<n){e.timeoutHandle=kp(Di.bind(null,e,Cr,ns),n);break}Di(e,Cr,ns);break;case 5:Di(e,Cr,ns);break;default:throw Error(ie(329))}}}return Nr(e,Ut()),e.callbackNode===r?l1.bind(null,e):null}function Bp(e,t){var r=cl;return e.current.memoizedState.isDehydrated&&($i(e,t).flags|=256),e=ld(e,t),e!==2&&(t=Cr,Cr=r,t!==null&&Hp(t)),e}function Hp(e){Cr===null?Cr=e:Cr.push.apply(Cr,e)}function x2(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],i=s.getSnapshot;s=s.value;try{if(!Sn(i(),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 Hs(e,t){for(t&=~yg,t&=~Xd,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 Ax(e){if(ot&6)throw Error(ie(327));Wo();var t=Bu(e,0);if(!(t&1))return Nr(e,Ut()),null;var r=ld(e,t);if(e.tag!==0&&r===2){var n=gp(e);n!==0&&(t=n,r=Bp(e,n))}if(r===1)throw r=Dl,$i(e,0),Hs(e,t),Nr(e,Ut()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Di(e,Cr,ns),Nr(e,Ut()),null}function wg(e,t){var r=ot;ot|=1;try{return e(t)}finally{ot=r,ot===0&&(oa=Ut()+500,Zd&&Si())}}function qi(e){Xs!==null&&Xs.tag===0&&!(ot&6)&&Wo();var t=ot;ot|=1;var r=tn.transition,n=mt;try{if(tn.transition=null,mt=1,e)return e()}finally{mt=n,tn.transition=r,ot=t,!(ot&6)&&Si()}}function _g(){Ar=Ao.current,St(Ao)}function $i(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,GN(r)),Wt!==null)for(r=Wt.return;r!==null;){var n=r;switch(tg(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Gu();break;case 3:sa(),St(jr),St(cr),ug();break;case 5:cg(n);break;case 4:sa();break;case 13:St(Pt);break;case 19:St(Pt);break;case 10:ig(n.type._context);break;case 22:case 23:_g()}r=r.return}if(er=e,Wt=e=li(e.current,null),rr=Ar=t,Kt=0,Dl=null,yg=Xd=Gi=0,Cr=cl=null,Fi!==null){for(t=0;t<Fi.length;t++)if(r=Fi[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}Fi=null}return e}function c1(e,t){do{var r=Wt;try{if(sg(),bu.current=sd,nd){for(var n=Dt.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}nd=!1}if(Ki=0,Jt=Zt=Dt=null,al=!1,Rl=0,vg.current=null,r===null||r.return===null){Kt=1,Dl=t,Wt=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=rr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=xx(o);if(g!==null){g.flags&=-257,wx(g,o,a,i,t),g.mode&1&&yx(i,u,t),t=g,l=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(l),t.updateQueue=v}else w.add(l);break e}else{if(!(t&1)){yx(i,u,t),bg();break e}l=Error(ie(426))}}else if(Tt&&a.mode&1){var x=xx(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),wx(x,o,a,i,t),rg(ia(l,a));break e}}i=l=ia(l,a),Kt!==4&&(Kt=2),cl===null?cl=[i]:cl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var h=Y_(i,l,t);fx(i,h);break e;case 1:a=l;var p=i.type,_=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(oi===null||!oi.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var C=Z_(i,a,t);fx(i,C);break e}}i=i.return}while(i!==null)}f1(r)}catch(E){t=E,Wt===r&&r!==null&&(Wt=r=r.return);continue}break}while(!0)}function u1(){var e=id.current;return id.current=sd,e===null?sd:e}function bg(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),er===null||!(Gi&268435455)&&!(Xd&268435455)||Hs(er,rr)}function ld(e,t){var r=ot;ot|=2;var n=u1();(er!==e||rr!==t)&&(ns=null,$i(e,t));do try{w2();break}catch(s){c1(e,s)}while(!0);if(sg(),ot=r,id.current=n,Wt!==null)throw Error(ie(261));return er=null,rr=0,Kt}function w2(){for(;Wt!==null;)d1(Wt)}function _2(){for(;Wt!==null&&!YT();)d1(Wt)}function d1(e){var t=p1(e.alternate,e,Ar);e.memoizedProps=e.pendingProps,t===null?f1(e):Wt=t,vg.current=null}function f1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=p2(r,t),r!==null){r.flags&=32767,Wt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kt=6,Wt=null;return}}else if(r=h2(r,t,Ar),r!==null){Wt=r;return}if(t=t.sibling,t!==null){Wt=t;return}Wt=t=e}while(t!==null);Kt===0&&(Kt=5)}function Di(e,t,r){var n=mt,s=tn.transition;try{tn.transition=null,mt=1,b2(e,t,r,n)}finally{tn.transition=s,mt=n}return null}function b2(e,t,r,n){do Wo();while(Xs!==null);if(ot&6)throw Error(ie(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(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(rN(e,i),e===er&&(Wt=er=null,rr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||eu||(eu=!0,m1(Wu,function(){return Wo(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=tn.transition,tn.transition=null;var o=mt;mt=1;var a=ot;ot|=4,vg.current=null,g2(e,r),o1(r,e),$N(bp),Hu=!!_p,bp=_p=null,e.current=r,v2(r),ZT(),ot=a,mt=o,tn.transition=i}else e.current=r;if(eu&&(eu=!1,Xs=e,ad=s),i=e.pendingLanes,i===0&&(oi=null),qT(r.stateNode),Nr(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(od)throw od=!1,e=$p,$p=null,e;return ad&1&&e.tag!==0&&Wo(),i=e.pendingLanes,i&1?e===Wp?ul++:(ul=0,Wp=e):ul=0,Si(),null}function Wo(){if(Xs!==null){var e=Yw(ad),t=tn.transition,r=mt;try{if(tn.transition=null,mt=16>e?16:e,Xs===null)var n=!1;else{if(e=Xs,Xs=null,ad=0,ot&6)throw Error(ie(331));var s=ot;for(ot|=4,be=e.current;be!==null;){var i=be,o=i.child;if(be.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(be=u;be!==null;){var d=be;switch(d.tag){case 0:case 11:case 15:ll(8,d,i)}var f=d.child;if(f!==null)f.return=d,be=f;else for(;be!==null;){d=be;var m=d.sibling,g=d.return;if(n1(d),d===u){be=null;break}if(m!==null){m.return=g,be=m;break}be=g}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}be=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,be=o;else e:for(;be!==null;){if(i=be,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ll(9,i,i.return)}var h=i.sibling;if(h!==null){h.return=i.return,be=h;break e}be=i.return}}var p=e.current;for(be=p;be!==null;){o=be;var _=o.child;if(o.subtreeFlags&2064&&_!==null)_.return=o,be=_;else e:for(o=p;be!==null;){if(a=be,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:qd(9,a)}}catch(E){Lt(a,a.return,E)}if(a===o){be=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,be=C;break e}be=a.return}}if(ot=s,Si(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot($d,e)}catch{}n=!0}return n}finally{mt=r,tn.transition=t}}return!1}function Dx(e,t,r){t=ia(r,t),t=Y_(e,t,1),e=ii(e,t,1),t=gr(),e!==null&&(oc(e,1,t),Nr(e,t))}function Lt(e,t,r){if(e.tag===3)Dx(e,e,r);else for(;t!==null;){if(t.tag===3){Dx(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(oi===null||!oi.has(n))){e=ia(r,e),e=Z_(t,e,1),t=ii(t,e,1),e=gr(),t!==null&&(oc(t,1,e),Nr(t,e));break}}t=t.return}}function S2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=gr(),e.pingedLanes|=e.suspendedLanes&r,er===e&&(rr&r)===r&&(Kt===4||Kt===3&&(rr&130023424)===rr&&500>Ut()-xg?$i(e,0):yg|=r),Nr(e,t)}function h1(e,t){t===0&&(e.mode&1?(t=Bc,Bc<<=1,!(Bc&130023424)&&(Bc=4194304)):t=1);var r=gr();e=ys(e,t),e!==null&&(oc(e,t,r),Nr(e,r))}function k2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),h1(e,r)}function C2(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(ie(314))}n!==null&&n.delete(t),h1(e,r)}var p1;p1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||jr.current)Er=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Er=!1,f2(e,t,r);Er=!!(e.flags&131072)}else Er=!1,Tt&&t.flags&1048576&&y_(t,Qu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ku(e,t),e=t.pendingProps;var s=ta(t,cr.current);$o(t,r),s=fg(null,t,n,e,s,r);var i=hg();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,Tr(n)?(i=!0,qu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ag(t),s.updater=Gd,t.stateNode=s,s._reactInternals=t,Pp(t,n,e,r),t=Op(null,t,n,!0,i,r)):(t.tag=0,Tt&&i&&eg(t),pr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ku(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=j2(n),e=dn(n,e),s){case 0:t=Dp(null,t,n,e,r);break e;case 1:t=Sx(null,t,n,e,r);break e;case 11:t=_x(null,t,n,e,r);break e;case 14:t=bx(null,t,n,dn(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Dp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),Sx(e,t,n,s,r);case 3:e:{if(X_(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,s=i.element,k_(e,t),td(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=ia(Error(ie(423)),t),t=kx(e,t,n,r,s);break e}else if(n!==s){s=ia(Error(ie(424)),t),t=kx(e,t,n,r,s);break e}else for(Mr=si(t.stateNode.containerInfo.firstChild),Ir=t,Tt=!0,mn=null,r=b_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ra(),n===s){t=xs(e,t,r);break e}pr(e,t,n,r)}t=t.child}return t;case 5:return C_(t),e===null&&Tp(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Sp(n,s)?o=null:i!==null&&Sp(n,i)&&(t.flags|=32),q_(e,t),pr(e,t,o,r),t.child;case 6:return e===null&&Tp(t),null;case 13:return Q_(e,t,r);case 4:return lg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=na(t,null,n,r):pr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),_x(e,t,n,s,r);case 7:return pr(e,t,t.pendingProps,r),t.child;case 8:return pr(e,t,t.pendingProps.children,r),t.child;case 12:return pr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,yt(Ju,n._currentValue),n._currentValue=o,i!==null)if(Sn(i.value,o)){if(i.children===s.children&&!jr.current){t=xs(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=fs(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Np(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ie(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Np(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}pr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,$o(t,r),s=nn(s),n=n(s),t.flags|=1,pr(e,t,n,r),t.child;case 14:return n=t.type,s=dn(n,t.pendingProps),s=dn(n.type,s),bx(e,t,n,s,r);case 15:return K_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:dn(n,s),ku(e,t),t.tag=1,Tr(n)?(e=!0,qu(t)):e=!1,$o(t,r),H_(t,n,s),Pp(t,n,s,r),Op(null,t,n,!0,e,r);case 19:return J_(e,t,r);case 22:return G_(e,t,r)}throw Error(ie(156,t.tag))};function m1(e,t){return $w(e,t)}function E2(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 E2(e,t,r,n)}function Sg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j2(e){if(typeof e=="function")return Sg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$m)return 11;if(e===Wm)return 14}return 2}function li(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 ju(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")Sg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case bo:return Wi(r.children,s,i,t);case Vm:o=8,s|=8;break;case tp:return e=en(12,r,t,s|2),e.elementType=tp,e.lanes=i,e;case rp:return e=en(13,r,t,s),e.elementType=rp,e.lanes=i,e;case np:return e=en(19,r,t,s),e.elementType=np,e.lanes=i,e;case Cw:return Qd(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Sw:o=10;break e;case kw:o=9;break e;case $m:o=11;break e;case Wm:o=14;break e;case $s:o=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=en(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function Wi(e,t,r,n){return e=en(7,e,n,t),e.lanes=r,e}function Qd(e,t,r,n){return e=en(22,e,n,t),e.elementType=Cw,e.lanes=r,e.stateNode={isHidden:!1},e}function Ch(e,t,r){return e=en(6,e,null,t),e.lanes=r,e}function Eh(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 T2(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=oh(0),this.expirationTimes=oh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oh(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function kg(e,t,r,n,s,i,o,a,l){return e=new T2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=en(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ag(i),e}function N2(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function g1(e){if(!e)return fi;e=e._reactInternals;e:{if(io(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(Tr(r))return g_(e,r,t)}return t}function v1(e,t,r,n,s,i,o,a,l){return e=kg(r,n,!0,e,s,i,o,a,l),e.context=g1(null),r=e.current,n=gr(),s=ai(r),i=fs(n,s),i.callback=t??null,ii(r,i,s),e.current.lanes=s,oc(e,s,n),Nr(e,n),e}function Jd(e,t,r,n){var s=t.current,i=gr(),o=ai(s);return r=g1(r),t.context===null?t.context=r:t.pendingContext=r,t=fs(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ii(s,t,o),e!==null&&(wn(e,s,o,i),_u(e,s,o)),o}function cd(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 Ox(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Cg(e,t){Ox(e,t),(e=e.alternate)&&Ox(e,t)}function R2(){return null}var y1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Eg(e){this._internalRoot=e}ef.prototype.render=Eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));Jd(e,t,null,null)};ef.prototype.unmount=Eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qi(function(){Jd(null,e,null,null)}),t[vs]=null}};function ef(e){this._internalRoot=e}ef.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gw();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Bs.length&&t!==0&&t<Bs[r].priority;r++);Bs.splice(r,0,e),r===0&&Xw(e)}};function jg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mx(){}function P2(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=cd(o);i.call(u)}}var o=v1(t,n,e,0,null,!1,!1,"",Mx);return e._reactRootContainer=o,e[vs]=o.current,Cl(e.nodeType===8?e.parentNode:e),qi(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=cd(l);a.call(u)}}var l=kg(e,0,!1,null,null,!1,!1,"",Mx);return e._reactRootContainer=l,e[vs]=l.current,Cl(e.nodeType===8?e.parentNode:e),qi(function(){Jd(t,l,r,n)}),l}function rf(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=cd(o);a.call(l)}}Jd(t,o,e,s)}else o=P2(r,t,e,s,n);return cd(o)}Zw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ka(t.pendingLanes);r!==0&&(Ym(t,r|1),Nr(t,Ut()),!(ot&6)&&(oa=Ut()+500,Si()))}break;case 13:qi(function(){var n=ys(e,1);if(n!==null){var s=gr();wn(n,e,1,s)}}),Cg(e,1)}};Zm=function(e){if(e.tag===13){var t=ys(e,134217728);if(t!==null){var r=gr();wn(t,e,134217728,r)}Cg(e,134217728)}};Kw=function(e){if(e.tag===13){var t=ai(e),r=ys(e,t);if(r!==null){var n=gr();wn(r,e,t,n)}Cg(e,t)}};Gw=function(){return mt};qw=function(e,t){var r=mt;try{return mt=e,t()}finally{mt=r}};hp=function(e,t,r){switch(t){case"input":if(op(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=Yd(n);if(!s)throw Error(ie(90));jw(n),op(n,s)}}}break;case"textarea":Nw(e,r);break;case"select":t=r.value,t!=null&&Fo(e,!!r.multiple,t,!1)}};Iw=wg;Lw=qi;var A2={usingClientEntryPoint:!1,Events:[lc,Eo,Yd,Ow,Mw,wg]},La={findFiberByHostInstance:Li,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D2={bundleType:La.bundleType,version:La.version,rendererPackageName:La.rendererPackageName,rendererConfig:La.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=Uw(e),e===null?null:e.stateNode},findFiberByHostInstance:La.findFiberByHostInstance||R2,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 tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{$d=tu.inject(D2),Fn=tu}catch{}}Vr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A2;Vr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jg(t))throw Error(ie(200));return N2(e,t,null,r)};Vr.createRoot=function(e,t){if(!jg(e))throw Error(ie(299));var r=!1,n="",s=y1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=kg(e,1,!1,null,null,r,!1,n,s),e[vs]=t.current,Cl(e.nodeType===8?e.parentNode:e),new Eg(t)};Vr.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(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=Uw(t),e=e===null?null:e.stateNode,e};Vr.flushSync=function(e){return qi(e)};Vr.hydrate=function(e,t,r){if(!tf(t))throw Error(ie(200));return rf(null,e,t,!0,r)};Vr.hydrateRoot=function(e,t,r){if(!jg(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=y1;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=v1(t,null,e,1,r??null,s,!1,i,o),e[vs]=t.current,Cl(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 ef(t)};Vr.render=function(e,t,r){if(!tf(t))throw Error(ie(200));return rf(null,e,t,!1,r)};Vr.unmountComponentAtNode=function(e){if(!tf(e))throw Error(ie(40));return e._reactRootContainer?(qi(function(){rf(null,null,e,!1,function(){e._reactRootContainer=null,e[vs]=null})}),!0):!1};Vr.unstable_batchedUpdates=wg;Vr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!tf(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return rf(e,t,r,!1,n)};Vr.version="18.3.1-next-f1338f8080-20240426";function x1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x1)}catch(e){console.error(e)}}x1(),xw.exports=Vr;var js=xw.exports;const w1=Dm(js),O2=ow({__proto__:null,default:w1},[js]);var Ix=js;Jh.createRoot=Ix.createRoot,Jh.hydrateRoot=Ix.hydrateRoot;/**
* @remix-run/router v1.19.2
*
* 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 Rt(){return Rt=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},Rt.apply(this,arguments)}var $t;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($t||($t={}));const Lx="popstate";function M2(e){e===void 0&&(e={});function t(s,i){let{pathname:o="/",search:a="",hash:l=""}=Ts(s.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Ol("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(s,i){let o=s.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=s.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof i=="string"?i:Qi(i))}function n(s,i){Xi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return L2(t,r,n,e)}function Qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function I2(){return Math.random().toString(36).substr(2,8)}function Fx(e,t){return{usr:e.state,key:e.key,idx:t}}function Ol(e,t,r,n){return r===void 0&&(r=null),Rt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ts(t):t,{state:r,key:t&&t.key||n||I2()})}function Qi(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 L2(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=$t.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Rt({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=$t.Pop;let x=d(),h=x==null?null:x-u;u=x,l&&l({action:a,location:v.location,delta:h})}function m(x,h){a=$t.Push;let p=Ol(v.location,x,h);r&&r(p,x),u=d()+1;let _=Fx(p,u),C=v.createHref(p);try{o.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}i&&l&&l({action:a,location:v.location,delta:1})}function g(x,h){a=$t.Replace;let p=Ol(v.location,x,h);r&&r(p,x),u=d();let _=Fx(p,u),C=v.createHref(p);o.replaceState(_,"",C),i&&l&&l({action:a,location:v.location,delta:0})}function w(x){let h=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof x=="string"?x:Qi(x);return p=p.replace(/ $/,"%20"),Qe(h,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,h)}let v={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Lx,f),l=x,()=>{s.removeEventListener(Lx,f),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let h=w(x);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:g,go(x){return o.go(x)}};return v}var gt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gt||(gt={}));const F2=new Set(["lazy","caseSensitive","path","id","index","children"]);function z2(e){return e.index===!0}function Ml(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Qe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Qe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),z2(s)){let l=Rt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Rt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Ml(s.children,t,o,n)),l}})}function Oi(e,t,r){return r===void 0&&(r="/"),Tu(e,t,r,!1)}function Tu(e,t,r,n){let s=typeof t=="string"?Ts(t):t,i=va(s.pathname||"/",r);if(i==null)return null;let o=_1(e);V2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=Q2(i);a=q2(o[l],u,n)}return a}function U2(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 _1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Qe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=hs([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(Qe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),_1(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:K2(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of b1(i.path))s(i,o,l)}),t}function b1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=b1(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function V2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:G2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const $2=/^:[\w-]+$/,W2=3,B2=2,H2=1,Y2=10,Z2=-2,zx=e=>e==="*";function K2(e,t){let r=e.split("/"),n=r.length;return r.some(zx)&&(n+=Z2),t&&(n+=B2),r.filter(s=>!zx(s)).reduce((s,i)=>s+($2.test(i)?W2:i===""?H2:Y2),n)}function G2(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 q2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Ux({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),m=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Ux({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:hs([i,f.pathname]),pathnameBase:tR(hs([i,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(i=hs([i,f.pathnameBase]))}return o}function Ux(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=X2(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:m,isOptional:g}=d;if(m==="*"){let v=a[f]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const w=a[f];return g&&!w?u[m]=void 0:u[m]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function X2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Xi(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,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function Q2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xi(!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 va(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 J2(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:eR(r,t):t,search:rR(n),hash:nR(s)}}function eR(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 jh(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 S1(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function nf(e,t){let r=S1(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function sf(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ts(e):(s=Rt({},e),Qe(!s.pathname||!s.pathname.includes("?"),jh("?","pathname","search",s)),Qe(!s.pathname||!s.pathname.includes("#"),jh("#","pathname","hash",s)),Qe(!s.search||!s.search.includes("#"),jh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;s.pathname=m.join("/")}a=f>=0?t[f]:"/"}let l=J2(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),tR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ud{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 of(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const k1=["post","put","patch","delete"],sR=new Set(k1),iR=["get",...k1],oR=new Set(iR),aR=new Set([301,302,303,307,308]),lR=new Set([307,308]),Th={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Fa={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),C1="remix-router-transitions";function dR(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let z=e.detectErrorBoundary;s=W=>({hasErrorBoundary:z(W)})}else s=uR;let i={},o=Ml(e.routes,s,void 0,i),a,l=e.basename||"/",u=e.unstable_dataStrategy||vR,d=e.unstable_patchRoutesOnNavigation,f=Rt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,g=new Set,w=1e3,v=new Set,x=null,h=null,p=null,_=e.hydrationData!=null,C=Oi(o,e.history.location,l),E=null;if(C==null&&!d){let z=fr(404,{pathname:e.history.location.pathname}),{matches:W,route:q}=Gx(o);C=W,E={[q.id]:z}}C&&!e.hydrationData&&Ac(C,o,e.history.location.pathname).active&&(C=null);let P;if(C)if(C.some(z=>z.route.lazy))P=!1;else if(!C.some(z=>z.route.loader))P=!0;else if(f.v7_partialHydration){let z=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null,q=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:z&&z[re.route.id]!==void 0||W&&W[re.route.id]!==void 0:!0;if(W){let re=C.findIndex(we=>W[we.route.id]!==void 0);P=C.slice(0,re+1).every(q)}else P=C.every(q)}else P=e.hydrationData!=null;else if(P=!1,C=[],f.v7_partialHydration){let z=Ac(null,o,e.history.location.pathname);z.active&&z.matches&&(C=z.matches)}let R,j={historyAction:e.history.action,location:e.history.location,matches:C,initialized:P,navigation:Th,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||E,fetchers:new Map,blockers:new Map},D=$t.Pop,L=!1,K,T=!1,F=new Map,b=null,$=!1,ee=!1,Z=[],Y=new Set,O=new Map,X=0,U=-1,V=new Map,ue=new Set,ne=new Map,se=new Map,Pe=new Set,ce=new Map,me=new Map,ke=new Map,De;function Oe(){if(m=e.history.listen(z=>{let{action:W,location:q,delta:re}=z;if(De){De(),De=void 0;return}Xi(me.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 we=Os({currentLocation:j.location,nextLocation:q,historyAction:W});if(we&&re!=null){let Me=new Promise(Be=>{De=Be});e.history.go(re*-1),Ri(we,{state:"blocked",location:q,proceed(){Ri(we,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),Me.then(()=>e.history.go(re))},reset(){let Be=new Map(j.blockers);Be.set(we,Fa),k({blockers:Be})}});return}return S(W,q)}),r){AR(t,F);let z=()=>DR(t,F);t.addEventListener("pagehide",z),b=()=>t.removeEventListener("pagehide",z)}return j.initialized||S($t.Pop,j.location,{initialHydration:!0}),R}function He(){m&&m(),b&&b(),g.clear(),K&&K.abort(),j.fetchers.forEach((z,W)=>ht(W)),j.blockers.forEach((z,W)=>Rc(W))}function ut(z){return g.add(z),()=>g.delete(z)}function k(z,W){W===void 0&&(W={}),j=Rt({},j,z);let q=[],re=[];f.v7_fetcherPersist&&j.fetchers.forEach((we,Me)=>{we.state==="idle"&&(Pe.has(Me)?re.push(Me):q.push(Me))}),[...g].forEach(we=>we(j,{deletedFetchers:re,unstable_viewTransitionOpts:W.viewTransitionOpts,unstable_flushSync:W.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(we=>j.fetchers.delete(we)),re.forEach(we=>ht(we)))}function Q(z,W,q){var re,we;let{flushSync:Me}=q===void 0?{}:q,Be=j.actionData!=null&&j.navigation.formMethod!=null&&hn(j.navigation.formMethod)&&j.navigation.state==="loading"&&((re=z.state)==null?void 0:re._isRedirect)!==!0,pe;W.actionData?Object.keys(W.actionData).length>0?pe=W.actionData:pe=null:Be?pe=j.actionData:pe=null;let Ue=W.loaderData?Zx(j.loaderData,W.loaderData,W.matches||[],W.errors):j.loaderData,Te=j.blockers;Te.size>0&&(Te=new Map(Te),Te.forEach((pt,wt)=>Te.set(wt,Fa)));let Re=L===!0||j.navigation.formMethod!=null&&hn(j.navigation.formMethod)&&((we=z.state)==null?void 0:we._isRedirect)!==!0;a&&(o=a,a=void 0),$||D===$t.Pop||(D===$t.Push?e.history.push(z,z.state):D===$t.Replace&&e.history.replace(z,z.state));let ct;if(D===$t.Pop){let pt=F.get(j.location.pathname);pt&&pt.has(z.pathname)?ct={currentLocation:j.location,nextLocation:z}:F.has(z.pathname)&&(ct={currentLocation:z,nextLocation:j.location})}else if(T){let pt=F.get(j.location.pathname);pt?pt.add(z.pathname):(pt=new Set([z.pathname]),F.set(j.location.pathname,pt)),ct={currentLocation:j.location,nextLocation:z}}k(Rt({},W,{actionData:pe,loaderData:Ue,historyAction:D,location:z,initialized:!0,navigation:Th,revalidation:"idle",restoreScrollPosition:Cy(z,W.matches||j.matches),preventScrollReset:Re,blockers:Te}),{viewTransitionOpts:ct,flushSync:Me===!0}),D=$t.Pop,L=!1,T=!1,$=!1,ee=!1,Z=[]}async function G(z,W){if(typeof z=="number"){e.history.go(z);return}let q=Yp(j.location,j.matches,l,f.v7_prependBasename,z,f.v7_relativeSplatPath,W==null?void 0:W.fromRouteId,W==null?void 0:W.relative),{path:re,submission:we,error:Me}=Vx(f.v7_normalizeFormMethod,!1,q,W),Be=j.location,pe=Ol(j.location,re,W&&W.state);pe=Rt({},pe,e.history.encodeLocation(pe));let Ue=W&&W.replace!=null?W.replace:void 0,Te=$t.Push;Ue===!0?Te=$t.Replace:Ue===!1||we!=null&&hn(we.formMethod)&&we.formAction===j.location.pathname+j.location.search&&(Te=$t.Replace);let Re=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,ct=(W&&W.unstable_flushSync)===!0,pt=Os({currentLocation:Be,nextLocation:pe,historyAction:Te});if(pt){Ri(pt,{state:"blocked",location:pe,proceed(){Ri(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),G(z,W)},reset(){let wt=new Map(j.blockers);wt.set(pt,Fa),k({blockers:wt})}});return}return await S(Te,pe,{submission:we,pendingError:Me,preventScrollReset:Re,replace:W&&W.replace,enableViewTransition:W&&W.unstable_viewTransition,flushSync:ct})}function A(){if(qt(),k({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){S(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}S(D||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:T===!0})}}async function S(z,W,q){K&&K.abort(),K=null,D=z,$=(q&&q.startUninterruptedRevalidation)===!0,sT(j.location,j.matches),L=(q&&q.preventScrollReset)===!0,T=(q&&q.enableViewTransition)===!0;let re=a||o,we=q&&q.overrideNavigation,Me=Oi(re,W,l),Be=(q&&q.flushSync)===!0,pe=Ac(Me,re,W.pathname);if(pe.active&&pe.matches&&(Me=pe.matches),!Me){let{error:it,notFoundMatches:Qt,route:Vt}=Ms(W.pathname);Q(W,{matches:Qt,loaderData:{},errors:{[Vt.id]:it}},{flushSync:Be});return}if(j.initialized&&!ee&&SR(j.location,W)&&!(q&&q.submission&&hn(q.submission.formMethod))){Q(W,{matches:Me},{flushSync:Be});return}K=new AbortController;let Ue=ho(e.history,W,K.signal,q&&q.submission),Te;if(q&&q.pendingError)Te=[Do(Me).route.id,{type:gt.error,error:q.pendingError}];else if(q&&q.submission&&hn(q.submission.formMethod)){let it=await N(Ue,W,q.submission,Me,pe.active,{replace:q.replace,flushSync:Be});if(it.shortCircuited)return;if(it.pendingActionResult){let[Qt,Vt]=it.pendingActionResult;if(Dr(Vt)&&of(Vt.error)&&Vt.error.status===404){K=null,Q(W,{matches:it.matches,loaderData:{},errors:{[Qt]:Vt.error}});return}}Me=it.matches||Me,Te=it.pendingActionResult,we=Nh(W,q.submission),Be=!1,pe.active=!1,Ue=ho(e.history,Ue.url,Ue.signal)}let{shortCircuited:Re,matches:ct,loaderData:pt,errors:wt}=await I(Ue,W,Me,pe.active,we,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Be,Te);Re||(K=null,Q(W,Rt({matches:ct||Me},Kx(Te),{loaderData:pt,errors:wt})))}async function N(z,W,q,re,we,Me){Me===void 0&&(Me={}),qt();let Be=RR(W,q);if(k({navigation:Be},{flushSync:Me.flushSync===!0}),we){let Te=await Dc(re,W.pathname,z.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){let{boundaryId:Re,error:ct}=Pc(W.pathname,Te);return{matches:Te.partialMatches,pendingActionResult:[Re,{type:gt.error,error:ct}]}}else if(Te.matches)re=Te.matches;else{let{notFoundMatches:Re,error:ct,route:pt}=Ms(W.pathname);return{matches:Re,pendingActionResult:[pt.id,{type:gt.error,error:ct}]}}}let pe,Ue=qa(re,W);if(!Ue.route.action&&!Ue.route.lazy)pe={type:gt.error,error:fr(405,{method:z.method,pathname:W.pathname,routeId:Ue.route.id})};else if(pe=(await ze("action",j,z,[Ue],re,null))[Ue.route.id],z.signal.aborted)return{shortCircuited:!0};if(Ui(pe)){let Te;return Me&&Me.replace!=null?Te=Me.replace:Te=Bx(pe.response.headers.get("Location"),new URL(z.url),l)===j.location.pathname+j.location.search,await he(z,pe,!0,{submission:q,replace:Te}),{shortCircuited:!0}}if(Qs(pe))throw fr(400,{type:"defer-action"});if(Dr(pe)){let Te=Do(re,Ue.route.id);return(Me&&Me.replace)!==!0&&(D=$t.Push),{matches:re,pendingActionResult:[Te.route.id,pe]}}return{matches:re,pendingActionResult:[Ue.route.id,pe]}}async function I(z,W,q,re,we,Me,Be,pe,Ue,Te,Re){let ct=we||Nh(W,Me),pt=Me||Be||Xx(ct),wt=!$&&(!f.v7_partialHydration||!Ue);if(re){if(wt){let Mt=H(Re);k(Rt({navigation:ct},Mt!==void 0?{actionData:Mt}:{}),{flushSync:Te})}let Ge=await Dc(q,W.pathname,z.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let{boundaryId:Mt,error:Rr}=Pc(W.pathname,Ge);return{matches:Ge.partialMatches,loaderData:{},errors:{[Mt]:Rr}}}else if(Ge.matches)q=Ge.matches;else{let{error:Mt,notFoundMatches:Rr,route:It}=Ms(W.pathname);return{matches:Rr,loaderData:{},errors:{[It.id]:Mt}}}}let it=a||o,[Qt,Vt]=$x(e.history,j,q,pt,W,f.v7_partialHydration&&Ue===!0,f.v7_skipActionErrorRevalidation,ee,Z,Y,Pe,ne,ue,it,l,Re);if(eh(Ge=>!(q&&q.some(Mt=>Mt.route.id===Ge))||Qt&&Qt.some(Mt=>Mt.route.id===Ge)),U=++X,Qt.length===0&&Vt.length===0){let Ge=Ta();return Q(W,Rt({matches:q,loaderData:{},errors:Re&&Dr(Re[1])?{[Re[0]]:Re[1].error}:null},Kx(Re),Ge?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Te}),{shortCircuited:!0}}if(wt){let Ge={};if(!re){Ge.navigation=ct;let Mt=H(Re);Mt!==void 0&&(Ge.actionData=Mt)}Vt.length>0&&(Ge.fetchers=M(Vt)),k(Ge,{flushSync:Te})}Vt.forEach(Ge=>{O.has(Ge.key)&&dr(Ge.key),Ge.controller&&O.set(Ge.key,Ge.controller)});let Na=()=>Vt.forEach(Ge=>dr(Ge.key));K&&K.signal.addEventListener("abort",Na);let{loaderResults:qn,fetcherResults:uo}=await We(j,q,Qt,Vt,z);if(z.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",Na),Vt.forEach(Ge=>O.delete(Ge.key));let Is=ru(qn);if(Is)return await he(z,Is.result,!0,{replace:pe}),{shortCircuited:!0};if(Is=ru(uo),Is)return ue.add(Is.key),await he(z,Is.result,!0,{replace:pe}),{shortCircuited:!0};let{loaderData:Oc,errors:Xn}=Yx(j,q,Qt,qn,Re,Vt,uo,ce);ce.forEach((Ge,Mt)=>{Ge.subscribe(Rr=>{(Rr||Ge.done)&&ce.delete(Mt)})}),f.v7_partialHydration&&Ue&&j.errors&&Object.entries(j.errors).filter(Ge=>{let[Mt]=Ge;return!Qt.some(Rr=>Rr.route.id===Mt)}).forEach(Ge=>{let[Mt,Rr]=Ge;Xn=Object.assign(Xn||{},{[Mt]:Rr})});let Mc=Ta(),Ic=Nc(U),Lc=Mc||Ic||Vt.length>0;return Rt({matches:q,loaderData:Oc,errors:Xn},Lc?{fetchers:new Map(j.fetchers)}:{})}function H(z){if(z&&!Dr(z[1]))return{[z[0]]:z[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(z){return z.forEach(W=>{let q=j.fetchers.get(W.key),re=za(void 0,q?q.data:void 0);j.fetchers.set(W.key,re)}),new Map(j.fetchers)}function B(z,W,q,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.");O.has(z)&&dr(z);let we=(re&&re.unstable_flushSync)===!0,Me=a||o,Be=Yp(j.location,j.matches,l,f.v7_prependBasename,q,f.v7_relativeSplatPath,W,re==null?void 0:re.relative),pe=Oi(Me,Be,l),Ue=Ac(pe,Me,Be);if(Ue.active&&Ue.matches&&(pe=Ue.matches),!pe){Et(z,W,fr(404,{pathname:Be}),{flushSync:we});return}let{path:Te,submission:Re,error:ct}=Vx(f.v7_normalizeFormMethod,!0,Be,re);if(ct){Et(z,W,ct,{flushSync:we});return}let pt=qa(pe,Te);if(L=(re&&re.preventScrollReset)===!0,Re&&hn(Re.formMethod)){J(z,W,Te,pt,pe,Ue.active,we,Re);return}ne.set(z,{routeId:W,path:Te}),te(z,W,Te,pt,pe,Ue.active,we,Re)}async function J(z,W,q,re,we,Me,Be,pe){qt(),ne.delete(z);function Ue(It){if(!It.route.action&&!It.route.lazy){let Qn=fr(405,{method:pe.formMethod,pathname:q,routeId:W});return Et(z,W,Qn,{flushSync:Be}),!0}return!1}if(!Me&&Ue(re))return;let Te=j.fetchers.get(z);Xt(z,PR(pe,Te),{flushSync:Be});let Re=new AbortController,ct=ho(e.history,q,Re.signal,pe);if(Me){let It=await Dc(we,q,ct.signal);if(It.type==="aborted")return;if(It.type==="error"){let{error:Qn}=Pc(q,It);Et(z,W,Qn,{flushSync:Be});return}else if(It.matches){if(we=It.matches,re=qa(we,q),Ue(re))return}else{Et(z,W,fr(404,{pathname:q}),{flushSync:Be});return}}O.set(z,Re);let pt=X,it=(await ze("action",j,ct,[re],we,z))[re.route.id];if(ct.signal.aborted){O.get(z)===Re&&O.delete(z);return}if(f.v7_fetcherPersist&&Pe.has(z)){if(Ui(it)||Dr(it)){Xt(z,Us(void 0));return}}else{if(Ui(it))if(O.delete(z),U>pt){Xt(z,Us(void 0));return}else return ue.add(z),Xt(z,za(pe)),he(ct,it,!1,{fetcherSubmission:pe});if(Dr(it)){Et(z,W,it.error);return}}if(Qs(it))throw fr(400,{type:"defer-action"});let Qt=j.navigation.location||j.location,Vt=ho(e.history,Qt,Re.signal),Na=a||o,qn=j.navigation.state!=="idle"?Oi(Na,j.navigation.location,l):j.matches;Qe(qn,"Didn't find any matches after fetcher action");let uo=++X;V.set(z,uo);let Is=za(pe,it.data);j.fetchers.set(z,Is);let[Oc,Xn]=$x(e.history,j,qn,pe,Qt,!1,f.v7_skipActionErrorRevalidation,ee,Z,Y,Pe,ne,ue,Na,l,[re.route.id,it]);Xn.filter(It=>It.key!==z).forEach(It=>{let Qn=It.key,jy=j.fetchers.get(Qn),aT=za(void 0,jy?jy.data:void 0);j.fetchers.set(Qn,aT),O.has(Qn)&&dr(Qn),It.controller&&O.set(Qn,It.controller)}),k({fetchers:new Map(j.fetchers)});let Mc=()=>Xn.forEach(It=>dr(It.key));Re.signal.addEventListener("abort",Mc);let{loaderResults:Ic,fetcherResults:Lc}=await We(j,qn,Oc,Xn,Vt);if(Re.signal.aborted)return;Re.signal.removeEventListener("abort",Mc),V.delete(z),O.delete(z),Xn.forEach(It=>O.delete(It.key));let Ge=ru(Ic);if(Ge)return he(Vt,Ge.result,!1);if(Ge=ru(Lc),Ge)return ue.add(Ge.key),he(Vt,Ge.result,!1);let{loaderData:Mt,errors:Rr}=Yx(j,qn,Oc,Ic,void 0,Xn,Lc,ce);if(j.fetchers.has(z)){let It=Us(it.data);j.fetchers.set(z,It)}Nc(uo),j.navigation.state==="loading"&&uo>U?(Qe(D,"Expected pending action"),K&&K.abort(),Q(j.navigation.location,{matches:qn,loaderData:Mt,errors:Rr,fetchers:new Map(j.fetchers)})):(k({errors:Rr,loaderData:Zx(j.loaderData,Mt,qn,Rr),fetchers:new Map(j.fetchers)}),ee=!1)}async function te(z,W,q,re,we,Me,Be,pe){let Ue=j.fetchers.get(z);Xt(z,za(pe,Ue?Ue.data:void 0),{flushSync:Be});let Te=new AbortController,Re=ho(e.history,q,Te.signal);if(Me){let it=await Dc(we,q,Re.signal);if(it.type==="aborted")return;if(it.type==="error"){let{error:Qt}=Pc(q,it);Et(z,W,Qt,{flushSync:Be});return}else if(it.matches)we=it.matches,re=qa(we,q);else{Et(z,W,fr(404,{pathname:q}),{flushSync:Be});return}}O.set(z,Te);let ct=X,wt=(await ze("loader",j,Re,[re],we,z))[re.route.id];if(Qs(wt)&&(wt=await Ng(wt,Re.signal,!0)||wt),O.get(z)===Te&&O.delete(z),!Re.signal.aborted){if(Pe.has(z)){Xt(z,Us(void 0));return}if(Ui(wt))if(U>ct){Xt(z,Us(void 0));return}else{ue.add(z),await he(Re,wt,!1);return}if(Dr(wt)){Et(z,W,wt.error);return}Qe(!Qs(wt),"Unhandled fetcher deferred data"),Xt(z,Us(wt.data))}}async function he(z,W,q,re){let{submission:we,fetcherSubmission:Me,replace:Be}=re===void 0?{}:re;W.response.headers.has("X-Remix-Revalidate")&&(ee=!0);let pe=W.response.headers.get("Location");Qe(pe,"Expected a Location header on the redirect Response"),pe=Bx(pe,new URL(z.url),l);let Ue=Ol(j.location,pe,{_isRedirect:!0});if(r){let it=!1;if(W.response.headers.has("X-Remix-Reload-Document"))it=!0;else if(Tg.test(pe)){const Qt=e.history.createURL(pe);it=Qt.origin!==t.location.origin||va(Qt.pathname,l)==null}if(it){Be?t.location.replace(pe):t.location.assign(pe);return}}K=null;let Te=Be===!0||W.response.headers.has("X-Remix-Replace")?$t.Replace:$t.Push,{formMethod:Re,formAction:ct,formEncType:pt}=j.navigation;!we&&!Me&&Re&&ct&&pt&&(we=Xx(j.navigation));let wt=we||Me;if(lR.has(W.response.status)&&wt&&hn(wt.formMethod))await S(Te,Ue,{submission:Rt({},wt,{formAction:pe}),preventScrollReset:L,enableViewTransition:q?T:void 0});else{let it=Nh(Ue,we);await S(Te,Ue,{overrideNavigation:it,fetcherSubmission:Me,preventScrollReset:L,enableViewTransition:q?T:void 0})}}async function ze(z,W,q,re,we,Me){let Be,pe={};try{Be=await yR(u,z,W,q,re,we,Me,i,s)}catch(Ue){return re.forEach(Te=>{pe[Te.route.id]={type:gt.error,error:Ue}}),pe}for(let[Ue,Te]of Object.entries(Be))if(CR(Te)){let Re=Te.result;pe[Ue]={type:gt.redirect,response:_R(Re,q,Ue,we,l,f.v7_relativeSplatPath)}}else pe[Ue]=await wR(Te);return pe}async function We(z,W,q,re,we){let Me=z.matches,Be=ze("loader",z,we,q,W,null),pe=Promise.all(re.map(async Re=>{if(Re.matches&&Re.match&&Re.controller){let pt=(await ze("loader",z,ho(e.history,Re.path,Re.controller.signal),[Re.match],Re.matches,Re.key))[Re.match.route.id];return{[Re.key]:pt}}else return Promise.resolve({[Re.key]:{type:gt.error,error:fr(404,{pathname:Re.path})}})})),Ue=await Be,Te=(await pe).reduce((Re,ct)=>Object.assign(Re,ct),{});return await Promise.all([TR(W,Ue,we.signal,Me,z.loaderData),NR(W,Te,re)]),{loaderResults:Ue,fetcherResults:Te}}function qt(){ee=!0,Z.push(...eh()),ne.forEach((z,W)=>{O.has(W)&&(Y.add(W),dr(W))})}function Xt(z,W,q){q===void 0&&(q={}),j.fetchers.set(z,W),k({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Et(z,W,q,re){re===void 0&&(re={});let we=Do(j.matches,W);ht(z),k({errors:{[we.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Pn(z){return f.v7_fetcherPersist&&(se.set(z,(se.get(z)||0)+1),Pe.has(z)&&Pe.delete(z)),j.fetchers.get(z)||cR}function ht(z){let W=j.fetchers.get(z);O.has(z)&&!(W&&W.state==="loading"&&V.has(z))&&dr(z),ne.delete(z),V.delete(z),ue.delete(z),Pe.delete(z),Y.delete(z),j.fetchers.delete(z)}function Ds(z){if(f.v7_fetcherPersist){let W=(se.get(z)||0)-1;W<=0?(se.delete(z),Pe.add(z)):se.set(z,W)}else ht(z);k({fetchers:new Map(j.fetchers)})}function dr(z){let W=O.get(z);Qe(W,"Expected fetch controller: "+z),W.abort(),O.delete(z)}function Gr(z){for(let W of z){let q=Pn(W),re=Us(q.data);j.fetchers.set(W,re)}}function Ta(){let z=[],W=!1;for(let q of ue){let re=j.fetchers.get(q);Qe(re,"Expected fetcher: "+q),re.state==="loading"&&(ue.delete(q),z.push(q),W=!0)}return Gr(z),W}function Nc(z){let W=[];for(let[q,re]of V)if(re<z){let we=j.fetchers.get(q);Qe(we,"Expected fetcher: "+q),we.state==="loading"&&(dr(q),V.delete(q),W.push(q))}return Gr(W),W.length>0}function Jf(z,W){let q=j.blockers.get(z)||Fa;return me.get(z)!==W&&me.set(z,W),q}function Rc(z){j.blockers.delete(z),me.delete(z)}function Ri(z,W){let q=j.blockers.get(z)||Fa;Qe(q.state==="unblocked"&&W.state==="blocked"||q.state==="blocked"&&W.state==="blocked"||q.state==="blocked"&&W.state==="proceeding"||q.state==="blocked"&&W.state==="unblocked"||q.state==="proceeding"&&W.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+W.state);let re=new Map(j.blockers);re.set(z,W),k({blockers:re})}function Os(z){let{currentLocation:W,nextLocation:q,historyAction:re}=z;if(me.size===0)return;me.size>1&&Xi(!1,"A router only supports one blocker at a time");let we=Array.from(me.entries()),[Me,Be]=we[we.length-1],pe=j.blockers.get(Me);if(!(pe&&pe.state==="proceeding")&&Be({currentLocation:W,nextLocation:q,historyAction:re}))return Me}function Ms(z){let W=fr(404,{pathname:z}),q=a||o,{matches:re,route:we}=Gx(q);return eh(),{notFoundMatches:re,route:we,error:W}}function Pc(z,W){return{boundaryId:Do(W.partialMatches).route.id,error:fr(400,{type:"route-discovery",pathname:z,message:W.error!=null&&"message"in W.error?W.error:String(W.error)})}}function eh(z){let W=[];return ce.forEach((q,re)=>{(!z||z(re))&&(q.cancel(),W.push(re),ce.delete(re))}),W}function nT(z,W,q){if(x=z,p=W,h=q||null,!_&&j.navigation===Th){_=!0;let re=Cy(j.location,j.matches);re!=null&&k({restoreScrollPosition:re})}return()=>{x=null,p=null,h=null}}function ky(z,W){return h&&h(z,W.map(re=>U2(re,j.loaderData)))||z.key}function sT(z,W){if(x&&p){let q=ky(z,W);x[q]=p()}}function Cy(z,W){if(x){let q=ky(z,W),re=x[q];if(typeof re=="number")return re}return null}function Ac(z,W,q){if(d){if(v.has(q))return{active:!1,matches:z};if(z){if(Object.keys(z[0].params).length>0)return{active:!0,matches:Tu(W,q,l,!0)}}else return{active:!0,matches:Tu(W,q,l,!0)||[]}}return{active:!1,matches:null}}async function Dc(z,W,q){let re=z;for(;;){let we=a==null,Me=a||o;try{await mR(d,W,re,Me,i,s,ke,q)}catch(Ue){return{type:"error",error:Ue,partialMatches:re}}finally{we&&(o=[...o])}if(q.aborted)return{type:"aborted"};let Be=Oi(Me,W,l);if(Be)return Ey(W,v),{type:"success",matches:Be};let pe=Tu(Me,W,l,!0);if(!pe||re.length===pe.length&&re.every((Ue,Te)=>Ue.route.id===pe[Te].route.id))return Ey(W,v),{type:"success",matches:null};re=pe}}function Ey(z,W){if(W.size>=w){let q=W.values().next().value;W.delete(q)}W.add(z)}function iT(z){i={},a=Ml(z,s,void 0,i)}function oT(z,W){let q=a==null;j1(z,W,a||o,i,s),q&&(o=[...o],k({}))}return R={get basename(){return l},get future(){return f},get state(){return j},get routes(){return o},get window(){return t},initialize:Oe,subscribe:ut,enableScrollRestoration:nT,navigate:G,fetch:B,revalidate:A,createHref:z=>e.history.createHref(z),encodeLocation:z=>e.history.encodeLocation(z),getFetcher:Pn,deleteFetcher:Ds,dispose:He,getBlocker:Jf,deleteBlocker:Rc,patchRoutes:oT,_internalFetchControllers:O,_internalActiveDeferreds:ce,_internalSetRoutes:iT},R}function fR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Yp(e,t,r,n,s,i,o,a){let l,u;if(o){l=[];for(let f of t)if(l.push(f),f.route.id===o){u=f;break}}else l=t,u=t[t.length-1];let d=sf(s||".",nf(l,i),va(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&&!Rg(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:hs([r,d.pathname])),Qi(d)}function Vx(e,t,r,n){if(!n||!fR(n))return{path:r};if(n.formMethod&&!jR(n.formMethod))return{path:r,error:fr(405,{method:n.formMethod})};let s=()=>({path:r,error:fr(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=T1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!hn(o))return s();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,w)=>{let[v,x]=w;return""+g+v+"="+x+`
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!hn(o))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=Zp(n.formData),u=n.formData;else if(n.body instanceof FormData)l=Zp(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=Hx(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=Hx(l)}catch{return s()}let d={formMethod:o,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&&Rg(f.search)&&l.append("index",""),f.search="?"+l,{path:Qi(f),submission:d}}function hR(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 $x(e,t,r,n,s,i,o,a,l,u,d,f,m,g,w,v){let x=v?Dr(v[1])?v[1].error:v[1].data:void 0,h=e.createURL(t.location),p=e.createURL(s),_=v&&Dr(v[1])?v[0]:void 0,C=_?hR(r,_):r,E=v?v[1].statusCode:void 0,P=o&&E&&E>=400,R=C.filter((D,L)=>{let{route:K}=D;if(K.lazy)return!0;if(K.loader==null)return!1;if(i)return typeof K.loader!="function"||K.loader.hydrate?!0:t.loaderData[K.id]===void 0&&(!t.errors||t.errors[K.id]===void 0);if(pR(t.loaderData,t.matches[L],D)||l.some(b=>b===D.route.id))return!0;let T=t.matches[L],F=D;return Wx(D,Rt({currentUrl:h,currentParams:T.params,nextUrl:p,nextParams:F.params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:P?!1:a||h.pathname+h.search===p.pathname+p.search||h.search!==p.search||E1(T,F)}))}),j=[];return f.forEach((D,L)=>{if(i||!r.some($=>$.route.id===D.routeId)||d.has(L))return;let K=Oi(g,D.path,w);if(!K){j.push({key:L,routeId:D.routeId,path:D.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(L),F=qa(K,D.path),b=!1;m.has(L)?b=!1:u.has(L)?(u.delete(L),b=!0):T&&T.state!=="idle"&&T.data===void 0?b=a:b=Wx(F,Rt({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:p,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:P?!1:a})),b&&j.push({key:L,routeId:D.routeId,path:D.path,matches:K,match:F,controller:new AbortController})}),[R,j]}function pR(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function E1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Wx(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function mR(e,t,r,n,s,i,o,a){let l=[t,...r.map(u=>u.route.id)].join("-");try{let u=o.get(l);u||(u=e({path:t,matches:r,patch:(d,f)=>{a.aborted||j1(d,f,n,s,i)}}),o.set(l,u)),u&&kR(u)&&await u}finally{o.delete(l)}}function j1(e,t,r,n,s){if(e){var i;let o=n[e];Qe(o,"No route found to patch children into: routeId = "+e);let a=Ml(t,s,[e,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Ml(t,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function gR(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Qe(s,"No route found in manifest");let i={};for(let o in n){let l=s[o]!==void 0&&o!=="hasErrorBoundary";Xi(!l,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!F2.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,Rt({},t(s),{lazy:void 0}))}async function vR(e){let{matches:t}=e,r=t.filter(s=>s.shouldLoad);return(await Promise.all(r.map(s=>s.resolve()))).reduce((s,i,o)=>Object.assign(s,{[r[o].route.id]:i}),{})}async function yR(e,t,r,n,s,i,o,a,l,u){let d=i.map(g=>g.route.lazy?gR(g.route,l,a):void 0),f=i.map((g,w)=>{let v=d[w],x=s.some(p=>p.route.id===g.route.id);return Rt({},g,{shouldLoad:x,resolve:async p=>(p&&n.method==="GET"&&(g.route.lazy||g.route.loader)&&(x=!0),x?xR(t,n,g,v,p,u):Promise.resolve({type:gt.data,result:void 0}))})}),m=await e({matches:f,request:n,params:i[0].params,fetcherKey:o,context:u});try{await Promise.all(d)}catch{}return m}async function xR(e,t,r,n,s,i){let o,a,l=u=>{let d,f=new Promise((w,v)=>d=v);a=()=>d(),t.signal.addEventListener("abort",a);let m=w=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:i},...w!==void 0?[w]:[]),g=(async()=>{try{return{type:"data",result:await(s?s(v=>m(v)):m())}}catch(w){return{type:"error",result:w}}})();return Promise.race([g,f])};try{let u=r.route[e];if(n)if(u){let d,[f]=await Promise.all([l(u).catch(m=>{d=m}),n]);if(d!==void 0)throw d;o=f}else if(await n,u=r.route[e],u)o=await l(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw fr(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:gt.data,result:void 0};else if(u)o=await l(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw fr(404,{pathname:f})}Qe(o.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(u){return{type:gt.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return o}async function wR(e){let{result:t,type:r}=e;if(N1(t)){let u;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(d){return{type:gt.error,error:d}}return r===gt.error?{type:gt.error,error:new ud(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:gt.data,data:u,statusCode:t.status,headers:t.headers}}if(r===gt.error){if(qx(t)){var n;if(t.data instanceof Error){var s;return{type:gt.error,error:t.data,statusCode:(s=t.init)==null?void 0:s.status}}t=new ud(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:gt.error,error:t,statusCode:of(t)?t.status:void 0}}if(ER(t)){var i,o;return{type:gt.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(qx(t)){var a,l;return{type:gt.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:gt.data,data:t}}function _R(e,t,r,n,s,i){let o=e.headers.get("Location");if(Qe(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tg.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Yp(new URL(t.url),a,s,!0,o,i),e.headers.set("Location",o)}return e}function Bx(e,t,r){if(Tg.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=va(s.pathname,r)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function ho(e,t,r,n){let s=e.createURL(T1(t)).toString(),i={signal:r};if(n&&hn(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=Zp(n.formData):i.body=n.formData}return new Request(s,i)}function Zp(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Hx(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function bR(e,t,r,n,s){let i={},o=null,a,l=!1,u={},d=r&&Dr(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,g=t[m];if(Qe(!Ui(g),"Cannot handle redirect results in processLoaderData"),Dr(g)){let w=g.error;d!==void 0&&(w=d,d=void 0),o=o||{};{let v=Do(e,m);o[v.route.id]==null&&(o[v.route.id]=w)}i[m]=void 0,l||(l=!0,a=of(g.error)?g.error.status:500),g.headers&&(u[m]=g.headers)}else Qs(g)?(n.set(m,g.deferredData),i[m]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(u[m]=g.headers)):(i[m]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(u[m]=g.headers))}),d!==void 0&&r&&(o={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:u}}function Yx(e,t,r,n,s,i,o,a){let{loaderData:l,errors:u}=bR(t,n,s,a);return i.forEach(d=>{let{key:f,match:m,controller:g}=d,w=o[f];if(Qe(w,"Did not find corresponding fetcher result"),!(g&&g.signal.aborted))if(Dr(w)){let v=Do(e.matches,m==null?void 0:m.route.id);u&&u[v.route.id]||(u=Rt({},u,{[v.route.id]:w.error})),e.fetchers.delete(f)}else if(Ui(w))Qe(!1,"Unhandled fetcher revalidation redirect");else if(Qs(w))Qe(!1,"Unhandled fetcher deferred data");else{let v=Us(w.data);e.fetchers.set(f,v)}}),{loaderData:l,errors:u}}function Zx(e,t,r,n){let s=Rt({},t);for(let i of r){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(s[o]=t[o]):e[o]!==void 0&&i.route.loader&&(s[o]=e[o]),n&&n.hasOwnProperty(o))break}return s}function Kx(e){return e?Dr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Do(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 Gx(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 fr(e,t){let{pathname:r,routeId:n,method:s,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
`+o):s&&r&&n?l="You made a "+s+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="You made a "+s.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new ud(e||500,a,new Error(l),!0)}function ru(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,s]=t[r];if(Ui(s))return{key:n,result:s}}}function T1(e){let t=typeof e=="string"?Ts(e):e;return Qi(Rt({},t,{hash:""}))}function SR(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function kR(e){return typeof e=="object"&&e!=null&&"then"in e}function CR(e){return N1(e.result)&&aR.has(e.result.status)}function Qs(e){return e.type===gt.deferred}function Dr(e){return e.type===gt.error}function Ui(e){return(e&&e.type)===gt.redirect}function qx(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ER(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 N1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function jR(e){return oR.has(e.toLowerCase())}function hn(e){return sR.has(e.toLowerCase())}async function TR(e,t,r,n,s){let i=Object.entries(t);for(let o=0;o<i.length;o++){let[a,l]=i[o],u=e.find(m=>(m==null?void 0:m.route.id)===a);if(!u)continue;let d=n.find(m=>m.route.id===u.route.id),f=d!=null&&!E1(d,u)&&(s&&s[u.route.id])!==void 0;Qs(l)&&f&&await Ng(l,r,!1).then(m=>{m&&(t[a]=m)})}}async function NR(e,t,r){for(let n=0;n<r.length;n++){let{key:s,routeId:i,controller:o}=r[n],a=t[s];e.find(u=>(u==null?void 0:u.route.id)===i)&&Qs(a)&&(Qe(o,"Expected an AbortController for revalidating fetcher deferred result"),await Ng(a,o.signal,!0).then(u=>{u&&(t[s]=u)}))}}async function Ng(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:gt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:gt.error,error:s}}return{type:gt.data,data:e.deferredData.data}}}function Rg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function qa(e,t){let r=typeof t=="string"?Ts(t).search:t.search;if(e[e.length-1].route.index&&Rg(r||""))return e[e.length-1];let n=S1(e);return n[n.length-1]}function Xx(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:i,json:o}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Nh(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 RR(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 PR(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 Us(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 AR(e,t){try{let r=e.sessionStorage.getItem(C1);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function DR(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(C1,JSON.stringify(r))}catch(n){Xi(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
* React Router v6.26.2
*
* 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 dd(){return dd=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},dd.apply(this,arguments)}const af=y.createContext(null),R1=y.createContext(null),ki=y.createContext(null),Pg=y.createContext(null),Ns=y.createContext({outlet:null,matches:[],isDataRoute:!1}),P1=y.createContext(null);function OR(e,t){let{relative:r}=t===void 0?{}:t;ya()||Qe(!1);let{basename:n,navigator:s}=y.useContext(ki),{hash:i,pathname:o,search:a}=D1(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:hs([n,o])),s.createHref({pathname:l,search:a,hash:i})}function ya(){return y.useContext(Pg)!=null}function Hn(){return ya()||Qe(!1),y.useContext(Pg).location}function A1(e){y.useContext(ki).static||y.useLayoutEffect(e)}function on(){let{isDataRoute:e}=y.useContext(Ns);return e?KR():MR()}function MR(){ya()||Qe(!1);let e=y.useContext(af),{basename:t,future:r,navigator:n}=y.useContext(ki),{matches:s}=y.useContext(Ns),{pathname:i}=Hn(),o=JSON.stringify(nf(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return A1(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=sf(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:hs([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,i,e])}const IR=y.createContext(null);function LR(e){let t=y.useContext(Ns).outlet;return t&&y.createElement(IR.Provider,{value:e},t)}function D1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(ki),{matches:s}=y.useContext(Ns),{pathname:i}=Hn(),o=JSON.stringify(nf(s,n.v7_relativeSplatPath));return y.useMemo(()=>sf(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function FR(e,t,r,n){ya()||Qe(!1);let{navigator:s}=y.useContext(ki),{matches:i}=y.useContext(Ns),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Hn(),d;d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let g=Oi(e,{pathname:m});return WR(g&&g.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:hs([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:hs([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r,n)}function zR(){let e=ZR(),t=of(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const UR=y.createElement(zR,null);class VR extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Ns.Provider,{value:this.props.routeContext},y.createElement(P1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $R(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(af);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ns.Provider,{value:t},n)}function WR(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Qe(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:g}=r,w=f.route.loader&&m[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||w){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,m)=>{let g,w=!1,v=null,x=null;r&&(g=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||UR,l&&(u<0&&m===0?(GR("route-fallback"),w=!0,x=null):u===m&&(w=!0,x=f.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,m+1)),p=()=>{let _;return g?_=v:w?_=x:f.route.Component?_=y.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=d,y.createElement($R,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:r!=null},children:_})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?y.createElement(VR,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:p(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):p()},null)}var O1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O1||{}),fd=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}(fd||{});function BR(e){let t=y.useContext(af);return t||Qe(!1),t}function HR(e){let t=y.useContext(R1);return t||Qe(!1),t}function YR(e){let t=y.useContext(Ns);return t||Qe(!1),t}function M1(e){let t=YR(),r=t.matches[t.matches.length-1];return r.route.id||Qe(!1),r.route.id}function ZR(){var e;let t=y.useContext(P1),r=HR(fd.UseRouteError),n=M1(fd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function KR(){let{router:e}=BR(O1.UseNavigateStable),t=M1(fd.UseNavigateStable),r=y.useRef(!1);return A1(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,dd({fromRouteId:t},i)))},[e,t])}const Qx={};function GR(e,t,r){Qx[e]||(Qx[e]=!0)}function I1(e){let{to:t,replace:r,state:n,relative:s}=e;ya()||Qe(!1);let{future:i,static:o}=y.useContext(ki),{matches:a}=y.useContext(Ns),{pathname:l}=Hn(),u=on(),d=sf(t,nf(a,i.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function Ag(e){return LR(e.context)}function qR(e){let{basename:t="/",children:r=null,location:n,navigationType:s=$t.Pop,navigator:i,static:o=!1,future:a}=e;ya()&&Qe(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:dd({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ts(n));let{pathname:d="/",search:f="",hash:m="",state:g=null,key:w="default"}=n,v=y.useMemo(()=>{let x=va(d,l);return x==null?null:{location:{pathname:x,search:f,hash:m,state:g,key:w},navigationType:s}},[l,d,f,m,g,w,s]);return v==null?null:y.createElement(ki.Provider,{value:u},y.createElement(Pg.Provider,{children:r,value:v}))}new Promise(()=>{});function XR(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.26.2
*
* 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 Il(){return Il=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},Il.apply(this,arguments)}function QR(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function JR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eP(e,t){return e.button===0&&(!t||t==="_self")&&!JR(e)}function Kp(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 tP(e,t){let r=Kp(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const rP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],nP="6";try{window.__reactRouterVersion=nP}catch{}function sP(e,t){return dR({basename:void 0,future:Il({},void 0,{v7_prependBasename:!0}),history:M2({window:void 0}),hydrationData:iP(),routes:e,mapRouteProperties:XR,unstable_dataStrategy:void 0,unstable_patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function iP(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Il({},t,{errors:oP(t.errors)})),t}function oP(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 ud(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(s.message);i.stack="",r[n]=i}}else r[n]=s;return r}const aP=y.createContext({isTransitioning:!1}),lP=y.createContext(new Map),cP="startTransition",Jx=vw[cP],uP="flushSync",e0=O2[uP];function dP(e){Jx?Jx(e):e()}function Ua(e){e0?e0(e):e()}class fP{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 hP(e){let{fallbackElement:t,router:r,future:n}=e,[s,i]=y.useState(r.state),[o,a]=y.useState(),[l,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[m,g]=y.useState(),[w,v]=y.useState(),x=y.useRef(new Map),{v7_startTransition:h}=n||{},p=y.useCallback(j=>{h?dP(j):j()},[h]),_=y.useCallback((j,D)=>{let{deletedFetchers:L,unstable_flushSync:K,unstable_viewTransitionOpts:T}=D;L.forEach(b=>x.current.delete(b)),j.fetchers.forEach((b,$)=>{b.data!==void 0&&x.current.set($,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!T||F){K?Ua(()=>i(j)):p(()=>i(j));return}if(K){Ua(()=>{m&&(d&&d.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:T.currentLocation,nextLocation:T.nextLocation})});let b=r.window.document.startViewTransition(()=>{Ua(()=>i(j))});b.finished.finally(()=>{Ua(()=>{f(void 0),g(void 0),a(void 0),u({isTransitioning:!1})})}),Ua(()=>g(b));return}m?(d&&d.resolve(),m.skipTransition(),v({state:j,currentLocation:T.currentLocation,nextLocation:T.nextLocation})):(a(j),u({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}))},[r.window,m,d,x,p]);y.useLayoutEffect(()=>r.subscribe(_),[r,_]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new fP)},[l]),y.useEffect(()=>{if(d&&o&&r.window){let j=o,D=d.promise,L=r.window.document.startViewTransition(async()=>{p(()=>i(j)),await D});L.finished.finally(()=>{f(void 0),g(void 0),a(void 0),u({isTransitioning:!1})}),g(L)}},[p,o,d,r.window]),y.useEffect(()=>{d&&o&&s.location.key===o.location.key&&d.resolve()},[d,m,s.location,o]),y.useEffect(()=>{!l.isTransitioning&&w&&(a(w.state),u({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),v(void 0))},[l.isTransitioning,w]),y.useEffect(()=>{},[]);let C=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:j=>r.navigate(j),push:(j,D,L)=>r.navigate(j,{state:D,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(j,D,L)=>r.navigate(j,{replace:!0,state:D,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",P=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),R=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(af.Provider,{value:P},y.createElement(R1.Provider,{value:s},y.createElement(lP.Provider,{value:x.current},y.createElement(aP.Provider,{value:l},y.createElement(qR,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?y.createElement(pP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const pP=y.memo(mP);function mP(e){let{routes:t,future:r,state:n}=e;return FR(t,void 0,n,r)}const gP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,m=QR(t,rP),{basename:g}=y.useContext(ki),w,v=!1;if(typeof u=="string"&&vP.test(u)&&(w=u,gP))try{let _=new URL(window.location.href),C=u.startsWith("//")?new URL(_.protocol+u):new URL(u),E=va(C.pathname,g);C.origin===_.origin&&E!=null?u=E+C.search+C.hash:v=!0}catch{}let x=OR(u,{relative:s}),h=yP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function p(_){n&&n(_),_.defaultPrevented||h(_)}return y.createElement("a",Il({},m,{href:w||x,onClick:v||i?n:p,ref:r,target:l}))});var t0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(t0||(t0={}));var r0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(r0||(r0={}));function yP(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=on(),u=Hn(),d=D1(e,{relative:o});return y.useCallback(f=>{if(eP(f,r)){f.preventDefault();let m=n!==void 0?n:Qi(u)===Qi(d);l(e,{replace:m,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,d,n,s,r,e,i,o,a])}function xP(e){let t=y.useRef(Kp(e)),r=y.useRef(!1),n=Hn(),s=y.useMemo(()=>tP(n.search,r.current?null:t.current),[n.search]),i=on(),o=y.useCallback((a,l)=>{const u=Kp(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,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 wP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L1=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var _P={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 bP=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,..._P,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:L1("lucide",s),...a},[...o.map(([u,d])=>y.createElement(u,d)),...Array.isArray(i)?i:[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 xt=(e,t)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(bP,{ref:i,iconNode:t,className:L1(`lucide-${wP(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 SP=xt("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 kP=xt("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 CP=xt("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 F1=xt("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 z1=xt("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 EP=xt("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 jP=xt("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 Dg=xt("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 TP=xt("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 Og=xt("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 NP=xt("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 Gp=xt("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 RP=xt("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 n0=xt("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 s0=xt("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 i0=xt("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 PP=xt("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 AP=xt("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 DP=xt("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 OP=xt("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 Nu=xt("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 o0=xt("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 U1=xt("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 MP=xt("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 IP=xt("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 Mg=xt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function LP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lf(...e){return t=>e.forEach(r=>LP(r,t))}function Xe(...e){return y.useCallback(lf(...e),e)}var ws=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),i=s.find(FP);if(i){const o=i.props.children,a=s.map(l=>l===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return c.jsx(qp,{...n,ref:t,children:y.isValidElement(o)?y.cloneElement(o,void 0,a):null})}return c.jsx(qp,{...n,ref:t,children:r})});ws.displayName="Slot";var qp=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=UP(r);return y.cloneElement(r,{...zP(n,r.props),ref:t?lf(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});qp.displayName="SlotClone";var Ig=({children:e})=>c.jsx(c.Fragment,{children:e});function FP(e){return y.isValidElement(e)&&e.type===Ig}function zP(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function UP(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 V1(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=V1(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function VP(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=V1(e))&&(n&&(n+=" "),n+=t);return n}const a0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,l0=VP,uc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return l0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],f=i==null?void 0:i[u];if(d===null)return null;const m=a0(d)||a0(f);return s[u][m]}),a=r&&Object.entries(r).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:m,...g}=d;return Object.entries(g).every(w=>{let[v,x]=w;return Array.isArray(x)?x.includes({...i,...a}[v]):{...i,...a}[v]===x})?[...u,f,m]:u},[]);return l0(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function $1(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=$1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function $P(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=$1(e))&&(n&&(n+=" "),n+=t);return n}const Lg="-",WP=e=>{const t=HP(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Lg);return a[0]===""&&a.length!==1&&a.shift(),W1(a,t)||BP(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},W1=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?W1(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Lg);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},c0=/^\[(.+)\]$/,BP=e=>{if(c0.test(e)){const t=c0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},HP=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return ZP(Object.entries(e.classGroups),r).forEach(([i,o])=>{Xp(o,n,i,t)}),n},Xp=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:u0(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(YP(s)){Xp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Xp(o,u0(t,i),r,n)})})},u0=(e,t)=>{let r=e;return t.split(Lg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},YP=e=>e.isThemeGetter,ZP=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,KP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},B1="!",GP=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,f;for(let x=0;x<a.length;x++){let h=a[x];if(u===0){if(h===s&&(n||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(h==="/"){f=x;continue}}h==="["?u++:h==="]"&&u--}const m=l.length===0?a:a.substring(d),g=m.startsWith(B1),w=g?m.substring(1):m,v=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:o}):o},qP=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},XP=e=>({cache:KP(e.cacheSize),parseClassName:GP(e),...WP(e)}),QP=/\s+/,JP=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(QP);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=r(u);let w=!!g,v=n(w?m.substring(0,g):m);if(!v){if(!w){a=u+(a.length>0?" "+a:a);continue}if(v=n(m),!v){a=u+(a.length>0?" "+a:a);continue}w=!1}const x=qP(d).join(":"),h=f?x+B1:x,p=h+v;if(i.includes(p))continue;i.push(p);const _=s(v,w);for(let C=0;C<_.length;++C){const E=_[C];i.push(h+E)}a=u+(a.length>0?" "+a:a)}return a};function eA(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=H1(t))&&(n&&(n+=" "),n+=r);return n}const H1=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=H1(e[n]))&&(r&&(r+=" "),r+=t);return r};function tA(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((d,f)=>f(d),e());return r=XP(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=JP(l,r);return s(l,d),d}return function(){return i(eA.apply(null,arguments))}}const _t=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Y1=/^\[(?:([a-z-]+):)?(.+)\]$/i,rA=/^\d+\/\d+$/,nA=new Set(["px","full","screen"]),sA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iA=/\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$/,oA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jn=e=>Bo(e)||nA.has(e)||rA.test(e),Fs=e=>xa(e,"length",gA),Bo=e=>!!e&&!Number.isNaN(Number(e)),Rh=e=>xa(e,"number",Bo),Va=e=>!!e&&Number.isInteger(Number(e)),cA=e=>e.endsWith("%")&&Bo(e.slice(0,-1)),Ze=e=>Y1.test(e),zs=e=>sA.test(e),uA=new Set(["length","size","percentage"]),dA=e=>xa(e,uA,Z1),fA=e=>xa(e,"position",Z1),hA=new Set(["image","url"]),pA=e=>xa(e,hA,yA),mA=e=>xa(e,"",vA),$a=()=>!0,xa=(e,t,r)=>{const n=Y1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},gA=e=>iA.test(e)&&!oA.test(e),Z1=()=>!1,vA=e=>aA.test(e),yA=e=>lA.test(e),xA=()=>{const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),i=_t("borderRadius"),o=_t("borderSpacing"),a=_t("borderWidth"),l=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),m=_t("gap"),g=_t("gradientColorStops"),w=_t("gradientColorStopPositions"),v=_t("inset"),x=_t("margin"),h=_t("opacity"),p=_t("padding"),_=_t("saturate"),C=_t("scale"),E=_t("sepia"),P=_t("skew"),R=_t("space"),j=_t("translate"),D=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Ze,t],T=()=>[Ze,t],F=()=>["",Jn,Fs],b=()=>["auto",Bo,Ze],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ee=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Ze],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Bo,Ze];return{cacheSize:500,separator:":",theme:{colors:[$a],spacing:[Jn,Fs],blur:["none","",zs,Ze],brightness:U(),borderColor:[e],borderRadius:["none","","full",zs,Ze],borderSpacing:T(),borderWidth:F(),contrast:U(),grayscale:O(),hueRotate:U(),invert:O(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[cA,Fs],inset:K(),margin:K(),opacity:U(),padding:T(),saturate:U(),scale:U(),sepia:O(),skew:U(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[zs]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...$(),Ze]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Va,Ze]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Va,Ze]}],"grid-cols":[{"grid-cols":[$a]}],"col-start-end":[{col:["auto",{span:["full",Va,Ze]},Ze]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[$a]}],"row-start-end":[{row:["auto",{span:[Va,Ze]},Ze]}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[zs]},zs]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zs,Fs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rh]}],"font-family":[{font:[$a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",Bo,Rh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Jn,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Jn,Fs]}],"underline-offset":[{"underline-offset":["auto",Jn,Ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),fA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[h]}],"border-style":[{border:[...ee(),"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":[h]}],"divide-style":[{divide:ee()}],"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:["",...ee()]}],"outline-offset":[{"outline-offset":[Jn,Ze]}],"outline-w":[{outline:[Jn,Fs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Jn,Fs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zs,mA]}],"shadow-color":[{shadow:[$a]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",zs,Ze]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Va,Ze]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jn,Fs,Rh]}],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"]}}},wA=tA(xA);function le(...e){return wA($P(e))}const cf=uc("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"}}),Je=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?ws:"button";return c.jsx(o,{className:le(cf({variant:t,size:r,className:e})),ref:i,...s})});Je.displayName="Button";function de(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 _A(e,t){const r=y.createContext(t);function n(i){const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:o})}function s(i){const o=y.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Wr(e,t=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];function u(f){const{scope:m,children:g,...w}=f,v=(m==null?void 0:m[e][l])||a,x=y.useMemo(()=>w,Object.values(w));return c.jsx(v.Provider,{value:x,children:g})}function d(f,m){const g=(m==null?void 0:m[e][l])||a,w=y.useContext(g);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,bA(s,...t)]}function bA(...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(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function At(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _s({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=SA({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,a=At(r),l=y.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[i,e,s,a]);return[o,l]}function SA({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),i=At(t);return y.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var kA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=kA.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ws:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fg(e,t){e&&js.flushSync(()=>e.dispatchEvent(t))}function uf(e){const t=e+"CollectionProvider",[r,n]=Wr(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:w,children:v}=g,x=et.useRef(null),h=et.useRef(new Map).current;return c.jsx(s,{scope:w,itemMap:h,collectionRef:x,children:v})};o.displayName=t;const a=e+"CollectionSlot",l=et.forwardRef((g,w)=>{const{scope:v,children:x}=g,h=i(a,v),p=Xe(w,h.collectionRef);return c.jsx(ws,{ref:p,children:x})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=et.forwardRef((g,w)=>{const{scope:v,children:x,...h}=g,p=et.useRef(null),_=Xe(w,p),C=i(u,v);return et.useEffect(()=>(C.itemMap.set(p,{ref:p,...h}),()=>void C.itemMap.delete(p))),c.jsx(ws,{[d]:"",ref:_,children:x})});f.displayName=u;function m(g){const w=i(e+"CollectionConsumer",g);return et.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const h=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((C,E)=>h.indexOf(C.ref.current)-h.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:l,ItemSlot:f},m,n]}var CA=y.createContext(void 0);function dc(e){const t=y.useContext(CA);return e||t||"ltr"}function EA(e,t=globalThis==null?void 0:globalThis.document){const r=At(e);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var jA="DismissableLayer",Qp="dismissableLayer.update",TA="dismissableLayer.pointerDownOutside",NA="dismissableLayer.focusOutside",d0,K1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wa=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=y.useContext(K1),[d,f]=y.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=y.useState({}),w=Xe(t,R=>f(R)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=v.indexOf(x),p=d?v.indexOf(d):-1,_=u.layersWithOutsidePointerEventsDisabled.size>0,C=p>=h,E=PA(R=>{const j=R.target,D=[...u.branches].some(L=>L.contains(j));!C||D||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},m),P=AA(R=>{const j=R.target;[...u.branches].some(L=>L.contains(j))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},m);return EA(R=>{p===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),y.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(d0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),f0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=d0)}},[d,m,r,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),f0())},[d,u]),y.useEffect(()=>{const R=()=>g({});return document.addEventListener(Qp,R),()=>document.removeEventListener(Qp,R)},[]),c.jsx(Le.div,{...l,ref:w,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,P.onFocusCapture),onBlurCapture:de(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,E.onPointerDownCapture)})});wa.displayName=jA;var RA="DismissableLayerBranch",G1=y.forwardRef((e,t)=>{const r=y.useContext(K1),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Le.div,{...e,ref:s})});G1.displayName=RA;function PA(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){q1(TA,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function AA(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&q1(NA,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function f0(){const e=new CustomEvent(Qp);document.dispatchEvent(e)}function q1(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Fg(s,i):s.dispatchEvent(i)}var DA=wa,OA=G1,Ph=0;function zg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??h0()),document.body.insertAdjacentElement("beforeend",e[1]??h0()),Ph++,()=>{Ph===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ph--}},[])}function h0(){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 Ah="focusScope.autoFocusOnMount",Dh="focusScope.autoFocusOnUnmount",p0={bubbles:!1,cancelable:!0},MA="FocusScope",df=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=y.useState(null),u=At(s),d=At(i),f=y.useRef(null),m=Xe(t,v=>l(v)),g=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let v=function(_){if(g.paused||!a)return;const C=_.target;a.contains(C)?f.current=C:Vs(f.current,{select:!0})},x=function(_){if(g.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Vs(f.current,{select:!0}))},h=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&Vs(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const p=new MutationObserver(h);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),p.disconnect()}}},[n,a,g.paused]),y.useEffect(()=>{if(a){g0.add(g);const v=document.activeElement;if(!a.contains(v)){const h=new CustomEvent(Ah,p0);a.addEventListener(Ah,u),a.dispatchEvent(h),h.defaultPrevented||(IA(VA(X1(a)),{select:!0}),document.activeElement===v&&Vs(a))}return()=>{a.removeEventListener(Ah,u),setTimeout(()=>{const h=new CustomEvent(Dh,p0);a.addEventListener(Dh,d),a.dispatchEvent(h),h.defaultPrevented||Vs(v??document.body,{select:!0}),a.removeEventListener(Dh,d),g0.remove(g)},0)}}},[a,u,d,g]);const w=y.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,h=document.activeElement;if(x&&h){const p=v.currentTarget,[_,C]=LA(p);_&&C?!v.shiftKey&&h===C?(v.preventDefault(),r&&Vs(_,{select:!0})):v.shiftKey&&h===_&&(v.preventDefault(),r&&Vs(C,{select:!0})):h===p&&v.preventDefault()}},[r,n,g.paused]);return c.jsx(Le.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});df.displayName=MA;function IA(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Vs(n,{select:t}),document.activeElement!==r)return}function LA(e){const t=X1(e),r=m0(t,e),n=m0(t.reverse(),e);return[r,n]}function X1(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 m0(e,t){for(const r of e)if(!FA(r,{upTo:t}))return r}function FA(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 zA(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&&zA(e)&&t&&e.select()}}var g0=UA();function UA(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=v0(e,t),e.unshift(t)},remove(t){var r;e=v0(e,t),(r=e[0])==null||r.resume()}}}function v0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function VA(e){return e.filter(t=>t.tagName!=="A")}var sr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},$A=vw.useId||(()=>{}),WA=0;function _n(e){const[t,r]=y.useState($A());return sr(()=>{r(n=>n??String(WA++))},[e]),t?`radix-${t}`:""}const BA=["top","right","bottom","left"],hi=Math.min,Or=Math.max,hd=Math.round,nu=Math.floor,pi=e=>({x:e,y:e}),HA={left:"right",right:"left",bottom:"top",top:"bottom"},YA={start:"end",end:"start"};function Jp(e,t,r){return Or(e,hi(t,r))}function bs(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function _a(e){return e.split("-")[1]}function Ug(e){return e==="x"?"y":"x"}function Vg(e){return e==="y"?"height":"width"}function mi(e){return["top","bottom"].includes(Ss(e))?"y":"x"}function $g(e){return Ug(mi(e))}function ZA(e,t,r){r===void 0&&(r=!1);const n=_a(e),s=$g(e),i=Vg(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=pd(o)),[o,pd(o)]}function KA(e){const t=pd(e);return[em(e),t,em(t)]}function em(e){return e.replace(/start|end/g,t=>YA[t])}function GA(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function qA(e,t,r,n){const s=_a(e);let i=GA(Ss(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(em)))),i}function pd(e){return e.replace(/left|right|bottom|top/g,t=>HA[t])}function XA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q1(e){return typeof e!="number"?XA(e):{top:e,right:e,bottom:e,left:e}}function md(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 y0(e,t,r){let{reference:n,floating:s}=e;const i=mi(t),o=$g(t),a=Vg(o),l=Ss(t),u=i==="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 g;switch(l){case"top":g={x:d,y:n.y-s.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:f};break;case"left":g={x:n.x-s.width,y:f};break;default:g={x:n.x,y:n.y}}switch(_a(t)){case"start":g[o]-=m*(r&&u?-1:1);break;case"end":g[o]+=m*(r&&u?-1:1);break}return g}const QA=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=y0(u,n,l),m=n,g={},w=0;for(let v=0;v<a.length;v++){const{name:x,fn:h}=a[v],{x:p,y:_,data:C,reset:E}=await h({x:d,y:f,initialPlacement:n,placement:m,strategy:s,middlewareData:g,rects:u,platform:o,elements:{reference:e,floating:t}});d=p??d,f=_??f,g={...g,[x]:{...g[x],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:f}=y0(u,m,l)),v=-1)}return{x:d,y:f,placement:m,strategy:s,middlewareData:g}};async function Ll(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=bs(t,e),w=Q1(g),x=a[m?f==="floating"?"reference":"floating":f],h=md(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),p=f==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),C=await(i.isElement==null?void 0:i.isElement(_))?await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1}:{x:1,y:1},E=md(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:_,strategy:l}):p);return{top:(h.top-E.top+w.top)/C.y,bottom:(E.bottom-h.bottom+w.bottom)/C.y,left:(h.left-E.left+w.left)/C.x,right:(E.right-h.right+w.right)/C.x}}const JA=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=bs(e,t)||{};if(u==null)return{};const f=Q1(d),m={x:r,y:n},g=$g(s),w=Vg(g),v=await o.getDimensions(u),x=g==="y",h=x?"top":"left",p=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[g]-m[g]-i.floating[w],E=m[g]-i.reference[g],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let R=P?P[_]:0;(!R||!await(o.isElement==null?void 0:o.isElement(P)))&&(R=a.floating[_]||i.floating[w]);const j=C/2-E/2,D=R/2-v[w]/2-1,L=hi(f[h],D),K=hi(f[p],D),T=L,F=R-v[w]-K,b=R/2-v[w]/2+j,$=Jp(T,b,F),ee=!l.arrow&&_a(s)!=null&&b!==$&&i.reference[w]/2-(b<T?L:K)-v[w]/2<0,Z=ee?b<T?b-T:b-F:0;return{[g]:m[g]+Z,data:{[g]:$,centerOffset:b-$-Z,...ee&&{alignmentOffset:Z}},reset:ee}}}),eD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...x}=bs(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const h=Ss(s),p=mi(a),_=Ss(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(_||!v?[pd(a)]:KA(a)),P=w!=="none";!m&&P&&E.push(...qA(a,v,w,C));const R=[a,...E],j=await Ll(t,x),D=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&D.push(j[h]),f){const b=ZA(s,o,C);D.push(j[b[0]],j[b[1]])}if(L=[...L,{placement:s,overflows:D}],!D.every(b=>b<=0)){var K,T;const b=(((K=i.flip)==null?void 0:K.index)||0)+1,$=R[b];if($)return{data:{index:b,overflows:L},reset:{placement:$}};let ee=(T=L.filter(Z=>Z.overflows[0]<=0).sort((Z,Y)=>Z.overflows[1]-Y.overflows[1])[0])==null?void 0:T.placement;if(!ee)switch(g){case"bestFit":{var F;const Z=(F=L.filter(Y=>{if(P){const O=mi(Y.placement);return O===p||O==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(O=>O>0).reduce((O,X)=>O+X,0)]).sort((Y,O)=>Y[1]-O[1])[0])==null?void 0:F[0];Z&&(ee=Z);break}case"initialPlacement":ee=a;break}if(s!==ee)return{reset:{placement:ee}}}return{}}}};function x0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function w0(e){return BA.some(t=>e[t]>=0)}const tD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=bs(e,t);switch(n){case"referenceHidden":{const i=await Ll(t,{...s,elementContext:"reference"}),o=x0(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:w0(o)}}}case"escaped":{const i=await Ll(t,{...s,altBoundary:!0}),o=x0(i,r.floating);return{data:{escapedOffsets:o,escaped:w0(o)}}}default:return{}}}}};async function rD(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ss(r),a=_a(r),l=mi(r)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,f=bs(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(g=a==="end"?w*-1:w),l?{x:g*d,y:m*u}:{x:m*u,y:g*d}}const nD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await rD(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},sD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:h,y:p}=x;return{x:h,y:p}}},...l}=bs(e,t),u={x:r,y:n},d=await Ll(t,l),f=mi(Ss(s)),m=Ug(f);let g=u[m],w=u[f];if(i){const x=m==="y"?"top":"left",h=m==="y"?"bottom":"right",p=g+d[x],_=g-d[h];g=Jp(p,g,_)}if(o){const x=f==="y"?"top":"left",h=f==="y"?"bottom":"right",p=w+d[x],_=w-d[h];w=Jp(p,w,_)}const v=a.fn({...t,[m]:g,[f]:w});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:i,[f]:o}}}}}},iD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=bs(e,t),d={x:r,y:n},f=mi(s),m=Ug(f);let g=d[m],w=d[f];const v=bs(a,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const _=m==="y"?"height":"width",C=i.reference[m]-i.floating[_]+x.mainAxis,E=i.reference[m]+i.reference[_]-x.mainAxis;g<C?g=C:g>E&&(g=E)}if(u){var h,p;const _=m==="y"?"width":"height",C=["top","left"].includes(Ss(s)),E=i.reference[f]-i.floating[_]+(C&&((h=o.offset)==null?void 0:h[f])||0)+(C?0:x.crossAxis),P=i.reference[f]+i.reference[_]+(C?0:((p=o.offset)==null?void 0:p[f])||0)-(C?x.crossAxis:0);w<E?w=E:w>P&&(w=P)}return{[m]:g,[f]:w}}}},oD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=bs(e,t),d=await Ll(t,u),f=Ss(s),m=_a(s),g=mi(s)==="y",{width:w,height:v}=i.floating;let x,h;f==="top"||f==="bottom"?(x=f,h=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=f,x=m==="end"?"top":"bottom");const p=v-d.top-d.bottom,_=w-d.left-d.right,C=hi(v-d[x],p),E=hi(w-d[h],_),P=!t.middlewareData.shift;let R=C,j=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=p),P&&!m){const L=Or(d.left,0),K=Or(d.right,0),T=Or(d.top,0),F=Or(d.bottom,0);g?j=w-2*(L!==0||K!==0?L+K:Or(d.left,d.right)):R=v-2*(T!==0||F!==0?T+F:Or(d.top,d.bottom))}await l({...t,availableWidth:j,availableHeight:R});const D=await o.getDimensions(a.floating);return w!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function ff(){return typeof window<"u"}function ba(e){return J1(e)?(e.nodeName||"").toLowerCase():"#document"}function Lr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(J1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function J1(e){return ff()?e instanceof Node||e instanceof Lr(e).Node:!1}function kn(e){return ff()?e instanceof Element||e instanceof Lr(e).Element:!1}function Vn(e){return ff()?e instanceof HTMLElement||e instanceof Lr(e).HTMLElement:!1}function _0(e){return!ff()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lr(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function aD(e){return["table","td","th"].includes(ba(e))}function hf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Wg(e){const t=Bg(),r=kn(e)?Cn(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 lD(e){let t=gi(e);for(;Vn(t)&&!aa(t);){if(Wg(t))return t;if(hf(t))return null;t=gi(t)}return null}function Bg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function aa(e){return["html","body","#document"].includes(ba(e))}function Cn(e){return Lr(e).getComputedStyle(e)}function pf(e){return kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gi(e){if(ba(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_0(e)&&e.host||Yn(e);return _0(t)?t.host:t}function eb(e){const t=gi(e);return aa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&fc(t)?t:eb(t)}function Fl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=eb(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Lr(s);if(i){const a=tm(o);return t.concat(o,o.visualViewport||[],fc(s)?s:[],a&&r?Fl(a):[])}return t.concat(s,Fl(s,[],r))}function tm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tb(e){const t=Cn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Vn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=hd(r)!==i||hd(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Hg(e){return kn(e)?e:e.contextElement}function Ho(e){const t=Hg(e);if(!Vn(t))return pi(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=tb(t);let o=(i?hd(r.width):r.width)/n,a=(i?hd(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const cD=pi(0);function rb(e){const t=Lr(e);return!Bg()||!t.visualViewport?cD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Lr(e)?!1:t}function Ji(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Hg(e);let o=pi(1);t&&(n?kn(n)&&(o=Ho(n)):o=Ho(e));const a=uD(i,r,n)?rb(i):pi(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(i){const m=Lr(i),g=n&&kn(n)?Lr(n):n;let w=m,v=tm(w);for(;v&&n&&g!==w;){const x=Ho(v),h=v.getBoundingClientRect(),p=Cn(v),_=h.left+(v.clientLeft+parseFloat(p.paddingLeft))*x.x,C=h.top+(v.clientTop+parseFloat(p.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=_,u+=C,w=Lr(v),v=tm(w)}}return md({width:d,height:f,x:l,y:u})}function dD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Yn(n),a=t?hf(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=pi(1);const d=pi(0),f=Vn(n);if((f||!f&&!i)&&((ba(n)!=="body"||fc(o))&&(l=pf(n)),Vn(n))){const m=Ji(n);u=Ho(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function fD(e){return Array.from(e.getClientRects())}function rm(e,t){const r=pf(e).scrollLeft;return t?t.left+r:Ji(Yn(e)).left+r}function hD(e){const t=Yn(e),r=pf(e),n=e.ownerDocument.body,s=Or(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Or(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+rm(e);const a=-r.scrollTop;return Cn(n).direction==="rtl"&&(o+=Or(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function pD(e,t){const r=Lr(e),n=Yn(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Bg();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function mD(e,t){const r=Ji(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Vn(e)?Ho(e):pi(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function b0(e,t,r){let n;if(t==="viewport")n=pD(e,r);else if(t==="document")n=hD(Yn(e));else if(kn(t))n=mD(t,r);else{const s=rb(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return md(n)}function nb(e,t){const r=gi(e);return r===t||!kn(r)||aa(r)?!1:Cn(r).position==="fixed"||nb(r,t)}function gD(e,t){const r=t.get(e);if(r)return r;let n=Fl(e,[],!1).filter(a=>kn(a)&&ba(a)!=="body"),s=null;const i=Cn(e).position==="fixed";let o=i?gi(e):e;for(;kn(o)&&!aa(o);){const a=Cn(o),l=Wg(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||fc(o)&&!l&&nb(e,o))?n=n.filter(d=>d!==o):s=a,o=gi(o)}return t.set(e,n),n}function vD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?hf(t)?[]:gD(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,d)=>{const f=b0(t,d,s);return u.top=Or(f.top,u.top),u.right=hi(f.right,u.right),u.bottom=hi(f.bottom,u.bottom),u.left=Or(f.left,u.left),u},b0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yD(e){const{width:t,height:r}=tb(e);return{width:t,height:r}}function xD(e,t,r){const n=Vn(t),s=Yn(t),i=r==="fixed",o=Ji(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=pi(0);if(n||!n&&!i)if((ba(t)!=="body"||fc(s))&&(a=pf(t)),n){const g=Ji(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else s&&(l.x=rm(s));let u=0,d=0;if(s&&!n&&!i){const g=s.getBoundingClientRect();d=g.top+a.scrollTop,u=g.left+a.scrollLeft-rm(s,g)}const f=o.left+a.scrollLeft-l.x-u,m=o.top+a.scrollTop-l.y-d;return{x:f,y:m,width:o.width,height:o.height}}function Oh(e){return Cn(e).position==="static"}function S0(e,t){if(!Vn(e)||Cn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Yn(e)===r&&(r=r.ownerDocument.body),r}function sb(e,t){const r=Lr(e);if(hf(e))return r;if(!Vn(e)){let s=gi(e);for(;s&&!aa(s);){if(kn(s)&&!Oh(s))return s;s=gi(s)}return r}let n=S0(e,t);for(;n&&aD(n)&&Oh(n);)n=S0(n,t);return n&&aa(n)&&Oh(n)&&!Wg(n)?r:n||lD(e)||r}const wD=async function(e){const t=this.getOffsetParent||sb,r=this.getDimensions,n=await r(e.floating);return{reference:xD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function _D(e){return Cn(e).direction==="rtl"}const bD={convertOffsetParentRelativeRectToViewportRelativeRect:dD,getDocumentElement:Yn,getClippingRect:vD,getOffsetParent:sb,getElementRects:wD,getClientRects:fD,getDimensions:yD,getScale:Ho,isElement:kn,isRTL:_D};function SD(e,t){let r=null,n;const s=Yn(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const g=nu(d),w=nu(s.clientWidth-(u+f)),v=nu(s.clientHeight-(d+m)),x=nu(u),p={rootMargin:-g+"px "+-w+"px "+-v+"px "+-x+"px",threshold:Or(0,hi(1,l))||1};let _=!0;function C(E){const P=E[0].intersectionRatio;if(P!==l){if(!_)return o();P?o(!1,P):n=setTimeout(()=>{o(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,p)}r.observe(e)}return o(!0),i}function kD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Hg(e),d=s||i?[...u?Fl(u):[],...Fl(t)]:[];d.forEach(h=>{s&&h.addEventListener("scroll",r,{passive:!0}),i&&h.addEventListener("resize",r)});const f=u&&a?SD(u,r):null;let m=-1,g=null;o&&(g=new ResizeObserver(h=>{let[p]=h;p&&p.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=g)==null||_.observe(t)})),r()}),u&&!l&&g.observe(u),g.observe(t));let w,v=l?Ji(e):null;l&&x();function x(){const h=Ji(e);v&&(h.x!==v.x||h.y!==v.y||h.width!==v.width||h.height!==v.height)&&r(),v=h,w=requestAnimationFrame(x)}return r(),()=>{var h;d.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),f==null||f(),(h=g)==null||h.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const CD=nD,ED=sD,jD=eD,TD=oD,ND=tD,k0=JA,RD=iD,PD=(e,t,r)=>{const n=new Map,s={platform:bD,...r},i={...s.platform,_c:n};return QA(e,t,{...s,platform:i})};var Ru=typeof document<"u"?y.useLayoutEffect:y.useEffect;function gd(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(!gd(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 i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!gd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ib(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C0(e,t){const r=ib(e);return Math.round(t*r)/r}function Mh(e){const t=y.useRef(e);return Ru(()=>{t.current=e}),t}function AD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=y.useState(n);gd(m,n)||g(n);const[w,v]=y.useState(null),[x,h]=y.useState(null),p=y.useCallback(Y=>{Y!==P.current&&(P.current=Y,v(Y))},[]),_=y.useCallback(Y=>{Y!==R.current&&(R.current=Y,h(Y))},[]),C=i||w,E=o||x,P=y.useRef(null),R=y.useRef(null),j=y.useRef(d),D=l!=null,L=Mh(l),K=Mh(s),T=Mh(u),F=y.useCallback(()=>{if(!P.current||!R.current)return;const Y={placement:t,strategy:r,middleware:m};K.current&&(Y.platform=K.current),PD(P.current,R.current,Y).then(O=>{const X={...O,isPositioned:T.current!==!1};b.current&&!gd(j.current,X)&&(j.current=X,js.flushSync(()=>{f(X)}))})},[m,t,r,K,T]);Ru(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[u]);const b=y.useRef(!1);Ru(()=>(b.current=!0,()=>{b.current=!1}),[]),Ru(()=>{if(C&&(P.current=C),E&&(R.current=E),C&&E){if(L.current)return L.current(C,E,F);F()}},[C,E,F,L,D]);const $=y.useMemo(()=>({reference:P,floating:R,setReference:p,setFloating:_}),[p,_]),ee=y.useMemo(()=>({reference:C,floating:E}),[C,E]),Z=y.useMemo(()=>{const Y={position:r,left:0,top:0};if(!ee.floating)return Y;const O=C0(ee.floating,d.x),X=C0(ee.floating,d.y);return a?{...Y,transform:"translate("+O+"px, "+X+"px)",...ib(ee.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:X}},[r,a,ee.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:F,refs:$,elements:ee,floatingStyles:Z}),[d,F,$,ee,Z])}const DD=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?k0({element:n.current,padding:s}).fn(r):{}:n?k0({element:n,padding:s}).fn(r):{}}}},OD=(e,t)=>({...CD(e),options:[e,t]}),MD=(e,t)=>({...ED(e),options:[e,t]}),ID=(e,t)=>({...RD(e),options:[e,t]}),LD=(e,t)=>({...jD(e),options:[e,t]}),FD=(e,t)=>({...TD(e),options:[e,t]}),zD=(e,t)=>({...ND(e),options:[e,t]}),UD=(e,t)=>({...DD(e),options:[e,t]});var VD="Arrow",ob=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return c.jsx(Le.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});ob.displayName=VD;var $D=ob;function ab(e){const[t,r]=y.useState(void 0);return sr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Yg="Popper",[lb,Sa]=Wr(Yg),[WD,cb]=lb(Yg),ub=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return c.jsx(WD,{scope:t,anchor:n,onAnchorChange:s,children:r})};ub.displayName=Yg;var db="PopperAnchor",fb=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=cb(db,r),o=y.useRef(null),a=Xe(t,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(Le.div,{...s,ref:a})});fb.displayName=db;var Zg="PopperContent",[BD,HD]=lb(Zg),hb=y.forwardRef((e,t)=>{var ce,me,ke,De,Oe,He;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:w,...v}=e,x=cb(Zg,r),[h,p]=y.useState(null),_=Xe(t,ut=>p(ut)),[C,E]=y.useState(null),P=ab(C),R=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,D=n+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},K=Array.isArray(u)?u:[u],T=K.length>0,F={padding:L,boundary:K.filter(ZD),altBoundary:T},{refs:b,floatingStyles:$,placement:ee,isPositioned:Z,middlewareData:Y}=AD({strategy:"fixed",placement:D,whileElementsMounted:(...ut)=>kD(...ut,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[OD({mainAxis:s+j,alignmentAxis:o}),l&&MD({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ID():void 0,...F}),l&&LD({...F}),FD({...F,apply:({elements:ut,rects:k,availableWidth:Q,availableHeight:G})=>{const{width:A,height:S}=k.reference,N=ut.floating.style;N.setProperty("--radix-popper-available-width",`${Q}px`),N.setProperty("--radix-popper-available-height",`${G}px`),N.setProperty("--radix-popper-anchor-width",`${A}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&UD({element:C,padding:a}),KD({arrowWidth:R,arrowHeight:j}),m&&zD({strategy:"referenceHidden",...F})]}),[O,X]=gb(ee),U=At(w);sr(()=>{Z&&(U==null||U())},[Z,U]);const V=(ce=Y.arrow)==null?void 0:ce.x,ue=(me=Y.arrow)==null?void 0:me.y,ne=((ke=Y.arrow)==null?void 0:ke.centerOffset)!==0,[se,Pe]=y.useState();return sr(()=>{h&&Pe(window.getComputedStyle(h).zIndex)},[h]),c.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:Z?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(De=Y.transformOrigin)==null?void 0:De.x,(Oe=Y.transformOrigin)==null?void 0:Oe.y].join(" "),...((He=Y.hide)==null?void 0:He.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(BD,{scope:r,placedSide:O,onArrowChange:E,arrowX:V,arrowY:ue,shouldHideArrow:ne,children:c.jsx(Le.div,{"data-side":O,"data-align":X,...v,ref:_,style:{...v.style,animation:Z?void 0:"none"}})})})});hb.displayName=Zg;var pb="PopperArrow",YD={top:"bottom",right:"left",bottom:"top",left:"right"},mb=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=HD(pb,n),o=YD[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx($D,{...s,ref:r,style:{...s.style,display:"block"}})})});mb.displayName=pb;function ZD(e){return e!==null}var KD=e=>({name:"transformOrigin",options:e,fn(t){var x,h,p;const{placement:r,rects:n,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=gb(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((h=s.arrow)==null?void 0:h.x)??0)+a/2,g=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let w="",v="";return u==="bottom"?(w=o?f:`${m}px`,v=`${-l}px`):u==="top"?(w=o?f:`${m}px`,v=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,v=o?f:`${g}px`):u==="left"&&(w=`${n.floating.width+l}px`,v=o?f:`${g}px`),{data:{x:w,y:v}}}});function gb(e){const[t,r="center"]=e.split("-");return[t,r]}var Kg=ub,Gg=fb,qg=hb,Xg=mb,GD="Portal",hc=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=y.useState(!1);sr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?w1.createPortal(c.jsx(Le.div,{...n,ref:t}),o):null});hc.displayName=GD;function qD(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var wr=e=>{const{present:t,children:r}=e,n=XD(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Xe(n.ref,QD(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};wr.displayName="Presence";function XD(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),i=y.useRef("none"),o=e?"mounted":"unmounted",[a,l]=qD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=su(n.current);i.current=a==="mounted"?u:"none"},[a]),sr(()=>{const u=n.current,d=s.current;if(d!==e){const m=i.current,g=su(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),sr(()=>{if(t){const u=f=>{const g=su(n.current).includes(f.animationName);f.target===t&&g&&js.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=su(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function su(e){return(e==null?void 0:e.animationName)||"none"}function QD(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 Ih="rovingFocusGroup.onEntryFocus",JD={bubbles:!1,cancelable:!0},mf="RovingFocusGroup",[nm,vb,eO]=uf(mf),[tO,gf]=Wr(mf,[eO]),[rO,nO]=tO(mf),yb=y.forwardRef((e,t)=>c.jsx(nm.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(nm.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(sO,{...e,ref:t})})}));yb.displayName=mf;var sO=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=y.useRef(null),g=Xe(t,m),w=dc(i),[v=null,x]=_s({prop:o,defaultProp:a,onChange:l}),[h,p]=y.useState(!1),_=At(u),C=vb(r),E=y.useRef(!1),[P,R]=y.useState(0);return y.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(Ih,_),()=>j.removeEventListener(Ih,_)},[_]),c.jsx(rO,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:v,onItemFocus:y.useCallback(j=>x(j),[x]),onItemShiftTab:y.useCallback(()=>p(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>R(j=>j-1),[]),children:c.jsx(Le.div,{tabIndex:h||P===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{E.current=!0}),onFocus:de(e.onFocus,j=>{const D=!E.current;if(j.target===j.currentTarget&&D&&!h){const L=new CustomEvent(Ih,JD);if(j.currentTarget.dispatchEvent(L),!L.defaultPrevented){const K=C().filter(ee=>ee.focusable),T=K.find(ee=>ee.active),F=K.find(ee=>ee.id===v),$=[T,F,...K].filter(Boolean).map(ee=>ee.ref.current);_b($,d)}}E.current=!1}),onBlur:de(e.onBlur,()=>p(!1))})})}),xb="RovingFocusGroupItem",wb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=e,a=_n(),l=i||a,u=nO(xb,r),d=u.currentTabStopId===l,f=vb(r),{onFocusableItemAdd:m,onFocusableItemRemove:g}=u;return y.useEffect(()=>{if(n)return m(),()=>g()},[n,m,g]),c.jsx(nm.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Le.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:de(e.onMouseDown,w=>{n?u.onItemFocus(l):w.preventDefault()}),onFocus:de(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:de(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const v=aO(w,u.orientation,u.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let h=f().filter(p=>p.focusable).map(p=>p.ref.current);if(v==="last")h.reverse();else if(v==="prev"||v==="next"){v==="prev"&&h.reverse();const p=h.indexOf(w.currentTarget);h=u.loop?lO(h,p+1):h.slice(p+1)}setTimeout(()=>_b(h))}})})})});wb.displayName=xb;var iO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aO(e,t,r){const n=oO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return iO[n]}function _b(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function lO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var bb=yb,Sb=wb,cO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},po=new WeakMap,iu=new WeakMap,ou={},Lh=0,kb=function(e){return e&&(e.host||kb(e.parentNode))},uO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=kb(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})},dO=function(e,t,r,n){var s=uO(t,Array.isArray(e)?e:[e]);ou[r]||(ou[r]=new WeakMap);var i=ou[r],o=[],a=new Set,l=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var g=m.getAttribute(n),w=g!==null&&g!=="false",v=(po.get(m)||0)+1,x=(i.get(m)||0)+1;po.set(m,v),i.set(m,x),o.push(m),v===1&&w&&iu.set(m,!0),x===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(h){console.error("aria-hidden: cannot operate on ",m,h)}})};return d(t),a.clear(),Lh++,function(){o.forEach(function(f){var m=po.get(f)-1,g=i.get(f)-1;po.set(f,m),i.set(f,g),m||(iu.has(f)||f.removeAttribute(n),iu.delete(f)),g||f.removeAttribute(r)}),Lh--,Lh||(po=new WeakMap,po=new WeakMap,iu=new WeakMap,ou={})}},Qg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=cO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),dO(n,s,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Mn.apply(this,arguments)};function Cb(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 fO(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Pu="right-scroll-bar-position",Au="width-before-scroll-bar",hO="with-scroll-bars-hidden",pO="--removed-body-scroll-bar-size";function Fh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mO(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var gO=typeof window<"u"?y.useLayoutEffect:y.useEffect,E0=new WeakMap;function vO(e,t){var r=mO(null,function(n){return e.forEach(function(s){return Fh(s,n)})});return gO(function(){var n=E0.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;s.forEach(function(a){i.has(a)||Fh(a,null)}),i.forEach(function(a){s.has(a)||Fh(a,o)})}E0.set(r,e)},[e]),r}function yO(e){return e}function xO(e,t){t===void 0&&(t=yO);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(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return s}function wO(e){e===void 0&&(e={});var t=xO(null);return t.options=Mn({async:!0,ssr:!1},e),t}var Eb=function(e){var t=e.sideCar,r=Cb(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,Mn({},r))};Eb.isSideCarExport=!0;function _O(e,t){return e.useMedium(t),Eb}var jb=wO(),zh=function(){},vf=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:zh,onWheelCapture:zh,onTouchMoveCapture:zh}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,g=e.noIsolation,w=e.inert,v=e.allowPinchZoom,x=e.as,h=x===void 0?"div":x,p=e.gapMode,_=Cb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,E=vO([r,t]),P=Mn(Mn({},_),s);return y.createElement(y.Fragment,null,d&&y.createElement(C,{sideCar:jb,removeScrollBar:u,shards:f,noIsolation:g,inert:w,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:p}),o?y.cloneElement(y.Children.only(a),Mn(Mn({},P),{ref:E})):y.createElement(h,Mn({},P,{className:l,ref:E}),a))});vf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vf.classNames={fullWidth:Au,zeroRight:Pu};var bO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function SO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bO();return t&&e.setAttribute("nonce",t),e}function kO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function CO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var EO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=SO())&&(kO(t,r),CO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jO=function(){var e=EO();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Tb=function(){var e=jO(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},TO={left:0,top:0,right:0,gap:0},Uh=function(e){return parseInt(e||"",10)||0},NO=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[Uh(r),Uh(n),Uh(s)]},RO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TO;var t=NO(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])}},PO=Tb(),Yo="data-scroll-locked",AO=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),`
.`.concat(hO,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(a,"px ").concat(n,`;
}
body[`).concat(Yo,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(o,`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(Pu,` {
right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Au,` {
margin-right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Pu," .").concat(Pu,` {
right: 0 `).concat(n,`;
}
.`).concat(Au," .").concat(Au,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Yo,`] {
`).concat(pO,": ").concat(a,`px;
}
`)},j0=function(){var e=parseInt(document.body.getAttribute(Yo)||"0",10);return isFinite(e)?e:0},DO=function(){y.useEffect(function(){return document.body.setAttribute(Yo,(j0()+1).toString()),function(){var e=j0()-1;e<=0?document.body.removeAttribute(Yo):document.body.setAttribute(Yo,e.toString())}},[])},OO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;DO();var i=y.useMemo(function(){return RO(s)},[s]);return y.createElement(PO,{styles:AO(i,!t,s,r?"":"!important")})},sm=!1;if(typeof window<"u")try{var au=Object.defineProperty({},"passive",{get:function(){return sm=!0,!0}});window.addEventListener("test",au,au),window.removeEventListener("test",au,au)}catch{sm=!1}var mo=sm?{passive:!1}:!1,MO=function(e){return e.tagName==="TEXTAREA"},Nb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!MO(e)&&r[t]==="visible")},IO=function(e){return Nb(e,"overflowY")},LO=function(e){return Nb(e,"overflowX")},T0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Rb(e,n);if(s){var i=Pb(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},FO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Rb=function(e,t){return e==="v"?IO(t):LO(t)},Pb=function(e,t){return e==="v"?FO(t):zO(t)},UO=function(e,t){return e==="h"&&t==="rtl"?-1:1},VO=function(e,t,r,n,s){var i=UO(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,d=o>0,f=0,m=0;do{var g=Pb(e,a),w=g[0],v=g[1],x=g[2],h=v-x-i*w;(w||h)&&Rb(e,a)&&(f+=h,m+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},lu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},N0=function(e){return[e.deltaX,e.deltaY]},R0=function(e){return e&&"current"in e?e.current:e},$O=function(e,t){return e[0]===t[0]&&e[1]===t[1]},WO=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},BO=0,go=[];function HO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(BO++)[0],i=y.useState(Tb)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=fO([e.lockRef.current],(e.shards||[]).map(R0),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(v,x){if("touches"in v&&v.touches.length===2)return!o.current.allowPinchZoom;var h=lu(v),p=r.current,_="deltaX"in v?v.deltaX:p[0]-h[0],C="deltaY"in v?v.deltaY:p[1]-h[1],E,P=v.target,R=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&R==="h"&&P.type==="range")return!1;var j=T0(R,P);if(!j)return!0;if(j?E=R:(E=R==="v"?"h":"v",j=T0(R,P)),!j)return!1;if(!n.current&&"changedTouches"in v&&(_||C)&&(n.current=E),!E)return!0;var D=n.current||E;return VO(D,x,v,D==="h"?_:C,!0)},[]),l=y.useCallback(function(v){var x=v;if(!(!go.length||go[go.length-1]!==i)){var h="deltaY"in x?N0(x):lu(x),p=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&$O(E.delta,h)})[0];if(p&&p.should){x.cancelable&&x.preventDefault();return}if(!p){var _=(o.current.shards||[]).map(R0).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=_.length>0?a(x,_[0]):!o.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=y.useCallback(function(v,x,h,p){var _={name:v,delta:x,target:h,should:p,shadowParent:YO(h)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=y.useCallback(function(v){r.current=lu(v),n.current=void 0},[]),f=y.useCallback(function(v){u(v.type,N0(v),v.target,a(v,e.lockRef.current))},[]),m=y.useCallback(function(v){u(v.type,lu(v),v.target,a(v,e.lockRef.current))},[]);y.useEffect(function(){return go.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,mo),document.addEventListener("touchmove",l,mo),document.addEventListener("touchstart",d,mo),function(){go=go.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,mo),document.removeEventListener("touchmove",l,mo),document.removeEventListener("touchstart",d,mo)}},[]);var g=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(i,{styles:WO(s)}):null,g?y.createElement(OO,{gapMode:e.gapMode}):null)}function YO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZO=_O(jb,HO);var yf=y.forwardRef(function(e,t){return y.createElement(vf,Mn({},e,{ref:t,sideCar:ZO}))});yf.classNames=vf.classNames;var im=["Enter"," "],KO=["ArrowDown","PageUp","Home"],Ab=["ArrowUp","PageDown","End"],GO=[...KO,...Ab],qO={ltr:[...im,"ArrowRight"],rtl:[...im,"ArrowLeft"]},XO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pc="Menu",[zl,QO,JO]=uf(pc),[oo,Db]=Wr(pc,[JO,Sa,gf]),xf=Sa(),Ob=gf(),[eM,ao]=oo(pc),[tM,mc]=oo(pc),Mb=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=e,a=xf(t),[l,u]=y.useState(null),d=y.useRef(!1),f=At(i),m=dc(s);return y.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),c.jsx(Kg,{...a,children:c.jsx(eM,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:c.jsx(tM,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:o,children:n})})})};Mb.displayName=pc;var rM="MenuAnchor",Jg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=xf(r);return c.jsx(Gg,{...s,...n,ref:t})});Jg.displayName=rM;var ev="MenuPortal",[nM,Ib]=oo(ev,{forceMount:void 0}),Lb=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,i=ao(ev,t);return c.jsx(nM,{scope:t,forceMount:r,children:c.jsx(wr,{present:r||i.open,children:c.jsx(hc,{asChild:!0,container:s,children:n})})})};Lb.displayName=ev;var rn="MenuContent",[sM,tv]=oo(rn),Fb=y.forwardRef((e,t)=>{const r=Ib(rn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=ao(rn,e.__scopeMenu),o=mc(rn,e.__scopeMenu);return c.jsx(zl.Provider,{scope:e.__scopeMenu,children:c.jsx(wr,{present:n||i.open,children:c.jsx(zl.Slot,{scope:e.__scopeMenu,children:o.modal?c.jsx(iM,{...s,ref:t}):c.jsx(oM,{...s,ref:t})})})})}),iM=y.forwardRef((e,t)=>{const r=ao(rn,e.__scopeMenu),n=y.useRef(null),s=Xe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return Qg(i)},[]),c.jsx(rv,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),oM=y.forwardRef((e,t)=>{const r=ao(rn,e.__scopeMenu);return c.jsx(rv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),rv=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:w,...v}=e,x=ao(rn,r),h=mc(rn,r),p=xf(r),_=Ob(r),C=QO(r),[E,P]=y.useState(null),R=y.useRef(null),j=Xe(t,R,x.onContentChange),D=y.useRef(0),L=y.useRef(""),K=y.useRef(0),T=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),$=w?yf:y.Fragment,ee=w?{as:ws,allowPinchZoom:!0}:void 0,Z=O=>{var ce,me;const X=L.current+O,U=C().filter(ke=>!ke.disabled),V=document.activeElement,ue=(ce=U.find(ke=>ke.ref.current===V))==null?void 0:ce.textValue,ne=U.map(ke=>ke.textValue),se=yM(ne,X,ue),Pe=(me=U.find(ke=>ke.textValue===se))==null?void 0:me.ref.current;(function ke(De){L.current=De,window.clearTimeout(D.current),De!==""&&(D.current=window.setTimeout(()=>ke(""),1e3))})(X),Pe&&setTimeout(()=>Pe.focus())};y.useEffect(()=>()=>window.clearTimeout(D.current),[]),zg();const Y=y.useCallback(O=>{var U,V;return F.current===((U=T.current)==null?void 0:U.side)&&wM(O,(V=T.current)==null?void 0:V.area)},[]);return c.jsx(sM,{scope:r,searchRef:L,onItemEnter:y.useCallback(O=>{Y(O)&&O.preventDefault()},[Y]),onItemLeave:y.useCallback(O=>{var X;Y(O)||((X=R.current)==null||X.focus(),P(null))},[Y]),onTriggerLeave:y.useCallback(O=>{Y(O)&&O.preventDefault()},[Y]),pointerGraceTimerRef:K,onPointerGraceIntentChange:y.useCallback(O=>{T.current=O},[]),children:c.jsx($,{...ee,children:c.jsx(df,{asChild:!0,trapped:s,onMountAutoFocus:de(i,O=>{var X;O.preventDefault(),(X=R.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:c.jsx(wa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:c.jsx(bb,{asChild:!0,..._,dir:h.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:de(l,O=>{h.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(qg,{role:"menu","aria-orientation":"vertical","data-state":eS(x.open),"data-radix-menu-content":"",dir:h.dir,...p,...v,ref:j,style:{outline:"none",...v.style},onKeyDown:de(v.onKeyDown,O=>{const U=O.target.closest("[data-radix-menu-content]")===O.currentTarget,V=O.ctrlKey||O.altKey||O.metaKey,ue=O.key.length===1;U&&(O.key==="Tab"&&O.preventDefault(),!V&&ue&&Z(O.key));const ne=R.current;if(O.target!==ne||!GO.includes(O.key))return;O.preventDefault();const Pe=C().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);Ab.includes(O.key)&&Pe.reverse(),gM(Pe)}),onBlur:de(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(D.current),L.current="")}),onPointerMove:de(e.onPointerMove,Ul(O=>{const X=O.target,U=b.current!==O.clientX;if(O.currentTarget.contains(X)&&U){const V=O.clientX>b.current?"right":"left";F.current=V,b.current=O.clientX}}))})})})})})})});Fb.displayName=rn;var aM="MenuGroup",nv=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{role:"group",...n,ref:t})});nv.displayName=aM;var lM="MenuLabel",zb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});zb.displayName=lM;var vd="MenuItem",P0="menu.itemSelect",wf=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,i=y.useRef(null),o=mc(vd,e.__scopeMenu),a=tv(vd,e.__scopeMenu),l=Xe(t,i),u=y.useRef(!1),d=()=>{const f=i.current;if(!r&&f){const m=new CustomEvent(P0,{bubbles:!0,cancelable:!0});f.addEventListener(P0,g=>n==null?void 0:n(g),{once:!0}),Fg(f,m),m.defaultPrevented?u.current=!1:o.onClose()}};return c.jsx(Ub,{...s,ref:l,disabled:r,onClick:de(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:de(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:de(e.onKeyDown,f=>{const m=a.searchRef.current!=="";r||m&&f.key===" "||im.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});wf.displayName=vd;var Ub=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=e,o=tv(vd,r),a=Ob(r),l=y.useRef(null),u=Xe(t,l),[d,f]=y.useState(!1),[m,g]=y.useState("");return y.useEffect(()=>{const w=l.current;w&&g((w.textContent??"").trim())},[i.children]),c.jsx(zl.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:c.jsx(Sb,{asChild:!0,...a,focusable:!n,children:c.jsx(Le.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:de(e.onPointerMove,Ul(w=>{n?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(e.onPointerLeave,Ul(w=>o.onItemLeave(w))),onFocus:de(e.onFocus,()=>f(!0)),onBlur:de(e.onBlur,()=>f(!1))})})})}),cM="MenuCheckboxItem",Vb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return c.jsx(Yb,{scope:e.__scopeMenu,checked:r,children:c.jsx(wf,{role:"menuitemcheckbox","aria-checked":yd(r)?"mixed":r,...s,ref:t,"data-state":iv(r),onSelect:de(s.onSelect,()=>n==null?void 0:n(yd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Vb.displayName=cM;var $b="MenuRadioGroup",[uM,dM]=oo($b,{value:void 0,onValueChange:()=>{}}),Wb=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,i=At(n);return c.jsx(uM,{scope:e.__scopeMenu,value:r,onValueChange:i,children:c.jsx(nv,{...s,ref:t})})});Wb.displayName=$b;var Bb="MenuRadioItem",Hb=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=dM(Bb,e.__scopeMenu),i=r===s.value;return c.jsx(Yb,{scope:e.__scopeMenu,checked:i,children:c.jsx(wf,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":iv(i),onSelect:de(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});Hb.displayName=Bb;var sv="MenuItemIndicator",[Yb,fM]=oo(sv,{checked:!1}),Zb=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,i=fM(sv,r);return c.jsx(wr,{present:n||yd(i.checked)||i.checked===!0,children:c.jsx(Le.span,{...s,ref:t,"data-state":iv(i.checked)})})});Zb.displayName=sv;var hM="MenuSeparator",Kb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Kb.displayName=hM;var pM="MenuArrow",Gb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=xf(r);return c.jsx(Xg,{...s,...n,ref:t})});Gb.displayName=pM;var mM="MenuSub",[uU,qb]=oo(mM),Xa="MenuSubTrigger",Xb=y.forwardRef((e,t)=>{const r=ao(Xa,e.__scopeMenu),n=mc(Xa,e.__scopeMenu),s=qb(Xa,e.__scopeMenu),i=tv(Xa,e.__scopeMenu),o=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),c.jsx(Jg,{asChild:!0,...u,children:c.jsx(Ub,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":eS(r.open),...e,ref:lf(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:de(e.onPointerMove,Ul(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:de(e.onPointerLeave,Ul(f=>{var g,w;d();const m=(g=r.content)==null?void 0:g.getBoundingClientRect();if(m){const v=(w=r.content)==null?void 0:w.dataset.side,x=v==="right",h=x?-5:5,p=m[x?"left":"right"],_=m[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+h,y:f.clientY},{x:p,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:p,y:m.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:de(e.onKeyDown,f=>{var g;const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||qO[n.dir].includes(f.key)&&(r.onOpenChange(!0),(g=r.content)==null||g.focus(),f.preventDefault())})})})});Xb.displayName=Xa;var Qb="MenuSubContent",Jb=y.forwardRef((e,t)=>{const r=Ib(rn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=ao(rn,e.__scopeMenu),o=mc(rn,e.__scopeMenu),a=qb(Qb,e.__scopeMenu),l=y.useRef(null),u=Xe(t,l);return c.jsx(zl.Provider,{scope:e.__scopeMenu,children:c.jsx(wr,{present:n||i.open,children:c.jsx(zl.Slot,{scope:e.__scopeMenu,children:c.jsx(rv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:de(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:de(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:de(e.onKeyDown,d=>{var g;const f=d.currentTarget.contains(d.target),m=XO[o.dir].includes(d.key);f&&m&&(i.onOpenChange(!1),(g=a.trigger)==null||g.focus(),d.preventDefault())})})})})})});Jb.displayName=Qb;function eS(e){return e?"open":"closed"}function yd(e){return e==="indeterminate"}function iv(e){return yd(e)?"indeterminate":e?"checked":"unchecked"}function gM(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function vM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function yM(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=vM(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function xM(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function wM(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return xM(r,t)}function Ul(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _M=Mb,bM=Jg,SM=Lb,kM=Fb,CM=nv,EM=zb,jM=wf,TM=Vb,NM=Wb,RM=Hb,PM=Zb,AM=Kb,DM=Gb,OM=Xb,MM=Jb,ov="DropdownMenu",[IM,dU]=Wr(ov,[Db]),_r=Db(),[LM,tS]=IM(ov),rS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=_r(t),u=y.useRef(null),[d=!1,f]=_s({prop:s,defaultProp:i,onChange:o});return c.jsx(LM,{scope:t,triggerId:_n(),triggerRef:u,contentId:_n(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(m=>!m),[f]),modal:a,children:c.jsx(_M,{...l,open:d,onOpenChange:f,dir:n,modal:a,children:r})})};rS.displayName=ov;var nS="DropdownMenuTrigger",sS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,i=tS(nS,r),o=_r(r);return c.jsx(bM,{asChild:!0,...o,children:c.jsx(Le.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:lf(t,i.triggerRef),onPointerDown:de(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:de(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});sS.displayName=nS;var FM="DropdownMenuPortal",iS=e=>{const{__scopeDropdownMenu:t,...r}=e,n=_r(t);return c.jsx(SM,{...n,...r})};iS.displayName=FM;var oS="DropdownMenuContent",aS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=tS(oS,r),i=_r(r),o=y.useRef(!1);return c.jsx(kM,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:t,onCloseAutoFocus:de(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:de(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!s.modal||d)&&(o.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)"}})});aS.displayName=oS;var zM="DropdownMenuGroup",UM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(CM,{...s,...n,ref:t})});UM.displayName=zM;var VM="DropdownMenuLabel",lS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(EM,{...s,...n,ref:t})});lS.displayName=VM;var $M="DropdownMenuItem",cS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(jM,{...s,...n,ref:t})});cS.displayName=$M;var WM="DropdownMenuCheckboxItem",uS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(TM,{...s,...n,ref:t})});uS.displayName=WM;var BM="DropdownMenuRadioGroup",HM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(NM,{...s,...n,ref:t})});HM.displayName=BM;var YM="DropdownMenuRadioItem",dS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(RM,{...s,...n,ref:t})});dS.displayName=YM;var ZM="DropdownMenuItemIndicator",fS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(PM,{...s,...n,ref:t})});fS.displayName=ZM;var KM="DropdownMenuSeparator",hS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(AM,{...s,...n,ref:t})});hS.displayName=KM;var GM="DropdownMenuArrow",qM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(DM,{...s,...n,ref:t})});qM.displayName=GM;var XM="DropdownMenuSubTrigger",pS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(OM,{...s,...n,ref:t})});pS.displayName=XM;var QM="DropdownMenuSubContent",mS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=_r(r);return c.jsx(MM,{...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)"}})});mS.displayName=QM;var JM=rS,eI=sS,tI=iS,gS=aS,vS=lS,yS=cS,xS=uS,wS=dS,_S=fS,bS=hS,SS=pS,kS=mS;const CS=JM,ES=eI,rI=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>c.jsxs(SS,{ref:s,className:le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,c.jsx(EP,{className:"ml-auto h-4 w-4"})]}));rI.displayName=SS.displayName;const nI=y.forwardRef(({className:e,...t},r)=>c.jsx(kS,{ref:r,className:le("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}));nI.displayName=kS.displayName;const av=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(tI,{children:c.jsx(gS,{ref:n,sideOffset:t,className:le("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})}));av.displayName=gS.displayName;const Zo=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(yS,{ref:n,className:le("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}));Zo.displayName=yS.displayName;const sI=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>c.jsxs(xS,{ref:s,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(_S,{children:c.jsx(F1,{className:"h-4 w-4"})})}),t]}));sI.displayName=xS.displayName;const iI=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(wS,{ref:n,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(_S,{children:c.jsx(NP,{className:"h-2 w-2 fill-current"})})}),t]}));iI.displayName=wS.displayName;const jS=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(vS,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));jS.displayName=vS.displayName;const TS=y.forwardRef(({className:e,...t},r)=>c.jsx(bS,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));TS.displayName=bS.displayName;var lv="Dialog",[NS,RS]=Wr(lv),[oI,Nn]=NS(lv),PS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=y.useRef(null),l=y.useRef(null),[u=!1,d]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(oI,{scope:t,triggerRef:a,contentRef:l,contentId:_n(),titleId:_n(),descriptionId:_n(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};PS.displayName=lv;var AS="DialogTrigger",DS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Nn(AS,r),i=Xe(t,s.triggerRef);return c.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":dv(s.open),...n,ref:i,onClick:de(e.onClick,s.onOpenToggle)})});DS.displayName=AS;var cv="DialogPortal",[aI,OS]=NS(cv,{forceMount:void 0}),MS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Nn(cv,t);return c.jsx(aI,{scope:t,forceMount:r,children:y.Children.map(n,o=>c.jsx(wr,{present:r||i.open,children:c.jsx(hc,{asChild:!0,container:s,children:o})}))})};MS.displayName=cv;var xd="DialogOverlay",IS=y.forwardRef((e,t)=>{const r=OS(xd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Nn(xd,e.__scopeDialog);return i.modal?c.jsx(wr,{present:n||i.open,children:c.jsx(lI,{...s,ref:t})}):null});IS.displayName=xd;var lI=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Nn(xd,r);return c.jsx(yf,{as:ws,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Le.div,{"data-state":dv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),eo="DialogContent",LS=y.forwardRef((e,t)=>{const r=OS(eo,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Nn(eo,e.__scopeDialog);return c.jsx(wr,{present:n||i.open,children:i.modal?c.jsx(cI,{...s,ref:t}):c.jsx(uI,{...s,ref:t})})});LS.displayName=eo;var cI=y.forwardRef((e,t)=>{const r=Nn(eo,e.__scopeDialog),n=y.useRef(null),s=Xe(t,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return Qg(i)},[]),c.jsx(FS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:de(e.onFocusOutside,i=>i.preventDefault())})}),uI=y.forwardRef((e,t)=>{const r=Nn(eo,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return c.jsx(FS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),FS=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Nn(eo,r),l=y.useRef(null),u=Xe(t,l);return zg(),c.jsxs(c.Fragment,{children:[c.jsx(df,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(wa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":dv(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(fI,{titleId:a.titleId}),c.jsx(pI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),uv="DialogTitle",zS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Nn(uv,r);return c.jsx(Le.h2,{id:s.titleId,...n,ref:t})});zS.displayName=uv;var US="DialogDescription",VS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Nn(US,r);return c.jsx(Le.p,{id:s.descriptionId,...n,ref:t})});VS.displayName=US;var $S="DialogClose",WS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Nn($S,r);return c.jsx(Le.button,{type:"button",...n,ref:t,onClick:de(e.onClick,()=>s.onOpenChange(!1))})});WS.displayName=$S;function dv(e){return e?"open":"closed"}var BS="DialogTitleWarning",[dI,HS]=_A(BS,{contentName:eo,titleName:uv,docsSlug:"dialog"}),fI=({titleId:e})=>{const t=HS(BS),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},hI="DialogDescriptionWarning",pI=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${HS(hI).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},fv=PS,hv=DS,pv=MS,gc=IS,vc=LS,yc=zS,xc=VS,_f=WS;const mv=fv,gv=hv,mI=pv,YS=y.forwardRef(({className:e,...t},r)=>c.jsx(gc,{className:le("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}));YS.displayName=gc.displayName;const gI=uc("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"}}),bf=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>c.jsxs(mI,{children:[c.jsx(YS,{}),c.jsxs(vc,{ref:s,className:le(gI({side:e}),t),...n,children:[r,c.jsxs(_f,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(Mg,{className:"h-4 w-4 dark:text-stone-200"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bf.displayName=vc.displayName;const vv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});vv.displayName="SheetHeader";const yv=y.forwardRef(({className:e,...t},r)=>c.jsx(yc,{ref:r,className:le("text-lg font-semibold text-foreground",e),...t}));yv.displayName=yc.displayName;const vI=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));vI.displayName=xc.displayName;class Fr extends Error{constructor(t){var r,n,s,i;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Fr.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 Fr||(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.":(i=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&i.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 cu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function yI(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||xI;let s=0;for(;s<e.length;){const i=e.indexOf("=",s);if(i===-1)break;let o=e.indexOf(";",s);if(o===-1)o=e.length;else if(o<i){s=e.lastIndexOf(";",i-1)+1;continue}const a=e.slice(s,i).trim();if(r[a]===void 0){let l=e.slice(i+1,o).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{r[a]=n(l)}catch{r[a]=l}}s=o+1}return r}function A0(e,t,r){const n=Object.assign({},r||{}),s=n.encode||wI;if(!cu.test(e))throw new TypeError("argument name is invalid");const i=s(t);if(i&&!cu.test(i))throw new TypeError("argument val is invalid");let o=e+"="+i;if(n.maxAge!=null){const a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!cu.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!cu.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; 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:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}function xI(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function wI(e){return encodeURIComponent(e)}const _I=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let ZS;function Ko(e){if(e)try{const t=decodeURIComponent(ZS(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function KS(e,t=0){let r=Ko(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}ZS=typeof atob!="function"||_I?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,i=0,o="";n=t.charAt(i++);~n&&(r=s%4?64*r+n:n,s++%4)?o+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return o}:atob;const D0="pb_auth";class bI{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!KS(this.token)}get isAdmin(){return Ko(this.token).type==="admin"}get isAuthRecord(){return Ko(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=D0){const n=yI(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=D0){var l,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ko(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const i={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let o=A0(r,JSON.stringify(i),t);const a=typeof Blob<"u"?new Blob([o]).size:o.length;if(i.model&&a>4096){i.model={id:(l=i==null?void 0:i.model)==null?void 0:l.id,email:(u=i==null?void 0:i.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(i.model[f]=this.model[f]);o=A0(r,JSON.stringify(i),t)}return o}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 SI extends bI{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 lo{constructor(t){this.client=t}}class kI extends lo{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,i,o){return o=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:i}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class xv extends lo{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 i;return s.items=((i=s.items)==null?void 0:i.map(o=>this.decode(o)))||[],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 Fr({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 Fr({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 i=>this.getList(i,t||500,r).then(o=>{const a=o.items;return n=n.concat(a),a.length==o.perPage?s(i+1):n});return s(1)}}function Pr(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 Vh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class CI extends xv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o;return((i=this.client.authStore.model)==null?void 0:i.id)===s.id&&((o=this.client.authStore.model)==null?void 0:o.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,i;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((i=this.client.authStore.model)==null?void 0:i.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 i={method:"POST",body:{identity:t,password:r}};i=Pr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",i,n,s);const o=i.autoRefreshThreshold;delete i.autoRefreshThreshold,i.autoRefresh||Vh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",i);return a=this.authResponse(a),o&&function(u,d,f,m){Vh(u);const g=u.beforeSend,w=u.authStore.model,v=u.authStore.onChange((x,h)=>{(!x||(h==null?void 0:h.id)!=(w==null?void 0:w.id)||(h!=null&&h.collectionId||w!=null&&w.collectionId)&&(h==null?void 0:h.collectionId)!=(w==null?void 0:w.collectionId))&&Vh(u)});u._resetAutoRefresh=function(){v(),u.beforeSend=g,delete u._resetAutoRefresh},u.beforeSend=async(x,h)=>{var E;const p=u.authStore.token;if((E=h.query)!=null&&E.autoRefresh)return g?g(x,h):{url:x,sendOptions:h};let _=u.authStore.isValid;if(_&&KS(u.authStore.token,d))try{await f()}catch{_=!1}_||await m();const C=h.headers||{};for(let P in C)if(P.toLowerCase()=="authorization"&&p==C[P]&&u.authStore.token){C[P]=u.authStore.token;break}return h.headers=C,g?g(x,h):{url:x,sendOptions:h}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},i))),a}async authRefresh(t,r){let n={method:"POST"};return n=Pr("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=Pr("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,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Pr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}const EI=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function GS(e){if(e){e.query=e.query||{};for(let t in e)EI.includes(t)||(e.query[t]=e[t],delete e[t])}}class qS extends lo{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 o;if(!t)throw new Error("topic must be set.");let s=t;if(n){GS(n=Object.assign({},n));const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const i=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(i),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(o=this.eventSource)==null||o.addEventListener(s,i):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,i)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let i in s)if(this.hasSubscriptionListeners(i)){for(let o of this.subscriptions[i])(n=this.eventSource)==null||n.removeEventListener(i,o);delete this.subscriptions[i],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 i of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,i);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var i;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let o in s){if(!Array.isArray(this.subscriptions[o])||!this.subscriptions[o].length)continue;let a=!1;for(let l=this.subscriptions[o].length-1;l>=0;l--)this.subscriptions[o][l]===r&&(a=!0,delete this.subscriptions[o][l],this.subscriptions[o].splice(l,1),(i=this.eventSource)==null||i.removeEventListener(o,r));a&&(this.subscriptions[o].length||delete this.subscriptions[o],n||this.hasSubscriptionListeners(o)||(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 i of n[s])i(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 Fr(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 jI extends xv{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 i,o,a;return((i=this.client.authStore.model)==null?void 0:i.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)==null?void 0:o.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,i,o;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)==null?void 0:o.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 i={method:"POST",body:{identity:t,password:r}};return i=Pr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",i).then(o=>this.authResponse(o))}async authWithOAuth2Code(t,r,n,s,i,o,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:i}};return l=Pr("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",l,o,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const r=(t==null?void 0:t[0])||{};let n=null;r.urlCallback||(n=O0(void 0));const s=new qS(this.client);function i(){n==null||n.close(),s.unsubscribe()}const o={},a=r.requestKey;return a&&(o.requestKey=a),this.listAuthMethods(o).then(l=>{var m;const u=l.authProviders.find(g=>g.name===r.provider);if(!u)throw new Fr(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=()=>{i()}),new Promise(async(g,w)=>{var v;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const P=Object.assign({},r);delete P.provider,delete P.scopes,delete P.createData,delete P.urlCallback,(E=f==null?void 0:f.signal)!=null&&E.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,_.code,u.codeVerifier,d,r.createData,P);g(R)}catch(P){w(new Fr(P))}i()});const x={state:s.clientId};(v=r.scopes)!=null&&v.length&&(x.scope=r.scopes.join(" "));const h=this._replaceQueryParams(u.authUrl+d,x);await(r.urlCallback||function(_){n?n.location.href=_:n=O0(_)})(h)}catch(x){i(),w(new Fr(x))}})}).catch(l=>{throw i(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Pr("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=Pr("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,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Pr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Pr("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=Pr("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 i=Ko(t),o=this.client.authStore.model;return o&&!o.verified&&o.id===i.id&&o.collectionId===i.collectionId&&(o.verified=!0,this.client.authStore.save(this.client.authStore.token,o)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Pr("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 i={method:"POST",body:{token:t,password:r}};return i=Pr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",i).then(()=>{const o=Ko(t),a=this.client.authStore.model;return a&&a.id===o.id&&a.collectionId===o.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 i={},o=s.split("&");for(const a of o){if(a=="")continue;const l=a.split("=");i[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete i[a]:i[a]=r[a]);s="";for(let a in i)i.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(i[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function O0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Fr(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 i=n/2-t/2,o=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+o+",left="+i+",resizable,menubar=no")}class TI extends xv{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 NI extends lo{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 Fr({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 RI extends lo{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class PI extends lo{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 i=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const o=new URLSearchParams(n);i+=(i.includes("?")?"&":"?")+o}return i}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 AI extends lo{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 DI{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new SI,this.admins=new CI(this),this.collections=new TI(this),this.files=new PI(this),this.logs=new NI(this),this.settings=new kI(this),this.realtime=new qS(this),this.health=new RI(this),this.backups=new AI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new jI(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 i={};try{i=await s.json()}catch{}if(this.afterSend&&(i=await this.afterSend(s,i)),s.status>=400)throw new Fr({url:s.url,status:s.status,data:i});return i}).catch(s=>{throw new Fr(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),GS(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 i=Array.isArray(s)?s:[s];for(let o of i)r.append(n,o)}else{let i={};i[n]=s,r.append("@jsonPayload",JSON.stringify(i))}}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],i=encodeURIComponent(n);if(Array.isArray(s))for(const o of s)r.push(i+"="+encodeURIComponent(o));else s instanceof Date?r.push(i+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(i+"="+encodeURIComponent(JSON.stringify(s))):r.push(i+"="+encodeURIComponent(s))}return r.join("&")}}const OI=void 0;console.log(OI);let uu;const ft=()=>uu||(uu=new DI("/"),uu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var XS;function ye(){return XS.apply(null,arguments)}function MI(e){XS=e}function En(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Bi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function at(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(at(e,t))return!1;return!0}function br(e){return e===void 0}function ks(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function wc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function QS(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function Js(e,t){for(var r in t)at(t,r)&&(e[r]=t[r]);return at(t,"toString")&&(e.toString=t.toString),at(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Zn(e,t,r,n){return _k(e,t,r,n,!0).utc()}function II(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ke(e){return e._pf==null&&(e._pf=II()),e._pf}var om;Array.prototype.some?om=Array.prototype.some:om=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 _v(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ke(e),r=om.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 Sf(e){var t=Zn(NaN);return e!=null?Js(Ke(t),e):Ke(t).userInvalidated=!0,t}var M0=ye.momentProperties=[],$h=!1;function bv(e,t){var r,n,s,i=M0.length;if(br(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),br(t._i)||(e._i=t._i),br(t._f)||(e._f=t._f),br(t._l)||(e._l=t._l),br(t._strict)||(e._strict=t._strict),br(t._tzm)||(e._tzm=t._tzm),br(t._isUTC)||(e._isUTC=t._isUTC),br(t._offset)||(e._offset=t._offset),br(t._pf)||(e._pf=Ke(t)),br(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)n=M0[r],s=t[n],br(s)||(e[n]=s);return e}function _c(e){bv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),$h===!1&&($h=!0,ye.updateOffset(this),$h=!1)}function jn(e){return e instanceof _c||e!=null&&e._isAMomentObject!=null}function JS(e){ye.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function an(e,t){var r=!0;return Js(function(){if(ye.deprecationHandler!=null&&ye.deprecationHandler(null,e),r){var n=[],s,i,o,a=arguments.length;for(i=0;i<a;i++){if(s="",typeof arguments[i]=="object"){s+=`
[`+i+"] ";for(o in arguments[0])at(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[i];n.push(s)}JS(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var I0={};function ek(e,t){ye.deprecationHandler!=null&&ye.deprecationHandler(e,t),I0[e]||(JS(t),I0[e]=!0)}ye.suppressDeprecationWarnings=!1;ye.deprecationHandler=null;function Kn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function LI(e){var t,r;for(r in e)at(e,r)&&(t=e[r],Kn(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 am(e,t){var r=Js({},e),n;for(n in t)at(t,n)&&(Bi(e[n])&&Bi(t[n])?(r[n]={},Js(r[n],e[n]),Js(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)at(e,n)&&!at(t,n)&&Bi(e[n])&&(r[n]=Js({},r[n]));return r}function Sv(e){e!=null&&this.set(e)}var lm;Object.keys?lm=Object.keys:lm=function(e){var t,r=[];for(t in e)at(e,t)&&r.push(t);return r};var FI={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function zI(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Kn(n)?n.call(t,r):n}function $n(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var kv=/(\[[^\[]*\])|(\\)?([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,du=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wh={},Go={};function Ie(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Go[e]=s),t&&(Go[t[0]]=function(){return $n(s.apply(this,arguments),t[1],t[2])}),r&&(Go[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function UI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function VI(e){var t=e.match(kv),r,n;for(r=0,n=t.length;r<n;r++)Go[t[r]]?t[r]=Go[t[r]]:t[r]=UI(t[r]);return function(s){var i="",o;for(o=0;o<n;o++)i+=Kn(t[o])?t[o].call(s,e):t[o];return i}}function Du(e,t){return e.isValid()?(t=tk(t,e.localeData()),Wh[t]=Wh[t]||VI(t),Wh[t](e)):e.localeData().invalidDate()}function tk(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(du.lastIndex=0;r>=0&&du.test(e);)e=e.replace(du,n),du.lastIndex=0,r-=1;return e}var $I={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 WI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(kv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var BI="Invalid date";function HI(){return this._invalidDate}var YI="%d",ZI=/\d{1,2}/;function KI(e){return this._ordinal.replace("%d",e)}var GI={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 qI(e,t,r,n){var s=this._relativeTime[r];return Kn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function XI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kn(r)?r(t):r.replace(/%s/i,t)}var L0={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"?L0[e]||L0[e.toLowerCase()]:void 0}function Cv(e){var t={},r,n;for(n in e)at(e,n)&&(r=ln(n),r&&(t[r]=e[n]));return t}var QI={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 JI(e){var t=[],r;for(r in e)at(e,r)&&t.push({unit:r,priority:QI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var rk=/\d/,Br=/\d\d/,nk=/\d{3}/,Ev=/\d{4}/,kf=/[+-]?\d{6}/,Ct=/\d\d?/,sk=/\d\d\d\d?/,ik=/\d\d\d\d\d\d?/,Cf=/\d{1,3}/,jv=/\d{1,4}/,Ef=/[+-]?\d{1,6}/,ka=/\d+/,jf=/[+-]?\d+/,eL=/Z|[+-]\d\d:?\d\d/gi,Tf=/Z|[+-]\d\d(?::?\d\d)?/gi,tL=/[+-]?\d+(\.\d{1,3})?/,bc=/[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,Ca=/^[1-9]\d?/,Tv=/^([1-9]\d|\d)/,wd;wd={};function _e(e,t,r){wd[e]=Kn(t)?t:function(n,s){return n&&r?r:t}}function rL(e,t){return at(wd,e)?wd[e](t._strict,t._locale):new RegExp(nL(e))}function nL(e){return ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function ps(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 cm={};function vt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ks(t)&&(n=function(i,o){o[t]=rt(i)}),s=e.length,r=0;r<s;r++)cm[e[r]]=n}function Sc(e,t){vt(e,function(r,n,s,i){s._w=s._w||{},t(r,s._w,s,i)})}function sL(e,t,r){t!=null&&at(cm,e)&&cm[e](t,r._a,r,e)}function Nf(e){return e%4===0&&e%100!==0||e%400===0}var lr=0,cs=1,In=2,Gt=3,vn=4,us=5,Vi=6,iL=7,oL=8;Ie("Y",0,0,function(){var e=this.year();return e<=9999?$n(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",jf);_e("YY",Ct,Br);_e("YYYY",jv,Ev);_e("YYYYY",Ef,kf);_e("YYYYYY",Ef,kf);vt(["YYYYY","YYYYYY"],lr);vt("YYYY",function(e,t){t[lr]=e.length===2?ye.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[lr]=ye.parseTwoDigitYear(e)});vt("Y",function(e,t){t[lr]=parseInt(e,10)});function dl(e){return Nf(e)?366:365}ye.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var ok=Ea("FullYear",!0);function aL(){return Nf(this.year())}function Ea(e,t){return function(r){return r!=null?(ak(this,e,r),ye.updateOffset(this,t),this):Vl(this,e)}}function Vl(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 ak(e,t,r){var n,s,i,o,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}i=r,o=e.month(),a=e.date(),a=a===29&&o===1&&!Nf(i)?28:a,s?n.setUTCFullYear(i,o,a):n.setFullYear(i,o,a)}}function lL(e){return e=ln(e),Kn(this[e])?this[e]():this}function cL(e,t){if(typeof e=="object"){e=Cv(e);var r=JI(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=ln(e),Kn(this[e]))return this[e](t);return this}function uL(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 Nv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=uL(t,12);return e+=(t-r)/12,r===1?Nf(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,Ca);_e("MM",Ct,Br);_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[cs]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[cs]=s:Ke(r).invalidMonth=e});var dL="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),lk="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ck=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fL=bc,hL=bc;function pL(e,t){return e?En(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ck).test(t)?"format":"standalone"][e.month()]:En(this._months)?this._months:this._months.standalone}function mL(e,t){return e?En(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ck.test(t)?"format":"standalone"][e.month()]:En(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function gL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=Zn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(s=zt.call(this._shortMonthsParse,o),s!==-1?s:null):(s=zt.call(this._longMonthsParse,o),s!==-1?s:null):t==="MMM"?(s=zt.call(this._shortMonthsParse,o),s!==-1?s:(s=zt.call(this._longMonthsParse,o),s!==-1?s:null)):(s=zt.call(this._longMonthsParse,o),s!==-1?s:(s=zt.call(this._shortMonthsParse,o),s!==-1?s:null))}function vL(e,t,r){var n,s,i;if(this._monthsParseExact)return gL.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Zn([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]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.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 uk(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),!ks(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Nv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function dk(e){return e!=null?(uk(this,e),ye.updateOffset(this,!0),this):Vl(this,"Month")}function yL(){return Nv(this.year(),this.month())}function xL(e){return this._monthsParseExact?(at(this,"_monthsRegex")||fk.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(at(this,"_monthsShortRegex")||(this._monthsShortRegex=fL),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function wL(e){return this._monthsParseExact?(at(this,"_monthsRegex")||fk.call(this),e?this._monthsStrictRegex:this._monthsRegex):(at(this,"_monthsRegex")||(this._monthsRegex=hL),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function fk(){function e(l,u){return u.length-l.length}var t=[],r=[],n=[],s,i,o,a;for(s=0;s<12;s++)i=Zn([2e3,s]),o=ps(this.monthsShort(i,"")),a=ps(this.months(i,"")),t.push(o),r.push(a),n.push(a),n.push(o);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 _L(e,t,r,n,s,i,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,i,o),a}function $l(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 _d(e,t,r){var n=7+t-r,s=(7+$l(e,0,n).getUTCDay()-t)%7;return-s+n-1}function hk(e,t,r,n,s){var i=(7+r-n)%7,o=_d(e,n,s),a=1+7*(t-1)+i+o,l,u;return a<=0?(l=e-1,u=dl(l)+a):a>dl(e)?(l=e+1,u=a-dl(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Wl(e,t,r){var n=_d(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+ms(o,t,r)):s>ms(e.year(),t,r)?(i=s-ms(e.year(),t,r),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ms(e,t,r){var n=_d(e,t,r),s=_d(e+1,t,r);return(dl(e)-n+s)/7}Ie("w",["ww",2],"wo","week");Ie("W",["WW",2],"Wo","isoWeek");_e("w",Ct,Ca);_e("ww",Ct,Br);_e("W",Ct,Ca);_e("WW",Ct,Br);Sc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function bL(e){return Wl(e,this._week.dow,this._week.doy).week}var SL={dow:0,doy:6};function kL(){return this._week.dow}function CL(){return this._week.doy}function EL(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function jL(e){var t=Wl(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)});Sc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ke(r).invalidWeekday=e});Sc(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function TL(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function NL(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var RL="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),pk="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),PL="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),AL=bc,DL=bc,OL=bc;function ML(e,t){var r=En(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Rv(r,this._week.dow):e?r[e.day()]:r}function IL(e){return e===!0?Rv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function LL(e){return e===!0?Rv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function FL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1||(s=zt.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function zL(e,t,r){var n,s,i;if(this._weekdaysParseExact)return FL.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Zn([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]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.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 UL(e){if(!this.isValid())return e!=null?this:NaN;var t=Vl(this,"Day");return e!=null?(e=TL(e,this.localeData()),this.add(e-t,"d")):t}function VL(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 $L(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=NL(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function WL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||Pv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(at(this,"_weekdaysRegex")||(this._weekdaysRegex=AL),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function BL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||Pv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(at(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=DL),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function HL(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||Pv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(at(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=OL),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Pv(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],s=[],i,o,a,l,u;for(i=0;i<7;i++)o=Zn([2e3,1]).day(i),a=ps(this.weekdaysMin(o,"")),l=ps(this.weekdaysShort(o,"")),u=ps(this.weekdays(o,"")),t.push(a),r.push(l),n.push(u),s.push(a),s.push(l),s.push(u);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Av(){return this.hours()%12||12}function YL(){return this.hours()||24}Ie("H",["HH",2],0,"hour");Ie("h",["hh",2],0,Av);Ie("k",["kk",2],0,YL);Ie("hmm",0,0,function(){return""+Av.apply(this)+$n(this.minutes(),2)});Ie("hmmss",0,0,function(){return""+Av.apply(this)+$n(this.minutes(),2)+$n(this.seconds(),2)});Ie("Hmm",0,0,function(){return""+this.hours()+$n(this.minutes(),2)});Ie("Hmmss",0,0,function(){return""+this.hours()+$n(this.minutes(),2)+$n(this.seconds(),2)});function mk(e,t){Ie(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}mk("a",!0);mk("A",!1);function gk(e,t){return t._meridiemParse}_e("a",gk);_e("A",gk);_e("H",Ct,Tv);_e("h",Ct,Ca);_e("k",Ct,Ca);_e("HH",Ct,Br);_e("hh",Ct,Br);_e("kk",Ct,Br);_e("hmm",sk);_e("hmmss",ik);_e("Hmm",sk);_e("Hmmss",ik);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),Ke(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)),Ke(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[us]=rt(e.substr(s)),Ke(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[us]=rt(e.substr(s))});function ZL(e){return(e+"").toLowerCase().charAt(0)==="p"}var KL=/[ap]\.?m?\.?/i,GL=Ea("Hours",!0);function qL(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var vk={calendar:FI,longDateFormat:$I,invalidDate:BI,ordinal:YI,dayOfMonthOrdinalParse:ZI,relativeTime:GI,months:dL,monthsShort:lk,week:SL,weekdays:RL,weekdaysMin:PL,weekdaysShort:pk,meridiemParse:KL},jt={},Wa={},Bl;function XL(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 F0(e){return e&&e.toLowerCase().replace("_","-")}function QL(e){for(var t=0,r,n,s,i;t<e.length;){for(i=F0(e[t]).split("-"),r=i.length,n=F0(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Rf(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&XL(i,n)>=r-1)break;r--}t++}return Bl}function JL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Rf(e){var t=null,r;if(jt[e]===void 0&&typeof zu<"u"&&zu&&zu.exports&&JL(e))try{t=Bl._abbr,r=require,r("./locale/"+e),ci(t)}catch{jt[e]=null}return jt[e]}function ci(e,t){var r;return e&&(br(t)?r=Rs(e):r=Dv(e,t),r?Bl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Bl._abbr}function Dv(e,t){if(t!==null){var r,n=vk;if(t.abbr=e,jt[e]!=null)ek("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=jt[e]._config;else if(t.parentLocale!=null)if(jt[t.parentLocale]!=null)n=jt[t.parentLocale]._config;else if(r=Rf(t.parentLocale),r!=null)n=r._config;else return Wa[t.parentLocale]||(Wa[t.parentLocale]=[]),Wa[t.parentLocale].push({name:e,config:t}),null;return jt[e]=new Sv(am(n,t)),Wa[e]&&Wa[e].forEach(function(s){Dv(s.name,s.config)}),ci(e),jt[e]}else return delete jt[e],null}function eF(e,t){if(t!=null){var r,n,s=vk;jt[e]!=null&&jt[e].parentLocale!=null?jt[e].set(am(jt[e]._config,t)):(n=Rf(e),n!=null&&(s=n._config),t=am(s,t),n==null&&(t.abbr=e),r=new Sv(t),r.parentLocale=jt[e],jt[e]=r),ci(e)}else jt[e]!=null&&(jt[e].parentLocale!=null?(jt[e]=jt[e].parentLocale,e===ci()&&ci(e)):jt[e]!=null&&delete jt[e]);return jt[e]}function Rs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Bl;if(!En(e)){if(t=Rf(e),t)return t;e=[e]}return QL(e)}function tF(){return lm(jt)}function Ov(e){var t,r=e._a;return r&&Ke(e).overflow===-2&&(t=r[cs]<0||r[cs]>11?cs:r[In]<1||r[In]>Nv(r[lr],r[cs])?In:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[vn]!==0||r[us]!==0||r[Vi]!==0)?Gt:r[vn]<0||r[vn]>59?vn:r[us]<0||r[us]>59?us:r[Vi]<0||r[Vi]>999?Vi:-1,Ke(e)._overflowDayOfYear&&(t<lr||t>In)&&(t=In),Ke(e)._overflowWeeks&&t===-1&&(t=iL),Ke(e)._overflowWeekday&&t===-1&&(t=oL),Ke(e).overflow=t),e}var rF=/^\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)?)?$/,nF=/^\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)?)?$/,sF=/Z|[+-]\d\d(?::?\d\d)?/,fu=[["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]],Bh=[["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/]],iF=/^\/?Date\((-?\d+)/i,oF=/^(?:(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}))$/,aF={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 yk(e){var t,r,n=e._i,s=rF.exec(n)||nF.exec(n),i,o,a,l,u=fu.length,d=Bh.length;if(s){for(Ke(e).iso=!0,t=0,r=u;t<r;t++)if(fu[t][1].exec(s[1])){o=fu[t][0],i=fu[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(s[3]){for(t=0,r=d;t<r;t++)if(Bh[t][1].exec(s[3])){a=(s[2]||" ")+Bh[t][0];break}if(a==null){e._isValid=!1;return}}if(!i&&a!=null){e._isValid=!1;return}if(s[4])if(sF.exec(s[4]))l="Z";else{e._isValid=!1;return}e._f=o+(a||"")+(l||""),Iv(e)}else e._isValid=!1}function lF(e,t,r,n,s,i){var o=[cF(e),lk.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return i&&o.push(parseInt(i,10)),o}function cF(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function uF(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function dF(e,t,r){if(e){var n=pk.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Ke(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function fF(e,t,r){if(e)return aF[e];if(t)return 0;var n=parseInt(r,10),s=n%100,i=(n-s)/100;return i*60+s}function xk(e){var t=oF.exec(uF(e._i)),r;if(t){if(r=lF(t[4],t[3],t[2],t[5],t[6],t[7]),!dF(t[1],r,e))return;e._a=r,e._tzm=fF(t[8],t[9],t[10]),e._d=$l.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ke(e).rfc2822=!0}else e._isValid=!1}function hF(e){var t=iF.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(yk(e),e._isValid===!1)delete e._isValid;else return;if(xk(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ye.createFromInputFallback(e)}ye.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 xo(e,t,r){return e??t??r}function pF(e){var t=new Date(ye.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Mv(e){var t,r,n=[],s,i,o;if(!e._d){for(s=pF(e),e._w&&e._a[In]==null&&e._a[cs]==null&&mF(e),e._dayOfYear!=null&&(o=xo(e._a[lr],s[lr]),(e._dayOfYear>dl(o)||e._dayOfYear===0)&&(Ke(e)._overflowDayOfYear=!0),r=$l(o,0,e._dayOfYear),e._a[cs]=r.getUTCMonth(),e._a[In]=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[us]===0&&e._a[Vi]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?$l:_L).apply(null,n),i=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!==i&&(Ke(e).weekdayMismatch=!0)}}function mF(e){var t,r,n,s,i,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,r=xo(t.GG,e._a[lr],Wl(kt(),1,4).year),n=xo(t.W,1),s=xo(t.E,1),(s<1||s>7)&&(l=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=Wl(kt(),i,o),r=xo(t.gg,e._a[lr],u.year),n=xo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(l=!0)):s=i),n<1||n>ms(r,i,o)?Ke(e)._overflowWeeks=!0:l!=null?Ke(e)._overflowWeekday=!0:(a=hk(r,n,s,i,o),e._a[lr]=a.year,e._dayOfYear=a.dayOfYear)}ye.ISO_8601=function(){};ye.RFC_2822=function(){};function Iv(e){if(e._f===ye.ISO_8601){yk(e);return}if(e._f===ye.RFC_2822){xk(e);return}e._a=[],Ke(e).empty=!0;var t=""+e._i,r,n,s,i,o,a=t.length,l=0,u,d;for(s=tk(e._f,e._locale).match(kv)||[],d=s.length,r=0;r<d;r++)i=s[r],n=(t.match(rL(i,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&Ke(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Go[i]?(n?Ke(e).empty=!1:Ke(e).unusedTokens.push(i),sL(i,n,e)):e._strict&&!n&&Ke(e).unusedTokens.push(i);Ke(e).charsLeftOver=a-l,t.length>0&&Ke(e).unusedInput.push(t),e._a[Gt]<=12&&Ke(e).bigHour===!0&&e._a[Gt]>0&&(Ke(e).bigHour=void 0),Ke(e).parsedDateParts=e._a.slice(0),Ke(e).meridiem=e._meridiem,e._a[Gt]=gF(e._locale,e._a[Gt],e._meridiem),u=Ke(e).era,u!==null&&(e._a[lr]=e._locale.erasConvertYear(u,e._a[lr])),Mv(e),Ov(e)}function gF(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 vF(e){var t,r,n,s,i,o,a=!1,l=e._f.length;if(l===0){Ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<l;s++)i=0,o=!1,t=bv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],Iv(t),_v(t)&&(o=!0),i+=Ke(t).charsLeftOver,i+=Ke(t).unusedTokens.length*10,Ke(t).score=i,a?i<n&&(n=i,r=t):(n==null||i<n||o)&&(n=i,r=t,o&&(a=!0));Js(e,r||t)}function yF(e){if(!e._d){var t=Cv(e._i),r=t.day===void 0?t.date:t.day;e._a=QS([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Mv(e)}}function xF(e){var t=new _c(Ov(wk(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function wk(e){var t=e._i,r=e._f;return e._locale=e._locale||Rs(e._l),t===null||r===void 0&&t===""?Sf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),jn(t)?new _c(Ov(t)):(wc(t)?e._d=t:En(r)?vF(e):r?Iv(e):wF(e),_v(e)||(e._d=null),e))}function wF(e){var t=e._i;br(t)?e._d=new Date(ye.now()):wc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?hF(e):En(t)?(e._a=QS(t.slice(0),function(r){return parseInt(r,10)}),Mv(e)):Bi(t)?yF(e):ks(t)?e._d=new Date(t):ye.createFromInputFallback(e)}function _k(e,t,r,n,s){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Bi(e)&&wv(e)||En(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=r,i._i=e,i._f=t,i._strict=n,xF(i)}function kt(e,t,r,n){return _k(e,t,r,n,!1)}var _F=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:Sf()}),bF=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:Sf()});function bk(e,t){var r,n;if(t.length===1&&En(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 SF(){var e=[].slice.call(arguments,0);return bk("isBefore",e)}function kF(){var e=[].slice.call(arguments,0);return bk("isAfter",e)}var CF=function(){return Date.now?Date.now():+new Date},Ba=["year","quarter","month","week","day","hour","minute","second","millisecond"];function EF(e){var t,r=!1,n,s=Ba.length;for(t in e)if(at(e,t)&&!(zt.call(Ba,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Ba[n]]){if(r)return!1;parseFloat(e[Ba[n]])!==rt(e[Ba[n]])&&(r=!0)}return!0}function jF(){return this._isValid}function TF(){return Rn(NaN)}function Pf(e){var t=Cv(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=EF(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+o+i*7,this._months=+s+n*3+r*12,this._data={},this._locale=Rs(),this._bubble()}function Ou(e){return e instanceof Pf}function um(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function NF(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,o;for(o=0;o<n;o++)rt(e[o])!==rt(t[o])&&i++;return i+s}function Sk(e,t){Ie(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+$n(~~(r/60),2)+t+$n(~~r%60,2)})}Sk("Z",":");Sk("ZZ","");_e("Z",Tf);_e("ZZ",Tf);vt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Lv(Tf,e)});var RF=/([\+\-]|\d\d)/gi;function Lv(e,t){var r=(t||"").match(e),n,s,i;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(RF)||["-",0,0],i=+(s[1]*60)+rt(s[2]),i===0?0:s[0]==="+"?i:-i)}function Fv(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(jn(e)||wc(e)?e.valueOf():kt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ye.updateOffset(r,!1),r):kt(e).local()}function dm(e){return-Math.round(e._d.getTimezoneOffset())}ye.updateOffset=function(){};function PF(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=Lv(Tf,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=dm(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Ek(this,Rn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ye.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:dm(this)}function AF(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function DF(e){return this.utcOffset(0,e)}function OF(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(dm(this),"m")),this}function MF(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Lv(eL,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function IF(e){return this.isValid()?(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function LF(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function FF(){if(!br(this._isDSTShifted))return this._isDSTShifted;var e={},t;return bv(e,this),e=wk(e),e._a?(t=e._isUTC?Zn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&NF(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function zF(){return this.isValid()?!this._isUTC:!1}function UF(){return this.isValid()?this._isUTC:!1}function kk(){return this.isValid()?this._isUTC&&this._offset===0:!1}var VF=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$F=/^(-|\+)?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,i,o;return Ou(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ks(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=VF.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[In])*s,h:rt(n[Gt])*s,m:rt(n[vn])*s,s:rt(n[us])*s,ms:rt(um(n[Vi]*1e3))*s}):(n=$F.exec(e))?(s=n[1]==="-"?-1:1,r={y:Pi(n[2],s),M:Pi(n[3],s),w:Pi(n[4],s),d:Pi(n[5],s),h:Pi(n[6],s),m:Pi(n[7],s),s:Pi(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=WF(kt(r.from),kt(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Pf(r),Ou(e)&&at(e,"_locale")&&(i._locale=e._locale),Ou(e)&&at(e,"_isValid")&&(i._isValid=e._isValid),i}Rn.fn=Pf.prototype;Rn.invalid=TF;function Pi(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function z0(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 WF(e,t){var r;return e.isValid()&&t.isValid()?(t=Fv(t,e),e.isBefore(t)?r=z0(e,t):(r=z0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ck(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(ek(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."),i=r,r=n,n=i),s=Rn(r,n),Ek(this,s,e),this}}function Ek(e,t,r,n){var s=t._milliseconds,i=um(t._days),o=um(t._months);e.isValid()&&(n=n??!0,o&&uk(e,Vl(e,"Month")+o*r),i&&ak(e,"Date",Vl(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ye.updateOffset(e,i||o))}var BF=Ck(1,"add"),HF=Ck(-1,"subtract");function jk(e){return typeof e=="string"||e instanceof String}function YF(e){return jn(e)||wc(e)||jk(e)||ks(e)||KF(e)||ZF(e)||e===null||e===void 0}function ZF(e){var t=Bi(e)&&!wv(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,i,o=n.length;for(s=0;s<o;s+=1)i=n[s],r=r||at(e,i);return t&&r}function KF(e){var t=En(e),r=!1;return t&&(r=e.filter(function(n){return!ks(n)&&jk(e)}).length===0),t&&r}function GF(e){var t=Bi(e)&&!wv(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<n.length;s+=1)i=n[s],r=r||at(e,i);return t&&r}function qF(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 XF(e,t){arguments.length===1&&(arguments[0]?YF(arguments[0])?(e=arguments[0],t=void 0):GF(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||kt(),n=Fv(r,this).startOf("day"),s=ye.calendarFormat(this,n)||"sameElse",i=t&&(Kn(t[s])?t[s].call(this,r):t[s]);return this.format(i||this.localeData().calendar(s,this,kt(r)))}function QF(){return new _c(this)}function JF(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 e4(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 t4(e,t,r,n){var s=jn(e)?e:kt(e),i=jn(t)?t:kt(t);return this.isValid()&&s.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function r4(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 n4(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function s4(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function i4(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(n=Fv(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=ln(t),t){case"year":i=Mu(this,n)/12;break;case"month":i=Mu(this,n);break;case"quarter":i=Mu(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:Jr(i)}function Mu(e,t){if(e.date()<t.date())return-Mu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,i;return t-n<0?(s=e.clone().add(r-1,"months"),i=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),i=(t-n)/(s-n)),-(r+i)||0}ye.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ye.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function o4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function a4(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Du(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Du(r,"Z")):Du(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function l4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;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",i=t+'[")]',this.format(r+n+s+i)}function c4(e){e||(e=this.isUtc()?ye.defaultFormatUtc:ye.defaultFormat);var t=Du(this,e);return this.localeData().postformat(t)}function u4(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 d4(e){return this.from(kt(),e)}function f4(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 h4(e){return this.to(kt(),e)}function Tk(e){var t;return e===void 0?this._locale._abbr:(t=Rs(e),t!=null&&(this._locale=t),this)}var Nk=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 Rk(){return this._locale}var bd=1e3,qo=60*bd,Sd=60*qo,Pk=(365*400+97)*24*Sd;function Xo(e,t){return(e%t+t)%t}function Ak(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Pk:new Date(e,t,r).valueOf()}function Dk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Pk:Date.UTC(e,t,r)}function p4(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Dk:Ak,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-=Xo(t+(this._isUTC?0:this.utcOffset()*qo),Sd);break;case"minute":t=this._d.valueOf(),t-=Xo(t,qo);break;case"second":t=this._d.valueOf(),t-=Xo(t,bd);break}return this._d.setTime(t),ye.updateOffset(this,!0),this}function m4(e){var t,r;if(e=ln(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Dk:Ak,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+=Sd-Xo(t+(this._isUTC?0:this.utcOffset()*qo),Sd)-1;break;case"minute":t=this._d.valueOf(),t+=qo-Xo(t,qo)-1;break;case"second":t=this._d.valueOf(),t+=bd-Xo(t,bd)-1;break}return this._d.setTime(t),ye.updateOffset(this,!0),this}function g4(){return this._d.valueOf()-(this._offset||0)*6e4}function v4(){return Math.floor(this.valueOf()/1e3)}function y4(){return new Date(this.valueOf())}function x4(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function w4(){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 _4(){return this.isValid()?this.toISOString():null}function b4(){return _v(this)}function S4(){return Js({},Ke(this))}function k4(){return Ke(this).overflow}function C4(){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",zv);_e("NN",zv);_e("NNN",zv);_e("NNNN",I4);_e("NNNNN",L4);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ke(r).era=s:Ke(r).invalidEra=e});_e("y",ka);_e("yy",ka);_e("yyy",ka);_e("yyyy",ka);_e("yo",F4);vt(["y","yy","yyy","yyyy"],lr);vt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[lr]=r._locale.eraYearOrdinalParse(e,s):t[lr]=parseInt(e,10)});function E4(e,t){var r,n,s,i=this._eras||Rs("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":s=ye(i[r].since).startOf("day"),i[r].since=s.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":s=ye(i[r].until).startOf("day").valueOf(),i[r].until=s.valueOf();break}}return i}function j4(e,t,r){var n,s,i=this.eras(),o,a,l;for(e=e.toUpperCase(),n=0,s=i.length;n<s;++n)if(o=i[n].name.toUpperCase(),a=i[n].abbr.toUpperCase(),l=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return i[n];break;case"NNNN":if(o===e)return i[n];break;case"NNNNN":if(l===e)return i[n];break}else if([o,a,l].indexOf(e)>=0)return i[n]}function T4(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ye(e.since).year():ye(e.since).year()+(t-e.offset)*r}function N4(){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 R4(){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 P4(){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 A4(){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()-ye(s[e].since).year())*r+s[e].offset;return this.year()}function D4(e){return at(this,"_erasNameRegex")||Uv.call(this),e?this._erasNameRegex:this._erasRegex}function O4(e){return at(this,"_erasAbbrRegex")||Uv.call(this),e?this._erasAbbrRegex:this._erasRegex}function M4(e){return at(this,"_erasNarrowRegex")||Uv.call(this),e?this._erasNarrowRegex:this._erasRegex}function zv(e,t){return t.erasAbbrRegex(e)}function I4(e,t){return t.erasNameRegex(e)}function L4(e,t){return t.erasNarrowRegex(e)}function F4(e,t){return t._eraYearOrdinalRegex||ka}function Uv(){var e=[],t=[],r=[],n=[],s,i,o,a,l,u=this.eras();for(s=0,i=u.length;s<i;++s)o=ps(u[s].name),a=ps(u[s].abbr),l=ps(u[s].narrow),t.push(o),e.push(a),r.push(l),n.push(o),n.push(a),n.push(l);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Ie(0,["gg",2],0,function(){return this.weekYear()%100});Ie(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Af(e,t){Ie(0,[e,e.length],0,t)}Af("gggg","weekYear");Af("ggggg","weekYear");Af("GGGG","isoWeekYear");Af("GGGGG","isoWeekYear");_e("G",jf);_e("g",jf);_e("GG",Ct,Br);_e("gg",Ct,Br);_e("GGGG",jv,Ev);_e("gggg",jv,Ev);_e("GGGGG",Ef,kf);_e("ggggg",Ef,kf);Sc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=rt(e)});Sc(["gg","GG"],function(e,t,r,n){t[n]=ye.parseTwoDigitYear(e)});function z4(e){return Ok.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function U4(e){return Ok.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function V4(){return ms(this.year(),1,4)}function $4(){return ms(this.isoWeekYear(),1,4)}function W4(){var e=this.localeData()._week;return ms(this.year(),e.dow,e.doy)}function B4(){var e=this.localeData()._week;return ms(this.weekYear(),e.dow,e.doy)}function Ok(e,t,r,n,s){var i;return e==null?Wl(this,n,s).year:(i=ms(e,n,s),t>i&&(t=i),H4.call(this,e,t,r,n,s))}function H4(e,t,r,n,s){var i=hk(e,t,r,n,s),o=$l(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Ie("Q",0,"Qo","quarter");_e("Q",rk);vt("Q",function(e,t){t[cs]=(rt(e)-1)*3});function Y4(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,Ca);_e("DD",Ct,Br);_e("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],In);vt("Do",function(e,t){t[In]=rt(e.match(Ct)[0])});var Mk=Ea("Date",!0);Ie("DDD",["DDDD",3],"DDDo","dayOfYear");_e("DDD",Cf);_e("DDDD",nk);vt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function Z4(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,Tv);_e("mm",Ct,Br);vt(["m","mm"],vn);var K4=Ea("Minutes",!1);Ie("s",["ss",2],0,"second");_e("s",Ct,Tv);_e("ss",Ct,Br);vt(["s","ss"],us);var G4=Ea("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",Cf,rk);_e("SS",Cf,Br);_e("SSS",Cf,nk);var ei,Ik;for(ei="SSSS";ei.length<=9;ei+="S")_e(ei,ka);function q4(e,t){t[Vi]=rt(("0."+e)*1e3)}for(ei="S";ei.length<=9;ei+="S")vt(ei,q4);Ik=Ea("Milliseconds",!1);Ie("z",0,0,"zoneAbbr");Ie("zz",0,0,"zoneName");function X4(){return this._isUTC?"UTC":""}function Q4(){return this._isUTC?"Coordinated Universal Time":""}var ae=_c.prototype;ae.add=BF;ae.calendar=XF;ae.clone=QF;ae.diff=i4;ae.endOf=m4;ae.format=c4;ae.from=u4;ae.fromNow=d4;ae.to=f4;ae.toNow=h4;ae.get=lL;ae.invalidAt=k4;ae.isAfter=JF;ae.isBefore=e4;ae.isBetween=t4;ae.isSame=r4;ae.isSameOrAfter=n4;ae.isSameOrBefore=s4;ae.isValid=b4;ae.lang=Nk;ae.locale=Tk;ae.localeData=Rk;ae.max=bF;ae.min=_F;ae.parsingFlags=S4;ae.set=cL;ae.startOf=p4;ae.subtract=HF;ae.toArray=x4;ae.toObject=w4;ae.toDate=y4;ae.toISOString=a4;ae.inspect=l4;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=_4;ae.toString=o4;ae.unix=v4;ae.valueOf=g4;ae.creationData=C4;ae.eraName=N4;ae.eraNarrow=R4;ae.eraAbbr=P4;ae.eraYear=A4;ae.year=ok;ae.isLeapYear=aL;ae.weekYear=z4;ae.isoWeekYear=U4;ae.quarter=ae.quarters=Y4;ae.month=dk;ae.daysInMonth=yL;ae.week=ae.weeks=EL;ae.isoWeek=ae.isoWeeks=jL;ae.weeksInYear=W4;ae.weeksInWeekYear=B4;ae.isoWeeksInYear=V4;ae.isoWeeksInISOWeekYear=$4;ae.date=Mk;ae.day=ae.days=UL;ae.weekday=VL;ae.isoWeekday=$L;ae.dayOfYear=Z4;ae.hour=ae.hours=GL;ae.minute=ae.minutes=K4;ae.second=ae.seconds=G4;ae.millisecond=ae.milliseconds=Ik;ae.utcOffset=PF;ae.utc=DF;ae.local=OF;ae.parseZone=MF;ae.hasAlignedHourOffset=IF;ae.isDST=LF;ae.isLocal=zF;ae.isUtcOffset=UF;ae.isUtc=kk;ae.isUTC=kk;ae.zoneAbbr=X4;ae.zoneName=Q4;ae.dates=an("dates accessor is deprecated. Use date instead.",Mk);ae.months=an("months accessor is deprecated. Use month instead",dk);ae.years=an("years accessor is deprecated. Use year instead",ok);ae.zone=an("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",AF);ae.isDSTShifted=an("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",FF);function J4(e){return kt(e*1e3)}function e3(){return kt.apply(null,arguments).parseZone()}function Lk(e){return e}var lt=Sv.prototype;lt.calendar=zI;lt.longDateFormat=WI;lt.invalidDate=HI;lt.ordinal=KI;lt.preparse=Lk;lt.postformat=Lk;lt.relativeTime=qI;lt.pastFuture=XI;lt.set=LI;lt.eras=E4;lt.erasParse=j4;lt.erasConvertYear=T4;lt.erasAbbrRegex=O4;lt.erasNameRegex=D4;lt.erasNarrowRegex=M4;lt.months=pL;lt.monthsShort=mL;lt.monthsParse=vL;lt.monthsRegex=wL;lt.monthsShortRegex=xL;lt.week=bL;lt.firstDayOfYear=CL;lt.firstDayOfWeek=kL;lt.weekdays=ML;lt.weekdaysMin=LL;lt.weekdaysShort=IL;lt.weekdaysParse=zL;lt.weekdaysRegex=WL;lt.weekdaysShortRegex=BL;lt.weekdaysMinRegex=HL;lt.isPM=ZL;lt.meridiem=qL;function kd(e,t,r,n){var s=Rs(),i=Zn().set(n,t);return s[r](i,e)}function Fk(e,t,r){if(ks(e)&&(t=e,e=void 0),e=e||"",t!=null)return kd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=kd(e,n,r,"month");return s}function Vv(e,t,r,n){typeof e=="boolean"?(ks(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ks(t)&&(r=t,t=void 0),t=t||"");var s=Rs(),i=e?s._week.dow:0,o,a=[];if(r!=null)return kd(t,(r+i)%7,n,"day");for(o=0;o<7;o++)a[o]=kd(t,(o+i)%7,n,"day");return a}function t3(e,t){return Fk(e,t,"months")}function r3(e,t){return Fk(e,t,"monthsShort")}function n3(e,t,r){return Vv(e,t,r,"weekdays")}function s3(e,t,r){return Vv(e,t,r,"weekdaysShort")}function i3(e,t,r){return Vv(e,t,r,"weekdaysMin")}ci("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}});ye.lang=an("moment.lang is deprecated. Use moment.locale instead.",ci);ye.langData=an("moment.langData is deprecated. Use moment.localeData instead.",Rs);var es=Math.abs;function o3(){var e=this._data;return this._milliseconds=es(this._milliseconds),this._days=es(this._days),this._months=es(this._months),e.milliseconds=es(e.milliseconds),e.seconds=es(e.seconds),e.minutes=es(e.minutes),e.hours=es(e.hours),e.months=es(e.months),e.years=es(e.years),this}function zk(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 a3(e,t){return zk(this,e,t,1)}function l3(e,t){return zk(this,e,t,-1)}function U0(e){return e<0?Math.floor(e):Math.ceil(e)}function c3(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,o,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=U0(fm(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Jr(e/1e3),n.seconds=s%60,i=Jr(s/60),n.minutes=i%60,o=Jr(i/60),n.hours=o%24,t+=Jr(o/24),l=Jr(Uk(t)),r+=l,t-=U0(fm(l)),a=Jr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Uk(e){return e*4800/146097}function fm(e){return e*146097/4800}function u3(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+Uk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(fm(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 Ps(e){return function(){return this.as(e)}}var Vk=Ps("ms"),d3=Ps("s"),f3=Ps("m"),h3=Ps("h"),p3=Ps("d"),m3=Ps("w"),g3=Ps("M"),v3=Ps("Q"),y3=Ps("y"),x3=Vk;function w3(){return Rn(this)}function _3(e){return e=ln(e),this.isValid()?this[e+"s"]():NaN}function co(e){return function(){return this.isValid()?this._data[e]:NaN}}var b3=co("milliseconds"),S3=co("seconds"),k3=co("minutes"),C3=co("hours"),E3=co("days"),j3=co("months"),T3=co("years");function N3(){return Jr(this.days()/7)}var ss=Math.round,Oo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function R3(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function P3(e,t,r,n){var s=Rn(e).abs(),i=ss(s.as("s")),o=ss(s.as("m")),a=ss(s.as("h")),l=ss(s.as("d")),u=ss(s.as("M")),d=ss(s.as("w")),f=ss(s.as("y")),m=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||o<=1&&["m"]||o<r.m&&["mm",o]||a<=1&&["h"]||a<r.h&&["hh",a]||l<=1&&["d"]||l<r.d&&["dd",l];return r.w!=null&&(m=m||d<=1&&["w"]||d<r.w&&["ww",d]),m=m||u<=1&&["M"]||u<r.M&&["MM",u]||f<=1&&["y"]||["yy",f],m[2]=t,m[3]=+e>0,m[4]=n,R3.apply(null,m)}function A3(e){return e===void 0?ss:typeof e=="function"?(ss=e,!0):!1}function D3(e,t){return Oo[e]===void 0?!1:t===void 0?Oo[e]:(Oo[e]=t,e==="s"&&(Oo.ss=t-1),!0)}function O3(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Oo,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Oo,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=P3(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Hh=Math.abs;function vo(e){return(e>0)-(e<0)||+e}function Df(){if(!this.isValid())return this.localeData().invalidDate();var e=Hh(this._milliseconds)/1e3,t=Hh(this._days),r=Hh(this._months),n,s,i,o,a=this.asSeconds(),l,u,d,f;return a?(n=Jr(e/60),s=Jr(n/60),e%=60,n%=60,i=Jr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=vo(this._months)!==vo(a)?"-":"",d=vo(this._days)!==vo(a)?"-":"",f=vo(this._milliseconds)!==vo(a)?"-":"",l+"P"+(i?u+i+"Y":"")+(r?u+r+"M":"")+(t?d+t+"D":"")+(s||n||e?"T":"")+(s?f+s+"H":"")+(n?f+n+"M":"")+(e?f+o+"S":"")):"P0D"}var st=Pf.prototype;st.isValid=jF;st.abs=o3;st.add=a3;st.subtract=l3;st.as=u3;st.asMilliseconds=Vk;st.asSeconds=d3;st.asMinutes=f3;st.asHours=h3;st.asDays=p3;st.asWeeks=m3;st.asMonths=g3;st.asQuarters=v3;st.asYears=y3;st.valueOf=x3;st._bubble=c3;st.clone=w3;st.get=_3;st.milliseconds=b3;st.seconds=S3;st.minutes=k3;st.hours=C3;st.days=E3;st.weeks=N3;st.months=j3;st.years=T3;st.humanize=O3;st.toISOString=Df;st.toString=Df;st.toJSON=Df;st.locale=Tk;st.localeData=Rk;st.toIsoString=an("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Df);st.lang=Nk;Ie("X",0,0,"unix");Ie("x",0,0,"valueOf");_e("x",jf);_e("X",tL);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
ye.version="2.30.1";MI(kt);ye.fn=ae;ye.min=SF;ye.max=kF;ye.now=CF;ye.utc=Zn;ye.unix=J4;ye.months=t3;ye.isDate=wc;ye.locale=ci;ye.invalid=Sf;ye.duration=Rn;ye.isMoment=jn;ye.weekdays=n3;ye.parseZone=e3;ye.localeData=Rs;ye.isDuration=Ou;ye.monthsShort=r3;ye.weekdaysMin=i3;ye.defineLocale=Dv;ye.updateLocale=eF;ye.locales=tF;ye.weekdaysShort=s3;ye.normalizeUnits=ln;ye.relativeTimeRounding=A3;ye.relativeTimeThreshold=D3;ye.calendarFormat=qF;ye.prototype=ae;ye.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 M3=async()=>await ft().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Ci=async e=>e.id?await ft().collection("access").update(e.id,e):await ft().collection("access").create(e),I3=async e=>(e.deleted=ye.utc().format("YYYY-MM-DD HH:mm:ss"),await ft().collection("access").update(e.id,e)),V0=async()=>await ft().collection("access_groups").getFullList({sort:"-created",expand:"access"}),L3=async e=>{const t=ft();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)},F3=async e=>{const t=ft();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},$0=async e=>await ft().collection("access_groups").update(e.id,e),z3=(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}},U3=async()=>{try{return await ft().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},V3=async e=>{const t=ft();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},$k=y.createContext({}),Hr=()=>y.useContext($k),$3=({children:e})=>{const[t,r]=y.useReducer(z3,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const d=await M3();r({type:"SET_ACCESSES",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await U3();r({type:"SET_EMAILS",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await V0();r({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const n=y.useCallback(async()=>{const u=await V0();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),i=y.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),o=y.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),l=y.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return c.jsx($k.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:l,reloadAccessGroups:n},children:e&&e})},W3={theme:"system",setTheme:()=>null},Wk=y.createContext(W3);function B3({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,i]=y.useState(()=>localStorage.getItem(r)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(r,a),i(a)}};return c.jsx(Wk.Provider,{...n,value:o,children:e})}const H3=()=>{const e=y.useContext(Wk);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function Y3(){const{setTheme:e}=H3();return c.jsxs(CS,{children:[c.jsx(ES,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",children:[c.jsx(IP,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(OP,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(av,{align:"end",children:[c.jsx(Zo,{onClick:()=>e("light"),children:"浅色"}),c.jsx(Zo,{onClick:()=>e("dark"),children:"暗黑"}),c.jsx(Zo,{onClick:()=>e("system"),children:"系统"})]})]})}var Z3="Separator",W0="horizontal",K3=["horizontal","vertical"],Bk=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=W0,...s}=e,i=G3(n)?n:W0,a=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return c.jsx(Le.div,{"data-orientation":i,...a,...s,ref:t})});Bk.displayName=Z3;function G3(e){return K3.includes(e)}var Hk=Bk;const Yt=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>c.jsx(Hk,{ref:s,decorative:r,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Yt.displayName=Hk.displayName;const q3="Certimate v0.1.7",Yk=()=>c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[c.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[c.jsx(kP,{size:16}),c.jsx("div",{className:"ml-1",children:"文档"})]}),c.jsx(Yt,{orientation:"vertical",className:"mx-2"}),c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:q3})]})]});function X3(){const e=on(),t=Hn();if(!ft().authStore.isValid||!ft().authStore.isAdmin)return c.jsx(I1,{to:"/login"});const r=t.pathname,n=o=>(console.log(r),o==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{ft().authStore.clear(),e("/login")},i=()=>{e("/setting/password")};return c.jsx(c.Fragment,{children:c.jsx($3,{children:c.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[c.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:c.jsxs(hr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(hr,{to:"/",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[c.jsx(i0,{className:"h-4 w-4"}),"控制面板"]}),c.jsxs(hr,{to:"/domains",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[c.jsx(Gp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(hr,{to:"/access",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[c.jsx(o0,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(hr,{to:"/history",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[c.jsx(s0,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[c.jsxs(mv,{children:[c.jsx(gv,{asChild:!0,children:c.jsxs(Je,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(DP,{className:"h-5 w-5 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(bf,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(hr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(hr,{to:"/",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[c.jsx(i0,{className:"h-5 w-5"}),"控制面板"]}),c.jsxs(hr,{to:"/domains",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[c.jsx(Gp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(hr,{to:"/access",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[c.jsx(o0,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(hr,{to:"/history",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[c.jsx(s0,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsx(Y3,{}),c.jsxs(CS,{children:[c.jsx(ES,{asChild:!0,children:c.jsxs(Je,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(TP,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(av,{align:"end",children:[c.jsx(jS,{children:"账户"}),c.jsx(TS,{}),c.jsx(Zo,{onClick:i,children:"设置"}),c.jsx(Zo,{onClick:s,children:"退出"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(Ag,{}),c.jsx(Yk,{})]})]})]})})})}const $v=({phase:e,phaseSuccess:t})=>{let r=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Yt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},Zk=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:le("mx-auto flex w-full justify-center",e),...t});Zk.displayName="Pagination";const Kk=y.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,className:le("flex flex-row items-center gap-1",e),...t}));Kk.displayName="PaginationContent";const hm=y.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,className:le("",e),...t}));hm.displayName="PaginationItem";const Gk=({className:e,isActive:t,size:r="icon",...n})=>c.jsx("a",{"aria-current":t?"page":void 0,className:le(cf({variant:t?"outline":"ghost",size:r}),e),...n});Gk.displayName="PaginationLink";const qk=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:le("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(RP,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});qk.displayName="PaginationEllipsis";const Xk=({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=i(d,f),t>3&&u.unshift("..."),t<m-1&&u.push("..."),u.unshift(1),u.push(e),u}return i(1,e)},i=(a,l,u=1)=>{let d=a;const f=[];for(;d<=l;)f.push(d),d+=u;return f},o=s();return c.jsx(c.Fragment,{children:c.jsx(Zk,{className:"dark:text-stone-200 justify-end mt-3",children:c.jsx(Kk,{children:o.map((a,l)=>a==="..."?c.jsx(hm,{children:c.jsx(qk,{})},l):c.jsx(hm,{children:c.jsx(Gk,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},l))})})})},fl=({when:e,children:t,fallback:r})=>e?t:r;var Qk="AlertDialog",[Q3,fU]=Wr(Qk,[RS]),As=RS(),Jk=e=>{const{__scopeAlertDialog:t,...r}=e,n=As(t);return c.jsx(fv,{...n,...r,modal:!0})};Jk.displayName=Qk;var J3="AlertDialogTrigger",eC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(hv,{...s,...n,ref:t})});eC.displayName=J3;var e5="AlertDialogPortal",tC=e=>{const{__scopeAlertDialog:t,...r}=e,n=As(t);return c.jsx(pv,{...n,...r})};tC.displayName=e5;var t5="AlertDialogOverlay",rC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(gc,{...s,...n,ref:t})});rC.displayName=t5;var Qo="AlertDialogContent",[r5,n5]=Q3(Qo),nC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=As(r),o=y.useRef(null),a=Xe(t,o),l=y.useRef(null);return c.jsx(dI,{contentName:Qo,titleName:sC,docsSlug:"alert-dialog",children:c.jsx(r5,{scope:r,cancelRef:l,children:c.jsxs(vc,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:de(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(Ig,{children:n}),c.jsx(i5,{contentRef:o})]})})})});nC.displayName=Qo;var sC="AlertDialogTitle",iC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(yc,{...s,...n,ref:t})});iC.displayName=sC;var oC="AlertDialogDescription",aC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(xc,{...s,...n,ref:t})});aC.displayName=oC;var s5="AlertDialogAction",lC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=As(r);return c.jsx(_f,{...s,...n,ref:t})});lC.displayName=s5;var cC="AlertDialogCancel",uC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=n5(cC,r),i=As(r),o=Xe(t,s);return c.jsx(_f,{...i,...n,ref:o})});uC.displayName=cC;var i5=({contentRef:e})=>{const t=`\`${Qo}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Qo}\` by passing a \`${oC}\` 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 \`${Qo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},o5=Jk,a5=eC,l5=tC,dC=rC,fC=nC,hC=lC,pC=uC,mC=iC,gC=aC;const vC=o5,yC=a5,c5=l5,xC=y.forwardRef(({className:e,...t},r)=>c.jsx(dC,{className:le("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}));xC.displayName=dC.displayName;const Wv=y.forwardRef(({className:e,...t},r)=>c.jsxs(c5,{children:[c.jsx(xC,{}),c.jsx(fC,{ref:r,className:le("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})]}));Wv.displayName=fC.displayName;const Bv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bv.displayName="AlertDialogHeader";const Hv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Hv.displayName="AlertDialogFooter";const Yv=y.forwardRef(({className:e,...t},r)=>c.jsx(mC,{ref:r,className:le("text-lg font-semibold",e),...t}));Yv.displayName=mC.displayName;const Zv=y.forwardRef(({className:e,...t},r)=>c.jsx(gC,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));Zv.displayName=gC.displayName;const Kv=y.forwardRef(({className:e,...t},r)=>c.jsx(hC,{ref:r,className:le(cf(),e),...t}));Kv.displayName=hC.displayName;const Gv=y.forwardRef(({className:e,...t},r)=>c.jsx(pC,{ref:r,className:le(cf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Gv.displayName=pC.displayName;function wC(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var qv="Switch",[u5,hU]=Wr(qv),[d5,f5]=u5(qv),_C=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[f,m]=y.useState(null),g=Xe(t,p=>m(p)),w=y.useRef(!1),v=f?!!f.closest("form"):!0,[x=!1,h]=_s({prop:s,defaultProp:i,onChange:u});return c.jsxs(d5,{scope:r,checked:x,disabled:a,children:[c.jsx(Le.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":kC(x),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:g,onClick:de(e.onClick,p=>{h(_=>!_),v&&(w.current=p.isPropagationStopped(),w.current||p.stopPropagation())})}),v&&c.jsx(h5,{control:f,bubbles:!w.current,name:n,value:l,checked:x,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});_C.displayName=qv;var bC="SwitchThumb",SC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=f5(bC,r);return c.jsx(Le.span,{"data-state":kC(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});SC.displayName=bC;var h5=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,i=y.useRef(null),o=wC(r),a=ab(t);return y.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&f){const m=new Event("click",{bubbles:n});f.call(l,r),l.dispatchEvent(m)}},[o,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function kC(e){return e?"checked":"unchecked"}var CC=_C,p5=SC;const EC=y.forwardRef(({className:e,...t},r)=>c.jsx(CC,{className:le("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:c.jsx(p5,{className:le("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")})}));EC.displayName=CC.displayName;var m5="VisuallyHidden",kc=y.forwardRef((e,t)=>c.jsx(Le.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}}));kc.displayName=m5;var g5=kc,Xv="ToastProvider",[Qv,v5,y5]=uf("Toast"),[jC,pU]=Wr("Toast",[y5]),[x5,Of]=jC(Xv),TC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),m=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xv}\`. Expected non-empty \`string\`.`),c.jsx(Qv.Provider,{scope:t,children:c.jsx(x5,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>d(g=>g+1),[]),onToastRemove:y.useCallback(()=>d(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:o})})};TC.displayName=Xv;var NC="ToastViewport",w5=["F8"],pm="toast.viewportPause",mm="toast.viewportResume",RC=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=w5,label:s="Notifications ({hotkey})",...i}=e,o=Of(NC,r),a=v5(r),l=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),m=Xe(t,f,o.onViewportChange),g=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;y.useEffect(()=>{const x=h=>{var _;n.every(C=>h[C]||h.code===C)&&((_=f.current)==null||_.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,h=f.current;if(w&&x&&h){const p=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(pm);h.dispatchEvent(P),o.isClosePausedRef.current=!0}},_=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(mm);h.dispatchEvent(P),o.isClosePausedRef.current=!1}},C=P=>{!x.contains(P.relatedTarget)&&_()},E=()=>{x.contains(document.activeElement)||_()};return x.addEventListener("focusin",p),x.addEventListener("focusout",C),x.addEventListener("pointermove",p),x.addEventListener("pointerleave",E),window.addEventListener("blur",p),window.addEventListener("focus",_),()=>{x.removeEventListener("focusin",p),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",p),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",p),window.removeEventListener("focus",_)}}},[w,o.isClosePausedRef]);const v=y.useCallback(({tabbingDirection:x})=>{const p=a().map(_=>{const C=_.ref.current,E=[C,...D5(C)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?p.reverse():p).flat()},[a]);return y.useEffect(()=>{const x=f.current;if(x){const h=p=>{var E,P,R;const _=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!_){const j=document.activeElement,D=p.shiftKey;if(p.target===x&&D){(E=u.current)==null||E.focus();return}const T=v({tabbingDirection:D?"backwards":"forwards"}),F=T.findIndex(b=>b===j);Yh(T.slice(F+1))?p.preventDefault():D?(P=u.current)==null||P.focus():(R=d.current)==null||R.focus()}};return x.addEventListener("keydown",h),()=>x.removeEventListener("keydown",h)}},[a,v]),c.jsxs(OA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(gm,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});Yh(x)}}),c.jsx(Qv.Slot,{scope:r,children:c.jsx(Le.ol,{tabIndex:-1,...i,ref:m})}),w&&c.jsx(gm,{ref:d,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});Yh(x)}})]})});RC.displayName=NC;var PC="ToastFocusProxy",gm=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Of(PC,r);return c.jsx(kc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});gm.displayName=PC;var Mf="Toast",_5="toast.swipeStart",b5="toast.swipeMove",S5="toast.swipeCancel",k5="toast.swipeEnd",AC=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(wr,{present:r||a,children:c.jsx(j5,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:At(e.onPause),onResume:At(e.onResume),onSwipeStart:de(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:de(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:de(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:de(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});AC.displayName=Mf;var[C5,E5]=jC(Mf,{onClose(){}}),j5=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:g,...w}=e,v=Of(Mf,r),[x,h]=y.useState(null),p=Xe(t,b=>h(b)),_=y.useRef(null),C=y.useRef(null),E=s||v.duration,P=y.useRef(0),R=y.useRef(E),j=y.useRef(0),{onToastAdd:D,onToastRemove:L}=v,K=At(()=>{var $;(x==null?void 0:x.contains(document.activeElement))&&(($=v.viewport)==null||$.focus()),o()}),T=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(j.current),P.current=new Date().getTime(),j.current=window.setTimeout(K,b))},[K]);y.useEffect(()=>{const b=v.viewport;if(b){const $=()=>{T(R.current),u==null||u()},ee=()=>{const Z=new Date().getTime()-P.current;R.current=R.current-Z,window.clearTimeout(j.current),l==null||l()};return b.addEventListener(pm,ee),b.addEventListener(mm,$),()=>{b.removeEventListener(pm,ee),b.removeEventListener(mm,$)}}},[v.viewport,E,l,u,T]),y.useEffect(()=>{i&&!v.isClosePausedRef.current&&T(E)},[i,E,v.isClosePausedRef,T]),y.useEffect(()=>(D(),()=>L()),[D,L]);const F=y.useMemo(()=>x?zC(x):null,[x]);return v.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(T5,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(C5,{scope:r,onClose:K,children:js.createPortal(c.jsx(Qv.ItemSlot,{scope:r,children:c.jsx(DA,{asChild:!0,onEscapeKeyDown:de(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||K(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...w,ref:p,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,K()))}),onPointerDown:de(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:de(e.onPointerMove,b=>{if(!_.current)return;const $=b.clientX-_.current.x,ee=b.clientY-_.current.y,Z=!!C.current,Y=["left","right"].includes(v.swipeDirection),O=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,X=Y?O(0,$):0,U=Y?0:O(0,ee),V=b.pointerType==="touch"?10:2,ue={x:X,y:U},ne={originalEvent:b,delta:ue};Z?(C.current=ue,hu(b5,f,ne,{discrete:!1})):B0(ue,v.swipeDirection,V)?(C.current=ue,hu(_5,d,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs($)>V||Math.abs(ee)>V)&&(_.current=null)}),onPointerUp:de(e.onPointerUp,b=>{const $=C.current,ee=b.target;if(ee.hasPointerCapture(b.pointerId)&&ee.releasePointerCapture(b.pointerId),C.current=null,_.current=null,$){const Z=b.currentTarget,Y={originalEvent:b,delta:$};B0($,v.swipeDirection,v.swipeThreshold)?hu(k5,g,Y,{discrete:!0}):hu(S5,m,Y,{discrete:!0}),Z.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),T5=e=>{const{__scopeToast:t,children:r,...n}=e,s=Of(Mf,t),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return P5(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(hc,{asChild:!0,children:c.jsx(kc,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},N5="ToastTitle",DC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});DC.displayName=N5;var R5="ToastDescription",OC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});OC.displayName=R5;var MC="ToastAction",IC=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(FC,{altText:r,asChild:!0,children:c.jsx(Jv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${MC}\`. Expected non-empty \`string\`.`),null)});IC.displayName=MC;var LC="ToastClose",Jv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=E5(LC,r);return c.jsx(FC,{asChild:!0,children:c.jsx(Le.button,{type:"button",...n,ref:t,onClick:de(e.onClick,s.onClose)})})});Jv.displayName=LC;var FC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function zC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),A5(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...zC(n))}}),t}function hu(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Fg(s,i):s.dispatchEvent(i)}var B0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function P5(e=()=>{}){const t=At(e);sr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function A5(e){return e.nodeType===e.ELEMENT_NODE}function D5(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 Yh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var O5=TC,UC=RC,VC=AC,$C=DC,WC=OC,BC=IC,HC=Jv;const M5=O5,YC=y.forwardRef(({className:e,...t},r)=>c.jsx(UC,{ref:r,className:le("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}));YC.displayName=UC.displayName;const I5=uc("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"}}),ZC=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(VC,{ref:n,className:le(I5({variant:t}),e),...r}));ZC.displayName=VC.displayName;const L5=y.forwardRef(({className:e,...t},r)=>c.jsx(BC,{ref:r,className:le("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}));L5.displayName=BC.displayName;const KC=y.forwardRef(({className:e,...t},r)=>c.jsx(HC,{ref:r,className:le("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Mg,{className:"h-4 w-4"})}));KC.displayName=HC.displayName;const GC=y.forwardRef(({className:e,...t},r)=>c.jsx($C,{ref:r,className:le("text-sm font-semibold",e),...t}));GC.displayName=$C.displayName;const qC=y.forwardRef(({className:e,...t},r)=>c.jsx(WC,{ref:r,className:le("text-sm opacity-90",e),...t}));qC.displayName=WC.displayName;const F5=1,z5=1e6;let Zh=0;function U5(){return Zh=(Zh+1)%Number.MAX_SAFE_INTEGER,Zh.toString()}const Kh=new Map,H0=e=>{if(Kh.has(e))return;const t=setTimeout(()=>{Kh.delete(e),hl({type:"REMOVE_TOAST",toastId:e})},z5);Kh.set(e,t)},V5=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,F5)};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?H0(r):e.toasts.forEach(n=>{H0(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)}}},Iu=[];let Lu={toasts:[]};function hl(e){Lu=V5(Lu,e),Iu.forEach(t=>{t(Lu)})}function $5({...e}){const t=U5(),r=s=>hl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>hl({type:"DISMISS_TOAST",toastId:t});return hl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Cc(){const[e,t]=y.useState(Lu);return y.useEffect(()=>(Iu.push(t),()=>{const r=Iu.indexOf(t);r>-1&&Iu.splice(r,1)}),[e]),{...e,toast:$5,dismiss:r=>hl({type:"DISMISS_TOAST",toastId:r})}}function ey(){const{toasts:e}=Cc();return c.jsxs(M5,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return c.jsxs(ZC,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(GC,{children:r}),n&&c.jsx(qC,{children:n})]}),s,c.jsx(KC,{})]},t)}),c.jsx(YC,{})]})}var[If,mU]=Wr("Tooltip",[Sa]),Lf=Sa(),XC="TooltipProvider",W5=700,vm="tooltip.open",[B5,ty]=If(XC),QC=e=>{const{__scopeTooltip:t,delayDuration:r=W5,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=y.useState(!0),l=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(B5,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:i})};QC.displayName=XC;var Ff="Tooltip",[H5,zf]=If(Ff),JC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=ty(Ff,e.__scopeTooltip),u=Lf(t),[d,f]=y.useState(null),m=_n(),g=y.useRef(0),w=o??l.disableHoverableContent,v=a??l.delayDuration,x=y.useRef(!1),[h=!1,p]=_s({prop:n,defaultProp:s,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(vm))):l.onClose(),i==null||i(R)}}),_=y.useMemo(()=>h?x.current?"delayed-open":"instant-open":"closed",[h]),C=y.useCallback(()=>{window.clearTimeout(g.current),x.current=!1,p(!0)},[p]),E=y.useCallback(()=>{window.clearTimeout(g.current),p(!1)},[p]),P=y.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,p(!0)},v)},[v,p]);return y.useEffect(()=>()=>window.clearTimeout(g.current),[]),c.jsx(Kg,{...u,children:c.jsx(H5,{scope:t,contentId:m,open:h,stateAttribute:_,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?P():C()},[l.isOpenDelayed,P,C]),onTriggerLeave:y.useCallback(()=>{w?E():window.clearTimeout(g.current)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:r})})};JC.displayName=Ff;var ym="TooltipTrigger",eE=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=zf(ym,r),i=ty(ym,r),o=Lf(r),a=y.useRef(null),l=Xe(t,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(Gg,{asChild:!0,...o,children:c.jsx(Le.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:de(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:de(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:de(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:de(e.onBlur,s.onClose),onClick:de(e.onClick,s.onClose)})})});eE.displayName=ym;var Y5="TooltipPortal",[gU,Z5]=If(Y5,{forceMount:void 0}),la="TooltipContent",ry=y.forwardRef((e,t)=>{const r=Z5(la,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=zf(la,e.__scopeTooltip);return c.jsx(wr,{present:n||o.open,children:o.disableHoverableContent?c.jsx(tE,{side:s,...i,ref:t}):c.jsx(K5,{side:s,...i,ref:t})})}),K5=y.forwardRef((e,t)=>{const r=zf(la,e.__scopeTooltip),n=ty(la,e.__scopeTooltip),s=y.useRef(null),i=Xe(t,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,m=y.useCallback(()=>{a(null),f(!1)},[f]),g=y.useCallback((w,v)=>{const x=w.currentTarget,h={x:w.clientX,y:w.clientY},p=Q5(h,x.getBoundingClientRect()),_=J5(h,p),C=e6(v.getBoundingClientRect()),E=r6([..._,...C]);a(E),f(!0)},[f]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&d){const w=x=>g(x,d),v=x=>g(x,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",v)}}},[l,d,g,m]),y.useEffect(()=>{if(o){const w=v=>{const x=v.target,h={x:v.clientX,y:v.clientY},p=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),_=!t6(h,o);p?m():_&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,o,u,m]),c.jsx(tE,{...e,ref:i})}),[G5,q5]=If(Ff,{isInside:!1}),tE=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=zf(la,r),u=Lf(r),{onClose:d}=l;return y.useEffect(()=>(document.addEventListener(vm,d),()=>document.removeEventListener(vm,d)),[d]),y.useEffect(()=>{if(l.trigger){const f=m=>{const g=m.target;g!=null&&g.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(wa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(qg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Ig,{children:n}),c.jsx(G5,{scope:r,isInside:!0,children:c.jsx(g5,{id:l.contentId,role:"tooltip",children:s||n})})]})})});ry.displayName=la;var rE="TooltipArrow",X5=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Lf(r);return q5(rE,r).isInside?null:c.jsx(Xg,{...s,...n,ref:t})});X5.displayName=rE;function Q5(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function J5(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 e6(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 t6(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function r6(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),n6(t)}function n6(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 i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 s6=JC,i6=eE,nE=ry;const o6=s6,a6=i6,l6=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(nE,{ref:n,sideOffset:t,className:le("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}));l6.displayName=nE.displayName;function pu(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 sE={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,i){function o(u,d){if(!s[u]){if(!n[u]){var f=typeof pu=="function"&&pu;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 g=s[u]={exports:{}};n[u][0].call(g.exports,function(w){var v=n[u][1][w];return o(v||w)},g,g.exports,r,n,s,i)}return s[u].exports}for(var a=typeof pu=="function"&&pu,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(r,n,s){var i=r("./utils"),o=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(l){for(var u,d,f,m,g,w,v,x=[],h=0,p=l.length,_=p,C=i.getTypeOf(l)!=="string";h<l.length;)_=p-h,f=C?(u=l[h++],d=h<p?l[h++]:0,h<p?l[h++]:0):(u=l.charCodeAt(h++),d=h<p?l.charCodeAt(h++):0,h<p?l.charCodeAt(h++):0),m=u>>2,g=(3&u)<<4|d>>4,w=1<_?(15&d)<<2|f>>6:64,v=2<_?63&f:64,x.push(a.charAt(m)+a.charAt(g)+a.charAt(w)+a.charAt(v));return x.join("")},s.decode=function(l){var u,d,f,m,g,w,v=0,x=0,h="data:";if(l.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var p,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=o.uint8array?new Uint8Array(0|_):new Array(0|_);v<l.length;)u=a.indexOf(l.charAt(v++))<<2|(m=a.indexOf(l.charAt(v++)))>>4,d=(15&m)<<4|(g=a.indexOf(l.charAt(v++)))>>2,f=(3&g)<<6|(w=a.indexOf(l.charAt(v++))),p[x++]=u,g!==64&&(p[x++]=d),w!==64&&(p[x++]=f);return p}},{"./support":30,"./utils":32}],2:[function(r,n,s){var i=r("./external"),o=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function u(d,f,m,g,w){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=g,this.compressedContent=w}u.prototype={getContentWorker:function(){var d=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,m){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var i=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var i=r("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(u,d,f,m){var g=o,w=m+f;u^=-1;for(var v=m;v<w;v++)u=u>>>8^g[255&(u^d[v])];return-1^u}(0|l,a,a.length,0):function(u,d,f,m){var g=o,w=m+f;u^=-1;for(var v=m;v<w;v++)u=u>>>8^g[255&(u^d.charCodeAt(v))];return-1^u}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(r,n,s){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),u=i?"uint8array":"array";function d(f,m){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new o[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 i(g,w){var v,x="";for(v=0;v<w;v++)x+=String.fromCharCode(255&g),g>>>=8;return x}function o(g,w,v,x,h,p){var _,C,E=g.file,P=g.compression,R=p!==u.utf8encode,j=a.transformTo("string",p(E.name)),D=a.transformTo("string",u.utf8encode(E.name)),L=E.comment,K=a.transformTo("string",p(L)),T=a.transformTo("string",u.utf8encode(L)),F=D.length!==E.name.length,b=T.length!==L.length,$="",ee="",Z="",Y=E.dir,O=E.date,X={crc32:0,compressedSize:0,uncompressedSize:0};w&&!v||(X.crc32=g.crc32,X.compressedSize=g.compressedSize,X.uncompressedSize=g.uncompressedSize);var U=0;w&&(U|=8),R||!F&&!b||(U|=2048);var V=0,ue=0;Y&&(V|=16),h==="UNIX"?(ue=798,V|=function(se,Pe){var ce=se;return se||(ce=Pe?16893:33204),(65535&ce)<<16}(E.unixPermissions,Y)):(ue=20,V|=function(se){return 63&(se||0)}(E.dosPermissions)),_=O.getUTCHours(),_<<=6,_|=O.getUTCMinutes(),_<<=5,_|=O.getUTCSeconds()/2,C=O.getUTCFullYear()-1980,C<<=4,C|=O.getUTCMonth()+1,C<<=5,C|=O.getUTCDate(),F&&(ee=i(1,1)+i(d(j),4)+D,$+="up"+i(ee.length,2)+ee),b&&(Z=i(1,1)+i(d(K),4)+T,$+="uc"+i(Z.length,2)+Z);var ne="";return ne+=`
\0`,ne+=i(U,2),ne+=P.magic,ne+=i(_,2),ne+=i(C,2),ne+=i(X.crc32,4),ne+=i(X.compressedSize,4),ne+=i(X.uncompressedSize,4),ne+=i(j.length,2),ne+=i($.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ne+j+$,dirRecord:f.CENTRAL_FILE_HEADER+i(ue,2)+ne+i(K.length,2)+"\0\0\0\0"+i(V,4)+i(x,4)+j+$+K}}var a=r("../utils"),l=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(g,w,v,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=v,this.encodeFileName=x,this.streamFiles=g,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(g){var w=g.meta.percent||0,v=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(g):(this.bytesWritten+=g.data.length,l.prototype.push.call(this,{data:g.data,meta:{currentFile:this.currentFile,percent:v?(w+100*(v-x-1))/v:100}}))},m.prototype.openedSource=function(g){this.currentSourceOffset=this.bytesWritten,this.currentFile=g.file.name;var w=this.streamFiles&&!g.file.dir;if(w){var v=o(g,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:v.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(g){this.accumulate=!1;var w=this.streamFiles&&!g.file.dir,v=o(g,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(v.dirRecord),w)this.push({data:function(x){return f.DATA_DESCRIPTOR+i(x.crc32,4)+i(x.compressedSize,4)+i(x.uncompressedSize,4)}(g),meta:{percent:100}});else for(this.push({data:v.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var g=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var v=this.bytesWritten-g,x=function(h,p,_,C,E){var P=a.transformTo("string",E(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(h,2)+i(h,2)+i(p,4)+i(_,4)+i(P.length,2)+P}(this.dirRecords.length,v,g,this.zipComment,this.encodeFileName);this.push({data:x,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(g){this._sources.push(g);var w=this;return g.on("data",function(v){w.processChunk(v)}),g.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),g.on("error",function(v){w.error(v)}),this},m.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(g){var w=this._sources;if(!l.prototype.error.call(this,g))return!1;for(var v=0;v<w.length;v++)try{w[v].error(g)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var g=this._sources,w=0;w<g.length;w++)g[w].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,s){var i=r("../compressions"),o=r("./ZipFileWorker");s.generateWorker=function(a,l,u){var d=new o(l.streamFiles,u,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,g){f++;var w=function(p,_){var C=p||_,E=i[C];if(!E)throw new Error(C+" is not a valid compression method !");return E}(g.options.compression,l.compression),v=g.options.compressionOptions||l.compressionOptions||{},x=g.dir,h=g.date;g._compressWorker(w,v).withStreamInfo("file",{name:m,dir:x,date:h,comment:g.comment||"",unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,s){function i(){if(!(this instanceof i))return new i;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 o=new i;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,a){return new i().loadAsync(o,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var i=r("./utils"),o=r("./external"),a=r("./utf8"),l=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new o.Promise(function(g,w){var v=m.decompressed.getContentWorker().pipe(new u);v.on("error",function(x){w(x)}).on("end",function(){v.streamInfo.crc32!==m.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):g()}).resume()})}n.exports=function(m,g){var w=this;return g=i.extend(g||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,g.optimizedBinaryString,g.base64).then(function(v){var x=new l(g);return x.load(v),x}).then(function(v){var x=[o.Promise.resolve(v)],h=v.files;if(g.checkCRC32)for(var p=0;p<h.length;p++)x.push(f(h[p]));return o.Promise.all(x)}).then(function(v){for(var x=v.shift(),h=x.files,p=0;p<h.length;p++){var _=h[p],C=_.fileNameStr,E=i.resolve(_.fileNameStr);w.file(E,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:g.createFolders}),_.dir||(w.file(E).unsafeOriginalName=C)}return x.zipComment.length&&(w.comment=x.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,s){var i=r("../utils"),o=r("../stream/GenericWorker");function a(l,u){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(u)}i.inherits(a,o),a.prototype._bindStream=function(l){var u=this;(this._stream=l).pause(),l.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.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 i=r("readable-stream").Readable;function o(a,l,u){i.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),u&&u(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,n,s){function i(E,P,R){var j,D=a.getTypeOf(P),L=a.extend(R||{},d);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(E=h(E)),L.createFolders&&(j=x(E))&&p.call(this,j,!0);var K=D==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!K),(P instanceof f&&P.uncompressedSize===0||L.dir||!P||P.length===0)&&(L.base64=!1,L.binary=!0,P="",L.compression="STORE",D="string");var T=null;T=P instanceof f||P instanceof l?P:w.isNode&&w.isStream(P)?new v(E,P):a.prepareContent(E,P,L.binary,L.optimizedBinaryString,L.base64);var F=new m(E,T,L);this.files[E]=F}var o=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),g=r("./generate"),w=r("./nodejsUtils"),v=r("./nodejs/NodejsStreamInputAdapter"),x=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var P=E.lastIndexOf("/");return 0<P?E.substring(0,P):""},h=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},p=function(E,P){return P=P!==void 0?P:d.createFolders,E=h(E),this.files[E]||i.call(this,E,null,{dir:!0,createFolders:P}),this.files[E]};function _(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var P,R,j;for(P in this.files)j=this.files[P],(R=P.slice(this.root.length,P.length))&&P.slice(0,this.root.length)===this.root&&E(R,j)},filter:function(E){var P=[];return this.forEach(function(R,j){E(R,j)&&P.push(j)}),P},file:function(E,P,R){if(arguments.length!==1)return E=this.root+E,i.call(this,E,P,R),this;if(_(E)){var j=E;return this.filter(function(L,K){return!K.dir&&j.test(L)})}var D=this.files[this.root+E];return D&&!D.dir?D:null},folder:function(E){if(!E)return this;if(_(E))return this.filter(function(D,L){return L.dir&&E.test(D)});var P=this.root+E,R=p.call(this,P),j=this.clone();return j.root=R.name,j},remove:function(E){E=this.root+E;var P=this.files[E];if(P||(E.slice(-1)!=="/"&&(E+="/"),P=this.files[E]),P&&!P.dir)delete this.files[E];else for(var R=this.filter(function(D,L){return L.name.slice(0,E.length)===E}),j=0;j<R.length;j++)delete this.files[R[j].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var P,R={};try{if((R=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.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 j=R.comment||this.comment||"";P=g.generateWorker(this,R,j)}catch(D){(P=new l("error")).error(D)}return new u(P,R.type||"string",R.mimeType)},generateAsync:function(E,P){return this.generateInternalStream(E).accumulate(P)},generateNodeStream:function(E,P){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(P)}};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 i=r("./DataReader");function o(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&u===m[1]&&d===m[2]&&f===m[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var i=r("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,u=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return i.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=o},{"../utils":32}],19:[function(r,n,s){var i=r("./Uint8ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var i=r("./DataReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var i=r("./ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var i=r("../utils"),o=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||o.uint8array?m==="nodebuffer"?new u(f):o.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var i=r("./GenericWorker"),o=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var i=r("./GenericWorker"),o=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function i(o){this.name=o||"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}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},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 o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=i},{}],29:[function(r,n,s){var i=r("../utils"),o=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),u=r("../support"),d=r("../external"),f=null;if(u.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(w,v){return new d.Promise(function(x,h){var p=[],_=w._internalType,C=w._outputType,E=w._mimeType;w.on("data",function(P,R){p.push(P),v&&v(R)}).on("error",function(P){p=[],h(P)}).on("end",function(){try{var P=function(R,j,D){switch(R){case"blob":return i.newBlob(i.transformTo("arraybuffer",j),D);case"base64":return l.encode(j);default:return i.transformTo(R,j)}}(C,function(R,j){var D,L=0,K=null,T=0;for(D=0;D<j.length;D++)T+=j[D].length;switch(R){case"string":return j.join("");case"array":return Array.prototype.concat.apply([],j);case"uint8array":for(K=new Uint8Array(T),D=0;D<j.length;D++)K.set(j[D],L),L+=j[D].length;return K;case"nodebuffer":return Buffer.concat(j);default:throw new Error("concat : unsupported type '"+R+"'")}}(_,p),E);x(P)}catch(R){h(R)}p=[]}).resume()})}function g(w,v,x){var h=v;switch(v){case"blob":case"arraybuffer":h="uint8array";break;case"base64":h="string"}try{this._internalType=h,this._outputType=v,this._mimeType=x,i.checkSupport(h),this._worker=w.pipe(new o(h)),w.lock()}catch(p){this._worker=new a("error"),this._worker.error(p)}}g.prototype={accumulate:function(w){return m(this,w)},on:function(w,v){var x=this;return w==="data"?this._worker.on(w,function(h){v.call(x,h.data,h.meta)}):this._worker.on(w,function(){i.delay(v,arguments,x)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=g},{"../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 i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.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 i=r("./utils"),o=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}s.utf8encode=function(g){return o.nodebuffer?a.newBufferFrom(g,"utf-8"):function(w){var v,x,h,p,_,C=w.length,E=0;for(p=0;p<C;p++)(64512&(x=w.charCodeAt(p)))==55296&&p+1<C&&(64512&(h=w.charCodeAt(p+1)))==56320&&(x=65536+(x-55296<<10)+(h-56320),p++),E+=x<128?1:x<2048?2:x<65536?3:4;for(v=o.uint8array?new Uint8Array(E):new Array(E),p=_=0;_<E;p++)(64512&(x=w.charCodeAt(p)))==55296&&p+1<C&&(64512&(h=w.charCodeAt(p+1)))==56320&&(x=65536+(x-55296<<10)+(h-56320),p++),x<128?v[_++]=x:(x<2048?v[_++]=192|x>>>6:(x<65536?v[_++]=224|x>>>12:(v[_++]=240|x>>>18,v[_++]=128|x>>>12&63),v[_++]=128|x>>>6&63),v[_++]=128|63&x);return v}(g)},s.utf8decode=function(g){return o.nodebuffer?i.transformTo("nodebuffer",g).toString("utf-8"):function(w){var v,x,h,p,_=w.length,C=new Array(2*_);for(v=x=0;v<_;)if((h=w[v++])<128)C[x++]=h;else if(4<(p=u[h]))C[x++]=65533,v+=p-1;else{for(h&=p===2?31:p===3?15:7;1<p&&v<_;)h=h<<6|63&w[v++],p--;1<p?C[x++]=65533:h<65536?C[x++]=h:(h-=65536,C[x++]=55296|h>>10&1023,C[x++]=56320|1023&h)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),i.applyFromCharCode(C)}(g=i.transformTo(o.uint8array?"uint8array":"array",g))},i.inherits(f,l),f.prototype.processChunk=function(g){var w=i.transformTo(o.uint8array?"uint8array":"array",g.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var v=w;(w=new Uint8Array(v.length+this.leftOver.length)).set(this.leftOver,0),w.set(v,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var x=function(p,_){var C;for((_=_||p.length)>p.length&&(_=p.length),C=_-1;0<=C&&(192&p[C])==128;)C--;return C<0||C===0?_:C+u[p[C]]>_?C:_}(w),h=w;x!==w.length&&(o.uint8array?(h=w.subarray(0,x),this.leftOver=w.subarray(x,w.length)):(h=w.slice(0,x),this.leftOver=w.slice(x,w.length))),this.push({data:s.utf8decode(h),meta:g.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,i.inherits(m,l),m.prototype.processChunk=function(g){this.push({data:s.utf8encode(g.data),meta:g.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var i=r("./support"),o=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function u(v){return v}function d(v,x){for(var h=0;h<v.length;++h)x[h]=255&v.charCodeAt(h);return x}r("setimmediate"),s.newBlob=function(v,x){s.checkSupport("blob");try{return new Blob([v],{type:x})}catch{try{var h=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return h.append(v),h.getBlob(x)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(v,x,h){var p=[],_=0,C=v.length;if(C<=h)return String.fromCharCode.apply(null,v);for(;_<C;)x==="array"||x==="nodebuffer"?p.push(String.fromCharCode.apply(null,v.slice(_,Math.min(_+h,C)))):p.push(String.fromCharCode.apply(null,v.subarray(_,Math.min(_+h,C)))),_+=h;return p.join("")},stringifyByChar:function(v){for(var x="",h=0;h<v.length;h++)x+=String.fromCharCode(v[h]);return x},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function m(v){var x=65536,h=s.getTypeOf(v),p=!0;if(h==="uint8array"?p=f.applyCanBeUsed.uint8array:h==="nodebuffer"&&(p=f.applyCanBeUsed.nodebuffer),p)for(;1<x;)try{return f.stringifyByChunk(v,h,x)}catch{x=Math.floor(x/2)}return f.stringifyByChar(v)}function g(v,x){for(var h=0;h<v.length;h++)x[h]=v[h];return x}s.applyFromCharCode=m;var w={};w.string={string:u,array:function(v){return d(v,new Array(v.length))},arraybuffer:function(v){return w.string.uint8array(v).buffer},uint8array:function(v){return d(v,new Uint8Array(v.length))},nodebuffer:function(v){return d(v,a.allocBuffer(v.length))}},w.array={string:m,array:u,arraybuffer:function(v){return new Uint8Array(v).buffer},uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(v)}},w.arraybuffer={string:function(v){return m(new Uint8Array(v))},array:function(v){return g(new Uint8Array(v),new Array(v.byteLength))},arraybuffer:u,uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(new Uint8Array(v))}},w.uint8array={string:m,array:function(v){return g(v,new Array(v.length))},arraybuffer:function(v){return v.buffer},uint8array:u,nodebuffer:function(v){return a.newBufferFrom(v)}},w.nodebuffer={string:m,array:function(v){return g(v,new Array(v.length))},arraybuffer:function(v){return w.nodebuffer.uint8array(v).buffer},uint8array:function(v){return g(v,new Uint8Array(v.length))},nodebuffer:u},s.transformTo=function(v,x){if(x=x||"",!v)return x;s.checkSupport(v);var h=s.getTypeOf(x);return w[h][v](x)},s.resolve=function(v){for(var x=v.split("/"),h=[],p=0;p<x.length;p++){var _=x[p];_==="."||_===""&&p!==0&&p!==x.length-1||(_===".."?h.pop():h.push(_))}return h.join("/")},s.getTypeOf=function(v){return typeof v=="string"?"string":Object.prototype.toString.call(v)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(v)?"nodebuffer":i.uint8array&&v instanceof Uint8Array?"uint8array":i.arraybuffer&&v instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(v){if(!i[v.toLowerCase()])throw new Error(v+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(v){var x,h,p="";for(h=0;h<(v||"").length;h++)p+="\\x"+((x=v.charCodeAt(h))<16?"0":"")+x.toString(16).toUpperCase();return p},s.delay=function(v,x,h){setImmediate(function(){v.apply(h||null,x||[])})},s.inherits=function(v,x){function h(){}h.prototype=x.prototype,v.prototype=new h},s.extend=function(){var v,x,h={};for(v=0;v<arguments.length;v++)for(x in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],x)&&h[x]===void 0&&(h[x]=arguments[v][x]);return h},s.prepareContent=function(v,x,h,p,_){return l.Promise.resolve(x).then(function(C){return i.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,P){var R=new FileReader;R.onload=function(j){E(j.target.result)},R.onerror=function(j){P(j.target.error)},R.readAsArrayBuffer(C)}):C}).then(function(C){var E=s.getTypeOf(C);return E?(E==="arraybuffer"?C=s.transformTo("uint8array",C):E==="string"&&(_?C=o.decode(C):h&&p!==!0&&(C=function(P){return d(P,i.uint8array?new Uint8Array(P.length):new Array(P.length))}(C))),C):l.Promise.reject(new Error("Can't read the data of '"+v+"'. 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 i=r("./reader/readerFor"),o=r("./utils"),a=r("./signature"),l=r("./zipEntry"),u=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(m)+", expected "+o.pretty(f)+")")}},isSignature:function(f,m){var g=this.reader.index;this.reader.setIndex(f);var w=this.reader.readString(4)===m;return this.reader.setIndex(g),w},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",g=o.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(g)},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,g,w=this.zip64EndOfCentralSize-44;0<w;)f=this.reader.readInt(2),m=this.reader.readInt(4),g=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:g}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.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 g=this.centralDirOffset+this.centralDirSize;this.zip64&&(g+=20,g+=12+this.zip64EndOfCentralSize);var w=m-g;if(0<w)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(f){this.reader=i(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 i=r("./reader/readerFor"),o=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),u=r("./utf8"),d=r("./compressions"),f=r("./support");function m(g,w){this.options=g,this.loadOptions=w}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(g){var w,v;if(g.skip(22),this.fileNameLength=g.readInt(2),v=g.readInt(2),this.fileName=g.readData(this.fileNameLength),g.skip(v),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((w=function(x){for(var h in d)if(Object.prototype.hasOwnProperty.call(d,h)&&d[h].magic===x)return d[h];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,w,g.readData(this.compressedSize))},readCentralPart:function(g){this.versionMadeBy=g.readInt(2),g.skip(2),this.bitFlag=g.readInt(2),this.compressionMethod=g.readString(2),this.date=g.readDate(),this.crc32=g.readInt(4),this.compressedSize=g.readInt(4),this.uncompressedSize=g.readInt(4);var w=g.readInt(2);if(this.extraFieldsLength=g.readInt(2),this.fileCommentLength=g.readInt(2),this.diskNumberStart=g.readInt(2),this.internalFileAttributes=g.readInt(2),this.externalFileAttributes=g.readInt(4),this.localHeaderOffset=g.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");g.skip(w),this.readExtraFields(g),this.parseZIP64ExtraField(g),this.fileComment=g.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var g=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),g==0&&(this.dosPermissions=63&this.externalFileAttributes),g==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var g=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=g.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=g.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=g.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=g.readInt(4))}},readExtraFields:function(g){var w,v,x,h=g.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});g.index+4<h;)w=g.readInt(2),v=g.readInt(2),x=g.readData(v),this.extraFields[w]={id:w,length:v,value:x};g.setIndex(h)},handleUTF8:function(){var g=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var v=o.transformTo(g,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(v)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var h=o.transformTo(g,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(h)}}},findExtraFieldUnicodePath:function(){var g=this.extraFields[28789];if(g){var w=i(g.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:u.utf8decode(w.readData(g.length-5))}return null},findExtraFieldUnicodeComment:function(){var g=this.extraFields[25461];if(g){var w=i(g.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:u.utf8decode(w.readData(g.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 i(w,v,x){this.name=w,this.dir=x.dir,this.date=x.date,this.comment=x.comment,this.unixPermissions=x.unixPermissions,this.dosPermissions=x.dosPermissions,this._data=v,this._dataBinary=x.binary,this.options={compression:x.compression,compressionOptions:x.compressionOptions}}var o=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(w){var v=null,x="string";try{if(!w)throw new Error("No output type specified.");var h=(x=w.toLowerCase())==="string"||x==="text";x!=="binarystring"&&x!=="text"||(x="string"),v=this._decompressWorker();var p=!this._dataBinary;p&&!h&&(v=v.pipe(new l.Utf8EncodeWorker)),!p&&h&&(v=v.pipe(new l.Utf8DecodeWorker))}catch(_){(v=new d("error")).error(_)}return new o(v,x,"")},async:function(w,v){return this.internalStream(w).accumulate(v)},nodeStream:function(w,v){return this.internalStream(w||"nodebuffer").toNodejsStream(v)},_compressWorker:function(w,v){if(this._data instanceof u&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var x=this._decompressWorker();return this._dataBinary||(x=x.pipe(new l.Utf8EncodeWorker)),u.createWorkerFrom(x,w,v)},_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.")},g=0;g<f.length;g++)i.prototype[f[g]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(i){var o,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var u=0,d=new l(w),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),o=function(){f.data=u=++u%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var v=i.document.createElement("script");v.onreadystatechange=function(){w(),v.onreadystatechange=null,v.parentNode.removeChild(v),v=null},i.document.documentElement.appendChild(v)}:function(){setTimeout(w,0)};else{var m=new i.MessageChannel;m.port1.onmessage=w,o=function(){m.port2.postMessage(0)}}var g=[];function w(){var v,x;a=!0;for(var h=g.length;h;){for(x=g,g=[],v=-1;++v<h;)x[v]();h=g.length}a=!1}n.exports=function(v){g.push(v)!==1||a||o()}}).call(this,typeof Fc<"u"?Fc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var i=r("immediate");function o(){}var a={},l=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,h!==o&&v(this,h)}function m(h,p,_){this.promise=h,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function g(h,p,_){i(function(){var C;try{C=p(_)}catch(E){return a.reject(h,E)}C===h?a.reject(h,new TypeError("Cannot resolve promise with itself")):a.resolve(h,C)})}function w(h){var p=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof p=="function")return function(){p.apply(h,arguments)}}function v(h,p){var _=!1;function C(R){_||(_=!0,a.reject(h,R))}function E(R){_||(_=!0,a.resolve(h,R))}var P=x(function(){p(E,C)});P.status==="error"&&C(P.value)}function x(h,p){var _={};try{_.value=h(p),_.status="success"}catch(C){_.status="error",_.value=C}return _}(n.exports=f).prototype.finally=function(h){if(typeof h!="function")return this;var p=this.constructor;return this.then(function(_){return p.resolve(h()).then(function(){return _})},function(_){return p.resolve(h()).then(function(){throw _})})},f.prototype.catch=function(h){return this.then(null,h)},f.prototype.then=function(h,p){if(typeof h!="function"&&this.state===u||typeof p!="function"&&this.state===l)return this;var _=new this.constructor(o);return this.state!==d?g(_,this.state===u?h:p,this.outcome):this.queue.push(new m(_,h,p)),_},m.prototype.callFulfilled=function(h){a.resolve(this.promise,h)},m.prototype.otherCallFulfilled=function(h){g(this.promise,this.onFulfilled,h)},m.prototype.callRejected=function(h){a.reject(this.promise,h)},m.prototype.otherCallRejected=function(h){g(this.promise,this.onRejected,h)},a.resolve=function(h,p){var _=x(w,p);if(_.status==="error")return a.reject(h,_.value);var C=_.value;if(C)v(h,C);else{h.state=u,h.outcome=p;for(var E=-1,P=h.queue.length;++E<P;)h.queue[E].callFulfilled(p)}return h},a.reject=function(h,p){h.state=l,h.outcome=p;for(var _=-1,C=h.queue.length;++_<C;)h.queue[_].callRejected(p);return h},f.resolve=function(h){return h instanceof this?h:a.resolve(new this(o),h)},f.reject=function(h){var p=new this(o);return a.reject(p,h)},f.all=function(h){var p=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=h.length,C=!1;if(!_)return this.resolve([]);for(var E=new Array(_),P=0,R=-1,j=new this(o);++R<_;)D(h[R],R);return j;function D(L,K){p.resolve(L).then(function(T){E[K]=T,++P!==_||C||(C=!0,a.resolve(j,E))},function(T){C||(C=!0,a.reject(j,T))})}},f.race=function(h){var p=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=h.length,C=!1;if(!_)return this.resolve([]);for(var E=-1,P=new this(o);++E<_;)R=h[E],p.resolve(R).then(function(j){C||(C=!0,a.resolve(P,j))},function(j){C||(C=!0,a.reject(P,j))});var R;return P}},{immediate:36}],38:[function(r,n,s){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var i=r("./zlib/deflate"),o=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,g=0,w=8;function v(h){if(!(this instanceof v))return new v(h);this.options=o.assign({level:m,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:g,to:""},h||{});var p=this.options;p.raw&&0<p.windowBits?p.windowBits=-p.windowBits:p.gzip&&0<p.windowBits&&p.windowBits<16&&(p.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var _=i.deflateInit2(this.strm,p.level,p.method,p.windowBits,p.memLevel,p.strategy);if(_!==f)throw new Error(l[_]);if(p.header&&i.deflateSetHeader(this.strm,p.header),p.dictionary){var C;if(C=typeof p.dictionary=="string"?a.string2buf(p.dictionary):d.call(p.dictionary)==="[object ArrayBuffer]"?new Uint8Array(p.dictionary):p.dictionary,(_=i.deflateSetDictionary(this.strm,C))!==f)throw new Error(l[_]);this._dict_set=!0}}function x(h,p){var _=new v(p);if(_.push(h,!0),_.err)throw _.msg||l[_.err];return _.result}v.prototype.push=function(h,p){var _,C,E=this.strm,P=this.options.chunkSize;if(this.ended)return!1;C=p===~~p?p:p===!0?4:0,typeof h=="string"?E.input=a.string2buf(h):d.call(h)==="[object ArrayBuffer]"?E.input=new Uint8Array(h):E.input=h,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new o.Buf8(P),E.next_out=0,E.avail_out=P),(_=i.deflate(E,C))!==1&&_!==f)return this.onEnd(_),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(E.output,E.next_out))):this.onData(o.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&_!==1);return C===4?(_=i.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===f):C!==2||(this.onEnd(f),!(E.avail_out=0))},v.prototype.onData=function(h){this.chunks.push(h)},v.prototype.onEnd=function(h){h===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},s.Deflate=v,s.deflate=x,s.deflateRaw=function(h,p){return(p=p||{}).raw=!0,x(h,p)},s.gzip=function(h,p){return(p=p||{}).gzip=!0,x(h,p)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,s){var i=r("./zlib/inflate"),o=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function g(v){if(!(this instanceof g))return new g(v);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},v||{});var x=this.options;x.raw&&0<=x.windowBits&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),!(0<=x.windowBits&&x.windowBits<16)||v&&v.windowBits||(x.windowBits+=32),15<x.windowBits&&x.windowBits<48&&!(15&x.windowBits)&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var h=i.inflateInit2(this.strm,x.windowBits);if(h!==l.Z_OK)throw new Error(u[h]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function w(v,x){var h=new g(x);if(h.push(v,!0),h.err)throw h.msg||u[h.err];return h.result}g.prototype.push=function(v,x){var h,p,_,C,E,P,R=this.strm,j=this.options.chunkSize,D=this.options.dictionary,L=!1;if(this.ended)return!1;p=x===~~x?x:x===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof v=="string"?R.input=a.binstring2buf(v):m.call(v)==="[object ArrayBuffer]"?R.input=new Uint8Array(v):R.input=v,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new o.Buf8(j),R.next_out=0,R.avail_out=j),(h=i.inflate(R,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(P=typeof D=="string"?a.string2buf(D):m.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,h=i.inflateSetDictionary(this.strm,P)),h===l.Z_BUF_ERROR&&L===!0&&(h=l.Z_OK,L=!1),h!==l.Z_STREAM_END&&h!==l.Z_OK)return this.onEnd(h),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&h!==l.Z_STREAM_END&&(R.avail_in!==0||p!==l.Z_FINISH&&p!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=a.utf8border(R.output,R.next_out),C=R.next_out-_,E=a.buf2string(R.output,_),R.next_out=C,R.avail_out=j-C,C&&o.arraySet(R.output,R.output,_,C,0),this.onData(E)):this.onData(o.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)&&h!==l.Z_STREAM_END);return h===l.Z_STREAM_END&&(p=l.Z_FINISH),p===l.Z_FINISH?(h=i.inflateEnd(this.strm),this.onEnd(h),this.ended=!0,h===l.Z_OK):p!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(R.avail_out=0))},g.prototype.onData=function(v){this.chunks.push(v)},g.prototype.onEnd=function(v){v===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},s.Inflate=g,s.inflate=w,s.inflateRaw=function(v,x){return(x=x||{}).raw=!0,w(v,x)},s.ungzip=w},{"./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 i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(l){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},s.shrinkBuf=function(l,u){return l.length===u?l:l.subarray?l.subarray(0,u):(l.length=u,l)};var o={arraySet:function(l,u,d,f,m){if(u.subarray&&l.subarray)l.set(u.subarray(d,d+f),m);else for(var g=0;g<f;g++)l[m+g]=u[d+g]},flattenChunks:function(l){var u,d,f,m,g,w;for(u=f=0,d=l.length;u<d;u++)f+=l[u].length;for(w=new Uint8Array(f),u=m=0,d=l.length;u<d;u++)g=l[u],w.set(g,m),m+=g.length;return w}},a={arraySet:function(l,u,d,f,m){for(var g=0;g<f;g++)l[m+g]=u[d+g]},flattenChunks:function(l){return[].concat.apply([],l)}};s.setTyped=function(l){l?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,o)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(i)},{}],42:[function(r,n,s){var i=r("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var g="",w=0;w<m;w++)g+=String.fromCharCode(f[w]);return g}l[254]=l[254]=1,s.string2buf=function(f){var m,g,w,v,x,h=f.length,p=0;for(v=0;v<h;v++)(64512&(g=f.charCodeAt(v)))==55296&&v+1<h&&(64512&(w=f.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(w-56320),v++),p+=g<128?1:g<2048?2:g<65536?3:4;for(m=new i.Buf8(p),v=x=0;x<p;v++)(64512&(g=f.charCodeAt(v)))==55296&&v+1<h&&(64512&(w=f.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(w-56320),v++),g<128?m[x++]=g:(g<2048?m[x++]=192|g>>>6:(g<65536?m[x++]=224|g>>>12:(m[x++]=240|g>>>18,m[x++]=128|g>>>12&63),m[x++]=128|g>>>6&63),m[x++]=128|63&g);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new i.Buf8(f.length),g=0,w=m.length;g<w;g++)m[g]=f.charCodeAt(g);return m},s.buf2string=function(f,m){var g,w,v,x,h=m||f.length,p=new Array(2*h);for(g=w=0;g<h;)if((v=f[g++])<128)p[w++]=v;else if(4<(x=l[v]))p[w++]=65533,g+=x-1;else{for(v&=x===2?31:x===3?15:7;1<x&&g<h;)v=v<<6|63&f[g++],x--;1<x?p[w++]=65533:v<65536?p[w++]=v:(v-=65536,p[w++]=55296|v>>10&1023,p[w++]=56320|1023&v)}return d(p,w)},s.utf8border=function(f,m){var g;for((m=m||f.length)>f.length&&(m=f.length),g=m-1;0<=g&&(192&f[g])==128;)g--;return g<0||g===0?m:g+l[f[g]]>m?g:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(i,o,a,l){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+o[l++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(r,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,s){var i=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();n.exports=function(o,a,l,u){var d=i,f=u+l;o^=-1;for(var m=u;m<f;m++)o=o>>>8^d[255&(o^a[m])];return-1^o}},{}],46:[function(r,n,s){var i,o=r("../utils/common"),a=r("./trees"),l=r("./adler32"),u=r("./crc32"),d=r("./messages"),f=0,m=4,g=0,w=-2,v=-1,x=4,h=2,p=8,_=9,C=286,E=30,P=19,R=2*C+1,j=15,D=3,L=258,K=L+D+1,T=42,F=113,b=1,$=2,ee=3,Z=4;function Y(k,Q){return k.msg=d[Q],Q}function O(k){return(k<<1)-(4<k?9:0)}function X(k){for(var Q=k.length;0<=--Q;)k[Q]=0}function U(k){var Q=k.state,G=Q.pending;G>k.avail_out&&(G=k.avail_out),G!==0&&(o.arraySet(k.output,Q.pending_buf,Q.pending_out,G,k.next_out),k.next_out+=G,Q.pending_out+=G,k.total_out+=G,k.avail_out-=G,Q.pending-=G,Q.pending===0&&(Q.pending_out=0))}function V(k,Q){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,Q),k.block_start=k.strstart,U(k.strm)}function ue(k,Q){k.pending_buf[k.pending++]=Q}function ne(k,Q){k.pending_buf[k.pending++]=Q>>>8&255,k.pending_buf[k.pending++]=255&Q}function se(k,Q){var G,A,S=k.max_chain_length,N=k.strstart,I=k.prev_length,H=k.nice_match,M=k.strstart>k.w_size-K?k.strstart-(k.w_size-K):0,B=k.window,J=k.w_mask,te=k.prev,he=k.strstart+L,ze=B[N+I-1],We=B[N+I];k.prev_length>=k.good_match&&(S>>=2),H>k.lookahead&&(H=k.lookahead);do if(B[(G=Q)+I]===We&&B[G+I-1]===ze&&B[G]===B[N]&&B[++G]===B[N+1]){N+=2,G++;do;while(B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&B[++N]===B[++G]&&N<he);if(A=L-(he-N),N=he-L,I<A){if(k.match_start=Q,H<=(I=A))break;ze=B[N+I-1],We=B[N+I]}}while((Q=te[Q&J])>M&&--S!=0);return I<=k.lookahead?I:k.lookahead}function Pe(k){var Q,G,A,S,N,I,H,M,B,J,te=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=te+(te-K)){for(o.arraySet(k.window,k.window,te,te,0),k.match_start-=te,k.strstart-=te,k.block_start-=te,Q=G=k.hash_size;A=k.head[--Q],k.head[Q]=te<=A?A-te:0,--G;);for(Q=G=te;A=k.prev[--Q],k.prev[Q]=te<=A?A-te:0,--G;);S+=te}if(k.strm.avail_in===0)break;if(I=k.strm,H=k.window,M=k.strstart+k.lookahead,B=S,J=void 0,J=I.avail_in,B<J&&(J=B),G=J===0?0:(I.avail_in-=J,o.arraySet(H,I.input,I.next_in,J,M),I.state.wrap===1?I.adler=l(I.adler,H,J,M):I.state.wrap===2&&(I.adler=u(I.adler,H,J,M)),I.next_in+=J,I.total_in+=J,J),k.lookahead+=G,k.lookahead+k.insert>=D)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+D-1])&k.hash_mask,k.prev[N&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=N,N++,k.insert--,!(k.lookahead+k.insert<D)););}while(k.lookahead<K&&k.strm.avail_in!==0)}function ce(k,Q){for(var G,A;;){if(k.lookahead<K){if(Pe(k),k.lookahead<K&&Q===f)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=D&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+D-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),G!==0&&k.strstart-G<=k.w_size-K&&(k.match_length=se(k,G)),k.match_length>=D)if(A=a._tr_tally(k,k.strstart-k.match_start,k.match_length-D),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=D){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+D-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else A=a._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(A&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=k.strstart<D-1?k.strstart:D-1,Q===m?(V(k,!0),k.strm.avail_out===0?ee:Z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:$}function me(k,Q){for(var G,A,S;;){if(k.lookahead<K){if(Pe(k),k.lookahead<K&&Q===f)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=D&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+D-1])&k.hash_mask,G=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=D-1,G!==0&&k.prev_length<k.max_lazy_match&&k.strstart-G<=k.w_size-K&&(k.match_length=se(k,G),k.match_length<=5&&(k.strategy===1||k.match_length===D&&4096<k.strstart-k.match_start)&&(k.match_length=D-1)),k.prev_length>=D&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-D,A=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-D),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+D-1])&k.hash_mask,G=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=D-1,k.strstart++,A&&(V(k,!1),k.strm.avail_out===0))return b}else if(k.match_available){if((A=a._tr_tally(k,0,k.window[k.strstart-1]))&&V(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return b}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(A=a._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<D-1?k.strstart:D-1,Q===m?(V(k,!0),k.strm.avail_out===0?ee:Z):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:$}function ke(k,Q,G,A,S){this.good_length=k,this.max_lazy=Q,this.nice_length=G,this.max_chain=A,this.func=S}function De(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*R),this.dyn_dtree=new o.Buf16(2*(2*E+1)),this.bl_tree=new o.Buf16(2*(2*P+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(j+1),this.heap=new o.Buf16(2*C+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*C+1),X(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 Oe(k){var Q;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=h,(Q=k.state).pending=0,Q.pending_out=0,Q.wrap<0&&(Q.wrap=-Q.wrap),Q.status=Q.wrap?T:F,k.adler=Q.wrap===2?0:1,Q.last_flush=f,a._tr_init(Q),g):Y(k,w)}function He(k){var Q=Oe(k);return Q===g&&function(G){G.window_size=2*G.w_size,X(G.head),G.max_lazy_match=i[G.level].max_lazy,G.good_match=i[G.level].good_length,G.nice_match=i[G.level].nice_length,G.max_chain_length=i[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=D-1,G.match_available=0,G.ins_h=0}(k.state),Q}function ut(k,Q,G,A,S,N){if(!k)return w;var I=1;if(Q===v&&(Q=6),A<0?(I=0,A=-A):15<A&&(I=2,A-=16),S<1||_<S||G!==p||A<8||15<A||Q<0||9<Q||N<0||x<N)return Y(k,w);A===8&&(A=9);var H=new De;return(k.state=H).strm=k,H.wrap=I,H.gzhead=null,H.w_bits=A,H.w_size=1<<H.w_bits,H.w_mask=H.w_size-1,H.hash_bits=S+7,H.hash_size=1<<H.hash_bits,H.hash_mask=H.hash_size-1,H.hash_shift=~~((H.hash_bits+D-1)/D),H.window=new o.Buf8(2*H.w_size),H.head=new o.Buf16(H.hash_size),H.prev=new o.Buf16(H.w_size),H.lit_bufsize=1<<S+6,H.pending_buf_size=4*H.lit_bufsize,H.pending_buf=new o.Buf8(H.pending_buf_size),H.d_buf=1*H.lit_bufsize,H.l_buf=3*H.lit_bufsize,H.level=Q,H.strategy=N,H.method=G,He(k)}i=[new ke(0,0,0,0,function(k,Q){var G=65535;for(G>k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Pe(k),k.lookahead===0&&Q===f)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var A=k.block_start+G;if((k.strstart===0||k.strstart>=A)&&(k.lookahead=k.strstart-A,k.strstart=A,V(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-K&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=0,Q===m?(V(k,!0),k.strm.avail_out===0?ee:Z):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new ke(4,4,8,4,ce),new ke(4,5,16,8,ce),new ke(4,6,32,32,ce),new ke(4,4,16,16,me),new ke(8,16,32,32,me),new ke(8,16,128,128,me),new ke(8,32,128,256,me),new ke(32,128,258,1024,me),new ke(32,258,258,4096,me)],s.deflateInit=function(k,Q){return ut(k,Q,p,15,8,0)},s.deflateInit2=ut,s.deflateReset=He,s.deflateResetKeep=Oe,s.deflateSetHeader=function(k,Q){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=Q,g):w},s.deflate=function(k,Q){var G,A,S,N;if(!k||!k.state||5<Q||Q<0)return k?Y(k,w):w;if(A=k.state,!k.output||!k.input&&k.avail_in!==0||A.status===666&&Q!==m)return Y(k,k.avail_out===0?-5:w);if(A.strm=k,G=A.last_flush,A.last_flush=Q,A.status===T)if(A.wrap===2)k.adler=0,ue(A,31),ue(A,139),ue(A,8),A.gzhead?(ue(A,(A.gzhead.text?1:0)+(A.gzhead.hcrc?2:0)+(A.gzhead.extra?4:0)+(A.gzhead.name?8:0)+(A.gzhead.comment?16:0)),ue(A,255&A.gzhead.time),ue(A,A.gzhead.time>>8&255),ue(A,A.gzhead.time>>16&255),ue(A,A.gzhead.time>>24&255),ue(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),ue(A,255&A.gzhead.os),A.gzhead.extra&&A.gzhead.extra.length&&(ue(A,255&A.gzhead.extra.length),ue(A,A.gzhead.extra.length>>8&255)),A.gzhead.hcrc&&(k.adler=u(k.adler,A.pending_buf,A.pending,0)),A.gzindex=0,A.status=69):(ue(A,0),ue(A,0),ue(A,0),ue(A,0),ue(A,0),ue(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),ue(A,3),A.status=F);else{var I=p+(A.w_bits-8<<4)<<8;I|=(2<=A.strategy||A.level<2?0:A.level<6?1:A.level===6?2:3)<<6,A.strstart!==0&&(I|=32),I+=31-I%31,A.status=F,ne(A,I),A.strstart!==0&&(ne(A,k.adler>>>16),ne(A,65535&k.adler)),k.adler=1}if(A.status===69)if(A.gzhead.extra){for(S=A.pending;A.gzindex<(65535&A.gzhead.extra.length)&&(A.pending!==A.pending_buf_size||(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),U(k),S=A.pending,A.pending!==A.pending_buf_size));)ue(A,255&A.gzhead.extra[A.gzindex]),A.gzindex++;A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),A.gzindex===A.gzhead.extra.length&&(A.gzindex=0,A.status=73)}else A.status=73;if(A.status===73)if(A.gzhead.name){S=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),U(k),S=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.name.length?255&A.gzhead.name.charCodeAt(A.gzindex++):0,ue(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),N===0&&(A.gzindex=0,A.status=91)}else A.status=91;if(A.status===91)if(A.gzhead.comment){S=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),U(k),S=A.pending,A.pending===A.pending_buf_size)){N=1;break}N=A.gzindex<A.gzhead.comment.length?255&A.gzhead.comment.charCodeAt(A.gzindex++):0,ue(A,N)}while(N!==0);A.gzhead.hcrc&&A.pending>S&&(k.adler=u(k.adler,A.pending_buf,A.pending-S,S)),N===0&&(A.status=103)}else A.status=103;if(A.status===103&&(A.gzhead.hcrc?(A.pending+2>A.pending_buf_size&&U(k),A.pending+2<=A.pending_buf_size&&(ue(A,255&k.adler),ue(A,k.adler>>8&255),k.adler=0,A.status=F)):A.status=F),A.pending!==0){if(U(k),k.avail_out===0)return A.last_flush=-1,g}else if(k.avail_in===0&&O(Q)<=O(G)&&Q!==m)return Y(k,-5);if(A.status===666&&k.avail_in!==0)return Y(k,-5);if(k.avail_in!==0||A.lookahead!==0||Q!==f&&A.status!==666){var H=A.strategy===2?function(M,B){for(var J;;){if(M.lookahead===0&&(Pe(M),M.lookahead===0)){if(B===f)return b;break}if(M.match_length=0,J=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,J&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,B===m?(V(M,!0),M.strm.avail_out===0?ee:Z):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(A,Q):A.strategy===3?function(M,B){for(var J,te,he,ze,We=M.window;;){if(M.lookahead<=L){if(Pe(M),M.lookahead<=L&&B===f)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=D&&0<M.strstart&&(te=We[he=M.strstart-1])===We[++he]&&te===We[++he]&&te===We[++he]){ze=M.strstart+L;do;while(te===We[++he]&&te===We[++he]&&te===We[++he]&&te===We[++he]&&te===We[++he]&&te===We[++he]&&te===We[++he]&&te===We[++he]&&he<ze);M.match_length=L-(ze-he),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=D?(J=a._tr_tally(M,1,M.match_length-D),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(J=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),J&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,B===m?(V(M,!0),M.strm.avail_out===0?ee:Z):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(A,Q):i[A.level].func(A,Q);if(H!==ee&&H!==Z||(A.status=666),H===b||H===ee)return k.avail_out===0&&(A.last_flush=-1),g;if(H===$&&(Q===1?a._tr_align(A):Q!==5&&(a._tr_stored_block(A,0,0,!1),Q===3&&(X(A.head),A.lookahead===0&&(A.strstart=0,A.block_start=0,A.insert=0))),U(k),k.avail_out===0))return A.last_flush=-1,g}return Q!==m?g:A.wrap<=0?1:(A.wrap===2?(ue(A,255&k.adler),ue(A,k.adler>>8&255),ue(A,k.adler>>16&255),ue(A,k.adler>>24&255),ue(A,255&k.total_in),ue(A,k.total_in>>8&255),ue(A,k.total_in>>16&255),ue(A,k.total_in>>24&255)):(ne(A,k.adler>>>16),ne(A,65535&k.adler)),U(k),0<A.wrap&&(A.wrap=-A.wrap),A.pending!==0?g:1)},s.deflateEnd=function(k){var Q;return k&&k.state?(Q=k.state.status)!==T&&Q!==69&&Q!==73&&Q!==91&&Q!==103&&Q!==F&&Q!==666?Y(k,w):(k.state=null,Q===F?Y(k,-3):g):w},s.deflateSetDictionary=function(k,Q){var G,A,S,N,I,H,M,B,J=Q.length;if(!k||!k.state||(N=(G=k.state).wrap)===2||N===1&&G.status!==T||G.lookahead)return w;for(N===1&&(k.adler=l(k.adler,Q,J,0)),G.wrap=0,J>=G.w_size&&(N===0&&(X(G.head),G.strstart=0,G.block_start=0,G.insert=0),B=new o.Buf8(G.w_size),o.arraySet(B,Q,J-G.w_size,G.w_size,0),Q=B,J=G.w_size),I=k.avail_in,H=k.next_in,M=k.input,k.avail_in=J,k.next_in=0,k.input=Q,Pe(G);G.lookahead>=D;){for(A=G.strstart,S=G.lookahead-(D-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[A+D-1])&G.hash_mask,G.prev[A&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=A,A++,--S;);G.strstart=A,G.lookahead=D-1,Pe(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=D-1,G.match_available=0,k.next_in=H,k.input=M,k.avail_in=I,G.wrap=N,g},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(i,o){var a,l,u,d,f,m,g,w,v,x,h,p,_,C,E,P,R,j,D,L,K,T,F,b,$;a=i.state,l=i.next_in,b=i.input,u=l+(i.avail_in-5),d=i.next_out,$=i.output,f=d-(o-i.avail_out),m=d+(i.avail_out-257),g=a.dmax,w=a.wsize,v=a.whave,x=a.wnext,h=a.window,p=a.hold,_=a.bits,C=a.lencode,E=a.distcode,P=(1<<a.lenbits)-1,R=(1<<a.distbits)-1;e:do{_<15&&(p+=b[l++]<<_,_+=8,p+=b[l++]<<_,_+=8),j=C[p&P];t:for(;;){if(p>>>=D=j>>>24,_-=D,(D=j>>>16&255)===0)$[d++]=65535&j;else{if(!(16&D)){if(!(64&D)){j=C[(65535&j)+(p&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}L=65535&j,(D&=15)&&(_<D&&(p+=b[l++]<<_,_+=8),L+=p&(1<<D)-1,p>>>=D,_-=D),_<15&&(p+=b[l++]<<_,_+=8,p+=b[l++]<<_,_+=8),j=E[p&R];r:for(;;){if(p>>>=D=j>>>24,_-=D,!(16&(D=j>>>16&255))){if(!(64&D)){j=E[(65535&j)+(p&(1<<D)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(K=65535&j,_<(D&=15)&&(p+=b[l++]<<_,(_+=8)<D&&(p+=b[l++]<<_,_+=8)),g<(K+=p&(1<<D)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(p>>>=D,_-=D,(D=d-f)<K){if(v<(D=K-D)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(F=h,(T=0)===x){if(T+=w-D,D<L){for(L-=D;$[d++]=h[T++],--D;);T=d-K,F=$}}else if(x<D){if(T+=w+x-D,(D-=x)<L){for(L-=D;$[d++]=h[T++],--D;);if(T=0,x<L){for(L-=D=x;$[d++]=h[T++],--D;);T=d-K,F=$}}}else if(T+=x-D,D<L){for(L-=D;$[d++]=h[T++],--D;);T=d-K,F=$}for(;2<L;)$[d++]=F[T++],$[d++]=F[T++],$[d++]=F[T++],L-=3;L&&($[d++]=F[T++],1<L&&($[d++]=F[T++]))}else{for(T=d-K;$[d++]=$[T++],$[d++]=$[T++],$[d++]=$[T++],2<(L-=3););L&&($[d++]=$[T++],1<L&&($[d++]=$[T++]))}break}}break}}while(l<u&&d<m);l-=L=_>>3,p&=(1<<(_-=L<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<u?u-l+5:5-(l-u),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=p,a.bits=_}},{}],49:[function(r,n,s){var i=r("../utils/common"),o=r("./adler32"),a=r("./crc32"),l=r("./inffast"),u=r("./inftrees"),d=1,f=2,m=0,g=-2,w=1,v=852,x=592;function h(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(T){var F;return T&&T.state?(F=T.state,T.total_in=T.total_out=F.total=0,T.msg="",F.wrap&&(T.adler=1&F.wrap),F.mode=w,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(v),F.distcode=F.distdyn=new i.Buf32(x),F.sane=1,F.back=-1,m):g}function C(T){var F;return T&&T.state?((F=T.state).wsize=0,F.whave=0,F.wnext=0,_(T)):g}function E(T,F){var b,$;return T&&T.state?($=T.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?g:($.window!==null&&$.wbits!==F&&($.window=null),$.wrap=b,$.wbits=F,C(T))):g}function P(T,F){var b,$;return T?($=new p,(T.state=$).window=null,(b=E(T,F))!==m&&(T.state=null),b):g}var R,j,D=!0;function L(T){if(D){var F;for(R=new i.Buf32(512),j=new i.Buf32(32),F=0;F<144;)T.lens[F++]=8;for(;F<256;)T.lens[F++]=9;for(;F<280;)T.lens[F++]=7;for(;F<288;)T.lens[F++]=8;for(u(d,T.lens,0,288,R,0,T.work,{bits:9}),F=0;F<32;)T.lens[F++]=5;u(f,T.lens,0,32,j,0,T.work,{bits:5}),D=!1}T.lencode=R,T.lenbits=9,T.distcode=j,T.distbits=5}function K(T,F,b,$){var ee,Z=T.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new i.Buf8(Z.wsize)),$>=Z.wsize?(i.arraySet(Z.window,F,b-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):($<(ee=Z.wsize-Z.wnext)&&(ee=$),i.arraySet(Z.window,F,b-$,ee,Z.wnext),($-=ee)?(i.arraySet(Z.window,F,b-$,$,0),Z.wnext=$,Z.whave=Z.wsize):(Z.wnext+=ee,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=ee))),0}s.inflateReset=C,s.inflateReset2=E,s.inflateResetKeep=_,s.inflateInit=function(T){return P(T,15)},s.inflateInit2=P,s.inflate=function(T,F){var b,$,ee,Z,Y,O,X,U,V,ue,ne,se,Pe,ce,me,ke,De,Oe,He,ut,k,Q,G,A,S=0,N=new i.Buf8(4),I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return g;(b=T.state).mode===12&&(b.mode=13),Y=T.next_out,ee=T.output,X=T.avail_out,Z=T.next_in,$=T.input,O=T.avail_in,U=b.hold,V=b.bits,ue=O,ne=X,Q=m;e:for(;;)switch(b.mode){case w:if(b.wrap===0){b.mode=13;break}for(;V<16;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(2&b.wrap&&U===35615){N[b.check=0]=255&U,N[1]=U>>>8&255,b.check=a(b.check,N,2,0),V=U=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&U)<<8)+(U>>8))%31){T.msg="incorrect header check",b.mode=30;break}if((15&U)!=8){T.msg="unknown compression method",b.mode=30;break}if(V-=4,k=8+(15&(U>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){T.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,T.adler=b.check=1,b.mode=512&U?10:12,V=U=0;break;case 2:for(;V<16;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(b.flags=U,(255&b.flags)!=8){T.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){T.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=U>>8&1),512&b.flags&&(N[0]=255&U,N[1]=U>>>8&255,b.check=a(b.check,N,2,0)),V=U=0,b.mode=3;case 3:for(;V<32;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.head&&(b.head.time=U),512&b.flags&&(N[0]=255&U,N[1]=U>>>8&255,N[2]=U>>>16&255,N[3]=U>>>24&255,b.check=a(b.check,N,4,0)),V=U=0,b.mode=4;case 4:for(;V<16;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.head&&(b.head.xflags=255&U,b.head.os=U>>8),512&b.flags&&(N[0]=255&U,N[1]=U>>>8&255,b.check=a(b.check,N,2,0)),V=U=0,b.mode=5;case 5:if(1024&b.flags){for(;V<16;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.length=U,b.head&&(b.head.extra_len=U),512&b.flags&&(N[0]=255&U,N[1]=U>>>8&255,b.check=a(b.check,N,2,0)),V=U=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(O<(se=b.length)&&(se=O),se&&(b.head&&(k=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),i.arraySet(b.head.extra,$,Z,se,k)),512&b.flags&&(b.check=a(b.check,$,se,Z)),O-=se,Z+=se,b.length-=se),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(O===0)break e;for(se=0;k=$[Z+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se<O;);if(512&b.flags&&(b.check=a(b.check,$,se,Z)),O-=se,Z+=se,k)break e}else b.head&&(b.head.name=null);b.length=0,b.mode=8;case 8:if(4096&b.flags){if(O===0)break e;for(se=0;k=$[Z+se++],b.head&&k&&b.length<65536&&(b.head.comment+=String.fromCharCode(k)),k&&se<O;);if(512&b.flags&&(b.check=a(b.check,$,se,Z)),O-=se,Z+=se,k)break e}else b.head&&(b.head.comment=null);b.mode=9;case 9:if(512&b.flags){for(;V<16;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(U!==(65535&b.check)){T.msg="header crc mismatch",b.mode=30;break}V=U=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),T.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}T.adler=b.check=h(U),V=U=0,b.mode=11;case 11:if(b.havedict===0)return T.next_out=Y,T.avail_out=X,T.next_in=Z,T.avail_in=O,b.hold=U,b.bits=V,2;T.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){U>>>=7&V,V-=7&V,b.mode=27;break}for(;V<3;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}switch(b.last=1&U,V-=1,3&(U>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;U>>>=2,V-=2;break e;case 2:b.mode=17;break;case 3:T.msg="invalid block type",b.mode=30}U>>>=2,V-=2;break;case 14:for(U>>>=7&V,V-=7&V;V<32;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if((65535&U)!=(U>>>16^65535)){T.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&U,V=U=0,b.mode=15,F===6)break e;case 15:b.mode=16;case 16:if(se=b.length){if(O<se&&(se=O),X<se&&(se=X),se===0)break e;i.arraySet(ee,$,Z,se,Y),O-=se,Z+=se,X-=se,Y+=se,b.length-=se;break}b.mode=12;break;case 17:for(;V<14;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(b.nlen=257+(31&U),U>>>=5,V-=5,b.ndist=1+(31&U),U>>>=5,V-=5,b.ncode=4+(15&U),U>>>=4,V-=4,286<b.nlen||30<b.ndist){T.msg="too many length or distance symbols",b.mode=30;break}b.have=0,b.mode=18;case 18:for(;b.have<b.ncode;){for(;V<3;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.lens[I[b.have++]]=7&U,U>>>=3,V-=3}for(;b.have<19;)b.lens[I[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},Q=u(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,Q){T.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[U&(1<<b.lenbits)-1])>>>16&255,De=65535&S,!((me=S>>>24)<=V);){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(De<16)U>>>=me,V-=me,b.lens[b.have++]=De;else{if(De===16){for(A=me+2;V<A;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(U>>>=me,V-=me,b.have===0){T.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&U),U>>>=2,V-=2}else if(De===17){for(A=me+3;V<A;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}V-=me,k=0,se=3+(7&(U>>>=me)),U>>>=3,V-=3}else{for(A=me+7;V<A;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}V-=me,k=0,se=11+(127&(U>>>=me)),U>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){T.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){T.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},Q=u(d,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,Q){T.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},Q=u(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,Q){T.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<=O&&258<=X){T.next_out=Y,T.avail_out=X,T.next_in=Z,T.avail_in=O,b.hold=U,b.bits=V,l(T,ne),Y=T.next_out,ee=T.output,X=T.avail_out,Z=T.next_in,$=T.input,O=T.avail_in,U=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;ke=(S=b.lencode[U&(1<<b.lenbits)-1])>>>16&255,De=65535&S,!((me=S>>>24)<=V);){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(ke&&!(240&ke)){for(Oe=me,He=ke,ut=De;ke=(S=b.lencode[ut+((U&(1<<Oe+He)-1)>>Oe)])>>>16&255,De=65535&S,!(Oe+(me=S>>>24)<=V);){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}U>>>=Oe,V-=Oe,b.back+=Oe}if(U>>>=me,V-=me,b.back+=me,b.length=De,ke===0){b.mode=26;break}if(32&ke){b.back=-1,b.mode=12;break}if(64&ke){T.msg="invalid literal/length code",b.mode=30;break}b.extra=15&ke,b.mode=22;case 22:if(b.extra){for(A=b.extra;V<A;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.length+=U&(1<<b.extra)-1,U>>>=b.extra,V-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;ke=(S=b.distcode[U&(1<<b.distbits)-1])>>>16&255,De=65535&S,!((me=S>>>24)<=V);){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(!(240&ke)){for(Oe=me,He=ke,ut=De;ke=(S=b.distcode[ut+((U&(1<<Oe+He)-1)>>Oe)])>>>16&255,De=65535&S,!(Oe+(me=S>>>24)<=V);){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}U>>>=Oe,V-=Oe,b.back+=Oe}if(U>>>=me,V-=me,b.back+=me,64&ke){T.msg="invalid distance code",b.mode=30;break}b.offset=De,b.extra=15&ke,b.mode=24;case 24:if(b.extra){for(A=b.extra;V<A;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}b.offset+=U&(1<<b.extra)-1,U>>>=b.extra,V-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){T.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(X===0)break e;if(se=ne-X,b.offset>se){if((se=b.offset-se)>b.whave&&b.sane){T.msg="invalid distance too far back",b.mode=30;break}Pe=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),ce=b.window}else ce=ee,Pe=Y-b.offset,se=b.length;for(X<se&&(se=X),X-=se,b.length-=se;ee[Y++]=ce[Pe++],--se;);b.length===0&&(b.mode=21);break;case 26:if(X===0)break e;ee[Y++]=b.length,X--,b.mode=21;break;case 27:if(b.wrap){for(;V<32;){if(O===0)break e;O--,U|=$[Z++]<<V,V+=8}if(ne-=X,T.total_out+=ne,b.total+=ne,ne&&(T.adler=b.check=b.flags?a(b.check,ee,ne,Y-ne):o(b.check,ee,ne,Y-ne)),ne=X,(b.flags?U:h(U))!==b.check){T.msg="incorrect data check",b.mode=30;break}V=U=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;V<32;){if(O===0)break e;O--,U+=$[Z++]<<V,V+=8}if(U!==(4294967295&b.total)){T.msg="incorrect length check",b.mode=30;break}V=U=0}b.mode=29;case 29:Q=1;break e;case 30:Q=-3;break e;case 31:return-4;case 32:default:return g}return T.next_out=Y,T.avail_out=X,T.next_in=Z,T.avail_in=O,b.hold=U,b.bits=V,(b.wsize||ne!==T.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&K(T,T.output,T.next_out,ne-T.avail_out)?(b.mode=31,-4):(ue-=T.avail_in,ne-=T.avail_out,T.total_in+=ue,T.total_out+=ne,b.total+=ne,b.wrap&&ne&&(T.adler=b.check=b.flags?a(b.check,ee,ne,T.next_out-ne):o(b.check,ee,ne,T.next_out-ne)),T.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(ue==0&&ne===0||F===4)&&Q===m&&(Q=-5),Q)},s.inflateEnd=function(T){if(!T||!T.state)return g;var F=T.state;return F.window&&(F.window=null),T.state=null,m},s.inflateGetHeader=function(T,F){var b;return T&&T.state&&2&(b=T.state).wrap?((b.head=F).done=!1,m):g},s.inflateSetDictionary=function(T,F){var b,$=F.length;return T&&T.state?(b=T.state).wrap!==0&&b.mode!==11?g:b.mode===11&&o(1,F,$,0)!==b.check?-3:K(T,F,$,$)?(b.mode=31,-4):(b.havedict=1,m):g},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,s){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(d,f,m,g,w,v,x,h){var p,_,C,E,P,R,j,D,L,K=h.bits,T=0,F=0,b=0,$=0,ee=0,Z=0,Y=0,O=0,X=0,U=0,V=null,ue=0,ne=new i.Buf16(16),se=new i.Buf16(16),Pe=null,ce=0;for(T=0;T<=15;T++)ne[T]=0;for(F=0;F<g;F++)ne[f[m+F]]++;for(ee=K,$=15;1<=$&&ne[$]===0;$--);if($<ee&&(ee=$),$===0)return w[v++]=20971520,w[v++]=20971520,h.bits=1,0;for(b=1;b<$&&ne[b]===0;b++);for(ee<b&&(ee=b),T=O=1;T<=15;T++)if(O<<=1,(O-=ne[T])<0)return-1;if(0<O&&(d===0||$!==1))return-1;for(se[1]=0,T=1;T<15;T++)se[T+1]=se[T]+ne[T];for(F=0;F<g;F++)f[m+F]!==0&&(x[se[f[m+F]]++]=F);if(R=d===0?(V=Pe=x,19):d===1?(V=o,ue-=257,Pe=a,ce-=257,256):(V=l,Pe=u,-1),T=b,P=v,Y=F=U=0,C=-1,E=(X=1<<(Z=ee))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(j=T-Y,L=x[F]<R?(D=0,x[F]):x[F]>R?(D=Pe[ce+x[F]],V[ue+x[F]]):(D=96,0),p=1<<T-Y,b=_=1<<Z;w[P+(U>>Y)+(_-=p)]=j<<24|D<<16|L|0,_!==0;);for(p=1<<T-1;U&p;)p>>=1;if(p!==0?(U&=p-1,U+=p):U=0,F++,--ne[T]==0){if(T===$)break;T=f[m+x[F]]}if(ee<T&&(U&E)!==C){for(Y===0&&(Y=ee),P+=b,O=1<<(Z=T-Y);Z+Y<$&&!((O-=ne[Z+Y])<=0);)Z++,O<<=1;if(X+=1<<Z,d===1&&852<X||d===2&&592<X)return 1;w[C=U&E]=ee<<24|Z<<16|P-v|0}}return U!==0&&(w[P+U]=T-Y<<24|64<<16|0),h.bits=ee,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 i=r("../utils/common"),o=0,a=1;function l(S){for(var N=S.length;0<=--N;)S[N]=0}var u=0,d=29,f=256,m=f+1+d,g=30,w=19,v=2*m+1,x=15,h=16,p=7,_=256,C=16,E=17,P=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],j=[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],D=[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],K=new Array(2*(m+2));l(K);var T=new Array(2*g);l(T);var F=new Array(512);l(F);var b=new Array(256);l(b);var $=new Array(d);l($);var ee,Z,Y,O=new Array(g);function X(S,N,I,H,M){this.static_tree=S,this.extra_bits=N,this.extra_base=I,this.elems=H,this.max_length=M,this.has_stree=S&&S.length}function U(S,N){this.dyn_tree=S,this.max_code=0,this.stat_desc=N}function V(S){return S<256?F[S]:F[256+(S>>>7)]}function ue(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,I){S.bi_valid>h-I?(S.bi_buf|=N<<S.bi_valid&65535,ue(S,S.bi_buf),S.bi_buf=N>>h-S.bi_valid,S.bi_valid+=I-h):(S.bi_buf|=N<<S.bi_valid&65535,S.bi_valid+=I)}function se(S,N,I){ne(S,I[2*N],I[2*N+1])}function Pe(S,N){for(var I=0;I|=1&S,S>>>=1,I<<=1,0<--N;);return I>>>1}function ce(S,N,I){var H,M,B=new Array(x+1),J=0;for(H=1;H<=x;H++)B[H]=J=J+I[H-1]<<1;for(M=0;M<=N;M++){var te=S[2*M+1];te!==0&&(S[2*M]=Pe(B[te]++,te))}}function me(S){var N;for(N=0;N<m;N++)S.dyn_ltree[2*N]=0;for(N=0;N<g;N++)S.dyn_dtree[2*N]=0;for(N=0;N<w;N++)S.bl_tree[2*N]=0;S.dyn_ltree[2*_]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function ke(S){8<S.bi_valid?ue(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 De(S,N,I,H){var M=2*N,B=2*I;return S[M]<S[B]||S[M]===S[B]&&H[N]<=H[I]}function Oe(S,N,I){for(var H=S.heap[I],M=I<<1;M<=S.heap_len&&(M<S.heap_len&&De(N,S.heap[M+1],S.heap[M],S.depth)&&M++,!De(N,H,S.heap[M],S.depth));)S.heap[I]=S.heap[M],I=M,M<<=1;S.heap[I]=H}function He(S,N,I){var H,M,B,J,te=0;if(S.last_lit!==0)for(;H=S.pending_buf[S.d_buf+2*te]<<8|S.pending_buf[S.d_buf+2*te+1],M=S.pending_buf[S.l_buf+te],te++,H===0?se(S,M,N):(se(S,(B=b[M])+f+1,N),(J=R[B])!==0&&ne(S,M-=$[B],J),se(S,B=V(--H),I),(J=j[B])!==0&&ne(S,H-=O[B],J)),te<S.last_lit;);se(S,_,N)}function ut(S,N){var I,H,M,B=N.dyn_tree,J=N.stat_desc.static_tree,te=N.stat_desc.has_stree,he=N.stat_desc.elems,ze=-1;for(S.heap_len=0,S.heap_max=v,I=0;I<he;I++)B[2*I]!==0?(S.heap[++S.heap_len]=ze=I,S.depth[I]=0):B[2*I+1]=0;for(;S.heap_len<2;)B[2*(M=S.heap[++S.heap_len]=ze<2?++ze:0)]=1,S.depth[M]=0,S.opt_len--,te&&(S.static_len-=J[2*M+1]);for(N.max_code=ze,I=S.heap_len>>1;1<=I;I--)Oe(S,B,I);for(M=he;I=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Oe(S,B,1),H=S.heap[1],S.heap[--S.heap_max]=I,S.heap[--S.heap_max]=H,B[2*M]=B[2*I]+B[2*H],S.depth[M]=(S.depth[I]>=S.depth[H]?S.depth[I]:S.depth[H])+1,B[2*I+1]=B[2*H+1]=M,S.heap[1]=M++,Oe(S,B,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(We,qt){var Xt,Et,Pn,ht,Ds,dr,Gr=qt.dyn_tree,Ta=qt.max_code,Nc=qt.stat_desc.static_tree,Jf=qt.stat_desc.has_stree,Rc=qt.stat_desc.extra_bits,Ri=qt.stat_desc.extra_base,Os=qt.stat_desc.max_length,Ms=0;for(ht=0;ht<=x;ht++)We.bl_count[ht]=0;for(Gr[2*We.heap[We.heap_max]+1]=0,Xt=We.heap_max+1;Xt<v;Xt++)Os<(ht=Gr[2*Gr[2*(Et=We.heap[Xt])+1]+1]+1)&&(ht=Os,Ms++),Gr[2*Et+1]=ht,Ta<Et||(We.bl_count[ht]++,Ds=0,Ri<=Et&&(Ds=Rc[Et-Ri]),dr=Gr[2*Et],We.opt_len+=dr*(ht+Ds),Jf&&(We.static_len+=dr*(Nc[2*Et+1]+Ds)));if(Ms!==0){do{for(ht=Os-1;We.bl_count[ht]===0;)ht--;We.bl_count[ht]--,We.bl_count[ht+1]+=2,We.bl_count[Os]--,Ms-=2}while(0<Ms);for(ht=Os;ht!==0;ht--)for(Et=We.bl_count[ht];Et!==0;)Ta<(Pn=We.heap[--Xt])||(Gr[2*Pn+1]!==ht&&(We.opt_len+=(ht-Gr[2*Pn+1])*Gr[2*Pn],Gr[2*Pn+1]=ht),Et--)}}(S,N),ce(B,ze,S.bl_count)}function k(S,N,I){var H,M,B=-1,J=N[1],te=0,he=7,ze=4;for(J===0&&(he=138,ze=3),N[2*(I+1)+1]=65535,H=0;H<=I;H++)M=J,J=N[2*(H+1)+1],++te<he&&M===J||(te<ze?S.bl_tree[2*M]+=te:M!==0?(M!==B&&S.bl_tree[2*M]++,S.bl_tree[2*C]++):te<=10?S.bl_tree[2*E]++:S.bl_tree[2*P]++,B=M,ze=(te=0)===J?(he=138,3):M===J?(he=6,3):(he=7,4))}function Q(S,N,I){var H,M,B=-1,J=N[1],te=0,he=7,ze=4;for(J===0&&(he=138,ze=3),H=0;H<=I;H++)if(M=J,J=N[2*(H+1)+1],!(++te<he&&M===J)){if(te<ze)for(;se(S,M,S.bl_tree),--te!=0;);else M!==0?(M!==B&&(se(S,M,S.bl_tree),te--),se(S,C,S.bl_tree),ne(S,te-3,2)):te<=10?(se(S,E,S.bl_tree),ne(S,te-3,3)):(se(S,P,S.bl_tree),ne(S,te-11,7));B=M,ze=(te=0)===J?(he=138,3):M===J?(he=6,3):(he=7,4)}}l(O);var G=!1;function A(S,N,I,H){ne(S,(u<<1)+(H?1:0),3),function(M,B,J,te){ke(M),ue(M,J),ue(M,~J),i.arraySet(M.pending_buf,M.window,B,J,M.pending),M.pending+=J}(S,N,I)}s._tr_init=function(S){G||(function(){var N,I,H,M,B,J=new Array(x+1);for(M=H=0;M<d-1;M++)for($[M]=H,N=0;N<1<<R[M];N++)b[H++]=M;for(b[H-1]=M,M=B=0;M<16;M++)for(O[M]=B,N=0;N<1<<j[M];N++)F[B++]=M;for(B>>=7;M<g;M++)for(O[M]=B<<7,N=0;N<1<<j[M]-7;N++)F[256+B++]=M;for(I=0;I<=x;I++)J[I]=0;for(N=0;N<=143;)K[2*N+1]=8,N++,J[8]++;for(;N<=255;)K[2*N+1]=9,N++,J[9]++;for(;N<=279;)K[2*N+1]=7,N++,J[7]++;for(;N<=287;)K[2*N+1]=8,N++,J[8]++;for(ce(K,m+1,J),N=0;N<g;N++)T[2*N+1]=5,T[2*N]=Pe(N,5);ee=new X(K,R,f+1,m,x),Z=new X(T,j,0,g,x),Y=new X(new Array(0),D,0,w,p)}(),G=!0),S.l_desc=new U(S.dyn_ltree,ee),S.d_desc=new U(S.dyn_dtree,Z),S.bl_desc=new U(S.bl_tree,Y),S.bi_buf=0,S.bi_valid=0,me(S)},s._tr_stored_block=A,s._tr_flush_block=function(S,N,I,H){var M,B,J=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(te){var he,ze=4093624447;for(he=0;he<=31;he++,ze>>>=1)if(1&ze&&te.dyn_ltree[2*he]!==0)return o;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(he=32;he<f;he++)if(te.dyn_ltree[2*he]!==0)return a;return o}(S)),ut(S,S.l_desc),ut(S,S.d_desc),J=function(te){var he;for(k(te,te.dyn_ltree,te.l_desc.max_code),k(te,te.dyn_dtree,te.d_desc.max_code),ut(te,te.bl_desc),he=w-1;3<=he&&te.bl_tree[2*L[he]+1]===0;he--);return te.opt_len+=3*(he+1)+5+5+4,he}(S),M=S.opt_len+3+7>>>3,(B=S.static_len+3+7>>>3)<=M&&(M=B)):M=B=I+5,I+4<=M&&N!==-1?A(S,N,I,H):S.strategy===4||B===M?(ne(S,2+(H?1:0),3),He(S,K,T)):(ne(S,4+(H?1:0),3),function(te,he,ze,We){var qt;for(ne(te,he-257,5),ne(te,ze-1,5),ne(te,We-4,4),qt=0;qt<We;qt++)ne(te,te.bl_tree[2*L[qt]+1],3);Q(te,te.dyn_ltree,he-1),Q(te,te.dyn_dtree,ze-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,J+1),He(S,S.dyn_ltree,S.dyn_dtree)),me(S),H&&ke(S)},s._tr_tally=function(S,N,I){return S.pending_buf[S.d_buf+2*S.last_lit]=N>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&I,S.last_lit++,N===0?S.dyn_ltree[2*I]++:(S.matches++,N--,S.dyn_ltree[2*(b[I]+f+1)]++,S.dyn_dtree[2*V(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,_,K),function(N){N.bi_valid===16?(ue(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(S)}},{"../utils/common":41}],53:[function(r,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,n,s){(function(i){(function(o,a){if(!o.setImmediate){var l,u,d,f,m=1,g={},w=!1,v=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){p(C)})}:function(){if(o.postMessage&&!o.importScripts){var C=!0,E=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=E,C}}()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",_,!1):o.attachEvent("onmessage",_),function(C){o.postMessage(f+C,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){p(C.data)},function(C){d.port2.postMessage(C)}):v&&"onreadystatechange"in v.createElement("script")?(u=v.documentElement,function(C){var E=v.createElement("script");E.onreadystatechange=function(){p(C),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(C){setTimeout(p,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),P=0;P<E.length;P++)E[P]=arguments[P+1];var R={callback:C,args:E};return g[m]=R,l(m),m++},x.clearImmediate=h}function h(C){delete g[C]}function p(C){if(w)setTimeout(p,0,C);else{var E=g[C];if(E){w=!0;try{(function(P){var R=P.callback,j=P.args;switch(j.length){case 0:R();break;case 1:R(j[0]);break;case 2:R(j[0],j[1]);break;case 3:R(j[0],j[1],j[2]);break;default:R.apply(a,j)}})(E)}finally{h(C),w=!1}}}}function _(C){C.source===o&&typeof C.data=="string"&&C.data.indexOf(f)===0&&p(+C.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Fc<"u"?Fc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sE);var c6=sE.exports;const u6=Dm(c6);function d6(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 f6=async(e,t)=>{const r=new u6;t.forEach(i=>{r.file(i.name,i.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},ca=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)},h6=e=>ca(e).split(" ")[0];function iE(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"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${i}:${o}:${a}`}const p6=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=ft();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:iE(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},m6=async()=>{const e=ft(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:iE(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}},g6=async e=>await ft().collection("domains").getOne(e),xm=async e=>e.id?await ft().collection("domains").update(e.id,e):await ft().collection("domains").create(e),v6=async e=>await ft().collection("domains").delete(e),y6=(e,t)=>ft().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),x6=e=>{ft().collection("domains").unsubscribe(e)},w6=()=>{const e=Cc(),t=on(),r=Hn(),n=new URLSearchParams(r.search),s=n.get("page"),i=n.get("state"),[o,a]=y.useState(0),l=()=>{t("/edit")},u=p=>{n.set("page",p.toString()),t(`?${n.toString()}`)},d=p=>{t(`/edit?id=${p}`)},f=p=>{t(`/history?domain=${p}`)},m=async p=>{try{await v6(p),w(g.filter(_=>_.id!==p))}catch(_){console.error("Error deleting domain:",_)}},[g,w]=y.useState([]);y.useEffect(()=>{(async()=>{const _=await p6({page:s?Number(s):1,perPage:10,state:i||""});w(_.items),a(_.totalPages)})()},[s,i]);const v=async p=>{const _=g.filter(R=>R.id===p),C=_[0].enabled,E=_[0];E.enabled=!C,await xm(E);const P=g.map(R=>R.id===p?{...R,checked:!C}:R);w(P)},x=async p=>{try{x6(p.id),y6(p.id,_=>{console.log(_);const C=g.map(E=>E.id===_.id?{..._}:E);w(C)}),p.rightnow=!0,await xm(p),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(hr,{to:`/history?domain=${p.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},h=async p=>{const _=`${p.id}-${p.domain}.zip`,C=[{name:`${p.domain}.pem`,content:p.certificate?p.certificate:""},{name:`${p.domain}.key`,content:p.privateKey?p.privateKey:""}];await f6(_,C)};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(ey,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(Je,{onClick:l,children:"新增域名"})]}),g.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-40",children:"域名"}),c.jsx("div",{className:"w-48",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-32",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),g.map(p=>{var _,C,E,P,R,j;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:p.domain}),c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:p.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[h6(p.expiredAt),"到期"]})]}):"---"})}),c.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:p.lastDeployedAt&&((_=p.expand)!=null&&_.lastDeployment)?c.jsx(c.Fragment,{children:((C=p.expand.lastDeployment)==null?void 0:C.phase)==="deploy"&&((E=p.expand.lastDeployment)!=null&&E.phaseSuccess)?c.jsx(Dg,{size:16,className:"text-green-700"}):c.jsx(Og,{size:16,className:"text-red-700"})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:p.lastDeployedAt&&((P=p.expand)!=null&&P.lastDeployment)?c.jsx($v,{phase:(R=p.expand.lastDeployment)==null?void 0:R.phase,phaseSuccess:(j=p.expand.lastDeployment)==null?void 0:j.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:p.lastDeployedAt?ca(p.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-32 flex items-center",children:c.jsx(QC,{children:c.jsxs(o6,{children:[c.jsx(a6,{children:c.jsx(EC,{checked:p.enabled,onCheckedChange:()=>{v(p.id)}})}),c.jsx(ry,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:p.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>f(p.id),children:"部署历史"}),c.jsxs(fl,{when:!!p.enabled,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>x(p),children:"立即部署"})]}),c.jsxs(fl,{when:!!p.expiredAt,children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>h(p),children:"下载"})]}),!p.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(vC,{children:[c.jsx(yC,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(Wv,{children:[c.jsxs(Bv,{children:[c.jsx(Yv,{children:"删除域名"}),c.jsx(Zv,{children:"确定要删除域名吗?"})]}),c.jsxs(Hv,{children:[c.jsx(Gv,{children:"取消"}),c.jsx(Kv,{onClick:()=>{m(p.id)},children:"确认"})]})]})]}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>d(p.id),children:"编辑"})]})]})]},p.id)}),c.jsx(Xk,{totalPages:o,currentPage:s?Number(s):1,onPageChange:p=>{u(p)}})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Gp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Je,{onClick:l,className:"mt-3",children:"添加域名"})]})})]})})},Fe=y.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:le("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}));Fe.displayName="Input";var Ec=e=>e.type==="checkbox",Mo=e=>e instanceof Date,mr=e=>e==null;const oE=e=>typeof e=="object";var Bt=e=>!mr(e)&&!Array.isArray(e)&&oE(e)&&!Mo(e),aE=e=>Bt(e)&&e.target?Ec(e.target)?e.target.checked:e.target.value:e,_6=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lE=(e,t)=>e.has(_6(t)),b6=e=>{const t=e.constructor&&e.constructor.prototype;return Bt(t)&&t.hasOwnProperty("isPrototypeOf")},ny=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Sr(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(!(ny&&(e instanceof Blob||e instanceof FileList))&&(r||Bt(e)))if(t=r?[]:{},!r&&!b6(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Sr(e[n]));else return e;return t}var Uf=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,fe=(e,t,r)=>{if(!t||!Bt(e))return r;const n=Uf(t.split(/[,[\].]+?/)).reduce((s,i)=>mr(s)?s:s[i],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},qr=e=>typeof e=="boolean",sy=e=>/^\w*$/.test(e),cE=e=>Uf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let n=-1;const s=sy(t)?[t]:cE(t),i=s.length,o=i-1;for(;++n<i;){const a=s[n];let l=r;if(n!==o){const u=e[a];l=Bt(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const Cd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},gn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ts={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},uE=et.createContext(null),Vf=()=>et.useContext(uE),S6=e=>{const{children:t,...r}=e;return et.createElement(uE.Provider,{value:r},t)};var dE=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==gn.all&&(t._proxyFormState[o]=!n||gn.all),r&&(r[o]=!0),e[o]}});return s},kr=e=>Bt(e)&&!Object.keys(e).length,fE=(e,t,r,n)=>{r(e);const{name:s,...i}=e;return kr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||gn.all))},pl=e=>Array.isArray(e)?e:[e],hE=(e,t,r)=>!e||!t||e===t||pl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function iy(e){const t=et.useRef(e);t.current=e,et.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function k6(e){const t=Vf(),{control:r=t.control,disabled:n,name:s,exact:i}=e||{},[o,a]=et.useState(r._formState),l=et.useRef(!0),u=et.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=et.useRef(s);return d.current=s,iy({disabled:n,next:f=>l.current&&hE(d.current,f.name,i)&&fE(f,u.current,r._updateFormState)&&a({...r._formState,...f}),subject:r._subjects.state}),et.useEffect(()=>(l.current=!0,u.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),dE(o,r,u.current,!1)}var Ln=e=>typeof e=="string",pE=(e,t,r,n,s)=>Ln(e)?(n&&t.watch.add(e),fe(r,e,s)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),fe(r,i))):(n&&(t.watchAll=!0),r);function C6(e){const t=Vf(),{control:r=t.control,name:n,defaultValue:s,disabled:i,exact:o}=e||{},a=et.useRef(n);a.current=n,iy({disabled:i,subject:r._subjects.values,next:d=>{hE(a.current,d.name,o)&&u(Sr(pE(a.current,r._names,d.values||r._formValues,!1,s)))}});const[l,u]=et.useState(r._getWatch(n,s));return et.useEffect(()=>r._removeUnmounted()),l}function E6(e){const t=Vf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:i}=e,o=lE(s._names.array,r),a=C6({control:s,name:r,defaultValue:fe(s._formValues,r,fe(s._defaultValues,r,e.defaultValue)),exact:!0}),l=k6({control:s,name:r,exact:!0}),u=et.useRef(s.register(r,{...e.rules,value:a,...qr(e.disabled)?{disabled:e.disabled}:{}}));return et.useEffect(()=>{const d=s._options.shouldUnregister||i,f=(m,g)=>{const w=fe(s._fields,m);w&&w._f&&(w._f.mount=g)};if(f(r,!0),d){const m=Sr(fe(s._options.defaultValues,r));dt(s._defaultValues,r,m),Ft(fe(s._formValues,r))&&dt(s._formValues,r,m)}return()=>{(o?d&&!s._state.action:d)?s.unregister(r):f(r,!1)}},[r,s,o,i]),et.useEffect(()=>{fe(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:fe(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...qr(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:et.useCallback(d=>u.current.onChange({target:{value:aE(d),name:r},type:Cd.CHANGE}),[r]),onBlur:et.useCallback(()=>u.current.onBlur({target:{value:fe(s._formValues,r),name:r},type:Cd.BLUR}),[r,s]),ref:et.useCallback(d=>{const f=fe(s._fields,r);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:m=>d.setCustomValidity(m),reportValidity:()=>d.reportValidity()})},[s._fields,r])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!fe(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!fe(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!fe(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!fe(l.validatingFields,r)},error:{enumerable:!0,get:()=>fe(l.errors,r)}})}}const j6=e=>e.render(E6(e));var mE=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},Y0=e=>({isOnSubmit:!e||e===gn.onSubmit,isOnBlur:e===gn.onBlur,isOnChange:e===gn.onChange,isOnAll:e===gn.all,isOnTouch:e===gn.onTouched}),Z0=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const ml=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const i=fe(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(ml(a,t))break}else if(Bt(a)&&ml(a,t))break}}};var T6=(e,t,r)=>{const n=pl(fe(e,r));return dt(n,"root",t[r]),dt(e,r,n),e},oy=e=>e.type==="file",ds=e=>typeof e=="function",Ed=e=>{if(!ny)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fu=e=>Ln(e),ay=e=>e.type==="radio",jd=e=>e instanceof RegExp;const K0={value:!1,isValid:!1},G0={value:!0,isValid:!0};var gE=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===""?G0:{value:e[0].value,isValid:!0}:G0:K0}return K0};const q0={isValid:!1,value:null};var vE=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,q0):q0;function X0(e,t,r="validate"){if(Fu(e)||Array.isArray(e)&&e.every(Fu)||qr(e)&&!e)return{type:r,message:Fu(e)?e:"",ref:t}}var yo=e=>Bt(e)&&!jd(e)?e:{value:e,message:""},Q0=async(e,t,r,n,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:d,max:f,pattern:m,validate:g,name:w,valueAsNumber:v,mount:x,disabled:h}=e._f,p=fe(t,w);if(!x||h)return{};const _=o?o[0]:i,C=T=>{n&&_.reportValidity&&(_.setCustomValidity(qr(T)?"":T||""),_.reportValidity())},E={},P=ay(i),R=Ec(i),j=P||R,D=(v||oy(i))&&Ft(i.value)&&Ft(p)||Ed(i)&&i.value===""||p===""||Array.isArray(p)&&!p.length,L=mE.bind(null,w,r,E),K=(T,F,b,$=ts.maxLength,ee=ts.minLength)=>{const Z=T?F:b;E[w]={type:T?$:ee,message:Z,ref:i,...L(T?$:ee,Z)}};if(s?!Array.isArray(p)||!p.length:a&&(!j&&(D||mr(p))||qr(p)&&!p||R&&!gE(o).isValid||P&&!vE(o).isValid)){const{value:T,message:F}=Fu(a)?{value:!!a,message:a}:yo(a);if(T&&(E[w]={type:ts.required,message:F,ref:_,...L(ts.required,F)},!r))return C(F),E}if(!D&&(!mr(d)||!mr(f))){let T,F;const b=yo(f),$=yo(d);if(!mr(p)&&!isNaN(p)){const ee=i.valueAsNumber||p&&+p;mr(b.value)||(T=ee>b.value),mr($.value)||(F=ee<$.value)}else{const ee=i.valueAsDate||new Date(p),Z=X=>new Date(new Date().toDateString()+" "+X),Y=i.type=="time",O=i.type=="week";Ln(b.value)&&p&&(T=Y?Z(p)>Z(b.value):O?p>b.value:ee>new Date(b.value)),Ln($.value)&&p&&(F=Y?Z(p)<Z($.value):O?p<$.value:ee<new Date($.value))}if((T||F)&&(K(!!T,b.message,$.message,ts.max,ts.min),!r))return C(E[w].message),E}if((l||u)&&!D&&(Ln(p)||s&&Array.isArray(p))){const T=yo(l),F=yo(u),b=!mr(T.value)&&p.length>+T.value,$=!mr(F.value)&&p.length<+F.value;if((b||$)&&(K(b,T.message,F.message),!r))return C(E[w].message),E}if(m&&!D&&Ln(p)){const{value:T,message:F}=yo(m);if(jd(T)&&!p.match(T)&&(E[w]={type:ts.pattern,message:F,ref:i,...L(ts.pattern,F)},!r))return C(F),E}if(g){if(ds(g)){const T=await g(p,t),F=X0(T,_);if(F&&(E[w]={...F,...L(ts.validate,F.message)},!r))return C(F.message),E}else if(Bt(g)){let T={};for(const F in g){if(!kr(T)&&!r)break;const b=X0(await g[F](p,t),_,F);b&&(T={...b,...L(F,b.message)},C(b.message),r&&(E[w]=T))}if(!kr(T)&&(E[w]={ref:_,...T},!r))return E}}return C(!0),E};function N6(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 R6(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Ht(e,t){const r=Array.isArray(t)?t:sy(t)?[t]:cE(t),n=r.length===1?e:N6(e,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(Bt(n)&&kr(n)||Array.isArray(n)&&R6(n))&&Ht(e,r.slice(0,-1)),e}var Gh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Td=e=>mr(e)||!oE(e);function Ys(e,t){if(Td(e)||Td(t))return e===t;if(Mo(e)&&Mo(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 i=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Mo(i)&&Mo(o)||Bt(i)&&Bt(o)||Array.isArray(i)&&Array.isArray(o)?!Ys(i,o):i!==o)return!1}}return!0}var yE=e=>e.type==="select-multiple",P6=e=>ay(e)||Ec(e),qh=e=>Ed(e)&&e.isConnected,xE=e=>{for(const t in e)if(ds(e[t]))return!0;return!1};function Nd(e,t={}){const r=Array.isArray(e);if(Bt(e)||r)for(const n in e)Array.isArray(e[n])||Bt(e[n])&&!xE(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Nd(e[n],t[n])):mr(e[n])||(t[n]=!0);return t}function wE(e,t,r){const n=Array.isArray(e);if(Bt(e)||n)for(const s in e)Array.isArray(e[s])||Bt(e[s])&&!xE(e[s])?Ft(t)||Td(r[s])?r[s]=Array.isArray(e[s])?Nd(e[s],[]):{...Nd(e[s])}:wE(e[s],mr(t)?{}:t[s],r[s]):r[s]=!Ys(e[s],t[s]);return r}var mu=(e,t)=>wE(e,t,Nd(t)),_E=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&Ln(e)?new Date(e):n?n(e):e;function Xh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return oy(t)?t.files:ay(t)?vE(e.refs).value:yE(t)?[...t.selectedOptions].map(({value:r})=>r):Ec(t)?gE(e.refs).value:_E(Ft(t.value)?e.ref.value:t.value,e)}var A6=(e,t,r,n)=>{const s={};for(const i of e){const o=fe(t,i);o&&dt(s,i,o._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ha=e=>Ft(e)?e:jd(e)?e.source:Bt(e)?jd(e.value)?e.value.source:e.value:e;const J0="AsyncFunction";var D6=e=>(!e||!e.validate)&&!!(ds(e.validate)&&e.validate.constructor.name===J0||Bt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===J0)),O6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ew(e,t,r){const n=fe(e,r);if(n||sy(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),o=fe(t,i),a=fe(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:r}}var M6=(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,I6=(e,t)=>!Uf(fe(e,t)).length&&Ht(e,t);const L6={mode:gn.onSubmit,reValidateMode:gn.onChange,shouldFocusError:!0};function F6(e={}){let t={...L6,...e},r={submitCount:0,isDirty:!1,isLoading:ds(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Bt(t.defaultValues)||Bt(t.values)?Sr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Sr(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Gh(),array:Gh(),state:Gh()},m=Y0(t.mode),g=Y0(t.reValidateMode),w=t.criteriaMode===gn.all,v=S=>N=>{clearTimeout(u),u=setTimeout(S,N)},x=async S=>{if(d.isValid||S){const N=t.resolver?kr((await j()).errors):await L(n,!0);N!==r.isValid&&f.state.next({isValid:N})}},h=(S,N)=>{(d.isValidating||d.validatingFields)&&((S||Array.from(a.mount)).forEach(I=>{I&&(N?dt(r.validatingFields,I,N):Ht(r.validatingFields,I))}),f.state.next({validatingFields:r.validatingFields,isValidating:!kr(r.validatingFields)}))},p=(S,N=[],I,H,M=!0,B=!0)=>{if(H&&I){if(o.action=!0,B&&Array.isArray(fe(n,S))){const J=I(fe(n,S),H.argA,H.argB);M&&dt(n,S,J)}if(B&&Array.isArray(fe(r.errors,S))){const J=I(fe(r.errors,S),H.argA,H.argB);M&&dt(r.errors,S,J),I6(r.errors,S)}if(d.touchedFields&&B&&Array.isArray(fe(r.touchedFields,S))){const J=I(fe(r.touchedFields,S),H.argA,H.argB);M&&dt(r.touchedFields,S,J)}d.dirtyFields&&(r.dirtyFields=mu(s,i)),f.state.next({name:S,isDirty:T(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(i,S,N)},_=(S,N)=>{dt(r.errors,S,N),f.state.next({errors:r.errors})},C=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},E=(S,N,I,H)=>{const M=fe(n,S);if(M){const B=fe(i,S,Ft(I)?fe(s,S):I);Ft(B)||H&&H.defaultChecked||N?dt(i,S,N?B:Xh(M._f)):$(S,B),o.mount&&x()}},P=(S,N,I,H,M)=>{let B=!1,J=!1;const te={name:S},he=!!(fe(n,S)&&fe(n,S)._f&&fe(n,S)._f.disabled);if(!I||H){d.isDirty&&(J=r.isDirty,r.isDirty=te.isDirty=T(),B=J!==te.isDirty);const ze=he||Ys(fe(s,S),N);J=!!(!he&&fe(r.dirtyFields,S)),ze||he?Ht(r.dirtyFields,S):dt(r.dirtyFields,S,!0),te.dirtyFields=r.dirtyFields,B=B||d.dirtyFields&&J!==!ze}if(I){const ze=fe(r.touchedFields,S);ze||(dt(r.touchedFields,S,I),te.touchedFields=r.touchedFields,B=B||d.touchedFields&&ze!==I)}return B&&M&&f.state.next(te),B?te:{}},R=(S,N,I,H)=>{const M=fe(r.errors,S),B=d.isValid&&qr(N)&&r.isValid!==N;if(e.delayError&&I?(l=v(()=>_(S,I)),l(e.delayError)):(clearTimeout(u),l=null,I?dt(r.errors,S,I):Ht(r.errors,S)),(I?!Ys(M,I):M)||!kr(H)||B){const J={...H,...B&&qr(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...J},f.state.next(J)}},j=async S=>{h(S,!0);const N=await t.resolver(i,t.context,A6(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return h(S),N},D=async S=>{const{errors:N}=await j(S);if(S)for(const I of S){const H=fe(N,I);H?dt(r.errors,I,H):Ht(r.errors,I)}else r.errors=N;return N},L=async(S,N,I={valid:!0})=>{for(const H in S){const M=S[H];if(M){const{_f:B,...J}=M;if(B){const te=a.array.has(B.name),he=M._f&&D6(M._f);he&&d.validatingFields&&h([H],!0);const ze=await Q0(M,i,w,t.shouldUseNativeValidation&&!N,te);if(he&&d.validatingFields&&h([H]),ze[B.name]&&(I.valid=!1,N))break;!N&&(fe(ze,B.name)?te?T6(r.errors,ze,B.name):dt(r.errors,B.name,ze[B.name]):Ht(r.errors,B.name))}!kr(J)&&await L(J,N,I)}}return I.valid},K=()=>{for(const S of a.unMount){const N=fe(n,S);N&&(N._f.refs?N._f.refs.every(I=>!qh(I)):!qh(N._f.ref))&&Pe(S)}a.unMount=new Set},T=(S,N)=>(S&&N&&dt(i,S,N),!Ys(U(),s)),F=(S,N,I)=>pE(S,a,{...o.mount?i:Ft(N)?s:Ln(S)?{[S]:N}:N},I,N),b=S=>Uf(fe(o.mount?i:s,S,e.shouldUnregister?fe(s,S,[]):[])),$=(S,N,I={})=>{const H=fe(n,S);let M=N;if(H){const B=H._f;B&&(!B.disabled&&dt(i,S,_E(N,B)),M=Ed(B.ref)&&mr(N)?"":N,yE(B.ref)?[...B.ref.options].forEach(J=>J.selected=M.includes(J.value)):B.refs?Ec(B.ref)?B.refs.length>1?B.refs.forEach(J=>(!J.defaultChecked||!J.disabled)&&(J.checked=Array.isArray(M)?!!M.find(te=>te===J.value):M===J.value)):B.refs[0]&&(B.refs[0].checked=!!M):B.refs.forEach(J=>J.checked=J.value===M):oy(B.ref)?B.ref.value="":(B.ref.value=M,B.ref.type||f.values.next({name:S,values:{...i}})))}(I.shouldDirty||I.shouldTouch)&&P(S,M,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&X(S)},ee=(S,N,I)=>{for(const H in N){const M=N[H],B=`${S}.${H}`,J=fe(n,B);(a.array.has(S)||!Td(M)||J&&!J._f)&&!Mo(M)?ee(B,M,I):$(B,M,I)}},Z=(S,N,I={})=>{const H=fe(n,S),M=a.array.has(S),B=Sr(N);dt(i,S,B),M?(f.array.next({name:S,values:{...i}}),(d.isDirty||d.dirtyFields)&&I.shouldDirty&&f.state.next({name:S,dirtyFields:mu(s,i),isDirty:T(S,B)})):H&&!H._f&&!mr(B)?ee(S,B,I):$(S,B,I),Z0(S,a)&&f.state.next({...r}),f.values.next({name:o.mount?S:void 0,values:{...i}})},Y=async S=>{o.mount=!0;const N=S.target;let I=N.name,H=!0;const M=fe(n,I),B=()=>N.type?Xh(M._f):aE(S),J=te=>{H=Number.isNaN(te)||Ys(te,fe(i,I,te))};if(M){let te,he;const ze=B(),We=S.type===Cd.BLUR||S.type===Cd.FOCUS_OUT,qt=!O6(M._f)&&!t.resolver&&!fe(r.errors,I)&&!M._f.deps||M6(We,fe(r.touchedFields,I),r.isSubmitted,g,m),Xt=Z0(I,a,We);dt(i,I,ze),We?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Et=P(I,ze,We,!1),Pn=!kr(Et)||Xt;if(!We&&f.values.next({name:I,type:S.type,values:{...i}}),qt)return d.isValid&&(e.mode==="onBlur"?We&&x():x()),Pn&&f.state.next({name:I,...Xt?{}:Et});if(!We&&Xt&&f.state.next({...r}),t.resolver){const{errors:ht}=await j([I]);if(J(ze),H){const Ds=ew(r.errors,n,I),dr=ew(ht,n,Ds.name||I);te=dr.error,I=dr.name,he=kr(ht)}}else h([I],!0),te=(await Q0(M,i,w,t.shouldUseNativeValidation))[I],h([I]),J(ze),H&&(te?he=!1:d.isValid&&(he=await L(n,!0)));H&&(M._f.deps&&X(M._f.deps),R(I,he,te,Et))}},O=(S,N)=>{if(fe(r.errors,N)&&S.focus)return S.focus(),1},X=async(S,N={})=>{let I,H;const M=pl(S);if(t.resolver){const B=await D(Ft(S)?S:M);I=kr(B),H=S?!M.some(J=>fe(B,J)):I}else S?(H=(await Promise.all(M.map(async B=>{const J=fe(n,B);return await L(J&&J._f?{[B]:J}:J)}))).every(Boolean),!(!H&&!r.isValid)&&x()):H=I=await L(n);return f.state.next({...!Ln(S)||d.isValid&&I!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:I}:{},errors:r.errors}),N.shouldFocus&&!H&&ml(n,O,S?M:a.mount),H},U=S=>{const N={...o.mount?i:s};return Ft(S)?N:Ln(S)?fe(N,S):S.map(I=>fe(N,I))},V=(S,N)=>({invalid:!!fe((N||r).errors,S),isDirty:!!fe((N||r).dirtyFields,S),error:fe((N||r).errors,S),isValidating:!!fe(r.validatingFields,S),isTouched:!!fe((N||r).touchedFields,S)}),ue=S=>{S&&pl(S).forEach(N=>Ht(r.errors,N)),f.state.next({errors:S?r.errors:{}})},ne=(S,N,I)=>{const H=(fe(n,S,{_f:{}})._f||{}).ref,M=fe(r.errors,S)||{},{ref:B,message:J,type:te,...he}=M;dt(r.errors,S,{...he,...N,ref:H}),f.state.next({name:S,errors:r.errors,isValid:!1}),I&&I.shouldFocus&&H&&H.focus&&H.focus()},se=(S,N)=>ds(S)?f.values.subscribe({next:I=>S(F(void 0,N),I)}):F(S,N,!0),Pe=(S,N={})=>{for(const I of S?pl(S):a.mount)a.mount.delete(I),a.array.delete(I),N.keepValue||(Ht(n,I),Ht(i,I)),!N.keepError&&Ht(r.errors,I),!N.keepDirty&&Ht(r.dirtyFields,I),!N.keepTouched&&Ht(r.touchedFields,I),!N.keepIsValidating&&Ht(r.validatingFields,I),!t.shouldUnregister&&!N.keepDefaultValue&&Ht(s,I);f.values.next({values:{...i}}),f.state.next({...r,...N.keepDirty?{isDirty:T()}:{}}),!N.keepIsValid&&x()},ce=({disabled:S,name:N,field:I,fields:H,value:M})=>{if(qr(S)&&o.mount||S){const B=S?void 0:Ft(M)?Xh(I?I._f:fe(H,N)._f):M;dt(i,N,B),P(N,B,!1,!1,!0)}},me=(S,N={})=>{let I=fe(n,S);const H=qr(N.disabled)||qr(e.disabled);return dt(n,S,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),I?ce({field:I,disabled:qr(N.disabled)?N.disabled:e.disabled,name:S,value:N.value}):E(S,!0,N.value),{...H?{disabled:N.disabled||e.disabled}:{},...t.progressive?{required:!!N.required,min:Ha(N.min),max:Ha(N.max),minLength:Ha(N.minLength),maxLength:Ha(N.maxLength),pattern:Ha(N.pattern)}:{},name:S,onChange:Y,onBlur:Y,ref:M=>{if(M){me(S,N),I=fe(n,S);const B=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,J=P6(B),te=I._f.refs||[];if(J?te.find(he=>he===B):B===I._f.ref)return;dt(n,S,{_f:{...I._f,...J?{refs:[...te.filter(qh),B,...Array.isArray(fe(s,S))?[{}]:[]],ref:{type:B.type,name:S}}:{ref:B}}}),E(S,!1,void 0,B)}else I=fe(n,S,{}),I._f&&(I._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(lE(a.array,S)&&o.action)&&a.unMount.add(S)}}},ke=()=>t.shouldFocusError&&ml(n,O,a.mount),De=S=>{qr(S)&&(f.state.next({disabled:S}),ml(n,(N,I)=>{const H=fe(n,I);H&&(N.disabled=H._f.disabled||S,Array.isArray(H._f.refs)&&H._f.refs.forEach(M=>{M.disabled=H._f.disabled||S}))},0,!1))},Oe=(S,N)=>async I=>{let H;I&&(I.preventDefault&&I.preventDefault(),I.persist&&I.persist());let M=Sr(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:B,values:J}=await j();r.errors=B,M=J}else await L(n);if(Ht(r.errors,"root"),kr(r.errors)){f.state.next({errors:{}});try{await S(M,I)}catch(B){H=B}}else N&&await N({...r.errors},I),ke(),setTimeout(ke);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kr(r.errors)&&!H,submitCount:r.submitCount+1,errors:r.errors}),H)throw H},He=(S,N={})=>{fe(n,S)&&(Ft(N.defaultValue)?Z(S,Sr(fe(s,S))):(Z(S,N.defaultValue),dt(s,S,Sr(N.defaultValue))),N.keepTouched||Ht(r.touchedFields,S),N.keepDirty||(Ht(r.dirtyFields,S),r.isDirty=N.defaultValue?T(S,Sr(fe(s,S))):T()),N.keepError||(Ht(r.errors,S),d.isValid&&x()),f.state.next({...r}))},ut=(S,N={})=>{const I=S?Sr(S):s,H=Sr(I),M=kr(S),B=M?s:H;if(N.keepDefaultValues||(s=I),!N.keepValues){if(N.keepDirtyValues)for(const J of a.mount)fe(r.dirtyFields,J)?dt(B,J,fe(i,J)):Z(J,fe(B,J));else{if(ny&&Ft(S))for(const J of a.mount){const te=fe(n,J);if(te&&te._f){const he=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(Ed(he)){const ze=he.closest("form");if(ze){ze.reset();break}}}}n={}}i=e.shouldUnregister?N.keepDefaultValues?Sr(s):{}:Sr(B),f.array.next({values:{...B}}),f.values.next({values:{...B}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ys(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&i?mu(s,i):r.dirtyFields:N.keepDefaultValues&&S?mu(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>ut(ds(S)?S(i):S,N);return{control:{register:me,unregister:Pe,getFieldState:V,handleSubmit:Oe,setError:ne,_executeSchema:j,_getWatch:F,_getDirty:T,_updateValid:x,_removeUnmounted:K,_updateFieldArray:p,_updateDisabledField:ce,_getFieldArray:b,_reset:ut,_resetDefaultValues:()=>ds(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:De,_subjects:f,_proxyFormState:d,_setErrors:C,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(S){o=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:X,register:me,handleSubmit:Oe,watch:se,setValue:Z,getValues:U,reset:k,resetField:He,clearErrors:ue,unregister:Pe,setError:ne,setFocus:(S,N={})=>{const I=fe(n,S),H=I&&I._f;if(H){const M=H.refs?H.refs[0]:H.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function Yr(e={}){const t=et.useRef(),r=et.useRef(),[n,s]=et.useState({isDirty:!1,isValidating:!1,isLoading:ds(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ds(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...F6(e),formState:n});const i=t.current.control;return i._options=e,iy({subject:i._subjects.state,next:o=>{fE(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),et.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),et.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),et.useEffect(()=>{e.values&&!Ys(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),et.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),et.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),et.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=dE(n,i),t.current}const tw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=fe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},bE=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?tw(n.ref,r,e):n.refs&&n.refs.forEach(s=>tw(s,r,e))}},z6=(e,t)=>{t.shouldUseNativeValidation&&bE(e,t);const r={};for(const n in e){const s=fe(t.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if(U6(t.names||Object.keys(e),n)){const o=Object.assign({},fe(r,n));dt(o,"root",i),dt(r,n,o)}else dt(r,n,i)}return r},U6=(e,t)=>e.some(r=>r.startsWith(t+"."));var V6=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[o]={message:a.message,type:a.code}}else r[o]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=r[o].types,u=l&&l[n.code];r[o]=mE(o,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},Zr=function(e,t,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&bE({},i),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:z6(V6(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},nt;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(nt||(nt={}));var wm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(wm||(wm={}));const xe=nt.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 xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},oe=nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class zr 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(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),n}static assert(t){if(!(t instanceof zr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}zr.create=e=>new zr(e);const ua=(e,t)=>{let r;switch(e.code){case oe.invalid_type:e.received===xe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,nt.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:r=`Unrecognized key(s) in object: ${nt.joinValues(e.keys,", ")}`;break;case oe.invalid_union:r="Invalid input";break;case oe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${nt.joinValues(e.options)}`;break;case oe.invalid_enum_value:r=`Invalid enum value. Expected ${nt.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:r="Invalid function arguments";break;case oe.invalid_return_type:r="Invalid function return type";break;case oe.invalid_date:r="Invalid date";break;case oe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case oe.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 oe.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 oe.custom:r="Invalid input";break;case oe.invalid_intersection_types:r="Intersection results could not be merged";break;case oe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:r="Number must be finite";break;default:r=t.defaultError,nt.assertNever(e)}return{message:r}};let SE=ua;function W6(e){SE=e}function Rd(){return SE}const Pd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},B6=[];function ve(e,t){const r=Rd(),n=Pd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ua?void 0:ua].filter(s=>!!s)});e.common.issues.push(n)}class ur{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const s of r){if(s.status==="aborted")return $e;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return ur.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return $e;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const $e=Object.freeze({status:"aborted"}),Io=e=>({status:"dirty",value:e}),vr=e=>({status:"valid",value:e}),_m=e=>e.status==="aborted",bm=e=>e.status==="dirty",Hl=e=>e.status==="valid",Yl=e=>typeof Promise<"u"&&e instanceof Promise;function Ad(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 kE(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 Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));var Qa,Ja;class Wn{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const rw=(e,t)=>{if(Hl(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 zr(e.common.issues);return this._error=r,this._error}}};function Ye(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:(o,a)=>{var l,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class qe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return 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 ur,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(Yl(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)},i=this._parseSync({data:t,path:s.path,parent:s});return rw(s,i)}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}),i=await(Yl(s)?s:Promise.resolve(s));return rw(n,i)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:oe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!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 Tn({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Un.create(this,this._def)}nullable(){return wi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this,this._def)}promise(){return fa.create(this,this._def)}or(t){return ql.create([this,t],this._def)}and(t){return Xl.create(this,t,this._def)}transform(t){return new Tn({...Ye(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new rc({...Ye(this._def),innerType:this,defaultValue:r,typeName:Ve.ZodDefault})}brand(){return new ly({typeName:Ve.ZodBranded,type:this,...Ye(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new nc({...Ye(this._def),innerType:this,catchValue:r,typeName:Ve.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return jc.create(this,t)}readonly(){return sc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const H6=/^c[^\s-]{8,}$/i,Y6=/^[0-9a-z]+$/,Z6=/^[0-9A-HJKMNP-TV-Z]{26}$/,K6=/^[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,G6=/^[a-z0-9_-]{21}$/i,q6=/^[-+]?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)?)??$/,X6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Q6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qh;const J6=/^(?:(?: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])$/,ez=/^(([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})))$/,tz=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,CE="((\\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])))",rz=new RegExp(`^${CE}$`);function EE(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 nz(e){return new RegExp(`^${EE(e)}$`)}function jE(e){let t=`${CE}T${EE(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 sz(e,t){return!!((t==="v4"||!t)&&J6.test(e)||(t==="v6"||!t)&&ez.test(e))}class yn extends qe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const i=this._getOrReturnCtx(t);return ve(i,{code:oe.invalid_type,expected:xe.string,received:i.parsedType}),$e}const n=new ur;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?ve(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ve(s,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")X6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"email",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Qh||(Qh=new RegExp(Q6,"u")),Qh.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"emoji",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")K6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"uuid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")G6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"nanoid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")H6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Y6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid2",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Z6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ulid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ve(s,{validation:"url",code:oe.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"regex",code:oe.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?jE(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?rz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?nz(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?q6.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"duration",code:oe.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?sz(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ip",code:oe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?tz.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64",code:oe.invalid_string,message:i.message}),n.dirty()):nt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:oe.invalid_string,...Ae.errToObj(n)})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.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,...Ae.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,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ae.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ae.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ae.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ae.errToObj(r)})}nonempty(t){return this.min(1,Ae.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:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};function iz(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class vi extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const i=this._getOrReturnCtx(t);return ve(i,{code:oe.invalid_type,expected:xe.number,received:i.parsedType}),$e}let n;const s=new ur;for(const i of this._def.checks)i.kind==="int"?nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?iz(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.not_finite,message:i.message}),s.dirty()):nt.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,n,s){return new vi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ae.toString(s)}]})}_addCheck(t){return new vi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}vi.create=e=>new vi({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class yi extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){const i=this._getOrReturnCtx(t);return ve(i,{code:oe.invalid_type,expected:xe.bigint,received:i.parsedType}),$e}let n;const s=new ur;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ve(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):nt.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,n,s){return new yi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ae.toString(s)}]})}_addCheck(t){return new yi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.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}}yi.create=e=>{var t;return new yi({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ye(e)})};class Zl extends qe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.boolean,received:n.parsedType}),$e}return vr(t.data)}}Zl.create=e=>new Zl({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ye(e)});class to extends qe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const i=this._getOrReturnCtx(t);return ve(i,{code:oe.invalid_type,expected:xe.date,received:i.parsedType}),$e}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ve(i,{code:oe.invalid_date}),$e}const n=new ur;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):nt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new to({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.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}}to.create=e=>new to({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ye(e)});class Dd extends qe{_parse(t){if(this._getType(t)!==xe.symbol){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.symbol,received:n.parsedType}),$e}return vr(t.data)}}Dd.create=e=>new Dd({typeName:Ve.ZodSymbol,...Ye(e)});class Kl extends qe{_parse(t){if(this._getType(t)!==xe.undefined){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.undefined,received:n.parsedType}),$e}return vr(t.data)}}Kl.create=e=>new Kl({typeName:Ve.ZodUndefined,...Ye(e)});class Gl extends qe{_parse(t){if(this._getType(t)!==xe.null){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.null,received:n.parsedType}),$e}return vr(t.data)}}Gl.create=e=>new Gl({typeName:Ve.ZodNull,...Ye(e)});class da extends qe{constructor(){super(...arguments),this._any=!0}_parse(t){return vr(t.data)}}da.create=e=>new da({typeName:Ve.ZodAny,...Ye(e)});class Hi extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vr(t.data)}}Hi.create=e=>new Hi({typeName:Ve.ZodUnknown,...Ye(e)});class Cs extends qe{_parse(t){const r=this._getOrReturnCtx(t);return ve(r,{code:oe.invalid_type,expected:xe.never,received:r.parsedType}),$e}}Cs.create=e=>new Cs({typeName:Ve.ZodNever,...Ye(e)});class Od extends qe{_parse(t){if(this._getType(t)!==xe.undefined){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.void,received:n.parsedType}),$e}return vr(t.data)}}Od.create=e=>new Od({typeName:Ve.ZodVoid,...Ye(e)});class bn extends qe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==xe.array)return ve(r,{code:oe.invalid_type,expected:xe.array,received:r.parsedType}),$e;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(ve(r,{code:o?oe.too_big:oe.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?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&&(ve(r,{code:oe.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&&(ve(r,{code:oe.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((o,a)=>s.type._parseAsync(new Wn(r,o,r.path,a)))).then(o=>ur.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Wn(r,o,r.path,a)));return ur.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new bn({...this._def,minLength:{value:t,message:Ae.toString(r)}})}max(t,r){return new bn({...this._def,maxLength:{value:t,message:Ae.toString(r)}})}length(t,r){return new bn({...this._def,exactLength:{value:t,message:Ae.toString(r)}})}nonempty(t){return this.min(1,t)}}bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ye(t)});function wo(e){if(e instanceof Nt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Un.create(wo(n))}return new Nt({...e._def,shape:()=>t})}else return e instanceof bn?new bn({...e._def,type:wo(e.element)}):e instanceof Un?Un.create(wo(e.unwrap())):e instanceof wi?wi.create(wo(e.unwrap())):e instanceof Bn?Bn.create(e.items.map(t=>wo(t))):e}class Nt extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==xe.object){const u=this._getOrReturnCtx(t);return ve(u,{code:oe.invalid_type,expected:xe.object,received:u.parsedType}),$e}const{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cs&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const d=i[u],f=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Wn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Cs){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ve(s,{code:oe.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Wn(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key,m=await d.value;u.push({key:f,value:m,alwaysSet:d.alwaysSet})}return u}).then(u=>ur.mergeObjectSync(n,u)):ur.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Nt({...this._def,unknownKeys:"strip"})}passthrough(){return new Nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Nt({...this._def,catchall:t})}pick(t){const r={};return nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Nt({...this._def,shape:()=>r})}omit(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Nt({...this._def,shape:()=>r})}deepPartial(){return wo(this)}partial(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new Nt({...this._def,shape:()=>r})}required(t){const r={};return nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Un;)i=i._def.innerType;r[n]=i}}),new Nt({...this._def,shape:()=>r})}keyof(){return TE(nt.objectKeys(this.shape))}}Nt.create=(e,t)=>new Nt({shape:()=>e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...Ye(t)});Nt.strictCreate=(e,t)=>new Nt({shape:()=>e,unknownKeys:"strict",catchall:Cs.create(),typeName:Ve.ZodObject,...Ye(t)});Nt.lazycreate=(e,t)=>new Nt({shape:e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...Ye(t)});class ql extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new zr(a.ctx.common.issues));return ve(r,{code:oe.invalid_union,unionErrors:o}),$e}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new zr(l));return ve(r,{code:oe.invalid_union,unionErrors:a}),$e}}get options(){return this._def.options}}ql.create=(e,t)=>new ql({options:e,typeName:Ve.ZodUnion,...Ye(t)});const rs=e=>e instanceof Jl?rs(e.schema):e instanceof Tn?rs(e.innerType()):e instanceof ec?[e.value]:e instanceof xi?e.options:e instanceof tc?nt.objectValues(e.enum):e instanceof rc?rs(e._def.innerType):e instanceof Kl?[void 0]:e instanceof Gl?[null]:e instanceof Un?[void 0,...rs(e.unwrap())]:e instanceof wi?[null,...rs(e.unwrap())]:e instanceof ly||e instanceof sc?rs(e.unwrap()):e instanceof nc?rs(e._def.innerType):[];class $f extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return ve(r,{code:oe.invalid_type,expected:xe.object,received:r.parsedType}),$e;const n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ve(r,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),$e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const i of r){const o=rs(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new $f({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ye(n)})}}function Sm(e,t){const r=Zs(e),n=Zs(t);if(e===t)return{valid:!0,data:e};if(r===xe.object&&n===xe.object){const s=nt.objectKeys(t),i=nt.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=Sm(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===xe.array&&n===xe.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=Sm(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===xe.date&&n===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xl extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(_m(i)||_m(o))return $e;const a=Sm(i.value,o.value);return a.valid?((bm(i)||bm(o))&&r.dirty(),{status:r.value,value:a.data}):(ve(n,{code:oe.invalid_intersection_types}),$e)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):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}))}}Xl.create=(e,t,r)=>new Xl({left:e,right:t,typeName:Ve.ZodIntersection,...Ye(r)});class Bn extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.array)return ve(n,{code:oe.invalid_type,expected:xe.array,received:n.parsedType}),$e;if(n.data.length<this._def.items.length)return ve(n,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$e;!this._def.rest&&n.data.length>this._def.items.length&&(ve(n,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Wn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>ur.mergeArray(r,o)):ur.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Bn({...this._def,rest:t})}}Bn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bn({items:e,typeName:Ve.ZodTuple,rest:null,...Ye(t)})};class Ql extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return ve(n,{code:oe.invalid_type,expected:xe.object,received:n.parsedType}),$e;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in n.data)s.push({key:i._parse(new Wn(n,a,n.path,a)),value:o._parse(new Wn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?ur.mergeObjectAsync(r,s):ur.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof qe?new Ql({keyType:t,valueType:r,typeName:Ve.ZodRecord,...Ye(n)}):new Ql({keyType:yn.create(),valueType:t,typeName:Ve.ZodRecord,...Ye(r)})}}class Md extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.map)return ve(n,{code:oe.invalid_type,expected:xe.map,received:n.parsedType}),$e;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Wn(n,a,n.path,[u,"key"])),value:i._parse(new Wn(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return $e;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return $e;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}}Md.create=(e,t,r)=>new Md({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ye(r)});class ro extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.set)return ve(n,{code:oe.invalid_type,expected:xe.set,received:n.parsedType}),$e;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ve(n,{code:oe.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&&(ve(n,{code:oe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return $e;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>i._parse(new Wn(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,r){return new ro({...this._def,minSize:{value:t,message:Ae.toString(r)}})}max(t,r){return new ro({...this._def,maxSize:{value:t,message:Ae.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ro.create=(e,t)=>new ro({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ye(t)});class Jo extends qe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.function)return ve(r,{code:oe.invalid_type,expected:xe.function,received:r.parsedType}),$e;function n(a,l){return Pd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rd(),ua].filter(u=>!!u),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function s(a,l){return Pd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rd(),ua].filter(u=>!!u),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof fa){const a=this;return vr(async function(...l){const u=new zr([]),d=await a._def.args.parseAsync(l,i).catch(g=>{throw u.addIssue(n(l,g)),u}),f=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(f,i).catch(g=>{throw u.addIssue(s(f,g)),u})})}else{const a=this;return vr(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new zr([n(l,u.error)]);const d=Reflect.apply(o,this,u.data),f=a._def.returns.safeParse(d,i);if(!f.success)throw new zr([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Jo({...this._def,args:Bn.create(t).rest(Hi.create())})}returns(t){return new Jo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Jo({args:t||Bn.create([]).rest(Hi.create()),returns:r||Hi.create(),typeName:Ve.ZodFunction,...Ye(n)})}}class Jl extends qe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Jl.create=(e,t)=>new Jl({getter:e,typeName:Ve.ZodLazy,...Ye(t)});class ec extends qe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ve(r,{received:r.data,code:oe.invalid_literal,expected:this._def.value}),$e}return{status:"valid",value:t.data}}get value(){return this._def.value}}ec.create=(e,t)=>new ec({value:e,typeName:Ve.ZodLiteral,...Ye(t)});function TE(e,t){return new xi({values:e,typeName:Ve.ZodEnum,...Ye(t)})}class xi extends qe{constructor(){super(...arguments),Qa.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ve(r,{expected:nt.joinValues(n),received:r.parsedType,code:oe.invalid_type}),$e}if(Ad(this,Qa)||kE(this,Qa,new Set(this._def.values)),!Ad(this,Qa).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ve(r,{received:r.data,code:oe.invalid_enum_value,options:n}),$e}return vr(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 xi.create(t,{...this._def,...r})}exclude(t,r=this._def){return xi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Qa=new WeakMap;xi.create=TE;class tc extends qe{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(t){const r=nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==xe.string&&n.parsedType!==xe.number){const s=nt.objectValues(r);return ve(n,{expected:nt.joinValues(s),received:n.parsedType,code:oe.invalid_type}),$e}if(Ad(this,Ja)||kE(this,Ja,new Set(nt.getValidEnumValues(this._def.values))),!Ad(this,Ja).has(t.data)){const s=nt.objectValues(r);return ve(n,{received:n.data,code:oe.invalid_enum_value,options:s}),$e}return vr(t.data)}get enum(){return this._def.values}}Ja=new WeakMap;tc.create=(e,t)=>new tc({values:e,typeName:Ve.ZodNativeEnum,...Ye(t)});class fa extends qe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.promise&&r.common.async===!1)return ve(r,{code:oe.invalid_type,expected:xe.promise,received:r.parsedType}),$e;const n=r.parsedType===xe.promise?r.data:Promise.resolve(r.data);return vr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}fa.create=(e,t)=>new fa({type:e,typeName:Ve.ZodPromise,...Ye(t)});class Tn extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ve(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return $e;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?$e:l.status==="dirty"||r.value==="dirty"?Io(l.value):l});{if(r.value==="aborted")return $e;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?$e:a.status==="dirty"||r.value==="dirty"?Io(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?$e:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?$e:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Hl(o))return o;const a=s.transform(o.value,i);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(o=>Hl(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):o);nt.assertNever(s)}}Tn.create=(e,t,r)=>new Tn({schema:e,typeName:Ve.ZodEffects,effect:t,...Ye(r)});Tn.createWithPreprocess=(e,t,r)=>new Tn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ye(r)});class Un extends qe{_parse(t){return this._getType(t)===xe.undefined?vr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Un.create=(e,t)=>new Un({innerType:e,typeName:Ve.ZodOptional,...Ye(t)});class wi extends qe{_parse(t){return this._getType(t)===xe.null?vr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wi.create=(e,t)=>new wi({innerType:e,typeName:Ve.ZodNullable,...Ye(t)});class rc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===xe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}rc.create=(e,t)=>new rc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ye(t)});class nc extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yl(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new zr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}nc.create=(e,t)=>new nc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ye(t)});class Id extends qe{_parse(t){if(this._getType(t)!==xe.nan){const n=this._getOrReturnCtx(t);return ve(n,{code:oe.invalid_type,expected:xe.nan,received:n.parsedType}),$e}return{status:"valid",value:t.data}}}Id.create=e=>new Id({typeName:Ve.ZodNaN,...Ye(e)});const oz=Symbol("zod_brand");class ly extends qe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class jc extends qe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?$e:i.status==="dirty"?(r.dirty(),Io(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?$e:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new jc({in:t,out:r,typeName:Ve.ZodPipeline})}}class sc extends qe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Hl(s)&&(s.value=Object.freeze(s.value)),s);return Yl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ve.ZodReadonly,...Ye(t)});function NE(e,t={},r){return e?da.create().superRefine((n,s)=>{var i,o;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):da.create()}const az={object:Nt.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const lz=(e,t={message:`Input not instance of ${e.name}`})=>NE(r=>r instanceof e,t),RE=yn.create,PE=vi.create,cz=Id.create,uz=yi.create,AE=Zl.create,dz=to.create,fz=Dd.create,hz=Kl.create,pz=Gl.create,mz=da.create,gz=Hi.create,vz=Cs.create,yz=Od.create,xz=bn.create,wz=Nt.create,_z=Nt.strictCreate,bz=ql.create,Sz=$f.create,kz=Xl.create,Cz=Bn.create,Ez=Ql.create,jz=Md.create,Tz=ro.create,Nz=Jo.create,Rz=Jl.create,Pz=ec.create,Az=xi.create,Dz=tc.create,Oz=fa.create,nw=Tn.create,Mz=Un.create,Iz=wi.create,Lz=Tn.createWithPreprocess,Fz=jc.create,zz=()=>RE().optional(),Uz=()=>PE().optional(),Vz=()=>AE().optional(),$z={string:e=>yn.create({...e,coerce:!0}),number:e=>vi.create({...e,coerce:!0}),boolean:e=>Zl.create({...e,coerce:!0}),bigint:e=>yi.create({...e,coerce:!0}),date:e=>to.create({...e,coerce:!0})},Wz=$e;var ge=Object.freeze({__proto__:null,defaultErrorMap:ua,setErrorMap:W6,getErrorMap:Rd,makeIssue:Pd,EMPTY_PATH:B6,addIssueToContext:ve,ParseStatus:ur,INVALID:$e,DIRTY:Io,OK:vr,isAborted:_m,isDirty:bm,isValid:Hl,isAsync:Yl,get util(){return nt},get objectUtil(){return wm},ZodParsedType:xe,getParsedType:Zs,ZodType:qe,datetimeRegex:jE,ZodString:yn,ZodNumber:vi,ZodBigInt:yi,ZodBoolean:Zl,ZodDate:to,ZodSymbol:Dd,ZodUndefined:Kl,ZodNull:Gl,ZodAny:da,ZodUnknown:Hi,ZodNever:Cs,ZodVoid:Od,ZodArray:bn,ZodObject:Nt,ZodUnion:ql,ZodDiscriminatedUnion:$f,ZodIntersection:Xl,ZodTuple:Bn,ZodRecord:Ql,ZodMap:Md,ZodSet:ro,ZodFunction:Jo,ZodLazy:Jl,ZodLiteral:ec,ZodEnum:xi,ZodNativeEnum:tc,ZodPromise:fa,ZodEffects:Tn,ZodTransformer:Tn,ZodOptional:Un,ZodNullable:wi,ZodDefault:rc,ZodCatch:nc,ZodNaN:Id,BRAND:oz,ZodBranded:ly,ZodPipeline:jc,ZodReadonly:sc,custom:NE,Schema:qe,ZodSchema:qe,late:az,get ZodFirstPartyTypeKind(){return Ve},coerce:$z,any:mz,array:xz,bigint:uz,boolean:AE,date:dz,discriminatedUnion:Sz,effect:nw,enum:Az,function:Nz,instanceof:lz,intersection:kz,lazy:Rz,literal:Pz,map:jz,nan:cz,nativeEnum:Dz,never:vz,null:pz,nullable:Iz,number:PE,object:wz,oboolean:Vz,onumber:Uz,optional:Mz,ostring:zz,pipeline:Fz,preprocess:Lz,promise:Oz,record:Ez,set:Tz,strictObject:_z,string:RE,symbol:fz,transformer:nw,tuple:Cz,undefined:hz,union:bz,unknown:gz,void:yz,NEVER:Wz,ZodIssueCode:oe,quotelessJson:$6,ZodError:zr}),Bz="Label",DE=y.forwardRef((e,t)=>c.jsx(Le.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())}}));DE.displayName=Bz;var OE=DE;const Hz=uc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),cy=y.forwardRef(({className:e,...t},r)=>c.jsx(OE,{ref:r,className:le(Hz(),e),...t}));cy.displayName=OE.displayName;const Kr=S6,ME=y.createContext({}),Ne=({...e})=>c.jsx(ME.Provider,{value:{name:e.name},children:c.jsx(j6,{...e})}),Wf=()=>{const e=y.useContext(ME),t=y.useContext(IE),{getFieldState:r,formState:n}=Vf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},IE=y.createContext({}),Ce=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return c.jsx(IE.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:le("space-y-2",e),...t})})});Ce.displayName="FormItem";const Ee=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Wf();return c.jsx(cy,{ref:r,className:le(n&&"text-destructive",e),htmlFor:s,...t})});Ee.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:i}=Wf();return c.jsx(ws,{ref:t,id:n,"aria-describedby":r?`${s} ${i}`:`${s}`,"aria-invalid":!!r,...e})});je.displayName="FormControl";const Yz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Wf();return c.jsx("p",{ref:r,id:n,className:le("text-sm text-muted-foreground",e),...t})});Yz.displayName="FormDescription";const Se=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:i}=Wf(),o=s?String(s==null?void 0:s.message):t;return o?c.jsx("p",{ref:n,id:i,className:le("text-sm font-medium text-destructive",e),...r,children:o}):null});Se.displayName="FormMessage";function km(e,[t,r]){return Math.min(r,Math.max(t,e))}var Zz=[" ","Enter","ArrowUp","ArrowDown"],Kz=[" ","Enter"],Tc="Select",[Bf,Hf,Gz]=uf(Tc),[ja,vU]=Wr(Tc,[Gz,Sa]),Yf=Sa(),[qz,Ei]=ja(Tc),[Xz,Qz]=ja(Tc),LE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:m,required:g}=e,w=Yf(t),[v,x]=y.useState(null),[h,p]=y.useState(null),[_,C]=y.useState(!1),E=dc(u),[P=!1,R]=_s({prop:n,defaultProp:s,onChange:i}),[j,D]=_s({prop:o,defaultProp:a,onChange:l}),L=y.useRef(null),K=v?!!v.closest("form"):!0,[T,F]=y.useState(new Set),b=Array.from(T).map($=>$.props.value).join(";");return c.jsx(Kg,{...w,children:c.jsxs(qz,{required:g,scope:t,trigger:v,onTriggerChange:x,valueNode:h,onValueNodeChange:p,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:_n(),value:j,onValueChange:D,open:P,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:m,children:[c.jsx(Bf.Provider,{scope:t,children:c.jsx(Xz,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{F(ee=>new Set(ee).add($))},[]),onNativeOptionRemove:y.useCallback($=>{F(ee=>{const Z=new Set(ee);return Z.delete($),Z})},[]),children:r})}),K?c.jsxs(cj,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:f,value:j,onChange:$=>D($.target.value),disabled:m,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(T)]},b):null]})})};LE.displayName=Tc;var FE="SelectTrigger",zE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Yf(r),o=Ei(FE,r),a=o.disabled||n,l=Xe(t,o.onTriggerChange),u=Hf(r),[d,f,m]=uj(w=>{const v=u().filter(p=>!p.disabled),x=v.find(p=>p.value===o.value),h=dj(v,w,x);h!==void 0&&o.onValueChange(h.value)}),g=()=>{a||(o.onOpenChange(!0),m())};return c.jsx(Gg,{asChild:!0,...i,children:c.jsx(Le.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":lj(o.value)?"":void 0,...s,ref:l,onClick:de(s.onClick,w=>{w.currentTarget.focus()}),onPointerDown:de(s.onPointerDown,w=>{const v=w.target;v.hasPointerCapture(w.pointerId)&&v.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&(g(),o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)},w.preventDefault())}),onKeyDown:de(s.onKeyDown,w=>{const v=d.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&f(w.key),!(v&&w.key===" ")&&Zz.includes(w.key)&&(g(),w.preventDefault())})})})});zE.displayName=FE;var UE="SelectValue",VE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=e,l=Ei(UE,r),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,f=Xe(t,l.onValueNodeChange);return sr(()=>{u(d)},[u,d]),c.jsx(Le.span,{...a,ref:f,style:{pointerEvents:"none"},children:lj(l.value)?c.jsx(c.Fragment,{children:o}):i})});VE.displayName=UE;var Jz="SelectIcon",$E=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Le.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});$E.displayName=Jz;var e8="SelectPortal",WE=e=>c.jsx(hc,{asChild:!0,...e});WE.displayName=e8;var no="SelectContent",BE=y.forwardRef((e,t)=>{const r=Ei(no,e.__scopeSelect),[n,s]=y.useState();if(sr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?js.createPortal(c.jsx(HE,{scope:e.__scopeSelect,children:c.jsx(Bf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(YE,{...e,ref:t})});BE.displayName=no;var is=10,[HE,ji]=ja(no),t8="SelectContentImpl",YE=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:w,hideWhenDetached:v,avoidCollisions:x,...h}=e,p=Ei(no,r),[_,C]=y.useState(null),[E,P]=y.useState(null),R=Xe(t,ce=>C(ce)),[j,D]=y.useState(null),[L,K]=y.useState(null),T=Hf(r),[F,b]=y.useState(!1),$=y.useRef(!1);y.useEffect(()=>{if(_)return Qg(_)},[_]),zg();const ee=y.useCallback(ce=>{const[me,...ke]=T().map(He=>He.ref.current),[De]=ke.slice(-1),Oe=document.activeElement;for(const He of ce)if(He===Oe||(He==null||He.scrollIntoView({block:"nearest"}),He===me&&E&&(E.scrollTop=0),He===De&&E&&(E.scrollTop=E.scrollHeight),He==null||He.focus(),document.activeElement!==Oe))return},[T,E]),Z=y.useCallback(()=>ee([j,_]),[ee,j,_]);y.useEffect(()=>{F&&Z()},[F,Z]);const{onOpenChange:Y,triggerPointerDownPosRef:O}=p;y.useEffect(()=>{if(_){let ce={x:0,y:0};const me=De=>{var Oe,He;ce={x:Math.abs(Math.round(De.pageX)-(((Oe=O.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(De.pageY)-(((He=O.current)==null?void 0:He.y)??0))}},ke=De=>{ce.x<=10&&ce.y<=10?De.preventDefault():_.contains(De.target)||Y(!1),document.removeEventListener("pointermove",me),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",ke,{capture:!0})}}},[_,Y,O]),y.useEffect(()=>{const ce=()=>Y(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[Y]);const[X,U]=uj(ce=>{const me=T().filter(Oe=>!Oe.disabled),ke=me.find(Oe=>Oe.ref.current===document.activeElement),De=dj(me,ce,ke);De&&setTimeout(()=>De.ref.current.focus())}),V=y.useCallback((ce,me,ke)=>{const De=!$.current&&!ke;(p.value!==void 0&&p.value===me||De)&&(D(ce),De&&($.current=!0))},[p.value]),ue=y.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=y.useCallback((ce,me,ke)=>{const De=!$.current&&!ke;(p.value!==void 0&&p.value===me||De)&&K(ce)},[p.value]),se=n==="popper"?Cm:ZE,Pe=se===Cm?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:w,hideWhenDetached:v,avoidCollisions:x}:{};return c.jsx(HE,{scope:r,content:_,viewport:E,onViewportChange:P,itemRefCallback:V,selectedItem:j,onItemLeave:ue,itemTextRefCallback:ne,focusSelectedItem:Z,selectedItemText:L,position:n,isPositioned:F,searchRef:X,children:c.jsx(yf,{as:ws,allowPinchZoom:!0,children:c.jsx(df,{asChild:!0,trapped:p.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:de(s,ce=>{var me;(me=p.trigger)==null||me.focus({preventScroll:!0}),ce.preventDefault()}),children:c.jsx(wa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:ce=>ce.preventDefault(),...h,...Pe,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:de(h.onKeyDown,ce=>{const me=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!me&&ce.key.length===1&&U(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let De=T().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Oe=ce.target,He=De.indexOf(Oe);De=De.slice(He+1)}setTimeout(()=>ee(De)),ce.preventDefault()}})})})})})})});YE.displayName=t8;var r8="SelectItemAlignedPosition",ZE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=Ei(no,r),o=ji(no,r),[a,l]=y.useState(null),[u,d]=y.useState(null),f=Xe(t,R=>d(R)),m=Hf(r),g=y.useRef(!1),w=y.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:h,focusSelectedItem:p}=o,_=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&v&&x&&h){const R=i.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),L=h.getBoundingClientRect();if(i.dir!=="rtl"){const Oe=L.left-j.left,He=D.left-Oe,ut=R.left-He,k=R.width+ut,Q=Math.max(k,j.width),G=window.innerWidth-is,A=km(He,[is,G-Q]);a.style.minWidth=k+"px",a.style.left=A+"px"}else{const Oe=j.right-L.right,He=window.innerWidth-D.right-Oe,ut=window.innerWidth-R.right-He,k=R.width+ut,Q=Math.max(k,j.width),G=window.innerWidth-is,A=km(He,[is,G-Q]);a.style.minWidth=k+"px",a.style.right=A+"px"}const K=m(),T=window.innerHeight-is*2,F=v.scrollHeight,b=window.getComputedStyle(u),$=parseInt(b.borderTopWidth,10),ee=parseInt(b.paddingTop,10),Z=parseInt(b.borderBottomWidth,10),Y=parseInt(b.paddingBottom,10),O=$+ee+F+Y+Z,X=Math.min(x.offsetHeight*5,O),U=window.getComputedStyle(v),V=parseInt(U.paddingTop,10),ue=parseInt(U.paddingBottom,10),ne=R.top+R.height/2-is,se=T-ne,Pe=x.offsetHeight/2,ce=x.offsetTop+Pe,me=$+ee+ce,ke=O-me;if(me<=ne){const Oe=x===K[K.length-1].ref.current;a.style.bottom="0px";const He=u.clientHeight-v.offsetTop-v.offsetHeight,ut=Math.max(se,Pe+(Oe?ue:0)+He+Z),k=me+ut;a.style.height=k+"px"}else{const Oe=x===K[0].ref.current;a.style.top="0px";const ut=Math.max(ne,$+v.offsetTop+(Oe?V:0)+Pe)+ke;a.style.height=ut+"px",v.scrollTop=me-ne+v.offsetTop}a.style.margin=`${is}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>g.current=!0)}},[m,i.trigger,i.valueNode,a,u,v,x,h,i.dir,n]);sr(()=>_(),[_]);const[C,E]=y.useState();sr(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const P=y.useCallback(R=>{R&&w.current===!0&&(_(),p==null||p(),w.current=!1)},[_,p]);return c.jsx(s8,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Le.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});ZE.displayName=r8;var n8="SelectPopperPosition",Cm=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=is,...i}=e,o=Yf(r);return c.jsx(qg,{...o,...i,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Cm.displayName=n8;var[s8,uy]=ja(no,{}),Em="SelectViewport",KE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=ji(Em,r),o=uy(Em,r),a=Xe(t,i.onViewportChange),l=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Bf.Slot,{scope:r,children:c.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:de(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const g=Math.abs(l.current-d.scrollTop);if(g>0){const w=window.innerHeight-is*2,v=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),h=Math.max(v,x);if(h<w){const p=h+g,_=Math.min(w,p),C=p-_;f.style.height=_+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});KE.displayName=Em;var GE="SelectGroup",[i8,o8]=ja(GE),qE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=_n();return c.jsx(i8,{scope:r,id:s,children:c.jsx(Le.div,{role:"group","aria-labelledby":s,...n,ref:t})})});qE.displayName=GE;var XE="SelectLabel",QE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=o8(XE,r);return c.jsx(Le.div,{id:s.id,...n,ref:t})});QE.displayName=XE;var Ld="SelectItem",[a8,JE]=ja(Ld),ej=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=e,a=Ei(Ld,r),l=ji(Ld,r),u=a.value===n,[d,f]=y.useState(i??""),[m,g]=y.useState(!1),w=Xe(t,h=>{var p;return(p=l.itemRefCallback)==null?void 0:p.call(l,h,n,s)}),v=_n(),x=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(a8,{scope:r,value:n,disabled:s,textId:v,isSelected:u,onItemTextChange:y.useCallback(h=>{f(p=>p||((h==null?void 0:h.textContent)??"").trim())},[]),children:c.jsx(Bf.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:c.jsx(Le.div,{role:"option","aria-labelledby":v,"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,...o,ref:w,onFocus:de(o.onFocus,()=>g(!0)),onBlur:de(o.onBlur,()=>g(!1)),onPointerUp:de(o.onPointerUp,x),onPointerMove:de(o.onPointerMove,h=>{var p;s?(p=l.onItemLeave)==null||p.call(l):h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(o.onPointerLeave,h=>{var p;h.currentTarget===document.activeElement&&((p=l.onItemLeave)==null||p.call(l))}),onKeyDown:de(o.onKeyDown,h=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&h.key===" "||(Kz.includes(h.key)&&x(),h.key===" "&&h.preventDefault())})})})})});ej.displayName=Ld;var el="SelectItemText",tj=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,o=Ei(el,r),a=ji(el,r),l=JE(el,r),u=Qz(el,r),[d,f]=y.useState(null),m=Xe(t,h=>f(h),l.onItemTextChange,h=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,h,l.value,l.disabled)}),g=d==null?void 0:d.textContent,w=y.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=u;return sr(()=>(v(w),()=>x(w)),[v,x,w]),c.jsxs(c.Fragment,{children:[c.jsx(Le.span,{id:l.textId,...i,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?js.createPortal(i.children,o.valueNode):null]})});tj.displayName=el;var rj="SelectItemIndicator",nj=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return JE(rj,r).isSelected?c.jsx(Le.span,{"aria-hidden":!0,...n,ref:t}):null});nj.displayName=rj;var jm="SelectScrollUpButton",sj=y.forwardRef((e,t)=>{const r=ji(jm,e.__scopeSelect),n=uy(jm,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return sr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(oj,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});sj.displayName=jm;var Tm="SelectScrollDownButton",ij=y.forwardRef((e,t)=>{const r=ji(Tm,e.__scopeSelect),n=uy(Tm,e.__scopeSelect),[s,i]=y.useState(!1),o=Xe(t,n.onScrollButtonChange);return sr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(oj,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ij.displayName=Tm;var oj=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=ji("SelectScrollButton",r),o=y.useRef(null),a=Hf(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),sr(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(Le.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:de(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:de(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:de(s.onPointerLeave,()=>{l()})})}),l8="SelectSeparator",aj=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Le.div,{"aria-hidden":!0,...n,ref:t})});aj.displayName=l8;var Nm="SelectArrow",c8=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Yf(r),i=Ei(Nm,r),o=ji(Nm,r);return i.open&&o.position==="popper"?c.jsx(Xg,{...s,...n,ref:t}):null});c8.displayName=Nm;function lj(e){return e===""||e===void 0}var cj=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),i=Xe(t,s),o=wC(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&d){const f=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(f)}},[o,r]),c.jsx(kc,{asChild:!0,children:c.jsx("select",{...n,ref:i,defaultValue:r})})});cj.displayName="BubbleSelect";function uj(e){const t=At(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function dj(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=u8(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function u8(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var d8=LE,fj=zE,f8=VE,h8=$E,p8=WE,hj=BE,m8=KE,g8=qE,pj=QE,mj=ej,v8=tj,y8=nj,gj=sj,vj=ij,yj=aj;const Mi=d8,tl=g8,Ii=f8,Ks=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fj,{ref:n,className:le("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,c.jsx(h8,{asChild:!0,children:c.jsx(z1,{className:"h-4 w-4 opacity-50"})})]}));Ks.displayName=fj.displayName;const xj=y.forwardRef(({className:e,...t},r)=>c.jsx(gj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(jP,{className:"h-4 w-4"})}));xj.displayName=gj.displayName;const wj=y.forwardRef(({className:e,...t},r)=>c.jsx(vj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(z1,{className:"h-4 w-4"})}));wj.displayName=vj.displayName;const Gs=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(p8,{children:c.jsxs(hj,{ref:s,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(xj,{}),c.jsx(m8,{className:le("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(wj,{})]})}));Gs.displayName=hj.displayName;const Lo=y.forwardRef(({className:e,...t},r)=>c.jsx(pj,{ref:r,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Lo.displayName=pj.displayName;const pn=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(mj,{ref:n,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(y8,{children:c.jsx(F1,{className:"h-4 w-4"})})}),c.jsx(v8,{children:t})]}));pn.displayName=mj.displayName;const x8=y.forwardRef(({className:e,...t},r)=>c.jsx(yj,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));x8.displayName=yj.displayName;const Rm=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"]]]),w8=Array.from(Rm.keys()),dy=fv,fy=hv,_8=pv,_j=y.forwardRef(({className:e,...t},r)=>c.jsx(gc,{ref:r,className:le("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}));_j.displayName=gc.displayName;const Zf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(_8,{children:[c.jsx(_j,{}),c.jsxs(vc,{ref:n,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,c.jsxs(_f,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(Mg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zf.displayName=vc.displayName;const Kf=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Kf.displayName="DialogHeader";const Gf=y.forwardRef(({className:e,...t},r)=>c.jsx(yc,{ref:r,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));Gf.displayName=yc.displayName;const b8=y.forwardRef(({className:e,...t},r)=>c.jsx(xc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));b8.displayName=xc.displayName;function S8(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var hy="ScrollArea",[bj,yU]=Wr(hy),[k8,cn]=bj(hy),Sj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=y.useState(null),[u,d]=y.useState(null),[f,m]=y.useState(null),[g,w]=y.useState(null),[v,x]=y.useState(null),[h,p]=y.useState(0),[_,C]=y.useState(0),[E,P]=y.useState(!1),[R,j]=y.useState(!1),D=Xe(t,K=>l(K)),L=dc(s);return c.jsx(k8,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:g,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:P,scrollbarY:v,onScrollbarYChange:x,scrollbarYEnabled:R,onScrollbarYEnabledChange:j,onCornerWidthChange:p,onCornerHeightChange:C,children:c.jsx(Le.div,{dir:L,...o,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});Sj.displayName=hy;var kj="ScrollAreaViewport",Cj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,o=cn(kj,r),a=y.useRef(null),l=Xe(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(Le.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Cj.displayName=kj;var Gn="ScrollAreaScrollbar",py=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Gn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(C8,{...n,ref:t,forceMount:r}):s.type==="scroll"?c.jsx(E8,{...n,ref:t,forceMount:r}):s.type==="auto"?c.jsx(Ej,{...n,ref:t,forceMount:r}):s.type==="always"?c.jsx(my,{...n,ref:t}):null});py.displayName=Gn;var C8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Gn,e.__scopeScrollArea),[i,o]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(wr,{present:r||i,children:c.jsx(Ej,{"data-state":i?"visible":"hidden",...n,ref:t})})}),E8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=cn(Gn,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Xf(()=>l("SCROLL_END"),100),[a,l]=S8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const g=u[d];f!==g&&(l("SCROLL"),o()),f=g};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,i,l,o]),c.jsx(wr,{present:r||a!=="hidden",children:c.jsx(my,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:de(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:de(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Ej=y.forwardRef((e,t)=>{const r=cn(Gn,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,o]=y.useState(!1),a=e.orientation==="horizontal",l=Xf(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;o(a?u:d)}},10);return ha(r.viewport,l),ha(r.content,l),c.jsx(wr,{present:n||i,children:c.jsx(my,{"data-state":i?"visible":"hidden",...s,ref:t})})}),my=y.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=cn(Gn,e.__scopeScrollArea),i=y.useRef(null),o=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Pj(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function f(m,g){return A8(m,o.current,a,g)}return r==="horizontal"?c.jsx(j8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollLeft,g=sw(m,a,s.dir);i.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollLeft=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollLeft=f(m,s.dir))}}):r==="vertical"?c.jsx(T8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollTop,g=sw(m,a);i.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{s.viewport&&(s.viewport.scrollTop=m)},onDragScroll:m=>{s.viewport&&(s.viewport.scrollTop=f(m))}}):null}),j8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=cn(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(Tj,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":qf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Dj(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:zd(o.paddingLeft),paddingEnd:zd(o.paddingRight)}})}})}),T8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=cn(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Xe(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(Tj,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":qf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Dj(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:zd(o.paddingTop),paddingEnd:zd(o.paddingBottom)}})}})}),[N8,jj]=bj(Gn),Tj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,g=cn(Gn,r),[w,v]=y.useState(null),x=Xe(t,D=>v(D)),h=y.useRef(null),p=y.useRef(""),_=g.viewport,C=n.content-n.viewport,E=At(d),P=At(l),R=Xf(f,10);function j(D){if(h.current){const L=D.clientX-h.current.left,K=D.clientY-h.current.top;u({x:L,y:K})}}return y.useEffect(()=>{const D=L=>{const K=L.target;(w==null?void 0:w.contains(K))&&E(L,C)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[_,w,C,E]),y.useEffect(P,[n,P]),ha(w,R),ha(g.content,R),c.jsx(N8,{scope:r,scrollbar:w,hasThumb:s,onThumbChange:At(i),onThumbPointerUp:At(o),onThumbPositionChange:P,onThumbPointerDown:At(a),children:c.jsx(Le.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:de(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),h.current=w.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),j(D))}),onPointerMove:de(e.onPointerMove,j),onPointerUp:de(e.onPointerUp,D=>{const L=D.target;L.hasPointerCapture(D.pointerId)&&L.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=p.current,g.viewport&&(g.viewport.style.scrollBehavior=""),h.current=null})})})}),Fd="ScrollAreaThumb",Nj=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=jj(Fd,e.__scopeScrollArea);return c.jsx(wr,{present:r||s.hasThumb,children:c.jsx(R8,{ref:t,...n})})}),R8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=cn(Fd,r),o=jj(Fd,r),{onThumbPositionChange:a}=o,l=Xe(t,f=>o.onThumbChange(f)),u=y.useRef(),d=Xf(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!u.current){const g=D8(f,a);u.current=g,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,a]),c.jsx(Le.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:de(e.onPointerDownCapture,f=>{const g=f.target.getBoundingClientRect(),w=f.clientX-g.left,v=f.clientY-g.top;o.onThumbPointerDown({x:w,y:v})}),onPointerUp:de(e.onPointerUp,o.onThumbPointerUp)})});Nj.displayName=Fd;var gy="ScrollAreaCorner",Rj=y.forwardRef((e,t)=>{const r=cn(gy,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(P8,{...e,ref:t}):null});Rj.displayName=gy;var P8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=cn(gy,r),[i,o]=y.useState(0),[a,l]=y.useState(0),u=!!(i&&a);return ha(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),ha(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?c.jsx(Le.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function zd(e){return e?parseInt(e,10):0}function Pj(e,t){const r=e/t;return isNaN(r)?0:r}function qf(e){const t=Pj(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function A8(e,t,r,n="ltr"){const s=qf(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Aj([l,u],f)(e)}function sw(e,t,r="ltr"){const n=qf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=km(e,l);return Aj([0,o],[0,a])(u)}function Aj(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 Dj(e,t){return e>0&&e<t}var D8=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Xf(e,t){const r=At(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ha(e,t){const r=At(t);sr(()=>{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 Oj=Sj,O8=Cj,M8=Rj;const Qf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Oj,{ref:n,className:le("relative overflow-hidden",e),...r,children:[c.jsx(O8,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(Mj,{}),c.jsx(M8,{})]}));Qf.displayName=Oj.displayName;const Mj=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(py,{ref:n,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(Nj,{className:"relative flex-1 rounded-full bg-border"})}));Mj.displayName=py.displayName;const ui=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"]]]),iw=e=>ui.get(e),Ti=ge.union([ge.literal("aliyun"),ge.literal("tencent"),ge.literal("ssh"),ge.literal("webhook"),ge.literal("cloudflare"),ge.literal("qiniu"),ge.literal("namesilo"),ge.literal("godaddy")],{message:"请选择云服务商"}),Ni=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"}},I8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,secretId:ge.string().min(1).max(64),secretKey:ge.string().min(1).max(64)});let i={secretId:"",secretKey:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:i.secretId,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"secretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretId"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretId",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},L8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,accessKeyId:ge.string().min(1).max(64),accessSecretId:ge.string().min(1).max(64)});let i={accessKeyId:"",accessKeySecret:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:i.accessKeyId,accessSecretId:i.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"accessKeyId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeyId"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"accessSecretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeySecret"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},vy=y.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:le("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}));vy.displayName="Textarea";const yy=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=Hr(),[n,s]=y.useState(!1),i=ge.object({name:ge.string().min(1).max(64)}),o=Yr({resolver:Zr(i),defaultValues:{name:""}}),a=async l=>{try{await F3({name:l.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([f,m])=>{o.setError(f,{type:"manual",message:m.message})})}};return c.jsxs(dy,{onOpenChange:s,open:n,children:[c.jsx(fy,{asChild:!0,className:le(e),children:t}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsx(Gf,{children:"添加分组"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"组名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入组名",...l,type:"text"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},F8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:i}}=Hr(),o=y.useRef(null),[a,l]=y.useState(""),u=e&&e.group?e.group:"",d=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,host:ge.string().ip({message:"请输入合法的IP地址"}),group:ge.string().optional(),port:ge.string().min(1).max(5),username:ge.string().min(1).max(64),password:ge.string().min(0).max(64),key:ge.string().min(0).max(20480),keyFile:ge.any().optional(),command:ge.string().min(1).max(2048),certPath:ge.string().min(0).max(2048),keyPath:ge.string().min(0).max(2048)});let f={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&&(f=e.config);const m=Yr({resolver:Zr(d),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:f.host,port:f.port,username:f.username,password:f.password,key:f.key,keyFile:f.keyFile,certPath:f.certPath,keyPath:f.keyPath,command:f.command}}),g=async x=>{console.log(x);let h=x.group;h=="emptyId"&&(h="");const p={id:x.id,name:x.name,configType:x.configType,usage:Ni(x.configType),group:h,config:{host:x.host,port:x.port,username:x.username,password:x.password,key:x.key,command:x.command,certPath:x.certPath,keyPath:x.keyPath}};try{const _=await Ci(p);t(),p.id=_.id,p.created=_.created,p.updated=_.updated,x.id?n(p):r(p),h!=u&&(u&&await $0({id:u,"access-":p.id}),h&&await $0({id:h,"access+":p.id})),s()}catch(_){Object.entries(_.response.data).forEach(([E,P])=>{m.setError(E,{type:"manual",message:P.message})});return}},w=async x=>{var C;const h=(C=x.target.files)==null?void 0:C[0];if(!h)return;const p=h;l(p.name);const _=await d6(p);m.setValue("key",_)},v=()=>{var x;console.log(o.current),(x=o.current)==null||x.click()};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...m,children:c.jsxs("form",{onSubmit:x=>{x.stopPropagation(),m.handleSubmit(g)(x)},className:"space-y-3",children:[c.jsx(Ne,{control:m.control,name:"name",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"group",render:({field:x})=>c.jsxs(Ce,{children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),c.jsx(yy,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Nu,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Mi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:h=>{m.setValue("group",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择分组"})}),c.jsxs(Gs,{children:[c.jsx(pn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(h=>c.jsx(pn,{value:h.id?h.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:h.name})},h.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"id",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"configType",render:({field:x})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...x})}),c.jsx(Se,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(Ne,{control:m.control,name:"host",render:({field:x})=>c.jsxs(Ce,{className:"grow",children:[c.jsx(Ee,{children:"服务器IP"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Host",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"port",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SSH端口"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Port",...x,type:"number"})}),c.jsx(Se,{})]})})]}),c.jsx(Ne,{control:m.control,name:"username",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入用户名",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"password",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入密码",...x,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"key",render:({field:x})=>c.jsxs(Ce,{hidden:!0,children:[c.jsx(Ee,{children:"Key使用证书登录"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Key",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"keyFile",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Key使用证书登录"}),c.jsx(je,{children:c.jsxs("div",{children:[c.jsx(Je,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:v,children:a||"请选择文件"}),c.jsx(Fe,{placeholder:"请输入Key",...x,ref:o,className:"hidden",hidden:!0,type:"file",onChange:w})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"certPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"证书上传路径"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入证书上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"keyPath",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"私钥上传路径"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入私钥上传路径",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:m.control,name:"command",render:({field:x})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Command"}),c.jsx(je,{children:c.jsx(vy,{placeholder:"请输入要执行的命令",...x})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},z8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,url:ge.string().url()});let i={url:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:i.url}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{url:l.url}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"url",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Webhook Url"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入Webhook Url",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},U8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,dnsApiToken:ge.string().min(1).max(64)});let i={dnsApiToken:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:i.dnsApiToken}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{dnsApiToken:l.dnsApiToken}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"dnsApiToken",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"CLOUD_DNS_API_TOKEN"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},V8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,accessKey:ge.string().min(1).max(64),secretKey:ge.string().min(1).max(64)});let i={accessKey:"",secretKey:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:i.accessKey,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{accessKey:l.accessKey,secretKey:l.secretKey}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"accessKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入AccessKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},$8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,apiKey:ge.string().min(1).max(64)});let i={apiKey:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:i.apiKey}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{apiKey:l.apiKey}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"NAMESILO_API_KEY"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入NAMESILO_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})},W8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Hr(),s=ge.object({id:ge.string().optional(),name:ge.string().min(1).max(64),configType:Ti,apiKey:ge.string().min(1).max(64),apiSecret:ge.string().min(1).max(64)});let i={apiKey:"",apiSecret:""};e&&(i=e.config);const o=Yr({resolver:Zr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:i.apiKey,apiSecret:i.apiSecret}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ni(l.configType),config:{apiKey:l.apiKey,apiSecret:l.apiSecret}};try{const d=await Ci(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,g])=>{o.setError(m,{type:"manual",message:g.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Kr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Ne,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Fe,{...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_KEY"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入GODADDY_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:o.control,name:"apiSecret",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_SECRET"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入GODADDY_API_SECRET",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})})};function gl({trigger:e,op:t,data:r,className:n}){const[s,i]=y.useState(!1),o=Array.from(ui.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(I8,{data:r,onAfterReq:()=>{i(!1)}});break;case"aliyun":u=c.jsx(L8,{data:r,onAfterReq:()=>{i(!1)}});break;case"ssh":u=c.jsx(F8,{data:r,onAfterReq:()=>{i(!1)}});break;case"webhook":u=c.jsx(z8,{data:r,onAfterReq:()=>{i(!1)}});break;case"cloudflare":u=c.jsx(U8,{data:r,onAfterReq:()=>{i(!1)}});break;case"qiniu":u=c.jsx(V8,{data:r,onAfterReq:()=>{i(!1)}});break;case"namesilo":u=c.jsx($8,{data:r,onAfterReq:()=>{i(!1)}});break;case"godaddy":u=c.jsx(W8,{data:r,onAfterReq:()=>{i(!1)}});break}const d=f=>f==a?"border-primary":"";return c.jsxs(dy,{onOpenChange:i,open:s,children:[c.jsx(fy,{asChild:!0,className:le(n),children:e}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsxs(Gf,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsx(Qf,{className:"max-h-[80vh]",children:c.jsxs("div",{className:"container py-3",children:[c.jsx(cy,{children:"服务商"}),c.jsxs(Mi,{onValueChange:f=>{console.log(f),l(f)},defaultValue:a,children:[c.jsx(Ks,{className:"mt-3",children:c.jsx(Ii,{placeholder:"请选择服务商"})}),c.jsx(Gs,{children:c.jsxs(tl,{children:[c.jsx(Lo,{children:"服务商"}),o.map(f=>{var m,g;return c.jsx(pn,{value:f,children:c.jsxs("div",{className:le("flex items-center space-x-2 rounded cursor-pointer",d(f)),children:[c.jsx("img",{src:(m=ui.get(f))==null?void 0:m[1],className:"h-6 w-6"}),c.jsx("div",{children:(g=ui.get(f))==null?void 0:g[0]})]})},f)})]})})]}),u]})})]})]})}const B8=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=Hr(),[s,i]=y.useState(!1),o=ge.object({email:ge.string().email()}),a=Yr({resolver:Zr(o),defaultValues:{email:""}}),l=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 V3({...r,name:"emails",content:{emails:d}});n(f),a.reset(),a.clearErrors(),i(!1)}catch(f){Object.entries(f.response.data).forEach(([g,w])=>{a.setError(g,{type:"manual",message:w.message})})}};return c.jsxs(dy,{onOpenChange:i,open:s,children:[c.jsx(fy,{asChild:!0,className:le(e),children:t}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsx(Gf,{children:"添加邮箱"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Kr,{...a,children:c.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),a.handleSubmit(l)(u)},className:"space-y-8",children:[c.jsx(Ne,{control:a.control,name:"email",render:({field:u})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"邮箱"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入邮箱",...u,type:"email"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})},H8=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=Hr(),[n,s]=y.useState(),i=Hn(),[o,a]=y.useState("base"),[l,u]=y.useState(n?n.targetType:"");y.useEffect(()=>{const h=new URLSearchParams(i.search).get("id");h&&(async()=>{const _=await g6(h);s(_),u(_.targetType)})()},[i.search]);const d=ge.object({id:ge.string().optional(),domain:ge.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:ge.string().email().optional(),access:ge.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:ge.string().optional(),targetType:ge.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:ge.string().optional(),group:ge.string().optional()}),f=Yr({resolver:Zr(d),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:""}});y.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})},[n,f]);const m=e.filter(x=>{if(x.usage=="apply")return!1;if(l=="")return!0;const h=l.split("-");return x.configType===h[0]}),{toast:g}=Cc(),w=on(),v=async x=>{const h=x.group=="emptyId"?"":x.group,p=x.targetAccess==="emptyId"?"":x.targetAccess;if(h==""&&p==""){f.setError("group",{type:"manual",message:"部署授权和部署授权组至少选一个"}),f.setError("targetAccess",{type:"manual",message:"部署授权和部署授权组至少选一个"});return}const _={id:x.id,crontab:"0 0 * * *",domain:x.domain,email:x.email,access:x.access,group:h,targetAccess:p,targetType:x.targetType,variables:x.variables};try{await xm(_);let C="域名编辑成功";_.id==""&&(C="域名添加成功"),g({title:"成功",description:C}),w("/domains")}catch(C){Object.entries(C.response.data).forEach(([P,R])=>{f.setError(P,{type:"manual",message:R.message})});return}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(ey,{}),c.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),c.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[c.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:[c.jsx("div",{className:le("cursor-pointer text-right",o==="base"?"text-primary":""),onClick:()=>{a("base")},children:"基础设置"}),c.jsx("div",{className:le("cursor-pointer text-right",o==="advance"?"text-primary":""),onClick:()=>{a("advance")},children:"高级设置"})]}),c.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:c.jsx(Kr,{...f,children:c.jsxs("form",{onSubmit:f.handleSubmit(v),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Ne,{control:f.control,name:"domain",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"域名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"请输入域名",...x})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"email",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"Email申请证书需要提供邮箱"}),c.jsx(B8,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Nu,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Mi,{...x,value:x.value,onValueChange:h=>{f.setValue("email",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择邮箱"})}),c.jsx(Gs,{children:c.jsxs(tl,{children:[c.jsx(Lo,{children:"邮箱列表"}),t.content.emails.map(h=>c.jsx(pn,{value:h,children:c.jsx("div",{children:h})},h))]})})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"access",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(gl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Nu,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Mi,{...x,value:x.value,onValueChange:h=>{f.setValue("access",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择授权配置"})}),c.jsx(Gs,{children:c.jsxs(tl,{children:[c.jsx(Lo,{children:"服务商授权配置"}),e.filter(h=>h.usage!="deploy").map(h=>{var p;return c.jsx(pn,{value:h.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(p=ui.get(h.configType))==null?void 0:p[1]}),c.jsx("div",{children:h.name})]})},h.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"targetType",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"部署服务类型"}),c.jsx(je,{children:c.jsxs(Mi,{...x,onValueChange:h=>{u(h),f.setValue("targetType",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择部署服务类型"})}),c.jsx(Gs,{children:c.jsxs(tl,{children:[c.jsx(Lo,{children:"部署服务类型"}),w8.map(h=>{var p,_;return c.jsx(pn,{value:h,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(p=Rm.get(h))==null?void 0:p[1]}),c.jsx("div",{children:(_=Rm.get(h))==null?void 0:_[0]})]})},h)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"targetAccess",render:({field:x})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(gl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Nu,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Mi,{...x,onValueChange:h=>{f.setValue("targetAccess",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择授权配置"})}),c.jsx(Gs,{children:c.jsxs(tl,{children:[c.jsxs(Lo,{children:["服务商授权配置",f.getValues().targetAccess]}),c.jsx(pn,{value:"emptyId",children:c.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(h=>{var p;return c.jsx(pn,{value:h.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(p=ui.get(h.configType))==null?void 0:p[1]}),c.jsx("div",{children:h.name})]})},h.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"group",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance"||l!="ssh",children:[c.jsx(Ee,{className:"w-full flex justify-between",children:c.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),c.jsx(je,{children:c.jsxs(Mi,{...x,value:x.value,defaultValue:"emptyId",onValueChange:h=>{f.setValue("group",h)},children:[c.jsx(Ks,{children:c.jsx(Ii,{placeholder:"请选择分组"})}),c.jsxs(Gs,{children:[c.jsx(pn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),r.filter(h=>{var p;return h.expand&&((p=h.expand)==null?void 0:p.access.length)>0}).map(h=>c.jsx(pn,{value:h.id?h.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:h.name})},h.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:f.control,name:"variables",render:({field:x})=>c.jsxs(Ce,{hidden:o!="advance",children:[c.jsx(Ee,{children:"变量"}),c.jsx(je,{children:c.jsx(vy,{placeholder:`可在SSH部署中使用,形如:
key=val;
key2=val2;`,...x,className:"placeholder:whitespace-pre-wrap"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"保存"})})]})})})]})]})})},Ij=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ij.displayName="Card";const Lj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex flex-col space-y-1.5 p-6",e),...t}));Lj.displayName="CardHeader";const Fj=y.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:le("text-2xl font-semibold leading-none tracking-tight",e),...t}));Fj.displayName="CardTitle";const zj=y.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:le("text-sm text-muted-foreground",e),...t}));zj.displayName="CardDescription";const Uj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("p-6 pt-0",e),...t}));Uj.displayName="CardContent";const Vj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex items-center p-6 pt-0",e),...t}));Vj.displayName="CardFooter";const Ud=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",Y8=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Hr(),{toast:r}=Cc(),n=on(),s=async o=>{try{await L3(o),t()}catch(a){r({title:"删除失败",description:Ud(a),variant:"destructive"});return}},i=()=>{n("/access")};return c.jsxs("div",{className:"mt-10",children:[c.jsx(fl,{when:e.length==0,children:c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(n0,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(yy,{trigger:c.jsx(Je,{children:"新增授权组"}),className:"mt-3"})]})})}),c.jsx(Qf,{className:"h-[75vh] overflow-hidden",children:c.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(o=>c.jsxs(Ij,{className:"w-full md:w-[350px]",children:[c.jsxs(Lj,{children:[c.jsx(Fj,{children:o.name}),c.jsxs(zj,{children:["共有",o.expand?o.expand.access.length:0,"个部署授权配置"]})]}),c.jsx(Uj,{className:"min-h-[180px]",children:o.expand?c.jsx(c.Fragment,{children:o.expand.access.slice(0,3).map(a=>c.jsx("div",{className:"flex flex-col mb-3",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"",children:c.jsx("img",{src:iw(a.configType)[1],alt:"provider",className:"w-8 h-8"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:a.name}),c.jsx("div",{className:"text-xs text-muted-foreground",children:iw(a.configType)[0]})]})]})},a.id))}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[c.jsx("div",{children:c.jsx(n0,{size:40})}),c.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),c.jsx(Vj,{children:c.jsxs("div",{className:"flex justify-end w-full",children:[c.jsx(fl,{when:!!(o.expand&&o.expand.access.length>0),children:c.jsx("div",{children:c.jsx(Je,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${o.id}&tab=access`,{replace:!0})},children:"所有授权"})})}),c.jsx(fl,{when:!o.expand||o.expand.access.length==0,children:c.jsx("div",{children:c.jsx(Je,{size:"sm",onClick:i,children:"新增授权"})})}),c.jsx("div",{className:"ml-3",children:c.jsxs(vC,{children:[c.jsx(yC,{asChild:!0,children:c.jsx(Je,{variant:"destructive",size:"sm",children:"删除"})}),c.jsxs(Wv,{children:[c.jsxs(Bv,{children:[c.jsx(Yv,{className:"dark:text-gray-200",children:"删除组"}),c.jsx(Zv,{children:"确定要删除部署授权组吗?"})]}),c.jsxs(Hv,{children:[c.jsx(Gv,{className:"dark:text-gray-200",children:"取消"}),c.jsx(Kv,{onClick:()=>{s(o.id?o.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})};var xy="Tabs",[Z8,xU]=Wr(xy,[gf]),$j=gf(),[K8,wy]=Z8(xy),Wj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=dc(a),[f,m]=_s({prop:n,onChange:s,defaultProp:i});return c.jsx(K8,{scope:r,baseId:_n(),value:f,onValueChange:m,orientation:o,dir:d,activationMode:l,children:c.jsx(Le.div,{dir:d,"data-orientation":o,...u,ref:t})})});Wj.displayName=xy;var Bj="TabsList",Hj=y.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,i=wy(Bj,r),o=$j(r);return c.jsx(bb,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:c.jsx(Le.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});Hj.displayName=Bj;var Yj="TabsTrigger",Zj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=e,o=wy(Yj,r),a=$j(r),l=qj(o.baseId,n),u=Xj(o.baseId,n),d=n===o.value;return c.jsx(Sb,{asChild:!0,...a,focusable:!s,active:d,children:c.jsx(Le.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:de(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:de(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:de(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(n)})})})});Zj.displayName=Yj;var Kj="TabsContent",Gj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=e,a=wy(Kj,r),l=qj(a.baseId,n),u=Xj(a.baseId,n),d=n===a.value,f=y.useRef(d);return y.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(wr,{present:s||d,children:({present:m})=>c.jsx(Le.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});Gj.displayName=Kj;function qj(e,t){return`${e}-trigger-${t}`}function Xj(e,t){return`${e}-content-${t}`}var G8=Wj,Qj=Hj,Jj=Zj,eT=Gj;const q8=G8,tT=y.forwardRef(({className:e,...t},r)=>c.jsx(Qj,{ref:r,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));tT.displayName=Qj.displayName;const Pm=y.forwardRef(({className:e,...t},r)=>c.jsx(Jj,{ref:r,className:le("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}));Pm.displayName=Jj.displayName;const Am=y.forwardRef(({className:e,...t},r)=>c.jsx(eT,{ref:r,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Am.displayName=eT.displayName;const X8=()=>{const{config:e,deleteAccess:t}=Hr(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),i=on(),o=Hn(),a=new URLSearchParams(o.search),l=a.get("page"),u=l?Number(l):1,d=a.get("tab"),f=a.get("accessGroupId"),m=(u-1)*n,g=m+n,w=async x=>{const h=await I3(x);t(h.id)},v=x=>{a.set("tab",x),i({search:a.toString()})};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),d!="access_group"?c.jsx(gl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add"}):c.jsx(yy,{trigger:c.jsx(Je,{children:"添加授权组"})})]}),c.jsxs(q8,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[c.jsxs(tT,{className:"space-x-5 px-3",children:[c.jsx(Pm,{value:"access",onClick:()=>{v("access")},children:"授权管理"}),c.jsx(Pm,{value:"access_group",onClick:()=>{v("access_group")},children:"授权组管理"})]}),c.jsx(Am,{value:"access",children:r.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(PP,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(gl,{trigger:c.jsx(Je,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.filter(x=>f?x.group==f:!0).slice(m,g).map(x=>{var h,p;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:x.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(h=ui.get(x.configType))==null?void 0:h[1],className:"w-6"}),c.jsx("div",{children:(p=ui.get(x.configType))==null?void 0:p[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于"," ",x.created&&ca(x.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于"," ",x.updated&&ca(x.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(gl,{trigger:c.jsx(Je,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:x}),c.jsx(Yt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Je,{variant:"link",className:"p-0",onClick:()=>{w(x)},children:"删除"})]})]},x.id)}),c.jsx(Xk,{totalPages:s,currentPage:u,onPageChange:x=>{a.set("page",x.toString()),i({search:a.toString()})}})]})}),c.jsx(Am,{value:"access_group",children:c.jsx(Y8,{})})]})]})},Q8=uc("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"}}),_y=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:le(Q8({variant:t}),e),...r}));_y.displayName="Alert";const by=y.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));by.displayName="AlertTitle";const Sy=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("text-sm [&_p]:leading-relaxed",e),...t}));Sy.displayName="AlertDescription";const rT=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 ft().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},J8=()=>{const e=on(),[t,r]=y.useState(),[n]=xP(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const o={};s&&(o.domain=s);const a=await rT(o);r(a.items)})()},[s]),c.jsxs(Qf,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Dg,{size:16,className:"text-green-700"}):c.jsx(Og,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx($v,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ca(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(mv,{children:[c.jsx(gv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(bf,{className:"sm:max-w-5xl",children:[c.jsx(vv,{children:c.jsxs(yv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(_y,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(by,{children:"暂无数据"}),c.jsxs(Sy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(U1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},eU=ge.object({username:ge.string().email({message:"请输入正确的邮箱地址"}),password:ge.string().min(10,{message:"密码至少10个字符"})}),tU=()=>{const e=Yr({resolver:Zr(eU),defaultValues:{username:"",password:""}}),t=async n=>{try{await ft().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const i=Ud(s);e.setError("username",{message:i}),e.setError("password",{message:i})}},r=on();return c.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(Kr,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Ne,{control:e.control,name:"username",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"email",...n})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:e.control,name:"password",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"shadcn",...n,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"登录"})})]})})]})},rU=()=>ft().authStore.isValid&&ft().authStore.isAdmin?c.jsx(I1,{to:"/"}):c.jsxs("div",{className:"container",children:[c.jsx(Ag,{}),c.jsx(Yk,{})]}),nU=ge.object({oldPassword:ge.string().min(10,{message:"密码至少10个字符"}),newPassword:ge.string().min(10,{message:"密码至少10个字符"}),confirmPassword:ge.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),sU=()=>{const{toast:e}=Cc(),t=on(),r=Yr({resolver:Zr(nU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var i,o;try{await ft().admins.authWithPassword((i=ft().authStore.model)==null?void 0:i.email,s.oldPassword)}catch(a){const l=Ud(a);r.setError("oldPassword",{message:l})}try{await ft().admins.update((o=ft().authStore.model)==null?void 0:o.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),ft().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=Ud(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx(Kr,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Ne,{control:r.control,name:"oldPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"当前密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"当前密码",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:r.control,name:"newPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"新密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"newPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Ne,{control:r.control,name:"confirmPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"确认密码"}),c.jsx(je,{children:c.jsx(Fe,{placeholder:"confirmPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Je,{type:"submit",children:"确认修改"})})]})})})},iU=()=>c.jsxs("div",{children:[c.jsx(ey,{}),c.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"设置密码"}),c.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:c.jsx(Ag,{})})]}),oU=()=>{const[e,t]=y.useState(),[r,n]=y.useState(),s=on();return y.useEffect(()=>{(async()=>{const o=await m6();t(o)})()},[]),y.useEffect(()=>{(async()=>{const a=await rT({perPage:8});n(a.items)})()},[]),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"flex justify-between items-center",children:c.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),c.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(MP,{size:48,strokeWidth:1,className:"text-blue-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?c.jsx(hr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(CP,{size:48,strokeWidth:1,className:"text-red-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?c.jsx(hr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(AP,{size:48,strokeWidth:1,className:"text-green-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?c.jsx(hr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(SP,{size:48,strokeWidth:1,className:"text-gray-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?c.jsx(hr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?c.jsx(c.Fragment,{children:c.jsxs(_y,{className:"max-w-[40em] mt-10",children:[c.jsx(by,{children:"暂无数据"}),c.jsxs(Sy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(U1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Je,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(i=>{var o,a;return c.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:i.phase==="deploy"&&i.phaseSuccess?c.jsx(Dg,{size:16,className:"text-green-700"}):c.jsx(Og,{size:16,className:"text-red-700"})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx($v,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:ca(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(mv,{children:[c.jsx(gv,{asChild:!0,children:c.jsx(Je,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(bf,{className:"sm:max-w-5xl",children:[c.jsx(vv,{children:c.jsxs(yv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]})]})]})},aU=sP([{path:"/",element:c.jsx(X3,{}),children:[{path:"/",element:c.jsx(oU,{})},{path:"/domains",element:c.jsx(w6,{})},{path:"/edit",element:c.jsx(H8,{})},{path:"/access",element:c.jsx(X8,{})},{path:"/history",element:c.jsx(J8,{})},{path:"/setting",element:c.jsx(iU,{}),children:[{path:"/setting/password",element:c.jsx(sU,{})}]}]},{path:"/login",element:c.jsx(rU,{}),children:[{path:"/login",element:c.jsx(tU,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);Jh.createRoot(document.getElementById("root")).render(c.jsx(et.StrictMode,{children:c.jsx(B3,{defaultTheme:"system",storageKey:"vite-ui-theme",children:c.jsx(hP,{router:aU})})}))});export default lU();