certimate/ui/dist/assets/index-BYO3zdEX.js
2024-10-19 18:12:45 +08:00

330 lines
905 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 xP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var XH=xP((d9,Ed)=>{function x_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[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"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w_={exports:{}},Vf={},b_={exports:{}},nt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gc=Symbol.for("react.element"),wP=Symbol.for("react.portal"),bP=Symbol.for("react.fragment"),_P=Symbol.for("react.strict_mode"),SP=Symbol.for("react.profiler"),kP=Symbol.for("react.provider"),CP=Symbol.for("react.context"),jP=Symbol.for("react.forward_ref"),EP=Symbol.for("react.suspense"),NP=Symbol.for("react.memo"),TP=Symbol.for("react.lazy"),d0=Symbol.iterator;function PP(e){return e===null||typeof e!="object"?null:(e=d0&&e[d0]||e["@@iterator"],typeof e=="function"?e:null)}var __={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S_=Object.assign,k_={};function Xa(e,t,n){this.props=e,this.context=t,this.refs=k_,this.updater=n||__}Xa.prototype.isReactComponent={};Xa.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")};Xa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function C_(){}C_.prototype=Xa.prototype;function iy(e,t,n){this.props=e,this.context=t,this.refs=k_,this.updater=n||__}var ay=iy.prototype=new C_;ay.constructor=iy;S_(ay,Xa.prototype);ay.isPureReactComponent=!0;var f0=Array.isArray,j_=Object.prototype.hasOwnProperty,ly={current:null},E_={key:!0,ref:!0,__self:!0,__source:!0};function N_(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)j_.call(t,r)&&!E_.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Gc,type:e,key:o,ref:i,props:s,_owner:ly.current}}function RP(e,t){return{$$typeof:Gc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cy(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gc}function AP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var h0=/\/+/g;function pm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AP(""+e.key):t.toString(36)}function sd(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Gc:case wP:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+pm(i,0):r,f0(s)?(n="",e!=null&&(n=e.replace(h0,"$&/")+"/"),sd(s,t,n,"",function(u){return u})):s!=null&&(cy(s)&&(s=RP(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(h0,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",f0(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+pm(o,l);i+=sd(o,t,n,c,s)}else if(c=PP(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+pm(o,l++),i+=sd(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ju(e,t,n){if(e==null)return e;var r=[],s=0;return sd(e,r,"","",function(o){return t.call(n,o,s++)}),r}function DP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var En={current:null},od={transition:null},OP={ReactCurrentDispatcher:En,ReactCurrentBatchConfig:od,ReactCurrentOwner:ly};function T_(){throw Error("act(...) is not supported in production builds of React.")}nt.Children={map:ju,forEach:function(e,t,n){ju(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ju(e,function(){t++}),t},toArray:function(e){return ju(e,function(t){return t})||[]},only:function(e){if(!cy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nt.Component=Xa;nt.Fragment=bP;nt.Profiler=SP;nt.PureComponent=iy;nt.StrictMode=_P;nt.Suspense=EP;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OP;nt.act=T_;nt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=S_({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ly.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)j_.call(t,c)&&!E_.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Gc,type:e.type,key:s,ref:o,props:r,_owner:i}};nt.createContext=function(e){return e={$$typeof:CP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:kP,_context:e},e.Consumer=e};nt.createElement=N_;nt.createFactory=function(e){var t=N_.bind(null,e);return t.type=e,t};nt.createRef=function(){return{current:null}};nt.forwardRef=function(e){return{$$typeof:jP,render:e}};nt.isValidElement=cy;nt.lazy=function(e){return{$$typeof:TP,_payload:{_status:-1,_result:e},_init:DP}};nt.memo=function(e,t){return{$$typeof:NP,type:e,compare:t===void 0?null:t}};nt.startTransition=function(e){var t=od.transition;od.transition={};try{e()}finally{od.transition=t}};nt.unstable_act=T_;nt.useCallback=function(e,t){return En.current.useCallback(e,t)};nt.useContext=function(e){return En.current.useContext(e)};nt.useDebugValue=function(){};nt.useDeferredValue=function(e){return En.current.useDeferredValue(e)};nt.useEffect=function(e,t){return En.current.useEffect(e,t)};nt.useId=function(){return En.current.useId()};nt.useImperativeHandle=function(e,t,n){return En.current.useImperativeHandle(e,t,n)};nt.useInsertionEffect=function(e,t){return En.current.useInsertionEffect(e,t)};nt.useLayoutEffect=function(e,t){return En.current.useLayoutEffect(e,t)};nt.useMemo=function(e,t){return En.current.useMemo(e,t)};nt.useReducer=function(e,t,n){return En.current.useReducer(e,t,n)};nt.useRef=function(e){return En.current.useRef(e)};nt.useState=function(e){return En.current.useState(e)};nt.useSyncExternalStore=function(e,t,n){return En.current.useSyncExternalStore(e,t,n)};nt.useTransition=function(){return En.current.useTransition()};nt.version="18.3.1";b_.exports=nt;var y=b_.exports;const He=Uf(y),P_=x_({__proto__:null,default:He},[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 IP=y,MP=Symbol.for("react.element"),LP=Symbol.for("react.fragment"),zP=Object.prototype.hasOwnProperty,FP=IP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$P={key:!0,ref:!0,__self:!0,__source:!0};function R_(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)zP.call(t,r)&&!$P.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:MP,type:e,key:o,ref:i,props:s,_owner:FP.current}}Vf.Fragment=LP;Vf.jsx=R_;Vf.jsxs=R_;w_.exports=Vf;var a=w_.exports,wp={},A_={exports:{}},tr={},D_={exports:{}},O_={};/**
* @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(W,I){var X=W.length;W.push(I);e:for(;0<X;){var $=X-1>>>1,B=W[$];if(0<s(B,I))W[$]=I,W[X]=B,X=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var I=W[0],X=W.pop();if(X!==I){W[0]=X;e:for(var $=0,B=W.length,ve=B>>>1;$<ve;){var oe=2*($+1)-1,ie=W[oe],Ie=oe+1,xe=W[Ie];if(0>s(ie,X))Ie<B&&0>s(xe,ie)?(W[$]=xe,W[Ie]=X,$=Ie):(W[$]=ie,W[oe]=X,$=oe);else if(Ie<B&&0>s(xe,X))W[$]=xe,W[Ie]=X,$=Ie;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,x=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(m=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,m&&(m=!1,g(R),R=-1),p=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!Z());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var ve=!0;else{var oe=n(u);oe!==null&&F(_,oe.startTime-I),ve=!1}return ve}finally{f=null,h=X,p=!1}}var j=!1,T=null,R=-1,A=5,O=-1;function Z(){return!(e.unstable_now()-O<A)}function N(){if(T!==null){var W=e.unstable_now();O=W;var I=!0;try{I=T(!0,W)}finally{I?z():(j=!1,T=null)}}else j=!1}var z;if(typeof w=="function")z=function(){w(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,z=function(){U.postMessage(null)}}else z=function(){v(N,0)};function J(W){T=W,j||(j=!0,z())}function F(W,I){R=v(function(){W(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_continueExecution=function(){x||p||(x=!0,J(C))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var X=h;h=I;try{return W()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=h;h=W;try{return I()}finally{h=X}},e.unstable_scheduleCallback=function(W,I,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,W={id:d++,callback:I,priorityLevel:W,startTime:X,expirationTime:B,sortIndex:-1},X>$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(m?(g(R),R=-1):m=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||p||(x=!0,J(C))),W},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(O_);D_.exports=O_;var UP=D_.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 VP=y,Xn=UP;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var I_=new Set,sc={};function Ci(e,t){Oa(e,t),Oa(e+"Capture",t)}function Oa(e,t){for(sc[e]=t,e=0;e<t.length;e++)I_.add(t[e])}var Is=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bp=Object.prototype.hasOwnProperty,BP=/^[: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]*$/,m0={},p0={};function WP(e){return bp.call(p0,e)?!0:bp.call(m0,e)?!1:BP.test(e)?p0[e]=!0:(m0[e]=!0,!1)}function HP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function KP(e,t,n,r){if(t===null||typeof t>"u"||HP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Nn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dn[e]=new Nn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dn[t]=new Nn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dn[e]=new Nn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dn[e]=new Nn(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){dn[e]=new Nn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dn[e]=new Nn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dn[e]=new Nn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dn[e]=new Nn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dn[e]=new Nn(e,5,!1,e.toLowerCase(),null,!1,!1)});var uy=/[\-:]([a-z])/g;function dy(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(uy,dy);dn[t]=new Nn(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(uy,dy);dn[t]=new Nn(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(uy,dy);dn[t]=new Nn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dn[e]=new Nn(e,1,!1,e.toLowerCase(),null,!1,!1)});dn.xlinkHref=new Nn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dn[e]=new Nn(e,1,!1,e.toLowerCase(),null,!0,!0)});function fy(e,t,n,r){var s=dn.hasOwnProperty(t)?dn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(KP(t,n,s,r)&&(n=null),r||s===null?WP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Bs=VP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Eu=Symbol.for("react.element"),ea=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),hy=Symbol.for("react.strict_mode"),_p=Symbol.for("react.profiler"),M_=Symbol.for("react.provider"),L_=Symbol.for("react.context"),my=Symbol.for("react.forward_ref"),Sp=Symbol.for("react.suspense"),kp=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),oo=Symbol.for("react.lazy"),z_=Symbol.for("react.offscreen"),g0=Symbol.iterator;function gl(e){return e===null||typeof e!="object"?null:(e=g0&&e[g0]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Object.assign,gm;function Il(e){if(gm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gm=t&&t[1]||""}return`
`+gm+e}var ym=!1;function vm(e,t){if(!e||ym)return"";ym=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=r.stack.split(`
`),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var c=`
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{ym=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Il(e):""}function YP(e){switch(e.tag){case 5:return Il(e.type);case 16:return Il("Lazy");case 13:return Il("Suspense");case 19:return Il("SuspenseList");case 0:case 2:case 15:return e=vm(e.type,!1),e;case 11:return e=vm(e.type.render,!1),e;case 1:return e=vm(e.type,!0),e;default:return""}}function Cp(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 ta:return"Fragment";case ea:return"Portal";case _p:return"Profiler";case hy:return"StrictMode";case Sp:return"Suspense";case kp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L_:return(e.displayName||"Context")+".Consumer";case M_:return(e._context.displayName||"Context")+".Provider";case my:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case py:return t=e.displayName||null,t!==null?t:Cp(e.type)||"Memo";case oo:t=e._payload,e=e._init;try{return Cp(e(t))}catch{}}return null}function ZP(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 Cp(t);case 8:return t===hy?"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 Eo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function F_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function GP(e){var t=F_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=GP(e))}function $_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=F_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nd(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 jp(e,t){var n=t.checked;return Lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function y0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Eo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function U_(e,t){t=t.checked,t!=null&&fy(e,"checked",t,!1)}function Ep(e,t){U_(e,t);var n=Eo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Np(e,t.type,n):t.hasOwnProperty("defaultValue")&&Np(e,t.type,Eo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function v0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Np(e,t,n){(t!=="number"||Nd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ml=Array.isArray;function xa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Eo(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Tp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(le(91));return Lt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function x0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(le(92));if(Ml(n)){if(1<n.length)throw Error(le(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Eo(n)}}function V_(e,t){var n=Eo(t.value),r=Eo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function w0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function B_(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 Pp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?B_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,W_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function oc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wl={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},qP=["Webkit","ms","Moz","O"];Object.keys(Wl).forEach(function(e){qP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wl[t]=Wl[e]})});function H_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wl.hasOwnProperty(e)&&Wl[e]?(""+t).trim():t+"px"}function K_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=H_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var XP=Lt({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 Rp(e,t){if(t){if(XP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function Ap(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 Dp=null;function gy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Op=null,wa=null,ba=null;function b0(e){if(e=Qc(e)){if(typeof Op!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Yf(t),Op(e.stateNode,e.type,t))}}function Y_(e){wa?ba?ba.push(e):ba=[e]:wa=e}function Z_(){if(wa){var e=wa,t=ba;if(ba=wa=null,b0(e),t)for(e=0;e<t.length;e++)b0(t[e])}}function G_(e,t){return e(t)}function q_(){}var xm=!1;function X_(e,t,n){if(xm)return e(t,n);xm=!0;try{return G_(e,t,n)}finally{xm=!1,(wa!==null||ba!==null)&&(q_(),Z_())}}function ic(e,t){var n=e.stateNode;if(n===null)return null;var r=Yf(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(le(231,t,typeof n));return n}var Ip=!1;if(Is)try{var yl={};Object.defineProperty(yl,"passive",{get:function(){Ip=!0}}),window.addEventListener("test",yl,yl),window.removeEventListener("test",yl,yl)}catch{Ip=!1}function QP(e,t,n,r,s,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Hl=!1,Td=null,Pd=!1,Mp=null,JP={onError:function(e){Hl=!0,Td=e}};function eR(e,t,n,r,s,o,i,l,c){Hl=!1,Td=null,QP.apply(JP,arguments)}function tR(e,t,n,r,s,o,i,l,c){if(eR.apply(this,arguments),Hl){if(Hl){var u=Td;Hl=!1,Td=null}else throw Error(le(198));Pd||(Pd=!0,Mp=u)}}function ji(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Q_(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 _0(e){if(ji(e)!==e)throw Error(le(188))}function nR(e){var t=e.alternate;if(!t){if(t=ji(e),t===null)throw Error(le(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return _0(s),e;if(o===r)return _0(s),t;o=o.sibling}throw Error(le(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i)throw Error(le(189))}}if(n.alternate!==r)throw Error(le(190))}if(n.tag!==3)throw Error(le(188));return n.stateNode.current===n?e:t}function J_(e){return e=nR(e),e!==null?e1(e):null}function e1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=e1(e);if(t!==null)return t;e=e.sibling}return null}var t1=Xn.unstable_scheduleCallback,S0=Xn.unstable_cancelCallback,rR=Xn.unstable_shouldYield,sR=Xn.unstable_requestPaint,Vt=Xn.unstable_now,oR=Xn.unstable_getCurrentPriorityLevel,yy=Xn.unstable_ImmediatePriority,n1=Xn.unstable_UserBlockingPriority,Rd=Xn.unstable_NormalPriority,iR=Xn.unstable_LowPriority,r1=Xn.unstable_IdlePriority,Bf=null,rs=null;function aR(e){if(rs&&typeof rs.onCommitFiberRoot=="function")try{rs.onCommitFiberRoot(Bf,e,void 0,(e.current.flags&128)===128)}catch{}}var Dr=Math.clz32?Math.clz32:uR,lR=Math.log,cR=Math.LN2;function uR(e){return e>>>=0,e===0?32:31-(lR(e)/cR|0)|0}var Pu=64,Ru=4194304;function Ll(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 Ad(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~s;l!==0?r=Ll(l):(o&=i,o!==0&&(r=Ll(o)))}else i=n&~s,i!==0?r=Ll(i):o!==0&&(r=Ll(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Dr(t),s=1<<n,r|=e[n],t&=~s;return r}function dR(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 fR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Dr(o),l=1<<i,c=s[i];c===-1?(!(l&n)||l&r)&&(s[i]=dR(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Lp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function s1(){var e=Pu;return Pu<<=1,!(Pu&4194240)&&(Pu=64),e}function wm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dr(t),e[t]=n}function hR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Dr(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function vy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Dr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function o1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var i1,xy,a1,l1,c1,zp=!1,Au=[],go=null,yo=null,vo=null,ac=new Map,lc=new Map,ao=[],mR="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 k0(e,t){switch(e){case"focusin":case"focusout":go=null;break;case"dragenter":case"dragleave":yo=null;break;case"mouseover":case"mouseout":vo=null;break;case"pointerover":case"pointerout":ac.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lc.delete(t.pointerId)}}function vl(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Qc(t),t!==null&&xy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function pR(e,t,n,r,s){switch(t){case"focusin":return go=vl(go,e,t,n,r,s),!0;case"dragenter":return yo=vl(yo,e,t,n,r,s),!0;case"mouseover":return vo=vl(vo,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return ac.set(o,vl(ac.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,lc.set(o,vl(lc.get(o)||null,e,t,n,r,s)),!0}return!1}function u1(e){var t=Zo(e.target);if(t!==null){var n=ji(t);if(n!==null){if(t=n.tag,t===13){if(t=Q_(n),t!==null){e.blockedOn=t,c1(e.priority,function(){a1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function id(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Fp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dp=r,n.target.dispatchEvent(r),Dp=null}else return t=Qc(n),t!==null&&xy(t),e.blockedOn=n,!1;t.shift()}return!0}function C0(e,t,n){id(e)&&n.delete(t)}function gR(){zp=!1,go!==null&&id(go)&&(go=null),yo!==null&&id(yo)&&(yo=null),vo!==null&&id(vo)&&(vo=null),ac.forEach(C0),lc.forEach(C0)}function xl(e,t){e.blockedOn===t&&(e.blockedOn=null,zp||(zp=!0,Xn.unstable_scheduleCallback(Xn.unstable_NormalPriority,gR)))}function cc(e){function t(s){return xl(s,e)}if(0<Au.length){xl(Au[0],e);for(var n=1;n<Au.length;n++){var r=Au[n];r.blockedOn===e&&(r.blockedOn=null)}}for(go!==null&&xl(go,e),yo!==null&&xl(yo,e),vo!==null&&xl(vo,e),ac.forEach(t),lc.forEach(t),n=0;n<ao.length;n++)r=ao[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ao.length&&(n=ao[0],n.blockedOn===null);)u1(n),n.blockedOn===null&&ao.shift()}var _a=Bs.ReactCurrentBatchConfig,Dd=!0;function yR(e,t,n,r){var s=gt,o=_a.transition;_a.transition=null;try{gt=1,wy(e,t,n,r)}finally{gt=s,_a.transition=o}}function vR(e,t,n,r){var s=gt,o=_a.transition;_a.transition=null;try{gt=4,wy(e,t,n,r)}finally{gt=s,_a.transition=o}}function wy(e,t,n,r){if(Dd){var s=Fp(e,t,n,r);if(s===null)Pm(e,t,r,Od,n),k0(e,r);else if(pR(s,e,t,n,r))r.stopPropagation();else if(k0(e,r),t&4&&-1<mR.indexOf(e)){for(;s!==null;){var o=Qc(s);if(o!==null&&i1(o),o=Fp(e,t,n,r),o===null&&Pm(e,t,r,Od,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Pm(e,t,r,null,n)}}var Od=null;function Fp(e,t,n,r){if(Od=null,e=gy(r),e=Zo(e),e!==null)if(t=ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Q_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Od=e,null}function d1(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(oR()){case yy:return 1;case n1:return 4;case Rd:case iR:return 16;case r1:return 536870912;default:return 16}default:return 16}}var uo=null,by=null,ad=null;function f1(){if(ad)return ad;var e,t=by,n=t.length,r,s="value"in uo?uo.value:uo.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ad=s.slice(e,1<r?1-r:void 0)}function ld(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 Du(){return!0}function j0(){return!1}function nr(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Du:j0,this.isPropagationStopped=j0,this}return Lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Du)},persist:function(){},isPersistent:Du}),t}var Qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_y=nr(Qa),Xc=Lt({},Qa,{view:0,detail:0}),xR=nr(Xc),bm,_m,wl,Wf=Lt({},Xc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sy,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!==wl&&(wl&&e.type==="mousemove"?(bm=e.screenX-wl.screenX,_m=e.screenY-wl.screenY):_m=bm=0,wl=e),bm)},movementY:function(e){return"movementY"in e?e.movementY:_m}}),E0=nr(Wf),wR=Lt({},Wf,{dataTransfer:0}),bR=nr(wR),_R=Lt({},Xc,{relatedTarget:0}),Sm=nr(_R),SR=Lt({},Qa,{animationName:0,elapsedTime:0,pseudoElement:0}),kR=nr(SR),CR=Lt({},Qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jR=nr(CR),ER=Lt({},Qa,{data:0}),N0=nr(ER),NR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TR={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"},PR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=PR[e])?!!t[e]:!1}function Sy(){return RR}var AR=Lt({},Xc,{key:function(e){if(e.key){var t=NR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ld(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sy,charCode:function(e){return e.type==="keypress"?ld(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ld(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),DR=nr(AR),OR=Lt({},Wf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),T0=nr(OR),IR=Lt({},Xc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sy}),MR=nr(IR),LR=Lt({},Qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),zR=nr(LR),FR=Lt({},Wf,{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}),$R=nr(FR),UR=[9,13,27,32],ky=Is&&"CompositionEvent"in window,Kl=null;Is&&"documentMode"in document&&(Kl=document.documentMode);var VR=Is&&"TextEvent"in window&&!Kl,h1=Is&&(!ky||Kl&&8<Kl&&11>=Kl),P0=" ",R0=!1;function m1(e,t){switch(e){case"keyup":return UR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function p1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function BR(e,t){switch(e){case"compositionend":return p1(t);case"keypress":return t.which!==32?null:(R0=!0,P0);case"textInput":return e=t.data,e===P0&&R0?null:e;default:return null}}function WR(e,t){if(na)return e==="compositionend"||!ky&&m1(e,t)?(e=f1(),ad=by=uo=null,na=!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 h1&&t.locale!=="ko"?null:t.data;default:return null}}var HR={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 A0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!HR[e.type]:t==="textarea"}function g1(e,t,n,r){Y_(r),t=Id(t,"onChange"),0<t.length&&(n=new _y("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yl=null,uc=null;function KR(e){E1(e,0)}function Hf(e){var t=oa(e);if($_(t))return e}function YR(e,t){if(e==="change")return t}var y1=!1;if(Is){var km;if(Is){var Cm="oninput"in document;if(!Cm){var D0=document.createElement("div");D0.setAttribute("oninput","return;"),Cm=typeof D0.oninput=="function"}km=Cm}else km=!1;y1=km&&(!document.documentMode||9<document.documentMode)}function O0(){Yl&&(Yl.detachEvent("onpropertychange",v1),uc=Yl=null)}function v1(e){if(e.propertyName==="value"&&Hf(uc)){var t=[];g1(t,uc,e,gy(e)),X_(KR,t)}}function ZR(e,t,n){e==="focusin"?(O0(),Yl=t,uc=n,Yl.attachEvent("onpropertychange",v1)):e==="focusout"&&O0()}function GR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hf(uc)}function qR(e,t){if(e==="click")return Hf(t)}function XR(e,t){if(e==="input"||e==="change")return Hf(t)}function QR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mr=typeof Object.is=="function"?Object.is:QR;function dc(e,t){if(Mr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!bp.call(t,s)||!Mr(e[s],t[s]))return!1}return!0}function I0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function M0(e,t){var n=I0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I0(n)}}function x1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function w1(){for(var e=window,t=Nd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nd(e.document)}return t}function Cy(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 JR(e){var t=w1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&x1(n.ownerDocument.documentElement,n)){if(r!==null&&Cy(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=M0(n,o);var i=M0(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var eA=Is&&"documentMode"in document&&11>=document.documentMode,ra=null,$p=null,Zl=null,Up=!1;function L0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Up||ra==null||ra!==Nd(r)||(r=ra,"selectionStart"in r&&Cy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zl&&dc(Zl,r)||(Zl=r,r=Id($p,"onSelect"),0<r.length&&(t=new _y("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ra)))}function Ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:Ou("Animation","AnimationEnd"),animationiteration:Ou("Animation","AnimationIteration"),animationstart:Ou("Animation","AnimationStart"),transitionend:Ou("Transition","TransitionEnd")},jm={},b1={};Is&&(b1=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Kf(e){if(jm[e])return jm[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in b1)return jm[e]=t[n];return e}var _1=Kf("animationend"),S1=Kf("animationiteration"),k1=Kf("animationstart"),C1=Kf("transitionend"),j1=new Map,z0="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 Lo(e,t){j1.set(e,t),Ci(t,[e])}for(var Em=0;Em<z0.length;Em++){var Nm=z0[Em],tA=Nm.toLowerCase(),nA=Nm[0].toUpperCase()+Nm.slice(1);Lo(tA,"on"+nA)}Lo(_1,"onAnimationEnd");Lo(S1,"onAnimationIteration");Lo(k1,"onAnimationStart");Lo("dblclick","onDoubleClick");Lo("focusin","onFocus");Lo("focusout","onBlur");Lo(C1,"onTransitionEnd");Oa("onMouseEnter",["mouseout","mouseover"]);Oa("onMouseLeave",["mouseout","mouseover"]);Oa("onPointerEnter",["pointerout","pointerover"]);Oa("onPointerLeave",["pointerout","pointerover"]);Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zl="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(" "),rA=new Set("cancel close invalid load scroll toggle".split(" ").concat(zl));function F0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tR(r,t,void 0,e),e.currentTarget=null}function E1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;F0(s,l,u),o=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;F0(s,l,u),o=c}}}if(Pd)throw e=Mp,Pd=!1,Mp=null,e}function kt(e,t){var n=t[Kp];n===void 0&&(n=t[Kp]=new Set);var r=e+"__bubble";n.has(r)||(N1(t,e,2,!1),n.add(r))}function Tm(e,t,n){var r=0;t&&(r|=4),N1(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function fc(e){if(!e[Iu]){e[Iu]=!0,I_.forEach(function(n){n!=="selectionchange"&&(rA.has(n)||Tm(n,!1,e),Tm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,Tm("selectionchange",!1,t))}}function N1(e,t,n,r){switch(d1(t)){case 1:var s=yR;break;case 4:s=vR;break;default:s=wy}n=s.bind(null,t,n,e),s=void 0,!Ip||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Pm(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;l!==null;){if(i=Zo(l),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}l=l.parentNode}}r=r.return}X_(function(){var u=o,d=gy(n),f=[];e:{var h=j1.get(e);if(h!==void 0){var p=_y,x=e;switch(e){case"keypress":if(ld(n)===0)break e;case"keydown":case"keyup":p=DR;break;case"focusin":x="focus",p=Sm;break;case"focusout":x="blur",p=Sm;break;case"beforeblur":case"afterblur":p=Sm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=E0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=bR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=MR;break;case _1:case S1:case k1:p=kR;break;case C1:p=zR;break;case"scroll":p=xR;break;case"wheel":p=$R;break;case"copy":case"cut":case"paste":p=jR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=T0}var m=(t&4)!==0,v=!m&&e==="scroll",g=m?h!==null?h+"Capture":null:h;m=[];for(var w=u,b;w!==null;){b=w;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,g!==null&&(_=ic(w,g),_!=null&&m.push(hc(w,_,b)))),v)break;w=w.return}0<m.length&&(h=new p(h,x,null,n,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Dp&&(x=n.relatedTarget||n.fromElement)&&(Zo(x)||x[Ms]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(x=n.relatedTarget||n.toElement,p=u,x=x?Zo(x):null,x!==null&&(v=ji(x),x!==v||x.tag!==5&&x.tag!==6)&&(x=null)):(p=null,x=u),p!==x)){if(m=E0,_="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=T0,_="onPointerLeave",g="onPointerEnter",w="pointer"),v=p==null?h:oa(p),b=x==null?h:oa(x),h=new m(_,w+"leave",p,n,d),h.target=v,h.relatedTarget=b,_=null,Zo(d)===u&&(m=new m(g,w+"enter",x,n,d),m.target=b,m.relatedTarget=v,_=m),v=_,p&&x)t:{for(m=p,g=x,w=0,b=m;b;b=$i(b))w++;for(b=0,_=g;_;_=$i(_))b++;for(;0<w-b;)m=$i(m),w--;for(;0<b-w;)g=$i(g),b--;for(;w--;){if(m===g||g!==null&&m===g.alternate)break t;m=$i(m),g=$i(g)}m=null}else m=null;p!==null&&$0(f,h,p,m,!1),x!==null&&v!==null&&$0(f,v,x,m,!0)}}e:{if(h=u?oa(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=YR;else if(A0(h))if(y1)C=XR;else{C=GR;var j=ZR}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=qR);if(C&&(C=C(e,u))){g1(f,C,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&Np(h,"number",h.value)}switch(j=u?oa(u):window,e){case"focusin":(A0(j)||j.contentEditable==="true")&&(ra=j,$p=u,Zl=null);break;case"focusout":Zl=$p=ra=null;break;case"mousedown":Up=!0;break;case"contextmenu":case"mouseup":case"dragend":Up=!1,L0(f,n,d);break;case"selectionchange":if(eA)break;case"keydown":case"keyup":L0(f,n,d)}var T;if(ky)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else na?m1(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(h1&&n.locale!=="ko"&&(na||R!=="onCompositionStart"?R==="onCompositionEnd"&&na&&(T=f1()):(uo=d,by="value"in uo?uo.value:uo.textContent,na=!0)),j=Id(u,R),0<j.length&&(R=new N0(R,e,null,n,d),f.push({event:R,listeners:j}),T?R.data=T:(T=p1(n),T!==null&&(R.data=T)))),(T=VR?BR(e,n):WR(e,n))&&(u=Id(u,"onBeforeInput"),0<u.length&&(d=new N0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}E1(f,t)})}function hc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ic(e,n),o!=null&&r.unshift(hc(e,o,s)),o=ic(e,t),o!=null&&r.push(hc(e,o,s))),e=e.return}return r}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=ic(n,o),c!=null&&i.unshift(hc(n,c,l))):s||(c=ic(n,o),c!=null&&i.push(hc(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var sA=/\r\n?/g,oA=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(sA,`
`).replace(oA,"")}function Mu(e,t,n){if(t=U0(t),U0(e)!==t&&n)throw Error(le(425))}function Md(){}var Vp=null,Bp=null;function Wp(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 Hp=typeof setTimeout=="function"?setTimeout:void 0,iA=typeof clearTimeout=="function"?clearTimeout:void 0,V0=typeof Promise=="function"?Promise:void 0,aA=typeof queueMicrotask=="function"?queueMicrotask:typeof V0<"u"?function(e){return V0.resolve(null).then(e).catch(lA)}:Hp;function lA(e){setTimeout(function(){throw e})}function Rm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),cc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cc(t)}function xo(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 B0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ja=Math.random().toString(36).slice(2),qr="__reactFiber$"+Ja,mc="__reactProps$"+Ja,Ms="__reactContainer$"+Ja,Kp="__reactEvents$"+Ja,cA="__reactListeners$"+Ja,uA="__reactHandles$"+Ja;function Zo(e){var t=e[qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ms]||n[qr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=B0(e);e!==null;){if(n=e[qr])return n;e=B0(e)}return t}e=n,n=e.parentNode}return null}function Qc(e){return e=e[qr]||e[Ms],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(le(33))}function Yf(e){return e[mc]||null}var Yp=[],ia=-1;function zo(e){return{current:e}}function Ct(e){0>ia||(e.current=Yp[ia],Yp[ia]=null,ia--)}function bt(e,t){ia++,Yp[ia]=e.current,e.current=t}var No={},vn=zo(No),Mn=zo(!1),ui=No;function Ia(e,t){var n=e.type.contextTypes;if(!n)return No;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ln(e){return e=e.childContextTypes,e!=null}function Ld(){Ct(Mn),Ct(vn)}function W0(e,t,n){if(vn.current!==No)throw Error(le(168));bt(vn,t),bt(Mn,n)}function T1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(le(108,ZP(e)||"Unknown",s));return Lt({},n,r)}function zd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||No,ui=vn.current,bt(vn,e),bt(Mn,Mn.current),!0}function H0(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=T1(e,t,ui),r.__reactInternalMemoizedMergedChildContext=e,Ct(Mn),Ct(vn),bt(vn,e)):Ct(Mn),bt(Mn,n)}var Cs=null,Zf=!1,Am=!1;function P1(e){Cs===null?Cs=[e]:Cs.push(e)}function dA(e){Zf=!0,P1(e)}function Fo(){if(!Am&&Cs!==null){Am=!0;var e=0,t=gt;try{var n=Cs;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Cs=null,Zf=!1}catch(s){throw Cs!==null&&(Cs=Cs.slice(e+1)),t1(yy,Fo),s}finally{gt=t,Am=!1}}return null}var aa=[],la=0,Fd=null,$d=0,ar=[],lr=0,di=null,js=1,Es="";function Wo(e,t){aa[la++]=$d,aa[la++]=Fd,Fd=e,$d=t}function R1(e,t,n){ar[lr++]=js,ar[lr++]=Es,ar[lr++]=di,di=e;var r=js;e=Es;var s=32-Dr(r)-1;r&=~(1<<s),n+=1;var o=32-Dr(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,js=1<<32-Dr(t)+s|n<<s|r,Es=o+e}else js=1<<o|n<<s|r,Es=e}function jy(e){e.return!==null&&(Wo(e,1),R1(e,1,0))}function Ey(e){for(;e===Fd;)Fd=aa[--la],aa[la]=null,$d=aa[--la],aa[la]=null;for(;e===di;)di=ar[--lr],ar[lr]=null,Es=ar[--lr],ar[lr]=null,js=ar[--lr],ar[lr]=null}var Kn=null,Hn=null,Rt=!1,Er=null;function A1(e,t){var n=ur(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function K0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kn=e,Hn=xo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kn=e,Hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=di!==null?{id:js,overflow:Es}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ur(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Kn=e,Hn=null,!0):!1;default:return!1}}function Zp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gp(e){if(Rt){var t=Hn;if(t){var n=t;if(!K0(e,t)){if(Zp(e))throw Error(le(418));t=xo(n.nextSibling);var r=Kn;t&&K0(e,t)?A1(r,n):(e.flags=e.flags&-4097|2,Rt=!1,Kn=e)}}else{if(Zp(e))throw Error(le(418));e.flags=e.flags&-4097|2,Rt=!1,Kn=e}}}function Y0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kn=e}function Lu(e){if(e!==Kn)return!1;if(!Rt)return Y0(e),Rt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wp(e.type,e.memoizedProps)),t&&(t=Hn)){if(Zp(e))throw D1(),Error(le(418));for(;t;)A1(e,t),t=xo(t.nextSibling)}if(Y0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(le(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Hn=xo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Hn=null}}else Hn=Kn?xo(e.stateNode.nextSibling):null;return!0}function D1(){for(var e=Hn;e;)e=xo(e.nextSibling)}function Ma(){Hn=Kn=null,Rt=!1}function Ny(e){Er===null?Er=[e]:Er.push(e)}var fA=Bs.ReactCurrentBatchConfig;function bl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(le(309));var r=n.stateNode}if(!r)throw Error(le(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(le(284));if(!n._owner)throw Error(le(290,e))}return e}function zu(e,t){throw e=Object.prototype.toString.call(t),Error(le(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Z0(e){var t=e._init;return t(e._payload)}function O1(e){function t(g,w){if(e){var b=g.deletions;b===null?(g.deletions=[w],g.flags|=16):b.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function s(g,w){return g=So(g,w),g.index=0,g.sibling=null,g}function o(g,w,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<w?(g.flags|=2,w):b):(g.flags|=2,w)):(g.flags|=1048576,w)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,w,b,_){return w===null||w.tag!==6?(w=Fm(b,g.mode,_),w.return=g,w):(w=s(w,b),w.return=g,w)}function c(g,w,b,_){var C=b.type;return C===ta?d(g,w,b.props.children,_,b.key):w!==null&&(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===oo&&Z0(C)===w.type)?(_=s(w,b.props),_.ref=bl(g,w,b),_.return=g,_):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=bl(g,w,b),_.return=g,_)}function u(g,w,b,_){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=$m(b,g.mode,_),w.return=g,w):(w=s(w,b.children||[]),w.return=g,w)}function d(g,w,b,_,C){return w===null||w.tag!==7?(w=si(b,g.mode,_,C),w.return=g,w):(w=s(w,b),w.return=g,w)}function f(g,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Fm(""+w,g.mode,b),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Eu:return b=pd(w.type,w.key,w.props,null,g.mode,b),b.ref=bl(g,null,w),b.return=g,b;case ea:return w=$m(w,g.mode,b),w.return=g,w;case oo:var _=w._init;return f(g,_(w._payload),b)}if(Ml(w)||gl(w))return w=si(w,g.mode,b,null),w.return=g,w;zu(g,w)}return null}function h(g,w,b,_){var C=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:l(g,w,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:return b.key===C?c(g,w,b,_):null;case ea:return b.key===C?u(g,w,b,_):null;case oo:return C=b._init,h(g,w,C(b._payload),_)}if(Ml(b)||gl(b))return C!==null?null:d(g,w,b,_,null);zu(g,b)}return null}function p(g,w,b,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(b)||null,l(w,g,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Eu:return g=g.get(_.key===null?b:_.key)||null,c(w,g,_,C);case ea:return g=g.get(_.key===null?b:_.key)||null,u(w,g,_,C);case oo:var j=_._init;return p(g,w,b,j(_._payload),C)}if(Ml(_)||gl(_))return g=g.get(b)||null,d(w,g,_,C,null);zu(w,_)}return null}function x(g,w,b,_){for(var C=null,j=null,T=w,R=w=0,A=null;T!==null&&R<b.length;R++){T.index>R?(A=T,T=null):A=T.sibling;var O=h(g,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(g,T),w=o(O,w,R),j===null?C=O:j.sibling=O,j=O,T=A}if(R===b.length)return n(g,T),Rt&&Wo(g,R),C;if(T===null){for(;R<b.length;R++)T=f(g,b[R],_),T!==null&&(w=o(T,w,R),j===null?C=T:j.sibling=T,j=T);return Rt&&Wo(g,R),C}for(T=r(g,T);R<b.length;R++)A=p(T,g,R,b[R],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?R:A.key),w=o(A,w,R),j===null?C=A:j.sibling=A,j=A);return e&&T.forEach(function(Z){return t(g,Z)}),Rt&&Wo(g,R),C}function m(g,w,b,_){var C=gl(b);if(typeof C!="function")throw Error(le(150));if(b=C.call(b),b==null)throw Error(le(151));for(var j=C=null,T=w,R=w=0,A=null,O=b.next();T!==null&&!O.done;R++,O=b.next()){T.index>R?(A=T,T=null):A=T.sibling;var Z=h(g,T,O.value,_);if(Z===null){T===null&&(T=A);break}e&&T&&Z.alternate===null&&t(g,T),w=o(Z,w,R),j===null?C=Z:j.sibling=Z,j=Z,T=A}if(O.done)return n(g,T),Rt&&Wo(g,R),C;if(T===null){for(;!O.done;R++,O=b.next())O=f(g,O.value,_),O!==null&&(w=o(O,w,R),j===null?C=O:j.sibling=O,j=O);return Rt&&Wo(g,R),C}for(T=r(g,T);!O.done;R++,O=b.next())O=p(T,g,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),w=o(O,w,R),j===null?C=O:j.sibling=O,j=O);return e&&T.forEach(function(N){return t(g,N)}),Rt&&Wo(g,R),C}function v(g,w,b,_){if(typeof b=="object"&&b!==null&&b.type===ta&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=w;j!==null;){if(j.key===C){if(C=b.type,C===ta){if(j.tag===7){n(g,j.sibling),w=s(j,b.props.children),w.return=g,g=w;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===oo&&Z0(C)===j.type){n(g,j.sibling),w=s(j,b.props),w.ref=bl(g,j,b),w.return=g,g=w;break e}n(g,j);break}else t(g,j);j=j.sibling}b.type===ta?(w=si(b.props.children,g.mode,_,b.key),w.return=g,g=w):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=bl(g,w,b),_.return=g,g=_)}return i(g);case ea:e:{for(j=b.key;w!==null;){if(w.key===j)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(g,w.sibling),w=s(w,b.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=$m(b,g.mode,_),w.return=g,g=w}return i(g);case oo:return j=b._init,v(g,w,j(b._payload),_)}if(Ml(b))return x(g,w,b,_);if(gl(b))return m(g,w,b,_);zu(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(g,w.sibling),w=s(w,b),w.return=g,g=w):(n(g,w),w=Fm(b,g.mode,_),w.return=g,g=w),i(g)):n(g,w)}return v}var La=O1(!0),I1=O1(!1),Ud=zo(null),Vd=null,ca=null,Ty=null;function Py(){Ty=ca=Vd=null}function Ry(e){var t=Ud.current;Ct(Ud),e._currentValue=t}function qp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){Vd=e,Ty=ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(On=!0),e.firstContext=null)}function mr(e){var t=e._currentValue;if(Ty!==e)if(e={context:e,memoizedValue:t,next:null},ca===null){if(Vd===null)throw Error(le(308));ca=e,Vd.dependencies={lanes:0,firstContext:e}}else ca=ca.next=e;return t}var Go=null;function Ay(e){Go===null?Go=[e]:Go.push(e)}function M1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ay(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ls(e,r)}function Ls(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var io=!1;function Dy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ps(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ls(e,n)}return s=r.interleaved,s===null?(t.next=t,Ay(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ls(e,n)}function cd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vy(e,n)}}function G0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bd(e,t,n,r){var s=e.updateQueue;io=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,m=l;switch(h=t,p=n,m.tag){case 1:if(x=m.payload,typeof x=="function"){f=x.call(p,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=m.payload,h=typeof x=="function"?x.call(p,f,h):x,h==null)break e;f=Lt({},f,h);break e;case 2:io=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,i|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);hi|=i,e.lanes=i,e.memoizedState=f}}function q0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(le(191,s));s.call(r)}}}var Jc={},ss=zo(Jc),pc=zo(Jc),gc=zo(Jc);function qo(e){if(e===Jc)throw Error(le(174));return e}function Oy(e,t){switch(bt(gc,t),bt(pc,e),bt(ss,Jc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pp(t,e)}Ct(ss),bt(ss,t)}function za(){Ct(ss),Ct(pc),Ct(gc)}function z1(e){qo(gc.current);var t=qo(ss.current),n=Pp(t,e.type);t!==n&&(bt(pc,e),bt(ss,n))}function Iy(e){pc.current===e&&(Ct(ss),Ct(pc))}var Ot=zo(0);function Wd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 Dm=[];function My(){for(var e=0;e<Dm.length;e++)Dm[e]._workInProgressVersionPrimary=null;Dm.length=0}var ud=Bs.ReactCurrentDispatcher,Om=Bs.ReactCurrentBatchConfig,fi=0,Mt=null,Gt=null,rn=null,Hd=!1,Gl=!1,yc=0,hA=0;function mn(){throw Error(le(321))}function Ly(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function zy(e,t,n,r,s,o){if(fi=o,Mt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ud.current=e===null||e.memoizedState===null?yA:vA,e=n(r,s),Gl){o=0;do{if(Gl=!1,yc=0,25<=o)throw Error(le(301));o+=1,rn=Gt=null,t.updateQueue=null,ud.current=xA,e=n(r,s)}while(Gl)}if(ud.current=Kd,t=Gt!==null&&Gt.next!==null,fi=0,rn=Gt=Mt=null,Hd=!1,t)throw Error(le(300));return e}function Fy(){var e=yc!==0;return yc=0,e}function Gr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Mt.memoizedState=rn=e:rn=rn.next=e,rn}function pr(){if(Gt===null){var e=Mt.alternate;e=e!==null?e.memoizedState:null}else e=Gt.next;var t=rn===null?Mt.memoizedState:rn.next;if(t!==null)rn=t,Gt=e;else{if(e===null)throw Error(le(310));Gt=e,e={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},rn===null?Mt.memoizedState=rn=e:rn=rn.next=e}return rn}function vc(e,t){return typeof t=="function"?t(e):t}function Im(e){var t=pr(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=Gt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=i=null,c=null,u=o;do{var d=u.lane;if((fi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=r):c=c.next=f,Mt.lanes|=d,hi|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=l,Mr(r,t.memoizedState)||(On=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Mt.lanes|=o,hi|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Mm(e){var t=pr(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Mr(o,t.memoizedState)||(On=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function F1(){}function $1(e,t){var n=Mt,r=pr(),s=t(),o=!Mr(r.memoizedState,s);if(o&&(r.memoizedState=s,On=!0),r=r.queue,$y(B1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||rn!==null&&rn.memoizedState.tag&1){if(n.flags|=2048,xc(9,V1.bind(null,n,r,s,t),void 0,null),sn===null)throw Error(le(349));fi&30||U1(n,t,s)}return s}function U1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function V1(e,t,n,r){t.value=n,t.getSnapshot=r,W1(t)&&H1(e)}function B1(e,t,n){return n(function(){W1(t)&&H1(e)})}function W1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function H1(e){var t=Ls(e,1);t!==null&&Or(t,e,1,-1)}function X0(e){var t=Gr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vc,lastRenderedState:e},t.queue=e,e=e.dispatch=gA.bind(null,Mt,e),[t.memoizedState,e]}function xc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Mt.updateQueue,t===null?(t={lastEffect:null,stores:null},Mt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function K1(){return pr().memoizedState}function dd(e,t,n,r){var s=Gr();Mt.flags|=e,s.memoizedState=xc(1|t,n,void 0,r===void 0?null:r)}function Gf(e,t,n,r){var s=pr();r=r===void 0?null:r;var o=void 0;if(Gt!==null){var i=Gt.memoizedState;if(o=i.destroy,r!==null&&Ly(r,i.deps)){s.memoizedState=xc(t,n,o,r);return}}Mt.flags|=e,s.memoizedState=xc(1|t,n,o,r)}function Q0(e,t){return dd(8390656,8,e,t)}function $y(e,t){return Gf(2048,8,e,t)}function Y1(e,t){return Gf(4,2,e,t)}function Z1(e,t){return Gf(4,4,e,t)}function G1(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 q1(e,t,n){return n=n!=null?n.concat([e]):null,Gf(4,4,G1.bind(null,t,e),n)}function Uy(){}function X1(e,t){var n=pr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ly(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Q1(e,t){var n=pr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ly(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function J1(e,t,n){return fi&21?(Mr(n,t)||(n=s1(),Mt.lanes|=n,hi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,On=!0),e.memoizedState=n)}function mA(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=Om.transition;Om.transition={};try{e(!1),t()}finally{gt=n,Om.transition=r}}function eS(){return pr().memoizedState}function pA(e,t,n){var r=_o(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tS(e))nS(t,n);else if(n=M1(e,t,n,r),n!==null){var s=Cn();Or(n,e,r,s),rS(n,t,r)}}function gA(e,t,n){var r=_o(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tS(e))nS(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,Mr(l,i)){var c=t.interleaved;c===null?(s.next=s,Ay(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=M1(e,t,s,r),n!==null&&(s=Cn(),Or(n,e,r,s),rS(n,t,r))}}function tS(e){var t=e.alternate;return e===Mt||t!==null&&t===Mt}function nS(e,t){Gl=Hd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vy(e,n)}}var Kd={readContext:mr,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useInsertionEffect:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useSyncExternalStore:mn,useId:mn,unstable_isNewReconciler:!1},yA={readContext:mr,useCallback:function(e,t){return Gr().memoizedState=[e,t===void 0?null:t],e},useContext:mr,useEffect:Q0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dd(4194308,4,G1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dd(4194308,4,e,t)},useInsertionEffect:function(e,t){return dd(4,2,e,t)},useMemo:function(e,t){var n=Gr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pA.bind(null,Mt,e),[r.memoizedState,e]},useRef:function(e){var t=Gr();return e={current:e},t.memoizedState=e},useState:X0,useDebugValue:Uy,useDeferredValue:function(e){return Gr().memoizedState=e},useTransition:function(){var e=X0(!1),t=e[0];return e=mA.bind(null,e[1]),Gr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mt,s=Gr();if(Rt){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),sn===null)throw Error(le(349));fi&30||U1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Q0(B1.bind(null,r,o,e),[e]),r.flags|=2048,xc(9,V1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gr(),t=sn.identifierPrefix;if(Rt){var n=Es,r=js;n=(r&~(1<<32-Dr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=hA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vA={readContext:mr,useCallback:X1,useContext:mr,useEffect:$y,useImperativeHandle:q1,useInsertionEffect:Y1,useLayoutEffect:Z1,useMemo:Q1,useReducer:Im,useRef:K1,useState:function(){return Im(vc)},useDebugValue:Uy,useDeferredValue:function(e){var t=pr();return J1(t,Gt.memoizedState,e)},useTransition:function(){var e=Im(vc)[0],t=pr().memoizedState;return[e,t]},useMutableSource:F1,useSyncExternalStore:$1,useId:eS,unstable_isNewReconciler:!1},xA={readContext:mr,useCallback:X1,useContext:mr,useEffect:$y,useImperativeHandle:q1,useInsertionEffect:Y1,useLayoutEffect:Z1,useMemo:Q1,useReducer:Mm,useRef:K1,useState:function(){return Mm(vc)},useDebugValue:Uy,useDeferredValue:function(e){var t=pr();return Gt===null?t.memoizedState=e:J1(t,Gt.memoizedState,e)},useTransition:function(){var e=Mm(vc)[0],t=pr().memoizedState;return[e,t]},useMutableSource:F1,useSyncExternalStore:$1,useId:eS,unstable_isNewReconciler:!1};function kr(e,t){if(e&&e.defaultProps){t=Lt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Xp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qf={isMounted:function(e){return(e=e._reactInternals)?ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cn(),s=_o(e),o=Ps(r,s);o.payload=t,n!=null&&(o.callback=n),t=wo(e,o,s),t!==null&&(Or(t,e,s,r),cd(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cn(),s=_o(e),o=Ps(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=wo(e,o,s),t!==null&&(Or(t,e,s,r),cd(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cn(),r=_o(e),s=Ps(n,r);s.tag=2,t!=null&&(s.callback=t),t=wo(e,s,r),t!==null&&(Or(t,e,r,n),cd(t,e,r))}};function J0(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!dc(n,r)||!dc(s,o):!0}function sS(e,t,n){var r=!1,s=No,o=t.contextType;return typeof o=="object"&&o!==null?o=mr(o):(s=Ln(t)?ui:vn.current,r=t.contextTypes,o=(r=r!=null)?Ia(e,s):No),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function ew(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qf.enqueueReplaceState(t,t.state,null)}function Qp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Dy(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=mr(o):(o=Ln(t)?ui:vn.current,s.context=Ia(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Xp(e,t,o,n),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&&qf.enqueueReplaceState(s,s.state,null),Bd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Fa(e,t){try{var n="",r=t;do n+=YP(r),r=r.return;while(r);var s=n}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Lm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Jp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wA=typeof WeakMap=="function"?WeakMap:Map;function oS(e,t,n){n=Ps(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zd||(Zd=!0,cg=r),Jp(e,t)},n}function iS(e,t,n){n=Ps(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Jp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Jp(e,t),typeof r!="function"&&(bo===null?bo=new Set([this]):bo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function tw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=OA.bind(null,e,t,n),t.then(e,e))}function nw(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 rw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ps(-1,1),t.tag=2,wo(n,t,1))),n.lanes|=1),e)}var bA=Bs.ReactCurrentOwner,On=!1;function Sn(e,t,n,r){t.child=e===null?I1(t,null,n,r):La(t,e.child,n,r)}function sw(e,t,n,r,s){n=n.render;var o=t.ref;return Sa(t,s),r=zy(e,t,n,r,o,s),n=Fy(),e!==null&&!On?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zs(e,t,s)):(Rt&&n&&jy(t),t.flags|=1,Sn(e,t,r,s),t.child)}function ow(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Gy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,aS(e,t,o,r,s)):(e=pd(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:dc,n(i,r)&&e.ref===t.ref)return zs(e,t,s)}return t.flags|=1,e=So(o,r),e.ref=t.ref,e.return=t,t.child=e}function aS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(dc(o,r)&&e.ref===t.ref)if(On=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(On=!0);else return t.lanes=e.lanes,zs(e,t,s)}return eg(e,t,n,r,s)}function lS(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(da,Vn),Vn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(da,Vn),Vn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(da,Vn),Vn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(da,Vn),Vn|=r;return Sn(e,t,s,n),t.child}function cS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function eg(e,t,n,r,s){var o=Ln(n)?ui:vn.current;return o=Ia(t,o),Sa(t,s),n=zy(e,t,n,r,o,s),r=Fy(),e!==null&&!On?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zs(e,t,s)):(Rt&&r&&jy(t),t.flags|=1,Sn(e,t,n,s),t.child)}function iw(e,t,n,r,s){if(Ln(n)){var o=!0;zd(t)}else o=!1;if(Sa(t,s),t.stateNode===null)fd(e,t),sS(t,n,r),Qp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=mr(u):(u=Ln(n)?ui:vn.current,u=Ia(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&ew(t,i,r,u),io=!1;var h=t.memoizedState;i.state=h,Bd(t,r,i,s),c=t.memoizedState,l!==r||h!==c||Mn.current||io?(typeof d=="function"&&(Xp(t,n,d,r),c=t.memoizedState),(l=io||J0(t,n,l,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,L1(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:kr(t.type,l),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=mr(c):(c=Ln(n)?ui:vn.current,c=Ia(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||h!==c)&&ew(t,i,r,c),io=!1,h=t.memoizedState,i.state=h,Bd(t,r,i,s);var x=t.memoizedState;l!==f||h!==x||Mn.current||io?(typeof p=="function"&&(Xp(t,n,p,r),x=t.memoizedState),(u=io||J0(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return tg(e,t,n,r,o,s)}function tg(e,t,n,r,s,o){cS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&H0(t,n,!1),zs(e,t,o);r=t.stateNode,bA.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=La(t,e.child,null,o),t.child=La(t,null,l,o)):Sn(e,t,l,o),t.memoizedState=r.state,s&&H0(t,n,!0),t.child}function uS(e){var t=e.stateNode;t.pendingContext?W0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&W0(e,t.context,!1),Oy(e,t.containerInfo)}function aw(e,t,n,r,s){return Ma(),Ny(s),t.flags|=256,Sn(e,t,n,r),t.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function rg(e){return{baseLanes:e,cachePool:null,transitions:null}}function dS(e,t,n){var r=t.pendingProps,s=Ot.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),bt(Ot,s&1),e===null)return Gp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Jf(i,r,0,null),e=si(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=rg(n),t.memoizedState=ng,e):Vy(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return _A(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=So(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=So(l,o):(o=si(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?rg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=ng,r}return o=e.child,e=o.sibling,r=So(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vy(e,t){return t=Jf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&Ny(r),La(t,e.child,null,n),e=Vy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _A(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Lm(Error(le(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Jf({mode:"visible",children:r.children},s,0,null),o=si(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&La(t,e.child,null,i),t.child.memoizedState=rg(i),t.memoizedState=ng,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(le(419)),r=Lm(o,r,void 0),Fu(e,t,i,r)}if(l=(i&e.childLanes)!==0,On||l){if(r=sn,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Ls(e,s),Or(r,e,s,-1))}return Zy(),r=Lm(Error(le(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=IA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Hn=xo(s.nextSibling),Kn=t,Rt=!0,Er=null,e!==null&&(ar[lr++]=js,ar[lr++]=Es,ar[lr++]=di,js=e.id,Es=e.overflow,di=t),t=Vy(t,r.children),t.flags|=4096,t)}function lw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qp(e.return,t,n)}function zm(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function fS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Sn(e,t,r.children,n),r=Ot.current,r&2)r=r&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&&lw(e,n,t);else if(e.tag===19)lw(e,n,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}r&=1}if(bt(Ot,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Wd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),zm(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}zm(t,!0,n,null,o);break;case"together":zm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(le(153));if(t.child!==null){for(e=t.child,n=So(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=So(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function SA(e,t,n){switch(t.tag){case 3:uS(t),Ma();break;case 5:z1(t);break;case 1:Ln(t.type)&&zd(t);break;case 4:Oy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Ud,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Ot,Ot.current&1),t.flags|=128,null):n&t.child.childLanes?dS(e,t,n):(bt(Ot,Ot.current&1),e=zs(e,t,n),e!==null?e.sibling:null);bt(Ot,Ot.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Ot,Ot.current),r)break;return null;case 22:case 23:return t.lanes=0,lS(e,t,n)}return zs(e,t,n)}var hS,sg,mS,pS;hS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};sg=function(){};mS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,qo(ss.current);var o=null;switch(n){case"input":s=jp(e,s),r=jp(e,r),o=[];break;case"select":s=Lt({},s,{value:void 0}),r=Lt({},r,{value:void 0}),o=[];break;case"textarea":s=Tp(e,s),r=Tp(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Md)}Rp(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(sc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(sc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&kt("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};pS=function(e,t,n,r){n!==r&&(t.flags|=4)};function _l(e,t){if(!Rt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kA(e,t,n){var r=t.pendingProps;switch(Ey(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pn(t),null;case 1:return Ln(t.type)&&Ld(),pn(t),null;case 3:return r=t.stateNode,za(),Ct(Mn),Ct(vn),My(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Er!==null&&(fg(Er),Er=null))),sg(e,t),pn(t),null;case 5:Iy(t);var s=qo(gc.current);if(n=t.type,e!==null&&t.stateNode!=null)mS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(le(166));return pn(t),null}if(e=qo(ss.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[qr]=t,r[mc]=o,e=(t.mode&1)!==0,n){case"dialog":kt("cancel",r),kt("close",r);break;case"iframe":case"object":case"embed":kt("load",r);break;case"video":case"audio":for(s=0;s<zl.length;s++)kt(zl[s],r);break;case"source":kt("error",r);break;case"img":case"image":case"link":kt("error",r),kt("load",r);break;case"details":kt("toggle",r);break;case"input":y0(r,o),kt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},kt("invalid",r);break;case"textarea":x0(r,o),kt("invalid",r)}Rp(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,l,e),s=["children",""+l]):sc.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&kt("scroll",r)}switch(n){case"input":Nu(r),v0(r,o,!0);break;case"textarea":Nu(r),w0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Md)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=B_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[qr]=t,e[mc]=r,hS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ap(n,r),n){case"dialog":kt("cancel",e),kt("close",e),s=r;break;case"iframe":case"object":case"embed":kt("load",e),s=r;break;case"video":case"audio":for(s=0;s<zl.length;s++)kt(zl[s],e);s=r;break;case"source":kt("error",e),s=r;break;case"img":case"image":case"link":kt("error",e),kt("load",e),s=r;break;case"details":kt("toggle",e),s=r;break;case"input":y0(e,r),s=jp(e,r),kt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Lt({},r,{value:void 0}),kt("invalid",e);break;case"textarea":x0(e,r),s=Tp(e,r),kt("invalid",e);break;default:s=r}Rp(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?K_(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&W_(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&oc(e,c):typeof c=="number"&&oc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(sc.hasOwnProperty(o)?c!=null&&o==="onScroll"&&kt("scroll",e):c!=null&&fy(e,o,c,i))}switch(n){case"input":Nu(e),v0(e,r,!1);break;case"textarea":Nu(e),w0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Eo(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?xa(e,!!r.multiple,o,!1):r.defaultValue!=null&&xa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Md)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pn(t),null;case 6:if(e&&t.stateNode!=null)pS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(le(166));if(n=qo(gc.current),qo(ss.current),Lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[qr]=t,(o=r.nodeValue!==n)&&(e=Kn,e!==null))switch(e.tag){case 3:Mu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qr]=t,t.stateNode=r}return pn(t),null;case 13:if(Ct(Ot),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Rt&&Hn!==null&&t.mode&1&&!(t.flags&128))D1(),Ma(),t.flags|=98560,o=!1;else if(o=Lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(le(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(le(317));o[qr]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pn(t),o=!1}else Er!==null&&(fg(Er),Er=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ot.current&1?qt===0&&(qt=3):Zy())),t.updateQueue!==null&&(t.flags|=4),pn(t),null);case 4:return za(),sg(e,t),e===null&&fc(t.stateNode.containerInfo),pn(t),null;case 10:return Ry(t.type._context),pn(t),null;case 17:return Ln(t.type)&&Ld(),pn(t),null;case 19:if(Ct(Ot),o=t.memoizedState,o===null)return pn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)_l(o,!1);else{if(qt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Wd(e),i!==null){for(t.flags|=128,_l(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return bt(Ot,Ot.current&1|2),t.child}e=e.sibling}o.tail!==null&&Vt()>$a&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Rt)return pn(t),null}else 2*Vt()-o.renderingStartTime>$a&&n!==1073741824&&(t.flags|=128,r=!0,_l(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Vt(),t.sibling=null,n=Ot.current,bt(Ot,r?n&1|2:n&1),t):(pn(t),null);case 22:case 23:return Yy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vn&1073741824&&(pn(t),t.subtreeFlags&6&&(t.flags|=8192)):pn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function CA(e,t){switch(Ey(t),t.tag){case 1:return Ln(t.type)&&Ld(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),Ct(Mn),Ct(vn),My(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Iy(t),null;case 13:if(Ct(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Ot),null;case 4:return za(),null;case 10:return Ry(t.type._context),null;case 22:case 23:return Yy(),null;case 24:return null;default:return null}}var $u=!1,gn=!1,jA=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ft(e,t,r)}else n.current=null}function og(e,t,n){try{n()}catch(r){Ft(e,t,r)}}var cw=!1;function EA(e,t){if(Vp=Dd,e=w1(),Cy(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(l=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=i),h===o&&++d===r&&(c=i),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bp={focusedElem:e,selectionRange:n},Dd=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var m=x.memoizedProps,v=x.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:kr(t.type,m),v);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(_){Ft(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=cw,cw=!1,x}function ql(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&og(t,n,o)}s=s.next}while(s!==r)}}function Xf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ig(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function gS(e){var t=e.alternate;t!==null&&(e.alternate=null,gS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qr],delete t[mc],delete t[Kp],delete t[cA],delete t[uA])),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 yS(e){return e.tag===5||e.tag===3||e.tag===4}function uw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yS(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 ag(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Md));else if(r!==4&&(e=e.child,e!==null))for(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}function lg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(lg(e,t,n),e=e.sibling;e!==null;)lg(e,t,n),e=e.sibling}var cn=null,Cr=!1;function eo(e,t,n){for(n=n.child;n!==null;)vS(e,t,n),n=n.sibling}function vS(e,t,n){if(rs&&typeof rs.onCommitFiberUnmount=="function")try{rs.onCommitFiberUnmount(Bf,n)}catch{}switch(n.tag){case 5:gn||ua(n,t);case 6:var r=cn,s=Cr;cn=null,eo(e,t,n),cn=r,Cr=s,cn!==null&&(Cr?(e=cn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):cn.removeChild(n.stateNode));break;case 18:cn!==null&&(Cr?(e=cn,n=n.stateNode,e.nodeType===8?Rm(e.parentNode,n):e.nodeType===1&&Rm(e,n),cc(e)):Rm(cn,n.stateNode));break;case 4:r=cn,s=Cr,cn=n.stateNode.containerInfo,Cr=!0,eo(e,t,n),cn=r,Cr=s;break;case 0:case 11:case 14:case 15:if(!gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&og(n,t,i),s=s.next}while(s!==r)}eo(e,t,n);break;case 1:if(!gn&&(ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ft(n,t,l)}eo(e,t,n);break;case 21:eo(e,t,n);break;case 22:n.mode&1?(gn=(r=gn)||n.memoizedState!==null,eo(e,t,n),gn=r):eo(e,t,n);break;default:eo(e,t,n)}}function dw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jA),t.forEach(function(r){var s=MA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Sr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:cn=l.stateNode,Cr=!1;break e;case 3:cn=l.stateNode.containerInfo,Cr=!0;break e;case 4:cn=l.stateNode.containerInfo,Cr=!0;break e}l=l.return}if(cn===null)throw Error(le(160));vS(o,i,s),cn=null,Cr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ft(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xS(t,e),t=t.sibling}function xS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Sr(t,e),Zr(e),r&4){try{ql(3,e,e.return),Xf(3,e)}catch(m){Ft(e,e.return,m)}try{ql(5,e,e.return)}catch(m){Ft(e,e.return,m)}}break;case 1:Sr(t,e),Zr(e),r&512&&n!==null&&ua(n,n.return);break;case 5:if(Sr(t,e),Zr(e),r&512&&n!==null&&ua(n,n.return),e.flags&32){var s=e.stateNode;try{oc(s,"")}catch(m){Ft(e,e.return,m)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&U_(s,o),Ap(l,i);var u=Ap(l,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?K_(s,f):d==="dangerouslySetInnerHTML"?W_(s,f):d==="children"?oc(s,f):fy(s,d,f,u)}switch(l){case"input":Ep(s,o);break;case"textarea":V_(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?xa(s,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?xa(s,!!o.multiple,o.defaultValue,!0):xa(s,!!o.multiple,o.multiple?[]:"",!1))}s[mc]=o}catch(m){Ft(e,e.return,m)}}break;case 6:if(Sr(t,e),Zr(e),r&4){if(e.stateNode===null)throw Error(le(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(m){Ft(e,e.return,m)}}break;case 3:if(Sr(t,e),Zr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cc(t.containerInfo)}catch(m){Ft(e,e.return,m)}break;case 4:Sr(t,e),Zr(e);break;case 13:Sr(t,e),Zr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Hy=Vt())),r&4&&dw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(gn=(u=gn)||d,Sr(t,e),gn=u):Sr(t,e),Zr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,p=h.child,h.tag){case 0:case 11:case 14:case 15:ql(4,h,h.return);break;case 1:ua(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(m){Ft(r,n,m)}}break;case 5:ua(h,h.return);break;case 22:if(h.memoizedState!==null){hw(f);continue}}p!==null?(p.return=h,Ne=p):hw(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=H_("display",i))}catch(m){Ft(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){Ft(e,e.return,m)}}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:Sr(t,e),Zr(e),r&4&&dw(e);break;case 21:break;default:Sr(t,e),Zr(e)}}function Zr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(yS(n)){var r=n;break e}n=n.return}throw Error(le(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(oc(s,""),r.flags&=-33);var o=uw(e);lg(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=uw(e);ag(e,l,i);break;default:throw Error(le(161))}}catch(c){Ft(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NA(e,t,n){Ne=e,wS(e)}function wS(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var s=Ne,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||$u;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||gn;l=$u;var u=gn;if($u=i,(gn=c)&&!u)for(Ne=s;Ne!==null;)i=Ne,c=i.child,i.tag===22&&i.memoizedState!==null?mw(s):c!==null?(c.return=i,Ne=c):mw(s);for(;o!==null;)Ne=o,wS(o),o=o.sibling;Ne=s,$u=l,gn=u}fw(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ne=o):fw(e)}}function fw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:gn||Xf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!gn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:kr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&q0(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}q0(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&cc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(le(163))}gn||t.flags&512&&ig(t)}catch(h){Ft(t,t.return,h)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function hw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function mw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xf(4,t)}catch(c){Ft(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ft(t,s,c)}}var o=t.return;try{ig(t)}catch(c){Ft(t,o,c)}break;case 5:var i=t.return;try{ig(t)}catch(c){Ft(t,i,c)}}}catch(c){Ft(t,t.return,c)}if(t===e){Ne=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Ne=l;break}Ne=t.return}}var TA=Math.ceil,Yd=Bs.ReactCurrentDispatcher,By=Bs.ReactCurrentOwner,dr=Bs.ReactCurrentBatchConfig,ut=0,sn=null,Ht=null,un=0,Vn=0,da=zo(0),qt=0,wc=null,hi=0,Qf=0,Wy=0,Xl=null,Dn=null,Hy=0,$a=1/0,_s=null,Zd=!1,cg=null,bo=null,Uu=!1,fo=null,Gd=0,Ql=0,ug=null,hd=-1,md=0;function Cn(){return ut&6?Vt():hd!==-1?hd:hd=Vt()}function _o(e){return e.mode&1?ut&2&&un!==0?un&-un:fA.transition!==null?(md===0&&(md=s1()),md):(e=gt,e!==0||(e=window.event,e=e===void 0?16:d1(e.type)),e):1}function Or(e,t,n,r){if(50<Ql)throw Ql=0,ug=null,Error(le(185));qc(e,n,r),(!(ut&2)||e!==sn)&&(e===sn&&(!(ut&2)&&(Qf|=n),qt===4&&lo(e,un)),zn(e,r),n===1&&ut===0&&!(t.mode&1)&&($a=Vt()+500,Zf&&Fo()))}function zn(e,t){var n=e.callbackNode;fR(e,t);var r=Ad(e,e===sn?un:0);if(r===0)n!==null&&S0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&S0(n),t===1)e.tag===0?dA(pw.bind(null,e)):P1(pw.bind(null,e)),aA(function(){!(ut&6)&&Fo()}),n=null;else{switch(o1(r)){case 1:n=yy;break;case 4:n=n1;break;case 16:n=Rd;break;case 536870912:n=r1;break;default:n=Rd}n=NS(n,bS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bS(e,t){if(hd=-1,md=0,ut&6)throw Error(le(327));var n=e.callbackNode;if(ka()&&e.callbackNode!==n)return null;var r=Ad(e,e===sn?un:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=qd(e,r);else{t=r;var s=ut;ut|=2;var o=SS();(sn!==e||un!==t)&&(_s=null,$a=Vt()+500,ri(e,t));do try{AA();break}catch(l){_S(e,l)}while(!0);Py(),Yd.current=o,ut=s,Ht!==null?t=0:(sn=null,un=0,t=qt)}if(t!==0){if(t===2&&(s=Lp(e),s!==0&&(r=s,t=dg(e,s))),t===1)throw n=wc,ri(e,0),lo(e,r),zn(e,Vt()),n;if(t===6)lo(e,r);else{if(s=e.current.alternate,!(r&30)&&!PA(s)&&(t=qd(e,r),t===2&&(o=Lp(e),o!==0&&(r=o,t=dg(e,o))),t===1))throw n=wc,ri(e,0),lo(e,r),zn(e,Vt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(le(345));case 2:Ho(e,Dn,_s);break;case 3:if(lo(e,r),(r&130023424)===r&&(t=Hy+500-Vt(),10<t)){if(Ad(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Cn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Hp(Ho.bind(null,e,Dn,_s),t);break}Ho(e,Dn,_s);break;case 4:if(lo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Dr(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Vt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TA(r/1960))-r,10<r){e.timeoutHandle=Hp(Ho.bind(null,e,Dn,_s),r);break}Ho(e,Dn,_s);break;case 5:Ho(e,Dn,_s);break;default:throw Error(le(329))}}}return zn(e,Vt()),e.callbackNode===n?bS.bind(null,e):null}function dg(e,t){var n=Xl;return e.current.memoizedState.isDehydrated&&(ri(e,t).flags|=256),e=qd(e,t),e!==2&&(t=Dn,Dn=n,t!==null&&fg(t)),e}function fg(e){Dn===null?Dn=e:Dn.push.apply(Dn,e)}function PA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Mr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 lo(e,t){for(t&=~Wy,t&=~Qf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Dr(t),r=1<<n;e[n]=-1,t&=~r}}function pw(e){if(ut&6)throw Error(le(327));ka();var t=Ad(e,0);if(!(t&1))return zn(e,Vt()),null;var n=qd(e,t);if(e.tag!==0&&n===2){var r=Lp(e);r!==0&&(t=r,n=dg(e,r))}if(n===1)throw n=wc,ri(e,0),lo(e,t),zn(e,Vt()),n;if(n===6)throw Error(le(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ho(e,Dn,_s),zn(e,Vt()),null}function Ky(e,t){var n=ut;ut|=1;try{return e(t)}finally{ut=n,ut===0&&($a=Vt()+500,Zf&&Fo())}}function mi(e){fo!==null&&fo.tag===0&&!(ut&6)&&ka();var t=ut;ut|=1;var n=dr.transition,r=gt;try{if(dr.transition=null,gt=1,e)return e()}finally{gt=r,dr.transition=n,ut=t,!(ut&6)&&Fo()}}function Yy(){Vn=da.current,Ct(da)}function ri(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,iA(n)),Ht!==null)for(n=Ht.return;n!==null;){var r=n;switch(Ey(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ld();break;case 3:za(),Ct(Mn),Ct(vn),My();break;case 5:Iy(r);break;case 4:za();break;case 13:Ct(Ot);break;case 19:Ct(Ot);break;case 10:Ry(r.type._context);break;case 22:case 23:Yy()}n=n.return}if(sn=e,Ht=e=So(e.current,null),un=Vn=t,qt=0,wc=null,Wy=Qf=hi=0,Dn=Xl=null,Go!==null){for(t=0;t<Go.length;t++)if(n=Go[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Go=null}return e}function _S(e,t){do{var n=Ht;try{if(Py(),ud.current=Kd,Hd){for(var r=Mt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Hd=!1}if(fi=0,rn=Gt=Mt=null,Gl=!1,yc=0,By.current=null,n===null||n.return===null){qt=1,wc=t,Ht=null;break}e:{var o=e,i=n.return,l=n,c=t;if(t=un,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=nw(i);if(p!==null){p.flags&=-257,rw(p,i,l,o,t),p.mode&1&&tw(o,u,t),t=p,c=u;var x=t.updateQueue;if(x===null){var m=new Set;m.add(c),t.updateQueue=m}else x.add(c);break e}else{if(!(t&1)){tw(o,u,t),Zy();break e}c=Error(le(426))}}else if(Rt&&l.mode&1){var v=nw(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),rw(v,i,l,o,t),Ny(Fa(c,l));break e}}o=c=Fa(c,l),qt!==4&&(qt=2),Xl===null?Xl=[o]:Xl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=oS(o,c,t);G0(o,g);break e;case 1:l=c;var w=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(bo===null||!bo.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=iS(o,l,t);G0(o,_);break e}}o=o.return}while(o!==null)}CS(n)}catch(C){t=C,Ht===n&&n!==null&&(Ht=n=n.return);continue}break}while(!0)}function SS(){var e=Yd.current;return Yd.current=Kd,e===null?Kd:e}function Zy(){(qt===0||qt===3||qt===2)&&(qt=4),sn===null||!(hi&268435455)&&!(Qf&268435455)||lo(sn,un)}function qd(e,t){var n=ut;ut|=2;var r=SS();(sn!==e||un!==t)&&(_s=null,ri(e,t));do try{RA();break}catch(s){_S(e,s)}while(!0);if(Py(),ut=n,Yd.current=r,Ht!==null)throw Error(le(261));return sn=null,un=0,qt}function RA(){for(;Ht!==null;)kS(Ht)}function AA(){for(;Ht!==null&&!rR();)kS(Ht)}function kS(e){var t=ES(e.alternate,e,Vn);e.memoizedProps=e.pendingProps,t===null?CS(e):Ht=t,By.current=null}function CS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=CA(n,t),n!==null){n.flags&=32767,Ht=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qt=6,Ht=null;return}}else if(n=kA(n,t,Vn),n!==null){Ht=n;return}if(t=t.sibling,t!==null){Ht=t;return}Ht=t=e}while(t!==null);qt===0&&(qt=5)}function Ho(e,t,n){var r=gt,s=dr.transition;try{dr.transition=null,gt=1,DA(e,t,n,r)}finally{dr.transition=s,gt=r}return null}function DA(e,t,n,r){do ka();while(fo!==null);if(ut&6)throw Error(le(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(le(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(hR(e,o),e===sn&&(Ht=sn=null,un=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Uu||(Uu=!0,NS(Rd,function(){return ka(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=dr.transition,dr.transition=null;var i=gt;gt=1;var l=ut;ut|=4,By.current=null,EA(e,n),xS(n,e),JR(Bp),Dd=!!Vp,Bp=Vp=null,e.current=n,NA(n),sR(),ut=l,gt=i,dr.transition=o}else e.current=n;if(Uu&&(Uu=!1,fo=e,Gd=s),o=e.pendingLanes,o===0&&(bo=null),aR(n.stateNode),zn(e,Vt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Zd)throw Zd=!1,e=cg,cg=null,e;return Gd&1&&e.tag!==0&&ka(),o=e.pendingLanes,o&1?e===ug?Ql++:(Ql=0,ug=e):Ql=0,Fo(),null}function ka(){if(fo!==null){var e=o1(Gd),t=dr.transition,n=gt;try{if(dr.transition=null,gt=16>e?16:e,fo===null)var r=!1;else{if(e=fo,fo=null,Gd=0,ut&6)throw Error(le(331));var s=ut;for(ut|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:ql(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,p=d.return;if(gS(d),d===u){Ne=null;break}if(h!==null){h.return=p,Ne=h;break}Ne=p}}}var x=o.alternate;if(x!==null){var m=x.child;if(m!==null){x.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Ne=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ne=i;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ql(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,Ne=g;break e}Ne=o.return}}var w=e.current;for(Ne=w;Ne!==null;){i=Ne;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ne=b;else e:for(i=w;Ne!==null;){if(l=Ne,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Xf(9,l)}}catch(C){Ft(l,l.return,C)}if(l===i){Ne=null;break e}var _=l.sibling;if(_!==null){_.return=l.return,Ne=_;break e}Ne=l.return}}if(ut=s,Fo(),rs&&typeof rs.onPostCommitFiberRoot=="function")try{rs.onPostCommitFiberRoot(Bf,e)}catch{}r=!0}return r}finally{gt=n,dr.transition=t}}return!1}function gw(e,t,n){t=Fa(n,t),t=oS(e,t,1),e=wo(e,t,1),t=Cn(),e!==null&&(qc(e,1,t),zn(e,t))}function Ft(e,t,n){if(e.tag===3)gw(e,e,n);else for(;t!==null;){if(t.tag===3){gw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bo===null||!bo.has(r))){e=Fa(n,e),e=iS(t,e,1),t=wo(t,e,1),e=Cn(),t!==null&&(qc(t,1,e),zn(t,e));break}}t=t.return}}function OA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Cn(),e.pingedLanes|=e.suspendedLanes&n,sn===e&&(un&n)===n&&(qt===4||qt===3&&(un&130023424)===un&&500>Vt()-Hy?ri(e,0):Wy|=n),zn(e,t)}function jS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Cn();e=Ls(e,t),e!==null&&(qc(e,t,n),zn(e,n))}function IA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jS(e,n)}function MA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),jS(e,n)}var ES;ES=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mn.current)On=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return On=!1,SA(e,t,n);On=!!(e.flags&131072)}else On=!1,Rt&&t.flags&1048576&&R1(t,$d,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fd(e,t),e=t.pendingProps;var s=Ia(t,vn.current);Sa(t,n),s=zy(null,t,r,e,s,n);var o=Fy();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,Ln(r)?(o=!0,zd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Dy(t),s.updater=qf,t.stateNode=s,s._reactInternals=t,Qp(t,r,e,n),t=tg(null,t,r,!0,o,n)):(t.tag=0,Rt&&o&&jy(t),Sn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=zA(r),e=kr(r,e),s){case 0:t=eg(null,t,r,e,n);break e;case 1:t=iw(null,t,r,e,n);break e;case 11:t=sw(null,t,r,e,n);break e;case 14:t=ow(null,t,r,kr(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kr(r,s),eg(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kr(r,s),iw(e,t,r,s,n);case 3:e:{if(uS(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,s=o.element,L1(e,t),Bd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Fa(Error(le(423)),t),t=aw(e,t,r,n,s);break e}else if(r!==s){s=Fa(Error(le(424)),t),t=aw(e,t,r,n,s);break e}else for(Hn=xo(t.stateNode.containerInfo.firstChild),Kn=t,Rt=!0,Er=null,n=I1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ma(),r===s){t=zs(e,t,n);break e}Sn(e,t,r,n)}t=t.child}return t;case 5:return z1(t),e===null&&Gp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Wp(r,s)?i=null:o!==null&&Wp(r,o)&&(t.flags|=32),cS(e,t),Sn(e,t,i,n),t.child;case 6:return e===null&&Gp(t),null;case 13:return dS(e,t,n);case 4:return Oy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):Sn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kr(r,s),sw(e,t,r,s,n);case 7:return Sn(e,t,t.pendingProps,n),t.child;case 8:return Sn(e,t,t.pendingProps.children,n),t.child;case 12:return Sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Ud,r._currentValue),r._currentValue=i,o!==null)if(Mr(o.value,i)){if(o.children===s.children&&!Mn.current){t=zs(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ps(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qp(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(le(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),qp(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Sn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sa(t,n),s=mr(s),r=r(s),t.flags|=1,Sn(e,t,r,n),t.child;case 14:return r=t.type,s=kr(r,t.pendingProps),s=kr(r.type,s),ow(e,t,r,s,n);case 15:return aS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kr(r,s),fd(e,t),t.tag=1,Ln(r)?(e=!0,zd(t)):e=!1,Sa(t,n),sS(t,r,s),Qp(t,r,s,n),tg(null,t,r,!0,e,n);case 19:return fS(e,t,n);case 22:return lS(e,t,n)}throw Error(le(156,t.tag))};function NS(e,t){return t1(e,t)}function LA(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(e,t,n,r){return new LA(e,t,n,r)}function Gy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zA(e){if(typeof e=="function")return Gy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===my)return 11;if(e===py)return 14}return 2}function So(e,t){var n=e.alternate;return n===null?(n=ur(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Gy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ta:return si(n.children,s,o,t);case hy:i=8,s|=8;break;case _p:return e=ur(12,n,t,s|2),e.elementType=_p,e.lanes=o,e;case Sp:return e=ur(13,n,t,s),e.elementType=Sp,e.lanes=o,e;case kp:return e=ur(19,n,t,s),e.elementType=kp,e.lanes=o,e;case z_:return Jf(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M_:i=10;break e;case L_:i=9;break e;case my:i=11;break e;case py:i=14;break e;case oo:i=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=ur(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function si(e,t,n,r){return e=ur(7,e,r,t),e.lanes=n,e}function Jf(e,t,n,r){return e=ur(22,e,r,t),e.elementType=z_,e.lanes=n,e.stateNode={isHidden:!1},e}function Fm(e,t,n){return e=ur(6,e,null,t),e.lanes=n,e}function $m(e,t,n){return t=ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FA(e,t,n,r,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=wm(0),this.expirationTimes=wm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function qy(e,t,n,r,s,o,i,l,c){return e=new FA(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ur(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dy(o),e}function $A(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ea,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function TS(e){if(!e)return No;e=e._reactInternals;e:{if(ji(e)!==e||e.tag!==1)throw Error(le(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(le(171))}if(e.tag===1){var n=e.type;if(Ln(n))return T1(e,n,t)}return t}function PS(e,t,n,r,s,o,i,l,c){return e=qy(n,r,!0,e,s,o,i,l,c),e.context=TS(null),n=e.current,r=Cn(),s=_o(n),o=Ps(r,s),o.callback=t??null,wo(n,o,s),e.current.lanes=s,qc(e,s,r),zn(e,r),e}function eh(e,t,n,r){var s=t.current,o=Cn(),i=_o(s);return n=TS(n),t.context===null?t.context=n:t.pendingContext=n,t=Ps(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wo(s,t,i),e!==null&&(Or(e,s,i,o),cd(e,s,i)),i}function Xd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function yw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xy(e,t){yw(e,t),(e=e.alternate)&&yw(e,t)}function UA(){return null}var RS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qy(e){this._internalRoot=e}th.prototype.render=Qy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(le(409));eh(e,t,null,null)};th.prototype.unmount=Qy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mi(function(){eh(null,e,null,null)}),t[Ms]=null}};function th(e){this._internalRoot=e}th.prototype.unstable_scheduleHydration=function(e){if(e){var t=l1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ao.length&&t!==0&&t<ao[n].priority;n++);ao.splice(n,0,e),n===0&&u1(e)}};function Jy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vw(){}function VA(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Xd(i);o.call(u)}}var i=PS(t,r,e,0,null,!1,!1,"",vw);return e._reactRootContainer=i,e[Ms]=i.current,fc(e.nodeType===8?e.parentNode:e),mi(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Xd(c);l.call(u)}}var c=qy(e,0,!1,null,null,!1,!1,"",vw);return e._reactRootContainer=c,e[Ms]=c.current,fc(e.nodeType===8?e.parentNode:e),mi(function(){eh(t,c,n,r)}),c}function rh(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=Xd(i);l.call(c)}}eh(t,i,e,s)}else i=VA(n,t,e,s,r);return Xd(i)}i1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ll(t.pendingLanes);n!==0&&(vy(t,n|1),zn(t,Vt()),!(ut&6)&&($a=Vt()+500,Fo()))}break;case 13:mi(function(){var r=Ls(e,1);if(r!==null){var s=Cn();Or(r,e,1,s)}}),Xy(e,1)}};xy=function(e){if(e.tag===13){var t=Ls(e,134217728);if(t!==null){var n=Cn();Or(t,e,134217728,n)}Xy(e,134217728)}};a1=function(e){if(e.tag===13){var t=_o(e),n=Ls(e,t);if(n!==null){var r=Cn();Or(n,e,t,r)}Xy(e,t)}};l1=function(){return gt};c1=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};Op=function(e,t,n){switch(t){case"input":if(Ep(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Yf(r);if(!s)throw Error(le(90));$_(r),Ep(r,s)}}}break;case"textarea":V_(e,n);break;case"select":t=n.value,t!=null&&xa(e,!!n.multiple,t,!1)}};G_=Ky;q_=mi;var BA={usingClientEntryPoint:!1,Events:[Qc,oa,Yf,Y_,Z_,Ky]},Sl={findFiberByHostInstance:Zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WA={bundleType:Sl.bundleType,version:Sl.version,rendererPackageName:Sl.rendererPackageName,rendererConfig:Sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Bs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=J_(e),e===null?null:e.stateNode},findFiberByHostInstance:Sl.findFiberByHostInstance||UA,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 Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Bf=Vu.inject(WA),rs=Vu}catch{}}tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BA;tr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jy(t))throw Error(le(200));return $A(e,t,null,n)};tr.createRoot=function(e,t){if(!Jy(e))throw Error(le(299));var n=!1,r="",s=RS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=qy(e,1,!1,null,null,n,!1,r,s),e[Ms]=t.current,fc(e.nodeType===8?e.parentNode:e),new Qy(t)};tr.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(le(188)):(e=Object.keys(e).join(","),Error(le(268,e)));return e=J_(t),e=e===null?null:e.stateNode,e};tr.flushSync=function(e){return mi(e)};tr.hydrate=function(e,t,n){if(!nh(t))throw Error(le(200));return rh(null,e,t,!0,n)};tr.hydrateRoot=function(e,t,n){if(!Jy(e))throw Error(le(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=RS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=PS(t,null,e,1,n??null,s,!1,o,i),e[Ms]=t.current,fc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new th(t)};tr.render=function(e,t,n){if(!nh(t))throw Error(le(200));return rh(null,e,t,!1,n)};tr.unmountComponentAtNode=function(e){if(!nh(e))throw Error(le(40));return e._reactRootContainer?(mi(function(){rh(null,null,e,!1,function(){e._reactRootContainer=null,e[Ms]=null})}),!0):!1};tr.unstable_batchedUpdates=Ky;tr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nh(n))throw Error(le(200));if(e==null||e._reactInternals===void 0)throw Error(le(38));return rh(e,t,n,!1,r)};tr.version="18.3.1-next-f1338f8080-20240426";function AS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AS)}catch(e){console.error(e)}}AS(),A_.exports=tr;var Ws=A_.exports;const DS=Uf(Ws),HA=x_({__proto__:null,default:DS},[Ws]);var xw=Ws;wp.createRoot=xw.createRoot,wp.hydrateRoot=xw.hydrateRoot;/**
* @remix-run/router v1.18.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dt.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const ww="popstate";function KA(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:l="",hash:c=""}=Hs(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),bc("",{pathname:i,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),l="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");l=u===-1?c:c.slice(0,u)}return l+"#"+(typeof o=="string"?o:gi(o))}function r(s,o){pi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return ZA(t,n,r,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function pi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YA(){return Math.random().toString(36).substr(2,8)}function bw(e,t){return{usr:e.state,key:e.key,idx:t}}function bc(e,t,n,r){return n===void 0&&(n=null),Dt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hs(t):t,{state:n,key:t&&t.key||r||YA()})}function gi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ZA(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,l=Wt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Dt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Wt.Pop;let v=d(),g=v==null?null:v-u;u=v,c&&c({action:l,location:m.location,delta:g})}function h(v,g){l=Wt.Push;let w=bc(m.location,v,g);n&&n(w,v),u=d()+1;let b=bw(w,u),_=m.createHref(w);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:l,location:m.location,delta:1})}function p(v,g){l=Wt.Replace;let w=bc(m.location,v,g);n&&n(w,v),u=d();let b=bw(w,u),_=m.createHref(w);i.replaceState(b,"",_),o&&c&&c({action:l,location:m.location,delta:0})}function x(v){let g=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof v=="string"?v:gi(v);return w=w.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,g)}let m={get action(){return l},get location(){return e(s,i)},listen(v){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(ww,f),c=v,()=>{s.removeEventListener(ww,f),c=null}},createHref(v){return t(s,v)},createURL:x,encodeLocation(v){let g=x(v);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(v){return i.go(v)}};return m}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const GA=new Set(["lazy","caseSensitive","path","id","index","children"]);function qA(e){return e.index===!0}function _c(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],l=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),qA(s)){let c=Dt({},s,t(s),{id:l});return r[l]=c,c}else{let c=Dt({},s,t(s),{id:l,children:void 0});return r[l]=c,s.children&&(c.children=_c(s.children,t,i,r)),c}})}function Yo(e,t,n){return n===void 0&&(n="/"),gd(e,t,n,!1)}function gd(e,t,n,r){let s=typeof t=="string"?Hs(t):t,o=el(s.pathname||"/",n);if(o==null)return null;let i=OS(e);QA(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=cD(o);l=aD(i[c],u,r)}return l}function XA(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function OS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Rs([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),OS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:oD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of IS(o.path))s(o,i,c)}),t}function IS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=IS(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function QA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:iD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const JA=/^:[\w-]+$/,eD=3,tD=2,nD=1,rD=10,sD=-2,_w=e=>e==="*";function oD(e,t){let n=e.split("/"),r=n.length;return n.some(_w)&&(r+=sD),t&&(r+=tD),n.filter(s=>!_w(s)).reduce((s,o)=>s+(JA.test(o)?eD:o===""?nD:rD),r)}function iD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function aD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Sw({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Sw({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Rs([o,f.pathname]),pathnameBase:fD(Rs([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Rs([o,f.pathnameBase]))}return i}function Sw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lD(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let m=l[f]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const x=l[f];return p&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function lD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),pi(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 r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function cD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pi(!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 el(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function uD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Hs(e):e;return{pathname:n?n.startsWith("/")?n:dD(n,t):t,search:hD(r),hash:mD(s)}}function dD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Um(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function MS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sh(e,t){let n=MS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Hs(e):(s=Dt({},e),tt(!s.pathname||!s.pathname.includes("?"),Um("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),Um("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),Um("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=uD(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Rs=e=>e.join("/").replace(/\/\/+/g,"/"),fD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ev{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ih(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const LS=["post","put","patch","delete"],pD=new Set(LS),gD=["get",...LS],yD=new Set(gD),vD=new Set([301,302,303,307,308]),xD=new Set([307,308]),Vm={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},tv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),zS="remix-router-transitions";function _D(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(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 V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=bD;let o={},i=_c(e.routes,s,void 0,o),l,c=e.basename||"/",u=e.unstable_dataStrategy||ED,d=e.unstable_patchRoutesOnMiss,f=Dt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,x=null,m=null,v=null,g=e.hydrationData!=null,w=Yo(i,e.history.location,c),b=null;if(w==null&&!d){let V=bn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Dw(i);w=H,b={[q.id]:V}}w&&d&&!e.hydrationData&&mm(w,i,e.history.location.pathname).active&&(w=null);let _;if(!w)_=!1,w=[];else if(w.some(V=>V.route.lazy))_=!1;else if(!w.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=w.findIndex(Ce=>H[Ce.route.id]!==void 0);_=w.slice(0,ne+1).every(q)}else _=w.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:w,initialized:_,navigation:Vm,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||b,fetchers:new Map,blockers:new Map},T=Wt.Pop,R=!1,A,O=!1,Z=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,ve=new Map,oe=new Set,ie=new Map,Ie=new Map,xe=new Map,ke=!1;function Pe(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(ke){ke=!1;return}pi(Ie.size===0||ne!=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 Ce=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(Ce&&ne!=null){ke=!0,e.history.go(ne*-1),Ii(Ce,{state:"blocked",location:q,proceed(){Ii(Ce,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let De=new Map(j.blockers);De.set(Ce,kl),Ae({blockers:De})}});return}return G(H,q)}),n){$D(t,Z);let V=()=>UD(t,Z);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||G(Wt.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),p.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Yt(H)),j.blockers.forEach((V,H)=>xu(H))}function Me(V){return p.add(V),()=>p.delete(V)}function Ae(V,H){H===void 0&&(H={}),j=Dt({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((Ce,De)=>{Ce.state==="idle"&&(oe.has(De)?ne.push(De):q.push(De))}),[...p].forEach(Ce=>Ce(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(Ce=>j.fetchers.delete(Ce)),ne.forEach(Ce=>Yt(Ce)))}function ot(V,H,q){var ne,Ce;let{flushSync:De}=q===void 0?{}:q,We=j.actionData!=null&&j.navigation.formMethod!=null&&jr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,pe;H.actionData?Object.keys(H.actionData).length>0?pe=H.actionData:pe=null:We?pe=j.actionData:pe=null;let qe=H.loaderData?Rw(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,kl)));let $e=R===!0||j.navigation.formMethod!=null&&jr(j.navigation.formMethod)&&((Ce=V.state)==null?void 0:Ce._isRedirect)!==!0;l&&(i=l,l=void 0),z||T===Wt.Pop||(T===Wt.Push?e.history.push(V,V.state):T===Wt.Replace&&e.history.replace(V,V.state));let yt;if(T===Wt.Pop){let pt=Z.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:Z.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(O){let pt=Z.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),Z.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Ae(Dt({},H,{actionData:pe,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:Vm,revalidation:"idle",restoreScrollPosition:c0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:De===!0}),T=Wt.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=hg(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:Ce,error:De}=kw(f.v7_normalizeFormMethod,!1,q,H),We=j.location,pe=bc(j.location,ne,H&&H.state);pe=Dt({},pe,e.history.encodeLocation(pe));let qe=H&&H.replace!=null?H.replace:void 0,ze=Wt.Push;qe===!0?ze=Wt.Replace:qe===!1||Ce!=null&&jr(Ce.formMethod)&&Ce.formAction===j.location.pathname+j.location.search&&(ze=Wt.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:We,nextLocation:pe,historyAction:ze});if(pt){Ii(pt,{state:"blocked",location:pe,proceed(){Ii(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,kl),Ae({blockers:xt})}});return}return await G(ze,pe,{submission:Ce,pendingError:De,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ye(),Ae({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){G(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}G(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function G(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,pP(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let ne=l||i,Ce=q&&q.overrideNavigation,De=Yo(ne,H,c),We=(q&&q.flushSync)===!0,pe=mm(De,ne,H.pathname);if(pe.active&&pe.matches&&(De=pe.matches),!De){let{error:ht,notFoundMatches:ln,route:Bt}=Mi(H.pathname);ot(H,{matches:ln,loaderData:{},errors:{[Bt.id]:ht}},{flushSync:We});return}if(j.initialized&&!S&&DD(j.location,H)&&!(q&&q.submission&&jr(q.submission.formMethod))){ot(H,{matches:De},{flushSync:We});return}A=new AbortController;let qe=Ui(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[fa(De).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&jr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,De,pe.active,{replace:q.replace,flushSync:We});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[ln,Bt]=ht.pendingActionResult;if(Bn(Bt)&&ih(Bt.error)&&Bt.error.status===404){A=null,ot(H,{matches:ht.matches,loaderData:{},errors:{[ln]:Bt.error}});return}}De=ht.matches||De,ze=ht.pendingActionResult,Ce=Bm(H,q.submission),We=!1,pe.active=!1,qe=Ui(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,De,pe.active,Ce,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,We,ze);$e||(A=null,ot(H,Dt({matches:yt||De},Aw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,ne,Ce,De){De===void 0&&(De={}),Ye();let We=zD(H,q);if(Ae({navigation:We},{flushSync:De.flushSync===!0}),Ce){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Kr(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Mi(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let pe,qe=Fl(ne,H);if(!qe.route.action&&!qe.route.lazy)pe={type:wt.error,error:bn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(pe=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(Qo(pe)){let ze;return De&&De.replace!=null?ze=De.replace:ze=Nw(pe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,pe,{submission:q,replace:ze}),{shortCircuited:!0}}if(Xo(pe))throw bn(400,{type:"defer-action"});if(Bn(pe)){let ze=fa(ne,qe.route.id);return(De&&De.replace)!==!0&&(T=Wt.Push),{matches:ne,pendingActionResult:[ze.route.id,pe]}}return{matches:ne,pendingActionResult:[qe.route.id,pe]}}async function k(V,H,q,ne,Ce,De,We,pe,qe,ze,$e){let yt=Ce||Bm(H,De),pt=De||We||Mw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let zt=P($e);Ae(Dt({navigation:yt},zt!==void 0?{actionData:zt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:zt,error:Fn}=Kr(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[zt]:Fn}}}else if(Je.matches)q=Je.matches;else{let{error:zt,notFoundMatches:Fn,route:Tt}=Mi(H.pathname);return{matches:Fn,loaderData:{},errors:{[Tt.id]:zt}}}}let ht=l||i,[ln,Bt]=Cw(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,ht,c,$e);if(Qs(Je=>!(q&&q.some(zt=>zt.route.id===Je))||ln&&ln.some(zt=>zt.route.id===Je)),I=++W,ln.length===0&&Bt.length===0){let Je=gs();return ot(H,Dt({matches:q,loaderData:{},errors:$e&&Bn($e[1])?{[$e[0]]:$e[1].error}:null},Aw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let zt=P($e);zt!==void 0&&(Je.actionData=zt)}Bt.length>0&&(Je.fetchers=M(Bt)),Ae(Je,{flushSync:ze})}Bt.forEach(Je=>{F.has(Je.key)&&ct(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let pl=()=>Bt.forEach(Je=>ct(Je.key));A&&A.signal.addEventListener("abort",pl);let{loaderResults:Js,fetcherResults:Li}=await be(j.matches,q,ln,Bt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",pl),Bt.forEach(Je=>F.delete(Je.key));let zi=Ow([...Js,...Li]);if(zi){if(zi.idx>=ln.length){let Je=Bt[zi.idx-ln.length].key;$.add(Je)}return await Q(V,zi.result,{replace:pe}),{shortCircuited:!0}}let{loaderData:Fi,errors:Yr}=Pw(j,q,ln,Js,$e,Bt,Li,ie);ie.forEach((Je,zt)=>{Je.subscribe(Fn=>{(Fn||Je.done)&&ie.delete(zt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[zt]=Je;return!ln.some(Fn=>Fn.route.id===zt)}).forEach(Je=>{let[zt,Fn]=Je;Yr=Object.assign(Yr||{},{[zt]:Fn})});let _u=gs(),Su=ir(I),ku=_u||Su||Bt.length>0;return Dt({matches:q,loaderData:Fi,errors:Yr},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!Bn(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=Cl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function Y(V,H,q,ne){if(r)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.");F.has(V)&&ct(V);let Ce=(ne&&ne.unstable_flushSync)===!0,De=l||i,We=hg(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),pe=Yo(De,We,c),qe=mm(pe,De,We);if(qe.active&&qe.matches&&(pe=qe.matches),!pe){Nt(V,H,bn(404,{pathname:We}),{flushSync:Ce});return}let{path:ze,submission:$e,error:yt}=kw(f.v7_normalizeFormMethod,!0,We,ne);if(yt){Nt(V,H,yt,{flushSync:Ce});return}let pt=Fl(pe,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&jr($e.formMethod)){L(V,H,ze,pt,pe,qe.active,Ce,$e);return}B.set(V,{routeId:H,path:ze}),K(V,H,ze,pt,pe,qe.active,Ce,$e)}async function L(V,H,q,ne,Ce,De,We,pe){Ye(),B.delete(V);function qe(Tt){if(!Tt.route.action&&!Tt.route.lazy){let ys=bn(405,{method:pe.formMethod,pathname:q,routeId:H});return Nt(V,H,ys,{flushSync:We}),!0}return!1}if(!De&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,FD(pe,ze),{flushSync:We});let $e=new AbortController,yt=Ui(e.history,q,$e.signal,pe);if(De){let Tt=await bu(Ce,q,yt.signal);if(Tt.type==="aborted")return;if(Tt.type==="error"){let{error:ys}=Kr(q,Tt);Nt(V,H,ys,{flushSync:We});return}else if(Tt.matches){if(Ce=Tt.matches,ne=Fl(Ce,q),qe(ne))return}else{Nt(V,H,bn(404,{pathname:q}),{flushSync:We});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],Ce))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&oe.has(V)){if(Qo(ht)||Bn(ht)){Ue(V,ro(void 0));return}}else{if(Qo(ht))if(F.delete(V),I>pt){Ue(V,ro(void 0));return}else return $.add(V),Ue(V,Cl(pe)),Q(yt,ht,{fetcherSubmission:pe});if(Bn(ht)){Nt(V,H,ht.error);return}}if(Xo(ht))throw bn(400,{type:"defer-action"});let ln=j.navigation.location||j.location,Bt=Ui(e.history,ln,$e.signal),pl=l||i,Js=j.navigation.state!=="idle"?Yo(pl,j.navigation.location,c):j.matches;tt(Js,"Didn't find any matches after fetcher action");let Li=++W;X.set(V,Li);let zi=Cl(pe,ht.data);j.fetchers.set(V,zi);let[Fi,Yr]=Cw(e.history,j,Js,pe,ln,!1,f.v7_skipActionErrorRevalidation,S,U,J,oe,B,$,pl,c,[ne.route.id,ht]);Yr.filter(Tt=>Tt.key!==V).forEach(Tt=>{let ys=Tt.key,u0=j.fetchers.get(ys),vP=Cl(void 0,u0?u0.data:void 0);j.fetchers.set(ys,vP),F.has(ys)&&ct(ys),Tt.controller&&F.set(ys,Tt.controller)}),Ae({fetchers:new Map(j.fetchers)});let _u=()=>Yr.forEach(Tt=>ct(Tt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await be(j.matches,Js,Fi,Yr,Bt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),Yr.forEach(Tt=>F.delete(Tt.key));let Je=Ow([...Su,...ku]);if(Je){if(Je.idx>=Fi.length){let Tt=Yr[Je.idx-Fi.length].key;$.add(Tt)}return Q(Bt,Je.result)}let{loaderData:zt,errors:Fn}=Pw(j,j.matches,Fi,Su,void 0,Yr,ku,ie);if(j.fetchers.has(V)){let Tt=ro(ht.data);j.fetchers.set(V,Tt)}ir(Li),j.navigation.state==="loading"&&Li>I?(tt(T,"Expected pending action"),A&&A.abort(),ot(j.navigation.location,{matches:Js,loaderData:zt,errors:Fn,fetchers:new Map(j.fetchers)})):(Ae({errors:Fn,loaderData:Rw(j.loaderData,zt,Js,Fn),fetchers:new Map(j.fetchers)}),S=!1)}async function K(V,H,q,ne,Ce,De,We,pe){let qe=j.fetchers.get(V);Ue(V,Cl(pe,qe?qe.data:void 0),{flushSync:We});let ze=new AbortController,$e=Ui(e.history,q,ze.signal);if(De){let ht=await bu(Ce,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:ln}=Kr(q,ht);Nt(V,H,ln,{flushSync:We});return}else if(ht.matches)Ce=ht.matches,ne=Fl(Ce,q);else{Nt(V,H,bn(404,{pathname:q}),{flushSync:We});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],Ce))[0];if(Xo(xt)&&(xt=await BS(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(oe.has(V)){Ue(V,ro(void 0));return}if(Qo(xt))if(I>yt){Ue(V,ro(void 0));return}else{$.add(V),await Q($e,xt);return}if(Bn(xt)){Nt(V,H,xt.error);return}tt(!Xo(xt),"Unhandled fetcher deferred data"),Ue(V,ro(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:Ce,replace:De}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let We=H.response.headers.get("Location");tt(We,"Expected a Location header on the redirect Response"),We=Nw(We,new URL(V.url),c);let pe=bc(j.location,We,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(tv.test(We)){const ht=e.history.createURL(We);xt=ht.origin!==t.location.origin||el(ht.pathname,c)==null}if(xt){De?t.location.replace(We):t.location.assign(We);return}}A=null;let qe=De===!0?Wt.Replace:Wt.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!Ce&&ze&&$e&&yt&&(ne=Mw(j.navigation));let pt=ne||Ce;if(xD.has(H.response.status)&&pt&&jr(pt.formMethod))await G(qe,pe,{submission:Dt({},pt,{formAction:We}),preventScrollReset:R});else{let xt=Bm(pe,ne);await G(qe,pe,{overrideNavigation:xt,fetcherSubmission:Ce,preventScrollReset:R})}}async function te(V,H,q,ne){try{let Ce=await ND(u,V,H,q,ne,o,s);return await Promise.all(Ce.map((De,We)=>{if(ID(De)){let pe=De.result;return{type:wt.redirect,response:RD(pe,H,q[We].route.id,ne,c,f.v7_relativeSplatPath)}}return PD(De)}))}catch(Ce){return q.map(()=>({type:wt.error,error:Ce}))}}async function be(V,H,q,ne,Ce){let[De,...We]=await Promise.all([q.length?te("loader",Ce,q,H):[],...ne.map(pe=>{if(pe.matches&&pe.match&&pe.controller){let qe=Ui(e.history,pe.path,pe.controller.signal);return te("loader",qe,[pe.match],pe.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:bn(404,{pathname:pe.path})})})]);return await Promise.all([Iw(V,q,De,De.map(()=>Ce.signal),!1,j.loaderData),Iw(V,ne.map(pe=>pe.match),We,ne.map(pe=>pe.controller?pe.controller.signal:null),!0)]),{loaderResults:De,fetcherResults:We}}function Ye(){S=!0,U.push(...Qs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),ct(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Ae({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Nt(V,H,q,ne){ne===void 0&&(ne={});let Ce=fa(j.matches,H);Yt(V),Ae({errors:{[Ce.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function or(V){return f.v7_fetcherPersist&&(ve.set(V,(ve.get(V)||0)+1),oe.has(V)&&oe.delete(V)),j.fetchers.get(V)||wD}function Yt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&ct(V),B.delete(V),X.delete(V),$.delete(V),oe.delete(V),j.fetchers.delete(V)}function ms(V){if(f.v7_fetcherPersist){let H=(ve.get(V)||0)-1;H<=0?(ve.delete(V),oe.add(V)):ve.set(V,H)}else Yt(V);Ae({fetchers:new Map(j.fetchers)})}function ct(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function ps(V){for(let H of V){let q=or(H),ne=ro(q.data);j.fetchers.set(H,ne)}}function gs(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return ps(V),H}function ir(V){let H=[];for(let[q,ne]of X)if(ne<V){let Ce=j.fetchers.get(q);tt(Ce,"Expected fetcher: "+q),Ce.state==="loading"&&(ct(q),X.delete(q),H.push(q))}return ps(H),H.length>0}function vu(V,H){let q=j.blockers.get(V)||kl;return Ie.get(V)!==H&&Ie.set(V,H),q}function xu(V){j.blockers.delete(V),Ie.delete(V)}function Ii(V,H){let q=j.blockers.get(V)||kl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Ae({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Ie.size===0)return;Ie.size>1&&pi(!1,"A router only supports one blocker at a time");let Ce=Array.from(Ie.entries()),[De,We]=Ce[Ce.length-1],pe=j.blockers.get(De);if(!(pe&&pe.state==="proceeding")&&We({currentLocation:H,nextLocation:q,historyAction:ne}))return De}function Mi(V){let H=bn(404,{pathname:V}),q=l||i,{matches:ne,route:Ce}=Dw(q);return Qs(),{notFoundMatches:ne,route:Ce,error:H}}function Kr(V,H){return{boundaryId:fa(H.partialMatches).route.id,error:bn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function Qs(V){let H=[];return ie.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),ie.delete(ne))}),H}function mP(V,H,q){if(x=V,v=H,m=q||null,!g&&j.navigation===Vm){g=!0;let ne=c0(j.location,j.matches);ne!=null&&Ae({restoreScrollPosition:ne})}return()=>{x=null,v=null,m=null}}function l0(V,H){return m&&m(V,H.map(ne=>XA(ne,j.loaderData)))||V.key}function pP(V,H){if(x&&v){let q=l0(V,H);x[q]=v()}}function c0(V,H){if(x){let q=l0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function mm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:gd(H,q,c,!0)}}else return{active:!0,matches:gd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,Ce=ne.length>0?ne[ne.length-1].route:null;for(;;){let De=l==null,We=l||i;try{await jD(d,H,ne,We,o,s,xe,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{De&&(i=[...i])}if(q.aborted)return{type:"aborted"};let pe=Yo(We,H,c),qe=!1;if(pe){let $e=pe[pe.length-1].route;if($e.index)return{type:"success",matches:pe};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:pe}}let ze=gd(We,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?pe:null};if(ne=ze,Ce=ne[ne.length-1].route,Ce.path==="*")return{type:"success",matches:ne}}}function gP(V){o={},l=_c(V,s,void 0,o)}function yP(V,H){let q=l==null;$S(V,H,l||i,o,s),q&&(i=[...i],Ae({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Pe,subscribe:Me,enableScrollRestoration:mP,navigate:E,fetch:Y,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:or,deleteFetcher:ms,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:yP,_internalFetchControllers:F,_internalActiveDeferreds:ie,_internalSetRoutes:gP},C}function SD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hg(e,t,n,r,s,o,i,l){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=oh(s||".",sh(c,o),el(e.pathname,n)||e.pathname,l==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!nv(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Rs([n,d.pathname])),gi(d)}function kw(e,t,n,r){if(!r||!SD(r))return{path:n};if(r.formMethod&&!LD(r.formMethod))return{path:n,error:bn(405,{method:r.formMethod})};let s=()=>({path:n,error:bn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=US(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!jr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,x)=>{let[m,v]=x;return""+p+m+"="+v+`
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!jr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=mg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=mg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=Tw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=Tw(c)}catch{return s()}let d={formMethod:i,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(jr(d.formMethod))return{path:n,submission:d};let f=Hs(n);return t&&f.search&&nv(f.search)&&c.append("index",""),f.search="?"+c,{path:gi(f),submission:d}}function kD(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Cw(e,t,n,r,s,o,i,l,c,u,d,f,h,p,x,m){let v=m?Bn(m[1])?m[1].error:m[1].data:void 0,g=e.createURL(t.location),w=e.createURL(s),b=m&&Bn(m[1])?m[0]:void 0,_=b?kD(n,b):n,C=m?m[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,O)=>{let{route:Z}=A;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(o)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(CD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return jw(A,Dt({currentUrl:g,currentParams:N.params,nextUrl:w,nextParams:z.params},r,{actionResult:v,actionStatus:C,defaultShouldRevalidate:j?!1:l||g.pathname+g.search===w.pathname+w.search||g.search!==w.search||FS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let Z=Yo(p,A.path,x);if(!Z){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Fl(Z,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=l:S=jw(z,Dt({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:C,defaultShouldRevalidate:j?!1:l})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:Z,match:z,controller:new AbortController})}),[T,R]}function CD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function FS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function jw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function jD(e,t,n,r,s,o,i,l){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{l.aborted||$S(d,f,r,s,o)}}),i.set(c,u)),u&&OD(u)&&await u}finally{i.delete(c)}}function $S(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let l=_c(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...l):i.children=l}else{let i=_c(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function Ew(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";pi(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!GA.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,Dt({},t(s),{lazy:void 0}))}function ED(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ND(e,t,n,r,s,o,i,l){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return Dt({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?TD(t,n,f,o,i,x,l):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:l});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function TD(e,t,n,r,s,o,i){let l,c,u=d=>{let f,h=new Promise((m,v)=>f=v);c=()=>f(),t.signal.addEventListener("abort",c);let p=m=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...m!==void 0?[m]:[]),x;return o?x=o(m=>p(m)):x=(async()=>{try{return{type:"data",result:await p()}}catch(m){return{type:"error",result:m}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(p=>{f=p}),Ew(n.route,s,r)]);if(f!==void 0)throw f;l=h}else if(await Ew(n.route,s,r),d=n.route[e],d)l=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw bn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)l=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw bn(404,{pathname:h})}tt(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function PD(e){let{result:t,type:n,status:r}=e;if(VS(t)){let i;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(l){return{type:wt.error,error:l}}return n===wt.error?{type:wt.error,error:new ev(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ih(t)?t.status:r};if(MD(t)){var s,o;return{type:wt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:wt.data,data:t,statusCode:r}}function RD(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!tv.test(i)){let l=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=hg(new URL(t.url),l,s,!0,i,o),e.headers.set("Location",i)}return e}function Nw(e,t,n){if(tv.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=el(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Ui(e,t,n,r){let s=e.createURL(US(t)).toString(),o={signal:n};if(r&&jr(r.formMethod)){let{formMethod:i,formEncType:l}=r;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(r.json)):l==="text/plain"?o.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?o.body=mg(r.formData):o.body=r.formData}return new Request(s,o)}function mg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Tw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function AD(e,t,n,r,s,o){let i={},l=null,c,u=!1,d={},f=r&&Bn(r[1])?r[1].error:void 0;return n.forEach((h,p)=>{let x=t[p].route.id;if(tt(!Qo(h),"Cannot handle redirect results in processLoaderData"),Bn(h)){let m=h.error;f!==void 0&&(m=f,f=void 0),l=l||{};{let v=fa(e,x);l[v.route.id]==null&&(l[v.route.id]=m)}i[x]=void 0,u||(u=!0,c=ih(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else Xo(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(l={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:d}}function Pw(e,t,n,r,s,o,i,l){let{loaderData:c,errors:u}=AD(t,n,r,s,l);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:p}=o[d];tt(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(p&&p.signal.aborted))if(Bn(x)){let m=fa(e.matches,h==null?void 0:h.route.id);u&&u[m.route.id]||(u=Dt({},u,{[m.route.id]:x.error})),e.fetchers.delete(f)}else if(Qo(x))tt(!1,"Unhandled fetcher revalidation redirect");else if(Xo(x))tt(!1,"Unhandled fetcher deferred data");else{let m=ro(x.data);e.fetchers.set(f,m)}}return{loaderData:c,errors:u}}function Rw(e,t,n,r){let s=Dt({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function Aw(e){return e?Bn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function fa(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Dw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function bn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",c='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new ev(e||500,l,new Error(c),!0)}function Ow(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Qo(n))return{result:n,idx:t}}}function US(e){let t=typeof e=="string"?Hs(e):e;return gi(Dt({},t,{hash:""}))}function DD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function OD(e){return typeof e=="object"&&e!=null&&"then"in e}function ID(e){return VS(e.result)&&vD.has(e.result.status)}function Xo(e){return e.type===wt.deferred}function Bn(e){return e.type===wt.error}function Qo(e){return(e&&e.type)===wt.redirect}function MD(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 VS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function LD(e){return yD.has(e.toLowerCase())}function jr(e){return pD.has(e.toLowerCase())}async function Iw(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let l=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!FS(u,c)&&(o&&o[c.route.id])!==void 0;if(Xo(l)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await BS(l,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function BS(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function nv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Fl(e,t){let n=typeof t=="string"?Hs(t).search:t.search;if(e[e.length-1].route.index&&nv(n||""))return e[e.length-1];let r=MS(e);return r[r.length-1]}function Mw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Bm(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 zD(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 Cl(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 FD(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 ro(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 $D(e,t){try{let n=e.sessionStorage.getItem(zS);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function UD(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(zS,JSON.stringify(n))}catch(r){pi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
* React Router v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Qd(){return Qd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qd.apply(this,arguments)}const ah=y.createContext(null),WS=y.createContext(null),$o=y.createContext(null),rv=y.createContext(null),Ks=y.createContext({outlet:null,matches:[],isDataRoute:!1}),HS=y.createContext(null);function VD(e,t){let{relative:n}=t===void 0?{}:t;tl()||tt(!1);let{basename:r,navigator:s}=y.useContext($o),{hash:o,pathname:i,search:l}=YS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Rs([r,i])),s.createHref({pathname:c,search:l,hash:o})}function tl(){return y.useContext(rv)!=null}function Br(){return tl()||tt(!1),y.useContext(rv).location}function KS(e){y.useContext($o).static||y.useLayoutEffect(e)}function rr(){let{isDataRoute:e}=y.useContext(Ks);return e?nO():BD()}function BD(){tl()||tt(!1);let e=y.useContext(ah),{basename:t,future:n,navigator:r}=y.useContext($o),{matches:s}=y.useContext(Ks),{pathname:o}=Br(),i=JSON.stringify(sh(s,n.v7_relativeSplatPath)),l=y.useRef(!1);return KS(()=>{l.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=oh(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Rs([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const WD=y.createContext(null);function HD(e){let t=y.useContext(Ks).outlet;return t&&y.createElement(WD.Provider,{value:e},t)}function YS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext($o),{matches:s}=y.useContext(Ks),{pathname:o}=Br(),i=JSON.stringify(sh(s,r.v7_relativeSplatPath));return y.useMemo(()=>oh(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function KD(e,t,n,r){tl()||tt(!1);let{navigator:s}=y.useContext($o),{matches:o}=y.useContext(Ks),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Br(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let m=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=Yo(e,{pathname:h});return XD(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:Rs([c,s.encodeLocation?s.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:Rs([c,s.encodeLocation?s.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r)}function YD(){let e=tO(),t=ih(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=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),n?y.createElement("pre",{style:s},n):null,null)}const ZD=y.createElement(YD,null);class GD 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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ks.Provider,{value:this.props.routeContext},y.createElement(HS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function qD(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(ah);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ks.Provider,{value:t},r)}function XD(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let p,x=!1,m=null,v=null;n&&(p=l&&f.route.id?l[f.route.id]:void 0,m=f.route.errorElement||ZD,c&&(u<0&&h===0?(rO("route-fallback"),x=!0,v=null):u===h&&(x=!0,v=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),w=()=>{let b;return p?b=m:x?b=v:f.route.Component?b=y.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,y.createElement(qD,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(GD,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):w()},null)}var ZS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ZS||{}),Jd=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}(Jd||{});function QD(e){let t=y.useContext(ah);return t||tt(!1),t}function JD(e){let t=y.useContext(WS);return t||tt(!1),t}function eO(e){let t=y.useContext(Ks);return t||tt(!1),t}function GS(e){let t=eO(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function tO(){var e;let t=y.useContext(HS),n=JD(Jd.UseRouteError),r=GS(Jd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function nO(){let{router:e}=QD(ZS.UseNavigateStable),t=GS(Jd.UseNavigateStable),n=y.useRef(!1);return KS(()=>{n.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Qd({fromRouteId:t},o)))},[e,t])}const Lw={};function rO(e,t,n){Lw[e]||(Lw[e]=!0)}function qS(e){let{to:t,replace:n,state:r,relative:s}=e;tl()||tt(!1);let{future:o,static:i}=y.useContext($o),{matches:l}=y.useContext(Ks),{pathname:c}=Br(),u=rr(),d=oh(t,sh(l,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function sv(e){return HD(e.context)}function sO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:l}=e;tl()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:o,static:i,future:Qd({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof r=="string"&&(r=Hs(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:x="default"}=r,m=y.useMemo(()=>{let v=el(d,c);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:x},navigationType:s}},[c,d,f,h,p,x,s]);return m==null?null:y.createElement($o.Provider,{value:u},y.createElement(rv.Provider,{children:n,value:m}))}new Promise(()=>{});function oO(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.25.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sc.apply(this,arguments)}function iO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function aO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lO(e,t){return e.button===0&&(!t||t==="_self")&&!aO(e)}function pg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function cO(e,t){let n=pg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const uO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],dO="6";try{window.__reactRouterVersion=dO}catch{}function fO(e,t){return _D({basename:void 0,future:Sc({},void 0,{v7_prependBasename:!0}),history:KA({window:void 0}),hydrationData:hO(),routes:e,mapRouteProperties:oO,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function hO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Sc({},t,{errors:mO(t.errors)})),t}function mO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new ev(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const pO=y.createContext({isTransitioning:!1}),gO=y.createContext(new Map),yO="startTransition",zw=P_[yO],vO="flushSync",Fw=HA[vO];function xO(e){zw?zw(e):e()}function jl(e){Fw?Fw(e):e()}class wO{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function bO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=y.useState(n.state),[i,l]=y.useState(),[c,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[h,p]=y.useState(),[x,m]=y.useState(),v=y.useRef(new Map),{v7_startTransition:g}=r||{},w=y.useCallback(R=>{g?xO(R):R()},[g]),b=y.useCallback((R,A)=>{let{deletedFetchers:O,unstable_flushSync:Z,unstable_viewTransitionOpts:N}=A;O.forEach(S=>v.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&v.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){Z?jl(()=>o(R)):w(()=>o(R));return}if(Z){jl(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{jl(()=>o(R))});S.finished.finally(()=>{jl(()=>{f(void 0),p(void 0),l(void 0),u({isTransitioning:!1})})}),jl(()=>p(S));return}h?(d&&d.resolve(),h.skipTransition(),m({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(l(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,v,w]);y.useLayoutEffect(()=>n.subscribe(b),[n,b]),y.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new wO)},[c]),y.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,O=n.window.document.startViewTransition(async()=>{w(()=>o(R)),await A});O.finished.finally(()=>{f(void 0),p(void 0),l(void 0),u({isTransitioning:!1})}),p(O)}},[w,i,d,n.window]),y.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),y.useEffect(()=>{!c.isTransitioning&&x&&(l(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),m(void 0))},[c.isTransitioning,x]),y.useEffect(()=>{},[]);let _=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,O)=>n.navigate(R,{state:A,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,A,O)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",j=y.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(ah.Provider,{value:j},y.createElement(WS.Provider,{value:s},y.createElement(gO.Provider,{value:v.current},y.createElement(pO.Provider,{value:c},y.createElement(sO,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?y.createElement(_O,{routes:n.routes,future:n.future,state:s}):t))))),null)}const _O=y.memo(SO);function SO(e){let{routes:t,future:n,state:r}=e;return KD(t,void 0,r,n)}const kO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_n=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=iO(t,uO),{basename:p}=y.useContext($o),x,m=!1;if(typeof u=="string"&&CO.test(u)&&(x=u,kO))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=el(_.pathname,p);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:m=!0}catch{}let v=VD(u,{relative:s}),g=jO(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function w(b){r&&r(b),b.defaultPrevented||g(b)}return y.createElement("a",Sc({},h,{href:x||v,onClick:m||o?r:w,ref:n,target:c}))});var $w;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($w||($w={}));var Uw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uw||(Uw={}));function jO(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=rr(),u=Br(),d=YS(e,{relative:i});return y.useCallback(f=>{if(lO(f,n)){f.preventDefault();let h=r!==void 0?r:gi(u)===gi(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:l})}},[u,c,d,r,s,n,e,o,i,l])}function EO(e){let t=y.useRef(pg(e)),n=y.useRef(!1),r=Br(),s=y.useMemo(()=>cO(r.search,n.current?null:t.current),[r.search]),o=rr(),i=y.useCallback((l,c)=>{const u=pg(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var NO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const TO=Uf(NO);var PO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Vw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(TO[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(PO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),l=[i,""];i.indexOf("=")>-1&&(l=i.split("=")),t.attrs[l[0]]=l[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var RO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,AO=/^\s*$/,DO=Object.create(null);function XS(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(XS,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var OO={parse:function(e,t){t||(t={}),t.components||(t.components=DO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var l=e.indexOf("<");r.push({type:"text",content:l===-1?e:e.substring(0,l)})}return e.replace(RO,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),p=u+c.length,x=e.charAt(p);if(h){var m=Vw(c);return o<0?(r.push(m),r):((d=s[o]).children.push(m),r)}if(f&&(o++,(n=Vw(c)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!x||x==="<"||n.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),o===0&&r.push(n),(d=s[o-1])&&d.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&x!=="<"&&x)){d=o===-1?r:s[o].children;var v=e.indexOf("<",p),g=e.slice(p,v===-1?void 0:v);AO.test(g)&&(g=" "),(v>-1&&o+d.length>=0||g!==" ")&&d.push({type:"text",content:g})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+XS("",n)},"")}};const yd=(...e)=>{console!=null&&console.warn&&(fr(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},Bw={},ef=(...e)=>{fr(e[0])&&Bw[e[0]]||(fr(e[0])&&(Bw[e[0]]=new Date),yd(...e))},QS=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Ww=(e,t,n)=>{e.loadNamespaces(t,QS(e,n))},Hw=(e,t,n,r)=>{fr(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,QS(e,r))},IO=(e,t,n={})=>!t.languages||!t.languages.length?(ef("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),fr=e=>typeof e=="string",ha=e=>typeof e=="object"&&e!==null,MO=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,LO={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zO=e=>LO[e],FO=e=>e.replace(MO,zO);let gg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:FO};const $O=(e={})=>{gg={...gg,...e}},JS=()=>gg;let ek;const UO=e=>{ek=e},ov=()=>ek,Wm=(e,t)=>{var r;if(!e)return!1;const n=((r=e.props)==null?void 0:r.children)??e.children;return t?n.length>0:!!n},Hm=e=>{var n,r;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(r=e.props)!=null&&r.i18nIsDynamicList?ma(t):t},VO=e=>Array.isArray(e)&&e.every(y.isValidElement),ma=e=>Array.isArray(e)?e:[e],BO=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},tk=(e,t)=>{if(!e)return"";let n="";const r=ma(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(fr(o))n+=`${o}`;else if(y.isValidElement(o)){const{props:l,type:c}=o,u=Object.keys(l).length,d=s.indexOf(c)>-1,f=l.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||l.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&fr(f))n+=`<${c}>${f}</${c}>`;else{const h=tk(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)yd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(ha(o)){const{format:l,...c}=o,u=Object.keys(c);if(u.length===1){const d=l?`${u[0]}, ${l}`:u[0];n+=`{{${d}}}`}else yd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else yd("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n},WO=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(i.map(v=>`<${v}`).join("|")).test(t);if(!e&&!l&&!o)return[t];const c={},u=v=>{ma(v).forEach(w=>{fr(w)||(Wm(w)?u(Hm(w)):ha(w)&&!y.isValidElement(w)&&Object.assign(c,w))})};u(e);const d=OO.parse(`<0>${t}</0>`),f={...c,...s},h=(v,g,w)=>{var C;const b=Hm(v),_=x(b,g.children,w);return VO(b)&&_.length===0||(C=v.props)!=null&&C.i18nIsDynamicList?b:_},p=(v,g,w,b,_)=>{v.dummy?(v.children=g,w.push(y.cloneElement(v,{key:b},_?void 0:g))):w.push(...y.Children.map([v],C=>{const j={...C.props};return delete j.i18nIsDynamicList,y.createElement(C.type,{...j,key:b,ref:C.ref},_?null:g)}))},x=(v,g,w)=>{const b=ma(v);return ma(g).reduce((C,j,T)=>{var A,O;const R=((O=(A=j.children)==null?void 0:A[0])==null?void 0:O.content)&&n.services.interpolator.interpolate(j.children[0].content,f,n.language);if(j.type==="tag"){let Z=b[parseInt(j.name,10)];w.length===1&&!Z&&(Z=w[0][j.name]),Z||(Z={});const N=Object.keys(j.attrs).length!==0?BO({props:j.attrs},Z):Z,z=y.isValidElement(N),S=z&&Wm(j,!0)&&!j.voidElement,U=l&&ha(N)&&N.dummy&&!z,J=ha(e)&&Object.hasOwnProperty.call(e,j.name);if(fr(N)){const F=n.services.interpolator.interpolate(N,f,n.language);C.push(F)}else if(Wm(N)||S){const F=h(N,j,w);p(N,F,C,T)}else if(U){const F=x(b,j.children,w);p(N,F,C,T)}else if(Number.isNaN(parseFloat(j.name)))if(J){const F=h(N,j,w);p(N,F,C,T,j.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(j.name)>-1)if(j.voidElement)C.push(y.createElement(j.name,{key:`${j.name}-${T}`}));else{const F=x(b,j.children,w);C.push(y.createElement(j.name,{key:`${j.name}-${T}`},F))}else if(j.voidElement)C.push(`<${j.name} />`);else{const F=x(b,j.children,w);C.push(`<${j.name}>${F}</${j.name}>`)}else if(ha(N)&&!z){const F=j.children[0]?R:null;F&&C.push(F)}else p(N,R,C,T,j.children.length!==1||!R)}else if(j.type==="text"){const Z=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(j.content,f,n.language)):n.services.interpolator.interpolate(j.content,f,n.language);Z?C.push(y.createElement(Z,{key:`${j.name}-${T}`},N)):C.push(N)}return C},[])},m=x([{dummy:!0,children:e||[]}],d,ma(e||[]));return Hm(m[0])};function HO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var Z,N,z,S,U,J;const x=d||ov();if(!x)return ef("You will need to pass in an i18next instance by using i18nextReactModule"),e;const m=f||x.t.bind(x)||(F=>F),v={...JS(),...(Z=x.options)==null?void 0:Z.react};let g=u||m.ns||((N=x.options)==null?void 0:N.defaultNS);g=fr(g)?[g]:g||["translation"];const w=tk(e,v),b=l||w||v.transEmptyNodeValue||r,{hashTransKey:_}=v,C=r||(_?_(w||b):w||b);(S=(z=x.options)==null?void 0:z.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const j=i||t!==void 0&&!((J=(U=x.options)==null?void 0:U.interpolation)!=null&&J.alwaysFormat)||!e?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},T={...o,context:s||o.context,count:t,...i,...j,defaultValue:b,ns:g},R=C?m(C,T):b;c&&Object.keys(c).forEach(F=>{const W=c[F];if(typeof W.type=="function"||!W.props||!W.props.children||R.indexOf(`${F}/>`)<0&&R.indexOf(`${F} />`)<0)return;function I(){return y.createElement(y.Fragment,null,W)}c[F]=y.createElement(I)});const A=WO(c||e,R,x,v,T,h),O=n??v.defaultTransParent;return O?y.createElement(O,p,A):A}const KO={type:"3rdParty",init(e){$O(e.options.react),UO(e)}},nk=y.createContext();class YO{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function ZO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var w;const{i18n:x,defaultNS:m}=y.useContext(nk)||{},v=d||x||ov(),g=f||(v==null?void 0:v.t.bind(v));return HO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:l,components:c,ns:u||(g==null?void 0:g.ns)||m||((w=v==null?void 0:v.options)==null?void 0:w.defaultNS),i18n:v,t:f,shouldUnescape:h,...p})}const GO=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},rk=(e,t,n,r)=>e.getFixedT(t,n,r),qO=(e,t,n,r)=>y.useCallback(rk(e,t,n,r),[e,t,n,r]),Ve=(e,t={})=>{var _,C,j,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=y.useContext(nk)||{},o=n||r||ov();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new YO),!o){ef("You will need to pass in an i18next instance by using initReactI18next");const R=(O,Z)=>fr(Z)?Z:ha(Z)&&fr(Z.defaultValue)?Z.defaultValue:Array.isArray(O)?O[O.length-1]:O,A=[R,{},!1];return A.t=R,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&ef("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...JS(),...o.options.react,...t},{useSuspense:l,keyPrefix:c}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=fr(u)?[u]:u||["translation"],(T=(j=o.reportNamespaces).addUsedNamespaces)==null||T.call(j,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(R=>IO(R,o,i)),f=qO(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,p=()=>rk(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,m]=y.useState(h);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const g=GO(v),w=y.useRef(!0);y.useEffect(()=>{const{bindI18n:R,bindI18nStore:A}=i;w.current=!0,!d&&!l&&(t.lng?Hw(o,t.lng,u,()=>{w.current&&m(p)}):Ww(o,u,()=>{w.current&&m(p)})),d&&g&&g!==v&&w.current&&m(p);const O=()=>{w.current&&m(p)};return R&&(o==null||o.on(R,O)),A&&(o==null||o.store.on(A,O)),()=>{w.current=!1,o&&(R==null||R.split(" ").forEach(Z=>o.off(Z,O))),A&&o&&A.split(" ").forEach(Z=>o.store.off(Z,O))}},[o,v]),y.useEffect(()=>{w.current&&d&&m(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!l)return b;throw new Promise(R=>{t.lng?Hw(o,t.lng,u,()=>R()):Ww(o,u,()=>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 XO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sk=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).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 QO={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 JO=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...l},c)=>y.createElement("svg",{ref:c,...QO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sk("lucide",s),...l},[...i.map(([u,d])=>y.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const at=(e,t)=>{const n=y.forwardRef(({className:r,...s},o)=>y.createElement(JO,{ref:o,iconNode:t,className:sk(`lucide-${XO(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
* @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 eI=at("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 tI=at("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 nI=at("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 ok=at("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 iv=at("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 ik=at("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 rI=at("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 sI=at("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
* @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 oI=at("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 iI=at("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 Kw=at("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 ak=at("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 yg=at("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 aI=at("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 Yw=at("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 Zw=at("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 Gw=at("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 lI=at("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cI=at("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 uI=at("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
* @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 dI=at("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 fI=at("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hI=at("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 mI=at("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 yi=at("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 qw=at("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 pI=at("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["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 lk=at("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 av=at("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @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 gI=at("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 yI=at("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 lv=at("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @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 vI=at("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cv=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function xI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lh(...e){return t=>e.forEach(n=>xI(n,t))}function Ze(...e){return y.useCallback(lh(...e),e)}var is=y.forwardRef((e,t)=>{const{children:n,...r}=e,s=y.Children.toArray(n),o=s.find(wI);if(o){const i=o.props.children,l=s.map(c=>c===o?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:c);return a.jsx(vg,{...r,ref:t,children:y.isValidElement(i)?y.cloneElement(i,void 0,l):null})}return a.jsx(vg,{...r,ref:t,children:n})});is.displayName="Slot";var vg=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const s=_I(n);return y.cloneElement(n,{...bI(r,n.props),ref:t?lh(t,s):s})}return y.Children.count(n)>1?y.Children.only(null):null});vg.displayName="SlotClone";var uv=({children:e})=>a.jsx(a.Fragment,{children:e});function wI(e){return y.isValidElement(e)&&e.type===uv}function bI(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{o(...l),s(...l)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function _I(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ck(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ck(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function SI(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ck(e))&&(r&&(r+=" "),r+=t);return r}const Xw=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Qw=SI,eu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Qw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const h=Xw(d)||Xw(f);return s[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(x=>{let[m,v]=x;return Array.isArray(v)?v.includes({...o,...l}[m]):{...o,...l}[m]===v})?[...u,f,h]:u},[]);return Qw(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function uk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=uk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kI(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=uk(e))&&(r&&(r+=" "),r+=t);return r}const dv="-";function CI(e){const t=EI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const l=i.split(dv);return l[0]===""&&l.length!==1&&l.shift(),dk(l,t)||jI(i)}function o(i,l){const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function dk(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?dk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(dv);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId}const Jw=/^\[(.+)\]$/;function jI(e){if(Jw.test(e)){const t=Jw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function EI(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return TI(Object.entries(e.classGroups),n).forEach(([o,i])=>{xg(i,r,o,t)}),r}function xg(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:eb(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(NI(s)){xg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{xg(i,eb(t,o),n,r)})})}function eb(e,t){let n=e;return t.split(dv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function NI(e){return e.isThemeGetter}function TI(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[n,s]}):e}function PI(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const fk="!";function RI(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(l){const c=[];let u=0,d=0,f;for(let v=0;v<l.length;v++){let g=l[v];if(u===0){if(g===s&&(r||l.slice(v,v+o)===t)){c.push(l.slice(d,v)),d=v+o;continue}if(g==="/"){f=v;continue}}g==="["?u++:g==="]"&&u--}const h=c.length===0?l:l.substring(d),p=h.startsWith(fk),x=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:m}}return n?function(c){return n({className:c,parseClassName:i})}:i}function AI(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function DI(e){return{cache:PI(e.cacheSize),parseClassName:RI(e),...CI(e)}}const OI=/\s+/;function II(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(OI).map(i=>{const{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,h=r(f?u.substring(0,d):u);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const p=AI(l).join(":");return{isTailwindClass:!0,modifierId:c?p+fk:p,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:u}=i,d=l+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(l+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function MI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hk(t))&&(r&&(r+=" "),r+=n);return r}function hk(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hk(e[r]))&&(n&&(n+=" "),n+=t);return n}function LI(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=DI(u),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=II(c,n);return s(c,d),d}return function(){return o(MI.apply(null,arguments))}}function St(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const mk=/^\[(?:([a-z-]+):)?(.+)\]$/i,zI=/^\d+\/\d+$/,FI=new Set(["px","full","screen"]),$I=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UI=/\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$/,VI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function vs(e){return Jo(e)||FI.has(e)||zI.test(e)}function to(e){return nl(e,"length",QI)}function Jo(e){return!!e&&!Number.isNaN(Number(e))}function Bu(e){return nl(e,"number",Jo)}function El(e){return!!e&&Number.isInteger(Number(e))}function HI(e){return e.endsWith("%")&&Jo(e.slice(0,-1))}function Xe(e){return mk.test(e)}function no(e){return $I.test(e)}const KI=new Set(["length","size","percentage"]);function YI(e){return nl(e,KI,pk)}function ZI(e){return nl(e,"position",pk)}const GI=new Set(["image","url"]);function qI(e){return nl(e,GI,eM)}function XI(e){return nl(e,"",JI)}function Nl(){return!0}function nl(e,t,n){const r=mk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function QI(e){return UI.test(e)&&!VI.test(e)}function pk(){return!1}function JI(e){return BI.test(e)}function eM(e){return WI.test(e)}function tM(){const e=St("colors"),t=St("spacing"),n=St("blur"),r=St("brightness"),s=St("borderColor"),o=St("borderRadius"),i=St("borderSpacing"),l=St("borderWidth"),c=St("contrast"),u=St("grayscale"),d=St("hueRotate"),f=St("invert"),h=St("gap"),p=St("gradientColorStops"),x=St("gradientColorStopPositions"),m=St("inset"),v=St("margin"),g=St("opacity"),w=St("padding"),b=St("saturate"),_=St("scale"),C=St("sepia"),j=St("skew"),T=St("space"),R=St("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto",Xe,t],N=()=>[Xe,t],z=()=>["",vs,to],S=()=>["auto",Jo,Xe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Xe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Jo,Bu],B=()=>[Jo,Xe];return{cacheSize:500,separator:":",theme:{colors:[Nl],spacing:[vs,to],blur:["none","",no,Xe],brightness:$(),borderColor:[e],borderRadius:["none","","full",no,Xe],borderSpacing:N(),borderWidth:z(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[HI,to],inset:Z(),margin:Z(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Xe]}],container:["container"],columns:[{columns:[no]}],"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:[...U(),Xe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",El,Xe]}],basis:[{basis:Z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",El,Xe]}],"grid-cols":[{"grid-cols":[Nl]}],"col-start-end":[{col:["auto",{span:["full",El,Xe]},Xe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Nl]}],"row-start-end":[{row:["auto",{span:[El,Xe]},Xe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xe,t]}],"min-w":[{"min-w":[Xe,t,"min","max","fit"]}],"max-w":[{"max-w":[Xe,t,"none","full","min","max","fit","prose",{screen:[no]},no]}],h:[{h:[Xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",no,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bu]}],"font-family":[{font:[Nl]}],"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",Xe]}],"line-clamp":[{"line-clamp":["none",Jo,Bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vs,Xe]}],"list-image":[{"list-image":["none",Xe]}],"list-style-type":[{list:["none","disc","decimal",Xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vs,to]}],"underline-offset":[{"underline-offset":["auto",vs,Xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xe]}],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",Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),ZI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:J()}],"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:["",...J()]}],"outline-offset":[{"outline-offset":[vs,Xe]}],"outline-w":[{outline:[vs,to]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[vs,to]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",no,XI]}],"shadow-color":[{shadow:[Nl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",no,Xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[El,Xe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xe]}],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",Xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vs,to,Bu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const nM=LI(tM);function re(...e){return nM(kI(e))}const ch=eu("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"}}),Te=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?is:"button";return a.jsx(i,{className:re(ch({variant:t,size:n,className:e})),ref:o,...s})});Te.displayName="Button";function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function rM(e,t){const n=y.createContext(t);function r(o){const{children:i,...l}=o,c=y.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})}function s(o){const i=y.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function fn(e,t=[]){let n=[];function r(o,i){const l=y.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:p,...x}=f,m=(h==null?void 0:h[e][c])||l,v=y.useMemo(()=>x,Object.values(x));return a.jsx(m.Provider,{value:v,children:p})}function d(f,h){const p=(h==null?void 0:h[e][c])||l,x=y.useContext(p);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>y.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,sM(s,...t)]}function sM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...l,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function It(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=oM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,l=It(n),c=y.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&l(f)}else s(u)},[o,e,s,l]);return[i,c]}function oM({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,s=y.useRef(r),o=It(t);return y.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var iM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=iM.reduce((e,t)=>{const n=y.forwardRef((r,s)=>{const{asChild:o,...i}=r,l=o?is:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fv(e,t){e&&Ws.flushSync(()=>e.dispatchEvent(t))}function tu(e){const t=e+"CollectionProvider",[n,r]=fn(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:x,children:m}=p,v=He.useRef(null),g=He.useRef(new Map).current;return a.jsx(s,{scope:x,itemMap:g,collectionRef:v,children:m})};i.displayName=t;const l=e+"CollectionSlot",c=He.forwardRef((p,x)=>{const{scope:m,children:v}=p,g=o(l,m),w=Ze(x,g.collectionRef);return a.jsx(is,{ref:w,children:v})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=He.forwardRef((p,x)=>{const{scope:m,children:v,...g}=p,w=He.useRef(null),b=Ze(x,w),_=o(u,m);return He.useEffect(()=>(_.itemMap.set(w,{ref:w,...g}),()=>void _.itemMap.delete(w))),a.jsx(is,{[d]:"",ref:b,children:v})});f.displayName=u;function h(p){const x=o(e+"CollectionConsumer",p);return He.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,C)=>g.indexOf(_.ref.current)-g.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var aM=y.createContext(void 0);function Ei(e){const t=y.useContext(aM);return e||t||"ltr"}function lM(e,t=globalThis==null?void 0:globalThis.document){const n=It(e);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cM="DismissableLayer",wg="dismissableLayer.update",uM="dismissableLayer.pointerDownOutside",dM="dismissableLayer.focusOutside",tb,gk=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rl=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=y.useContext(gk),[d,f]=y.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=y.useState({}),x=Ze(t,T=>f(T)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),w=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=w>=g,C=hM(T=>{const R=T.target,A=[...u.branches].some(O=>O.contains(R));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||l==null||l())},h),j=mM(T=>{const R=T.target;[...u.branches].some(O=>O.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},h);return lM(T=>{w===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),y.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),nb(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=tb)}},[d,h,n,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),nb())},[d,u]),y.useEffect(()=>{const T=()=>p({});return document.addEventListener(wg,T),()=>document.removeEventListener(wg,T)},[]),a.jsx(Re.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,j.onFocusCapture),onBlurCapture:de(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,C.onPointerDownCapture)})});rl.displayName=cM;var fM="DismissableLayerBranch",yk=y.forwardRef((e,t)=>{const n=y.useContext(gk),r=y.useRef(null),s=Ze(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(Re.div,{...e,ref:s})});yk.displayName=fM;function hM(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){vk(uM,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mM(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!r.current&&vk(dM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nb(){const e=new CustomEvent(wg);document.dispatchEvent(e)}function vk(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?fv(s,o):s.dispatchEvent(o)}var pM=rl,gM=yk,Km=0;function hv(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rb()),document.body.insertAdjacentElement("beforeend",e[1]??rb()),Km++,()=>{Km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Km--}},[])}function rb(){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 Ym="focusScope.autoFocusOnMount",Zm="focusScope.autoFocusOnUnmount",sb={bubbles:!1,cancelable:!0},yM="FocusScope",uh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=y.useState(null),u=It(s),d=It(o),f=y.useRef(null),h=Ze(t,m=>c(m)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(b){if(p.paused||!l)return;const _=b.target;l.contains(_)?f.current=_:so(f.current,{select:!0})},v=function(b){if(p.paused||!l)return;const _=b.relatedTarget;_!==null&&(l.contains(_)||so(f.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&so(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const w=new MutationObserver(g);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),w.disconnect()}}},[r,l,p.paused]),y.useEffect(()=>{if(l){ib.add(p);const m=document.activeElement;if(!l.contains(m)){const g=new CustomEvent(Ym,sb);l.addEventListener(Ym,u),l.dispatchEvent(g),g.defaultPrevented||(vM(SM(xk(l)),{select:!0}),document.activeElement===m&&so(l))}return()=>{l.removeEventListener(Ym,u),setTimeout(()=>{const g=new CustomEvent(Zm,sb);l.addEventListener(Zm,d),l.dispatchEvent(g),g.defaultPrevented||so(m??document.body,{select:!0}),l.removeEventListener(Zm,d),ib.remove(p)},0)}}},[l,u,d,p]);const x=y.useCallback(m=>{if(!n&&!r||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(v&&g){const w=m.currentTarget,[b,_]=xM(w);b&&_?!m.shiftKey&&g===_?(m.preventDefault(),n&&so(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&so(_,{select:!0})):g===w&&m.preventDefault()}},[n,r,p.paused]);return a.jsx(Re.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});uh.displayName=yM;function vM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(so(r,{select:t}),document.activeElement!==n)return}function xM(e){const t=xk(e),n=ob(t,e),r=ob(t.reverse(),e);return[n,r]}function xk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ob(e,t){for(const n of e)if(!wM(n,{upTo:t}))return n}function wM(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 bM(e){return e instanceof HTMLInputElement&&"select"in e}function so(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bM(e)&&t&&e.select()}}var ib=_M();function _M(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ab(e,t),e.unshift(t)},remove(t){var n;e=ab(e,t),(n=e[0])==null||n.resume()}}}function ab(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function SM(e){return e.filter(t=>t.tagName!=="A")}var an=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},kM=P_.useId||(()=>{}),CM=0;function Yn(e){const[t,n]=y.useState(kM());return an(()=>{e||n(r=>r??String(CM++))},[e]),e||(t?`radix-${t}`:"")}const jM=["top","right","bottom","left"],es=Math.min,Wn=Math.max,tf=Math.round,Wu=Math.floor,To=e=>({x:e,y:e}),EM={left:"right",right:"left",bottom:"top",top:"bottom"},NM={start:"end",end:"start"};function bg(e,t,n){return Wn(e,es(t,n))}function Fs(e,t){return typeof e=="function"?e(t):e}function $s(e){return e.split("-")[0]}function sl(e){return e.split("-")[1]}function mv(e){return e==="x"?"y":"x"}function pv(e){return e==="y"?"height":"width"}function Po(e){return["top","bottom"].includes($s(e))?"y":"x"}function gv(e){return mv(Po(e))}function TM(e,t,n){n===void 0&&(n=!1);const r=sl(e),s=gv(e),o=pv(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nf(i)),[i,nf(i)]}function PM(e){const t=nf(e);return[_g(e),t,_g(t)]}function _g(e){return e.replace(/start|end/g,t=>NM[t])}function RM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function AM(e,t,n,r){const s=sl(e);let o=RM($s(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(_g)))),o}function nf(e){return e.replace(/left|right|bottom|top/g,t=>EM[t])}function DM(e){return{top:0,right:0,bottom:0,left:0,...e}}function wk(e){return typeof e!="number"?DM(e):{top:e,right:e,bottom:e,left:e}}function rf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function lb(e,t,n){let{reference:r,floating:s}=e;const o=Po(t),i=gv(t),l=pv(i),c=$s(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[l]/2-s[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-s.width,y:f};break;default:p={x:r.x,y:r.y}}switch(sl(t)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}const OM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=lb(u,r,c),h=r,p={},x=0;for(let m=0;m<l.length;m++){const{name:v,fn:g}=l[m],{x:w,y:b,data:_,reset:C}=await g({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});d=w??d,f=b??f,p={...p,[v]:{...p[v],..._}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=lb(u,h,c)),m=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:p}};async function kc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Fs(t,e),x=wk(p),v=l[h?f==="floating"?"reference":"floating":f],g=rf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=rf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:b,strategy:c}):w);return{top:(g.top-C.top+x.top)/_.y,bottom:(C.bottom-g.bottom+x.bottom)/_.y,left:(g.left-C.left+x.left)/_.x,right:(C.right-g.right+x.right)/_.x}}const IM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Fs(e,t)||{};if(u==null)return{};const f=wk(d),h={x:n,y:r},p=gv(s),x=pv(p),m=await i.getDimensions(u),v=p==="y",g=v?"top":"left",w=v?"bottom":"right",b=v?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[p]-h[p]-o.floating[x],C=h[p]-o.reference[p],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=l.floating[b]||o.floating[x]);const R=_/2-C/2,A=T/2-m[x]/2-1,O=es(f[g],A),Z=es(f[w],A),N=O,z=T-m[x]-Z,S=T/2-m[x]/2+R,U=bg(N,S,z),J=!c.arrow&&sl(s)!=null&&S!==U&&o.reference[x]/2-(S<N?O:Z)-m[x]/2<0,F=J?S<N?S-N:S-z:0;return{[p]:h[p]+F,data:{[p]:U,centerOffset:S-U-F,...J&&{alignmentOffset:F}},reset:J}}}),MM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...v}=Fs(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=$s(s),w=Po(l),b=$s(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!m?[nf(l)]:PM(l)),j=x!=="none";!h&&j&&C.push(...AM(l,m,x,_));const T=[l,...C],R=await kc(t,v),A=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[g]),f){const S=TM(s,i,_);A.push(R[S[0]],R[S[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(S=>S<=0)){var Z,N;const S=(((Z=o.flip)==null?void 0:Z.index)||0)+1,U=T[S];if(U)return{data:{index:S,overflows:O},reset:{placement:U}};let J=(N=O.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(p){case"bestFit":{var z;const F=(z=O.filter(W=>{if(j){const I=Po(W.placement);return I===w||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:z[0];F&&(J=F);break}case"initialPlacement":J=l;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function cb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ub(e){return jM.some(t=>e[t]>=0)}const LM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Fs(e,t);switch(r){case"referenceHidden":{const o=await kc(t,{...s,elementContext:"reference"}),i=cb(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ub(i)}}}case"escaped":{const o=await kc(t,{...s,altBoundary:!0}),i=cb(o,n.floating);return{data:{escapedOffsets:i,escaped:ub(i)}}}default:return{}}}}};async function zM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=$s(n),l=sl(n),c=Po(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Fs(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof x=="number"&&(p=l==="end"?x*-1:x),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const FM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:l}=t,c=await zM(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},$M=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...c}=Fs(e,t),u={x:n,y:r},d=await kc(t,c),f=Po($s(s)),h=mv(f);let p=u[h],x=u[f];if(o){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=p+d[v],b=p-d[g];p=bg(w,p,b)}if(i){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",w=x+d[v],b=x-d[g];x=bg(w,x,b)}const m=l.fn({...t,[h]:p,[f]:x});return{...m,data:{x:m.x-n,y:m.y-r}}}}},UM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Fs(e,t),d={x:n,y:r},f=Po(s),h=mv(f);let p=d[h],x=d[f];const m=Fs(l,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+v.mainAxis,C=o.reference[h]+o.reference[b]-v.mainAxis;p<_?p=_:p>C&&(p=C)}if(u){var g,w;const b=h==="y"?"width":"height",_=["top","left"].includes($s(s)),C=o.reference[f]-o.floating[b]+(_&&((g=i.offset)==null?void 0:g[f])||0)+(_?0:v.crossAxis),j=o.reference[f]+o.reference[b]+(_?0:((w=i.offset)==null?void 0:w[f])||0)-(_?v.crossAxis:0);x<C?x=C:x>j&&(x=j)}return{[h]:p,[f]:x}}}},VM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...l}=Fs(e,t),c=await kc(t,l),u=$s(n),d=sl(n),f=Po(n)==="y",{width:h,height:p}=r.floating;let x,m;u==="top"||u==="bottom"?(x=u,m=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,x=d==="end"?"top":"bottom");const v=p-c.top-c.bottom,g=h-c.left-c.right,w=es(p-c[x],v),b=es(h-c[m],g),_=!t.middlewareData.shift;let C=w,j=b;if(f?j=d||_?es(b,g):g:C=d||_?es(w,v):v,_&&!d){const R=Wn(c.left,0),A=Wn(c.right,0),O=Wn(c.top,0),Z=Wn(c.bottom,0);f?j=h-2*(R!==0||A!==0?R+A:Wn(c.left,c.right)):C=p-2*(O!==0||Z!==0?O+Z:Wn(c.top,c.bottom))}await i({...t,availableWidth:j,availableHeight:C});const T=await s.getDimensions(o.floating);return h!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function ol(e){return bk(e)?(e.nodeName||"").toLowerCase():"#document"}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ys(e){var t;return(t=(bk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bk(e){return e instanceof Node||e instanceof Zn(e).Node}function Lr(e){return e instanceof Element||e instanceof Zn(e).Element}function as(e){return e instanceof HTMLElement||e instanceof Zn(e).HTMLElement}function db(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}function nu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function BM(e){return["table","td","th"].includes(ol(e))}function dh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function yv(e){const t=vv(),n=Lr(e)?zr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function WM(e){let t=Ro(e);for(;as(t)&&!Ua(t);){if(yv(t))return t;if(dh(t))return null;t=Ro(t)}return null}function vv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ua(e){return["html","body","#document"].includes(ol(e))}function zr(e){return Zn(e).getComputedStyle(e)}function fh(e){return Lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ro(e){if(ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||db(e)&&e.host||Ys(e);return db(t)?t.host:t}function _k(e){const t=Ro(e);return Ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:as(t)&&nu(t)?t:_k(t)}function Cc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_k(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Zn(s);return o?t.concat(i,i.visualViewport||[],nu(s)?s:[],i.frameElement&&n?Cc(i.frameElement):[]):t.concat(s,Cc(s,[],n))}function Sk(e){const t=zr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=as(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,l=tf(n)!==o||tf(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function xv(e){return Lr(e)?e:e.contextElement}function Ca(e){const t=xv(e);if(!as(t))return To(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Sk(t);let i=(o?tf(n.width):n.width)/r,l=(o?tf(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const HM=To(0);function kk(e){const t=Zn(e);return!vv()||!t.visualViewport?HM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zn(e)?!1:t}function vi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=xv(e);let i=To(1);t&&(r?Lr(r)&&(i=Ca(r)):i=Ca(e));const l=KM(o,n,r)?kk(o):To(0);let c=(s.left+l.x)/i.x,u=(s.top+l.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=Zn(o),p=r&&Lr(r)?Zn(r):r;let x=h,m=x.frameElement;for(;m&&r&&p!==x;){const v=Ca(m),g=m.getBoundingClientRect(),w=zr(m),b=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,_=g.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=b,u+=_,x=Zn(m),m=x.frameElement}}return rf({width:d,height:f,x:c,y:u})}function YM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ys(r),l=t?dh(t.floating):!1;if(r===i||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=To(1);const d=To(0),f=as(r);if((f||!f&&!o)&&((ol(r)!=="body"||nu(i))&&(c=fh(r)),as(r))){const h=vi(r);u=Ca(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function ZM(e){return Array.from(e.getClientRects())}function Ck(e){return vi(Ys(e)).left+fh(e).scrollLeft}function GM(e){const t=Ys(e),n=fh(e),r=e.ownerDocument.body,s=Wn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Wn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ck(e);const l=-n.scrollTop;return zr(r).direction==="rtl"&&(i+=Wn(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:l}}function qM(e,t){const n=Zn(e),r=Ys(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(s){o=s.width,i=s.height;const u=vv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:l,y:c}}function XM(e,t){const n=vi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=as(e)?Ca(e):To(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:l,x:c,y:u}}function fb(e,t,n){let r;if(t==="viewport")r=qM(e,n);else if(t==="document")r=GM(Ys(e));else if(Lr(t))r=XM(t,n);else{const s=kk(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return rf(r)}function jk(e,t){const n=Ro(e);return n===t||!Lr(n)||Ua(n)?!1:zr(n).position==="fixed"||jk(n,t)}function QM(e,t){const n=t.get(e);if(n)return n;let r=Cc(e,[],!1).filter(l=>Lr(l)&&ol(l)!=="body"),s=null;const o=zr(e).position==="fixed";let i=o?Ro(e):e;for(;Lr(i)&&!Ua(i);){const l=zr(i),c=yv(i);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||nu(i)&&!c&&jk(e,i))?r=r.filter(d=>d!==i):s=l,i=Ro(i)}return t.set(e,r),r}function JM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?dh(t)?[]:QM(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,d)=>{const f=fb(t,d,s);return u.top=Wn(f.top,u.top),u.right=es(f.right,u.right),u.bottom=es(f.bottom,u.bottom),u.left=Wn(f.left,u.left),u},fb(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function eL(e){const{width:t,height:n}=Sk(e);return{width:t,height:n}}function tL(e,t,n){const r=as(t),s=Ys(t),o=n==="fixed",i=vi(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=To(0);if(r||!r&&!o)if((ol(t)!=="body"||nu(s))&&(l=fh(t)),r){const f=vi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=Ck(s));const u=i.left+l.scrollLeft-c.x,d=i.top+l.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Gm(e){return zr(e).position==="static"}function hb(e,t){return!as(e)||zr(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ek(e,t){const n=Zn(e);if(dh(e))return n;if(!as(e)){let s=Ro(e);for(;s&&!Ua(s);){if(Lr(s)&&!Gm(s))return s;s=Ro(s)}return n}let r=hb(e,t);for(;r&&BM(r)&&Gm(r);)r=hb(r,t);return r&&Ua(r)&&Gm(r)&&!yv(r)?n:r||WM(e)||n}const nL=async function(e){const t=this.getOffsetParent||Ek,n=this.getDimensions,r=await n(e.floating);return{reference:tL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rL(e){return zr(e).direction==="rtl"}const sL={convertOffsetParentRelativeRectToViewportRelativeRect:YM,getDocumentElement:Ys,getClippingRect:JM,getOffsetParent:Ek,getElementRects:nL,getClientRects:ZM,getDimensions:eL,getScale:Ca,isElement:Lr,isRTL:rL};function oL(e,t){let n=null,r;const s=Ys(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=Wu(d),x=Wu(s.clientWidth-(u+f)),m=Wu(s.clientHeight-(d+h)),v=Wu(u),w={rootMargin:-p+"px "+-x+"px "+-m+"px "+-v+"px",threshold:Wn(0,es(1,c))||1};let b=!0;function _(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return i(!0),o}function iL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=xv(e),d=s||o?[...u?Cc(u):[],...Cc(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=u&&l?oL(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(g=>{let[w]=g;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let x,m=c?vi(e):null;c&&v();function v(){const g=vi(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,x=requestAnimationFrame(v)}return n(),()=>{var g;d.forEach(w=>{s&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const aL=FM,lL=$M,cL=MM,uL=VM,dL=LM,mb=IM,fL=UM,hL=(e,t,n)=>{const r=new Map,s={platform:sL,...n},o={...s.platform,_c:r};return OM(e,t,{...s,platform:o})};var vd=typeof document<"u"?y.useLayoutEffect:y.useEffect;function sf(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!sf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Nk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pb(e,t){const n=Nk(e);return Math.round(t*n)/n}function gb(e){const t=y.useRef(e);return vd(()=>{t.current=e}),t}function mL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);sf(h,r)||p(r);const[x,m]=y.useState(null),[v,g]=y.useState(null),w=y.useCallback(F=>{F!==j.current&&(j.current=F,m(F))},[]),b=y.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),_=o||x,C=i||v,j=y.useRef(null),T=y.useRef(null),R=y.useRef(d),A=c!=null,O=gb(c),Z=gb(s),N=y.useCallback(()=>{if(!j.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};Z.current&&(F.platform=Z.current),hL(j.current,T.current,F).then(W=>{const I={...W,isPositioned:!0};z.current&&!sf(R.current,I)&&(R.current=I,Ws.flushSync(()=>{f(I)}))})},[h,t,n,Z]);vd(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const z=y.useRef(!1);vd(()=>(z.current=!0,()=>{z.current=!1}),[]),vd(()=>{if(_&&(j.current=_),C&&(T.current=C),_&&C){if(O.current)return O.current(_,C,N);N()}},[_,C,N,O,A]);const S=y.useMemo(()=>({reference:j,floating:T,setReference:w,setFloating:b}),[w,b]),U=y.useMemo(()=>({reference:_,floating:C}),[_,C]),J=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const W=pb(U.floating,d.x),I=pb(U.floating,d.y);return l?{...F,transform:"translate("+W+"px, "+I+"px)",...Nk(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,l,U.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const pL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mb({element:r.current,padding:s}).fn(n):{}:r?mb({element:r,padding:s}).fn(n):{}}}},gL=(e,t)=>({...aL(e),options:[e,t]}),yL=(e,t)=>({...lL(e),options:[e,t]}),vL=(e,t)=>({...fL(e),options:[e,t]}),xL=(e,t)=>({...cL(e),options:[e,t]}),wL=(e,t)=>({...uL(e),options:[e,t]}),bL=(e,t)=>({...dL(e),options:[e,t]}),_L=(e,t)=>({...pL(e),options:[e,t]});var SL="Arrow",Tk=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return a.jsx(Re.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tk.displayName=SL;var kL=Tk;function wv(e){const[t,n]=y.useState(void 0);return an(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bv="Popper",[Pk,il]=fn(bv),[CL,Rk]=Pk(bv),Ak=e=>{const{__scopePopper:t,children:n}=e,[r,s]=y.useState(null);return a.jsx(CL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Ak.displayName=bv;var Dk="PopperAnchor",Ok=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Rk(Dk,n),i=y.useRef(null),l=Ze(t,i);return y.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:a.jsx(Re.div,{...s,ref:l})});Ok.displayName=Dk;var _v="PopperContent",[jL,EL]=Pk(_v),Ik=y.forwardRef((e,t)=>{var xe,ke,Pe,Fe,Me,Ae;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:x,...m}=e,v=Rk(_v,n),[g,w]=y.useState(null),b=Ze(t,ot=>w(ot)),[_,C]=y.useState(null),j=wv(_),T=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,A=r+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Z=Array.isArray(u)?u:[u],N=Z.length>0,z={padding:O,boundary:Z.filter(TL),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:F,middlewareData:W}=mL({strategy:"fixed",placement:A,whileElementsMounted:(...ot)=>iL(...ot,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[gL({mainAxis:s+R,alignmentAxis:i}),c&&yL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?vL():void 0,...z}),c&&xL({...z}),wL({...z,apply:({elements:ot,rects:E,availableWidth:ee,availableHeight:G})=>{const{width:D,height:k}=E.reference,P=ot.floating.style;P.setProperty("--radix-popper-available-width",`${ee}px`),P.setProperty("--radix-popper-available-height",`${G}px`),P.setProperty("--radix-popper-anchor-width",`${D}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&_L({element:_,padding:l}),PL({arrowWidth:T,arrowHeight:R}),h&&bL({strategy:"referenceHidden",...z})]}),[I,X]=zk(J),$=It(x);an(()=>{F&&($==null||$())},[F,$]);const B=(xe=W.arrow)==null?void 0:xe.x,ve=(ke=W.arrow)==null?void 0:ke.y,oe=((Pe=W.arrow)==null?void 0:Pe.centerOffset)!==0,[ie,Ie]=y.useState();return an(()=>{g&&Ie(window.getComputedStyle(g).zIndex)},[g]),a.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Me=W.transformOrigin)==null?void 0:Me.y].join(" "),...((Ae=W.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(jL,{scope:n,placedSide:I,onArrowChange:C,arrowX:B,arrowY:ve,shouldHideArrow:oe,children:a.jsx(Re.div,{"data-side":I,"data-align":X,...m,ref:b,style:{...m.style,animation:F?void 0:"none"}})})})});Ik.displayName=_v;var Mk="PopperArrow",NL={top:"bottom",right:"left",bottom:"top",left:"right"},Lk=y.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=EL(Mk,r),i=NL[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(kL,{...s,ref:n,style:{...s.style,display:"block"}})})});Lk.displayName=Mk;function TL(e){return e!==null}var PL=e=>({name:"transformOrigin",options:e,fn(t){var v,g,w;const{placement:n,rects:r,middlewareData:s}=t,i=((v=s.arrow)==null?void 0:v.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=zk(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,p=(((w=s.arrow)==null?void 0:w.y)??0)+c/2;let x="",m="";return u==="bottom"?(x=i?f:`${h}px`,m=`${-c}px`):u==="top"?(x=i?f:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,m=i?f:`${p}px`):u==="left"&&(x=`${r.floating.width+c}px`,m=i?f:`${p}px`),{data:{x,y:m}}}});function zk(e){const[t,n="center"]=e.split("-");return[t,n]}var Sv=Ak,kv=Ok,Cv=Ik,jv=Lk,RL="Portal",ru=y.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=y.useState(!1);an(()=>o(!0),[]);const i=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?DS.createPortal(a.jsx(Re.div,{...r,ref:t}),i):null});ru.displayName=RL;function AL(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var hn=e=>{const{present:t,children:n}=e,r=DL(t),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Ze(r.ref,OL(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:o}):null};hn.displayName="Presence";function DL(e){const[t,n]=y.useState(),r=y.useRef({}),s=y.useRef(e),o=y.useRef("none"),i=e?"mounted":"unmounted",[l,c]=AL(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Hu(r.current);o.current=l==="mounted"?u:"none"},[l]),an(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,p=Hu(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),an(()=>{if(t){const u=f=>{const p=Hu(r.current).includes(f.animationName);f.target===t&&p&&Ws.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Hu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hu(e){return(e==null?void 0:e.animationName)||"none"}function OL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qm="rovingFocusGroup.onEntryFocus",IL={bubbles:!1,cancelable:!0},hh="RovingFocusGroup",[Sg,Fk,ML]=tu(hh),[LL,al]=fn(hh,[ML]),[zL,FL]=LL(hh),$k=y.forwardRef((e,t)=>a.jsx(Sg.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Sg.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx($L,{...e,ref:t})})}));$k.displayName=hh;var $L=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=y.useRef(null),p=Ze(t,h),x=Ei(o),[m=null,v]=Qn({prop:i,defaultProp:l,onChange:c}),[g,w]=y.useState(!1),b=It(u),_=Fk(n),C=y.useRef(!1),[j,T]=y.useState(0);return y.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(qm,b),()=>R.removeEventListener(qm,b)},[b]),a.jsx(zL,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:m,onItemFocus:y.useCallback(R=>v(R),[v]),onItemShiftTab:y.useCallback(()=>w(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:y.useCallback(()=>T(R=>R-1),[]),children:a.jsx(Re.div,{tabIndex:g||j===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{C.current=!0}),onFocus:de(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!g){const O=new CustomEvent(qm,IL);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const Z=_().filter(J=>J.focusable),N=Z.find(J=>J.active),z=Z.find(J=>J.id===m),U=[N,z,...Z].filter(Boolean).map(J=>J.ref.current);Bk(U,d)}}C.current=!1}),onBlur:de(e.onBlur,()=>w(!1))})})}),Uk="RovingFocusGroupItem",Vk=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,l=Yn(),c=o||l,u=FL(Uk,n),d=u.currentTabStopId===c,f=Fk(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),a.jsx(Sg.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:a.jsx(Re.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:de(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:de(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:de(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const m=BL(x,u.orientation,u.dir);if(m!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let g=f().filter(w=>w.focusable).map(w=>w.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();const w=g.indexOf(x.currentTarget);g=u.loop?WL(g,w+1):g.slice(w+1)}setTimeout(()=>Bk(g))}})})})});Vk.displayName=Uk;var UL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function BL(e,t,n){const r=VL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return UL[r]}function Bk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function WL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ev=$k,Nv=Vk,HL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vi=new WeakMap,Ku=new WeakMap,Yu={},Xm=0,Wk=function(e){return e&&(e.host||Wk(e.parentNode))},KL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},YL=function(e,t,n,r){var s=KL(t,Array.isArray(e)?e:[e]);Yu[n]||(Yu[n]=new WeakMap);var o=Yu[n],i=[],l=new Set,c=new Set(s),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(r),x=p!==null&&p!=="false",m=(Vi.get(h)||0)+1,v=(o.get(h)||0)+1;Vi.set(h,m),o.set(h,v),i.push(h),m===1&&x&&Ku.set(h,!0),v===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return d(t),l.clear(),Xm++,function(){i.forEach(function(f){var h=Vi.get(f)-1,p=o.get(f)-1;Vi.set(f,h),o.set(f,p),h||(Ku.has(f)||f.removeAttribute(r),Ku.delete(f)),p||f.removeAttribute(n)}),Xm--,Xm||(Vi=new WeakMap,Vi=new WeakMap,Ku=new WeakMap,Yu={})}},Tv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=HL(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),YL(r,s,n,"aria-hidden")):function(){return null}},Xr=function(){return Xr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Xr.apply(this,arguments)};function Hk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function ZL(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var xd="right-scroll-bar-position",wd="width-before-scroll-bar",GL="with-scroll-bars-hidden",qL="--removed-body-scroll-bar-size";function Qm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XL(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var QL=typeof window<"u"?y.useLayoutEffect:y.useEffect,yb=new WeakMap;function JL(e,t){var n=XL(null,function(r){return e.forEach(function(s){return Qm(s,r)})});return QL(function(){var r=yb.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(l){o.has(l)||Qm(l,null)}),o.forEach(function(l){s.has(l)||Qm(l,i)})}yb.set(n,e)},[e]),n}function ez(e){return e}function tz(e,t){t===void 0&&(t=ez);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function nz(e){e===void 0&&(e={});var t=tz(null);return t.options=Xr({async:!0,ssr:!1},e),t}var Kk=function(e){var t=e.sideCar,n=Hk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Xr({},n))};Kk.isSideCarExport=!0;function rz(e,t){return e.useMedium(t),Kk}var Yk=nz(),Jm=function(){},mh=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Jm,onWheelCapture:Jm,onTouchMoveCapture:Jm}),s=r[0],o=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,x=e.inert,m=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,w=e.gapMode,b=Hk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=JL([n,t]),j=Xr(Xr({},b),s);return y.createElement(y.Fragment,null,d&&y.createElement(_,{sideCar:Yk,removeScrollBar:u,shards:f,noIsolation:p,inert:x,setCallbacks:o,allowPinchZoom:!!m,lockRef:n,gapMode:w}),i?y.cloneElement(y.Children.only(l),Xr(Xr({},j),{ref:C})):y.createElement(g,Xr({},j,{className:c,ref:C}),l))});mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mh.classNames={fullWidth:wd,zeroRight:xd};var sz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function oz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sz();return t&&e.setAttribute("nonce",t),e}function iz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function az(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=oz())&&(iz(t,n),az(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cz=function(){var e=lz();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zk=function(){var e=cz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},uz={left:0,top:0,right:0,gap:0},ep=function(e){return parseInt(e||"",10)||0},dz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ep(n),ep(r),ep(s)]},fz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uz;var t=dz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},hz=Zk(),ja="data-scroll-locked",mz=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
.`.concat(GL,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"px ").concat(r,`;
}
body[`).concat(ja,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(xd,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(wd,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(xd," .").concat(xd,` {
right: 0 `).concat(r,`;
}
.`).concat(wd," .").concat(wd,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(ja,`] {
`).concat(qL,": ").concat(l,`px;
}
`)},vb=function(){var e=parseInt(document.body.getAttribute(ja)||"0",10);return isFinite(e)?e:0},pz=function(){y.useEffect(function(){return document.body.setAttribute(ja,(vb()+1).toString()),function(){var e=vb()-1;e<=0?document.body.removeAttribute(ja):document.body.setAttribute(ja,e.toString())}},[])},gz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;pz();var o=y.useMemo(function(){return fz(s)},[s]);return y.createElement(hz,{styles:mz(o,!t,s,n?"":"!important")})},kg=!1;if(typeof window<"u")try{var Zu=Object.defineProperty({},"passive",{get:function(){return kg=!0,!0}});window.addEventListener("test",Zu,Zu),window.removeEventListener("test",Zu,Zu)}catch{kg=!1}var Bi=kg?{passive:!1}:!1,yz=function(e){return e.tagName==="TEXTAREA"},Gk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yz(e)&&n[t]==="visible")},vz=function(e){return Gk(e,"overflowY")},xz=function(e){return Gk(e,"overflowX")},xb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=qk(e,r);if(s){var o=Xk(e,r),i=o[1],l=o[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},bz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qk=function(e,t){return e==="v"?vz(t):xz(t)},Xk=function(e,t){return e==="v"?wz(t):bz(t)},_z=function(e,t){return e==="h"&&t==="rtl"?-1:1},Sz=function(e,t,n,r,s){var o=_z(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,c=t.contains(l),u=!1,d=i>0,f=0,h=0;do{var p=Xk(e,l),x=p[0],m=p[1],v=p[2],g=m-v-o*x;(x||g)&&qk(e,l)&&(f+=g,h+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Gu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wb=function(e){return[e.deltaX,e.deltaY]},bb=function(e){return e&&"current"in e?e.current:e},kz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cz=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},jz=0,Wi=[];function Ez(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),s=y.useState(jz++)[0],o=y.useState(Zk)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=ZL([e.lockRef.current],(e.shards||[]).map(bb),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!i.current.allowPinchZoom;var g=Gu(m),w=n.current,b="deltaX"in m?m.deltaX:w[0]-g[0],_="deltaY"in m?m.deltaY:w[1]-g[1],C,j=m.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&T==="h"&&j.type==="range")return!1;var R=xb(T,j);if(!R)return!0;if(R?C=T:(C=T==="v"?"h":"v",R=xb(T,j)),!R)return!1;if(!r.current&&"changedTouches"in m&&(b||_)&&(r.current=C),!C)return!0;var A=r.current||C;return Sz(A,v,m,A==="h"?b:_,!0)},[]),c=y.useCallback(function(m){var v=m;if(!(!Wi.length||Wi[Wi.length-1]!==o)){var g="deltaY"in v?wb(v):Gu(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&kz(C.delta,g)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var b=(i.current.shards||[]).map(bb).filter(Boolean).filter(function(C){return C.contains(v.target)}),_=b.length>0?l(v,b[0]):!i.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),u=y.useCallback(function(m,v,g,w){var b={name:m,delta:v,target:g,should:w,shadowParent:Nz(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=y.useCallback(function(m){n.current=Gu(m),r.current=void 0},[]),f=y.useCallback(function(m){u(m.type,wb(m),m.target,l(m,e.lockRef.current))},[]),h=y.useCallback(function(m){u(m.type,Gu(m),m.target,l(m,e.lockRef.current))},[]);y.useEffect(function(){return Wi.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Bi),document.addEventListener("touchmove",c,Bi),document.addEventListener("touchstart",d,Bi),function(){Wi=Wi.filter(function(m){return m!==o}),document.removeEventListener("wheel",c,Bi),document.removeEventListener("touchmove",c,Bi),document.removeEventListener("touchstart",d,Bi)}},[]);var p=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(o,{styles:Cz(s)}):null,p?y.createElement(gz,{gapMode:e.gapMode}):null)}function Nz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tz=rz(Yk,Ez);var ph=y.forwardRef(function(e,t){return y.createElement(mh,Xr({},e,{ref:t,sideCar:Tz}))});ph.classNames=mh.classNames;var Cg=["Enter"," "],Pz=["ArrowDown","PageUp","Home"],Qk=["ArrowUp","PageDown","End"],Rz=[...Pz,...Qk],Az={ltr:[...Cg,"ArrowRight"],rtl:[...Cg,"ArrowLeft"]},Dz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},su="Menu",[jc,Oz,Iz]=tu(su),[Ni,Jk]=fn(su,[Iz,il,al]),gh=il(),eC=al(),[Mz,Ti]=Ni(su),[Lz,ou]=Ni(su),tC=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,l=gh(t),[c,u]=y.useState(null),d=y.useRef(!1),f=It(o),h=Ei(s);return y.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.jsx(Sv,{...l,children:a.jsx(Mz,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:a.jsx(Lz,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};tC.displayName=su;var zz="MenuAnchor",Pv=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return a.jsx(kv,{...s,...r,ref:t})});Pv.displayName=zz;var Rv="MenuPortal",[Fz,nC]=Ni(Rv,{forceMount:void 0}),rC=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ti(Rv,t);return a.jsx(Fz,{scope:t,forceMount:n,children:a.jsx(hn,{present:n||o.open,children:a.jsx(ru,{asChild:!0,container:s,children:r})})})};rC.displayName=Rv;var hr="MenuContent",[$z,Av]=Ni(hr),sC=y.forwardRef((e,t)=>{const n=nC(hr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ti(hr,e.__scopeMenu),i=ou(hr,e.__scopeMenu);return a.jsx(jc.Provider,{scope:e.__scopeMenu,children:a.jsx(hn,{present:r||o.open,children:a.jsx(jc.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(Uz,{...s,ref:t}):a.jsx(Vz,{...s,ref:t})})})})}),Uz=y.forwardRef((e,t)=>{const n=Ti(hr,e.__scopeMenu),r=y.useRef(null),s=Ze(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Tv(o)},[]),a.jsx(Dv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:de(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Vz=y.forwardRef((e,t)=>{const n=Ti(hr,e.__scopeMenu);return a.jsx(Dv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Dv=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:x,...m}=e,v=Ti(hr,n),g=ou(hr,n),w=gh(n),b=eC(n),_=Oz(n),[C,j]=y.useState(null),T=y.useRef(null),R=Ze(t,T,v.onContentChange),A=y.useRef(0),O=y.useRef(""),Z=y.useRef(0),N=y.useRef(null),z=y.useRef("right"),S=y.useRef(0),U=x?ph:y.Fragment,J=x?{as:is,allowPinchZoom:!0}:void 0,F=I=>{var xe,ke;const X=O.current+I,$=_().filter(Pe=>!Pe.disabled),B=document.activeElement,ve=(xe=$.find(Pe=>Pe.ref.current===B))==null?void 0:xe.textValue,oe=$.map(Pe=>Pe.textValue),ie=eF(oe,X,ve),Ie=(ke=$.find(Pe=>Pe.textValue===ie))==null?void 0:ke.ref.current;(function Pe(Fe){O.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Pe(""),1e3))})(X),Ie&&setTimeout(()=>Ie.focus())};y.useEffect(()=>()=>window.clearTimeout(A.current),[]),hv();const W=y.useCallback(I=>{var $,B;return z.current===(($=N.current)==null?void 0:$.side)&&nF(I,(B=N.current)==null?void 0:B.area)},[]);return a.jsx($z,{scope:n,searchRef:O,onItemEnter:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:y.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),j(null))},[W]),onTriggerLeave:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:y.useCallback(I=>{N.current=I},[]),children:a.jsx(U,{...J,children:a.jsx(uh,{asChild:!0,trapped:s,onMountAutoFocus:de(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:a.jsx(Ev,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:j,onEntryFocus:de(c,I=>{g.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Cv,{role:"menu","aria-orientation":"vertical","data-state":wC(v.open),"data-radix-menu-content":"",dir:g.dir,...w,...m,ref:R,style:{outline:"none",...m.style},onKeyDown:de(m.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,ve=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&ve&&F(I.key));const oe=T.current;if(I.target!==oe||!Rz.includes(I.key))return;I.preventDefault();const Ie=_().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);Qk.includes(I.key)&&Ie.reverse(),Qz(Ie)}),onBlur:de(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:de(e.onPointerMove,Ec(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";z.current=B,S.current=I.clientX}}))})})})})})})});sC.displayName=hr;var Bz="MenuGroup",Ov=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Re.div,{role:"group",...r,ref:t})});Ov.displayName=Bz;var Wz="MenuLabel",oC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Re.div,{...r,ref:t})});oC.displayName=Wz;var of="MenuItem",_b="menu.itemSelect",yh=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=y.useRef(null),i=ou(of,e.__scopeMenu),l=Av(of,e.__scopeMenu),c=Ze(t,o),u=y.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(_b,{bubbles:!0,cancelable:!0});f.addEventListener(_b,p=>r==null?void 0:r(p),{once:!0}),fv(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return a.jsx(iC,{...s,ref:c,disabled:n,onClick:de(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:de(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:de(e.onKeyDown,f=>{const h=l.searchRef.current!=="";n||h&&f.key===" "||Cg.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});yh.displayName=of;var iC=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Av(of,n),l=eC(n),c=y.useRef(null),u=Ze(t,c),[d,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const x=c.current;x&&p((x.textContent??"").trim())},[o.children]),a.jsx(jc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:a.jsx(Nv,{asChild:!0,...l,focusable:!r,children:a.jsx(Re.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:de(e.onPointerMove,Ec(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(e.onPointerLeave,Ec(x=>i.onItemLeave(x))),onFocus:de(e.onFocus,()=>f(!0)),onBlur:de(e.onBlur,()=>f(!1))})})})}),Hz="MenuCheckboxItem",aC=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx(fC,{scope:e.__scopeMenu,checked:n,children:a.jsx(yh,{role:"menuitemcheckbox","aria-checked":af(n)?"mixed":n,...s,ref:t,"data-state":Mv(n),onSelect:de(s.onSelect,()=>r==null?void 0:r(af(n)?!0:!n),{checkForDefaultPrevented:!1})})})});aC.displayName=Hz;var lC="MenuRadioGroup",[Kz,Yz]=Ni(lC,{value:void 0,onValueChange:()=>{}}),cC=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=It(r);return a.jsx(Kz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:a.jsx(Ov,{...s,ref:t})})});cC.displayName=lC;var uC="MenuRadioItem",dC=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=Yz(uC,e.__scopeMenu),o=n===s.value;return a.jsx(fC,{scope:e.__scopeMenu,checked:o,children:a.jsx(yh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Mv(o),onSelect:de(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});dC.displayName=uC;var Iv="MenuItemIndicator",[fC,Zz]=Ni(Iv,{checked:!1}),hC=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=Zz(Iv,n);return a.jsx(hn,{present:r||af(o.checked)||o.checked===!0,children:a.jsx(Re.span,{...s,ref:t,"data-state":Mv(o.checked)})})});hC.displayName=Iv;var Gz="MenuSeparator",mC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(Re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});mC.displayName=Gz;var qz="MenuArrow",pC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return a.jsx(jv,{...s,...r,ref:t})});pC.displayName=qz;var Xz="MenuSub",[JH,gC]=Ni(Xz),$l="MenuSubTrigger",yC=y.forwardRef((e,t)=>{const n=Ti($l,e.__scopeMenu),r=ou($l,e.__scopeMenu),s=gC($l,e.__scopeMenu),o=Av($l,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),a.jsx(Pv,{asChild:!0,...u,children:a.jsx(iC,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":wC(n.open),...e,ref:lh(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:de(e.onPointerMove,Ec(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:de(e.onPointerLeave,Ec(f=>{var p,x;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(x=n.content)==null?void 0:x.dataset.side,v=m==="right",g=v?-5:5,w=h[v?"left":"right"],b=h[v?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:w,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:w,y:h.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:de(e.onKeyDown,f=>{var p;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Az[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});yC.displayName=$l;var vC="MenuSubContent",xC=y.forwardRef((e,t)=>{const n=nC(hr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ti(hr,e.__scopeMenu),i=ou(hr,e.__scopeMenu),l=gC(vC,e.__scopeMenu),c=y.useRef(null),u=Ze(t,c);return a.jsx(jc.Provider,{scope:e.__scopeMenu,children:a.jsx(hn,{present:r||o.open,children:a.jsx(jc.Slot,{scope:e.__scopeMenu,children:a.jsx(Dv,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:de(e.onFocusOutside,d=>{d.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:de(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:de(e.onKeyDown,d=>{var p;const f=d.currentTarget.contains(d.target),h=Dz[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});xC.displayName=vC;function wC(e){return e?"open":"closed"}function af(e){return e==="indeterminate"}function Mv(e){return af(e)?"indeterminate":e?"checked":"unchecked"}function Qz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Jz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function eF(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Jz(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function tF(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function nF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return tF(n,t)}function Ec(e){return t=>t.pointerType==="mouse"?e(t):void 0}var rF=tC,sF=Pv,oF=rC,iF=sC,aF=Ov,lF=oC,cF=yh,uF=aC,dF=cC,fF=dC,hF=hC,mF=mC,pF=pC,gF=yC,yF=xC,Lv="DropdownMenu",[vF,e9]=fn(Lv,[Jk]),Tn=Jk(),[xF,bC]=vF(Lv),_C=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,c=Tn(t),u=y.useRef(null),[d=!1,f]=Qn({prop:s,defaultProp:o,onChange:i});return a.jsx(xF,{scope:t,triggerId:Yn(),triggerRef:u,contentId:Yn(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:l,children:a.jsx(rF,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};_C.displayName=Lv;var SC="DropdownMenuTrigger",kC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=bC(SC,n),i=Tn(n);return a.jsx(sF,{asChild:!0,...i,children:a.jsx(Re.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:lh(t,o.triggerRef),onPointerDown:de(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:de(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});kC.displayName=SC;var wF="DropdownMenuPortal",CC=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tn(t);return a.jsx(oF,{...r,...n})};CC.displayName=wF;var jC="DropdownMenuContent",EC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=bC(jC,n),o=Tn(n),i=y.useRef(!1);return a.jsx(iF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:de(e.onCloseAutoFocus,l=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:de(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});EC.displayName=jC;var bF="DropdownMenuGroup",_F=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(aF,{...s,...r,ref:t})});_F.displayName=bF;var SF="DropdownMenuLabel",NC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(lF,{...s,...r,ref:t})});NC.displayName=SF;var kF="DropdownMenuItem",TC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(cF,{...s,...r,ref:t})});TC.displayName=kF;var CF="DropdownMenuCheckboxItem",PC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(uF,{...s,...r,ref:t})});PC.displayName=CF;var jF="DropdownMenuRadioGroup",EF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(dF,{...s,...r,ref:t})});EF.displayName=jF;var NF="DropdownMenuRadioItem",RC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(fF,{...s,...r,ref:t})});RC.displayName=NF;var TF="DropdownMenuItemIndicator",AC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(hF,{...s,...r,ref:t})});AC.displayName=TF;var PF="DropdownMenuSeparator",DC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(mF,{...s,...r,ref:t})});DC.displayName=PF;var RF="DropdownMenuArrow",AF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(pF,{...s,...r,ref:t})});AF.displayName=RF;var DF="DropdownMenuSubTrigger",OC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(gF,{...s,...r,ref:t})});OC.displayName=DF;var OF="DropdownMenuSubContent",IC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Tn(n);return a.jsx(yF,{...s,...r,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)"}})});IC.displayName=OF;var IF=_C,MF=kC,LF=CC,MC=EC,LC=NC,zC=TC,FC=PC,$C=RC,UC=AC,VC=DC,BC=OC,WC=IC;const zv=IF,Fv=MF,zF=y.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(BC,{ref:s,className:re("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),...r,children:[n,a.jsx(ik,{className:"ml-auto h-4 w-4"})]}));zF.displayName=BC.displayName;const FF=y.forwardRef(({className:e,...t},n)=>a.jsx(WC,{ref:n,className:re("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}));FF.displayName=WC.displayName;const vh=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(LF,{children:a.jsx(MC,{ref:r,sideOffset:t,className:re("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),...n})}));vh.displayName=MC.displayName;const oi=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(zC,{ref:r,className:re("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),...n}));oi.displayName=zC.displayName;const $F=y.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(FC,{ref:s,className:re("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:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(UC,{children:a.jsx(ok,{className:"h-4 w-4"})})}),t]}));$F.displayName=FC.displayName;const UF=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs($C,{ref:r,className:re("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),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(UC,{children:a.jsx(ak,{className:"h-2 w-2 fill-current"})})}),t]}));UF.displayName=$C.displayName;const VF=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(LC,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));VF.displayName=LC.displayName;const BF=y.forwardRef(({className:e,...t},n)=>a.jsx(VC,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));BF.displayName=VC.displayName;function WF(){const{i18n:e}=Ve();return a.jsxs(zv,{children:[a.jsx(Fv,{asChild:!0,children:a.jsxs(Te,{variant:"outline",size:"icon",children:[a.jsx(uI,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsx(vh,{align:"end",children:Object.keys(e.store.data).map(t=>a.jsx(oi,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}const HF={theme:"system",setTheme:()=>null},HC=y.createContext(HF);function KF({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=y.useState(()=>localStorage.getItem(n)||t);y.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(c);return}l.classList.add(s)},[s]);const i={theme:s,setTheme:l=>{localStorage.setItem(n,l),o(l)}};return a.jsx(HC.Provider,{...r,value:i,children:e})}const YF=()=>{const e=y.useContext(HC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function ZF(){const{setTheme:e}=YF(),{t}=Ve();return a.jsxs(zv,{children:[a.jsx(Fv,{asChild:!0,children:a.jsxs(Te,{variant:"outline",size:"icon",children:[a.jsx(yI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(mI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(vh,{align:"end",children:[a.jsx(oi,{onClick:()=>e("light"),children:t("common.theme.light")}),a.jsx(oi,{onClick:()=>e("dark"),children:t("common.theme.dark")}),a.jsx(oi,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}var $v="Dialog",[KC,YC]=fn($v),[GF,Wr]=KC($v),ZC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=y.useRef(null),c=y.useRef(null),[u=!1,d]=Qn({prop:r,defaultProp:s,onChange:o});return a.jsx(GF,{scope:t,triggerRef:l,contentRef:c,contentId:Yn(),titleId:Yn(),descriptionId:Yn(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};ZC.displayName=$v;var GC="DialogTrigger",qC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(GC,n),o=Ze(t,s.triggerRef);return a.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Bv(s.open),...r,ref:o,onClick:de(e.onClick,s.onOpenToggle)})});qC.displayName=GC;var Uv="DialogPortal",[qF,XC]=KC(Uv,{forceMount:void 0}),QC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Wr(Uv,t);return a.jsx(qF,{scope:t,forceMount:n,children:y.Children.map(r,i=>a.jsx(hn,{present:n||o.open,children:a.jsx(ru,{asChild:!0,container:s,children:i})}))})};QC.displayName=Uv;var lf="DialogOverlay",JC=y.forwardRef((e,t)=>{const n=XC(lf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Wr(lf,e.__scopeDialog);return o.modal?a.jsx(hn,{present:r||o.open,children:a.jsx(XF,{...s,ref:t})}):null});JC.displayName=lf;var XF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(lf,n);return a.jsx(ph,{as:is,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(Re.div,{"data-state":Bv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xi="DialogContent",ej=y.forwardRef((e,t)=>{const n=XC(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Wr(xi,e.__scopeDialog);return a.jsx(hn,{present:r||o.open,children:o.modal?a.jsx(QF,{...s,ref:t}):a.jsx(JF,{...s,ref:t})})});ej.displayName=xi;var QF=y.forwardRef((e,t)=>{const n=Wr(xi,e.__scopeDialog),r=y.useRef(null),s=Ze(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Tv(o)},[]),a.jsx(tj,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:de(e.onFocusOutside,o=>o.preventDefault())})}),JF=y.forwardRef((e,t)=>{const n=Wr(xi,e.__scopeDialog),r=y.useRef(!1),s=y.useRef(!1);return a.jsx(tj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),tj=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Wr(xi,n),c=y.useRef(null),u=Ze(t,c);return hv(),a.jsxs(a.Fragment,{children:[a.jsx(uh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(rl,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Bv(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(t4,{titleId:l.titleId}),a.jsx(r4,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Vv="DialogTitle",nj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Vv,n);return a.jsx(Re.h2,{id:s.titleId,...r,ref:t})});nj.displayName=Vv;var rj="DialogDescription",sj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(rj,n);return a.jsx(Re.p,{id:s.descriptionId,...r,ref:t})});sj.displayName=rj;var oj="DialogClose",ij=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(oj,n);return a.jsx(Re.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>s.onOpenChange(!1))})});ij.displayName=oj;function Bv(e){return e?"open":"closed"}var aj="DialogTitleWarning",[e4,lj]=rM(aj,{contentName:xi,titleName:Vv,docsSlug:"dialog"}),t4=({titleId:e})=>{const t=lj(aj),n=`\`${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(n))},[n,e]),null},n4="DialogDescriptionWarning",r4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lj(n4).contentName}}.`;return y.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Wv=ZC,Hv=qC,Kv=QC,iu=JC,au=ej,lu=nj,cu=sj,xh=ij;const Yv=Wv,Zv=Hv,s4=Kv,cj=y.forwardRef(({className:e,...t},n)=>a.jsx(iu,{className:re("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:n}));cj.displayName=iu.displayName;const o4=eu("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"}}),wh=y.forwardRef(({side:e="right",className:t,children:n,...r},s)=>a.jsxs(s4,{children:[a.jsx(cj,{}),a.jsxs(au,{ref:s,className:re(o4({side:e}),t),...r,children:[n,a.jsxs(xh,{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:[a.jsx(cv,{className:"h-4 w-4 dark:text-stone-200"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wh.displayName=au.displayName;const Gv=({className:e,...t})=>a.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Gv.displayName="SheetHeader";const qv=y.forwardRef(({className:e,...t},n)=>a.jsx(lu,{ref:n,className:re("text-lg font-semibold text-foreground",e),...t}));qv.displayName=lu.displayName;const i4=y.forwardRef(({className:e,...t},n)=>a.jsx(cu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));i4.displayName=cu.displayName;class Gn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Gn.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 Gn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(r=this.originalError)==null?void 0:r.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const qu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a4(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||l4;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const l=e.slice(s,o).trim();if(n[l]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[l]=r(c)}catch{n[l]=c}}s=i+1}return n}function Sb(e,t,n){const r=Object.assign({},n||{}),s=r.encode||c4;if(!qu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!qu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const l=r.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(r.domain){if(!qu.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!qu.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function l4(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function c4(e){return encodeURIComponent(e)}const u4=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let uj;function Ea(e){if(e)try{const t=decodeURIComponent(uj(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function dj(e,t=0){let n=Ea(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}uj=typeof atob!="function"||u4?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 n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const kb="pb_auth";class d4{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!dj(this.token)}get isAdmin(){return Ea(this.token).type==="admin"}get isAuthRecord(){return Ea(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=kb){const r=a4(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=kb){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Ea(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=Sb(n,JSON.stringify(o),t);const l=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&l>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=Sb(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class f4 extends d4{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,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.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 n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class Pi{constructor(t){this.client=t}}class h4 extends Pi{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Xv extends Pi{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Gn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Gn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const l=i.items;return r=r.concat(l),l.length==i.perPage?s(o+1):r});return s(1)}}function $n(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function tp(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class m4 extends Xv{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o;return r&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=$n("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||tp(this.client);let l=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return l=this.authResponse(l),i&&function(u,d,f,h){tp(u);const p=u.beforeSend,x=u.authStore.model,m=u.authStore.onChange((v,g)=>{(!v||(g==null?void 0:g.id)!=(x==null?void 0:x.id)||(g!=null&&g.collectionId||x!=null&&x.collectionId)&&(g==null?void 0:g.collectionId)!=(x==null?void 0:x.collectionId))&&tp(u)});u._resetAutoRefresh=function(){m(),u.beforeSend=p,delete u._resetAutoRefresh},u.beforeSend=async(v,g)=>{var C;const w=u.authStore.token;if((C=g.query)!=null&&C.autoRefresh)return p?p(v,g):{url:v,sendOptions:g};let b=u.authStore.isValid;if(b&&dj(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=g.headers||{};for(let j in _)if(j.toLowerCase()=="authorization"&&w==_[j]&&u.authStore.token){_[j]=u.authStore.token;break}return g.headers=_,p?p(v,g):{url:v,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),l}async authRefresh(t,n){let r={method:"POST"};return r=$n("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=$n("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=$n("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const p4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function fj(e){if(e){e.query=e.query||{};for(let t in e)p4.includes(t)||(e.query[t]=e[t],delete e[t])}}class hj extends Pi{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,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){fj(r);const l="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+l}const o=function(l){const c=l;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}n(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let l=!1;for(let c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(l=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));l&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.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 n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),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 n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Gn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class g4 extends Xv{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).then(s=>{var o,i,l;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((l=this.client.authStore.model)==null?void 0:l.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=$n("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,l){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=$n("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,l),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=Cb(void 0));const s=new hj(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},l=n.requestKey;return l&&(i.requestKey=l),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(p=>p.name===n.provider);if(!u)throw new Gn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=l?(h=this.client.cancelControllers)==null?void 0:h[l]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(p,x)=>{var m;try{await s.subscribe("@oauth2",async b=>{var C;const _=s.clientId;try{if(!b.state||_!==b.state)throw new Error("State parameters don't match.");if(b.error||!b.code)throw new Error("OAuth2 redirect error or missing code: "+b.error);const j=Object.assign({},n);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,j);p(T)}catch(j){x(new Gn(j))}o()});const v={state:s.clientId};(m=n.scopes)!=null&&m.length&&(v.scope=n.scopes.join(" "));const g=this._replaceQueryParams(u.authUrl+d,v);await(n.urlCallback||function(b){r?r.location.href=b:r=Cb(b)})(g)}catch(v){o(),x(new Gn(v))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=$n("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=$n("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=$n("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,n,r){let s={method:"POST",body:{email:t}};return s=$n("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=$n("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Ea(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,n,r){let s={method:"POST",body:{newEmail:t}};return s=$n("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=$n("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Ea(t),l=this.client.authStore.model;return l&&l.id===i.id&&l.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const l of i){if(l=="")continue;const c=l.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let l in n)n.hasOwnProperty(l)&&(n[l]==null?delete o[l]:o[l]=n[l]);s="";for(let l in o)o.hasOwnProperty(l)&&(s!=""&&(s+="&"),s+=encodeURIComponent(l.replace(/%20/g,"+"))+"="+encodeURIComponent(o[l].replace(/%20/g,"+")));return s!=""?r+"?"+s:r}}function Cb(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Gn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class y4 extends Xv{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class v4 extends Pi{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Gn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class x4 extends Pi{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class w4 extends Pi{getUrl(t,n,r={}){if(!n||!(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(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class b4 extends Pi{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class _4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new f4,this.admins=new m4(this),this.collections=new y4(this),this.files=new w4(this),this.logs=new v4(this),this.settings=new h4(this),this.realtime=new hj(this),this.health=new x4(this),this.backups=new b4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new g4(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,n){if(!n)return t;for(let r in n){let s=n[r];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("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Gn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Gn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),fj(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}const S4=void 0;console.log(S4);let Xu;const rt=()=>Xu||(Xu=new _4("/"),Xu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var mj;function Se(){return mj.apply(null,arguments)}function k4(e){mj=e}function Fr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ii(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(dt(e,t))return!1;return!0}function Pn(e){return e===void 0}function Us(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function uu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pj(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function ho(e,t){for(var n in t)dt(t,n)&&(e[n]=t[n]);return dt(t,"toString")&&(e.toString=t.toString),dt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function ds(e,t,n,r){return zj(e,t,n,r,!0).utc()}function C4(){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 Qe(e){return e._pf==null&&(e._pf=C4()),e._pf}var jg;Array.prototype.some?jg=Array.prototype.some:jg=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Jv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=jg.call(t.parsedDateParts,function(s){return s!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function bh(e){var t=ds(NaN);return e!=null?ho(Qe(t),e):Qe(t).userInvalidated=!0,t}var jb=Se.momentProperties=[],np=!1;function ex(e,t){var n,r,s,o=jb.length;if(Pn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Pn(t._i)||(e._i=t._i),Pn(t._f)||(e._f=t._f),Pn(t._l)||(e._l=t._l),Pn(t._strict)||(e._strict=t._strict),Pn(t._tzm)||(e._tzm=t._tzm),Pn(t._isUTC)||(e._isUTC=t._isUTC),Pn(t._offset)||(e._offset=t._offset),Pn(t._pf)||(e._pf=Qe(t)),Pn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=jb[n],s=t[r],Pn(s)||(e[r]=s);return e}function du(e){ex(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),np===!1&&(np=!0,Se.updateOffset(this),np=!1)}function $r(e){return e instanceof du||e!=null&&e._isAMomentObject!=null}function gj(e){Se.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function gr(e,t){var n=!0;return ho(function(){if(Se.deprecationHandler!=null&&Se.deprecationHandler(null,e),n){var r=[],s,o,i,l=arguments.length;for(o=0;o<l;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}gj(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Eb={};function yj(e,t){Se.deprecationHandler!=null&&Se.deprecationHandler(e,t),Eb[e]||(gj(t),Eb[e]=!0)}Se.suppressDeprecationWarnings=!1;Se.deprecationHandler=null;function fs(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function j4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],fs(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Eg(e,t){var n=ho({},e),r;for(r in t)dt(t,r)&&(ii(e[r])&&ii(t[r])?(n[r]={},ho(n[r],e[r]),ho(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&ii(e[r])&&(n[r]=ho({},n[r]));return n}function tx(e){e!=null&&this.set(e)}var Ng;Object.keys?Ng=Object.keys:Ng=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var E4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return fs(r)?r.call(t,n):r}function ls(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var nx=/(\[[^\[]*\])|(\\)?([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,Qu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,rp={},Na={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Na[e]=s),t&&(Na[t[0]]=function(){return ls(s.apply(this,arguments),t[1],t[2])}),n&&(Na[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function T4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function P4(e){var t=e.match(nx),n,r;for(n=0,r=t.length;n<r;n++)Na[t[n]]?t[n]=Na[t[n]]:t[n]=T4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=fs(t[i])?t[i].call(s,e):t[i];return o}}function bd(e,t){return e.isValid()?(t=vj(t,e.localeData()),rp[t]=rp[t]||P4(t),rp[t](e)):e.localeData().invalidDate()}function vj(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Qu.lastIndex=0;n>=0&&Qu.test(e);)e=e.replace(Qu,r),Qu.lastIndex=0,n-=1;return e}var R4={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 A4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(nx).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var D4="Invalid date";function O4(){return this._invalidDate}var I4="%d",M4=/\d{1,2}/;function L4(e){return this._ordinal.replace("%d",e)}var z4={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 F4(e,t,n,r){var s=this._relativeTime[n];return fs(s)?s(e,t,n,r):s.replace(/%d/i,e)}function $4(e,t){var n=this._relativeTime[e>0?"future":"past"];return fs(n)?n(t):n.replace(/%s/i,t)}var Nb={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 yr(e){return typeof e=="string"?Nb[e]||Nb[e.toLowerCase()]:void 0}function rx(e){var t={},n,r;for(r in e)dt(e,r)&&(n=yr(r),n&&(t[n]=e[r]));return t}var U4={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 V4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:U4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var xj=/\d/,sr=/\d\d/,wj=/\d{3}/,sx=/\d{4}/,_h=/[+-]?\d{6}/,Et=/\d\d?/,bj=/\d\d\d\d?/,_j=/\d\d\d\d\d\d?/,Sh=/\d{1,3}/,ox=/\d{1,4}/,kh=/[+-]?\d{1,6}/,ll=/\d+/,Ch=/[+-]?\d+/,B4=/Z|[+-]\d\d:?\d\d/gi,jh=/Z|[+-]\d\d(?::?\d\d)?/gi,W4=/[+-]?\d+(\.\d{1,3})?/,fu=/[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,cl=/^[1-9]\d?/,ix=/^([1-9]\d|\d)/,cf;cf={};function Ee(e,t,n){cf[e]=fs(t)?t:function(r,s){return r&&n?n:t}}function H4(e,t){return dt(cf,e)?cf[e](t._strict,t._locale):new RegExp(K4(e))}function K4(e){return As(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function As(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function cr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function st(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=cr(t)),n}var Tg={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Us(t)&&(r=function(o,i){i[t]=st(o)}),s=e.length,n=0;n<s;n++)Tg[e[n]]=r}function hu(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function Y4(e,t,n){t!=null&&dt(Tg,e)&&Tg[e](t,n._a,n,e)}function Eh(e){return e%4===0&&e%100!==0||e%400===0}var yn=0,Ns=1,Qr=2,Xt=3,Rr=4,Ts=5,ei=6,Z4=7,G4=8;Le("Y",0,0,function(){var e=this.year();return e<=9999?ls(e,4):"+"+e});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");Ee("Y",Ch);Ee("YY",Et,sr);Ee("YYYY",ox,sx);Ee("YYYYY",kh,_h);Ee("YYYYYY",kh,_h);vt(["YYYYY","YYYYYY"],yn);vt("YYYY",function(e,t){t[yn]=e.length===2?Se.parseTwoDigitYear(e):st(e)});vt("YY",function(e,t){t[yn]=Se.parseTwoDigitYear(e)});vt("Y",function(e,t){t[yn]=parseInt(e,10)});function Jl(e){return Eh(e)?366:365}Se.parseTwoDigitYear=function(e){return st(e)+(st(e)>68?1900:2e3)};var Sj=ul("FullYear",!0);function q4(){return Eh(this.year())}function ul(e,t){return function(n){return n!=null?(kj(this,e,n),Se.updateOffset(this,t),this):Nc(this,e)}}function Nc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function kj(e,t,n){var r,s,o,i,l;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),l=e.date(),l=l===29&&i===1&&!Eh(o)?28:l,s?r.setUTCFullYear(o,i,l):r.setFullYear(o,i,l)}}function X4(e){return e=yr(e),fs(this[e])?this[e]():this}function Q4(e,t){if(typeof e=="object"){e=rx(e);var n=V4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=yr(e),fs(this[e]))return this[e](t);return this}function J4(e,t){return(e%t+t)%t}var Ut;Array.prototype.indexOf?Ut=Array.prototype.indexOf:Ut=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function ax(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=J4(t,12);return e+=(t-n)/12,n===1?Eh(e)?29:28:31-n%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Le("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ee("M",Et,cl);Ee("MM",Et,sr);Ee("MMM",function(e,t){return t.monthsShortRegex(e)});Ee("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[Ns]=st(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[Ns]=s:Qe(n).invalidMonth=e});var e3="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Cj="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jj=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,t3=fu,n3=fu;function r3(e,t){return e?Fr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||jj).test(t)?"format":"standalone"][e.month()]:Fr(this._months)?this._months:this._months.standalone}function s3(e,t){return e?Fr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[jj.test(t)?"format":"standalone"][e.month()]:Fr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function o3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=ds([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:null):(s=Ut.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:(s=Ut.call(this._longMonthsParse,i),s!==-1?s:null)):(s=Ut.call(this._longMonthsParse,i),s!==-1?s:(s=Ut.call(this._shortMonthsParse,i),s!==-1?s:null))}function i3(e,t,n){var r,s,o;if(this._monthsParseExact)return o3.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=ds([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Ej(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=st(t);else if(t=e.localeData().monthsParse(t),!Us(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,ax(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Nj(e){return e!=null?(Ej(this,e),Se.updateOffset(this,!0),this):Nc(this,"Month")}function a3(){return ax(this.year(),this.month())}function l3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Tj.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dt(this,"_monthsShortRegex")||(this._monthsShortRegex=t3),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function c3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||Tj.call(this),e?this._monthsStrictRegex:this._monthsRegex):(dt(this,"_monthsRegex")||(this._monthsRegex=n3),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Tj(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,l;for(s=0;s<12;s++)o=ds([2e3,s]),i=As(this.monthsShort(o,"")),l=As(this.months(o,"")),t.push(i),n.push(l),r.push(l),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function u3(e,t,n,r,s,o,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,s,o,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,s,o,i),l}function Tc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function uf(e,t,n){var r=7+t-n,s=(7+Tc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Pj(e,t,n,r,s){var o=(7+n-r)%7,i=uf(e,r,s),l=1+7*(t-1)+o+i,c,u;return l<=0?(c=e-1,u=Jl(c)+l):l>Jl(e)?(c=e+1,u=l-Jl(e)):(c=e,u=l),{year:c,dayOfYear:u}}function Pc(e,t,n){var r=uf(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Ds(i,t,n)):s>Ds(e.year(),t,n)?(o=s-Ds(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Ds(e,t,n){var r=uf(e,t,n),s=uf(e+1,t,n);return(Jl(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",Et,cl);Ee("ww",Et,sr);Ee("W",Et,cl);Ee("WW",Et,sr);hu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=st(e)});function d3(e){return Pc(e,this._week.dow,this._week.doy).week}var f3={dow:0,doy:6};function h3(){return this._week.dow}function m3(){return this._week.doy}function p3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function g3(e){var t=Pc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",Et);Ee("e",Et);Ee("E",Et);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});hu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});hu(["d","e","E"],function(e,t,n,r){t[r]=st(e)});function y3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function v3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function lx(e,t){return e.slice(t,7).concat(e.slice(0,t))}var x3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rj="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),w3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),b3=fu,_3=fu,S3=fu;function k3(e,t){var n=Fr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?lx(n,this._week.dow):e?n[e.day()]:n}function C3(e){return e===!0?lx(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function j3(e){return e===!0?lx(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function E3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=ds([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=Ut.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=Ut.call(this._weekdaysParse,i),s!==-1||(s=Ut.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,i),s!==-1||(s=Ut.call(this._weekdaysParse,i),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=Ut.call(this._minWeekdaysParse,i),s!==-1||(s=Ut.call(this._weekdaysParse,i),s!==-1)?s:(s=Ut.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function N3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return E3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=ds([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function T3(e){if(!this.isValid())return e!=null?this:NaN;var t=Nc(this,"Day");return e!=null?(e=y3(e,this.localeData()),this.add(e-t,"d")):t}function P3(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 R3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=v3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function A3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||cx.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=b3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function D3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||cx.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=_3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function O3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||cx.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=S3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function cx(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,l,c,u;for(o=0;o<7;o++)i=ds([2e3,1]).day(o),l=As(this.weekdaysMin(i,"")),c=As(this.weekdaysShort(i,"")),u=As(this.weekdays(i,"")),t.push(l),n.push(c),r.push(u),s.push(l),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ux(){return this.hours()%12||12}function I3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,ux);Le("k",["kk",2],0,I3);Le("hmm",0,0,function(){return""+ux.apply(this)+ls(this.minutes(),2)});Le("hmmss",0,0,function(){return""+ux.apply(this)+ls(this.minutes(),2)+ls(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+ls(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+ls(this.minutes(),2)+ls(this.seconds(),2)});function Aj(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Aj("a",!0);Aj("A",!1);function Dj(e,t){return t._meridiemParse}Ee("a",Dj);Ee("A",Dj);Ee("H",Et,ix);Ee("h",Et,cl);Ee("k",Et,cl);Ee("HH",Et,sr);Ee("hh",Et,sr);Ee("kk",Et,sr);Ee("hmm",bj);Ee("hmmss",_j);Ee("Hmm",bj);Ee("Hmmss",_j);vt(["H","HH"],Xt);vt(["k","kk"],function(e,t,n){var r=st(e);t[Xt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[Xt]=st(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[Xt]=st(e.substr(0,r)),t[Rr]=st(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=st(e.substr(0,r)),t[Rr]=st(e.substr(r,2)),t[Ts]=st(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[Xt]=st(e.substr(0,r)),t[Rr]=st(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=st(e.substr(0,r)),t[Rr]=st(e.substr(r,2)),t[Ts]=st(e.substr(s))});function M3(e){return(e+"").toLowerCase().charAt(0)==="p"}var L3=/[ap]\.?m?\.?/i,z3=ul("Hours",!0);function F3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Oj={calendar:E4,longDateFormat:R4,invalidDate:D4,ordinal:I4,dayOfMonthOrdinalParse:M4,relativeTime:z4,months:e3,monthsShort:Cj,week:f3,weekdays:x3,weekdaysMin:w3,weekdaysShort:Rj,meridiemParse:L3},Pt={},Tl={},Rc;function $3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Tb(e){return e&&e.toLowerCase().replace("_","-")}function U3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=Tb(e[t]).split("-"),n=o.length,r=Tb(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Nh(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&$3(o,r)>=n-1)break;n--}t++}return Rc}function V3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Nh(e){var t=null,n;if(Pt[e]===void 0&&typeof Ed<"u"&&Ed&&Ed.exports&&V3(e))try{t=Rc._abbr,n=require,n("./locale/"+e),ko(t)}catch{Pt[e]=null}return Pt[e]}function ko(e,t){var n;return e&&(Pn(t)?n=Zs(e):n=dx(e,t),n?Rc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Rc._abbr}function dx(e,t){if(t!==null){var n,r=Oj;if(t.abbr=e,Pt[e]!=null)yj("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."),r=Pt[e]._config;else if(t.parentLocale!=null)if(Pt[t.parentLocale]!=null)r=Pt[t.parentLocale]._config;else if(n=Nh(t.parentLocale),n!=null)r=n._config;else return Tl[t.parentLocale]||(Tl[t.parentLocale]=[]),Tl[t.parentLocale].push({name:e,config:t}),null;return Pt[e]=new tx(Eg(r,t)),Tl[e]&&Tl[e].forEach(function(s){dx(s.name,s.config)}),ko(e),Pt[e]}else return delete Pt[e],null}function B3(e,t){if(t!=null){var n,r,s=Oj;Pt[e]!=null&&Pt[e].parentLocale!=null?Pt[e].set(Eg(Pt[e]._config,t)):(r=Nh(e),r!=null&&(s=r._config),t=Eg(s,t),r==null&&(t.abbr=e),n=new tx(t),n.parentLocale=Pt[e],Pt[e]=n),ko(e)}else Pt[e]!=null&&(Pt[e].parentLocale!=null?(Pt[e]=Pt[e].parentLocale,e===ko()&&ko(e)):Pt[e]!=null&&delete Pt[e]);return Pt[e]}function Zs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Rc;if(!Fr(e)){if(t=Nh(e),t)return t;e=[e]}return U3(e)}function W3(){return Ng(Pt)}function fx(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[Ns]<0||n[Ns]>11?Ns:n[Qr]<1||n[Qr]>ax(n[yn],n[Ns])?Qr:n[Xt]<0||n[Xt]>24||n[Xt]===24&&(n[Rr]!==0||n[Ts]!==0||n[ei]!==0)?Xt:n[Rr]<0||n[Rr]>59?Rr:n[Ts]<0||n[Ts]>59?Ts:n[ei]<0||n[ei]>999?ei:-1,Qe(e)._overflowDayOfYear&&(t<yn||t>Qr)&&(t=Qr),Qe(e)._overflowWeeks&&t===-1&&(t=Z4),Qe(e)._overflowWeekday&&t===-1&&(t=G4),Qe(e).overflow=t),e}var H3=/^\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)?)?$/,K3=/^\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)?)?$/,Y3=/Z|[+-]\d\d(?::?\d\d)?/,Ju=[["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]],sp=[["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/]],Z3=/^\/?Date\((-?\d+)/i,G3=/^(?:(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}))$/,q3={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 Ij(e){var t,n,r=e._i,s=H3.exec(r)||K3.exec(r),o,i,l,c,u=Ju.length,d=sp.length;if(s){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ju[t][1].exec(s[1])){i=Ju[t][0],o=Ju[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(sp[t][1].exec(s[3])){l=(s[2]||" ")+sp[t][0];break}if(l==null){e._isValid=!1;return}}if(!o&&l!=null){e._isValid=!1;return}if(s[4])if(Y3.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),mx(e)}else e._isValid=!1}function X3(e,t,n,r,s,o){var i=[Q3(e),Cj.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function Q3(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function J3(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function e5(e,t,n){if(e){var r=Rj.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function t5(e,t,n){if(e)return q3[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function Mj(e){var t=G3.exec(J3(e._i)),n;if(t){if(n=X3(t[4],t[3],t[2],t[5],t[6],t[7]),!e5(t[1],n,e))return;e._a=n,e._tzm=t5(t[8],t[9],t[10]),e._d=Tc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function n5(e){var t=Z3.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Ij(e),e._isValid===!1)delete e._isValid;else return;if(Mj(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Se.createFromInputFallback(e)}Se.createFromInputFallback=gr("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 Gi(e,t,n){return e??t??n}function r5(e){var t=new Date(Se.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function hx(e){var t,n,r=[],s,o,i;if(!e._d){for(s=r5(e),e._w&&e._a[Qr]==null&&e._a[Ns]==null&&s5(e),e._dayOfYear!=null&&(i=Gi(e._a[yn],s[yn]),(e._dayOfYear>Jl(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Tc(i,0,e._dayOfYear),e._a[Ns]=n.getUTCMonth(),e._a[Qr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Xt]===24&&e._a[Rr]===0&&e._a[Ts]===0&&e._a[ei]===0&&(e._nextDay=!0,e._a[Xt]=0),e._d=(e._useUTC?Tc:u3).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function s5(e){var t,n,r,s,o,i,l,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Gi(t.GG,e._a[yn],Pc(jt(),1,4).year),r=Gi(t.W,1),s=Gi(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Pc(jt(),o,i),n=Gi(t.gg,e._a[yn],u.year),r=Gi(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>Ds(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(l=Pj(n,r,s,o,i),e._a[yn]=l.year,e._dayOfYear=l.dayOfYear)}Se.ISO_8601=function(){};Se.RFC_2822=function(){};function mx(e){if(e._f===Se.ISO_8601){Ij(e);return}if(e._f===Se.RFC_2822){Mj(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,l=t.length,c=0,u,d;for(s=vj(e._f,e._locale).match(nx)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match(H4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Na[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),Y4(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=l-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[Xt]<=12&&Qe(e).bigHour===!0&&e._a[Xt]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[Xt]=o5(e._locale,e._a[Xt],e._meridiem),u=Qe(e).era,u!==null&&(e._a[yn]=e._locale.erasConvertYear(u,e._a[yn])),hx(e),fx(e)}function o5(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function i5(e){var t,n,r,s,o,i,l=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=ex({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],mx(t),Jv(t)&&(i=!0),o+=Qe(t).charsLeftOver,o+=Qe(t).unusedTokens.length*10,Qe(t).score=o,l?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(l=!0));ho(e,n||t)}function a5(e){if(!e._d){var t=rx(e._i),n=t.day===void 0?t.date:t.day;e._a=pj([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),hx(e)}}function l5(e){var t=new du(fx(Lj(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Lj(e){var t=e._i,n=e._f;return e._locale=e._locale||Zs(e._l),t===null||n===void 0&&t===""?bh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),$r(t)?new du(fx(t)):(uu(t)?e._d=t:Fr(n)?i5(e):n?mx(e):c5(e),Jv(e)||(e._d=null),e))}function c5(e){var t=e._i;Pn(t)?e._d=new Date(Se.now()):uu(t)?e._d=new Date(t.valueOf()):typeof t=="string"?n5(e):Fr(t)?(e._a=pj(t.slice(0),function(n){return parseInt(n,10)}),hx(e)):ii(t)?a5(e):Us(t)?e._d=new Date(t):Se.createFromInputFallback(e)}function zj(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ii(e)&&Qv(e)||Fr(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,l5(o)}function jt(e,t,n,r){return zj(e,t,n,r,!1)}var u5=gr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=jt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:bh()}),d5=gr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=jt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:bh()});function Fj(e,t){var n,r;if(t.length===1&&Fr(t[0])&&(t=t[0]),!t.length)return jt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function f5(){var e=[].slice.call(arguments,0);return Fj("isBefore",e)}function h5(){var e=[].slice.call(arguments,0);return Fj("isAfter",e)}var m5=function(){return Date.now?Date.now():+new Date},Pl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function p5(e){var t,n=!1,r,s=Pl.length;for(t in e)if(dt(e,t)&&!(Ut.call(Pl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[Pl[r]]){if(n)return!1;parseFloat(e[Pl[r]])!==st(e[Pl[r]])&&(n=!0)}return!0}function g5(){return this._isValid}function y5(){return Hr(NaN)}function Th(e){var t=rx(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=p5(t),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Zs(),this._bubble()}function _d(e){return e instanceof Th}function Pg(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function v5(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)st(e[i])!==st(t[i])&&o++;return o+s}function $j(e,t){Le(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+ls(~~(n/60),2)+t+ls(~~n%60,2)})}$j("Z",":");$j("ZZ","");Ee("Z",jh);Ee("ZZ",jh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=px(jh,e)});var x5=/([\+\-]|\d\d)/gi;function px(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(x5)||["-",0,0],o=+(s[1]*60)+st(s[2]),o===0?0:s[0]==="+"?o:-o)}function gx(e,t){var n,r;return t._isUTC?(n=t.clone(),r=($r(e)||uu(e)?e.valueOf():jt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Se.updateOffset(n,!1),n):jt(e).local()}function Rg(e){return-Math.round(e._d.getTimezoneOffset())}Se.updateOffset=function(){};function w5(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=px(jh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Rg(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?Bj(this,Hr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Se.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Rg(this)}function b5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function _5(e){return this.utcOffset(0,e)}function S5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Rg(this),"m")),this}function k5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=px(B4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function C5(e){return this.isValid()?(e=e?jt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function j5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function E5(){if(!Pn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ex(e,this),e=Lj(e),e._a?(t=e._isUTC?ds(e._a):jt(e._a),this._isDSTShifted=this.isValid()&&v5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function N5(){return this.isValid()?!this._isUTC:!1}function T5(){return this.isValid()?this._isUTC:!1}function Uj(){return this.isValid()?this._isUTC&&this._offset===0:!1}var P5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,R5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Hr(e,t){var n=e,r=null,s,o,i;return _d(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Us(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=P5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:st(r[Qr])*s,h:st(r[Xt])*s,m:st(r[Rr])*s,s:st(r[Ts])*s,ms:st(Pg(r[ei]*1e3))*s}):(r=R5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Bo(r[2],s),M:Bo(r[3],s),w:Bo(r[4],s),d:Bo(r[5],s),h:Bo(r[6],s),m:Bo(r[7],s),s:Bo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=A5(jt(n.from),jt(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Th(n),_d(e)&&dt(e,"_locale")&&(o._locale=e._locale),_d(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}Hr.fn=Th.prototype;Hr.invalid=y5;function Bo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pb(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function A5(e,t){var n;return e.isValid()&&t.isValid()?(t=gx(t,e),e.isBefore(t)?n=Pb(e,t):(n=Pb(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Vj(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(yj(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=Hr(n,r),Bj(this,s,e),this}}function Bj(e,t,n,r){var s=t._milliseconds,o=Pg(t._days),i=Pg(t._months);e.isValid()&&(r=r??!0,i&&Ej(e,Nc(e,"Month")+i*n),o&&kj(e,"Date",Nc(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&Se.updateOffset(e,o||i))}var D5=Vj(1,"add"),O5=Vj(-1,"subtract");function Wj(e){return typeof e=="string"||e instanceof String}function I5(e){return $r(e)||uu(e)||Wj(e)||Us(e)||L5(e)||M5(e)||e===null||e===void 0}function M5(e){var t=ii(e)&&!Qv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function L5(e){var t=Fr(e),n=!1;return t&&(n=e.filter(function(r){return!Us(r)&&Wj(e)}).length===0),t&&n}function z5(e){var t=ii(e)&&!Qv(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function F5(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function $5(e,t){arguments.length===1&&(arguments[0]?I5(arguments[0])?(e=arguments[0],t=void 0):z5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||jt(),r=gx(n,this).startOf("day"),s=Se.calendarFormat(this,r)||"sameElse",o=t&&(fs(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,jt(n)))}function U5(){return new du(this)}function V5(e,t){var n=$r(e)?e:jt(e);return this.isValid()&&n.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function B5(e,t){var n=$r(e)?e:jt(e);return this.isValid()&&n.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function W5(e,t,n,r){var s=$r(e)?e:jt(e),o=$r(t)?t:jt(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function H5(e,t){var n=$r(e)?e:jt(e),r;return this.isValid()&&n.isValid()?(t=yr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function K5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Y5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Z5(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=gx(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=yr(t),t){case"year":o=Sd(this,r)/12;break;case"month":o=Sd(this,r);break;case"quarter":o=Sd(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:cr(o)}function Sd(e,t){if(e.date()<t.date())return-Sd(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}Se.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Se.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function G5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function q5(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?bd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):fs(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",bd(n,"Z")):bd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function X5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function Q5(e){e||(e=this.isUtc()?Se.defaultFormatUtc:Se.defaultFormat);var t=bd(this,e);return this.localeData().postformat(t)}function J5(e,t){return this.isValid()&&($r(e)&&e.isValid()||jt(e).isValid())?Hr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function e6(e){return this.from(jt(),e)}function t6(e,t){return this.isValid()&&($r(e)&&e.isValid()||jt(e).isValid())?Hr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function n6(e){return this.to(jt(),e)}function Hj(e){var t;return e===void 0?this._locale._abbr:(t=Zs(e),t!=null&&(this._locale=t),this)}var Kj=gr("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 Yj(){return this._locale}var df=1e3,Ta=60*df,ff=60*Ta,Zj=(365*400+97)*24*ff;function Pa(e,t){return(e%t+t)%t}function Gj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Zj:new Date(e,t,n).valueOf()}function qj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Zj:Date.UTC(e,t,n)}function r6(e){var t,n;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?qj:Gj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Pa(t+(this._isUTC?0:this.utcOffset()*Ta),ff);break;case"minute":t=this._d.valueOf(),t-=Pa(t,Ta);break;case"second":t=this._d.valueOf(),t-=Pa(t,df);break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function s6(e){var t,n;if(e=yr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?qj:Gj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ff-Pa(t+(this._isUTC?0:this.utcOffset()*Ta),ff)-1;break;case"minute":t=this._d.valueOf(),t+=Ta-Pa(t,Ta)-1;break;case"second":t=this._d.valueOf(),t+=df-Pa(t,df)-1;break}return this._d.setTime(t),Se.updateOffset(this,!0),this}function o6(){return this._d.valueOf()-(this._offset||0)*6e4}function i6(){return Math.floor(this.valueOf()/1e3)}function a6(){return new Date(this.valueOf())}function l6(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function c6(){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 u6(){return this.isValid()?this.toISOString():null}function d6(){return Jv(this)}function f6(){return ho({},Qe(this))}function h6(){return Qe(this).overflow}function m6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",yx);Ee("NN",yx);Ee("NNN",yx);Ee("NNNN",C6);Ee("NNNNN",j6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",ll);Ee("yy",ll);Ee("yyy",ll);Ee("yyyy",ll);Ee("yo",E6);vt(["y","yy","yyy","yyyy"],yn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[yn]=n._locale.eraYearOrdinalParse(e,s):t[yn]=parseInt(e,10)});function p6(e,t){var n,r,s,o=this._eras||Zs("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=Se(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=Se(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function g6(e,t,n){var r,s,o=this.eras(),i,l,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),l=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([i,l,c].indexOf(e)>=0)return o[r]}function y6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Se(e.since).year():Se(e.since).year()+(t-e.offset)*n}function v6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function x6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function w6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function b6(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-Se(s[e].since).year())*n+s[e].offset;return this.year()}function _6(e){return dt(this,"_erasNameRegex")||vx.call(this),e?this._erasNameRegex:this._erasRegex}function S6(e){return dt(this,"_erasAbbrRegex")||vx.call(this),e?this._erasAbbrRegex:this._erasRegex}function k6(e){return dt(this,"_erasNarrowRegex")||vx.call(this),e?this._erasNarrowRegex:this._erasRegex}function yx(e,t){return t.erasAbbrRegex(e)}function C6(e,t){return t.erasNameRegex(e)}function j6(e,t){return t.erasNarrowRegex(e)}function E6(e,t){return t._eraYearOrdinalRegex||ll}function vx(){var e=[],t=[],n=[],r=[],s,o,i,l,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=As(u[s].name),l=As(u[s].abbr),c=As(u[s].narrow),t.push(i),e.push(l),n.push(c),r.push(i),r.push(l),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ph(e,t){Le(0,[e,e.length],0,t)}Ph("gggg","weekYear");Ph("ggggg","weekYear");Ph("GGGG","isoWeekYear");Ph("GGGGG","isoWeekYear");Ee("G",Ch);Ee("g",Ch);Ee("GG",Et,sr);Ee("gg",Et,sr);Ee("GGGG",ox,sx);Ee("gggg",ox,sx);Ee("GGGGG",kh,_h);Ee("ggggg",kh,_h);hu(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=st(e)});hu(["gg","GG"],function(e,t,n,r){t[r]=Se.parseTwoDigitYear(e)});function N6(e){return Xj.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function T6(e){return Xj.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function P6(){return Ds(this.year(),1,4)}function R6(){return Ds(this.isoWeekYear(),1,4)}function A6(){var e=this.localeData()._week;return Ds(this.year(),e.dow,e.doy)}function D6(){var e=this.localeData()._week;return Ds(this.weekYear(),e.dow,e.doy)}function Xj(e,t,n,r,s){var o;return e==null?Pc(this,r,s).year:(o=Ds(e,r,s),t>o&&(t=o),O6.call(this,e,t,n,r,s))}function O6(e,t,n,r,s){var o=Pj(e,t,n,r,s),i=Tc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",xj);vt("Q",function(e,t){t[Ns]=(st(e)-1)*3});function I6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",Et,cl);Ee("DD",Et,sr);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Qr);vt("Do",function(e,t){t[Qr]=st(e.match(Et)[0])});var Qj=ul("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",Sh);Ee("DDDD",wj);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=st(e)});function M6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",Et,ix);Ee("mm",Et,sr);vt(["m","mm"],Rr);var L6=ul("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",Et,ix);Ee("ss",Et,sr);vt(["s","ss"],Ts);var z6=ul("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",Sh,xj);Ee("SS",Sh,sr);Ee("SSS",Sh,wj);var mo,Jj;for(mo="SSSS";mo.length<=9;mo+="S")Ee(mo,ll);function F6(e,t){t[ei]=st(("0."+e)*1e3)}for(mo="S";mo.length<=9;mo+="S")vt(mo,F6);Jj=ul("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function $6(){return this._isUTC?"UTC":""}function U6(){return this._isUTC?"Coordinated Universal Time":""}var ue=du.prototype;ue.add=D5;ue.calendar=$5;ue.clone=U5;ue.diff=Z5;ue.endOf=s6;ue.format=Q5;ue.from=J5;ue.fromNow=e6;ue.to=t6;ue.toNow=n6;ue.get=X4;ue.invalidAt=h6;ue.isAfter=V5;ue.isBefore=B5;ue.isBetween=W5;ue.isSame=H5;ue.isSameOrAfter=K5;ue.isSameOrBefore=Y5;ue.isValid=d6;ue.lang=Kj;ue.locale=Hj;ue.localeData=Yj;ue.max=d5;ue.min=u5;ue.parsingFlags=f6;ue.set=Q4;ue.startOf=r6;ue.subtract=O5;ue.toArray=l6;ue.toObject=c6;ue.toDate=a6;ue.toISOString=q5;ue.inspect=X5;typeof Symbol<"u"&&Symbol.for!=null&&(ue[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ue.toJSON=u6;ue.toString=G5;ue.unix=i6;ue.valueOf=o6;ue.creationData=m6;ue.eraName=v6;ue.eraNarrow=x6;ue.eraAbbr=w6;ue.eraYear=b6;ue.year=Sj;ue.isLeapYear=q4;ue.weekYear=N6;ue.isoWeekYear=T6;ue.quarter=ue.quarters=I6;ue.month=Nj;ue.daysInMonth=a3;ue.week=ue.weeks=p3;ue.isoWeek=ue.isoWeeks=g3;ue.weeksInYear=A6;ue.weeksInWeekYear=D6;ue.isoWeeksInYear=P6;ue.isoWeeksInISOWeekYear=R6;ue.date=Qj;ue.day=ue.days=T3;ue.weekday=P3;ue.isoWeekday=R3;ue.dayOfYear=M6;ue.hour=ue.hours=z3;ue.minute=ue.minutes=L6;ue.second=ue.seconds=z6;ue.millisecond=ue.milliseconds=Jj;ue.utcOffset=w5;ue.utc=_5;ue.local=S5;ue.parseZone=k5;ue.hasAlignedHourOffset=C5;ue.isDST=j5;ue.isLocal=N5;ue.isUtcOffset=T5;ue.isUtc=Uj;ue.isUTC=Uj;ue.zoneAbbr=$6;ue.zoneName=U6;ue.dates=gr("dates accessor is deprecated. Use date instead.",Qj);ue.months=gr("months accessor is deprecated. Use month instead",Nj);ue.years=gr("years accessor is deprecated. Use year instead",Sj);ue.zone=gr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",b5);ue.isDSTShifted=gr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",E5);function V6(e){return jt(e*1e3)}function B6(){return jt.apply(null,arguments).parseZone()}function eE(e){return e}var ft=tx.prototype;ft.calendar=N4;ft.longDateFormat=A4;ft.invalidDate=O4;ft.ordinal=L4;ft.preparse=eE;ft.postformat=eE;ft.relativeTime=F4;ft.pastFuture=$4;ft.set=j4;ft.eras=p6;ft.erasParse=g6;ft.erasConvertYear=y6;ft.erasAbbrRegex=S6;ft.erasNameRegex=_6;ft.erasNarrowRegex=k6;ft.months=r3;ft.monthsShort=s3;ft.monthsParse=i3;ft.monthsRegex=c3;ft.monthsShortRegex=l3;ft.week=d3;ft.firstDayOfYear=m3;ft.firstDayOfWeek=h3;ft.weekdays=k3;ft.weekdaysMin=j3;ft.weekdaysShort=C3;ft.weekdaysParse=N3;ft.weekdaysRegex=A3;ft.weekdaysShortRegex=D3;ft.weekdaysMinRegex=O3;ft.isPM=M3;ft.meridiem=F3;function hf(e,t,n,r){var s=Zs(),o=ds().set(r,t);return s[n](o,e)}function tE(e,t,n){if(Us(e)&&(t=e,e=void 0),e=e||"",t!=null)return hf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=hf(e,r,n,"month");return s}function xx(e,t,n,r){typeof e=="boolean"?(Us(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Us(t)&&(n=t,t=void 0),t=t||"");var s=Zs(),o=e?s._week.dow:0,i,l=[];if(n!=null)return hf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)l[i]=hf(t,(i+o)%7,r,"day");return l}function W6(e,t){return tE(e,t,"months")}function H6(e,t){return tE(e,t,"monthsShort")}function K6(e,t,n){return xx(e,t,n,"weekdays")}function Y6(e,t,n){return xx(e,t,n,"weekdaysShort")}function Z6(e,t,n){return xx(e,t,n,"weekdaysMin")}ko("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,n=st(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Se.lang=gr("moment.lang is deprecated. Use moment.locale instead.",ko);Se.langData=gr("moment.langData is deprecated. Use moment.localeData instead.",Zs);var xs=Math.abs;function G6(){var e=this._data;return this._milliseconds=xs(this._milliseconds),this._days=xs(this._days),this._months=xs(this._months),e.milliseconds=xs(e.milliseconds),e.seconds=xs(e.seconds),e.minutes=xs(e.minutes),e.hours=xs(e.hours),e.months=xs(e.months),e.years=xs(e.years),this}function nE(e,t,n,r){var s=Hr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function q6(e,t){return nE(this,e,t,1)}function X6(e,t){return nE(this,e,t,-1)}function Rb(e){return e<0?Math.floor(e):Math.ceil(e)}function Q6(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Rb(Ag(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=cr(e/1e3),r.seconds=s%60,o=cr(s/60),r.minutes=o%60,i=cr(o/60),r.hours=i%24,t+=cr(i/24),c=cr(rE(t)),n+=c,t-=Rb(Ag(c)),l=cr(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function rE(e){return e*4800/146097}function Ag(e){return e*146097/4800}function J6(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=yr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+rE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ag(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Gs(e){return function(){return this.as(e)}}var sE=Gs("ms"),e8=Gs("s"),t8=Gs("m"),n8=Gs("h"),r8=Gs("d"),s8=Gs("w"),o8=Gs("M"),i8=Gs("Q"),a8=Gs("y"),l8=sE;function c8(){return Hr(this)}function u8(e){return e=yr(e),this.isValid()?this[e+"s"]():NaN}function Ri(e){return function(){return this.isValid()?this._data[e]:NaN}}var d8=Ri("milliseconds"),f8=Ri("seconds"),h8=Ri("minutes"),m8=Ri("hours"),p8=Ri("days"),g8=Ri("months"),y8=Ri("years");function v8(){return cr(this.days()/7)}var Ss=Math.round,pa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function x8(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function w8(e,t,n,r){var s=Hr(e).abs(),o=Ss(s.as("s")),i=Ss(s.as("m")),l=Ss(s.as("h")),c=Ss(s.as("d")),u=Ss(s.as("M")),d=Ss(s.as("w")),f=Ss(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=r,x8.apply(null,h)}function b8(e){return e===void 0?Ss:typeof e=="function"?(Ss=e,!0):!1}function _8(e,t){return pa[e]===void 0?!1:t===void 0?pa[e]:(pa[e]=t,e==="s"&&(pa.ss=t-1),!0)}function S8(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=pa,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},pa,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=w8(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var op=Math.abs;function Hi(e){return(e>0)-(e<0)||+e}function Rh(){if(!this.isValid())return this.localeData().invalidDate();var e=op(this._milliseconds)/1e3,t=op(this._days),n=op(this._months),r,s,o,i,l=this.asSeconds(),c,u,d,f;return l?(r=cr(e/60),s=cr(r/60),e%=60,r%=60,o=cr(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=Hi(this._months)!==Hi(l)?"-":"",d=Hi(this._days)!==Hi(l)?"-":"",f=Hi(this._milliseconds)!==Hi(l)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var lt=Th.prototype;lt.isValid=g5;lt.abs=G6;lt.add=q6;lt.subtract=X6;lt.as=J6;lt.asMilliseconds=sE;lt.asSeconds=e8;lt.asMinutes=t8;lt.asHours=n8;lt.asDays=r8;lt.asWeeks=s8;lt.asMonths=o8;lt.asQuarters=i8;lt.asYears=a8;lt.valueOf=l8;lt._bubble=Q6;lt.clone=c8;lt.get=u8;lt.milliseconds=d8;lt.seconds=f8;lt.minutes=h8;lt.hours=m8;lt.days=p8;lt.weeks=v8;lt.months=g8;lt.years=y8;lt.humanize=S8;lt.toISOString=Rh;lt.toString=Rh;lt.toJSON=Rh;lt.locale=Hj;lt.localeData=Yj;lt.toIsoString=gr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rh);lt.lang=Kj;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",Ch);Ee("X",W4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(st(e))});//! moment.js
Se.version="2.30.1";k4(jt);Se.fn=ue;Se.min=f5;Se.max=h5;Se.now=m5;Se.utc=ds;Se.unix=V6;Se.months=W6;Se.isDate=uu;Se.locale=ko;Se.invalid=bh;Se.duration=Hr;Se.isMoment=$r;Se.weekdays=K6;Se.parseZone=B6;Se.localeData=Zs;Se.isDuration=_d;Se.monthsShort=H6;Se.weekdaysMin=Z6;Se.defineLocale=dx;Se.updateLocale=B3;Se.locales=W3;Se.weekdaysShort=Y6;Se.normalizeUnits=yr;Se.relativeTimeRounding=b8;Se.relativeTimeThreshold=_8;Se.calendarFormat=F5;Se.prototype=ue;Se.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 k8=async()=>await rt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),vr=async e=>e.id?await rt().collection("access").update(e.id,e):await rt().collection("access").create(e),C8=async e=>(e.deleted=Se.utc().format("YYYY-MM-DD HH:mm:ss"),await rt().collection("access").update(e.id,e)),Ab=async()=>await rt().collection("access_groups").getFullList({sort:"-created",expand:"access"}),j8=async e=>{const t=rt();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)},E8=async e=>{const t=rt();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Db=async e=>await rt().collection("access_groups").update(e.id,e),N8=async()=>{try{return await rt().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},wx=async e=>{try{return await rt().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ur=async e=>{const t=rt();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},T8=(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(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};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}},oE=y.createContext({}),Jt=()=>y.useContext(oE),P8=({children:e})=>{const[t,n]=y.useReducer(T8,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const d=await k8();n({type:"SET_ACCESSES",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await N8();n({type:"SET_EMAILS",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await Ab();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=y.useCallback(async()=>{const u=await Ab();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=y.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=y.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),l=y.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=y.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return a.jsx(oE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:l,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})};var R8="Separator",Ob="horizontal",A8=["horizontal","vertical"],iE=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ob,...s}=e,o=D8(r)?r:Ob,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return a.jsx(Re.div,{"data-orientation":o,...l,...s,ref:t})});iE.displayName=R8;function D8(e){return A8.includes(e)}var aE=iE;const Nr=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(aE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Nr.displayName=aE.displayName;const O8="Certimate v0.2.4",lE=()=>{const{t:e}=Ve();return a.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[a.jsx("div",{className:""}),a.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[a.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[a.jsx(tI,{size:16}),a.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),a.jsx(Nr,{orientation:"vertical",className:"mx-2"}),a.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:O8})]})]})};function I8(){const e=rr(),t=Br(),{t:n}=Ve();if(!rt().authStore.isValid||!rt().authStore.isAdmin)return a.jsx(qS,{to:"/login"});const r=t.pathname,s=l=>l==r?"bg-muted text-primary":"text-muted-foreground",o=()=>{rt().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return a.jsx(a.Fragment,{children:a.jsx(P8,{children:a.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[a.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:a.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[a.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:a.jsxs(_n,{to:"/",className:"flex items-center gap-2 font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),a.jsx("div",{className:"flex-1",children:a.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[a.jsxs(_n,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[a.jsx(Gw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),a.jsxs(_n,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[a.jsx(yg,{className:"h-4 w-4"}),n("domain.page.title")]}),a.jsxs(_n,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[a.jsx(qw,{className:"h-4 w-4"}),n("access.page.title")]}),a.jsxs(_n,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[a.jsx(Zw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),a.jsxs("div",{className:"flex flex-col",children:[a.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:[a.jsxs(Yv,{children:[a.jsx(Zv,{asChild:!0,children:a.jsxs(Te,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[a.jsx(hI,{className:"h-5 w-5 dark:text-white"}),a.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),a.jsx(wh,{side:"left",className:"flex flex-col",children:a.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[a.jsxs(_n,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[a.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),a.jsx("span",{className:"dark:text-white",children:"Certimate"}),a.jsx("span",{className:"sr-only",children:"Certimate"})]}),a.jsxs(_n,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[a.jsx(Gw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),a.jsxs(_n,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[a.jsx(yg,{className:"h-5 w-5"}),n("domain.page.title")]}),a.jsxs(_n,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[a.jsx(qw,{className:"h-5 w-5"}),n("access.page.title")]}),a.jsxs(_n,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[a.jsx(Zw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),a.jsx("div",{className:"w-full flex-1"}),a.jsx(ZF,{}),a.jsx(WF,{}),a.jsxs(zv,{children:[a.jsx(Fv,{asChild:!0,children:a.jsxs(Te,{variant:"secondary",size:"icon",className:"rounded-full",children:[a.jsx(iI,{className:"h-5 w-5"}),a.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),a.jsxs(vh,{align:"end",children:[a.jsx(oi,{onClick:i,children:n("common.menu.settings")}),a.jsx(oi,{onClick:o,children:n("common.menu.logout")})]})]})]}),a.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[a.jsx(sv,{}),a.jsx(lE,{})]})]})]})})})}var M8="VisuallyHidden",mu=y.forwardRef((e,t)=>a.jsx(Re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));mu.displayName=M8;var L8=mu,[Ah,t9]=fn("Tooltip",[il]),Dh=il(),cE="TooltipProvider",z8=700,Dg="tooltip.open",[F8,bx]=Ah(cE),_x=e=>{const{__scopeTooltip:t,delayDuration:n=z8,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,l]=y.useState(!0),c=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),a.jsx(F8,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};_x.displayName=cE;var Oh="Tooltip",[$8,Ih]=Ah(Oh),uE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:l}=e,c=bx(Oh,e.__scopeTooltip),u=Dh(t),[d,f]=y.useState(null),h=Yn(),p=y.useRef(0),x=i??c.disableHoverableContent,m=l??c.delayDuration,v=y.useRef(!1),[g=!1,w]=Qn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Dg))):c.onClose(),o==null||o(T)}}),b=y.useMemo(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),_=y.useCallback(()=>{window.clearTimeout(p.current),v.current=!1,w(!0)},[w]),C=y.useCallback(()=>{window.clearTimeout(p.current),w(!1)},[w]),j=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,w(!0)},m)},[m,w]);return y.useEffect(()=>()=>window.clearTimeout(p.current),[]),a.jsx(Sv,{...u,children:a.jsx($8,{scope:t,contentId:h,open:g,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:y.useCallback(()=>{x?C():window.clearTimeout(p.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};uE.displayName=Oh;var Og="TooltipTrigger",dE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ih(Og,n),o=bx(Og,n),i=Dh(n),l=y.useRef(null),c=Ze(t,l,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx(kv,{asChild:!0,...i,children:a.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:de(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.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)})})});dE.displayName=Og;var U8="TooltipPortal",[n9,V8]=Ah(U8,{forceMount:void 0}),Va="TooltipContent",Sx=y.forwardRef((e,t)=>{const n=V8(Va,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Ih(Va,e.__scopeTooltip);return a.jsx(hn,{present:r||i.open,children:i.disableHoverableContent?a.jsx(fE,{side:s,...o,ref:t}):a.jsx(B8,{side:s,...o,ref:t})})}),B8=y.forwardRef((e,t)=>{const n=Ih(Va,e.__scopeTooltip),r=bx(Va,e.__scopeTooltip),s=y.useRef(null),o=Ze(t,s),[i,l]=y.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{l(null),f(!1)},[f]),p=y.useCallback((x,m)=>{const v=x.currentTarget,g={x:x.clientX,y:x.clientY},w=Y8(g,v.getBoundingClientRect()),b=Z8(g,w),_=G8(m.getBoundingClientRect()),C=X8([...b,..._]);l(C),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(c&&d){const x=v=>p(v,d),m=v=>p(v,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),y.useEffect(()=>{if(i){const x=m=>{const v=m.target,g={x:m.clientX,y:m.clientY},w=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),b=!q8(g,i);w?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),a.jsx(fE,{...e,ref:o})}),[W8,H8]=Ah(Oh,{isInside:!1}),fE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=Ih(Va,n),u=Dh(n),{onClose:d}=c;return y.useEffect(()=>(document.addEventListener(Dg,d),()=>document.removeEventListener(Dg,d)),[d]),y.useEffect(()=>{if(c.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(Cv,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[a.jsx(uv,{children:r}),a.jsx(W8,{scope:n,isInside:!0,children:a.jsx(L8,{id:c.contentId,role:"tooltip",children:s||r})})]})})});Sx.displayName=Va;var hE="TooltipArrow",K8=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dh(n);return H8(hE,n).isInside?null:a.jsx(jv,{...s,...r,ref:t})});K8.displayName=hE;function Y8(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Z8(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function G8(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function q8(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function X8(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Q8(t)}function Q8(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var J8=_x,e$=uE,t$=dE,mE=Sx;const Kt=({when:e,children:t,fallback:n})=>e?t:n,kx=({phase:e,phaseSuccess:t})=>{const{t:n}=Ve();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),a.jsx(Nr,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),a.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),a.jsx(Nr,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),a.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})},n$=J8,pE=e$,gE=t$,yE=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(mE,{ref:r,sideOffset:t,className:re("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),...n}));yE.displayName=mE.displayName;const Cx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return a.jsx(a.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?a.jsx(oI,{size:16,className:"text-green-700"}):a.jsx(a.Fragment,{children:t(e.phase).length?a.jsx(n$,{children:a.jsxs(pE,{children:[a.jsx(gE,{asChild:!0,className:"cursor-pointer",children:a.jsx(Kw,{size:16,className:"text-red-700"})}),a.jsx(yE,{className:"max-w-[35em]",children:t(e.phase)})]})}):a.jsx(Kw,{size:16,className:"text-red-700"})})})},vE=({className:e,...t})=>a.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});vE.displayName="Pagination";const xE=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));xE.displayName="PaginationContent";const Ig=y.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,className:re("",e),...t}));Ig.displayName="PaginationItem";const wE=({className:e,isActive:t,size:n="icon",...r})=>a.jsx("a",{"aria-current":t?"page":void 0,className:re(ch({variant:t?"outline":"ghost",size:n}),e),...r});wE.displayName="PaginationLink";const bE=({className:e,...t})=>{const{t:n}=Ve();return a.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[a.jsx(aI,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};bE.displayName="PaginationEllipsis";const _E=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<h-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(l,c,u=1)=>{let d=l;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return a.jsx(a.Fragment,{children:a.jsx(vE,{className:"dark:text-stone-200 justify-end mt-3",children:a.jsx(xE,{children:i.map((l,c)=>l==="..."?a.jsx(Ig,{children:a.jsx(bE,{})},c):a.jsx(Ig,{children:a.jsx(wE,{href:"#",isActive:t==l,onClick:u=>{u.preventDefault(),n(l)},children:l})},c))})})})};var SE="AlertDialog",[r$,r9]=fn(SE,[YC]),qs=YC(),kE=e=>{const{__scopeAlertDialog:t,...n}=e,r=qs(t);return a.jsx(Wv,{...r,...n,modal:!0})};kE.displayName=SE;var s$="AlertDialogTrigger",CE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=qs(n);return a.jsx(Hv,{...s,...r,ref:t})});CE.displayName=s$;var o$="AlertDialogPortal",jE=e=>{const{__scopeAlertDialog:t,...n}=e,r=qs(t);return a.jsx(Kv,{...r,...n})};jE.displayName=o$;var i$="AlertDialogOverlay",EE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=qs(n);return a.jsx(iu,{...s,...r,ref:t})});EE.displayName=i$;var Ra="AlertDialogContent",[a$,l$]=r$(Ra),NE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=qs(n),i=y.useRef(null),l=Ze(t,i),c=y.useRef(null);return a.jsx(e4,{contentName:Ra,titleName:TE,docsSlug:"alert-dialog",children:a.jsx(a$,{scope:n,cancelRef:c,children:a.jsxs(au,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:de(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(uv,{children:r}),a.jsx(u$,{contentRef:i})]})})})});NE.displayName=Ra;var TE="AlertDialogTitle",PE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=qs(n);return a.jsx(lu,{...s,...r,ref:t})});PE.displayName=TE;var RE="AlertDialogDescription",AE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=qs(n);return a.jsx(cu,{...s,...r,ref:t})});AE.displayName=RE;var c$="AlertDialogAction",DE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=qs(n);return a.jsx(xh,{...s,...r,ref:t})});DE.displayName=c$;var OE="AlertDialogCancel",IE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=l$(OE,n),o=qs(n),i=Ze(t,s);return a.jsx(xh,{...o,...r,ref:i})});IE.displayName=OE;var u$=({contentRef:e})=>{const t=`\`${Ra}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Ra}\` by passing a \`${RE}\` 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 \`${Ra}\`. 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 r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},d$=kE,f$=CE,h$=jE,ME=EE,LE=NE,zE=DE,FE=IE,$E=PE,UE=AE;const jx=d$,Ex=f$,m$=h$,VE=y.forwardRef(({className:e,...t},n)=>a.jsx(ME,{className:re("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:n}));VE.displayName=ME.displayName;const Mh=y.forwardRef(({className:e,...t},n)=>a.jsxs(m$,{children:[a.jsx(VE,{}),a.jsx(LE,{ref:n,className:re("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})]}));Mh.displayName=LE.displayName;const Lh=({className:e,...t})=>a.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Lh.displayName="AlertDialogHeader";const zh=({className:e,...t})=>a.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zh.displayName="AlertDialogFooter";const Fh=y.forwardRef(({className:e,...t},n)=>a.jsx($E,{ref:n,className:re("text-lg font-semibold",e),...t}));Fh.displayName=$E.displayName;const $h=y.forwardRef(({className:e,...t},n)=>a.jsx(UE,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));$h.displayName=UE.displayName;const Uh=y.forwardRef(({className:e,...t},n)=>a.jsx(zE,{ref:n,className:re(ch(),e),...t}));Uh.displayName=zE.displayName;const Vh=y.forwardRef(({className:e,...t},n)=>a.jsx(FE,{ref:n,className:re(ch({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vh.displayName=FE.displayName;function Nx(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 Tx="Switch",[p$,s9]=fn(Tx),[g$,y$]=p$(Tx),BE=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,h]=y.useState(null),p=Ze(t,w=>h(w)),x=y.useRef(!1),m=f?!!f.closest("form"):!0,[v=!1,g]=Qn({prop:s,defaultProp:o,onChange:u});return a.jsxs(g$,{scope:n,checked:v,disabled:l,children:[a.jsx(Re.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":KE(v),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:p,onClick:de(e.onClick,w=>{g(b=>!b),m&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})}),m&&a.jsx(v$,{control:f,bubbles:!x.current,name:r,value:c,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}})]})});BE.displayName=Tx;var WE="SwitchThumb",HE=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=y$(WE,n);return a.jsx(Re.span,{"data-state":KE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});HE.displayName=WE;var v$=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=Nx(n),l=wv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function KE(e){return e?"checked":"unchecked"}var YE=BE,x$=HE;const dl=y.forwardRef(({className:e,...t},n)=>a.jsx(YE,{className:re("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:n,children:a.jsx(x$,{className:re("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")})}));dl.displayName=YE.displayName;var Px="ToastProvider",[Rx,w$,b$]=tu("Toast"),[ZE,o9]=fn("Toast",[b$]),[_$,Bh]=ZE(Px),GE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[l,c]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),h=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Px}\`. Expected non-empty \`string\`.`),a.jsx(Rx.Provider,{scope:t,children:a.jsx(_$,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:y.useCallback(()=>d(p=>p+1),[]),onToastRemove:y.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};GE.displayName=Px;var qE="ToastViewport",S$=["F8"],Mg="toast.viewportPause",Lg="toast.viewportResume",XE=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=S$,label:s="Notifications ({hotkey})",...o}=e,i=Bh(qE,n),l=w$(n),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),h=Ze(t,f,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;y.useEffect(()=>{const v=g=>{var b;r.every(_=>g[_]||g.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),y.useEffect(()=>{const v=c.current,g=f.current;if(x&&v&&g){const w=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(Mg);g.dispatchEvent(j),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(Lg);g.dispatchEvent(j),i.isClosePausedRef.current=!1}},_=j=>{!v.contains(j.relatedTarget)&&b()},C=()=>{v.contains(document.activeElement)||b()};return v.addEventListener("focusin",w),v.addEventListener("focusout",_),v.addEventListener("pointermove",w),v.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",b),()=>{v.removeEventListener("focusin",w),v.removeEventListener("focusout",_),v.removeEventListener("pointermove",w),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:v})=>{const w=l().map(b=>{const _=b.ref.current,C=[_,...M$(_)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?w.reverse():w).flat()},[l]);return y.useEffect(()=>{const v=f.current;if(v){const g=w=>{var C,j,T;const b=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!b){const R=document.activeElement,A=w.shiftKey;if(w.target===v&&A){(C=u.current)==null||C.focus();return}const N=m({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(S=>S===R);ip(N.slice(z+1))?w.preventDefault():A?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return v.addEventListener("keydown",g),()=>v.removeEventListener("keydown",g)}},[l,m]),a.jsxs(gM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&a.jsx(zg,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});ip(v)}}),a.jsx(Rx.Slot,{scope:n,children:a.jsx(Re.ol,{tabIndex:-1,...o,ref:h})}),x&&a.jsx(zg,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});ip(v)}})]})});XE.displayName=qE;var QE="ToastFocusProxy",zg=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Bh(QE,n);return a.jsx(mu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&r()}})});zg.displayName=QE;var Wh="Toast",k$="toast.swipeStart",C$="toast.swipeMove",j$="toast.swipeCancel",E$="toast.swipeEnd",JE=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[l=!0,c]=Qn({prop:r,defaultProp:s,onChange:o});return a.jsx(hn,{present:n||l,children:a.jsx(P$,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:It(e.onPause),onResume:It(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`),c(!1)})})})});JE.displayName=Wh;var[N$,T$]=ZE(Wh,{onClose(){}}),P$=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...x}=e,m=Bh(Wh,n),[v,g]=y.useState(null),w=Ze(t,S=>g(S)),b=y.useRef(null),_=y.useRef(null),C=s||m.duration,j=y.useRef(0),T=y.useRef(C),R=y.useRef(0),{onToastAdd:A,onToastRemove:O}=m,Z=It(()=>{var U;(v==null?void 0:v.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),i()}),N=y.useCallback(S=>{!S||S===1/0||(window.clearTimeout(R.current),j.current=new Date().getTime(),R.current=window.setTimeout(Z,S))},[Z]);y.useEffect(()=>{const S=m.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const F=new Date().getTime()-j.current;T.current=T.current-F,window.clearTimeout(R.current),c==null||c()};return S.addEventListener(Mg,J),S.addEventListener(Lg,U),()=>{S.removeEventListener(Mg,J),S.removeEventListener(Lg,U)}}},[m.viewport,C,c,u,N]),y.useEffect(()=>{o&&!m.isClosePausedRef.current&&N(C)},[o,C,m.isClosePausedRef,N]),y.useEffect(()=>(A(),()=>O()),[A,O]);const z=y.useMemo(()=>v?iN(v):null,[v]);return m.viewport?a.jsxs(a.Fragment,{children:[z&&a.jsx(R$,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),a.jsx(N$,{scope:n,onClose:Z,children:Ws.createPortal(a.jsx(Rx.ItemSlot,{scope:n,children:a.jsx(pM,{asChild:!0,onEscapeKeyDown:de(l,()=>{m.isFocusedToastEscapeKeyDownRef.current||Z(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:de(e.onKeyDown,S=>{S.key==="Escape"&&(l==null||l(S.nativeEvent),S.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:de(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:de(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,F=!!_.current,W=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,ve={x:X,y:$},oe={originalEvent:S,delta:ve};F?(_.current=ve,ed(C$,f,oe,{discrete:!1})):Ib(ve,m.swipeDirection,B)?(_.current=ve,ed(k$,d,oe,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:de(e.onPointerUp,S=>{const U=_.current,J=S.target;if(J.hasPointerCapture(S.pointerId)&&J.releasePointerCapture(S.pointerId),_.current=null,b.current=null,U){const F=S.currentTarget,W={originalEvent:S,delta:U};Ib(U,m.swipeDirection,m.swipeThreshold)?ed(E$,p,W,{discrete:!0}):ed(j$,h,W,{discrete:!0}),F.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),R$=e=>{const{__scopeToast:t,children:n,...r}=e,s=Bh(Wh,t),[o,i]=y.useState(!1),[l,c]=y.useState(!1);return O$(()=>i(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(ru,{asChild:!0,children:a.jsx(mu,{...r,children:o&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},A$="ToastTitle",eN=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Re.div,{...r,ref:t})});eN.displayName=A$;var D$="ToastDescription",tN=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(Re.div,{...r,ref:t})});tN.displayName=D$;var nN="ToastAction",rN=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(oN,{altText:n,asChild:!0,children:a.jsx(Ax,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nN}\`. Expected non-empty \`string\`.`),null)});rN.displayName=nN;var sN="ToastClose",Ax=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=T$(sN,n);return a.jsx(oN,{asChild:!0,children:a.jsx(Re.button,{type:"button",...r,ref:t,onClick:de(e.onClick,s.onClose)})})});Ax.displayName=sN;var oN=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function iN(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),I$(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...iN(r))}}),t}function ed(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?fv(s,o):s.dispatchEvent(o)}var Ib=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function O$(e=()=>{}){const t=It(e);an(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function I$(e){return e.nodeType===e.ELEMENT_NODE}function M$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ip(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var L$=GE,aN=XE,lN=JE,cN=eN,uN=tN,dN=rN,fN=Ax;const z$=L$,hN=y.forwardRef(({className:e,...t},n)=>a.jsx(aN,{ref:n,className:re("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}));hN.displayName=aN.displayName;const F$=eu("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"}}),mN=y.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(lN,{ref:r,className:re(F$({variant:t}),e),...n}));mN.displayName=lN.displayName;const $$=y.forwardRef(({className:e,...t},n)=>a.jsx(dN,{ref:n,className:re("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}));$$.displayName=dN.displayName;const pN=y.forwardRef(({className:e,...t},n)=>a.jsx(fN,{ref:n,className:re("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:a.jsx(cv,{className:"h-4 w-4"})}));pN.displayName=fN.displayName;const gN=y.forwardRef(({className:e,...t},n)=>a.jsx(cN,{ref:n,className:re("text-sm font-semibold",e),...t}));gN.displayName=cN.displayName;const yN=y.forwardRef(({className:e,...t},n)=>a.jsx(uN,{ref:n,className:re("text-sm opacity-90",e),...t}));yN.displayName=uN.displayName;const U$=1,V$=1e6;let ap=0;function B$(){return ap=(ap+1)%Number.MAX_SAFE_INTEGER,ap.toString()}const lp=new Map,Mb=e=>{if(lp.has(e))return;const t=setTimeout(()=>{lp.delete(e),ec({type:"REMOVE_TOAST",toastId:e})},V$);lp.set(e,t)},W$=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,U$)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Mb(n):e.toasts.forEach(r=>{Mb(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kd=[];let Cd={toasts:[]};function ec(e){Cd=W$(Cd,e),kd.forEach(t=>{t(Cd)})}function H$({...e}){const t=B$(),n=s=>ec({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ec({type:"DISMISS_TOAST",toastId:t});return ec({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function xr(){const[e,t]=y.useState(Cd);return y.useEffect(()=>(kd.push(t),()=>{const n=kd.indexOf(t);n>-1&&kd.splice(n,1)}),[e]),{...e,toast:H$,dismiss:n=>ec({type:"DISMISS_TOAST",toastId:n})}}function Dx(){const{toasts:e}=xr();return a.jsxs(z$,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return a.jsxs(mN,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(gN,{children:n}),r&&a.jsx(yN,{children:r})]}),s,a.jsx(pN,{})]},t)}),a.jsx(hN,{})]})}function td(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 vN={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(n){e.exports=n()})(function(){return function n(r,s,o){function i(u,d){if(!s[u]){if(!r[u]){var f=typeof td=="function"&&td;if(!d&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var p=s[u]={exports:{}};r[u][0].call(p.exports,function(x){var m=r[u][1][x];return i(m||x)},p,p.exports,n,r,s,o)}return s[u].exports}for(var l=typeof td=="function"&&td,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,p,x,m,v=[],g=0,w=c.length,b=w,_=o.getTypeOf(c)!=="string";g<c.length;)b=w-g,f=_?(u=c[g++],d=g<w?c[g++]:0,g<w?c[g++]:0):(u=c.charCodeAt(g++),d=g<w?c.charCodeAt(g++):0,g<w?c.charCodeAt(g++):0),h=u>>2,p=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,m=2<b?63&f:64,v.push(l.charAt(h)+l.charAt(p)+l.charAt(x)+l.charAt(m));return v.join("")},s.decode=function(c){var u,d,f,h,p,x,m=0,v=0,g="data:";if(c.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var w,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&b--,c.charAt(c.length-2)===l.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(w=i.uint8array?new Uint8Array(0|b):new Array(0|b);m<c.length;)u=l.indexOf(c.charAt(m++))<<2|(h=l.indexOf(c.charAt(m++)))>>4,d=(15&h)<<4|(p=l.indexOf(c.charAt(m++)))>>2,f=(3&p)<<6|(x=l.indexOf(c.charAt(m++))),w[v++]=u,p!==64&&(w[v++]=d),x!==64&&(w[v++]=f);return w}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,p,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=p,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new l).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var o=n("./utils"),i=function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var d=0;d<8;d++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();r.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(u,d,f,h){var p=i,x=h+f;u^=-1;for(var m=h;m<x;m++)u=u>>>8^p[255&(u^d[m])];return-1^u}(0|c,l,l.length,0):function(u,d,f,h){var p=i,x=h+f;u^=-1;for(var m=h;m<x;m++)u=u>>>8^p[255&(u^d.charCodeAt(m))];return-1^u}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(n,r,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(n,r,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),l=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",l.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,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(n,r,s){function o(p,x){var m,v="";for(m=0;m<x;m++)v+=String.fromCharCode(255&p),p>>>=8;return v}function i(p,x,m,v,g,w){var b,_,C=p.file,j=p.compression,T=w!==u.utf8encode,R=l.transformTo("string",w(C.name)),A=l.transformTo("string",u.utf8encode(C.name)),O=C.comment,Z=l.transformTo("string",w(O)),N=l.transformTo("string",u.utf8encode(O)),z=A.length!==C.name.length,S=N.length!==O.length,U="",J="",F="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!m||(X.crc32=p.crc32,X.compressedSize=p.compressedSize,X.uncompressedSize=p.uncompressedSize);var $=0;x&&($|=8),T||!z&&!S||($|=2048);var B=0,ve=0;W&&(B|=16),g==="UNIX"?(ve=798,B|=function(ie,Ie){var xe=ie;return ie||(xe=Ie?16893:33204),(65535&xe)<<16}(C.unixPermissions,W)):(ve=20,B|=function(ie){return 63&(ie||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),z&&(J=o(1,1)+o(d(R),4)+A,U+="up"+o(J.length,2)+J),S&&(F=o(1,1)+o(d(Z),4)+N,U+="uc"+o(F.length,2)+F);var oe="";return oe+=`
\0`,oe+=o($,2),oe+=j.magic,oe+=o(b,2),oe+=o(_,2),oe+=o(X.crc32,4),oe+=o(X.compressedSize,4),oe+=o(X.uncompressedSize,4),oe+=o(R.length,2),oe+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+oe+R+U,dirRecord:f.CENTRAL_FILE_HEADER+o(ve,2)+oe+o(Z.length,2)+"\0\0\0\0"+o(B,4)+o(v,4)+R+U+Z}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(p,x,m,v){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=m,this.encodeFileName=v,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(h,c),h.prototype.push=function(p){var x=p.meta.percent||0,m=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,c.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(x+100*(m-v-1))/m:100}}))},h.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var x=this.streamFiles&&!p.file.dir;if(x){var m=i(p,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(p){this.accumulate=!1;var x=this.streamFiles&&!p.file.dir,m=i(p,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),x)this.push({data:function(v){return f.DATA_DESCRIPTOR+o(v.crc32,4)+o(v.compressedSize,4)+o(v.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var p=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var m=this.bytesWritten-p,v=function(g,w,b,_,C){var j=l.transformTo("string",C(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(g,2)+o(g,2)+o(w,4)+o(b,4)+o(j.length,2)+j}(this.dirRecords.length,m,p,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(p){this._sources.push(p);var x=this;return p.on("data",function(m){x.processChunk(m)}),p.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),p.on("error",function(m){x.error(m)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(p){var x=this._sources;if(!c.prototype.error.call(this,p))return!1;for(var m=0;m<x.length;m++)try{x[m].error(p)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var p=this._sources,x=0;x<p.length;x++)p[x].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var o=n("../compressions"),i=n("./ZipFileWorker");s.generateWorker=function(l,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{l.forEach(function(h,p){f++;var x=function(w,b){var _=w||b,C=o[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(p.options.compression,c.compression),m=p.options.compressionOptions||c.compressionOptions||{},v=p.dir,g=p.date;p._compressWorker(x,m).withStreamInfo("file",{name:h,dir:v,date:g,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var l in this)typeof this[l]!="function"&&(i[l]=this[l]);return i}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(i,l){return new o().loadAsync(i,l)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var o=n("./utils"),i=n("./external"),l=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(p,x){var m=h.decompressed.getContentWorker().pipe(new u);m.on("error",function(v){x(v)}).on("end",function(){m.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}r.exports=function(h,p){var x=this;return p=o.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),d.isNode&&d.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",h,!0,p.optimizedBinaryString,p.base64).then(function(m){var v=new c(p);return v.load(m),v}).then(function(m){var v=[i.Promise.resolve(m)],g=m.files;if(p.checkCRC32)for(var w=0;w<g.length;w++)v.push(f(g[w]));return i.Promise.all(v)}).then(function(m){for(var v=m.shift(),g=v.files,w=0;w<g.length;w++){var b=g[w],_=b.fileNameStr,C=o.resolve(b.fileNameStr);x.file(C,b.decompressed,{binary:!0,optimizedBinaryString:!0,date:b.date,dir:b.dir,comment:b.fileCommentStr.length?b.fileCommentStr:null,unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions,createFolders:p.createFolders}),b.dir||(x.file(C).unsafeOriginalName=_)}return v.zipComment.length&&(x.comment=v.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var o=n("../utils"),i=n("../stream/GenericWorker");function l(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(l,i),l.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},l.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(l,c,u){o.call(this,c),this._helper=l;var d=this;l.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,s){function o(C,j,T){var R,A=l.getTypeOf(j),O=l.extend(T||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(C=g(C)),O.createFolders&&(R=v(C))&&w.call(this,R,!0);var Z=A==="string"&&O.binary===!1&&O.base64===!1;T&&T.binary!==void 0||(O.binary=!Z),(j instanceof f&&j.uncompressedSize===0||O.dir||!j||j.length===0)&&(O.base64=!1,O.binary=!0,j="",O.compression="STORE",A="string");var N=null;N=j instanceof f||j instanceof c?j:x.isNode&&x.isStream(j)?new m(C,j):l.prepareContent(C,j,O.binary,O.optimizedBinaryString,O.base64);var z=new h(C,N,O);this.files[C]=z}var i=n("./utf8"),l=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),p=n("./generate"),x=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),v=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},g=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},w=function(C,j){return j=j!==void 0?j:d.createFolders,C=g(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function b(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,T,R;for(j in this.files)R=this.files[j],(T=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(T,R)},filter:function(C){var j=[];return this.forEach(function(T,R){C(T,R)&&j.push(R)}),j},file:function(C,j,T){if(arguments.length!==1)return C=this.root+C,o.call(this,C,j,T),this;if(b(C)){var R=C;return this.filter(function(O,Z){return!Z.dir&&R.test(O)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(b(C))return this.filter(function(A,O){return O.dir&&C.test(A)});var j=this.root+C,T=w.call(this,j),R=this.clone();return R.root=T.name,R},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var T=this.filter(function(A,O){return O.name.slice(0,C.length)===C}),R=0;R<T.length;R++)delete this.files[T[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,T={};try{if((T=l.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");l.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var R=T.comment||this.comment||"";j=p.generateWorker(this,T,R)}catch(A){(j=new c("error")).error(A)}return new u(j,T.type||"string",T.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=_},{"./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(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var o=n("./DataReader");function i(l){o.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data[this.zero+l]},i.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),u=l.charCodeAt(1),d=l.charCodeAt(2),f=l.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../utils");function i(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(){},readInt:function(l){var c,u=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(l){o.call(this,l)}n("../utils").inherits(i,o),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=o.getTypeOf(f);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new l(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,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(n,r,s){var o=n("./GenericWorker"),i=n("../utils");function l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,o),l.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,i),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function l(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,l)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var l=this;return i.on("data",function(c){l.processChunk(c)}),i.on("end",function(){l.end()}),i.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,l){return this.extraStreamInfo[i]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=o},{}],29:[function(n,r,s){var o=n("../utils"),i=n("./ConvertWorker"),l=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,m){return new d.Promise(function(v,g){var w=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){w.push(j),m&&m(T)}).on("error",function(j){w=[],g(j)}).on("end",function(){try{var j=function(T,R,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",R),A);case"base64":return c.encode(R);default:return o.transformTo(T,R)}}(_,function(T,R){var A,O=0,Z=null,N=0;for(A=0;A<R.length;A++)N+=R[A].length;switch(T){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(Z=new Uint8Array(N),A=0;A<R.length;A++)Z.set(R[A],O),O+=R[A].length;return Z;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,w),C);v(j)}catch(T){g(T)}w=[]}).resume()})}function p(x,m,v){var g=m;switch(m){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=m,this._mimeType=v,o.checkSupport(g),this._worker=x.pipe(new i(g)),x.lock()}catch(w){this._worker=new l("error"),this._worker.error(w)}}p.prototype={accumulate:function(x){return h(this,x)},on:function(x,m){var v=this;return x==="data"?this._worker.on(x,function(g){m.call(v,g.data,g.meta)}):this._worker.on(x,function(){o.delay(m,arguments,v)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},r.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var o=n("./utils"),i=n("./support"),l=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(p){return i.nodebuffer?l.newBufferFrom(p,"utf-8"):function(x){var m,v,g,w,b,_=x.length,C=0;for(w=0;w<_;w++)(64512&(v=x.charCodeAt(w)))==55296&&w+1<_&&(64512&(g=x.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(g-56320),w++),C+=v<128?1:v<2048?2:v<65536?3:4;for(m=i.uint8array?new Uint8Array(C):new Array(C),w=b=0;b<C;w++)(64512&(v=x.charCodeAt(w)))==55296&&w+1<_&&(64512&(g=x.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(g-56320),w++),v<128?m[b++]=v:(v<2048?m[b++]=192|v>>>6:(v<65536?m[b++]=224|v>>>12:(m[b++]=240|v>>>18,m[b++]=128|v>>>12&63),m[b++]=128|v>>>6&63),m[b++]=128|63&v);return m}(p)},s.utf8decode=function(p){return i.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(x){var m,v,g,w,b=x.length,_=new Array(2*b);for(m=v=0;m<b;)if((g=x[m++])<128)_[v++]=g;else if(4<(w=u[g]))_[v++]=65533,m+=w-1;else{for(g&=w===2?31:w===3?15:7;1<w&&m<b;)g=g<<6|63&x[m++],w--;1<w?_[v++]=65533:g<65536?_[v++]=g:(g-=65536,_[v++]=55296|g>>10&1023,_[v++]=56320|1023&g)}return _.length!==v&&(_.subarray?_=_.subarray(0,v):_.length=v),o.applyFromCharCode(_)}(p=o.transformTo(i.uint8array?"uint8array":"array",p))},o.inherits(f,c),f.prototype.processChunk=function(p){var x=o.transformTo(i.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=x;(x=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),x.set(m,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var v=function(w,b){var _;for((b=b||w.length)>w.length&&(b=w.length),_=b-1;0<=_&&(192&w[_])==128;)_--;return _<0||_===0?b:_+u[w[_]]>b?_:b}(x),g=x;v!==x.length&&(i.uint8array?(g=x.subarray(0,v),this.leftOver=x.subarray(v,x.length)):(g=x.slice(0,v),this.leftOver=x.slice(v,x.length))),this.push({data:s.utf8decode(g),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(h,c),h.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var o=n("./support"),i=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(m){return m}function d(m,v){for(var g=0;g<m.length;++g)v[g]=255&m.charCodeAt(g);return v}n("setimmediate"),s.newBlob=function(m,v){s.checkSupport("blob");try{return new Blob([m],{type:v})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(m),g.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(m,v,g){var w=[],b=0,_=m.length;if(_<=g)return String.fromCharCode.apply(null,m);for(;b<_;)v==="array"||v==="nodebuffer"?w.push(String.fromCharCode.apply(null,m.slice(b,Math.min(b+g,_)))):w.push(String.fromCharCode.apply(null,m.subarray(b,Math.min(b+g,_)))),b+=g;return w.join("")},stringifyByChar:function(m){for(var v="",g=0;g<m.length;g++)v+=String.fromCharCode(m[g]);return v},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch{return!1}}()}};function h(m){var v=65536,g=s.getTypeOf(m),w=!0;if(g==="uint8array"?w=f.applyCanBeUsed.uint8array:g==="nodebuffer"&&(w=f.applyCanBeUsed.nodebuffer),w)for(;1<v;)try{return f.stringifyByChunk(m,g,v)}catch{v=Math.floor(v/2)}return f.stringifyByChar(m)}function p(m,v){for(var g=0;g<m.length;g++)v[g]=m[g];return v}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return x.string.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:function(m){return d(m,l.allocBuffer(m.length))}},x.array={string:h,array:u,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(m)}},x.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return p(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:u,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return l.newBufferFrom(new Uint8Array(m))}},x.uint8array={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:u,nodebuffer:function(m){return l.newBufferFrom(m)}},x.nodebuffer={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return x.nodebuffer.uint8array(m).buffer},uint8array:function(m){return p(m,new Uint8Array(m.length))},nodebuffer:u},s.transformTo=function(m,v){if(v=v||"",!m)return v;s.checkSupport(m);var g=s.getTypeOf(v);return x[g][m](v)},s.resolve=function(m){for(var v=m.split("/"),g=[],w=0;w<v.length;w++){var b=v[w];b==="."||b===""&&w!==0&&w!==v.length-1||(b===".."?g.pop():g.push(b))}return g.join("/")},s.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":o.nodebuffer&&l.isBuffer(m)?"nodebuffer":o.uint8array&&m instanceof Uint8Array?"uint8array":o.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(m){if(!o[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(m){var v,g,w="";for(g=0;g<(m||"").length;g++)w+="\\x"+((v=m.charCodeAt(g))<16?"0":"")+v.toString(16).toUpperCase();return w},s.delay=function(m,v,g){setImmediate(function(){m.apply(g||null,v||[])})},s.inherits=function(m,v){function g(){}g.prototype=v.prototype,m.prototype=new g},s.extend=function(){var m,v,g={};for(m=0;m<arguments.length;m++)for(v in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],v)&&g[v]===void 0&&(g[v]=arguments[m][v]);return g},s.prepareContent=function(m,v,g,w,b){return c.Promise.resolve(v).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var T=new FileReader;T.onload=function(R){C(R.target.result)},T.onerror=function(R){j(R.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var C=s.getTypeOf(_);return C?(C==="arraybuffer"?_=s.transformTo("uint8array",_):C==="string"&&(b?_=i.decode(_):g&&w!==!0&&(_=function(j){return d(j,o.uint8array?new Uint8Array(j.length):new Array(j.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),l=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(f)+")")}},isSignature:function(f,h){var p=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(p),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",p=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(p)},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,h,p,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),p=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:p}},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,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,l.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 h=f;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(l.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(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.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(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var x=h-p;if(0<x)this.isSignature(h,l.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),l=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(p,x){this.options=p,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var x,m;if(p.skip(22),this.fileNameLength=p.readInt(2),m=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(v){for(var g in d)if(Object.prototype.hasOwnProperty.call(d,g)&&d[g].magic===v)return d[g];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,x,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var x=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(x),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var x,m,v,g=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<g;)x=p.readInt(2),m=p.readInt(2),v=p.readData(m),this.extraFields[x]={id:x,length:m,value:v};p.setIndex(g)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var m=i.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var g=i.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var x=o(p.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var x=o(p.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(p.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function o(x,m,v){this.name=x,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=m,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var i=n("./stream/StreamHelper"),l=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var m=null,v="string";try{if(!x)throw new Error("No output type specified.");var g=(v=x.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),m=this._decompressWorker();var w=!this._dataBinary;w&&!g&&(m=m.pipe(new c.Utf8EncodeWorker)),!w&&g&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(b){(m=new d("error")).error(b)}return new i(m,v,"")},async:function(x,m){return this.internalStream(x).accumulate(m)},nodeStream:function(x,m){return this.internalStream(x||"nodebuffer").toNodejsStream(m)},_compressWorker:function(x,m){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(v,x,m)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new l(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)o.prototype[f[p]]=h;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(o){var i,l,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var m=o.document.createElement("script");m.onreadystatechange=function(){x(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},o.document.documentElement.appendChild(m)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var p=[];function x(){var m,v;l=!0;for(var g=p.length;g;){for(v=p,p=[],m=-1;++m<g;)v[m]();g=p.length}l=!1}r.exports=function(m){p.push(m)!==1||l||i()}}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var l={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,g!==i&&m(this,g)}function h(g,w,b){this.promise=g,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function p(g,w,b){o(function(){var _;try{_=w(b)}catch(C){return l.reject(g,C)}_===g?l.reject(g,new TypeError("Cannot resolve promise with itself")):l.resolve(g,_)})}function x(g){var w=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof w=="function")return function(){w.apply(g,arguments)}}function m(g,w){var b=!1;function _(T){b||(b=!0,l.reject(g,T))}function C(T){b||(b=!0,l.resolve(g,T))}var j=v(function(){w(C,_)});j.status==="error"&&_(j.value)}function v(g,w){var b={};try{b.value=g(w),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(g){if(typeof g!="function")return this;var w=this.constructor;return this.then(function(b){return w.resolve(g()).then(function(){return b})},function(b){return w.resolve(g()).then(function(){throw b})})},f.prototype.catch=function(g){return this.then(null,g)},f.prototype.then=function(g,w){if(typeof g!="function"&&this.state===u||typeof w!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?p(b,this.state===u?g:w,this.outcome):this.queue.push(new h(b,g,w)),b},h.prototype.callFulfilled=function(g){l.resolve(this.promise,g)},h.prototype.otherCallFulfilled=function(g){p(this.promise,this.onFulfilled,g)},h.prototype.callRejected=function(g){l.reject(this.promise,g)},h.prototype.otherCallRejected=function(g){p(this.promise,this.onRejected,g)},l.resolve=function(g,w){var b=v(x,w);if(b.status==="error")return l.reject(g,b.value);var _=b.value;if(_)m(g,_);else{g.state=u,g.outcome=w;for(var C=-1,j=g.queue.length;++C<j;)g.queue[C].callFulfilled(w)}return g},l.reject=function(g,w){g.state=c,g.outcome=w;for(var b=-1,_=g.queue.length;++b<_;)g.queue[b].callRejected(w);return g},f.resolve=function(g){return g instanceof this?g:l.resolve(new this(i),g)},f.reject=function(g){var w=new this(i);return l.reject(w,g)},f.all=function(g){var w=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=new Array(b),j=0,T=-1,R=new this(i);++T<b;)A(g[T],T);return R;function A(O,Z){w.resolve(O).then(function(N){C[Z]=N,++j!==b||_||(_=!0,l.resolve(R,C))},function(N){_||(_=!0,l.reject(R,N))})}},f.race=function(g){var w=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=-1,j=new this(i);++C<b;)T=g[C],w.resolve(T).then(function(R){_||(_=!0,l.resolve(j,R))},function(R){_||(_=!0,l.reject(j,R))});var T;return j}},{immediate:36}],38:[function(n,r,s){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var o=n("./zlib/deflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,p=0,x=8;function m(g){if(!(this instanceof m))return new m(g);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},g||{});var w=this.options;w.raw&&0<w.windowBits?w.windowBits=-w.windowBits:w.gzip&&0<w.windowBits&&w.windowBits<16&&(w.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=o.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(b!==f)throw new Error(c[b]);if(w.header&&o.deflateSetHeader(this.strm,w.header),w.dictionary){var _;if(_=typeof w.dictionary=="string"?l.string2buf(w.dictionary):d.call(w.dictionary)==="[object ArrayBuffer]"?new Uint8Array(w.dictionary):w.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function v(g,w){var b=new m(w);if(b.push(g,!0),b.err)throw b.msg||c[b.err];return b.result}m.prototype.push=function(g,w){var b,_,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;_=w===~~w?w:w===!0?4:0,typeof g=="string"?C.input=l.string2buf(g):d.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(b=o.deflate(C,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(C.avail_out=0))},m.prototype.onData=function(g){this.chunks.push(g)},m.prototype.onEnd=function(g){g===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=m,s.deflate=v,s.deflateRaw=function(g,w){return(w=w||{}).raw=!0,v(g,w)},s.gzip=function(g,w){return(w=w||{}).gzip=!0,v(g,w)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var o=n("./zlib/inflate"),i=n("./utils/common"),l=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function p(m){if(!(this instanceof p))return new p(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||m&&m.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&!(15&v.windowBits)&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var g=o.inflateInit2(this.strm,v.windowBits);if(g!==c.Z_OK)throw new Error(u[g]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(m,v){var g=new p(v);if(g.push(m,!0),g.err)throw g.msg||u[g.err];return g.result}p.prototype.push=function(m,v){var g,w,b,_,C,j,T=this.strm,R=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;w=v===~~v?v:v===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?T.input=l.binstring2buf(m):h.call(m)==="[object ArrayBuffer]"?T.input=new Uint8Array(m):T.input=m,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(R),T.next_out=0,T.avail_out=R),(g=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?l.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,g=o.inflateSetDictionary(this.strm,j)),g===c.Z_BUF_ERROR&&O===!0&&(g=c.Z_OK,O=!1),g!==c.Z_STREAM_END&&g!==c.Z_OK)return this.onEnd(g),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&g!==c.Z_STREAM_END&&(T.avail_in!==0||w!==c.Z_FINISH&&w!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=l.utf8border(T.output,T.next_out),_=T.next_out-b,C=l.buf2string(T.output,b),T.next_out=_,T.avail_out=R-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(O=!0)}while((0<T.avail_in||T.avail_out===0)&&g!==c.Z_STREAM_END);return g===c.Z_STREAM_END&&(w=c.Z_FINISH),w===c.Z_FINISH?(g=o.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===c.Z_OK):w!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},s.Inflate=p,s.inflate=x,s.inflateRaw=function(m,v){return(v=v||{}).raw=!0,x(m,v)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){var u,d,f,h,p,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)p=c[u],x.set(p,h),h+=p.length;return x}},l={arraySet:function(c,u,d,f,h){for(var p=0;p<f;p++)c[h+p]=u[d+p]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,l))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./common"),i=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{l=!1}for(var c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&l||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var p="",x=0;x<h;x++)p+=String.fromCharCode(f[x]);return p}c[254]=c[254]=1,s.string2buf=function(f){var h,p,x,m,v,g=f.length,w=0;for(m=0;m<g;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<g&&(64512&(x=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(x-56320),m++),w+=p<128?1:p<2048?2:p<65536?3:4;for(h=new o.Buf8(w),m=v=0;v<w;m++)(64512&(p=f.charCodeAt(m)))==55296&&m+1<g&&(64512&(x=f.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(x-56320),m++),p<128?h[v++]=p:(p<2048?h[v++]=192|p>>>6:(p<65536?h[v++]=224|p>>>12:(h[v++]=240|p>>>18,h[v++]=128|p>>>12&63),h[v++]=128|p>>>6&63),h[v++]=128|63&p);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),p=0,x=h.length;p<x;p++)h[p]=f.charCodeAt(p);return h},s.buf2string=function(f,h){var p,x,m,v,g=h||f.length,w=new Array(2*g);for(p=x=0;p<g;)if((m=f[p++])<128)w[x++]=m;else if(4<(v=c[m]))w[x++]=65533,p+=v-1;else{for(m&=v===2?31:v===3?15:7;1<v&&p<g;)m=m<<6|63&f[p++],v--;1<v?w[x++]=65533:m<65536?w[x++]=m:(m-=65536,w[x++]=55296|m>>10&1023,w[x++]=56320|1023&m)}return d(w,x)},s.utf8border=function(f,h){var p;for((h=h||f.length)>f.length&&(h=f.length),p=h-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?h:p+c[f[p]]>h?p:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,l,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;l!==0;){for(l-=f=2e3<l?2e3:l;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,s){r.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(n,r,s){var o=function(){for(var i,l=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;l[c]=i}return l}();r.exports=function(i,l,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^l[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,p=0,x=-2,m=-1,v=4,g=2,w=8,b=9,_=286,C=30,j=19,T=2*_+1,R=15,A=3,O=258,Z=O+A+1,N=42,z=113,S=1,U=2,J=3,F=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4<E?9:0)}function X(E){for(var ee=E.length;0<=--ee;)E[ee]=0}function $(E){var ee=E.state,G=ee.pending;G>E.avail_out&&(G=E.avail_out),G!==0&&(i.arraySet(E.output,ee.pending_buf,ee.pending_out,G,E.next_out),E.next_out+=G,ee.pending_out+=G,E.total_out+=G,E.avail_out-=G,ee.pending-=G,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){l._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function ve(E,ee){E.pending_buf[E.pending++]=ee}function oe(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function ie(E,ee){var G,D,k=E.max_chain_length,P=E.strstart,M=E.prev_length,Y=E.nice_match,L=E.strstart>E.w_size-Z?E.strstart-(E.w_size-Z):0,K=E.window,Q=E.w_mask,te=E.prev,be=E.strstart+O,Ye=K[P+M-1],Ue=K[P+M];E.prev_length>=E.good_match&&(k>>=2),Y>E.lookahead&&(Y=E.lookahead);do if(K[(G=ee)+M]===Ue&&K[G+M-1]===Ye&&K[G]===K[P]&&K[++G]===K[P+1]){P+=2,G++;do;while(K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&K[++P]===K[++G]&&P<be);if(D=O-(be-P),P=be-O,M<D){if(E.match_start=ee,Y<=(M=D))break;Ye=K[P+M-1],Ue=K[P+M]}}while((ee=te[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function Ie(E){var ee,G,D,k,P,M,Y,L,K,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-Z)){for(i.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=G=E.hash_size;D=E.head[--ee],E.head[ee]=te<=D?D-te:0,--G;);for(ee=G=te;D=E.prev[--ee],E.prev[ee]=te<=D?D-te:0,--G;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,Y=E.window,L=E.strstart+E.lookahead,K=k,Q=void 0,Q=M.avail_in,K<Q&&(Q=K),G=Q===0?0:(M.avail_in-=Q,i.arraySet(Y,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,Y,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,Y,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=G,E.lookahead+E.insert>=A)for(P=E.strstart-E.insert,E.ins_h=E.window[P],E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+A-1])&E.hash_mask,E.prev[P&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=P,P++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<Z&&E.strm.avail_in!==0)}function xe(E,ee){for(var G,D;;){if(E.lookahead<Z){if(Ie(E),E.lookahead<Z&&ee===f)return S;if(E.lookahead===0)break}if(G=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,G=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),G!==0&&E.strstart-G<=E.w_size-Z&&(E.match_length=ie(E,G)),E.match_length>=A)if(D=l._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,G=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else D=l._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(D&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function ke(E,ee){for(var G,D,k;;){if(E.lookahead<Z){if(Ie(E),E.lookahead<Z&&ee===f)return S;if(E.lookahead===0)break}if(G=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,G=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,G!==0&&E.prev_length<E.max_lazy_match&&E.strstart-G<=E.w_size-Z&&(E.match_length=ie(E,G),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,D=l._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,G=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,D&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((D=l._tr_tally(E,0,E.window[E.strstart-1]))&&B(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return S}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(D=l._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Pe(E,ee,G,D,k){this.good_length=E,this.max_lazy=ee,this.nice_length=G,this.max_chain=D,this.func=k}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=w,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+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 i.Buf16(R+1),this.heap=new i.Buf16(2*_+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*_+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 Me(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=g,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:z,E.adler=ee.wrap===2?0:1,ee.last_flush=f,l._tr_init(ee),p):W(E,x)}function Ae(E){var ee=Me(E);return ee===p&&function(G){G.window_size=2*G.w_size,X(G.head),G.max_lazy_match=o[G.level].max_lazy,G.good_match=o[G.level].good_length,G.nice_match=o[G.level].nice_length,G.max_chain_length=o[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=A-1,G.match_available=0,G.ins_h=0}(E.state),ee}function ot(E,ee,G,D,k,P){if(!E)return x;var M=1;if(ee===m&&(ee=6),D<0?(M=0,D=-D):15<D&&(M=2,D-=16),k<1||b<k||G!==w||D<8||15<D||ee<0||9<ee||P<0||v<P)return W(E,x);D===8&&(D=9);var Y=new Fe;return(E.state=Y).strm=E,Y.wrap=M,Y.gzhead=null,Y.w_bits=D,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=k+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+A-1)/A),Y.window=new i.Buf8(2*Y.w_size),Y.head=new i.Buf16(Y.hash_size),Y.prev=new i.Buf16(Y.w_size),Y.lit_bufsize=1<<k+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new i.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=ee,Y.strategy=P,Y.method=G,Ae(E)}o=[new Pe(0,0,0,0,function(E,ee){var G=65535;for(G>E.pending_buf_size-5&&(G=E.pending_buf_size-5);;){if(E.lookahead<=1){if(Ie(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var D=E.block_start+G;if((E.strstart===0||E.strstart>=D)&&(E.lookahead=E.strstart-D,E.strstart=D,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-Z&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Pe(4,4,8,4,xe),new Pe(4,5,16,8,xe),new Pe(4,6,32,32,xe),new Pe(4,4,16,16,ke),new Pe(8,16,32,32,ke),new Pe(8,16,128,128,ke),new Pe(8,32,128,256,ke),new Pe(32,128,258,1024,ke),new Pe(32,258,258,4096,ke)],s.deflateInit=function(E,ee){return ot(E,ee,w,15,8,0)},s.deflateInit2=ot,s.deflateReset=Ae,s.deflateResetKeep=Me,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,p):x},s.deflate=function(E,ee){var G,D,k,P;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(D=E.state,!E.output||!E.input&&E.avail_in!==0||D.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(D.strm=E,G=D.last_flush,D.last_flush=ee,D.status===N)if(D.wrap===2)E.adler=0,ve(D,31),ve(D,139),ve(D,8),D.gzhead?(ve(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),ve(D,255&D.gzhead.time),ve(D,D.gzhead.time>>8&255),ve(D,D.gzhead.time>>16&255),ve(D,D.gzhead.time>>24&255),ve(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),ve(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(ve(D,255&D.gzhead.extra.length),ve(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(E.adler=u(E.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(ve(D,0),ve(D,0),ve(D,0),ve(D,0),ve(D,0),ve(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),ve(D,3),D.status=z);else{var M=w+(D.w_bits-8<<4)<<8;M|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(M|=32),M+=31-M%31,D.status=z,oe(D,M),D.strstart!==0&&(oe(D,E.adler>>>16),oe(D,65535&E.adler)),E.adler=1}if(D.status===69)if(D.gzhead.extra){for(k=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending!==D.pending_buf_size));)ve(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,ve(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,ve(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&$(E),D.pending+2<=D.pending_buf_size&&(ve(D,255&E.adler),ve(D,E.adler>>8&255),E.adler=0,D.status=z)):D.status=z),D.pending!==0){if($(E),E.avail_out===0)return D.last_flush=-1,p}else if(E.avail_in===0&&I(ee)<=I(G)&&ee!==h)return W(E,-5);if(D.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||D.lookahead!==0||ee!==f&&D.status!==666){var Y=D.strategy===2?function(L,K){for(var Q;;){if(L.lookahead===0&&(Ie(L),L.lookahead===0)){if(K===f)return S;break}if(L.match_length=0,Q=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,K===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):D.strategy===3?function(L,K){for(var Q,te,be,Ye,Ue=L.window;;){if(L.lookahead<=O){if(Ie(L),L.lookahead<=O&&K===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(te=Ue[be=L.strstart-1])===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]){Ye=L.strstart+O;do;while(te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&te===Ue[++be]&&be<Ye);L.match_length=O-(Ye-be),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=l._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,K===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):o[D.level].func(D,ee);if(Y!==J&&Y!==F||(D.status=666),Y===S||Y===J)return E.avail_out===0&&(D.last_flush=-1),p;if(Y===U&&(ee===1?l._tr_align(D):ee!==5&&(l._tr_stored_block(D,0,0,!1),ee===3&&(X(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),$(E),E.avail_out===0))return D.last_flush=-1,p}return ee!==h?p:D.wrap<=0?1:(D.wrap===2?(ve(D,255&E.adler),ve(D,E.adler>>8&255),ve(D,E.adler>>16&255),ve(D,E.adler>>24&255),ve(D,255&E.total_in),ve(D,E.total_in>>8&255),ve(D,E.total_in>>16&255),ve(D,E.total_in>>24&255)):(oe(D,E.adler>>>16),oe(D,65535&E.adler)),$(E),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?p:1)},s.deflateEnd=function(E){var ee;return E&&E.state?(ee=E.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==z&&ee!==666?W(E,x):(E.state=null,ee===z?W(E,-3):p):x},s.deflateSetDictionary=function(E,ee){var G,D,k,P,M,Y,L,K,Q=ee.length;if(!E||!E.state||(P=(G=E.state).wrap)===2||P===1&&G.status!==N||G.lookahead)return x;for(P===1&&(E.adler=c(E.adler,ee,Q,0)),G.wrap=0,Q>=G.w_size&&(P===0&&(X(G.head),G.strstart=0,G.block_start=0,G.insert=0),K=new i.Buf8(G.w_size),i.arraySet(K,ee,Q-G.w_size,G.w_size,0),ee=K,Q=G.w_size),M=E.avail_in,Y=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,Ie(G);G.lookahead>=A;){for(D=G.strstart,k=G.lookahead-(A-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[D+A-1])&G.hash_mask,G.prev[D&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=D,D++,--k;);G.strstart=D,G.lookahead=A-1,Ie(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=A-1,G.match_available=0,E.next_in=Y,E.input=L,E.avail_in=M,G.wrap=P,p},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.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(n,r,s){r.exports=function(o,i){var l,c,u,d,f,h,p,x,m,v,g,w,b,_,C,j,T,R,A,O,Z,N,z,S,U;l=o.state,c=o.next_in,S=o.input,u=c+(o.avail_in-5),d=o.next_out,U=o.output,f=d-(i-o.avail_out),h=d+(o.avail_out-257),p=l.dmax,x=l.wsize,m=l.whave,v=l.wnext,g=l.window,w=l.hold,b=l.bits,_=l.lencode,C=l.distcode,j=(1<<l.lenbits)-1,T=(1<<l.distbits)-1;e:do{b<15&&(w+=S[c++]<<b,b+=8,w+=S[c++]<<b,b+=8),R=_[w&j];t:for(;;){if(w>>>=A=R>>>24,b-=A,(A=R>>>16&255)===0)U[d++]=65535&R;else{if(!(16&A)){if(!(64&A)){R=_[(65535&R)+(w&(1<<A)-1)];continue t}if(32&A){l.mode=12;break e}o.msg="invalid literal/length code",l.mode=30;break e}O=65535&R,(A&=15)&&(b<A&&(w+=S[c++]<<b,b+=8),O+=w&(1<<A)-1,w>>>=A,b-=A),b<15&&(w+=S[c++]<<b,b+=8,w+=S[c++]<<b,b+=8),R=C[w&T];n:for(;;){if(w>>>=A=R>>>24,b-=A,!(16&(A=R>>>16&255))){if(!(64&A)){R=C[(65535&R)+(w&(1<<A)-1)];continue n}o.msg="invalid distance code",l.mode=30;break e}if(Z=65535&R,b<(A&=15)&&(w+=S[c++]<<b,(b+=8)<A&&(w+=S[c++]<<b,b+=8)),p<(Z+=w&(1<<A)-1)){o.msg="invalid distance too far back",l.mode=30;break e}if(w>>>=A,b-=A,(A=d-f)<Z){if(m<(A=Z-A)&&l.sane){o.msg="invalid distance too far back",l.mode=30;break e}if(z=g,(N=0)===v){if(N+=x-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-Z,z=U}}else if(v<A){if(N+=x+v-A,(A-=v)<O){for(O-=A;U[d++]=g[N++],--A;);if(N=0,v<O){for(O-=A=v;U[d++]=g[N++],--A;);N=d-Z,z=U}}}else if(N+=v-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-Z,z=U}for(;2<O;)U[d++]=z[N++],U[d++]=z[N++],U[d++]=z[N++],O-=3;O&&(U[d++]=z[N++],1<O&&(U[d++]=z[N++]))}else{for(N=d-Z;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(O-=3););O&&(U[d++]=U[N++],1<O&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=O=b>>3,w&=(1<<(b-=O<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<h?h-d+257:257-(d-h),l.hold=w,l.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),l=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,p=-2,x=1,m=852,v=592;function g(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var z;return N&&N.state?(z=N.state,N.total_in=N.total_out=z.total=0,N.msg="",z.wrap&&(N.adler=1&z.wrap),z.mode=x,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new o.Buf32(m),z.distcode=z.distdyn=new o.Buf32(v),z.sane=1,z.back=-1,h):p}function _(N){var z;return N&&N.state?((z=N.state).wsize=0,z.whave=0,z.wnext=0,b(N)):p}function C(N,z){var S,U;return N&&N.state?(U=N.state,z<0?(S=0,z=-z):(S=1+(z>>4),z<48&&(z&=15)),z&&(z<8||15<z)?p:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=S,U.wbits=z,_(N))):p}function j(N,z){var S,U;return N?(U=new w,(N.state=U).window=null,(S=C(N,z))!==h&&(N.state=null),S):p}var T,R,A=!0;function O(N){if(A){var z;for(T=new o.Buf32(512),R=new o.Buf32(32),z=0;z<144;)N.lens[z++]=8;for(;z<256;)N.lens[z++]=9;for(;z<280;)N.lens[z++]=7;for(;z<288;)N.lens[z++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),z=0;z<32;)N.lens[z++]=5;u(f,N.lens,0,32,R,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=R,N.distbits=5}function Z(N,z,S,U){var J,F=N.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new o.Buf8(F.wsize)),U>=F.wsize?(o.arraySet(F.window,z,S-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(U<(J=F.wsize-F.wnext)&&(J=U),o.arraySet(F.window,z,S-U,J,F.wnext),(U-=J)?(o.arraySet(F.window,z,S-U,U,0),F.wnext=U,F.whave=F.wsize):(F.wnext+=J,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=J))),0}s.inflateReset=_,s.inflateReset2=C,s.inflateResetKeep=b,s.inflateInit=function(N){return j(N,15)},s.inflateInit2=j,s.inflate=function(N,z){var S,U,J,F,W,I,X,$,B,ve,oe,ie,Ie,xe,ke,Pe,Fe,Me,Ae,ot,E,ee,G,D,k=0,P=new o.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return p;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,ve=I,oe=X,ee=h;e:for(;;)switch(S.mode){case x:if(S.wrap===0){S.mode=13;break}for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(2&S.wrap&&$===35615){P[S.check=0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<<E,N.adler=S.check=1,S.mode=512&$?10:12,B=$=0;break;case 2:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.flags=$,(255&S.flags)!=8){N.msg="unknown compression method",S.mode=30;break}if(57344&S.flags){N.msg="unknown header flags set",S.mode=30;break}S.head&&(S.head.text=$>>8&1),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,P[2]=$>>>16&255,P[3]=$>>>24&255,S.check=l(S.check,P,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=l(S.check,P,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(ie=S.length)&&(ie=I),ie&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),o.arraySet(S.head.extra,U,F,ie,E)),512&S.flags&&(S.check=l(S.check,U,ie,F)),I-=ie,F+=ie,S.length-=ie),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(ie=0;E=U[F+ie++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&ie<I;);if(512&S.flags&&(S.check=l(S.check,U,ie,F)),I-=ie,F+=ie,E)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(I===0)break e;for(ie=0;E=U[F+ie++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&ie<I;);if(512&S.flags&&(S.check=l(S.check,U,ie,F)),I-=ie,F+=ie,E)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(65535&S.check)){N.msg="header crc mismatch",S.mode=30;break}B=$=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}N.adler=S.check=g($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(z===5||z===6)break e;case 13:if(S.last){$>>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(O(S),S.mode=20,z!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if((65535&$)!=($>>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,z===6)break e;case 15:S.mode=16;case 16:if(ie=S.length){if(I<ie&&(ie=I),X<ie&&(ie=X),ie===0)break e;o.arraySet(J,U,F,ie,W),I-=ie,F+=ie,X-=ie,W+=ie,S.length-=ie;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.nlen=257+(31&$),$>>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286<S.nlen||30<S.ndist){N.msg="too many length or distance symbols",S.mode=30;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.lens[M[S.have++]]=7&$,$>>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,G={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,G),S.lenbits=G.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Fe<16)$>>>=ke,B-=ke,S.lens[S.have++]=Fe;else{if(Fe===16){for(D=ke+2;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($>>>=ke,B-=ke,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],ie=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(D=ke+3;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,ie=3+(7&($>>>=ke)),$>>>=3,B-=3}else{for(D=ke+7;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=ke,E=0,ie=11+(127&($>>>=ke)),$>>>=7,B-=7}if(S.have+ie>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;ie--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,G={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,G),S.lenbits=G.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,G={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,G),S.distbits=G.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,z===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,c(N,oe),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Pe=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Pe&&!(240&Pe)){for(Me=ke,Ae=Pe,ot=Fe;Pe=(k=S.lencode[ot+(($&(1<<Me+Ae)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,S.length=Fe,Pe===0){S.mode=26;break}if(32&Pe){S.back=-1,S.mode=12;break}if(64&Pe){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Pe,S.mode=22;case 22:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Pe=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(!(240&Pe)){for(Me=ke,Ae=Pe,ot=Fe;Pe=(k=S.distcode[ot+(($&(1<<Me+Ae)-1)>>Me)])>>>16&255,Fe=65535&k,!(Me+(ke=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Me,B-=Me,S.back+=Me}if($>>>=ke,B-=ke,S.back+=ke,64&Pe){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Pe,S.mode=24;case 24:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.offset+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(ie=oe-X,S.offset>ie){if((ie=S.offset-ie)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}Ie=ie>S.wnext?(ie-=S.wnext,S.wsize-ie):S.wnext-ie,ie>S.length&&(ie=S.length),xe=S.window}else xe=J,Ie=W-S.offset,ie=S.length;for(X<ie&&(ie=X),X-=ie,S.length-=ie;J[W++]=xe[Ie++],--ie;);S.length===0&&(S.mode=21);break;case 26:if(X===0)break e;J[W++]=S.length,X--,S.mode=21;break;case 27:if(S.wrap){for(;B<32;){if(I===0)break e;I--,$|=U[F++]<<B,B+=8}if(oe-=X,N.total_out+=oe,S.total+=oe,oe&&(N.adler=S.check=S.flags?l(S.check,J,oe,W-oe):i(S.check,J,oe,W-oe)),oe=X,(S.flags?$:g($))!==S.check){N.msg="incorrect data check",S.mode=30;break}B=$=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(4294967295&S.total)){N.msg="incorrect length check",S.mode=30;break}B=$=0}S.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return p}return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||oe!==N.avail_out&&S.mode<30&&(S.mode<27||z!==4))&&Z(N,N.output,N.next_out,oe-N.avail_out)?(S.mode=31,-4):(ve-=N.avail_in,oe-=N.avail_out,N.total_in+=ve,N.total_out+=oe,S.total+=oe,S.wrap&&oe&&(N.adler=S.check=S.flags?l(S.check,J,oe,N.next_out-oe):i(S.check,J,oe,N.next_out-oe)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(ve==0&&oe===0||z===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return p;var z=N.state;return z.window&&(z.window=null),N.state=null,h},s.inflateGetHeader=function(N,z){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=z).done=!1,h):p},s.inflateSetDictionary=function(N,z){var S,U=z.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?p:S.mode===11&&i(1,z,U,0)!==S.check?-3:Z(N,z,U,U)?(S.mode=31,-4):(S.havedict=1,h):p},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var o=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,p,x,m,v,g){var w,b,_,C,j,T,R,A,O,Z=g.bits,N=0,z=0,S=0,U=0,J=0,F=0,W=0,I=0,X=0,$=0,B=null,ve=0,oe=new o.Buf16(16),ie=new o.Buf16(16),Ie=null,xe=0;for(N=0;N<=15;N++)oe[N]=0;for(z=0;z<p;z++)oe[f[h+z]]++;for(J=Z,U=15;1<=U&&oe[U]===0;U--);if(U<J&&(J=U),U===0)return x[m++]=20971520,x[m++]=20971520,g.bits=1,0;for(S=1;S<U&&oe[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=oe[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(ie[1]=0,N=1;N<15;N++)ie[N+1]=ie[N]+oe[N];for(z=0;z<p;z++)f[h+z]!==0&&(v[ie[f[h+z]]++]=z);if(T=d===0?(B=Ie=v,19):d===1?(B=i,ve-=257,Ie=l,xe-=257,256):(B=c,Ie=u,-1),N=S,j=m,W=z=$=0,_=-1,C=(X=1<<(F=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(R=N-W,O=v[z]<T?(A=0,v[z]):v[z]>T?(A=Ie[xe+v[z]],B[ve+v[z]]):(A=96,0),w=1<<N-W,S=b=1<<F;x[j+($>>W)+(b-=w)]=R<<24|A<<16|O|0,b!==0;);for(w=1<<N-1;$&w;)w>>=1;if(w!==0?($&=w-1,$+=w):$=0,z++,--oe[N]==0){if(N===U)break;N=f[h+v[z]]}if(J<N&&($&C)!==_){for(W===0&&(W=J),j+=S,I=1<<(F=N-W);F+W<U&&!((I-=oe[F+W])<=0);)F++,I<<=1;if(X+=1<<F,d===1&&852<X||d===2&&592<X)return 1;x[_=$&C]=J<<24|F<<16|j-m|0}}return $!==0&&(x[j+$]=N-W<<24|64<<16|0),g.bits=J,0}},{"../utils/common":41}],51:[function(n,r,s){r.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(n,r,s){var o=n("../utils/common"),i=0,l=1;function c(k){for(var P=k.length;0<=--P;)k[P]=0}var u=0,d=29,f=256,h=f+1+d,p=30,x=19,m=2*h+1,v=15,g=16,w=7,b=256,_=16,C=17,j=18,T=[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],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=new Array(2*(h+2));c(Z);var N=new Array(2*p);c(N);var z=new Array(512);c(z);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,F,W,I=new Array(p);function X(k,P,M,Y,L){this.static_tree=k,this.extra_bits=P,this.extra_base=M,this.elems=Y,this.max_length=L,this.has_stree=k&&k.length}function $(k,P){this.dyn_tree=k,this.max_code=0,this.stat_desc=P}function B(k){return k<256?z[k]:z[256+(k>>>7)]}function ve(k,P){k.pending_buf[k.pending++]=255&P,k.pending_buf[k.pending++]=P>>>8&255}function oe(k,P,M){k.bi_valid>g-M?(k.bi_buf|=P<<k.bi_valid&65535,ve(k,k.bi_buf),k.bi_buf=P>>g-k.bi_valid,k.bi_valid+=M-g):(k.bi_buf|=P<<k.bi_valid&65535,k.bi_valid+=M)}function ie(k,P,M){oe(k,M[2*P],M[2*P+1])}function Ie(k,P){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--P;);return M>>>1}function xe(k,P,M){var Y,L,K=new Array(v+1),Q=0;for(Y=1;Y<=v;Y++)K[Y]=Q=Q+M[Y-1]<<1;for(L=0;L<=P;L++){var te=k[2*L+1];te!==0&&(k[2*L]=Ie(K[te]++,te))}}function ke(k){var P;for(P=0;P<h;P++)k.dyn_ltree[2*P]=0;for(P=0;P<p;P++)k.dyn_dtree[2*P]=0;for(P=0;P<x;P++)k.bl_tree[2*P]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Pe(k){8<k.bi_valid?ve(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function Fe(k,P,M,Y){var L=2*P,K=2*M;return k[L]<k[K]||k[L]===k[K]&&Y[P]<=Y[M]}function Me(k,P,M){for(var Y=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(P,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(P,Y,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=Y}function Ae(k,P,M){var Y,L,K,Q,te=0;if(k.last_lit!==0)for(;Y=k.pending_buf[k.d_buf+2*te]<<8|k.pending_buf[k.d_buf+2*te+1],L=k.pending_buf[k.l_buf+te],te++,Y===0?ie(k,L,P):(ie(k,(K=S[L])+f+1,P),(Q=T[K])!==0&&oe(k,L-=U[K],Q),ie(k,K=B(--Y),M),(Q=R[K])!==0&&oe(k,Y-=I[K],Q)),te<k.last_lit;);ie(k,b,P)}function ot(k,P){var M,Y,L,K=P.dyn_tree,Q=P.stat_desc.static_tree,te=P.stat_desc.has_stree,be=P.stat_desc.elems,Ye=-1;for(k.heap_len=0,k.heap_max=m,M=0;M<be;M++)K[2*M]!==0?(k.heap[++k.heap_len]=Ye=M,k.depth[M]=0):K[2*M+1]=0;for(;k.heap_len<2;)K[2*(L=k.heap[++k.heap_len]=Ye<2?++Ye:0)]=1,k.depth[L]=0,k.opt_len--,te&&(k.static_len-=Q[2*L+1]);for(P.max_code=Ye,M=k.heap_len>>1;1<=M;M--)Me(k,K,M);for(L=be;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Me(k,K,1),Y=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=Y,K[2*L]=K[2*M]+K[2*Y],k.depth[L]=(k.depth[M]>=k.depth[Y]?k.depth[M]:k.depth[Y])+1,K[2*M+1]=K[2*Y+1]=L,k.heap[1]=L++,Me(k,K,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(Ue,Nt){var or,Yt,ms,ct,ps,gs,ir=Nt.dyn_tree,vu=Nt.max_code,xu=Nt.stat_desc.static_tree,Ii=Nt.stat_desc.has_stree,wu=Nt.stat_desc.extra_bits,Mi=Nt.stat_desc.extra_base,Kr=Nt.stat_desc.max_length,Qs=0;for(ct=0;ct<=v;ct++)Ue.bl_count[ct]=0;for(ir[2*Ue.heap[Ue.heap_max]+1]=0,or=Ue.heap_max+1;or<m;or++)Kr<(ct=ir[2*ir[2*(Yt=Ue.heap[or])+1]+1]+1)&&(ct=Kr,Qs++),ir[2*Yt+1]=ct,vu<Yt||(Ue.bl_count[ct]++,ps=0,Mi<=Yt&&(ps=wu[Yt-Mi]),gs=ir[2*Yt],Ue.opt_len+=gs*(ct+ps),Ii&&(Ue.static_len+=gs*(xu[2*Yt+1]+ps)));if(Qs!==0){do{for(ct=Kr-1;Ue.bl_count[ct]===0;)ct--;Ue.bl_count[ct]--,Ue.bl_count[ct+1]+=2,Ue.bl_count[Kr]--,Qs-=2}while(0<Qs);for(ct=Kr;ct!==0;ct--)for(Yt=Ue.bl_count[ct];Yt!==0;)vu<(ms=Ue.heap[--or])||(ir[2*ms+1]!==ct&&(Ue.opt_len+=(ct-ir[2*ms+1])*ir[2*ms],ir[2*ms+1]=ct),Yt--)}}(k,P),xe(K,Ye,k.bl_count)}function E(k,P,M){var Y,L,K=-1,Q=P[1],te=0,be=7,Ye=4;for(Q===0&&(be=138,Ye=3),P[2*(M+1)+1]=65535,Y=0;Y<=M;Y++)L=Q,Q=P[2*(Y+1)+1],++te<be&&L===Q||(te<Ye?k.bl_tree[2*L]+=te:L!==0?(L!==K&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):te<=10?k.bl_tree[2*C]++:k.bl_tree[2*j]++,K=L,Ye=(te=0)===Q?(be=138,3):L===Q?(be=6,3):(be=7,4))}function ee(k,P,M){var Y,L,K=-1,Q=P[1],te=0,be=7,Ye=4;for(Q===0&&(be=138,Ye=3),Y=0;Y<=M;Y++)if(L=Q,Q=P[2*(Y+1)+1],!(++te<be&&L===Q)){if(te<Ye)for(;ie(k,L,k.bl_tree),--te!=0;);else L!==0?(L!==K&&(ie(k,L,k.bl_tree),te--),ie(k,_,k.bl_tree),oe(k,te-3,2)):te<=10?(ie(k,C,k.bl_tree),oe(k,te-3,3)):(ie(k,j,k.bl_tree),oe(k,te-11,7));K=L,Ye=(te=0)===Q?(be=138,3):L===Q?(be=6,3):(be=7,4)}}c(I);var G=!1;function D(k,P,M,Y){oe(k,(u<<1)+(Y?1:0),3),function(L,K,Q,te){Pe(L),ve(L,Q),ve(L,~Q),o.arraySet(L.pending_buf,L.window,K,Q,L.pending),L.pending+=Q}(k,P,M)}s._tr_init=function(k){G||(function(){var P,M,Y,L,K,Q=new Array(v+1);for(L=Y=0;L<d-1;L++)for(U[L]=Y,P=0;P<1<<T[L];P++)S[Y++]=L;for(S[Y-1]=L,L=K=0;L<16;L++)for(I[L]=K,P=0;P<1<<R[L];P++)z[K++]=L;for(K>>=7;L<p;L++)for(I[L]=K<<7,P=0;P<1<<R[L]-7;P++)z[256+K++]=L;for(M=0;M<=v;M++)Q[M]=0;for(P=0;P<=143;)Z[2*P+1]=8,P++,Q[8]++;for(;P<=255;)Z[2*P+1]=9,P++,Q[9]++;for(;P<=279;)Z[2*P+1]=7,P++,Q[7]++;for(;P<=287;)Z[2*P+1]=8,P++,Q[8]++;for(xe(Z,h+1,Q),P=0;P<p;P++)N[2*P+1]=5,N[2*P]=Ie(P,5);J=new X(Z,T,f+1,h,v),F=new X(N,R,0,p,v),W=new X(new Array(0),A,0,x,w)}(),G=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,F),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,ke(k)},s._tr_stored_block=D,s._tr_flush_block=function(k,P,M,Y){var L,K,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(te){var be,Ye=4093624447;for(be=0;be<=31;be++,Ye>>>=1)if(1&Ye&&te.dyn_ltree[2*be]!==0)return i;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return l;for(be=32;be<f;be++)if(te.dyn_ltree[2*be]!==0)return l;return i}(k)),ot(k,k.l_desc),ot(k,k.d_desc),Q=function(te){var be;for(E(te,te.dyn_ltree,te.l_desc.max_code),E(te,te.dyn_dtree,te.d_desc.max_code),ot(te,te.bl_desc),be=x-1;3<=be&&te.bl_tree[2*O[be]+1]===0;be--);return te.opt_len+=3*(be+1)+5+5+4,be}(k),L=k.opt_len+3+7>>>3,(K=k.static_len+3+7>>>3)<=L&&(L=K)):L=K=M+5,M+4<=L&&P!==-1?D(k,P,M,Y):k.strategy===4||K===L?(oe(k,2+(Y?1:0),3),Ae(k,Z,N)):(oe(k,4+(Y?1:0),3),function(te,be,Ye,Ue){var Nt;for(oe(te,be-257,5),oe(te,Ye-1,5),oe(te,Ue-4,4),Nt=0;Nt<Ue;Nt++)oe(te,te.bl_tree[2*O[Nt]+1],3);ee(te,te.dyn_ltree,be-1),ee(te,te.dyn_dtree,Ye-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Ae(k,k.dyn_ltree,k.dyn_dtree)),ke(k),Y&&Pe(k)},s._tr_tally=function(k,P,M){return k.pending_buf[k.d_buf+2*k.last_lit]=P>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&P,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,P===0?k.dyn_ltree[2*M]++:(k.matches++,P--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(P)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){oe(k,2,3),ie(k,b,Z),function(P){P.bi_valid===16?(ve(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.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(n,r,s){(function(o){(function(i,l){if(!i.setImmediate){var c,u,d,f,h=1,p={},x=!1,m=i.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(i);v=v&&v.setTimeout?v:i,c={}.toString.call(i.process)==="[object process]"?function(_){process.nextTick(function(){w(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,C=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",b,!1):i.attachEvent("onmessage",b),function(_){i.postMessage(f+_,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){w(_.data)},function(_){d.port2.postMessage(_)}):m&&"onreadystatechange"in m.createElement("script")?(u=m.documentElement,function(_){var C=m.createElement("script");C.onreadystatechange=function(){w(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(w,0,_)},v.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var T={callback:_,args:C};return p[h]=T,c(h),h++},v.clearImmediate=g}function g(_){delete p[_]}function w(_){if(x)setTimeout(w,0,_);else{var C=p[_];if(C){x=!0;try{(function(j){var T=j.callback,R=j.args;switch(R.length){case 0:T();break;case 1:T(R[0]);break;case 2:T(R[0],R[1]);break;case 3:T(R[0],R[1],R[2]);break;default:T.apply(l,R)}})(C)}finally{g(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&w(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(vN);var K$=vN.exports;const Y$=Uf(K$);function xN(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const Z$=async(e,t)=>{const n=new Y$;t.forEach(o=>{n.file(o.name,o.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},Ba=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)},G$=e=>Ba(e).split(" ")[0];function wN(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),l=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${l}`}const q$=async e=>{const t=rt();let n=1;e.page&&(n=e.page);let r=2;e.perPage&&(r=e.perPage);let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=t.filter("expiredAt<{:expiredAt}",{expiredAt:wN(15)})),t.collection("domains").getList(n,r,{sort:"-created",expand:"lastDeployment",filter:s})},X$=async()=>{const e=rt(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:wN(15)})}),r=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:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},Q$=async e=>await rt().collection("domains").getOne(e),mf=async e=>e.id?await rt().collection("domains").update(e.id,e):await rt().collection("domains").create(e),J$=async e=>await rt().collection("domains").delete(e),eU=(e,t)=>rt().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),tU=e=>{rt().collection("domains").unsubscribe(e)},nU=()=>{const e=xr(),t=rr(),{t:n}=Ve(),r=Br(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[l,c]=y.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},p=async _=>{try{await J$(_),m(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,m]=y.useState([]);y.useEffect(()=>{(async()=>{const C=await q$({page:o?Number(o):1,perPage:10,state:i||""});m(C.items),c(C.totalPages)})()},[o,i]);const v=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await mf(T);const R=x.map(A=>A.id===_?{...A,checked:!j}:A);m(R)},g=async _=>{try{tU(_.id??""),eU(_.id??"",C=>{const j=x.map(T=>T.id===C.id?{...C}:T);m(j)}),_.rightnow=!0,await mf(_),e.toast({title:n("domain.deploy.started.message"),description:n("domain.deploy.started.tips")})}catch{e.toast({title:n("domain.deploy.failed.message"),description:a.jsxs(ZO,{i18nKey:"domain.deploy.failed.tips",children:["text1",a.jsx(_n,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},w=async _=>{await g({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await Z$(C,j)};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(Dx,{}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:n("domain.page.title")}),a.jsx(Te,{onClick:u,children:n("domain.add")})]}),x.length?a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-36",children:n("common.text.domain")}),a.jsx("div",{className:"w-40",children:n("domain.props.expiry")}),a.jsx("div",{className:"w-32",children:n("domain.props.last_execution_status")}),a.jsx("div",{className:"w-64",children:n("domain.props.last_execution_stage")}),a.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.props.last_execution_time")}),a.jsx("div",{className:"w-24",children:n("domain.props.enable")}),a.jsx("div",{className:"grow",children:n("common.text.operations")})]}),x.map(_=>{var C,j,T,R;return a.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:[a.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>a.jsxs(a.Fragment,{children:[A,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx("div",{children:_.expiredAt?a.jsxs(a.Fragment,{children:[a.jsx("div",{children:n("domain.props.expiry.date1",{date:90})}),a.jsx("div",{children:n("domain.props.expiry.date2",{date:G$(_.expiredAt)})})]}):"---"})}),a.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?a.jsx(a.Fragment,{children:a.jsx(Cx,{deployment:_.expand.lastDeployment})}):"---"}),a.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?a.jsx(kx,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(R=_.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),a.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ba(_.lastDeployedAt):"---"}),a.jsx("div",{className:"sm:w-24 flex items-center",children:a.jsx(_x,{children:a.jsxs(pE,{children:[a.jsx(gE,{children:a.jsx(dl,{checked:_.enabled,onCheckedChange:()=>{v(_.id??"")}})}),a.jsx(Sx,{children:a.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("domain.props.enable.disabled"):n("domain.props.enable.enabled")})})]})})}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(Te,{variant:"link",className:"p-0",onClick:()=>h(_.id??""),children:n("domain.history")}),a.jsxs(Kt,{when:!!_.enabled,children:[a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Te,{variant:"link",className:"p-0",onClick:()=>g(_),children:n("domain.deploy")})]}),a.jsxs(Kt,{when:!!(_.enabled&&_.deployed),children:[a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Te,{variant:"link",className:"p-0",onClick:()=>w(_),children:n("domain.deploy_forced")})]}),a.jsxs(Kt,{when:!!_.expiredAt,children:[a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Te,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("common.download")})]}),!_.enabled&&a.jsxs(a.Fragment,{children:[a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsxs(jx,{children:[a.jsx(Ex,{asChild:!0,children:a.jsx(Te,{variant:"link",className:"p-0",children:n("common.delete")})}),a.jsxs(Mh,{children:[a.jsxs(Lh,{children:[a.jsx(Fh,{children:n("domain.delete")}),a.jsx($h,{children:n("domain.delete.confirm")})]}),a.jsxs(zh,{children:[a.jsx(Vh,{children:n("common.cancel")}),a.jsx(Uh,{onClick:()=>{p(_.id??"")},children:n("common.confirm")})]})]})]}),a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(Te,{variant:"link",className:"p-0",onClick:()=>f(_.id??""),children:n("common.edit")})]})]})]},_.id)}),a.jsx(_E,{totalPages:l,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(yg,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.nodata")}),a.jsx(Te,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var pu=e=>e.type==="checkbox",ga=e=>e instanceof Date,kn=e=>e==null;const bN=e=>typeof e=="object";var Qt=e=>!kn(e)&&!Array.isArray(e)&&bN(e)&&!ga(e),_N=e=>Qt(e)&&e.target?pu(e.target)?e.target.checked:e.target.value:e,rU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,SN=(e,t)=>e.has(rU(t)),sU=e=>{const t=e.constructor&&e.constructor.prototype;return Qt(t)&&t.hasOwnProperty("isPrototypeOf")},Ox=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Rn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ox&&(e instanceof Blob||e instanceof FileList))&&(n||Qt(e)))if(t=n?[]:{},!n&&!sU(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Rn(e[r]));else return e;return t}var Hh=e=>Array.isArray(e)?e.filter(Boolean):[],$t=e=>e===void 0,he=(e,t,n)=>{if(!t||!Qt(e))return n;const r=Hh(t.split(/[,[\].]+?/)).reduce((s,o)=>kn(s)?s:s[o],e);return $t(r)||r===e?$t(e[t])?n:e[t]:r},Jr=e=>typeof e=="boolean",Ix=e=>/^\w*$/.test(e),kN=e=>Hh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const s=Ix(t)?[t]:kN(t),o=s.length,i=o-1;for(;++r<o;){const l=s[r];let c=n;if(r!==i){const u=e[l];c=Qt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const pf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ws={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},CN=He.createContext(null),Kh=()=>He.useContext(CN),oU=e=>{const{children:t,...n}=e;return He.createElement(CN.Provider,{value:n},t)};var jN=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Tr.all&&(t._proxyFormState[i]=!r||Tr.all),n&&(n[i]=!0),e[i]}});return s},Un=e=>Qt(e)&&!Object.keys(e).length,EN=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return Un(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||Tr.all))},tc=e=>Array.isArray(e)?e:[e],NN=(e,t,n)=>!e||!t||e===t||tc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Mx(e){const t=He.useRef(e);t.current=e,He.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function iU(e){const t=Kh(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,l]=He.useState(n._formState),c=He.useRef(!0),u=He.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=He.useRef(s);return d.current=s,Mx({disabled:r,next:f=>c.current&&NN(d.current,f.name,o)&&EN(f,u.current,n._updateFormState)&&l({...n._formState,...f}),subject:n._subjects.state}),He.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),jN(i,n,u.current,!1)}var ts=e=>typeof e=="string",TN=(e,t,n,r,s)=>ts(e)?(r&&t.watch.add(e),he(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),he(n,o))):(r&&(t.watchAll=!0),n);function aU(e){const t=Kh(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},l=He.useRef(r);l.current=r,Mx({disabled:o,subject:n._subjects.values,next:d=>{NN(l.current,d.name,i)&&u(Rn(TN(l.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=He.useState(n._getWatch(r,s));return He.useEffect(()=>n._removeUnmounted()),c}function lU(e){const t=Kh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=SN(s._names.array,n),l=aU({control:s,name:n,defaultValue:he(s._formValues,n,he(s._defaultValues,n,e.defaultValue)),exact:!0}),c=iU({control:s,name:n}),u=He.useRef(s.register(n,{...e.rules,value:l,...Jr(e.disabled)?{disabled:e.disabled}:{}}));return He.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,p)=>{const x=he(s._fields,h);x&&x._f&&(x._f.mount=p)};if(f(n,!0),d){const h=Rn(he(s._options.defaultValues,n));mt(s._defaultValues,n,h),$t(he(s._formValues,n))&&mt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),He.useEffect(()=>{he(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:he(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:l,...Jr(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:He.useCallback(d=>u.current.onChange({target:{value:_N(d),name:n},type:pf.CHANGE}),[n]),onBlur:He.useCallback(()=>u.current.onBlur({target:{value:he(s._formValues,n),name:n},type:pf.BLUR}),[n,s]),ref:d=>{const f=he(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!he(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!he(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!he(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!he(c.validatingFields,n)},error:{enumerable:!0,get:()=>he(c.errors,n)}})}}const cU=e=>e.render(lU(e));var PN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Lb=e=>({isOnSubmit:!e||e===Tr.onSubmit,isOnBlur:e===Tr.onBlur,isOnChange:e===Tr.onChange,isOnAll:e===Tr.all,isOnTouch:e===Tr.onTouched}),zb=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const nc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=he(e,s);if(o){const{_f:i,...l}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;nc(l,t)}else Qt(l)&&nc(l,t)}}};var uU=(e,t,n)=>{const r=tc(he(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},Lx=e=>e.type==="file",po=e=>typeof e=="function",gf=e=>{if(!Ox)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jd=e=>ts(e),zx=e=>e.type==="radio",yf=e=>e instanceof RegExp;const Fb={value:!1,isValid:!1},$b={value:!0,isValid:!0};var RN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?$b:{value:e[0].value,isValid:!0}:$b:Fb}return Fb};const Ub={isValid:!1,value:null};var AN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Ub):Ub;function Vb(e,t,n="validate"){if(jd(e)||Array.isArray(e)&&e.every(jd)||Jr(e)&&!e)return{type:n,message:jd(e)?e:"",ref:t}}var Ki=e=>Qt(e)&&!yf(e)?e:{value:e,message:""},Bb=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:p,name:x,valueAsNumber:m,mount:v,disabled:g}=e._f,w=he(t,x);if(!v||g)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Jr(N)?"":N||""),b.reportValidity())},C={},j=zx(o),T=pu(o),R=j||T,A=(m||Lx(o))&&$t(o.value)&&$t(w)||gf(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,O=PN.bind(null,x,n,C),Z=(N,z,S,U=ws.maxLength,J=ws.minLength)=>{const F=N?z:S;C[x]={type:N?U:J,message:F,ref:o,...O(N?U:J,F)}};if(s?!Array.isArray(w)||!w.length:l&&(!R&&(A||kn(w))||Jr(w)&&!w||T&&!RN(i).isValid||j&&!AN(i).isValid)){const{value:N,message:z}=jd(l)?{value:!!l,message:l}:Ki(l);if(N&&(C[x]={type:ws.required,message:z,ref:b,...O(ws.required,z)},!n))return _(z),C}if(!A&&(!kn(d)||!kn(f))){let N,z;const S=Ki(f),U=Ki(d);if(!kn(w)&&!isNaN(w)){const J=o.valueAsNumber||w&&+w;kn(S.value)||(N=J>S.value),kn(U.value)||(z=J<U.value)}else{const J=o.valueAsDate||new Date(w),F=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";ts(S.value)&&w&&(N=W?F(w)>F(S.value):I?w>S.value:J>new Date(S.value)),ts(U.value)&&w&&(z=W?F(w)<F(U.value):I?w<U.value:J<new Date(U.value))}if((N||z)&&(Z(!!N,S.message,U.message,ws.max,ws.min),!n))return _(C[x].message),C}if((c||u)&&!A&&(ts(w)||s&&Array.isArray(w))){const N=Ki(c),z=Ki(u),S=!kn(N.value)&&w.length>+N.value,U=!kn(z.value)&&w.length<+z.value;if((S||U)&&(Z(S,N.message,z.message),!n))return _(C[x].message),C}if(h&&!A&&ts(w)){const{value:N,message:z}=Ki(h);if(yf(N)&&!w.match(N)&&(C[x]={type:ws.pattern,message:z,ref:o,...O(ws.pattern,z)},!n))return _(z),C}if(p){if(po(p)){const N=await p(w,t),z=Vb(N,b);if(z&&(C[x]={...z,...O(ws.validate,z.message)},!n))return _(z.message),C}else if(Qt(p)){let N={};for(const z in p){if(!Un(N)&&!n)break;const S=Vb(await p[z](w,t),b,z);S&&(N={...S,...O(z,S.message)},_(S.message),n&&(C[x]=N))}if(!Un(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function dU(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=$t(e)?r++:e[t[r++]];return e}function fU(e){for(const t in e)if(e.hasOwnProperty(t)&&!$t(e[t]))return!1;return!0}function Zt(e,t){const n=Array.isArray(t)?t:Ix(t)?[t]:kN(t),r=n.length===1?e:dU(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Qt(r)&&Un(r)||Array.isArray(r)&&fU(r))&&Zt(e,n.slice(0,-1)),e}var cp=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},vf=e=>kn(e)||!bN(e);function ti(e,t){if(vf(e)||vf(t))return e===t;if(ga(e)&&ga(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(ga(o)&&ga(i)||Qt(o)&&Qt(i)||Array.isArray(o)&&Array.isArray(i)?!ti(o,i):o!==i)return!1}}return!0}var DN=e=>e.type==="select-multiple",hU=e=>zx(e)||pu(e),up=e=>gf(e)&&e.isConnected,ON=e=>{for(const t in e)if(po(e[t]))return!0;return!1};function xf(e,t={}){const n=Array.isArray(e);if(Qt(e)||n)for(const r in e)Array.isArray(e[r])||Qt(e[r])&&!ON(e[r])?(t[r]=Array.isArray(e[r])?[]:{},xf(e[r],t[r])):kn(e[r])||(t[r]=!0);return t}function IN(e,t,n){const r=Array.isArray(e);if(Qt(e)||r)for(const s in e)Array.isArray(e[s])||Qt(e[s])&&!ON(e[s])?$t(t)||vf(n[s])?n[s]=Array.isArray(e[s])?xf(e[s],[]):{...xf(e[s])}:IN(e[s],kn(t)?{}:t[s],n[s]):n[s]=!ti(e[s],t[s]);return n}var nd=(e,t)=>IN(e,t,xf(t)),MN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$t(e)?e:t?e===""?NaN:e&&+e:n&&ts(e)?new Date(e):r?r(e):e;function dp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Lx(t)?t.files:zx(t)?AN(e.refs).value:DN(t)?[...t.selectedOptions].map(({value:n})=>n):pu(t)?RN(e.refs).value:MN($t(t.value)?e.ref.value:t.value,e)}var mU=(e,t,n,r)=>{const s={};for(const o of e){const i=he(t,o);i&&mt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Rl=e=>$t(e)?e:yf(e)?e.source:Qt(e)?yf(e.value)?e.value.source:e.value:e,pU=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Wb(e,t,n){const r=he(e,n);if(r||Ix(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=he(t,o),l=he(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};s.pop()}return{name:n}}var gU=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,yU=(e,t)=>!Hh(he(e,t)).length&&Zt(e,t);const vU={mode:Tr.onSubmit,reValidateMode:Tr.onChange,shouldFocusError:!0};function xU(e={}){let t={...vU,...e},n={submitCount:0,isDirty:!1,isLoading:po(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Qt(t.defaultValues)||Qt(t.values)?Rn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Rn(s),i={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:cp(),array:cp(),state:cp()},h=Lb(t.mode),p=Lb(t.reValidateMode),x=t.criteriaMode===Tr.all,m=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},v=async k=>{if(d.isValid||k){const P=t.resolver?Un((await R()).errors):await O(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},g=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(l.mount)).forEach(M=>{M&&(P?mt(n.validatingFields,M,P):Zt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Un(n.validatingFields)}))},w=(k,P=[],M,Y,L=!0,K=!0)=>{if(Y&&M){if(i.action=!0,K&&Array.isArray(he(r,k))){const Q=M(he(r,k),Y.argA,Y.argB);L&&mt(r,k,Q)}if(K&&Array.isArray(he(n.errors,k))){const Q=M(he(n.errors,k),Y.argA,Y.argB);L&&mt(n.errors,k,Q),yU(n.errors,k)}if(d.touchedFields&&K&&Array.isArray(he(n.touchedFields,k))){const Q=M(he(n.touchedFields,k),Y.argA,Y.argB);L&&mt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=nd(s,o)),f.state.next({name:k,isDirty:N(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,k,P)},b=(k,P)=>{mt(n.errors,k,P),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,M,Y)=>{const L=he(r,k);if(L){const K=he(o,k,$t(M)?he(s,k):M);$t(K)||Y&&Y.defaultChecked||P?mt(o,k,P?K:dp(L._f)):U(k,K),i.mount&&v()}},j=(k,P,M,Y,L)=>{let K=!1,Q=!1;const te={name:k},be=!!(he(r,k)&&he(r,k)._f&&he(r,k)._f.disabled);if(!M||Y){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),K=Q!==te.isDirty);const Ye=be||ti(he(s,k),P);Q=!!(!be&&he(n.dirtyFields,k)),Ye||be?Zt(n.dirtyFields,k):mt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,K=K||d.dirtyFields&&Q!==!Ye}if(M){const Ye=he(n.touchedFields,k);Ye||(mt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,K=K||d.touchedFields&&Ye!==M)}return K&&L&&f.state.next(te),K?te:{}},T=(k,P,M,Y)=>{const L=he(n.errors,k),K=d.isValid&&Jr(P)&&n.isValid!==P;if(e.delayError&&M?(c=m(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?mt(n.errors,k,M):Zt(n.errors,k)),(M?!ti(L,M):L)||!Un(Y)||K){const Q={...Y,...K&&Jr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},R=async k=>{g(k,!0);const P=await t.resolver(o,t.context,mU(k||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(k),P},A=async k=>{const{errors:P}=await R(k);if(k)for(const M of k){const Y=he(P,M);Y?mt(n.errors,M,Y):Zt(n.errors,M)}else n.errors=P;return P},O=async(k,P,M={valid:!0})=>{for(const Y in k){const L=k[Y];if(L){const{_f:K,...Q}=L;if(K){const te=l.array.has(K.name);g([Y],!0);const be=await Bb(L,o,x,t.shouldUseNativeValidation&&!P,te);if(g([Y]),be[K.name]&&(M.valid=!1,P))break;!P&&(he(be,K.name)?te?uU(n.errors,be,K.name):mt(n.errors,K.name,be[K.name]):Zt(n.errors,K.name))}Q&&await O(Q,P,M)}}return M.valid},Z=()=>{for(const k of l.unMount){const P=he(r,k);P&&(P._f.refs?P._f.refs.every(M=>!up(M)):!up(P._f.ref))&&Ie(k)}l.unMount=new Set},N=(k,P)=>(k&&P&&mt(o,k,P),!ti($(),s)),z=(k,P,M)=>TN(k,l,{...i.mount?o:$t(P)?s:ts(k)?{[k]:P}:P},M,P),S=k=>Hh(he(i.mount?o:s,k,e.shouldUnregister?he(s,k,[]):[])),U=(k,P,M={})=>{const Y=he(r,k);let L=P;if(Y){const K=Y._f;K&&(!K.disabled&&mt(o,k,MN(P,K)),L=gf(K.ref)&&kn(P)?"":P,DN(K.ref)?[...K.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):K.refs?pu(K.ref)?K.refs.length>1?K.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):K.refs[0]&&(K.refs[0].checked=!!L):K.refs.forEach(Q=>Q.checked=Q.value===L):Lx(K.ref)?K.ref.value="":(K.ref.value=L,K.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,P,M)=>{for(const Y in P){const L=P[Y],K=`${k}.${Y}`,Q=he(r,K);(l.array.has(k)||!vf(L)||Q&&!Q._f)&&!ga(L)?J(K,L,M):U(K,L,M)}},F=(k,P,M={})=>{const Y=he(r,k),L=l.array.has(k),K=Rn(P);mt(o,k,K),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:nd(s,o),isDirty:N(k,K)})):Y&&!Y._f&&!kn(K)?J(k,K,M):U(k,K,M),zb(k,l)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const P=k.target;let M=P.name,Y=!0;const L=he(r,M),K=()=>P.type?dp(L._f):_N(k),Q=te=>{Y=Number.isNaN(te)||te===he(o,M,te)};if(L){let te,be;const Ye=K(),Ue=k.type===pf.BLUR||k.type===pf.FOCUS_OUT,Nt=!pU(L._f)&&!t.resolver&&!he(n.errors,M)&&!L._f.deps||gU(Ue,he(n.touchedFields,M),n.isSubmitted,p,h),or=zb(M,l,Ue);mt(o,M,Ye),Ue?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ye,Ue,!1),ms=!Un(Yt)||or;if(!Ue&&f.values.next({name:M,type:k.type,values:{...o}}),Nt)return d.isValid&&v(),ms&&f.state.next({name:M,...or?{}:Yt});if(!Ue&&or&&f.state.next({...n}),t.resolver){const{errors:ct}=await R([M]);if(Q(Ye),Y){const ps=Wb(n.errors,r,M),gs=Wb(ct,r,ps.name||M);te=gs.error,M=gs.name,be=Un(ct)}}else g([M],!0),te=(await Bb(L,o,x,t.shouldUseNativeValidation))[M],g([M]),Q(Ye),Y&&(te?be=!1:d.isValid&&(be=await O(r,!0)));Y&&(L._f.deps&&X(L._f.deps),T(M,be,te,Yt))}},I=(k,P)=>{if(he(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let M,Y;const L=tc(k);if(t.resolver){const K=await A($t(k)?k:L);M=Un(K),Y=k?!L.some(Q=>he(K,Q)):M}else k?(Y=(await Promise.all(L.map(async K=>{const Q=he(r,K);return await O(Q&&Q._f?{[K]:Q}:Q)}))).every(Boolean),!(!Y&&!n.isValid)&&v()):Y=M=await O(r);return f.state.next({...!ts(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),P.shouldFocus&&!Y&&nc(r,I,k?L:l.mount),Y},$=k=>{const P={...i.mount?o:s};return $t(k)?P:ts(k)?he(P,k):k.map(M=>he(P,M))},B=(k,P)=>({invalid:!!he((P||n).errors,k),isDirty:!!he((P||n).dirtyFields,k),error:he((P||n).errors,k),isValidating:!!he(n.validatingFields,k),isTouched:!!he((P||n).touchedFields,k)}),ve=k=>{k&&tc(k).forEach(P=>Zt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},oe=(k,P,M)=>{const Y=(he(r,k,{_f:{}})._f||{}).ref,L=he(n.errors,k)||{},{ref:K,message:Q,type:te,...be}=L;mt(n.errors,k,{...be,...P,ref:Y}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&Y&&Y.focus&&Y.focus()},ie=(k,P)=>po(k)?f.values.subscribe({next:M=>k(z(void 0,P),M)}):z(k,P,!0),Ie=(k,P={})=>{for(const M of k?tc(k):l.mount)l.mount.delete(M),l.array.delete(M),P.keepValue||(Zt(r,M),Zt(o,M)),!P.keepError&&Zt(n.errors,M),!P.keepDirty&&Zt(n.dirtyFields,M),!P.keepTouched&&Zt(n.touchedFields,M),!P.keepIsValidating&&Zt(n.validatingFields,M),!t.shouldUnregister&&!P.keepDefaultValue&&Zt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:N()}:{}}),!P.keepIsValid&&v()},xe=({disabled:k,name:P,field:M,fields:Y,value:L})=>{if(Jr(k)&&i.mount||k){const K=k?void 0:$t(L)?dp(M?M._f:he(Y,P)._f):L;mt(o,P,K),j(P,K,!1,!1,!0)}},ke=(k,P={})=>{let M=he(r,k);const Y=Jr(P.disabled);return mt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...P}}),l.mount.add(k),M?xe({field:M,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...Y?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:Rl(P.min),max:Rl(P.max),minLength:Rl(P.minLength),maxLength:Rl(P.maxLength),pattern:Rl(P.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){ke(k,P),M=he(r,k);const K=$t(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=hU(K),te=M._f.refs||[];if(Q?te.find(be=>be===K):K===M._f.ref)return;mt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(up),K,...Array.isArray(he(s,k))?[{}]:[]],ref:{type:K.type,name:k}}:{ref:K}}}),C(k,!1,void 0,K)}else M=he(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(SN(l.array,k)&&i.action)&&l.unMount.add(k)}}},Pe=()=>t.shouldFocusError&&nc(r,I,l.mount),Fe=k=>{Jr(k)&&(f.state.next({disabled:k}),nc(r,(P,M)=>{const Y=he(r,M);Y&&(P.disabled=Y._f.disabled||k,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(L=>{L.disabled=Y._f.disabled||k}))},0,!1))},Me=(k,P)=>async M=>{let Y;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Rn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:Q}=await R();n.errors=K,L=Q}else await O(r);if(Zt(n.errors,"root"),Un(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(K){Y=K}}else P&&await P({...n.errors},M),Pe(),setTimeout(Pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Un(n.errors)&&!Y,submitCount:n.submitCount+1,errors:n.errors}),Y)throw Y},Ae=(k,P={})=>{he(r,k)&&($t(P.defaultValue)?F(k,Rn(he(s,k))):(F(k,P.defaultValue),mt(s,k,Rn(P.defaultValue))),P.keepTouched||Zt(n.touchedFields,k),P.keepDirty||(Zt(n.dirtyFields,k),n.isDirty=P.defaultValue?N(k,Rn(he(s,k))):N()),P.keepError||(Zt(n.errors,k),d.isValid&&v()),f.state.next({...n}))},ot=(k,P={})=>{const M=k?Rn(k):s,Y=Rn(M),L=Un(k),K=L?s:Y;if(P.keepDefaultValues||(s=M),!P.keepValues){if(P.keepDirtyValues)for(const Q of l.mount)he(n.dirtyFields,Q)?mt(K,Q,he(o,Q)):F(Q,he(K,Q));else{if(Ox&&$t(k))for(const Q of l.mount){const te=he(r,Q);if(te&&te._f){const be=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(gf(be)){const Ye=be.closest("form");if(Ye){Ye.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?Rn(s):{}:Rn(K),f.array.next({values:{...K}}),f.values.next({values:{...K}})}l={mount:P.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:L?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!ti(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:P.keepDirtyValues?P.keepDefaultValues&&o?nd(s,o):n.dirtyFields:P.keepDefaultValues&&k?nd(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,P)=>ot(po(k)?k(o):k,P);return{control:{register:ke,unregister:Ie,getFieldState:B,handleSubmit:Me,setError:oe,_executeSchema:R,_getWatch:z,_getDirty:N,_updateValid:v,_removeUnmounted:Z,_updateFieldArray:w,_updateDisabledField:xe,_getFieldArray:S,_reset:ot,_resetDefaultValues:()=>po(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return l},set _names(k){l=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:ke,handleSubmit:Me,watch:ie,setValue:F,getValues:$,reset:E,resetField:Ae,clearErrors:ve,unregister:Ie,setError:oe,setFocus:(k,P={})=>{const M=he(r,k),Y=M&&M._f;if(Y){const L=Y.refs?Y.refs[0]:Y.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}},getFieldState:B}}function en(e={}){const t=He.useRef(),n=He.useRef(),[r,s]=He.useState({isDirty:!1,isValidating:!1,isLoading:po(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:po(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...xU(e),formState:r});const o=t.current.control;return o._options=e,Mx({subject:o._subjects.state,next:i=>{EN(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),He.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),He.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),He.useEffect(()=>{e.values&&!ti(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),He.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),He.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),He.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=jN(r,o),t.current}var it;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),i={};for(const l of o)i[l]=s[l];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var Fg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fg||(Fg={}));const je=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),co=e=>{switch(typeof e){case"undefined":return je.undefined;case"string":return je.string;case"number":return isNaN(e)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(e)?je.array:e===null?je.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?je.promise:typeof Map<"u"&&e instanceof Map?je.map:typeof Set<"u"&&e instanceof Set?je.set:typeof Date<"u"&&e instanceof Date?je.date:je.object;default:return je.unknown}},ce=it.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"]),wU=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class qn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let l=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(n(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof qn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qn.create=e=>new qn(e);const Wa=(e,t)=>{let n;switch(e.code){case ce.invalid_type:e.received===je.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ce.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case ce.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case ce.invalid_union:n="Invalid input";break;case ce.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case ce.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case ce.invalid_arguments:n="Invalid function arguments";break;case ce.invalid_return_type:n="Invalid function return type";break;case ce.invalid_date:n="Invalid date";break;case ce.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ce.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ce.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ce.custom:n="Invalid input";break;case ce.invalid_intersection_types:n="Intersection results could not be merged";break;case ce.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ce.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let LN=Wa;function bU(e){LN=e}function wf(){return LN}const bf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let l="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)l=u(i,{data:t,defaultError:l}).message;return{...s,path:o,message:l}},_U=[];function _e(e,t){const n=wf(),r=bf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wa?void 0:Wa].filter(s=>!!s)});e.common.issues.push(r)}class xn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return Ke;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return xn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return Ke;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const Ke=Object.freeze({status:"aborted"}),ya=e=>({status:"dirty",value:e}),jn=e=>({status:"valid",value:e}),$g=e=>e.status==="aborted",Ug=e=>e.status==="dirty",Ac=e=>e.status==="valid",Dc=e=>typeof Promise<"u"&&e instanceof Promise;function _f(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function zN(e,t,n,r,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,n),n}var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var Ul,Vl;class cs{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,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 Hb=(e,t)=>{if(Ac(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 n=new qn(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,l)=>{var c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:l.defaultError}},description:s}}class et{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 co(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:co(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new xn,ctx:{common:t.parent.common,data:t.data,parsedType:co(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Dc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:co(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Hb(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:co(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Dc(s)?s:Promise.resolve(s));return Hb(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),l=()=>o.addIssue({code:ce.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(l(),!1)):i?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Vr({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return os.create(this,this._def)}nullable(){return Io.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ir.create(this,this._def)}promise(){return Ka.create(this,this._def)}or(t){return Lc.create([this,t],this._def)}and(t){return zc.create(this,t,this._def)}transform(t){return new Vr({...Ge(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bc({...Ge(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new Fx({typeName:Be.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wc({...Ge(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Hc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const SU=/^c[^\s-]{8,}$/i,kU=/^[0-9a-z]+$/,CU=/^[0-9A-HJKMNP-TV-Z]{26}$/,jU=/^[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,EU=/^[a-z0-9_-]{21}$/i,NU=/^[-+]?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)?)??$/,TU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fp;const RU=/^(?:(?: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])$/,AU=/^(([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})))$/,DU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,FN="((\\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])))",OU=new RegExp(`^${FN}$`);function $N(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 IU(e){return new RegExp(`^${$N(e)}$`)}function UN(e){let t=`${FN}T${$N(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function MU(e,t){return!!((t==="v4"||!t)&&RU.test(e)||(t==="v6"||!t)&&AU.test(e))}class Ar extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==je.string){const o=this._getOrReturnCtx(t);return _e(o,{code:ce.invalid_type,expected:je.string,received:o.parsedType}),Ke}const r=new xn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,l=t.data.length<o.value;(i||l)&&(s=this._getOrReturnCtx(t,s),i?_e(s,{code:ce.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&_e(s,{code:ce.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")TU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"email",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")fp||(fp=new RegExp(PU,"u")),fp.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"emoji",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")jU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"uuid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")EU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"nanoid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")SU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")kU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"cuid2",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")CU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ulid",code:ce.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),_e(s,{validation:"url",code:ce.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"regex",code:ce.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?UN(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?OU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?IU(o).test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?NU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"duration",code:ce.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?MU(t.data,o.version)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"ip",code:ce.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?DU.test(t.data)||(s=this._getOrReturnCtx(t,s),_e(s,{validation:"base64",code:ce.invalid_string,message:o.message}),r.dirty()):it.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ce.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new Ar({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}datetime(t){var n,r;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:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.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,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new Ar({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ar({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ar({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ar.create=e=>{var t;return new Ar({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};function LU(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Ao extends et{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)!==je.number){const o=this._getOrReturnCtx(t);return _e(o,{code:ce.invalid_type,expected:je.number,received:o.parsedType}),Ke}let r;const s=new xn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?LU(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ao.create=e=>new Ao({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class Do extends et{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)!==je.bigint){const o=this._getOrReturnCtx(t);return _e(o,{code:ce.invalid_type,expected:je.bigint,received:o.parsedType}),Ke}let r;const s=new xn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:ce.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Do({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Do({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Do.create=e=>{var t;return new Do({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};class Oc extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==je.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.boolean,received:r.parsedType}),Ke}return jn(t.data)}}Oc.create=e=>new Oc({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class wi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==je.date){const o=this._getOrReturnCtx(t);return _e(o,{code:ce.invalid_type,expected:je.date,received:o.parsedType}),Ke}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return _e(o,{code:ce.invalid_date}),Ke}const r=new xn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),_e(s,{code:ce.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):it.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}wi.create=e=>new wi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ge(e)});class Sf extends et{_parse(t){if(this._getType(t)!==je.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.symbol,received:r.parsedType}),Ke}return jn(t.data)}}Sf.create=e=>new Sf({typeName:Be.ZodSymbol,...Ge(e)});class Ic extends et{_parse(t){if(this._getType(t)!==je.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.undefined,received:r.parsedType}),Ke}return jn(t.data)}}Ic.create=e=>new Ic({typeName:Be.ZodUndefined,...Ge(e)});class Mc extends et{_parse(t){if(this._getType(t)!==je.null){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.null,received:r.parsedType}),Ke}return jn(t.data)}}Mc.create=e=>new Mc({typeName:Be.ZodNull,...Ge(e)});class Ha extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return jn(t.data)}}Ha.create=e=>new Ha({typeName:Be.ZodAny,...Ge(e)});class ai extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return jn(t.data)}}ai.create=e=>new ai({typeName:Be.ZodUnknown,...Ge(e)});class Vs extends et{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:ce.invalid_type,expected:je.never,received:n.parsedType}),Ke}}Vs.create=e=>new Vs({typeName:Be.ZodNever,...Ge(e)});class kf extends et{_parse(t){if(this._getType(t)!==je.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.void,received:r.parsedType}),Ke}return jn(t.data)}}kf.create=e=>new kf({typeName:Be.ZodVoid,...Ge(e)});class Ir extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==je.array)return _e(n,{code:ce.invalid_type,expected:je.array,received:n.parsedType}),Ke;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(i||l)&&(_e(n,{code:i?ce.too_big:ce.too_small,minimum:l?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(_e(n,{code:ce.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(_e(n,{code:ce.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,l)=>s.type._parseAsync(new cs(n,i,n.path,l)))).then(i=>xn.mergeArray(r,i));const o=[...n.data].map((i,l)=>s.type._parseSync(new cs(n,i,n.path,l)));return xn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ir({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Ir({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Ir({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Ir.create=(e,t)=>new Ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ge(t)});function qi(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=os.create(qi(r))}return new At({...e._def,shape:()=>t})}else return e instanceof Ir?new Ir({...e._def,type:qi(e.element)}):e instanceof os?os.create(qi(e.unwrap())):e instanceof Io?Io.create(qi(e.unwrap())):e instanceof us?us.create(e.items.map(t=>qi(t))):e}class At extends et{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(),n=it.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==je.object){const u=this._getOrReturnCtx(t);return _e(u,{code:ce.invalid_type,expected:je.object,received:u.parsedType}),Ke}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof Vs&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||l.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new cs(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Vs){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(_e(s,{code:ce.unrecognized_keys,keys:l}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new cs(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>xn.mergeObjectSync(r,u)):xn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,l;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(l=Oe.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return it.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return it.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return qi(this)}partial(t){const n={};return it.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return it.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof os;)o=o._def.innerType;n[r]=o}}),new At({...this._def,shape:()=>n})}keyof(){return VN(it.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Vs.create(),typeName:Be.ZodObject,...Ge(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Vs.create(),typeName:Be.ZodObject,...Ge(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Vs.create(),typeName:Be.ZodObject,...Ge(t)});class Lc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const i=o.map(l=>new qn(l.ctx.common.issues));return _e(n,{code:ce.invalid_union,unionErrors:i}),Ke}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const l=i.map(c=>new qn(c));return _e(n,{code:ce.invalid_union,unionErrors:l}),Ke}}get options(){return this._def.options}}Lc.create=(e,t)=>new Lc({options:e,typeName:Be.ZodUnion,...Ge(t)});const bs=e=>e instanceof $c?bs(e.schema):e instanceof Vr?bs(e.innerType()):e instanceof Uc?[e.value]:e instanceof Oo?e.options:e instanceof Vc?it.objectValues(e.enum):e instanceof Bc?bs(e._def.innerType):e instanceof Ic?[void 0]:e instanceof Mc?[null]:e instanceof os?[void 0,...bs(e.unwrap())]:e instanceof Io?[null,...bs(e.unwrap())]:e instanceof Fx||e instanceof Hc?bs(e.unwrap()):e instanceof Wc?bs(e._def.innerType):[];class Yh extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.object)return _e(n,{code:ce.invalid_type,expected:je.object,received:n.parsedType}),Ke;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:ce.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ke)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=bs(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of i){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,o)}}return new Yh({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ge(r)})}}function Vg(e,t){const n=co(e),r=co(t);if(e===t)return{valid:!0,data:e};if(n===je.object&&r===je.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(l=>s.indexOf(l)!==-1),i={...e,...t};for(const l of o){const c=Vg(e[l],t[l]);if(!c.valid)return{valid:!1};i[l]=c.data}return{valid:!0,data:i}}else if(n===je.array&&r===je.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],l=t[o],c=Vg(i,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===je.date&&r===je.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class zc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if($g(o)||$g(i))return Ke;const l=Vg(o.value,i.value);return l.valid?((Ug(o)||Ug(i))&&n.dirty(),{status:n.value,value:l.data}):(_e(r,{code:ce.invalid_intersection_types}),Ke)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}zc.create=(e,t,n)=>new zc({left:e,right:t,typeName:Be.ZodIntersection,...Ge(n)});class us extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.array)return _e(r,{code:ce.invalid_type,expected:je.array,received:r.parsedType}),Ke;if(r.data.length<this._def.items.length)return _e(r,{code:ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ke;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new cs(r,i,r.path,l)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>xn.mergeArray(n,i)):xn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new us({...this._def,rest:t})}}us.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new us({items:e,typeName:Be.ZodTuple,rest:null,...Ge(t)})};class Fc extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.object)return _e(r,{code:ce.invalid_type,expected:je.object,received:r.parsedType}),Ke;const s=[],o=this._def.keyType,i=this._def.valueType;for(const l in r.data)s.push({key:o._parse(new cs(r,l,r.path,l)),value:i._parse(new cs(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?xn.mergeObjectAsync(n,s):xn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new Fc({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ge(r)}):new Fc({keyType:Ar.create(),valueType:t,typeName:Be.ZodRecord,...Ge(n)})}}class Cf extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.map)return _e(r,{code:ce.invalid_type,expected:je.map,received:r.parsedType}),Ke;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([l,c],u)=>({key:s._parse(new cs(r,l,r.path,[u,"key"])),value:o._parse(new cs(r,c,r.path,[u,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Ke;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Ke;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}}}}Cf.create=(e,t,n)=>new Cf({valueType:t,keyType:e,typeName:Be.ZodMap,...Ge(n)});class bi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==je.set)return _e(r,{code:ce.invalid_type,expected:je.set,received:r.parsedType}),Ke;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(_e(r,{code:ce.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(_e(r,{code:ce.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Ke;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const l=[...r.data.values()].map((c,u)=>o._parse(new cs(r,c,r.path,u)));return r.common.async?Promise.all(l).then(c=>i(c)):i(l)}min(t,n){return new bi({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new bi({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}bi.create=(e,t)=>new bi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ge(t)});class Aa extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.function)return _e(n,{code:ce.invalid_type,expected:je.function,received:n.parsedType}),Ke;function r(l,c){return bf({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Wa].filter(u=>!!u),issueData:{code:ce.invalid_arguments,argumentsError:c}})}function s(l,c){return bf({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Wa].filter(u=>!!u),issueData:{code:ce.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ka){const l=this;return jn(async function(...c){const u=new qn([]),d=await l._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(r(c,p)),u}),f=await Reflect.apply(i,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(p=>{throw u.addIssue(s(f,p)),u})})}else{const l=this;return jn(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new qn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new qn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Aa({...this._def,args:us.create(t).rest(ai.create())})}returns(t){return new Aa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Aa({args:t||us.create([]).rest(ai.create()),returns:n||ai.create(),typeName:Be.ZodFunction,...Ge(r)})}}class $c extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$c.create=(e,t)=>new $c({getter:e,typeName:Be.ZodLazy,...Ge(t)});class Uc extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:ce.invalid_literal,expected:this._def.value}),Ke}return{status:"valid",value:t.data}}get value(){return this._def.value}}Uc.create=(e,t)=>new Uc({value:e,typeName:Be.ZodLiteral,...Ge(t)});function VN(e,t){return new Oo({values:e,typeName:Be.ZodEnum,...Ge(t)})}class Oo extends et{constructor(){super(...arguments),Ul.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:it.joinValues(r),received:n.parsedType,code:ce.invalid_type}),Ke}if(_f(this,Ul)||zN(this,Ul,new Set(this._def.values)),!_f(this,Ul).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:ce.invalid_enum_value,options:r}),Ke}return jn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Oo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Oo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ul=new WeakMap;Oo.create=VN;class Vc extends et{constructor(){super(...arguments),Vl.set(this,void 0)}_parse(t){const n=it.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==je.string&&r.parsedType!==je.number){const s=it.objectValues(n);return _e(r,{expected:it.joinValues(s),received:r.parsedType,code:ce.invalid_type}),Ke}if(_f(this,Vl)||zN(this,Vl,new Set(it.getValidEnumValues(this._def.values))),!_f(this,Vl).has(t.data)){const s=it.objectValues(n);return _e(r,{received:r.data,code:ce.invalid_enum_value,options:s}),Ke}return jn(t.data)}get enum(){return this._def.values}}Vl=new WeakMap;Vc.create=(e,t)=>new Vc({values:e,typeName:Be.ZodNativeEnum,...Ge(t)});class Ka extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==je.promise&&n.common.async===!1)return _e(n,{code:ce.invalid_type,expected:je.promise,received:n.parsedType}),Ke;const r=n.parsedType===je.promise?n.data:Promise.resolve(n.data);return jn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ka.create=(e,t)=>new Ka({type:e,typeName:Be.ZodPromise,...Ge(t)});class Vr extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{_e(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async l=>{if(n.value==="aborted")return Ke;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?Ke:c.status==="dirty"||n.value==="dirty"?ya(c.value):c});{if(n.value==="aborted")return Ke;const l=this._def.schema._parseSync({data:i,path:r.path,parent:r});return l.status==="aborted"?Ke:l.status==="dirty"||n.value==="dirty"?ya(l.value):l}}if(s.type==="refinement"){const i=l=>{const c=s.refinement(l,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ke:(l.status==="dirty"&&n.dirty(),i(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ke:(l.status==="dirty"&&n.dirty(),i(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ac(i))return i;const l=s.transform(i.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Ac(i)?Promise.resolve(s.transform(i.value,o)).then(l=>({status:n.value,value:l})):i);it.assertNever(s)}}Vr.create=(e,t,n)=>new Vr({schema:e,typeName:Be.ZodEffects,effect:t,...Ge(n)});Vr.createWithPreprocess=(e,t,n)=>new Vr({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ge(n)});class os extends et{_parse(t){return this._getType(t)===je.undefined?jn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}os.create=(e,t)=>new os({innerType:e,typeName:Be.ZodOptional,...Ge(t)});class Io extends et{_parse(t){return this._getType(t)===je.null?jn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Io.create=(e,t)=>new Io({innerType:e,typeName:Be.ZodNullable,...Ge(t)});class Bc extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===je.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class Wc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Dc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new qn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Wc.create=(e,t)=>new Wc({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class jf extends et{_parse(t){if(this._getType(t)!==je.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:ce.invalid_type,expected:je.nan,received:r.parsedType}),Ke}return{status:"valid",value:t.data}}}jf.create=e=>new jf({typeName:Be.ZodNaN,...Ge(e)});const zU=Symbol("zod_brand");class Fx extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class gu extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ke:o.status==="dirty"?(n.dirty(),ya(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ke:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new gu({in:t,out:n,typeName:Be.ZodPipeline})}}class Hc extends et{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Ac(s)&&(s.value=Object.freeze(s.value)),s);return Dc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Hc.create=(e,t)=>new Hc({innerType:e,typeName:Be.ZodReadonly,...Ge(t)});function BN(e,t={},n){return e?Ha.create().superRefine((r,s)=>{var o,i;if(!e(r)){const l=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=l.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof l=="string"?{message:l}:l;s.addIssue({code:"custom",...u,fatal:c})}}):Ha.create()}const FU={object:At.lazycreate};var Be;(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"})(Be||(Be={}));const $U=(e,t={message:`Input not instance of ${e.name}`})=>BN(n=>n instanceof e,t),WN=Ar.create,HN=Ao.create,UU=jf.create,VU=Do.create,KN=Oc.create,BU=wi.create,WU=Sf.create,HU=Ic.create,KU=Mc.create,YU=Ha.create,ZU=ai.create,GU=Vs.create,qU=kf.create,XU=Ir.create,QU=At.create,JU=At.strictCreate,eV=Lc.create,tV=Yh.create,nV=zc.create,rV=us.create,sV=Fc.create,oV=Cf.create,iV=bi.create,aV=Aa.create,lV=$c.create,cV=Uc.create,uV=Oo.create,dV=Vc.create,fV=Ka.create,Kb=Vr.create,hV=os.create,mV=Io.create,pV=Vr.createWithPreprocess,gV=gu.create,yV=()=>WN().optional(),vV=()=>HN().optional(),xV=()=>KN().optional(),wV={string:e=>Ar.create({...e,coerce:!0}),number:e=>Ao.create({...e,coerce:!0}),boolean:e=>Oc.create({...e,coerce:!0}),bigint:e=>Do.create({...e,coerce:!0}),date:e=>wi.create({...e,coerce:!0})},bV=Ke;var se=Object.freeze({__proto__:null,defaultErrorMap:Wa,setErrorMap:bU,getErrorMap:wf,makeIssue:bf,EMPTY_PATH:_U,addIssueToContext:_e,ParseStatus:xn,INVALID:Ke,DIRTY:ya,OK:jn,isAborted:$g,isDirty:Ug,isValid:Ac,isAsync:Dc,get util(){return it},get objectUtil(){return Fg},ZodParsedType:je,getParsedType:co,ZodType:et,datetimeRegex:UN,ZodString:Ar,ZodNumber:Ao,ZodBigInt:Do,ZodBoolean:Oc,ZodDate:wi,ZodSymbol:Sf,ZodUndefined:Ic,ZodNull:Mc,ZodAny:Ha,ZodUnknown:ai,ZodNever:Vs,ZodVoid:kf,ZodArray:Ir,ZodObject:At,ZodUnion:Lc,ZodDiscriminatedUnion:Yh,ZodIntersection:zc,ZodTuple:us,ZodRecord:Fc,ZodMap:Cf,ZodSet:bi,ZodFunction:Aa,ZodLazy:$c,ZodLiteral:Uc,ZodEnum:Oo,ZodNativeEnum:Vc,ZodPromise:Ka,ZodEffects:Vr,ZodTransformer:Vr,ZodOptional:os,ZodNullable:Io,ZodDefault:Bc,ZodCatch:Wc,ZodNaN:jf,BRAND:zU,ZodBranded:Fx,ZodPipeline:gu,ZodReadonly:Hc,custom:BN,Schema:et,ZodSchema:et,late:FU,get ZodFirstPartyTypeKind(){return Be},coerce:wV,any:YU,array:XU,bigint:VU,boolean:KN,date:BU,discriminatedUnion:tV,effect:Kb,enum:uV,function:aV,instanceof:$U,intersection:nV,lazy:lV,literal:cV,map:oV,nan:UU,nativeEnum:dV,never:GU,null:KU,nullable:mV,number:HN,object:QU,oboolean:xV,onumber:vV,optional:hV,ostring:yV,pipeline:gV,preprocess:pV,promise:fV,record:sV,set:iV,strictObject:JU,string:WN,symbol:WU,transformer:Kb,tuple:rV,undefined:HU,union:eV,unknown:ZU,void:qU,NEVER:bV,ZodIssueCode:ce,quotelessJson:wU,ZodError:qn});const Yb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=he(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},YN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Yb(r.ref,n,e):r.refs&&r.refs.forEach(s=>Yb(s,n,e))}},_V=(e,t)=>{t.shouldUseNativeValidation&&YN(e,t);const n={};for(const r in e){const s=he(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(SV(t.names||Object.keys(e),r)){const i=Object.assign({},he(n,r));mt(i,"root",o),mt(n,r,i)}else mt(n,r,o)}return n},SV=(e,t)=>e.some(n=>n.startsWith(t+"."));var kV=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[i]={message:l.message,type:l.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=PN(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},tn=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,l){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&YN({},o),{errors:{},values:n.raw?r:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(i){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(i))return{values:{},errors:_V(kV(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}};const ZN=y.forwardRef(({...e},t)=>a.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));ZN.displayName="Breadcrumb";const GN=y.forwardRef(({className:e,...t},n)=>a.jsx("ol",{ref:n,className:re("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));GN.displayName="BreadcrumbList";const Bg=y.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,className:re("inline-flex items-center gap-1.5",e),...t}));Bg.displayName="BreadcrumbItem";const qN=y.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?is:"a";return a.jsx(s,{ref:r,className:re("transition-colors hover:text-foreground",t),...n})});qN.displayName="BreadcrumbLink";const XN=y.forwardRef(({className:e,...t},n)=>a.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));XN.displayName="BreadcrumbPage";const QN=({children:e,className:t,...n})=>a.jsx("li",{role:"presentation","aria-hidden":"true",className:re("[&>svg]:size-3.5",t),...n,children:e??a.jsx(ik,{})});QN.displayName="BreadcrumbSeparator";var $x="Collapsible",[CV,JN]=fn($x),[jV,Ux]=CV($x),eT=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...l}=e,[c=!1,u]=Qn({prop:r,defaultProp:s,onChange:i});return a.jsx(jV,{scope:n,disabled:o,contentId:Yn(),open:c,onOpenToggle:y.useCallback(()=>u(d=>!d),[u]),children:a.jsx(Re.div,{"data-state":Wx(c),"data-disabled":o?"":void 0,...l,ref:t})})});eT.displayName=$x;var tT="CollapsibleTrigger",Vx=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=Ux(tT,n);return a.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Wx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:de(e.onClick,s.onOpenToggle)})});Vx.displayName=tT;var Bx="CollapsibleContent",Zh=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Ux(Bx,e.__scopeCollapsible);return a.jsx(hn,{present:n||s.open,children:({present:o})=>a.jsx(EV,{...r,ref:t,present:o})})});Zh.displayName=Bx;var EV=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=Ux(Bx,n),[l,c]=y.useState(r),u=y.useRef(null),d=Ze(t,u),f=y.useRef(0),h=f.current,p=y.useRef(0),x=p.current,m=i.open||l,v=y.useRef(m),g=y.useRef();return y.useEffect(()=>{const w=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(w)},[]),an(()=>{const w=u.current;if(w){g.current=g.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const b=w.getBoundingClientRect();f.current=b.height,p.current=b.width,v.current||(w.style.transitionDuration=g.current.transitionDuration,w.style.animationName=g.current.animationName),c(r)}},[i.open,r]),a.jsx(Re.div,{"data-state":Wx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:m&&s})});function Wx(e){return e?"open":"closed"}var nT=eT,NV=Vx,TV=Zh;const PV=nT,RV=Vx,rT=y.forwardRef(({className:e,...t},n)=>a.jsx(Zh,{ref:n,className:re("overflow-y-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t}));rT.displayName=Zh.displayName;var AV="Label",sT=y.forwardRef((e,t)=>a.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sT.displayName=AV;var oT=sT;const DV=eu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=y.forwardRef(({className:e,...t},n)=>a.jsx(oT,{ref:n,className:re(DV(),e),...t}));_t.displayName=oT.displayName;const nn=oU,iT=y.createContext({}),ge=({...e})=>a.jsx(iT.Provider,{value:{name:e.name},children:a.jsx(cU,{...e})}),Gh=()=>{const e=y.useContext(iT),t=y.useContext(aT),{getFieldState:n,formState:r}=Kh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},aT=y.createContext({}),me=y.forwardRef(({className:e,...t},n)=>{const r=y.useId();return a.jsx(aT.Provider,{value:{id:r},children:a.jsx("div",{ref:n,className:re("space-y-2",e),...t})})});me.displayName="FormItem";const ye=y.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Gh();return a.jsx(_t,{ref:n,className:re(r&&"text-destructive",e),htmlFor:s,...t})});ye.displayName="FormLabel";const we=y.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Gh();return a.jsx(is,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});we.displayName="FormControl";const OV=y.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Gh();return a.jsx("p",{ref:n,id:r,className:re("text-sm text-muted-foreground",e),...t})});OV.displayName="FormDescription";const fe=y.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Gh(),{t:i}=Ve(),l=s?i(String(s==null?void 0:s.message)):t;return l?a.jsx("p",{ref:r,id:o,className:re("text-sm font-medium text-destructive",e),...n,children:l}):null});fe.displayName="FormMessage";const ae=y.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:re("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:r,...n}));ae.displayName="Input";function Wg(e,[t,n]){return Math.min(n,Math.max(t,e))}var IV=[" ","Enter","ArrowUp","ArrowDown"],MV=[" ","Enter"],yu="Select",[qh,Xh,LV]=tu(yu),[fl,i9]=fn(yu,[LV,il]),Qh=il(),[zV,Uo]=fl(yu),[FV,$V]=fl(yu),lT=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p}=e,x=Qh(t),[m,v]=y.useState(null),[g,w]=y.useState(null),[b,_]=y.useState(!1),C=Ei(u),[j=!1,T]=Qn({prop:r,defaultProp:s,onChange:o}),[R,A]=Qn({prop:i,defaultProp:l,onChange:c}),O=y.useRef(null),Z=m?!!m.closest("form"):!0,[N,z]=y.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return a.jsx(Sv,{...x,children:a.jsxs(zV,{required:p,scope:t,trigger:m,onTriggerChange:v,valueNode:g,onValueNodeChange:w,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Yn(),value:R,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:h,children:[a.jsx(qh.Provider,{scope:t,children:a.jsx(FV,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(U=>{z(J=>new Set(J).add(U))},[]),onNativeOptionRemove:y.useCallback(U=>{z(J=>{const F=new Set(J);return F.delete(U),F})},[]),children:n})}),Z?a.jsxs(OT,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:U=>A(U.target.value),disabled:h,children:[R===void 0?a.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};lT.displayName=yu;var cT="SelectTrigger",uT=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Qh(n),i=Uo(cT,n),l=i.disabled||r,c=Ze(t,i.onTriggerChange),u=Xh(n),[d,f,h]=IT(x=>{const m=u().filter(w=>!w.disabled),v=m.find(w=>w.value===i.value),g=MT(m,x,v);g!==void 0&&i.onValueChange(g.value)}),p=()=>{l||(i.onOpenChange(!0),h())};return a.jsx(kv,{asChild:!0,...o,children:a.jsx(Re.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":DT(i.value)?"":void 0,...s,ref:c,onClick:de(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:de(s.onPointerDown,x=>{const m=x.target;m.hasPointerCapture(x.pointerId)&&m.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:de(s.onKeyDown,x=>{const m=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(m&&x.key===" ")&&IV.includes(x.key)&&(p(),x.preventDefault())})})})});uT.displayName=cT;var dT="SelectValue",fT=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...l}=e,c=Uo(dT,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ze(t,c.onValueNodeChange);return an(()=>{u(d)},[u,d]),a.jsx(Re.span,{...l,ref:f,style:{pointerEvents:"none"},children:DT(c.value)?a.jsx(a.Fragment,{children:i}):o})});fT.displayName=dT;var UV="SelectIcon",hT=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});hT.displayName=UV;var VV="SelectPortal",mT=e=>a.jsx(ru,{asChild:!0,...e});mT.displayName=VV;var _i="SelectContent",pT=y.forwardRef((e,t)=>{const n=Uo(_i,e.__scopeSelect),[r,s]=y.useState();if(an(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Ws.createPortal(a.jsx(gT,{scope:e.__scopeSelect,children:a.jsx(qh.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),o):null}return a.jsx(yT,{...e,ref:t})});pT.displayName=_i;var ks=10,[gT,Vo]=fl(_i),BV="SelectContentImpl",yT=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:m,avoidCollisions:v,...g}=e,w=Uo(_i,n),[b,_]=y.useState(null),[C,j]=y.useState(null),T=Ze(t,xe=>_(xe)),[R,A]=y.useState(null),[O,Z]=y.useState(null),N=Xh(n),[z,S]=y.useState(!1),U=y.useRef(!1);y.useEffect(()=>{if(b)return Tv(b)},[b]),hv();const J=y.useCallback(xe=>{const[ke,...Pe]=N().map(Ae=>Ae.ref.current),[Fe]=Pe.slice(-1),Me=document.activeElement;for(const Ae of xe)if(Ae===Me||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===ke&&C&&(C.scrollTop=0),Ae===Fe&&C&&(C.scrollTop=C.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Me))return},[N,C]),F=y.useCallback(()=>J([R,b]),[J,R,b]);y.useEffect(()=>{z&&F()},[z,F]);const{onOpenChange:W,triggerPointerDownPosRef:I}=w;y.useEffect(()=>{if(b){let xe={x:0,y:0};const ke=Fe=>{var Me,Ae;xe={x:Math.abs(Math.round(Fe.pageX)-(((Me=I.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Ae=I.current)==null?void 0:Ae.y)??0))}},Pe=Fe=>{xe.x<=10&&xe.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",ke),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,W,I]),y.useEffect(()=>{const xe=()=>W(!1);return window.addEventListener("blur",xe),window.addEventListener("resize",xe),()=>{window.removeEventListener("blur",xe),window.removeEventListener("resize",xe)}},[W]);const[X,$]=IT(xe=>{const ke=N().filter(Me=>!Me.disabled),Pe=ke.find(Me=>Me.ref.current===document.activeElement),Fe=MT(ke,xe,Pe);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=y.useCallback((xe,ke,Pe)=>{const Fe=!U.current&&!Pe;(w.value!==void 0&&w.value===ke||Fe)&&(A(xe),Fe&&(U.current=!0))},[w.value]),ve=y.useCallback(()=>b==null?void 0:b.focus(),[b]),oe=y.useCallback((xe,ke,Pe)=>{const Fe=!U.current&&!Pe;(w.value!==void 0&&w.value===ke||Fe)&&Z(xe)},[w.value]),ie=r==="popper"?Hg:vT,Ie=ie===Hg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:m,avoidCollisions:v}:{};return a.jsx(gT,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:R,onItemLeave:ve,itemTextRefCallback:oe,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:z,searchRef:X,children:a.jsx(ph,{as:is,allowPinchZoom:!0,children:a.jsx(uh,{asChild:!0,trapped:w.open,onMountAutoFocus:xe=>{xe.preventDefault()},onUnmountAutoFocus:de(s,xe=>{var ke;(ke=w.trigger)==null||ke.focus({preventScroll:!0}),xe.preventDefault()}),children:a.jsx(rl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:xe=>xe.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:a.jsx(ie,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:xe=>xe.preventDefault(),...g,...Ie,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:de(g.onKeyDown,xe=>{const ke=xe.ctrlKey||xe.altKey||xe.metaKey;if(xe.key==="Tab"&&xe.preventDefault(),!ke&&xe.key.length===1&&$(xe.key),["ArrowUp","ArrowDown","Home","End"].includes(xe.key)){let Fe=N().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(xe.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(xe.key)){const Me=xe.target,Ae=Fe.indexOf(Me);Fe=Fe.slice(Ae+1)}setTimeout(()=>J(Fe)),xe.preventDefault()}})})})})})})});yT.displayName=BV;var WV="SelectItemAlignedPosition",vT=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Uo(_i,n),i=Vo(_i,n),[l,c]=y.useState(null),[u,d]=y.useState(null),f=Ze(t,T=>d(T)),h=Xh(n),p=y.useRef(!1),x=y.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:w}=i,b=y.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&m&&v&&g){const T=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(o.dir!=="rtl"){const Me=O.left-R.left,Ae=A.left-Me,ot=T.left-Ae,E=T.width+ot,ee=Math.max(E,R.width),G=window.innerWidth-ks,D=Wg(Ae,[ks,G-ee]);l.style.minWidth=E+"px",l.style.left=D+"px"}else{const Me=R.right-O.right,Ae=window.innerWidth-A.right-Me,ot=window.innerWidth-T.right-Ae,E=T.width+ot,ee=Math.max(E,R.width),G=window.innerWidth-ks,D=Wg(Ae,[ks,G-ee]);l.style.minWidth=E+"px",l.style.right=D+"px"}const Z=h(),N=window.innerHeight-ks*2,z=m.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),F=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+z+W+F,X=Math.min(v.offsetHeight*5,I),$=window.getComputedStyle(m),B=parseInt($.paddingTop,10),ve=parseInt($.paddingBottom,10),oe=T.top+T.height/2-ks,ie=N-oe,Ie=v.offsetHeight/2,xe=v.offsetTop+Ie,ke=U+J+xe,Pe=I-ke;if(ke<=oe){const Me=v===Z[Z.length-1].ref.current;l.style.bottom="0px";const Ae=u.clientHeight-m.offsetTop-m.offsetHeight,ot=Math.max(ie,Ie+(Me?ve:0)+Ae+F),E=ke+ot;l.style.height=E+"px"}else{const Me=v===Z[0].ref.current;l.style.top="0px";const ot=Math.max(oe,U+m.offsetTop+(Me?B:0)+Ie)+Pe;l.style.height=ot+"px",m.scrollTop=ke-oe+m.offsetTop}l.style.margin=`${ks}px 0`,l.style.minHeight=X+"px",l.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,l,u,m,v,g,o.dir,r]);an(()=>b(),[b]);const[_,C]=y.useState();an(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(T=>{T&&x.current===!0&&(b(),w==null||w(),x.current=!1)},[b,w]);return a.jsx(KV,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:a.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});vT.displayName=WV;var HV="SelectPopperPosition",Hg=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=ks,...o}=e,i=Qh(n);return a.jsx(Cv,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hg.displayName=HV;var[KV,Hx]=fl(_i,{}),Kg="SelectViewport",xT=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Vo(Kg,n),i=Hx(Kg,n),l=Ze(t,o.onViewportChange),c=y.useRef(0);return a.jsxs(a.Fragment,{children:[a.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:r}),a.jsx(qh.Slot,{scope:n,children:a.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:de(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const x=window.innerHeight-ks*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),g=Math.max(m,v);if(g<x){const w=g+p,b=Math.min(x,w),_=w-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});xT.displayName=Kg;var wT="SelectGroup",[YV,ZV]=fl(wT),bT=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Yn();return a.jsx(YV,{scope:n,id:s,children:a.jsx(Re.div,{role:"group","aria-labelledby":s,...r,ref:t})})});bT.displayName=wT;var _T="SelectLabel",ST=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ZV(_T,n);return a.jsx(Re.div,{id:s.id,...r,ref:t})});ST.displayName=_T;var Ef="SelectItem",[GV,kT]=fl(Ef),CT=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,l=Uo(Ef,n),c=Vo(Ef,n),u=l.value===r,[d,f]=y.useState(o??""),[h,p]=y.useState(!1),x=Ze(t,g=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,g,r,s)}),m=Yn(),v=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")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 a.jsx(GV,{scope:n,value:r,disabled:s,textId:m,isSelected:u,onItemTextChange:y.useCallback(g=>{f(w=>w||((g==null?void 0:g.textContent)??"").trim())},[]),children:a.jsx(qh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(Re.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:de(i.onFocus,()=>p(!0)),onBlur:de(i.onBlur,()=>p(!1)),onPointerUp:de(i.onPointerUp,v),onPointerMove:de(i.onPointerMove,g=>{var w;s?(w=c.onItemLeave)==null||w.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(i.onPointerLeave,g=>{var w;g.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:de(i.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(MV.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})})})})});CT.displayName=Ef;var Bl="SelectItemText",jT=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Uo(Bl,n),l=Vo(Bl,n),c=kT(Bl,n),u=$V(Bl,n),[d,f]=y.useState(null),h=Ze(t,g=>f(g),c.onItemTextChange,g=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,g,c.value,c.disabled)}),p=d==null?void 0:d.textContent,x=y.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return an(()=>(m(x),()=>v(x)),[m,v,x]),a.jsxs(a.Fragment,{children:[a.jsx(Re.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ws.createPortal(o.children,i.valueNode):null]})});jT.displayName=Bl;var ET="SelectItemIndicator",NT=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kT(ET,n).isSelected?a.jsx(Re.span,{"aria-hidden":!0,...r,ref:t}):null});NT.displayName=ET;var Yg="SelectScrollUpButton",TT=y.forwardRef((e,t)=>{const n=Vo(Yg,e.__scopeSelect),r=Hx(Yg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ze(t,r.onScrollButtonChange);return an(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(RT,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});TT.displayName=Yg;var Zg="SelectScrollDownButton",PT=y.forwardRef((e,t)=>{const n=Vo(Zg,e.__scopeSelect),r=Hx(Zg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ze(t,r.onScrollButtonChange);return an(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(RT,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});PT.displayName=Zg;var RT=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Vo("SelectScrollButton",n),i=y.useRef(null),l=Xh(n),c=y.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>c(),[c]),an(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:de(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:de(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:de(s.onPointerLeave,()=>{c()})})}),qV="SelectSeparator",AT=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(Re.div,{"aria-hidden":!0,...r,ref:t})});AT.displayName=qV;var Gg="SelectArrow",XV=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Qh(n),o=Uo(Gg,n),i=Vo(Gg,n);return o.open&&i.position==="popper"?a.jsx(jv,{...s,...r,ref:t}):null});XV.displayName=Gg;function DT(e){return e===""||e===void 0}var OT=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=y.useRef(null),o=Ze(t,s),i=Nx(n);return y.useEffect(()=>{const l=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(f)}},[i,n]),a.jsx(mu,{asChild:!0,children:a.jsx("select",{...r,ref:o,defaultValue:n})})});OT.displayName="BubbleSelect";function IT(e){const t=It(e),n=y.useRef(""),r=y.useRef(0),s=y.useCallback(i=>{const l=n.current+i;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function MT(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=QV(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function QV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var JV=lT,LT=uT,eB=fT,tB=hT,nB=mT,zT=pT,rB=xT,sB=bT,FT=ST,$T=CT,oB=jT,iB=NT,UT=TT,VT=PT,BT=AT;const li=JV,Da=sB,ci=eB,Co=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(LT,{ref:r,className:re("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),...n,children:[t,a.jsx(tB,{asChild:!0,children:a.jsx(iv,{className:"h-4 w-4 opacity-50"})})]}));Co.displayName=LT.displayName;const WT=y.forwardRef(({className:e,...t},n)=>a.jsx(UT,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(rI,{className:"h-4 w-4"})}));WT.displayName=UT.displayName;const HT=y.forwardRef(({className:e,...t},n)=>a.jsx(VT,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(iv,{className:"h-4 w-4"})}));HT.displayName=VT.displayName;const jo=y.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(nB,{children:a.jsxs(zT,{ref:s,className:re("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",n==="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:n,...r,children:[a.jsx(WT,{}),a.jsx(rB,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(HT,{})]})}));jo.displayName=zT.displayName;const Ya=y.forwardRef(({className:e,...t},n)=>a.jsx(FT,{ref:n,className:re("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ya.displayName=FT.displayName;const An=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs($T,{ref:r,className:re("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),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(iB,{children:a.jsx(ok,{className:"h-4 w-4"})})}),a.jsx(oB,{children:t})]}));An.displayName=$T.displayName;const aB=y.forwardRef(({className:e,...t},n)=>a.jsx(BT,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));aB.displayName=BT.displayName;const hl=Wv,ml=Hv,lB=Kv,KT=y.forwardRef(({className:e,...t},n)=>a.jsx(iu,{ref:n,className:re("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}));KT.displayName=iu.displayName;const Ai=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(lB,{children:[a.jsx(KT,{}),a.jsxs(au,{ref:r,className:re("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),...n,children:[t,a.jsxs(xh,{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:[a.jsx(cv,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ai.displayName=au.displayName;const Di=({className:e,...t})=>a.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Di.displayName="DialogHeader";const Jh=({className:e,...t})=>a.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jh.displayName="DialogFooter";const Oi=y.forwardRef(({className:e,...t},n)=>a.jsx(lu,{ref:n,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));Oi.displayName=lu.displayName;const YT=y.forwardRef(({className:e,...t},n)=>a.jsx(cu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));YT.displayName=cu.displayName;function cB(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Kx="ScrollArea",[ZT,a9]=fn(Kx),[uB,wr]=ZT(Kx),GT=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[l,c]=y.useState(null),[u,d]=y.useState(null),[f,h]=y.useState(null),[p,x]=y.useState(null),[m,v]=y.useState(null),[g,w]=y.useState(0),[b,_]=y.useState(0),[C,j]=y.useState(!1),[T,R]=y.useState(!1),A=Ze(t,Z=>c(Z)),O=Ei(s);return a.jsx(uB,{scope:n,type:r,dir:O,scrollHideDelay:o,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:w,onCornerHeightChange:_,children:a.jsx(Re.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});GT.displayName=Kx;var qT="ScrollAreaViewport",XT=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=wr(qT,n),l=y.useRef(null),c=Ze(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});XT.displayName=qT;var hs="ScrollAreaScrollbar",Yx=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=wr(hs,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,l=e.orientation==="horizontal";return y.useEffect(()=>(l?o(!0):i(!0),()=>{l?o(!1):i(!1)}),[l,o,i]),s.type==="hover"?a.jsx(dB,{...r,ref:t,forceMount:n}):s.type==="scroll"?a.jsx(fB,{...r,ref:t,forceMount:n}):s.type==="auto"?a.jsx(QT,{...r,ref:t,forceMount:n}):s.type==="always"?a.jsx(Zx,{...r,ref:t}):null});Yx.displayName=hs;var dB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=wr(hs,e.__scopeScrollArea),[o,i]=y.useState(!1);return y.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),a.jsx(hn,{present:n||o,children:a.jsx(QT,{"data-state":o?"visible":"hidden",...r,ref:t})})}),fB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=wr(hs,e.__scopeScrollArea),o=e.orientation==="horizontal",i=tm(()=>c("SCROLL_END"),100),[l,c]=cB("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(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),y.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),i()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),a.jsx(hn,{present:n||l!=="hidden",children:a.jsx(Zx,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:de(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:de(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),QT=y.forwardRef((e,t)=>{const n=wr(hs,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=y.useState(!1),l=e.orientation==="horizontal",c=tm(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(l?u:d)}},10);return Za(n.viewport,c),Za(n.content,c),a.jsx(hn,{present:r||o,children:a.jsx(Zx,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Zx=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=wr(hs,e.__scopeScrollArea),o=y.useRef(null),i=y.useRef(0),[l,c]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=r2(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,p){return vB(h,i.current,l,p)}return n==="horizontal"?a.jsx(hB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,p=Zb(h,l,s.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?a.jsx(mB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,p=Zb(h,l);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),hB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=wr(hs,e.__scopeScrollArea),[i,l]=y.useState(),c=y.useRef(null),u=Ze(t,c,o.onScrollbarXChange);return y.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(e2,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),o2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Tf(i.paddingLeft),paddingEnd:Tf(i.paddingRight)}})}})}),mB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=wr(hs,e.__scopeScrollArea),[i,l]=y.useState(),c=y.useRef(null),u=Ze(t,c,o.onScrollbarYChange);return y.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(e2,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":em(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),o2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Tf(i.paddingTop),paddingEnd:Tf(i.paddingBottom)}})}})}),[pB,JT]=ZT(hs),e2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=wr(hs,n),[x,m]=y.useState(null),v=Ze(t,A=>m(A)),g=y.useRef(null),w=y.useRef(""),b=p.viewport,_=r.content-r.viewport,C=It(d),j=It(c),T=tm(f,10);function R(A){if(g.current){const O=A.clientX-g.current.left,Z=A.clientY-g.current.top;u({x:O,y:Z})}}return y.useEffect(()=>{const A=O=>{const Z=O.target;(x==null?void 0:x.contains(Z))&&C(O,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),y.useEffect(j,[r,j]),Za(x,T),Za(p.content,T),a.jsx(pB,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:It(o),onThumbPointerUp:It(i),onThumbPositionChange:j,onThumbPointerDown:It(l),children:a.jsx(Re.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:de(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),g.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),R(A))}),onPointerMove:de(e.onPointerMove,R),onPointerUp:de(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=w.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),Nf="ScrollAreaThumb",t2=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=JT(Nf,e.__scopeScrollArea);return a.jsx(hn,{present:n||s.hasThumb,children:a.jsx(gB,{ref:t,...r})})}),gB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=wr(Nf,n),i=JT(Nf,n),{onThumbPositionChange:l}=i,c=Ze(t,f=>i.onThumbChange(f)),u=y.useRef(),d=tm(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const p=xB(f,l);u.current=p,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,l]),a.jsx(Re.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:de(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),x=f.clientX-p.left,m=f.clientY-p.top;i.onThumbPointerDown({x,y:m})}),onPointerUp:de(e.onPointerUp,i.onThumbPointerUp)})});t2.displayName=Nf;var Gx="ScrollAreaCorner",n2=y.forwardRef((e,t)=>{const n=wr(Gx,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(yB,{...e,ref:t}):null});n2.displayName=Gx;var yB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=wr(Gx,n),[o,i]=y.useState(0),[l,c]=y.useState(0),u=!!(o&&l);return Za(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Za(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?a.jsx(Re.div,{...r,ref:t,style:{width:o,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Tf(e){return e?parseInt(e,10):0}function r2(e,t){const n=e/t;return isNaN(n)?0:n}function em(e){const t=r2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function vB(e,t,n,r="ltr"){const s=em(n),o=s/2,i=t||o,l=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return s2([c,u],f)(e)}function Zb(e,t,n="ltr"){const r=em(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,l=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Wg(e,c);return s2([0,i],[0,l])(u)}function s2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function o2(e,t){return e>0&&e<t}var xB=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,l=n.top!==o.top;(i||l)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function tm(e,t){const n=It(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Za(e,t){const n=It(t);an(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var i2=GT,wB=XT,bB=n2;const nm=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(i2,{ref:r,className:re("relative overflow-hidden",e),...n,children:[a.jsx(wB,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(a2,{}),a.jsx(bB,{})]}));nm.displayName=i2.displayName;const a2=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(Yx,{ref:r,orientation:t,className:re("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),...n,children:a.jsx(t2,{className:"relative flex-1 rounded-full bg-border"})}));a2.displayName=Yx.displayName;const Os=new Map([["aliyun",["common.provider.aliyun","/imgs/providers/aliyun.svg"]],["tencent",["common.provider.tencent","/imgs/providers/tencent.svg"]],["huaweicloud",["common.provider.huaweicloud","/imgs/providers/huaweicloud.svg"]],["qiniu",["common.provider.qiniu","/imgs/providers/qiniu.svg"]],["aws",["common.provider.aws","/imgs/providers/aws.svg"]],["cloudflare",["common.provider.cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["common.provider.namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["common.provider.godaddy","/imgs/providers/godaddy.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]],["k8s",["common.provider.kubernetes","/imgs/providers/k8s.svg"]]]),Gb=e=>Os.get(e),br=se.union([se.literal("aliyun"),se.literal("tencent"),se.literal("huaweicloud"),se.literal("qiniu"),se.literal("aws"),se.literal("cloudflare"),se.literal("namesilo"),se.literal("godaddy"),se.literal("local"),se.literal("ssh"),se.literal("webhook"),se.literal("k8s")],{message:"access.authorization.form.type.placeholder"}),_r=e=>{switch(e){case"aliyun":case"tencent":case"huaweicloud":return"all";case"qiniu":case"local":case"ssh":case"webhook":case"k8s":return"deploy";case"aws":case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},_B=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,accessKeyId:se.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessSecretId:se.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={accessKeyId:"",accessKeySecret:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:l.accessKeyId,accessSecretId:l.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"accessSecretId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.access_key_secret.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},SB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,secretId:se.string().min(1,"access.authorization.form.secret_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretKey:se.string().min(1,"access.authorization.form.secret_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={secretId:"",secretKey:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:l.secretId,secretKey:l.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"secretId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.secret_id.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.secret_id.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"secretKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.secret_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},kB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,region:se.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:se.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:se.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={region:"cn-north-1",accessKeyId:"",secretAccessKey:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"huaweicloud",region:l.region,accessKeyId:l.accessKeyId,secretAccessKey:l.secretAccessKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"region",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.region.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"secretAccessKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.secret_access_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},CB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,accessKey:se.string().min(1,"access.authorization.form.access_key.placeholder").max(64),secretKey:se.string().min(1,"access.authorization.form.secret_key.placeholder").max(64)});let l={accessKey:"",secretKey:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:l.accessKey,secretKey:l.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"accessKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.access_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.access_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"secretKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.secret_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},jB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,region:se.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:se.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:se.string().min(1,"access.authorization.form.secret_access_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),hostedZoneId:se.string().min(0,"access.authorization.form.aws_hosted_zone_id.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={region:"cn-north-1",accessKeyId:"",secretAccessKey:"",hostedZoneId:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aws",region:l.region,accessKeyId:l.accessKeyId,secretAccessKey:l.secretAccessKey,hostedZoneId:l.hostedZoneId}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey,hostedZoneId:d.hostedZoneId}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"region",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.region.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"accessKeyId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.access_key_id.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"secretAccessKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.secret_access_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.secret_access_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"hostedZoneId",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.aws_hosted_zone_id.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.aws_hosted_zone_id.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},EB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,dnsApiToken:se.string().min(1,"access.authorization.form.cloud_dns_api_token.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={dnsApiToken:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:l.dnsApiToken}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"dnsApiToken",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.cloud_dns_api_token.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.cloud_dns_api_token.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},NB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,apiKey:se.string().min(1,"access.authorization.form.namesilo_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={apiKey:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:l.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"apiKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.namesilo_api_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.namesilo_api_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},TB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,apiKey:se.string().min(1,"access.authorization.form.godaddy_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),apiSecret:se.string().min(1,"access.authorization.form.godaddy_api_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let l={apiKey:"",apiSecret:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:l.apiKey,apiSecret:l.apiSecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"apiKey",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.godaddy_api_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.godaddy_api_key.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"apiSecret",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.godaddy_api_secret.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.godaddy_api_secret.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},PB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=Jt(),{t:i}=Ve(),l=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,i("common.errmsg.string_max",{max:64})),configType:br}),c=en({resolver:tn(l),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local"}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"?s(f):r(f),o()}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})});return}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-3",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:i("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:i("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:i("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:i("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:i("common.save")})})]})})})})},qx=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=Jt(),[r,s]=y.useState(!1),{t:o}=Ve(),i=se.object({name:se.string().min(1,"access.group.form.name.errmsg.empty").max(64,o("common.errmsg.string_max",{max:64}))}),l=en({resolver:tn(i),defaultValues:{name:""}}),c=async u=>{try{await E8({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,p])=>{l.setError(h,{type:"manual",message:p.message})})}};return a.jsxs(hl,{onOpenChange:s,open:r,children:[a.jsx(ml,{asChild:!0,className:re(e),children:t}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:o("access.group.add")})}),a.jsx("div",{className:"container py-3",children:a.jsx(nn,{...l,children:a.jsxs("form",{onSubmit:u=>{u.stopPropagation(),l.handleSubmit(c)(u)},className:"space-y-8",children:[a.jsx(ge,{control:l.control,name:"name",render:({field:u})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.group.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.group.form.name.errmsg.empty"),...u,type:"text"})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})]})]})},RB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=Jt(),l=y.useRef(null),[c,u]=y.useState(""),{t:d}=Ve(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,p=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,d("common.errmsg.string_max",{max:64})),configType:br,host:se.string().refine(_=>p.test(_)||h.test(_),{message:"common.errmsg.host_invalid"}),group:se.string().optional(),port:se.string().min(1,"access.authorization.form.ssh_port.placeholder").max(5,d("common.errmsg.string_max",{max:5})),username:se.string().min(1,"access.authorization.form.ssh_username.placeholder").max(64,d("common.errmsg.string_max",{max:64})),password:se.string().min(0,"access.authorization.form.ssh_password.placeholder").max(64,d("common.errmsg.string_max",{max:64})),key:se.string().min(0,"access.authorization.form.ssh_key.placeholder").max(20480,d("common.errmsg.string_max",{max:20480})),keyFile:se.any().optional(),keyPassphrase:se.string().min(0,"access.authorization.form.ssh_key_passphrase.placeholder").max(2048,d("common.errmsg.string_max",{max:2048}))});let m={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",keyPassphrase:""};e&&(m=e.config);const v=en({resolver:tn(x),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:m.host,port:m.port,username:m.username,password:m.password,key:m.key,keyFile:m.keyFile,keyPassphrase:m.keyPassphrase}}),g=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:_r(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,keyPassphrase:_.keyPassphrase}};try{j.id=t=="copy"?"":j.id;const T=await vr(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Db({id:f,"access-":j.id}),C&&await Db({id:C,"access+":j.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,O])=>{v.setError(A,{type:"manual",message:O.message})});return}},w=async _=>{var R;const C=(R=_.target.files)==null?void 0:R[0];if(!C)return;const j=C;u(j.name);const T=await xN(j);v.setValue("key",T)},b=()=>{var _;(_=l.current)==null||_.click()};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...v,children:a.jsxs("form",{onSubmit:_=>{_.stopPropagation(),v.handleSubmit(g)(_)},className:"space-y-3",children:[a.jsx(ge,{control:v.control,name:"name",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.name.placeholder"),..._})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"group",render:({field:_})=>a.jsxs(me,{children:[a.jsxs(ye,{className:"w-full flex justify-between",children:[a.jsx("div",{children:d("access.authorization.form.ssh_group.label")}),a.jsx(qx,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(yi,{size:14}),d("common.add")]})})]}),a.jsx(we,{children:a.jsxs(li,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{v.setValue("group",C)},children:[a.jsx(Co,{children:a.jsx(ci,{placeholder:d("access.authorization.form.access_group.placeholder")})}),a.jsxs(jo,{children:[a.jsx(An,{value:"emptyId",children:a.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(C=>a.jsx(An,{value:C.id?C.id:"",children:a.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"id",render:({field:_})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:d("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{..._})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"configType",render:({field:_})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:d("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{..._})}),a.jsx(fe,{})]})}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(ge,{control:v.control,name:"host",render:({field:_})=>a.jsxs(me,{className:"grow",children:[a.jsx(ye,{children:d("access.authorization.form.ssh_host.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_host.placeholder"),..._})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"port",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.ssh_port.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_port.placeholder"),..._,type:"number"})}),a.jsx(fe,{})]})})]}),a.jsx(ge,{control:v.control,name:"username",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.ssh_username.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_username.placeholder"),..._})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"password",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.ssh_password.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_password.placeholder"),..._,type:"password"})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"key",render:({field:_})=>a.jsxs(me,{hidden:!0,children:[a.jsx(ye,{children:d("access.authorization.form.ssh_key.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"keyFile",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.ssh_key.label")}),a.jsx(we,{children:a.jsxs("div",{children:[a.jsx(Te,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.authorization.form.ssh_key_file.placeholder")}),a.jsx(ae,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._,ref:l,className:"hidden",hidden:!0,type:"file",onChange:w})]})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:v.control,name:"keyPassphrase",render:({field:_})=>a.jsxs(me,{children:[a.jsx(ye,{children:d("access.authorization.form.ssh_key_passphrase.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:d("access.authorization.form.ssh_key_passphrase.placeholder"),..._,type:"password"})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:d("common.save")})})]})})})})},AB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),{t:o}=Ve(),i=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:br,url:se.string().url("common.errmsg.url_invalid")});let l={url:""};e&&(l=e.config);const c=en({resolver:tn(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:l.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:_r(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await vr(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"name",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"id",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"configType",render:({field:d})=>a.jsxs(me,{className:"hidden",children:[a.jsx(ye,{children:o("access.authorization.form.config.label")}),a.jsx(we,{children:a.jsx(ae,{...d})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:c.control,name:"url",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("access.authorization.form.webhook_url.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:o("access.authorization.form.webhook_url.placeholder"),...d})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:o("common.save")})})]})})})})},DB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=Jt(),o=y.useRef(null),[i,l]=y.useState(""),{t:c}=Ve(),u=se.object({id:se.string().optional(),name:se.string().min(1,"access.authorization.form.name.placeholder").max(64,c("common.errmsg.string_max",{max:64})),configType:br,kubeConfig:se.string().min(1,"access.authorization.form.k8s_kubeconfig.placeholder").max(20480,c("common.errmsg.string_max",{max:20480})),kubeConfigFile:se.any().optional()});let d={kubeConfig:"",kubeConfigFile:""};e&&(d=e.config);const f=en({resolver:tn(u),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"k8s",kubeConfig:d.kubeConfig,kubeConfigFile:d.kubeConfigFile}}),h=async m=>{const v={id:m.id,name:m.name,configType:m.configType,usage:_r(m.configType),config:{kubeConfig:m.kubeConfig}};try{v.id=t=="copy"?"":v.id;const g=await vr(v);n(),v.id=g.id,v.created=g.created,v.updated=g.updated,m.id&&t=="edit"?s(v):r(v)}catch(g){Object.entries(g.response.data).forEach(([b,_])=>{f.setError(b,{type:"manual",message:_.message})});return}},p=async m=>{var b;const v=(b=m.target.files)==null?void 0:b[0];if(!v)return;const g=v;l(g.name);const w=await xN(g);f.setValue("kubeConfig",w)},x=()=>{var m;(m=o.current)==null||m.click()};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:a.jsx(nn,{...f,children:a.jsxs("form",{onSubmit:m=>{m.stopPropagation(),f.handleSubmit(h)(m)},className:"space-y-3",children:[a.jsx(ge,{control:f.control,name:"name",render:({field:m})=>a.jsxs(me,{children:[a.jsx(ye,{children:c("access.authorization.form.name.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:c("access.authorization.form.name.placeholder"),...m})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:f.control,name:"kubeConfig",render:({field:m})=>a.jsxs(me,{hidden:!0,children:[a.jsx(ye,{children:c("access.authorization.form.k8s_kubeconfig.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:c("access.authorization.form.k8s_kubeconfig.placeholder"),...m})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:f.control,name:"kubeConfigFile",render:({field:m})=>a.jsxs(me,{children:[a.jsx(ye,{children:c("access.authorization.form.k8s_kubeconfig.label")}),a.jsx(we,{children:a.jsxs("div",{children:[a.jsx(Te,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:x,children:i||c("access.authorization.form.k8s_kubeconfig_file.placeholder")}),a.jsx(ae,{placeholder:c("access.authorization.form.k8s_kubeconfig.placeholder"),...m,ref:o,className:"hidden",hidden:!0,type:"file",onChange:p})]})}),a.jsx(fe,{})]})}),a.jsx(fe,{}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:c("common.save")})})]})})})})},va=({trigger:e,op:t,data:n,className:r})=>{const[s,o]=y.useState(!1),{t:i}=Ve(),l=Array.from(Os.keys()),[c,u]=y.useState((n==null?void 0:n.configType)||"");let d=a.jsx(a.Fragment,{children:" "});switch(c){case"aliyun":d=a.jsx(_B,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"tencent":d=a.jsx(SB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"huaweicloud":d=a.jsx(kB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=a.jsx(CB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"aws":d=a.jsx(jB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=a.jsx(EB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=a.jsx(NB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=a.jsx(TB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=a.jsx(PB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=a.jsx(RB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=a.jsx(AB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"k8s":d=a.jsx(DB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return a.jsxs(hl,{onOpenChange:o,open:s,children:[a.jsx(ml,{asChild:!0,className:re(r),children:e}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:t=="add"?i("access.authorization.add"):t=="edit"?i("access.authorization.edit"):i("access.authorization.copy")})}),a.jsx(nm,{className:"max-h-[80vh]",children:a.jsxs("div",{className:"container py-3",children:[a.jsx(_t,{children:i("access.authorization.form.type.label")}),a.jsxs(li,{onValueChange:h=>{u(h)},defaultValue:c,children:[a.jsx(Co,{className:"mt-3",children:a.jsx(ci,{placeholder:i("access.authorization.form.type.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:i("access.authorization.form.type.list")}),l.map(h=>{var p,x;return a.jsx(An,{value:h,children:a.jsxs("div",{className:re("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[a.jsx("img",{src:(p=Os.get(h))==null?void 0:p[1],className:"h-6 w-6"}),a.jsx("div",{children:i(((x=Os.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})};var l2=Symbol.for("immer-nothing"),qb=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state");function Pr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ga=Object.getPrototypeOf;function qa(e){return!!e&&!!e[Jn]}function Si(e){var t;return e?c2(e)||Array.isArray(e)||!!e[qb]||!!((t=e.constructor)!=null&&t[qb])||sm(e)||om(e):!1}var OB=Object.prototype.constructor.toString();function c2(e){if(!e||typeof e!="object")return!1;const t=Ga(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===OB}function Pf(e,t){rm(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function rm(e){const t=e[Jn];return t?t.type_:Array.isArray(e)?1:sm(e)?2:om(e)?3:0}function qg(e,t){return rm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u2(e,t,n){const r=rm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function IB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sm(e){return e instanceof Map}function om(e){return e instanceof Set}function Ko(e){return e.copy_||e.base_}function Xg(e,t){if(sm(e))return new Map(e);if(om(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=c2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Jn];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],l=r[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Ga(e),r)}else{const r=Ga(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function Xx(e,t=!1){return im(e)||qa(e)||!Si(e)||(rm(e)>1&&(e.set=e.add=e.clear=e.delete=MB),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Xx(r,!0))),e}function MB(){Pr(2)}function im(e){return Object.isFrozen(e)}var LB={};function ki(e){const t=LB[e];return t||Pr(0,e),t}var Kc;function d2(){return Kc}function zB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xb(e,t){t&&(ki("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qg(e){Jg(e),e.drafts_.forEach(FB),e.drafts_=null}function Jg(e){e===Kc&&(Kc=e.parent_)}function Qb(e){return Kc=zB(Kc,e)}function FB(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Jb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Jn].modified_&&(Qg(t),Pr(4)),Si(e)&&(e=Rf(t,e),t.parent_||Af(t,e)),t.patches_&&ki("Patches").generateReplacementPatches_(n[Jn].base_,e,t.patches_,t.inversePatches_)):e=Rf(t,n,[]),Qg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==l2?e:void 0}function Rf(e,t,n){if(im(t))return t;const r=t[Jn];if(!r)return Pf(t,(s,o)=>e_(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Af(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),Pf(o,(l,c)=>e_(e,r,s,l,c,n,i)),Af(e,s,!1),n&&e.patches_&&ki("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function e_(e,t,n,r,s,o,i){if(qa(s)){const l=o&&t&&t.type_!==3&&!qg(t.assigned_,r)?o.concat(r):void 0,c=Rf(e,s,l);if(u2(n,r,c),qa(c))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(Si(s)&&!im(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rf(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Af(e,s)}}function Af(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xx(t,n)}function $B(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:d2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=Qx;n&&(s=[r],o=Yc);const{revoke:i,proxy:l}=Proxy.revocable(s,o);return r.draft_=l,r.revoke_=i,l}var Qx={get(e,t){if(t===Jn)return e;const n=Ko(e);if(!qg(n,t))return UB(e,n,t);const r=n[t];return e.finalized_||!Si(r)?r:r===hp(e.base_,t)?(mp(e),e.copy_[t]=ty(r,e)):r},has(e,t){return t in Ko(e)},ownKeys(e){return Reflect.ownKeys(Ko(e))},set(e,t,n){const r=f2(Ko(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=hp(Ko(e),t),o=s==null?void 0:s[Jn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(IB(n,s)&&(n!==void 0||qg(e.base_,t)))return!0;mp(e),ey(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return hp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,mp(e),ey(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ko(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Pr(11)},getPrototypeOf(e){return Ga(e.base_)},setPrototypeOf(){Pr(12)}},Yc={};Pf(Qx,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,n){return Qx.set.call(this,e[0],t,n,e[0])};function hp(e,t){const n=e[Jn];return(n?Ko(n):e)[t]}function UB(e,t,n){var s;const r=f2(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function f2(e,t){if(!(t in e))return;let n=Ga(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ga(n)}}function ey(e){e.modified_||(e.modified_=!0,e.parent_&&ey(e.parent_))}function mp(e){e.copy_||(e.copy_=Xg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var VB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(c=o,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Pr(6),r!==void 0&&typeof r!="function"&&Pr(7);let s;if(Si(t)){const o=Qb(this),i=ty(t,void 0);let l=!0;try{s=n(i),l=!1}finally{l?Qg(o):Jg(o)}return Xb(o,r),Jb(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===l2&&(s=void 0),this.autoFreeze_&&Xx(s,!0),r){const o=[],i=[];ki("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else Pr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,s;return[this.produce(t,n,(i,l)=>{r=i,s=l}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Si(e)||Pr(8),qa(e)&&(e=BB(e));const t=Qb(this),n=ty(e,void 0);return n[Jn].isManual_=!0,Jg(t),n}finishDraft(e,t){const n=e&&e[Jn];(!n||!n.isManual_)&&Pr(9);const{scope_:r}=n;return Xb(r,t),Jb(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=ki("Patches").applyPatches_;return qa(e)?r(e,t):this.produce(e,s=>r(s,t))}};function ty(e,t){const n=sm(e)?ki("MapSet").proxyMap_(e,t):om(e)?ki("MapSet").proxySet_(e,t):$B(e,t);return(t?t.scope_:d2()).drafts_.push(n),n}function BB(e){return qa(e)||Pr(10,e),h2(e)}function h2(e){if(!Si(e)||im(e))return e;const t=e[Jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Xg(e,!0);return Pf(n,(r,s)=>{u2(n,r,h2(s))}),t&&(t.finalized_=!1),n}var er=new VB,In=er.produce;er.produceWithPatches.bind(er);er.setAutoFreeze.bind(er);er.setUseStrictShallowCopy.bind(er);er.applyPatches.bind(er);er.createDraft.bind(er);er.finishDraft.bind(er);const WB="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let HB=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=WB[n[e]&63];return t};const KB=eu("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"}}),am=y.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:re(KB({variant:t}),e),...n}));am.displayName="Alert";const Jx=y.forwardRef(({className:e,...t},n)=>a.jsx("h5",{ref:n,className:re("mb-1 font-medium leading-none tracking-tight",e),...t}));Jx.displayName="AlertTitle";const lm=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:re("text-sm [&_p]:leading-relaxed",e),...t}));lm.displayName="AlertDescription";const Df=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:re("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:n,...t}));Df.displayName="Textarea";const YB=({variables:e,onValueChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ve();y.useEffect(()=>{e&&r(e)},[e]);const o=c=>{const u=n.findIndex(f=>f.key===c.key),d=In(n,f=>{u===-1?f.push(c):f[u]=c});r(d),t==null||t(d)},i=c=>{const u=[...n];u.splice(c,1),r(u),t==null||t(u)},l=(c,u)=>{const d=[...n];d[c]=u,r(d),t==null||t(d)};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between dark:text-stone-200",children:[a.jsx(_t,{children:s("domain.deployment.form.variables.label")}),a.jsx(Kt,{when:!!(n!=null&&n.length),children:a.jsx(pp,{variable:{key:"",value:""},trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(yi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:s("common.add")})]}),onSave:c=>{o(c)}})})]}),a.jsx(Kt,{when:!!(n!=null&&n.length),fallback:a.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:s("domain.deployment.form.variables.empty")}),a.jsx(pp,{trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(yi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:s("common.add")})]}),variable:{key:"",value:""},onSave:c=>{o(c)}})]}),children:a.jsx("div",{className:"border p-3 rounded-md text-stone-700 text-sm dark:text-stone-200",children:n==null?void 0:n.map((c,u)=>a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[c.key,"=",c.value]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(pp,{trigger:a.jsx(av,{size:16,className:"cursor-pointer"}),variable:c,onSave:d=>{l(u,d)}}),a.jsx(lv,{size:16,className:"cursor-pointer",onClick:()=>{i(u)}})]})]},u))})})]})},pp=({variable:e,trigger:t,onSave:n})=>{const[r,s]=y.useState({key:"",value:""});y.useEffect(()=>{e&&s(e)},[e]);const{t:o}=Ve(),[i,l]=y.useState(!1),[c,u]=y.useState({}),d=()=>{if(!r.key){u({key:o("domain.deployment.form.variables.key.required")});return}if(!r.value){u({value:o("domain.deployment.form.variables.value.required")});return}n==null||n(r),l(!1),u({})};return a.jsxs(hl,{open:i,onOpenChange:()=>{l(!i)},children:[a.jsx(ml,{children:t}),a.jsxs(Ai,{className:"dark:text-stone-200",children:[a.jsxs(Di,{className:"flex flex-col",children:[a.jsx(Oi,{children:o("domain.deployment.form.variables.label")}),a.jsxs("div",{className:"pt-5 flex flex-col items-start",children:[a.jsx(_t,{children:o("domain.deployment.form.variables.key")}),a.jsx(ae,{placeholder:o("domain.deployment.form.variables.key.placeholder"),value:r==null?void 0:r.key,onChange:f=>{s({...r,key:f.target.value})},className:"w-full mt-1"}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.key})]}),a.jsxs("div",{className:"pt-2 flex flex-col items-start",children:[a.jsx(_t,{children:o("domain.deployment.form.variables.value")}),a.jsx(ae,{placeholder:o("domain.deployment.form.variables.value.placeholder"),value:r==null?void 0:r.value,onChange:f=>{s({...r,value:f.target.value})},className:"w-full mt-1"}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.value})]})]}),a.jsx(Jh,{children:a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{onClick:()=>{d()},children:o("common.save")})})})]})]})},Of=new Map([["aliyun-oss",["common.provider.aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-cdn",["common.provider.aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["common.provider.aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["common.provider.tencent.cdn","/imgs/providers/tencent.svg"]],["qiniu-cdn",["common.provider.qiniu.cdn","/imgs/providers/qiniu.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]],["k8s-secret",["common.provider.kubernetes.secret","/imgs/providers/k8s.svg"]]]),ZB=Array.from(Of.keys()),m2=y.createContext({}),Mo=()=>y.useContext(m2),GB=({deploys:e,onChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ve();y.useEffect(()=>{r(e)},[e]);const o=c=>{c.id=HB();const u=[...n,c];r(u),t(u)},i=c=>{const u=n.filter(d=>d.id!==c);r(u),t(u)},l=c=>{const u=n.map(d=>d.id===c.id?{...c}:d);r(u),t(u)};return a.jsx(a.Fragment,{children:a.jsxs(Kt,{when:n.length>0,fallback:a.jsx(am,{className:"w-full border dark:border-stone-400",children:a.jsxs(lm,{className:"flex flex-col items-center",children:[a.jsx("div",{children:s("domain.deployment.nodata")}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(ny,{onSave:c=>{o(c)},trigger:a.jsx(Te,{size:"sm",children:s("common.add")})})})]})}),children:[a.jsx("div",{className:"flex justify-end py-2 border-b dark:border-stone-400",children:a.jsx(ny,{trigger:a.jsx(Te,{size:"sm",children:s("common.add")}),onSave:c=>{o(c)}})}),a.jsx("div",{className:"w-full md:w-[35em] rounded mt-5 border dark:border-stone-400 dark:text-stone-200",children:a.jsx("div",{className:"",children:n.map(c=>a.jsx(qB,{item:c,onDelete:()=>{i(c.id??"")},onSave:u=>{l(u)}},c.id))})})]})})},qB=({item:e,onDelete:t,onSave:n})=>{const{config:{accesses:r}}=Jt(),{t:s}=Ve(),o=r.find(c=>c.id===e.access),i=()=>{if(!o)return"";const c=Os.get(o.configType);return c?c[1]:""},l=()=>{if(!o)return"";const c=Of.get(e.type);return c?s(c[0]):""};return a.jsxs("div",{className:"flex justify-between text-sm p-3 items-center text-stone-700 dark:text-stone-200",children:[a.jsxs("div",{className:"flex space-x-2 items-center",children:[a.jsx("div",{children:a.jsx("img",{src:i(),className:"w-9"})}),a.jsxs("div",{className:"text-stone-600 flex-col flex space-y-0 dark:text-stone-200",children:[a.jsx("div",{children:l()}),a.jsx("div",{children:o==null?void 0:o.name})]})]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(ny,{trigger:a.jsx(av,{size:16,className:"cursor-pointer"}),deployConfig:e,onSave:c=>{n(c)}}),a.jsx(lv,{size:16,className:"cursor-pointer",onClick:()=>{t()}})]})]})},ny=({trigger:e,deployConfig:t,onSave:n})=>{const{config:{accesses:r}}=Jt(),[s,o]=y.useState(),[i,l]=y.useState({access:"",type:""}),[c,u]=y.useState({}),[d,f]=y.useState(!1);y.useEffect(()=>{l(t?{...t}:{access:"",type:""})},[t]),y.useEffect(()=>{const v=i.type.split("-");let g;v&&v.length>1?g=v[0]==="k8s"?v[0]:v[1]:g=i.type,o(g),u({})},[i.type]);const h=y.useCallback(v=>{v.type!==i.type?l({...v,access:"",config:{}}):l({...v})},[i.type]),{t:p}=Ve(),x=r.filter(v=>{if(v.usage=="apply")return!1;if(i.type=="")return!0;const g=i.type.split("-");return v.configType===g[0]}),m=()=>{const v={...c};i.type===""?v.type=p("domain.deployment.form.access.placeholder"):v.type="",i.access===""?v.access=p("domain.deployment.form.access.placeholder"):v.access="",u(v);for(const g in v)if(v[g]!=="")return;n(i),l({access:"",type:""}),u({}),f(!1)};return a.jsx(m2.Provider,{value:{deploy:i,setDeploy:h,error:c,setError:u},children:a.jsxs(hl,{open:d,onOpenChange:f,children:[a.jsx(ml,{children:e}),a.jsxs(Ai,{className:"dark:text-stone-200",children:[a.jsxs(Di,{children:[a.jsx(Oi,{children:p("history.page.title")}),a.jsx(YT,{})]}),a.jsxs("div",{children:[a.jsx(_t,{children:p("domain.deployment.form.type.label")}),a.jsxs(li,{value:i.type,onValueChange:v=>{h({...i,type:v})},children:[a.jsx(Co,{className:"mt-2",children:a.jsx(ci,{placeholder:p("domain.deployment.form.type.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:p("domain.deployment.form.type.list")}),ZB.map(v=>{var g,w;return a.jsx(An,{value:v,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(g=Of.get(v))==null?void 0:g[1]}),a.jsx("div",{children:p(((w=Of.get(v))==null?void 0:w[0])??"")})]})},v)})]})})]}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.type})]}),a.jsxs("div",{children:[a.jsxs(_t,{className:"flex justify-between",children:[a.jsx("div",{children:p("domain.deployment.form.access.label")}),a.jsx(va,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(yi,{size:14}),p("common.add")]}),op:"add"})]}),a.jsxs(li,{value:i.access,onValueChange:v=>{h({...i,access:v})},children:[a.jsx(Co,{className:"mt-2",children:a.jsx(ci,{placeholder:p("domain.deployment.form.access.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:p("domain.deployment.form.access.list")}),x.map(v=>{var g;return a.jsx(An,{value:v.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(g=Os.get(v.configType))==null?void 0:g[1]}),a.jsx("div",{children:v.name})]})},v.id)})]})})]}),a.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.access})]}),a.jsx(XB,{type:s}),a.jsx(Jh,{children:a.jsx(Te,{onClick:v=>{v.stopPropagation(),m()},children:p("common.save")})})]})]})})},XB=({type:e})=>(()=>{switch(e){case"cdn":return a.jsx(gp,{});case"dcdn":return a.jsx(gp,{});case"oss":return a.jsx(JB,{});case"ssh":return a.jsx(t_,{});case"local":return a.jsx(t_,{});case"webhook":return a.jsx(QB,{});case"k8s":return a.jsx(eW,{});default:return a.jsx(gp,{})}})(),t_=()=>{var s,o,i,l;const{t:e}=Ve(),{setError:t}=Mo();y.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Mo();return y.useEffect(()=>{n.id||r({...n,config:{certPath:"/etc/nginx/ssl/nginx.crt",keyPath:"/etc/nginx/ssl/nginx.key",preCommand:"",command:"sudo service nginx reload"}})},[]),a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_cert_path.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.ssh_cert_path.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.certPath,onChange:c=>{const u=In(n,d=>{d.config||(d.config={}),d.config.certPath=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_key_path.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.ssh_key_path.placeholder"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.keyPath,onChange:c=>{const u=In(n,d=>{d.config||(d.config={}),d.config.keyPath=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_pre_command.label")}),a.jsx(Df,{className:"mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.preCommand,placeholder:e("domain.deployment.form.ssh_pre_command.placeholder"),onChange:c=>{const u=In(n,d=>{d.config||(d.config={}),d.config.preCommand=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.ssh_command.label")}),a.jsx(Df,{className:"mt-1",value:(l=n==null?void 0:n.config)==null?void 0:l.command,placeholder:e("domain.deployment.form.ssh_command.placeholder"),onChange:c=>{const u=In(n,d=>{d.config||(d.config={}),d.config.command=c.target.value});r(u)}})]})]})})},QB=()=>{var r;const{deploy:e,setDeploy:t}=Mo(),{setError:n}=Mo();return y.useEffect(()=>{n({})},[]),a.jsx(a.Fragment,{children:a.jsx(YB,{variables:(r=e==null?void 0:e.config)==null?void 0:r.variables,onValueChange:s=>{const o=In(e,i=>{i.config||(i.config={}),i.config.variables=s});t(o)}})})},JB=()=>{var l,c,u;const{deploy:e,setDeploy:t,error:n,setError:r}=Mo(),{t:s}=Ve();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var f;const d=o.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,domain:""}):r({...n,domain:JSON.parse(d.error.message)[0].message})},[e]),y.useEffect(()=>{var f;const d=i.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(d.error.message)[0].message})},[]),y.useEffect(()=>{e.id||t({...e,config:{endpoint:"oss-cn-hangzhou.aliyuncs.com",bucket:"",domain:""}})},[]);const o=se.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")}),i=se.string().min(1,{message:s("domain.deployment.form.oss_bucket.placeholder")});return a.jsx("div",{className:"flex flex-col space-y-2",children:a.jsxs("div",{children:[a.jsx(_t,{children:s("domain.deployment.form.oss_endpoint.label")}),a.jsx(ae,{placeholder:s("domain.deployment.form.oss_endpoint.placeholder"),className:"w-full mt-1",value:(l=e==null?void 0:e.config)==null?void 0:l.endpoint,onChange:d=>{const f=d.target.value,h=In(e,p=>{p.config||(p.config={}),p.config.endpoint=f});t(h)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.endpoint}),a.jsx(_t,{children:s("domain.deployment.form.oss_bucket.label")}),a.jsx(ae,{placeholder:s("domain.deployment.form.oss_bucket.placeholder"),className:"w-full mt-1",value:(c=e==null?void 0:e.config)==null?void 0:c.bucket,onChange:d=>{const f=d.target.value,h=i.safeParse(f);h.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(h.error.message)[0].message});const p=In(e,x=>{x.config||(x.config={}),x.config.bucket=f});t(p)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.bucket}),a.jsx(_t,{children:s("domain.deployment.form.domain.label")}),a.jsx(ae,{placeholder:s("domain.deployment.form.domain.label"),className:"w-full mt-1",value:(u=e==null?void 0:e.config)==null?void 0:u.domain,onChange:d=>{const f=d.target.value,h=o.safeParse(f);h.success?r({...n,domain:""}):r({...n,domain:JSON.parse(h.error.message)[0].message});const p=In(e,x=>{x.config||(x.config={}),x.config.domain=f});t(p)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},gp=()=>{var i;const{deploy:e,setDeploy:t,error:n,setError:r}=Mo(),{t:s}=Ve();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var c;const l=o.safeParse((c=e.config)==null?void 0:c.domain);l.success?r({...n,domain:""}):r({...n,domain:JSON.parse(l.error.message)[0].message})},[e]);const o=se.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")});return a.jsx("div",{className:"flex flex-col space-y-2",children:a.jsxs("div",{children:[a.jsx(_t,{children:s("domain.deployment.form.domain.label")}),a.jsx(ae,{placeholder:s("domain.deployment.form.domain.placeholder"),className:"w-full mt-1",value:(i=e==null?void 0:e.config)==null?void 0:i.domain,onChange:l=>{const c=l.target.value,u=o.safeParse(c);u.success?r({...n,domain:""}):r({...n,domain:JSON.parse(u.error.message)[0].message});const d=In(e,f=>{f.config||(f.config={}),f.config.domain=c});t(d)}}),a.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},eW=()=>{var s,o,i,l;const{t:e}=Ve(),{setError:t}=Mo();y.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Mo();return y.useEffect(()=>{n.id||r({...n,config:{namespace:"default",secretName:"",secretDataKeyForCrt:"tls.crt",secretDataKeyForKey:"tls.key"}})},[]),a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col space-y-2",children:[a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_namespace.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.k8s_namespace.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.namespace,onChange:c=>{const u=In(n,d=>{d.config??(d.config={}),d.config.namespace=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_name.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.k8s_secret_name.label"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.secretName,onChange:c=>{const u=In(n,d=>{d.config??(d.config={}),d.config.secretName=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_data_key_for_crt.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.k8s_secret_data_key_for_crt.label"),className:"w-full mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.secretDataKeyForCrt,onChange:c=>{const u=In(n,d=>{d.config??(d.config={}),d.config.secretDataKeyForCrt=c.target.value});r(u)}})]}),a.jsxs("div",{children:[a.jsx(_t,{children:e("domain.deployment.form.k8s_secret_data_key_for_key.label")}),a.jsx(ae,{placeholder:e("domain.deployment.form.k8s_secret_data_key_for_key.label"),className:"w-full mt-1",value:(l=n==null?void 0:n.config)==null?void 0:l.secretDataKeyForKey,onChange:c=>{const u=In(n,d=>{d.config??(d.config={}),d.config.secretDataKeyForKey=c.target.value});r(u)}})]})]})})},tW=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=Jt(),[s,o]=y.useState(!1),{t:i}=Ve(),l=se.object({email:se.string().email("common.errmsg.email_invalid")}),c=en({resolver:tn(l),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"common.errmsg.email_duplicate"});return}const f=[...n.content.emails,d.email];try{const h=await Ur({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,m])=>{c.setError(x,{type:"manual",message:m.message})})}};return a.jsxs(hl,{onOpenChange:o,open:s,children:[a.jsx(ml,{asChild:!0,className:re(e),children:t}),a.jsxs(Ai,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[a.jsx(Di,{children:a.jsx(Oi,{children:i("domain.application.form.email.add")})}),a.jsx("div",{className:"container py-3",children:a.jsx(nn,{...c,children:a.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[a.jsx(ge,{control:c.control,name:"email",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:i("domain.application.form.email.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:i("common.errmsg.email_empty"),...d,type:"email"})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:i("common.save")})})]})})})]})]})},p2={domain:"common.text.domain",ip:"common.text.ip",dns:"common.text.dns"},n_=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,o]=y.useState([]),{t:i}=Ve();y.useMemo(()=>{e&&o(e.split(";"))},[e]),y.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const l=d=>{s.includes(d)||o([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,o(h)},u=d=>{const f=[...s];f.splice(d,1),o(f)};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:re(t),children:[a.jsxs(ye,{className:"flex justify-between items-center",children:[a.jsx("div",{children:i(p2[r])}),a.jsx(Kt,{when:s.length>0,children:a.jsx(yp,{op:"add",onValueChange:d=>{l(d)},valueType:r,value:"",trigger:a.jsxs("div",{className:"flex items-center text-primary",children:[a.jsx(yi,{size:16,className:"cursor-pointer "}),a.jsx("div",{className:"text-sm ",children:i("common.add")})]})})})]}),a.jsx(we,{children:a.jsx(Kt,{when:s.length>0,fallback:a.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:i("common.text."+r+".empty")}),a.jsx(yp,{value:"",trigger:i("common.add"),onValueChange:l,valueType:r})]}),children:a.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{children:d}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(yp,{op:"edit",valueType:r,trigger:a.jsx(av,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),a.jsx(lv,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},yp=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[o,i]=y.useState(""),[l,c]=y.useState(!1),[u,d]=y.useState(""),{t:f}=Ve();y.useEffect(()=>{i(t)},[t]);const h=se.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("common.errmsg.domain_invalid")}),p=se.string().ip({message:f("common.errmsg.ip_invalid")}),x={domain:h,dns:p,host:p},m=y.useCallback(()=>{const g=x[s].safeParse(o);if(!g.success){d(JSON.parse(g.error.message)[0].message);return}i(""),c(!1),d(""),n(o)},[o]);return a.jsxs(hl,{open:l,onOpenChange:v=>{c(v)},children:[a.jsx(ml,{className:"text-primary",children:e}),a.jsxs(Ai,{className:"dark:text-white",children:[a.jsx(Di,{children:a.jsx(Oi,{className:"dark:text-white",children:f(p2[s])})}),a.jsx(ae,{value:o,className:"dark:text-white",onChange:v=>{i(v.target.value)}}),a.jsx(Kt,{when:u.length>0,children:a.jsx("div",{className:"text-red-500 text-sm",children:u})}),a.jsx(Jh,{children:a.jsx(Te,{onClick:()=>{m()},children:f(r==="add"?"common.add":"common.confirm")})})]})]})},nW=()=>{const{config:{accesses:e,emails:t}}=Jt(),[n,r]=y.useState({}),s=Br(),{t:o}=Ve(),[i,l]=y.useState("apply");y.useEffect(()=>{const x=new URLSearchParams(s.search).get("id");x&&(async()=>{const v=await Q$(x);r(v)})()},[s.search]);const c=se.object({id:se.string().optional(),domain:se.string().min(1,{message:"common.errmsg.domain_invalid"}),email:se.string().email("common.errmsg.email_invalid").optional(),access:se.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.application.form.access.placeholder"}),keyAlgorithm:se.string().optional(),nameservers:se.string().optional(),timeout:se.number().optional()}),u=en({resolver:tn(c),defaultValues:{id:"",domain:"",email:"",access:"",keyAlgorithm:"RSA2048",nameservers:"",timeout:60}});y.useEffect(()=>{var p,x,m,v,g;n&&u.reset({id:n.id,domain:n.domain,email:(p=n.applyConfig)==null?void 0:p.email,access:(x=n.applyConfig)==null?void 0:x.access,keyAlgorithm:(m=n.applyConfig)==null?void 0:m.keyAlgorithm,nameservers:(v=n.applyConfig)==null?void 0:v.nameservers,timeout:(g=n.applyConfig)==null?void 0:g.timeout})},[n,u]);const{toast:d}=xr(),f=async p=>{const x={id:p.id,crontab:"0 0 * * *",domain:p.domain,email:p.email,access:p.access,applyConfig:{email:p.email??"",access:p.access,keyAlgorithm:p.keyAlgorithm,nameservers:p.nameservers,timeout:p.timeout}};try{const m=await mf(x);let v=o("domain.application.form.domain.changed.message");x.id==""&&(v=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:v}),n!=null&&n.id||l("deploy"),r({...m})}catch(m){Object.entries(m.response.data).forEach(([g,w])=>{u.setError(g,{type:"manual",message:w.message})});return}},h=async p=>{const x={...n,deployConfig:p};try{const m=await mf(x);let v=o("domain.application.form.domain.changed.message");x.id==""&&(v=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:v}),n!=null&&n.id||l("deploy"),r({...m})}catch(m){Object.entries(m.response.data).forEach(([g,w])=>{u.setError(g,{type:"manual",message:w.message})});return}};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"",children:[a.jsx(Dx,{}),a.jsx("div",{className:" h-5 text-muted-foreground",children:a.jsx(ZN,{children:a.jsxs(GN,{children:[a.jsx(Bg,{children:a.jsx(qN,{href:"#/domains",children:o("domain.page.title")})}),a.jsx(QN,{}),a.jsx(Bg,{children:a.jsx(XN,{children:n!=null&&n.id?o("domain.edit"):o("domain.add")})})]})})}),a.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex md:mt-5",children:[a.jsx("div",{className:re("cursor-pointer text-right",i==="apply"?"text-primary":""),onClick:()=>{l("apply")},children:o("domain.application.tab")}),a.jsx("div",{className:re("cursor-pointer text-right",i==="deploy"?"text-primary":""),onClick:()=>{if(!(n!=null&&n.id)){d({title:o("domain.application.unsaved.message"),description:o("domain.application.unsaved.message"),variant:"destructive"});return}l("deploy")},children:o("domain.deployment.tab")})]}),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:re("w-full md:w-[35em] p-5 rounded mt-3 md:mt-0",i=="deploy"&&"hidden"),children:a.jsx(nn,{...u,children:a.jsxs("form",{onSubmit:u.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[a.jsx(ge,{control:u.control,name:"domain",render:({field:p})=>a.jsxs(me,{children:[a.jsx(a.Fragment,{children:a.jsx(n_,{value:p.value,valueType:"domain",onValueChange:x=>{u.setValue("domain",x)}})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:u.control,name:"email",render:({field:p})=>a.jsxs(me,{children:[a.jsxs(ye,{className:"flex w-full justify-between",children:[a.jsx("div",{children:o("domain.application.form.email.label")+" "+o("domain.application.form.email.tips")}),a.jsx(tW,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(yi,{size:14}),o("common.add")]})})]}),a.jsx(we,{children:a.jsxs(li,{...p,value:p.value,onValueChange:x=>{u.setValue("email",x)},children:[a.jsx(Co,{children:a.jsx(ci,{placeholder:o("domain.application.form.email.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:o("domain.application.form.email.list")}),t.content.emails.map(x=>a.jsx(An,{value:x,children:a.jsx("div",{children:x})},x))]})})]})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:u.control,name:"access",render:({field:p})=>a.jsxs(me,{children:[a.jsxs(ye,{className:"flex w-full justify-between",children:[a.jsx("div",{children:o("domain.application.form.access.label")}),a.jsx(va,{trigger:a.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[a.jsx(yi,{size:14}),o("common.add")]}),op:"add"})]}),a.jsx(we,{children:a.jsxs(li,{...p,value:p.value,onValueChange:x=>{u.setValue("access",x)},children:[a.jsx(Co,{children:a.jsx(ci,{placeholder:o("domain.application.form.access.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(Ya,{children:o("domain.application.form.access.list")}),e.filter(x=>x.usage!="deploy").map(x=>{var m;return a.jsx(An,{value:x.id,children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{className:"w-6",src:(m=Os.get(x.configType))==null?void 0:m[1]}),a.jsx("div",{children:x.name})]})},x.id)})]})})]})}),a.jsx(fe,{})]})}),a.jsxs("div",{children:[a.jsx("hr",{}),a.jsxs(PV,{children:[a.jsx(RV,{className:"w-full my-4",children:a.jsxs("div",{className:"flex items-center justify-between space-x-4",children:[a.jsx("span",{className:"flex-1 text-sm text-gray-600 text-left",children:o("domain.application.form.advanced_settings.label")}),a.jsx(sI,{className:"h-4 w-4"})]})}),a.jsx(rT,{children:a.jsxs("div",{className:"flex flex-col space-y-8",children:[a.jsx(ge,{control:u.control,name:"keyAlgorithm",render:({field:p})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("domain.application.form.key_algorithm.label")}),a.jsxs(li,{...p,value:p.value,onValueChange:x=>{u.setValue("keyAlgorithm",x)},children:[a.jsx(Co,{children:a.jsx(ci,{placeholder:o("domain.application.form.key_algorithm.placeholder")})}),a.jsx(jo,{children:a.jsxs(Da,{children:[a.jsx(An,{value:"RSA2048",children:"RSA2048"}),a.jsx(An,{value:"RSA3072",children:"RSA3072"}),a.jsx(An,{value:"RSA4096",children:"RSA4096"}),a.jsx(An,{value:"RSA8192",children:"RSA8192"}),a.jsx(An,{value:"EC256",children:"EC256"}),a.jsx(An,{value:"EC384",children:"EC384"})]})})]})]})}),a.jsx(ge,{control:u.control,name:"nameservers",render:({field:p})=>a.jsxs(me,{children:[a.jsx(n_,{value:p.value??"",onValueChange:x=>{u.setValue("nameservers",x)},valueType:"dns"}),a.jsx(fe,{})]})}),a.jsx(ge,{control:u.control,name:"timeout",render:({field:p})=>a.jsxs(me,{children:[a.jsx(ye,{children:o("domain.application.form.timeout.label")}),a.jsx(we,{children:a.jsx(ae,{type:"number",placeholder:o("domain.application.form.timeout.placeholder"),...p,value:p.value,onChange:x=>{u.setValue("timeout",parseInt(x.target.value))}})}),a.jsx(fe,{})]})})]})})]})]}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:n!=null&&n.id?o("common.save"):o("common.next")})})]})})}),a.jsx("div",{className:re("flex flex-col space-y-5 w-full md:w-[35em]",i=="apply"&&"hidden"),children:a.jsx(GB,{deploys:(n==null?void 0:n.deployConfig)??[],onChange:p=>{h(p)}})})]})]})]})})};var e0="Tabs",[rW,l9]=fn(e0,[al]),g2=al(),[sW,t0]=rW(e0),y2=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=Ei(l),[f,h]=Qn({prop:r,onChange:s,defaultProp:o});return a.jsx(sW,{scope:n,baseId:Yn(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:a.jsx(Re.div,{dir:d,"data-orientation":i,...u,ref:t})})});y2.displayName=e0;var v2="TabsList",x2=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=t0(v2,n),i=g2(n);return a.jsx(Ev,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(Re.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});x2.displayName=v2;var w2="TabsTrigger",b2=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=t0(w2,n),l=g2(n),c=k2(i.baseId,r),u=C2(i.baseId,r),d=r===i.value;return a.jsx(Nv,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:de(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:de(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:de(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});b2.displayName=w2;var _2="TabsContent",S2=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,l=t0(_2,n),c=k2(l.baseId,r),u=C2(l.baseId,r),d=r===l.value,f=y.useRef(d);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),a.jsx(hn,{present:s||d,children:({present:h})=>a.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});S2.displayName=_2;function k2(e,t){return`${e}-trigger-${t}`}function C2(e,t){return`${e}-content-${t}`}var oW=y2,j2=x2,E2=b2,N2=S2;const T2=oW,n0=y.forwardRef(({className:e,...t},n)=>a.jsx(j2,{ref:n,className:re("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));n0.displayName=j2.displayName;const ni=y.forwardRef(({className:e,...t},n)=>a.jsx(E2,{ref:n,className:re("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}));ni.displayName=E2.displayName;const If=y.forwardRef(({className:e,...t},n)=>a.jsx(N2,{ref:n,className:re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));If.displayName=N2.displayName;const P2=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));P2.displayName="Card";const R2=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));R2.displayName="CardHeader";const A2=y.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:re("text-2xl font-semibold leading-none tracking-tight",e),...t}));A2.displayName="CardTitle";const D2=y.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));D2.displayName="CardDescription";const O2=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));O2.displayName="CardContent";const I2=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));I2.displayName="CardFooter";const on=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",iW=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Jt(),{toast:n}=xr(),r=rr(),{t:s}=Ve(),o=async l=>{try{await j8(l),t()}catch(c){n({title:s("common.delete.failed.message"),description:on(c),variant:"destructive"});return}},i=()=>{r("/access")};return a.jsxs("div",{className:"mt-10",children:[a.jsx(Kt,{when:e.length==0,children:a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(Yw,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domains.nodata")}),a.jsx(qx,{trigger:a.jsx(Te,{children:s("access.group.add")}),className:"mt-3"})]})})}),a.jsx(nm,{className:"h-[75vh] overflow-hidden",children:a.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(l=>a.jsxs(P2,{className:"w-full md:w-[350px]",children:[a.jsxs(R2,{children:[a.jsx(A2,{children:l.name}),a.jsx(D2,{children:s("access.group.total",{total:l.expand?l.expand.access.length:0})})]}),a.jsx(O2,{className:"min-h-[180px]",children:l.expand?a.jsx(a.Fragment,{children:l.expand.access.slice(0,3).map(c=>a.jsx("div",{className:"flex flex-col mb-3",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"",children:a.jsx("img",{src:Gb(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),a.jsxs("div",{className:"ml-3",children:[a.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),a.jsx("div",{className:"text-xs text-muted-foreground",children:Gb(c.configType)[0]})]})]})},c.id))}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[a.jsx("div",{children:a.jsx(Yw,{size:40})}),a.jsx("div",{className:"ml-2",children:s("access.group.nodata")})]})})}),a.jsx(I2,{children:a.jsxs("div",{className:"flex justify-end w-full",children:[a.jsx(Kt,{when:!!(l.expand&&l.expand.access.length>0),children:a.jsx("div",{children:a.jsx(Te,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${l.id}&tab=access`,{replace:!0})},children:s("access.group.domains")})})}),a.jsx(Kt,{when:!l.expand||l.expand.access.length==0,children:a.jsx("div",{children:a.jsx(Te,{size:"sm",onClick:i,children:s("access.authorization.add")})})}),a.jsx("div",{className:"ml-3",children:a.jsxs(jx,{children:[a.jsx(Ex,{asChild:!0,children:a.jsx(Te,{variant:"destructive",size:"sm",children:s("common.delete")})}),a.jsxs(Mh,{children:[a.jsxs(Lh,{children:[a.jsx(Fh,{className:"dark:text-gray-200",children:s("access.group.delete")}),a.jsx($h,{children:s("access.group.delete.confirm")})]}),a.jsxs(zh,{children:[a.jsx(Vh,{className:"dark:text-gray-200",children:s("common.cancel")}),a.jsx(Uh,{onClick:()=>{o(l.id?l.id:"")},children:s("common.confirm")})]})]})]})})]})})]}))})})]})},aW=()=>{const{t:e}=Ve(),{config:t,deleteAccess:n}=Jt(),{accesses:r}=t,s=10,o=Math.ceil(r.length/s),i=rr(),l=Br(),c=new URLSearchParams(l.search),u=c.get("page"),d=u?Number(u):1,f=c.get("tab"),h=c.get("accessGroupId"),p=(d-1)*s,x=p+s,m=async g=>{const w=await C8(g);n(w.id)},v=g=>{c.set("tab",g),i({search:c.toString()})};return a.jsxs("div",{className:"",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("div",{className:"text-muted-foreground",children:e("access.page.title")}),f!="access_group"?a.jsx(va,{trigger:a.jsx(Te,{children:e("access.authorization.add")}),op:"add"}):a.jsx(qx,{trigger:a.jsx(Te,{children:e("access.group.add")})})]}),a.jsxs(T2,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[a.jsxs(n0,{className:"space-x-5 px-3",children:[a.jsx(ni,{value:"access",onClick:()=>{v("access")},children:e("access.authorization.tab")}),a.jsx(ni,{value:"access_group",onClick:()=>{v("access_group")},children:e("access.group.tab")})]}),a.jsx(If,{value:"access",children:r.length===0?a.jsxs("div",{className:"flex flex-col items-center mt-10",children:[a.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:a.jsx(cI,{size:40,className:"text-primary"})}),a.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:e("access.authorization.nodata")}),a.jsx(va,{trigger:a.jsx(Te,{children:e("access.authorization.add")}),op:"add",className:"mt-3"})]}):a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:e("common.text.name")}),a.jsx("div",{className:"w-48",children:e("common.text.provider")}),a.jsx("div",{className:"w-60",children:e("common.text.created_at")}),a.jsx("div",{className:"w-60",children:e("common.text.updated_at")}),a.jsx("div",{className:"grow",children:e("common.text.operations")})]}),r.filter(g=>h?g.group==h:!0).slice(p,x).map(g=>{var w,b;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:g.name}),a.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[a.jsx("img",{src:(w=Os.get(g.configType))==null?void 0:w[1],className:"w-6"}),a.jsx("div",{children:e(((b=Os.get(g.configType))==null?void 0:b[0])||"")})]}),a.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.created&&Ba(g.created)}),a.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.updated&&Ba(g.updated)}),a.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[a.jsx(va,{trigger:a.jsx(Te,{variant:"link",className:"p-0",children:e("common.edit")}),op:"edit",data:g}),a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsx(va,{trigger:a.jsx(Te,{variant:"link",className:"p-0",children:e("common.copy")}),op:"copy",data:g}),a.jsx(Nr,{orientation:"vertical",className:"h-4 mx-2"}),a.jsxs(jx,{children:[a.jsx(Ex,{asChild:!0,children:a.jsx(Te,{variant:"link",className:"p-0",children:e("common.delete")})}),a.jsxs(Mh,{children:[a.jsxs(Lh,{children:[a.jsx(Fh,{className:"dark:text-gray-200",children:e("access.authorization.delete")}),a.jsx($h,{children:e("access.authorization.delete.confirm")})]}),a.jsxs(zh,{children:[a.jsx(Vh,{className:"dark:text-gray-200",children:e("common.cancel")}),a.jsx(Uh,{onClick:()=>{m(g)},children:e("common.confirm")})]})]})]})]})]},g.id)}),a.jsx(_E,{totalPages:o,currentPage:d,onPageChange:g=>{c.set("page",g.toString()),i({search:c.toString()})}})]})}),a.jsx(If,{value:"access_group",children:a.jsx(iW,{})})]})]})},M2=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await rt().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},lW=()=>{const e=rr(),[t,n]=y.useState(),[r]=EO(),{t:s}=Ve(),o=r.get("domain");return y.useEffect(()=>{(async()=>{const l={};o&&(l.domain=o);const c=await M2(l);n(c.items)})()},[o]),a.jsxs(nm,{className:"h-[80vh] overflow-hidden",children:[a.jsx("div",{className:"text-muted-foreground",children:s("history.page.title")}),t!=null&&t.length?a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:s("history.props.domain")}),a.jsx("div",{className:"w-24",children:s("history.props.status")}),a.jsx("div",{className:"w-56",children:s("history.props.stage")}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("history.props.last_execution_time")}),a.jsx("div",{className:"grow",children:s("common.text.operations")})]}),t==null?void 0:t.map(i=>{var l,c;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(l=i.expand.domain)==null?void 0:l.domain.split(";").map(u=>a.jsxs(a.Fragment,{children:[u,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(Cx,{deployment:i})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(kx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ba(i.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(Yv,{children:[a.jsx(Zv,{asChild:!0,children:a.jsx(Te,{variant:"link",className:"p-0",children:s("history.log")})}),a.jsxs(wh,{className:"sm:max-w-5xl",children:[a.jsx(Gv,{children:a.jsxs(qv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("history.log")]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&a.jsx(a.Fragment,{children:i.log.check.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&a.jsx(a.Fragment,{children:i.log.apply.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>a.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&a.jsx(a.Fragment,{children:i.log.deploy.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):a.jsx(a.Fragment,{children:a.jsxs(am,{className:"max-w-[40em] mx-auto mt-20",children:[a.jsx(Jx,{children:s("common.text.nodata")}),a.jsxs(lm,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(lk,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ",s("history.nodata")]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(Te,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},cW=se.object({username:se.string().email({message:"login.username.errmsg.invalid"}),password:se.string().min(10,{message:"login.password.errmsg.invalid"})}),uW=()=>{const{t:e}=Ve(),t=en({resolver:tn(cW),defaultValues:{username:"",password:""}}),n=async s=>{try{await rt().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=on(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=rr();return a.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[a.jsx("div",{className:"flex justify-center mb-10",children:a.jsx("img",{src:"/vite.svg",className:"w-16"})}),a.jsx(nn,{...t,children:a.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[a.jsx(ge,{control:t.control,name:"username",render:({field:s})=>a.jsxs(me,{children:[a.jsx(ye,{children:e("login.username.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:e("login.username.placeholder"),...s})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:t.control,name:"password",render:({field:s})=>a.jsxs(me,{children:[a.jsx(ye,{children:e("login.password.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:e("login.password.placeholder"),...s,type:"password"})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:e("login.submit")})})]})})]})},dW=()=>rt().authStore.isValid&&rt().authStore.isAdmin?a.jsx(qS,{to:"/"}):a.jsxs("div",{className:"container",children:[a.jsx(sv,{}),a.jsx(lE,{})]}),fW=se.object({oldPassword:se.string().min(10,{message:"settings.password.password.errmsg.length"}),newPassword:se.string().min(10,{message:"settings.password.password.errmsg.length"}),confirmPassword:se.string().min(10,{message:"settings.password.password.errmsg.length"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"settings.password.password.errmsg.not_matched",path:["confirmPassword"]}),hW=()=>{const{toast:e}=xr(),t=rr(),{t:n}=Ve(),r=en({resolver:tn(fW),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,l;try{await rt().admins.authWithPassword((i=rt().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=on(c);r.setError("oldPassword",{message:u})}try{await rt().admins.update((l=rt().authStore.model)==null?void 0:l.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),rt().authStore.clear(),e({title:n("settings.password.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=on(c);e({title:n("settings.password.failed.message"),description:u,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(nn,{...r,children:a.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[a.jsx(ge,{control:r.control,name:"oldPassword",render:({field:o})=>a.jsxs(me,{children:[a.jsx(ye,{children:n("settings.password.current_password.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:n("settings.password.current_password.placeholder"),...o,type:"password"})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:r.control,name:"newPassword",render:({field:o})=>a.jsxs(me,{children:[a.jsx(ye,{children:n("settings.password.new_password.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:n("settings.password.new_password.placeholder"),...o,type:"password"})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:r.control,name:"confirmPassword",render:({field:o})=>a.jsxs(me,{children:[a.jsx(ye,{children:n("settings.password.confirm_password.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:n("settings.password.confirm_password.placeholder"),...o,type:"password"})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:n("common.update")})})]})})})})},mW=()=>{const e=Br(),[t,n]=y.useState("account"),r=rr(),{t:s}=Ve();return y.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),a.jsxs("div",{children:[a.jsx(Dx,{}),a.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("settings.page.title")}),a.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:a.jsxs(T2,{defaultValue:"account",className:"w-full",value:t,children:[a.jsxs(n0,{className:"mx-auto",children:[a.jsxs(ni,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[a.jsx(vI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.account.tab")})]}),a.jsxs(ni,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[a.jsx(lI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.password.tab")})]}),a.jsxs(ni,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[a.jsx(fI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.notification.tab")})]}),a.jsxs(ni,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[a.jsx(pI,{size:14}),a.jsx("div",{className:"ml-1",children:s("settings.ca.tab")})]})]}),a.jsx(If,{value:t,children:a.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:a.jsx(sv,{})})})]})})]})},pW=()=>{const[e,t]=y.useState(),[n,r]=y.useState(),s=rr(),{t:o}=Ve();return y.useEffect(()=>{(async()=>{const l=await X$();t(l)})()},[]),y.useEffect(()=>{(async()=>{const c=await M2({perPage:8});r(c.items)})()},[]),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsx("div",{className:"text-muted-foreground",children:o("dashboard.page.title")})}),a.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(gI,{size:48,strokeWidth:1,className:"text-blue-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.all")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?a.jsx(_n,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[a.jsx("div",{className:"p-3",children:a.jsx(nI,{size:48,strokeWidth:1,className:"text-red-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.near_expired")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?a.jsx(_n,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(dI,{size:48,strokeWidth:1,className:"text-green-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.enabled")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?a.jsx(_n,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),a.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[a.jsx("div",{className:"p-3",children:a.jsx(eI,{size:48,strokeWidth:1,className:"text-gray-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.disabled")}),a.jsxs("div",{className:"flex items-baseline",children:[a.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?a.jsx(_n,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),a.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]})]}),a.jsx("div",{className:"my-4",children:a.jsx("hr",{})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("dashboard.history")}),(n==null?void 0:n.length)==0?a.jsx(a.Fragment,{children:a.jsxs(am,{className:"max-w-[40em] mt-10",children:[a.jsx(Jx,{children:o("common.text.nodata")}),a.jsxs(lm,{children:[a.jsxs("div",{className:"flex items-center mt-5",children:[a.jsx("div",{children:a.jsx(lk,{className:"text-yellow-400",size:36})}),a.jsxs("div",{className:"ml-2",children:[" ",o("history.nodata")]})]}),a.jsx("div",{className:"mt-2 flex justify-end",children:a.jsx(Te,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):a.jsxs(a.Fragment,{children:[a.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:[a.jsx("div",{className:"w-48",children:o("history.props.domain")}),a.jsx("div",{className:"w-24",children:o("history.props.status")}),a.jsx("div",{className:"w-56",children:o("history.props.stage")}),a.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("history.props.last_execution_time")}),a.jsx("div",{className:"grow",children:o("common.text.operations")})]}),n==null?void 0:n.map(i=>{var l,c;return a.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:[a.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(l=i.expand.domain)==null?void 0:l.domain.split(";").map(u=>a.jsxs(a.Fragment,{children:[u,a.jsx("br",{})]}))}),a.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(Cx,{deployment:i})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:a.jsx(kx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),a.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ba(i.deployedAt)}),a.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:a.jsxs(Yv,{children:[a.jsx(Zv,{asChild:!0,children:a.jsx(Te,{variant:"link",className:"p-0",children:o("history.log")})}),a.jsxs(wh,{className:"sm:max-w-5xl",children:[a.jsx(Gv,{children:a.jsxs(qv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("history.log")]})}),a.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&a.jsx(a.Fragment,{children:i.log.check.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&a.jsx(a.Fragment,{children:i.log.apply.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>a.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&a.jsx(a.Fragment,{children:i.log.deploy.map(u=>a.jsxs("div",{className:"flex flex-col mt-2",children:[a.jsxs("div",{className:"flex",children:[a.jsxs("div",{children:["[",u.time,"]"]}),a.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&a.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},gW=se.object({email:se.string().email("settings.account.email.errmsg.invalid")}),yW=()=>{var l;const{toast:e}=xr(),t=rr(),{t:n}=Ve(),[r,s]=y.useState(!1),o=en({resolver:tn(gW),defaultValues:{email:(l=rt().authStore.model)==null?void 0:l.email}}),i=async c=>{var u;try{await rt().admins.update((u=rt().authStore.model)==null?void 0:u.id,{email:c.email}),rt().authStore.clear(),e({title:n("settings.account.email.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=on(d);e({title:n("settings.account.email.failed.message"),description:f,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(nn,{...o,children:a.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[a.jsx(ge,{control:o.control,name:"email",render:({field:c})=>a.jsxs(me,{children:[a.jsx(ye,{children:n("settings.account.email.label")}),a.jsx(we,{children:a.jsx(ae,{placeholder:n("settings.account.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:r?a.jsx(Te,{type:"submit",children:n("common.update")}):a.jsx(Te,{type:"submit",disabled:!0,variant:"secondary",children:n("common.update")})})]})})})})};var Xs="Accordion",vW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[r0,xW,wW]=tu(Xs),[cm,c9]=fn(Xs,[wW,JN]),s0=JN(),L2=He.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return a.jsx(r0.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?a.jsx(kW,{...o,ref:t}):a.jsx(SW,{...s,ref:t})})});L2.displayName=Xs;var[z2,bW]=cm(Xs),[F2,_W]=cm(Xs,{collapsible:!1}),SW=He.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[l,c]=Qn({prop:n,defaultProp:r,onChange:s});return a.jsx(z2,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:He.useCallback(()=>o&&c(""),[o,c]),children:a.jsx(F2,{scope:e.__scopeAccordion,collapsible:o,children:a.jsx($2,{...i,ref:t})})})}),kW=He.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],l]=Qn({prop:n,defaultProp:r,onChange:s}),c=He.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=He.useCallback(d=>l((f=[])=>f.filter(h=>h!==d)),[l]);return a.jsx(z2,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:a.jsx(F2,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx($2,{...o,ref:t})})})}),[CW,um]=cm(Xs),$2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,l=He.useRef(null),c=Ze(l,t),u=xW(n),f=Ei(s)==="ltr",h=de(e.onKeyDown,p=>{var R;if(!vW.includes(p.key))return;const x=p.target,m=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),v=m.findIndex(A=>A.ref.current===x),g=m.length;if(v===-1)return;p.preventDefault();let w=v;const b=0,_=g-1,C=()=>{w=v+1,w>_&&(w=b)},j=()=>{w=v-1,w<b&&(w=_)};switch(p.key){case"Home":w=b;break;case"End":w=_;break;case"ArrowRight":o==="horizontal"&&(f?C():j());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(f?j():C());break;case"ArrowUp":o==="vertical"&&j();break}const T=w%g;(R=m[T].ref.current)==null||R.focus()});return a.jsx(CW,{scope:n,disabled:r,direction:s,orientation:o,children:a.jsx(r0.Slot,{scope:n,children:a.jsx(Re.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),Mf="AccordionItem",[jW,o0]=cm(Mf),U2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=um(Mf,n),i=bW(Mf,n),l=s0(n),c=Yn(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return a.jsx(jW,{scope:n,open:u,disabled:d,triggerId:c,children:a.jsx(nT,{"data-orientation":o.orientation,"data-state":Y2(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});U2.displayName=Mf;var V2="AccordionHeader",B2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(Xs,n),o=o0(V2,n);return a.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":Y2(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});B2.displayName=V2;var ry="AccordionTrigger",W2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(Xs,n),o=o0(ry,n),i=_W(ry,n),l=s0(n);return a.jsx(r0.ItemSlot,{scope:n,children:a.jsx(NV,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...l,...r,ref:t})})});W2.displayName=ry;var H2="AccordionContent",K2=He.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=um(Xs,n),o=o0(H2,n),i=s0(n);return a.jsx(TV,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});K2.displayName=H2;function Y2(e){return e?"open":"closed"}var EW=L2,NW=U2,TW=B2,Z2=W2,G2=K2;const r_=EW,Xi=y.forwardRef(({className:e,...t},n)=>a.jsx(NW,{ref:n,className:re("border-b",e),...t}));Xi.displayName="AccordionItem";const Qi=y.forwardRef(({className:e,children:t,...n},r)=>a.jsx(TW,{className:"flex",children:a.jsxs(Z2,{ref:r,className:re("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,a.jsx(iv,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Qi.displayName=Z2.displayName;const Ji=y.forwardRef(({className:e,children:t,...n},r)=>a.jsx(G2,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:a.jsx("div",{className:re("pb-4 pt-0",e),children:t})}));Ji.displayName=G2.displayName;const PW=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},q2=y.createContext({}),dm=()=>y.useContext(q2),RW=({children:e})=>{const[t,n]=y.useReducer(PW,{});y.useEffect(()=>{(async()=>{const i=await wx("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=y.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=y.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return a.jsx(q2.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},fm=async e=>{const n=await rt().send("/api/notify/test",{method:"POST",headers:{"Content-Type":"application/json"},body:{channel:e}});if(n.code!=0)throw new Error(n.msg);return n},AW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ve(),[r,s]=y.useState(!1),[o,i]=y.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}}),[l,c]=y.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});y.useEffect(()=>{s(!1)},[e]),y.useEffect(()=>{const m=d();c({id:e.id??"",name:"dingtalk",data:m})},[e]),y.useEffect(()=>{const m=d();i({id:e.id??"",name:"dingtalk",data:m})},[e]);const{toast:u}=xr(),d=()=>{const m={accessToken:"",secret:"",enabled:!1};if(!e.content)return m;const v=e.content;return v.dingtalk?v.dingtalk:m},f=m=>{m.accessToken!==l.data.accessToken||m.secret!==l.data.secret?s(!0):s(!1)},h=async()=>{try{const m=await Ur({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...o.data}}});t(m),u({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(m){const v=on(m);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${v}`,variant:"destructive"})}},p=async()=>{try{await fm("dingtalk"),u({title:n("settings.notification.config.push.test.message.success.message"),description:n("settings.notification.config.push.test.message.success.message")})}catch(m){const v=on(m);u({title:n("settings.notification.config.push.test.message.failed.message"),description:`${n("settings.notification.config.push.test.message.failed.message")}: ${v}`,variant:"destructive"})}},x=async()=>{const m={...o,data:{...o.data,enabled:!o.data.enabled}};i(m);try{const v=await Ur({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...m.data}}});t(v)}catch(v){const g=on(v);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${g}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(ae,{placeholder:"AccessToken",value:o.data.accessToken,onChange:m=>{const v={...o,data:{...o.data,accessToken:m.target.value}};f(v.data),i(v)}}),a.jsx(ae,{placeholder:n("settings.notification.dingtalk.secret.placeholder"),className:"mt-2",value:o.data.secret,onChange:m=>{const v={...o,data:{...o.data,secret:m.target.value}};f(v.data),i(v)}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:o.data.enabled,onCheckedChange:x}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsxs("div",{className:"flex justify-end mt-2",children:[a.jsx(Kt,{when:r,children:a.jsx(Te,{onClick:()=>{h()},children:n("common.save")})}),a.jsx(Kt,{when:!r&&o.id!="",children:a.jsx(Te,{variant:"secondary",onClick:()=>{p()},children:n("settings.notification.config.push.test.message")})})]})]})},DW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ve(),[r,s]=y.useState(!1),[o,i]=y.useState({id:e.id??"",name:"notifyChannels",data:{webhookUrl:"",enabled:!1}}),[l,c]=y.useState({id:e.id??"",name:"notifyChannels",data:{webhookUrl:"",enabled:!1}});y.useEffect(()=>{s(!1)},[e]),y.useEffect(()=>{const m=f();c({id:e.id??"",name:"lark",data:m})},[e]),y.useEffect(()=>{const m=f();i({id:e.id??"",name:"lark",data:m})},[e]);const{toast:u}=xr(),d=m=>{m.webhookUrl!==l.data.webhookUrl?s(!0):s(!1)},f=()=>{const m={webhookUrl:"",enabled:!1};if(!e.content)return m;const v=e.content;return v.lark?v.lark:m},h=async()=>{try{const m=await Ur({...e,name:"notifyChannels",content:{...e.content,lark:{...o.data}}});t(m),u({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(m){const v=on(m);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${v}`,variant:"destructive"})}},p=async()=>{try{await fm("lark"),u({title:n("settings.notification.config.push.test.message.success.message"),description:n("settings.notification.config.push.test.message.success.message")})}catch(m){const v=on(m);u({title:n("settings.notification.config.push.test.message.failed.message"),description:`${n("settings.notification.config.push.test.message.failed.message")}: ${v}`,variant:"destructive"})}},x=async()=>{const m={...o,data:{...o.data,enabled:!o.data.enabled}};i(m);try{const v=await Ur({...e,name:"notifyChannels",content:{...e.content,lark:{...m.data}}});t(v)}catch(v){const g=on(v);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${g}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(ae,{placeholder:"Webhook Url",value:o.data.webhookUrl,onChange:m=>{const v={...o,data:{...o.data,webhookUrl:m.target.value}};d(v.data),i(v)}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:o.data.enabled,onCheckedChange:x}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsxs("div",{className:"flex justify-end mt-2",children:[a.jsx(Kt,{when:r,children:a.jsx(Te,{onClick:()=>{h()},children:n("common.save")})}),a.jsx(Kt,{when:!r&&o.id!="",children:a.jsx(Te,{variant:"secondary",onClick:()=>{p()},children:n("settings.notification.config.push.test.message")})})]})]})},OW={title:"您有 {COUNT} 张证书即将过期",content:"有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!"},IW=()=>{const[e,t]=y.useState(""),[n,r]=y.useState([OW]),{toast:s}=xr(),{t:o}=Ve();y.useEffect(()=>{(async()=>{const d=await wx("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},l=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await Ur({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("common.save.succeeded.message"),description:o("settings.notification.template.saved.message")})};return a.jsxs("div",{children:[a.jsx(ae,{value:n[0].title,onChange:u=>{i(u.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.title")}),a.jsx(Df,{className:"mt-2",value:n[0].content,onChange:u=>{l(u.target.value)}}),a.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.content")}),a.jsx("div",{className:"flex justify-end mt-2",children:a.jsx(Te,{onClick:c,children:o("common.save")})})]})},MW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ve(),[r,s]=y.useState(!1),[o,i]=y.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}}),[l,c]=y.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});y.useEffect(()=>{s(!1)},[e]),y.useEffect(()=>{const m=f();c({id:e.id??"",name:"common.provider.telegram",data:m})},[e]),y.useEffect(()=>{const m=f();i({id:e.id??"",name:"common.provider.telegram",data:m})},[e]);const{toast:u}=xr(),d=m=>{m.apiToken!==l.data.apiToken||m.chatId!==l.data.chatId?s(!0):s(!1)},f=()=>{const m={apiToken:"",chatId:"",enabled:!1};if(!e.content)return m;const v=e.content;return v.telegram?v.telegram:m},h=async()=>{try{const m=await Ur({...e,name:"notifyChannels",content:{...e.content,telegram:{...o.data}}});t(m),u({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(m){const v=on(m);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${v}`,variant:"destructive"})}},p=async()=>{try{await fm("telegram"),u({title:n("settings.notification.config.push.test.message.success.message"),description:n("settings.notification.config.push.test.message.success.message")})}catch(m){const v=on(m);u({title:n("settings.notification.config.push.test.message.failed.message"),description:`${n("settings.notification.config.push.test.message.failed.message")}: ${v}`,variant:"destructive"})}},x=async()=>{const m={...o,data:{...o.data,enabled:!o.data.enabled}};i(m);try{const v=await Ur({...e,name:"notifyChannels",content:{...e.content,telegram:{...m.data}}});t(v)}catch(v){const g=on(v);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${g}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(ae,{placeholder:"ApiToken",value:o.data.apiToken,onChange:m=>{const v={...o,data:{...o.data,apiToken:m.target.value}};d(v.data),i(v)}}),a.jsx(ae,{placeholder:"ChatId",value:o.data.chatId,onChange:m=>{const v={...o,data:{...o.data,chatId:m.target.value}};d(v.data),i(v)}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:o.data.enabled,onCheckedChange:x}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsxs("div",{className:"flex justify-end mt-2",children:[a.jsx(Kt,{when:r,children:a.jsx(Te,{onClick:()=>{h()},children:n("common.save")})}),a.jsx(Kt,{when:!r&&o.id!="",children:a.jsx(Te,{variant:"secondary",onClick:()=>{p()},children:n("settings.notification.config.push.test.message")})})]})]})};function LW(e){try{return new URL(e),!0}catch{return!1}}const zW=()=>{const{config:e,setChannels:t}=dm(),{t:n}=Ve(),[r,s]=y.useState(!1),[o,i]=y.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}}),[l,c]=y.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});y.useEffect(()=>{s(!1)},[e]),y.useEffect(()=>{const m=f();c({id:e.id??"",name:"webhook",data:m})},[e]),y.useEffect(()=>{const m=f();i({id:e.id??"",name:"webhook",data:m})},[e]);const{toast:u}=xr(),d=m=>{m.url!==l.data.url?s(!0):s(!1)},f=()=>{const m={url:"",enabled:!1};if(!e.content)return m;const v=e.content;return v.webhook?v.webhook:m},h=async()=>{try{if(o.data.url=o.data.url.trim(),!LW(o.data.url)){u({title:n("common.save.failed.message"),description:n("settings.notification.url.errmsg.invalid"),variant:"destructive"});return}const m=await Ur({...e,name:"notifyChannels",content:{...e.content,webhook:{...o.data}}});t(m),u({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(m){const v=on(m);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${v}`,variant:"destructive"})}},p=async()=>{try{await fm("webhook"),u({title:n("settings.notification.config.push.test.message.success.message"),description:n("settings.notification.config.push.test.message.success.message")})}catch(m){const v=on(m);u({title:n("settings.notification.config.push.test.message.failed.message"),description:`${n("settings.notification.config.push.test.message.failed.message")}: ${v}`,variant:"destructive"})}},x=async()=>{const m={...o,data:{...o.data,enabled:!o.data.enabled}};i(m);try{const v=await Ur({...e,name:"notifyChannels",content:{...e.content,webhook:{...m.data}}});t(v)}catch(v){const g=on(v);u({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${g}`,variant:"destructive"})}};return a.jsxs("div",{children:[a.jsx(ae,{placeholder:"Url",value:o.data.url,onChange:m=>{const v={...o,data:{...o.data,url:m.target.value}};d(v.data),i(v)}}),a.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[a.jsx(dl,{id:"airplane-mode",checked:o.data.enabled,onCheckedChange:x}),a.jsx(_t,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),a.jsxs("div",{className:"flex justify-end mt-2",children:[a.jsx(Kt,{when:r,children:a.jsx(Te,{onClick:()=>{h()},children:n("common.save")})}),a.jsx(Kt,{when:!r&&o.id!="",children:a.jsx(Te,{variant:"secondary",onClick:()=>{p()},children:n("settings.notification.config.push.test.message")})})]})]})},FW=()=>{const{t:e}=Ve();return a.jsx(a.Fragment,{children:a.jsxs(RW,{children:[a.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:a.jsx(r_,{type:"multiple",className:"dark:text-stone-200",children:a.jsxs(Xi,{value:"item-1",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("settings.notification.template.label")}),a.jsx(Ji,{children:a.jsx(IW,{})})]})})}),a.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:a.jsxs(r_,{type:"single",className:"dark:text-stone-200",children:[a.jsxs(Xi,{value:"item-2",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.dingtalk")}),a.jsx(Ji,{children:a.jsx(AW,{})})]}),a.jsxs(Xi,{value:"item-3",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.lark")}),a.jsx(Ji,{children:a.jsx(DW,{})})]}),a.jsxs(Xi,{value:"item-4",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.telegram")}),a.jsx(Ji,{children:a.jsx(MW,{})})]}),a.jsxs(Xi,{value:"item-5",className:"dark:border-stone-200",children:[a.jsx(Qi,{children:e("common.provider.webhook")}),a.jsx(Ji,{children:a.jsx(zW,{})})]})]})})]})})};var i0="Radio",[$W,X2]=fn(i0),[UW,VW]=$W(i0),Q2=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:l="on",onCheck:c,...u}=e,[d,f]=y.useState(null),h=Ze(t,m=>f(m)),p=y.useRef(!1),x=d?!!d.closest("form"):!0;return a.jsxs(UW,{scope:n,checked:s,disabled:i,children:[a.jsx(Re.button,{type:"button",role:"radio","aria-checked":s,"data-state":tP(s),"data-disabled":i?"":void 0,disabled:i,value:l,...u,ref:h,onClick:de(e.onClick,m=>{s||c==null||c(),x&&(p.current=m.isPropagationStopped(),p.current||m.stopPropagation())})}),x&&a.jsx(BW,{control:d,bubbles:!p.current,name:r,value:l,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});Q2.displayName=i0;var J2="RadioIndicator",eP=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=VW(J2,n);return a.jsx(hn,{present:r||o.checked,children:a.jsx(Re.span,{"data-state":tP(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});eP.displayName=J2;var BW=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=Nx(n),l=wv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),a.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function tP(e){return e?"checked":"unchecked"}var WW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],a0="RadioGroup",[HW,u9]=fn(a0,[al,X2]),nP=al(),rP=X2(),[KW,YW]=HW(a0),sP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,p=nP(n),x=Ei(u),[m,v]=Qn({prop:o,defaultProp:s,onChange:f});return a.jsx(KW,{scope:n,name:r,required:i,disabled:l,value:m,onValueChange:v,children:a.jsx(Ev,{asChild:!0,...p,orientation:c,dir:x,loop:d,children:a.jsx(Re.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:x,...h,ref:t})})})});sP.displayName=a0;var oP="RadioGroupItem",iP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=YW(oP,n),i=o.disabled||r,l=nP(n),c=rP(n),u=y.useRef(null),d=Ze(t,u),f=o.value===s.value,h=y.useRef(!1);return y.useEffect(()=>{const p=m=>{WW.includes(m.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",x)}},[]),a.jsx(Nv,{asChild:!0,...l,focusable:!i,active:f,children:a.jsx(Q2,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:de(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:de(s.onFocus,()=>{var p;h.current&&((p=u.current)==null||p.click())})})})});iP.displayName=oP;var ZW="RadioGroupIndicator",aP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=rP(n);return a.jsx(eP,{...s,...r,ref:t})});aP.displayName=ZW;var lP=sP,cP=iP,GW=aP;const uP=y.forwardRef(({className:e,...t},n)=>a.jsx(lP,{className:re("grid gap-2",e),...t,ref:n}));uP.displayName=lP.displayName;const sy=y.forwardRef(({className:e,...t},n)=>a.jsx(cP,{ref:n,className:re("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(GW,{className:"flex items-center justify-center",children:a.jsx(ak,{className:"h-2.5 w-2.5 fill-current text-current"})})}));sy.displayName=cP.displayName;const qW=()=>{const{t:e}=Ve(),t=se.object({provider:se.enum(["letsencrypt","zerossl"],{message:e("settings.ca.provider.errmsg.empty")}),eabKid:se.string().optional(),eabHmacKey:se.string().optional()}),n=en({resolver:tn(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=y.useState("letsencrypt"),[o,i]=y.useState(),{toast:l}=xr();y.useEffect(()=>{(async()=>{const f=await wx("ssl-provider");if(f){i(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:o==null?void 0:o.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await Ur(f),l({title:e("common.update.succeeded.message"),description:e("common.update.succeeded.message")})}catch(h){const p=on(h);l({title:e("common.update.failed.message"),description:p,variant:"destructive"})}};return a.jsx(a.Fragment,{children:a.jsx("div",{className:"w-full md:max-w-[35em]",children:a.jsx(nn,{...n,children:a.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[a.jsx(ge,{control:n.control,name:"provider",render:({field:d})=>a.jsxs(me,{children:[a.jsx(ye,{children:e("common.text.ca")}),a.jsx(we,{children:a.jsxs(uP,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(sy,{value:"letsencrypt",id:"letsencrypt"}),a.jsx(_t,{htmlFor:"letsencrypt",children:a.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[a.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),a.jsx("div",{children:"Let's Encrypt"})]})})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(sy,{value:"zerossl",id:"zerossl"}),a.jsx(_t,{htmlFor:"zerossl",children:a.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[a.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),a.jsx("div",{children:"ZeroSSL"})]})})]})]})}),a.jsx(ge,{control:n.control,name:"eabKid",render:({field:f})=>a.jsxs(me,{hidden:r!=="zerossl",children:[a.jsx(ye,{children:"EAB_KID"}),a.jsx(we,{children:a.jsx(ae,{placeholder:e("settings.ca.eab_kid.errmsg.empty"),...f,type:"text"})}),a.jsx(fe,{})]})}),a.jsx(ge,{control:n.control,name:"eabHmacKey",render:({field:f})=>a.jsxs(me,{hidden:r!=="zerossl",children:[a.jsx(ye,{children:"EAB_HMAC_KEY"}),a.jsx(we,{children:a.jsx(ae,{placeholder:e("settings.ca.eab_hmac_key.errmsg.empty"),...f,type:"text"})}),a.jsx(fe,{})]})}),a.jsx(fe,{})]})}),a.jsx("div",{className:"flex justify-end",children:a.jsx(Te,{type:"submit",children:e("common.update")})})]})})})})},XW=fO([{path:"/",element:a.jsx(I8,{}),children:[{path:"/",element:a.jsx(pW,{})},{path:"/domains",element:a.jsx(nU,{})},{path:"/edit",element:a.jsx(nW,{})},{path:"/access",element:a.jsx(aW,{})},{path:"/history",element:a.jsx(lW,{})},{path:"/setting",element:a.jsx(mW,{}),children:[{path:"/setting/password",element:a.jsx(hW,{})},{path:"/setting/account",element:a.jsx(yW,{})},{path:"/setting/notify",element:a.jsx(FW,{})},{path:"/setting/ssl-provider",element:a.jsx(qW,{})}]}]},{path:"/login",element:a.jsx(dW,{}),children:[{path:"/login",element:a.jsx(uW,{})}]},{path:"/about",element:a.jsx("div",{children:"About"})}]),QW={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Lf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||QW,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Lf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Lf(this.logger,t)}}var ns=new Lf;class hm{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[l,c]=i;for(let u=0;u<c;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,c]=i;for(let u=0;u<c;u++)l.apply(l,[t,...r])})}}const Al=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},s_=e=>e==null?"":""+e,JW=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},eH=/###/g,o_=e=>e&&e.indexOf("###")>-1?e.replace(eH,"."):e,i_=e=>!e||typeof e=="string",rc=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(i_(e))return{};const o=o_(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return i_(e)?{}:{obj:e,k:o_(r[s])}},a_=(e,t,n)=>{const{obj:r,k:s}=rc(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=rc(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=rc(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},tH=(e,t,n,r)=>{const{obj:s,k:o}=rc(e,t,Object);s[o]=s[o]||[],s[o].push(n)},zf=(e,t)=>{const{obj:n,k:r}=rc(e,t);if(n)return n[r]},nH=(e,t,n)=>{const r=zf(e,n);return r!==void 0?r:zf(t,n)},dP=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):dP(e[r],t[r],n):e[r]=t[r]);return e},Yi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const sH=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>rH[t]):e;class oH{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const iH=[" ",",","?","!",";"],aH=new oH(20),lH=(e,t,n)=>{t=t||"",n=n||"";const r=iH.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=aH.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},oy=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let c=o;c<r.length;++c)if(c!==o&&(l+=n),l+=r[c],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=i}return s},Ff=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class l_ extends hm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&o?l.push(...r.split(o)):l.push(r)));const c=zf(this.data,l);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),c||!i||typeof r!="string"?c:oy(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),a_(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let c=zf(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?dP(c,r,o):c={...c,...r},a_(this.data,l,c),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var fP={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const c_={};class $f extends hm{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),JW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ns.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!lH(t,r,s);if(i&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let h=f&&f.res;const p=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,m=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&v.indexOf(m)<0&&!(typeof g=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(o){const _=Array.isArray(h),C=_?[]:{},j=_?x:p;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const R=`${j}${o}${T}`;C[T]=this.translate(R,{...n,joinArrays:!1,ns:l}),C[T]===R&&(C[T]=h[T])}h=C}}else if(w&&typeof g=="string"&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=$f.hasDefaultValue(n),R=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Z=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=Z),this.isValidLookup(h)||(C=!0,h=i);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&Z!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,i,S?Z:h),o){const W=this.resolve(i,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W<J.length;W++)U.push(J[W]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const F=(W,I,X)=>{const $=T&&X!==h?X:z;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{F([W],i+X,n[`defaultValue${X}`]||Z)})}):F(U,i,Z))}h=this.extendTranslation(h,t,n,f,r),C&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${i}`:i,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;d<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,p=new Array(h),x=0;x<h;x++)p[x]=arguments[x];return o&&o[0]===p[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):i.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=fP.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",p=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{this.isValidLookup(r)||(l=v,!c_[`${m[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(c_[`${m[0]}-${v}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(g=>{if(this.isValidLookup(r))return;i=g;const w=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,g,v,n);else{let _;h&&(_=this.pluralResolver.getSuffix(g,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(w.push(d+_),n.ordinal&&_.indexOf(j)===0&&w.push(d+_.replace(j,this.options.pluralSeparator)),p&&w.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;w.push(T),h&&(w.push(T+_),n.ordinal&&_.indexOf(j)===0&&w.push(T+_.replace(j,this.options.pluralSeparator)),p&&w.push(T+C))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(g,v,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const vp=e=>e.charAt(0).toUpperCase()+e.slice(1);class u_{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ns.create("languageUtils")}getScriptPartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=vp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=vp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=vp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let cH=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],uH={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const dH=["v1","v2","v3"],fH=["v4"],d_={zero:0,one:1,two:2,few:3,many:4,other:5},hH=()=>{const e={};return cH.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:uH[t.fc]}})}),e};class mH{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ns.create("pluralResolver"),(!this.options.compatibilityJSON||fH.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=hH(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Ff(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>d_[s]-d_[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!dH.includes(this.options.compatibilityJSON)}}const f_=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=nH(e,t,n);return!o&&s&&typeof n=="string"&&(o=oy(e,n,r),o===void 0&&(o=oy(t,n,r))),o},xp=e=>e.replace(/\$/g,"$$$$");class pH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ns.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:x,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:g,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:sH,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Yi(o):i||"{{",this.suffix=l?Yi(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Yi(h):p||Yi("$t("),this.nestingSuffix=x?Yi(x):m||Yi(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=g||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const g=f_(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...s,...n,interpolationkey:p}):g}const x=p.split(this.formatSeparator),m=x.shift().trim(),v=x.join(this.formatSeparator).trim();return this.format(f_(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...s,...n,interpolationkey:m})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>xp(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?xp(this.escape(p)):xp(p)}].forEach(p=>{for(l=0;o=p.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const v=d(t,o,s);i=typeof v=="string"?v:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=s_(i));const m=p.safeValue(i);if(t=t.replace(o[0],m),f?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,i);const p=h.match(/'/g),x=h.match(/"/g);(p&&p.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${d}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=s_(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const gH=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Zi=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(Ff(r),s),t[i]=l),l(n)}};class yH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ns.create("formatter"),this.options=t,this.formats={number:Zi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Zi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Zi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Zi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Zi((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Zi(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,c)=>{const{formatName:u,formatOptions:d}=gH(c);if(this.formats[u]){let f=l;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},p=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](l,p,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const vH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class xH extends hm{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=ns.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,d=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(c=>{tH(c.loaded,[o],i),vH(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>l(null,f)).catch(l):l(null,d)}catch(d){l(d)}else u(t,n,r,s,l,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const h_=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),m_=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),rd=()=>{},wH=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Zc extends hm{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=m_(t),this.services={},this.logger=ns,this.modules={external:[]},wH(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=h_();this.options={...s,...this.options,...m_(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?ns.init(o(this.modules.logger),this.options):ns.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=yH);const f=new u_(this.options);this.store=new l_(this.options.resources,this.options);const h=this.services;h.logger=ns,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new mH(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new pH(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new xH(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var x=arguments.length,m=new Array(x>1?x-1:0),v=1;v<x;v++)m[v-1]=arguments[v];t.emit(p,...m)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new $f(this.services,this.options),this.translator.on("*",function(p){for(var x=arguments.length,m=new Array(x>1?x-1:0),v=1;v<x;v++)m[v-1]=arguments[v];t.emit(p,...m)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=Al(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>i(c)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Al();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=rd),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&fP.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Al();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},i=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},l=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let c;if(typeof l!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=s.options.overloadTranslationOptionHandler([i,l].concat(d))}else c={...l};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(i)?p=i.map(x=>`${c.keyPrefix}${h}${x}`):p=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(p,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Al();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Al();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new u_(h_());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Zc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Zc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new l_(this.store.data,s),o.services.resourceStore=o.store),o.translator=new $f(o.services,s),o.translator.on("*",function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(l,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wn=Zc.createInstance();wn.createInstance=Zc.createInstance;wn.createInstance;wn.dir;wn.init;wn.loadResources;wn.reloadResources;wn.use;wn.changeLanguage;wn.getFixedT;wn.t;wn.exists;wn.setDefaultNamespace;wn.hasLoadedNamespace;wn.loadNamespaces;wn.loadLanguages;const{slice:bH,forEach:_H}=[];function SH(e){return _H.call(bH.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const p_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,kH=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!p_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!p_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.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},g_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=kH(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e){this.create(e,"",-1)}};var CH={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return g_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&g_.create(n,e,r,s,o)}},jH={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let l=0;l<i.length;l++){const c=i[l].indexOf("=");c>0&&i[l].substring(0,c)===t&&(n=i[l].substring(c+1))}}return n}};let Dl=null;const y_=()=>{if(Dl!==null)return Dl;try{Dl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Dl=!1}return Dl};var EH={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&y_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&y_()&&window.localStorage.setItem(n,e)}};let Ol=null;const v_=()=>{if(Ol!==null)return Ol;try{Ol=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ol=!1}return Ol};var NH={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&v_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&v_()&&window.sessionStorage.setItem(n,e)}},TH={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},PH={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},RH={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},AH={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function DH(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class hP{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=SH(n,this.options||{},DH()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(CH),this.addDetector(jH),this.addDetector(EH),this.addDetector(NH),this.addDetector(TH),this.addDetector(PH),this.addDetector(RH),this.addDetector(AH)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}hP.type="languageDetector";const OH={"common.add":"新增","common.save":"保存","common.save.succeeded.message":"保存成功","common.save.failed.message":"保存失败","common.edit":"编辑","common.copy":"复制","common.download":"下载","common.delete":"刪除","common.delete.succeeded.message":"删除成功","common.delete.failed.message":"删除失败","common.next":"下一步","common.confirm":"确认","common.cancel":"取消","common.submit":"提交","common.update":"更新","common.update.succeeded.message":"修改成功","common.update.failed.message":"修改失败","common.text.domain":"域名","common.text.domain.empty":"无域名","common.text.ip":"IP 地址","common.text.ip.empty":"无 IP 地址","common.text.dns":"DNS域名服务器","common.text.dns.empty":"无 DNS 地址","common.text.ca":"CA证书颁发机构","common.text.name":"名称","common.text.provider":"服务商","common.text.created_at":"创建时间","common.text.updated_at":"更新时间","common.text.operations":"操作","common.text.nodata":"暂无数据","common.menu.settings":"系统设置","common.menu.logout":"退出登录","common.menu.document":"文档","common.pagination.next":"下一页","common.pagination.prev":"上一页","common.pagination.more":"更多","common.theme.light":"浅色","common.theme.dark":"暗黑","common.theme.system":"跟随系统","common.errmsg.string_max":"请输入不超过 {{max}} 个字符","common.errmsg.email_empty":"请输入邮箱","common.errmsg.email_invalid":"请输入正确的邮箱","common.errmsg.email_duplicate":"邮箱已存在","common.errmsg.domain_invalid":"请输入正确的域名","common.errmsg.host_invalid":"请输入正确的域名或 IP 地址","common.errmsg.ip_invalid":"请输入正确的 IP 地址","common.errmsg.url_invalid":"请输入正确的 URL","common.provider.tencent":"腾讯云","common.provider.tencent.cdn":"腾讯云 - CDN","common.provider.aliyun":"阿里云","common.provider.aliyun.oss":"阿里云 - OSS","common.provider.aliyun.cdn":"阿里云 - CDN","common.provider.aliyun.dcdn":"阿里云 - DCDN","common.provider.huaweicloud":"华为云","common.provider.qiniu":"七牛云","common.provider.qiniu.cdn":"七牛云 - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"本地部署","common.provider.ssh":"SSH 部署","common.provider.webhook":"Webhook","common.provider.kubernetes":"Kubernetes","common.provider.kubernetes.secret":"Kubernetes - Secret","common.provider.dingtalk":"钉钉","common.provider.telegram":"Telegram","common.provider.lark":"飞书"},IH={"login.username.label":"用户名","login.username.placeholder":"请输入用户名/邮箱","login.username.errmsg.invalid":"请输入正确的用户名/邮箱","login.password.label":"密码","login.password.placeholder":"请输入密码","login.password.errmsg.invalid":"密码至少 10 个字符","login.submit":"登录"},MH={"dashboard.page.title":"仪表盘","dashboard.statistics.all":"所有","dashboard.statistics.near_expired":"即将过期","dashboard.statistics.enabled":"启用中","dashboard.statistics.disabled":"未启用","dashboard.statistics.unit":"个","dashboard.history":"最近部署"},LH={"settings.page.title":"系统设置","settings.account.relogin.message":"请重新登录","settings.account.tab":"账号","settings.account.email.label":"登录邮箱","settings.account.email.errmsg.invalid":"请输入正确的邮箱地址","settings.account.email.placeholder":"请输入邮箱","settings.account.email.changed.message":"修改账户邮箱成功","settings.account.email.failed.message":"修改账户邮箱失败","settings.password.tab":"密码","settings.password.password.errmsg.length":"密码至少10个字符","settings.password.password.errmsg.not_matched":"两次密码不一致","settings.password.current_password.label":"当前密码","settings.password.current_password.placeholder":"请输入旧密码","settings.password.new_password.label":"新密码","settings.password.new_password.placeholder":"请输入新密码","settings.password.confirm_password.label":"确认密码","settings.password.confirm_password.placeholder":"请再次输入新密码","settings.password.changed.message":"修改密码成功","settings.password.failed.message":"修改密码失败","settings.notification.tab":"消息推送","settings.notification.template.label":"内容模板","settings.notification.template.saved.message":"通知模板保存成功","settings.notification.template.variables.tips.title":"可选的变量({COUNT}: 即将过期张数)","settings.notification.template.variables.tips.content":"可选的变量({COUNT}: 即将过期张数;{DOMAINS}: 域名列表)","settings.notification.config.enable":"是否启用","settings.notification.config.saved.message":"配置保存成功","settings.notification.config.failed.message":"配置保存失败","settings.notification.config.push.test.message":"推送测试消息","settings.notification.config.push.test.message.failed.message":"推送测试消息失败","settings.notification.config.push.test.message.success.message":"推送测试消息成功","settings.notification.dingtalk.secret.placeholder":"加签的签名","settings.notification.url.errmsg.invalid":"URL 格式不正确","settings.ca.tab":"证书颁发机构CA","settings.ca.provider.errmsg.empty":"请选择证书分发机构","settings.ca.eab_kid.errmsg.empty":"请输入EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"请输入EAB_HMAC_KEY","settings.ca.eab_kid_hmac_key.errmsg.empty":"请输入EAB_KID和EAB_HMAC_KEY"},zH={"domain.page.title":"域名列表","domain.nodata":"请添加域名开始部署证书吧。","domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.delete.confirm":"确定要删除域名吗?","domain.history":"部署历史","domain.deploy":"立即部署","domain.deploy.started.message":"开始部署","domain.deploy.started.tips":"已发起部署,请稍后查看部署日志。","domain.deploy.failed.message":"执行失败","domain.deploy.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.deploy_forced":"强行部署","domain.props.expiry":"有效期限","domain.props.expiry.date1":"有效期 {{date}} 天","domain.props.expiry.date2":"{{date}} 到期","domain.props.last_execution_status":"最近执行状态","domain.props.last_execution_stage":"最近执行阶段","domain.props.last_execution_time":"最近执行时间","domain.props.enable":"是否启用","domain.props.enable.enabled":"启用","domain.props.enable.disabled":"禁用","domain.application.tab":"申请配置","domain.application.form.domain.added.message":"域名添加成功","domain.application.form.domain.changed.message":"域名编辑成功","domain.application.form.email.label":"邮箱","domain.application.form.email.tips":"(申请证书需要提供邮箱)","domain.application.form.email.placeholder":"请选择邮箱","domain.application.form.email.add":"添加邮箱","domain.application.form.email.list":"邮箱列表","domain.application.form.access.label":"DNS 服务商授权配置","domain.application.form.access.placeholder":"请选择 DNS 服务商授权配置","domain.application.form.access.list":"已有的 DNS 服务商授权配置","domain.application.form.advanced_settings.label":"高级设置","domain.application.form.key_algorithm.label":"数字证书算法","domain.application.form.key_algorithm.placeholder":"请选择数字证书算法","domain.application.form.timeout.label":"DNS 传播检查超时时间(单位:秒)","domain.application.form.timeoue.placeholder":"请输入 DNS 传播检查超时时间","domain.application.unsaved.message":"请先保存申请配置","domain.deployment.tab":"部署配置","domain.deployment.nodata":"暂无部署配置,请添加后开始部署证书吧","domain.deployment.form.type.label":"部署方式","domain.deployment.form.type.placeholder":"请选择部署方式","domain.deployment.form.type.list":"支持的部署方式","domain.deployment.form.access.label":"授权配置","domain.deployment.form.access.placeholder":"请选择授权配置","domain.deployment.form.access.list":"已有的服务商授权配置","domain.deployment.form.domain.label":"部署到域名(仅支持单个域名;不支持泛域名)","domain.deployment.form.domain.placeholder":"请输入部署到的域名","domain.deployment.form.ssh_key_path.label":"私钥保存路径","domain.deployment.form.ssh_key_path.placeholder":"请输入私钥保存路径","domain.deployment.form.ssh_cert_path.label":"证书保存路径","domain.deployment.form.ssh_cert_path.placeholder":"请输入证书保存路径","domain.deployment.form.ssh_pre_command.label":"前置命令","domain.deployment.form.ssh_pre_command.placeholder":"在部署证书前执行的命令","domain.deployment.form.ssh_command.label":"命令","domain.deployment.form.ssh_command.placeholder":"请输入要执行的命令","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_endpoint.placeholder":"请输入 Endpoint","domain.deployment.form.oss_bucket.label":"存储桶","domain.deployment.form.oss_bucket.placeholder":"请输入存储桶名","domain.deployment.form.k8s_namespace.label":"命名空间","domain.deployment.form.k8s_namespace.placeholder":"请输入 K8S 命名空间","domain.deployment.form.k8s_secret_name.label":"Secret 名称","domain.deployment.form.k8s_secret_name.placeholder":"请输入 K8S Secret 名称","domain.deployment.form.k8s_secret_data_key_for_key.label":"Secret 数据键(用于存放公钥的 Key","domain.deployment.form.k8s_secret_data_key_for_key.placeholder":"请输入 K8S Secret 中用于存放公钥的数据键","domain.deployment.form.k8s_secret_data_key_for_crt.label":"Secret 数据键(用于存放证书的 Key","domain.deployment.form.k8s_secret_data_key_for_crt.placeholder":"请输入 K8S Secret 中用于存放证书的数据键","domain.deployment.form.variables.label":"变量","domain.deployment.form.variables.key":"变量名","domain.deployment.form.variables.value":"值","domain.deployment.form.variables.empty":"尚未添加变量","domain.deployment.form.variables.key.required":"变量名不能为空","domain.deployment.form.variables.value.required":"变量值不能为空","domain.deployment.form.variables.key.placeholder":"请输入变量名","domain.deployment.form.variables.value.placeholder":"请输入变量值"},FH={"access.page.title":"授权管理","access.authorization.tab":"授权","access.authorization.nodata":"请添加授权开始部署证书吧。","access.authorization.add":"新增授权","access.authorization.edit":"编辑授权","access.authorization.copy":"复制授权","access.authorization.delete":"删除授权","access.authorization.delete.confirm":"确定要删除授权吗?","access.authorization.form.type.label":"服务商","access.authorization.form.type.placeholder":"请选择服务商","access.authorization.form.type.list":"服务商列表","access.authorization.form.name.label":"名称","access.authorization.form.name.placeholder":"请输入授权名称","access.authorization.form.config.label":"配置类型","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"请输入区域","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"请输入 AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"请输入 AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"请输入 AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"请输入 SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"请输入 SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"请输入 SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS 托管区域 ID","access.authorization.form.aws_hosted_zone_id.placeholder":"请输入 AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"请输入 CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"请输入 GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"请输入 GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"请输入 NAMESILO_API_KEY","access.authorization.form.username.label":"用户名","access.authorization.form.username.placeholder":"请输入用户名","access.authorization.form.password.label":"密码","access.authorization.form.password.placeholder":"请输入密码","access.authorization.form.access_group.placeholder":"请选择分组","access.authorization.form.ssh_group.label":"授权配置组(用于将一个域名证书部署到多个 SSH 主机)","access.authorization.form.ssh_host.label":"服务器 Host","access.authorization.form.ssh_host.placeholder":"请输入 Host","access.authorization.form.ssh_port.label":"SSH 端口","access.authorization.form.ssh_port.placeholder":"请输入 Port","access.authorization.form.ssh_username.label":"用户名","access.authorization.form.ssh_username.placeholder":"请输入用户名","access.authorization.form.ssh_password.label":"密码(使用密码登录)","access.authorization.form.ssh_password.placeholder":"请输入密码","access.authorization.form.ssh_key.label":"Key使用私钥登录","access.authorization.form.ssh_key.placeholder":"请输入 Key","access.authorization.form.ssh_key_file.placeholder":"请选择文件","access.authorization.form.ssh_key_passphrase.label":"Key 口令(使用私钥登录)","access.authorization.form.ssh_key_passphrase.placeholder":"请输入 Key 口令","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"请输入 Webhook URL","access.authorization.form.k8s_kubeconfig.label":"KubeConfig","access.authorization.form.k8s_kubeconfig.placeholder":"请输入 KubeConfig","access.authorization.form.k8s_kubeconfig_file.placeholder":"请选择文件","access.group.tab":"授权组","access.group.nodata":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.group.add":"添加授权组","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.form.name.label":"组名","access.group.form.name.errmsg.empty":"请输入组名","access.group.domains":"所有授权","access.group.domains.nodata":"请添加域名开始部署证书吧。"},$H={"history.page.title":"部署历史","history.nodata":"你暂未创建任何部署,请先添加域名进行部署吧!","history.props.domain":"域名","history.props.status":"状态","history.props.stage":"阶段","history.props.stage.progress.check":"检查","history.props.stage.progress.apply":"获取","history.props.stage.progress.deploy":"部署","history.props.last_execution_time":"最近执行时间","history.log":"日志"},UH=Object.freeze({...OH,...IH,...MH,...LH,...zH,...FH,...$H}),VH={"common.save":"Save","common.save.succeeded.message":"Save Successful","common.save.failed.message":"Save Failed","common.add":"Add","common.edit":"Edit","common.copy":"Copy","common.download":"Download","common.delete":"Delete","common.delete.succeeded.message":"Delete Successful","common.delete.failed.message":"Delete Failed","common.next":"Next","common.confirm":"Confirm","common.cancel":"Cancel","common.submit":"Submit","common.update":"Update","common.update.succeeded.message":"Update Successful","common.update.failed.message":"Update Failed","common.text.domain":"Domain","common.text.domain.empty":"No Domain","common.text.ip":"IP Address","common.text.ip.empty":"No IP address","common.text.dns":"Domain Name Server","common.text.dns.empty":"No DNS","common.text.ca":"Certificate Authority","common.text.provider":"Provider","common.text.name":"Name","common.text.created_at":"Created At","common.text.updated_at":"Updated At","common.text.operations":"Operations","common.text.nodata":"No data available","common.menu.settings":"Settings","common.menu.logout":"Logout","common.menu.document":"Document","common.pagination.next":"Next","common.pagination.prev":"Previous","common.pagination.more":"More pages","common.theme.light":"Light","common.theme.dark":"Dark","common.theme.system":"System","common.errmsg.string_max":"Please enter no more than {{max}} characters","common.errmsg.email_invalid":"Please enter a valid email address","common.errmsg.email_empty":"Please enter email","common.errmsg.email_duplicate":"Email already exists","common.errmsg.domain_invalid":"Please enter domain","common.errmsg.host_invalid":"Please enter the correct domain name or IP","common.errmsg.ip_invalid":"Please enter IP","common.errmsg.url_invalid":"Please enter a valid URL","common.provider.aliyun":"Alibaba Cloud","common.provider.aliyun.oss":"Alibaba Cloud - OSS","common.provider.aliyun.cdn":"Alibaba Cloud - CDN","common.provider.aliyun.dcdn":"Alibaba Cloud - DCDN","common.provider.tencent":"Tencent","common.provider.tencent.cdn":"Tencent - CDN","common.provider.huaweicloud":"Huawei Cloud","common.provider.qiniu":"Qiniu","common.provider.qiniu.cdn":"Qiniu - CDN","common.provider.aws":"AWS","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"Local Deployment","common.provider.ssh":"SSH Deployment","common.provider.webhook":"Webhook","common.provider.kubernetes":"Kubernetes","common.provider.kubernetes.secret":"Kubernetes - Secret","common.provider.dingtalk":"DingTalk","common.provider.telegram":"Telegram","common.provider.lark":"Lark"},BH={"login.username.label":"Username","login.username.placeholder":"Username/Email","login.username.errmsg.invalid":"Please enter a valid email address","login.password.label":"Password","login.password.placeholder":"Password","login.password.errmsg.invalid":"Password should be at least 10 characters","login.submit":"Log In"},WH={"dashboard.page.title":"Dashboard","dashboard.statistics.all":"All","dashboard.statistics.near_expired":"About to Expire","dashboard.statistics.enabled":"Enabled","dashboard.statistics.disabled":"Not Enabled","dashboard.statistics.unit":"","dashboard.history":"Recently Deployment History"},HH={"settings.page.title":"Settings","settings.account.relogin.message":"Please login again","settings.account.tab":"Account","settings.account.email.label":"Email","settings.account.email.placeholder":"Please enter email","settings.account.email.errmsg.invalid":"Please enter a valid email address","settings.account.email.changed.message":"Account email altered successfully","settings.account.email.failed.message":"Account email alteration failed","settings.password.tab":"Password","settings.password.current_password.label":"Current Password","settings.password.current_password.placeholder":"Please enter the current password","settings.password.new_password.label":"New Password","settings.password.new_password.placeholder":"Please enter the new password","settings.password.confirm_password.label":"Confirm Password","settings.password.confirm_password.placeholder":"Please enter the new password again","settings.password.password.errmsg.length":"Password should be at least 10 characters","settings.password.password.errmsg.not_matched":"Passwords do not match","settings.password.changed.message":"Password changed successfully","settings.password.failed.message":"Password change failed","settings.notification.tab":"Notification","settings.notification.template.label":"Template","settings.notification.template.saved.message":"Notification template saved successfully","settings.notification.template.variables.tips.title":"Optional variables ({COUNT}: number of expiring soon)","settings.notification.template.variables.tips.content":"Optional variables ({COUNT}: number of expiring soon. {DOMAINS}: Domain list)","settings.notification.config.enable":"Enable","settings.notification.config.saved.message":"Configuration saved successfully","settings.notification.config.failed.message":"Configuration save failed","settings.notification.config.push.test.message":"Send test notification","settings.notification.config.push.test.message.failed.message":"Send test notification failed","settings.notification.config.push.test.message.success.message":"Send test notification successfully","settings.notification.dingtalk.secret.placeholder":"Signature for signed addition","settings.notification.url.errmsg.invalid":"Invalid Url format","settings.ca.tab":"Certificate Authority","settings.ca.provider.errmsg.empty":"Please select a Certificate Authority","settings.ca.eab_kid.errmsg.empty":"Please enter EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"Please enter EAB_HMAC_KEY.","settings.ca.eab_kid_hmac_key.errmsg.empty":"Please enter EAB_KID and EAB_HMAC_KEY"},KH={"domain.page.title":"Domain List","domain.nodata":"Please add a domain to start deploying the certificate.","domain.add":"Add Domain","domain.edit":"Edit Domain","domain.delete":"Delete Domain","domain.delete.confirm":"Are you sure you want to delete this domain?","domain.history":"Deployment History","domain.deploy":"Deploy Now","domain.deploy.started.message":"Deploy Started","domain.deploy.started.tips":"Deployment initiated, please check the deployment log later.","domain.deploy.failed.message":"Execution Failed","domain.deploy.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.deploy_forced":"Force Deployment","domain.props.expiry":"Validity Period","domain.props.expiry.date1":"Valid for {{date}} days","domain.props.expiry.date2":"Expiry on {{date}}","domain.props.last_execution_status":"Last Execution Status","domain.props.last_execution_stage":"Last Execution Stage","domain.props.last_execution_time":"Last Execution Time","domain.props.enable":"Enable","domain.props.enable.enabled":"Enable","domain.props.enable.disabled":"Disable","domain.application.tab":"Apply Settings","domain.application.form.domain.added.message":"Domain added successfully","domain.application.form.domain.changed.message":"Domain updated successfully","domain.application.form.email.label":"Email","domain.application.form.email.tips":"(A email is required to apply for a certificate)","domain.application.form.email.placeholder":"Please select email","domain.application.form.email.add":"Add Email","domain.application.form.email.list":"Email List","domain.application.form.access.label":"DNS Provider Authorization Configuration","domain.application.form.access.placeholder":"Please select DNS provider authorization configuration","domain.application.form.access.list":"Provider Authorization Configurations","domain.application.form.advanced_settings.label":"Advanced Settings","domain.application.form.key_algorithm.label":"Certificate Key Algorithm","domain.application.form.key_algorithm.placeholder":"Please select certificate key algorithm","domain.application.form.timeout.label":"DNS Propagation Timeout (Seconds)","domain.application.form.timeoue.placeholder":"Please enter maximum waiting time for DNS propagation","domain.application.unsaved.message":"Please save applyment configuration first","domain.deployment.tab":"Deploy Settings","domain.deployment.nodata":"Deployment not added yet","domain.deployment.form.type.label":"Deploy Method","domain.deployment.form.type.placeholder":"Please select deploy method","domain.deployment.form.type.list":"Deploy Method List","domain.deployment.form.access.label":"Access Configuration","domain.deployment.form.access.placeholder":"Please select provider authorization configuration","domain.deployment.form.access.list":"Provider Authorization Configurations","domain.deployment.form.domain.label":"Deploy to domain (Single domain only, not wildcard domain)","domain.deployment.form.domain.placeholder":"Please enter domain to be deployed","domain.deployment.form.ssh_key_path.label":"Private Key Save Path","domain.deployment.form.ssh_key_path.placeholder":"Please enter private key save path","domain.deployment.form.ssh_cert_path.label":"Certificate Save Path","domain.deployment.form.ssh_cert_path.placeholder":"Please enter certificate save path","domain.deployment.form.ssh_pre_command.label":"Pre-deployment Command","domain.deployment.form.ssh_pre_command.placeholder":"Command to be executed before deploying the certificate","domain.deployment.form.ssh_command.label":"Command","domain.deployment.form.ssh_command.placeholder":"Please enter command","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_endpoint.placeholder":"Please enter endpoint","domain.deployment.form.oss_bucket.label":"Bucket","domain.deployment.form.oss_bucket.placeholder":"Please enter bucket","domain.deployment.form.k8s_namespace.label":"Namespace","domain.deployment.form.k8s_namespace.placeholder":"Please enter namespace","domain.deployment.form.k8s_secret_name.label":"Secret Name","domain.deployment.form.k8s_secret_name.placeholder":"Please enter secret name","domain.deployment.form.k8s_secret_data_key_for_key.label":"Secret Data Key for PublicKey","domain.deployment.form.k8s_secret_data_key_for_key.placeholder":"Please enter secret data key for public key","domain.deployment.form.k8s_secret_data_key_for_crt.label":"Secret Data Key for Certificate","domain.deployment.form.k8s_secret_data_key_for_crt.placeholder":"Please enter secret data key for certificate","domain.deployment.form.variables.label":"Variable","domain.deployment.form.variables.key":"Name","domain.deployment.form.variables.value":"Value","domain.deployment.form.variables.empty":"Variable not added yet","domain.deployment.form.variables.key.required":"Variable name cannot be empty","domain.deployment.form.variables.value.required":"Variable value cannot be empty","domain.deployment.form.variables.key.placeholder":"Variable name","domain.deployment.form.variables.value.placeholder":"Variable value"},YH={"access.page.title":"Authorization Management","access.authorization.tab":"Authorization","access.authorization.nodata":"Please add authorization to start deploying certificate.","access.authorization.add":"Add Authorization","access.authorization.edit":"Edit Authorization","access.authorization.copy":"Copy Authorization","access.authorization.delete":"Delete Authorization","access.authorization.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.authorization.form.type.label":"Provider","access.authorization.form.type.placeholder":"Please select a provider","access.authorization.form.type.list":"Authorization List","access.authorization.form.name.label":"Name","access.authorization.form.name.placeholder":"Please enter authorization name","access.authorization.form.config.label":"Configuration Type","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"Please enter Region","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"Please enter AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"Please enter AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"Please enter AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"Please enter SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"Please enter SecretKey","access.authorization.form.secret_access_key.label":"SecretAccessKey","access.authorization.form.secret_access_key.placeholder":"Please enter SecretAccessKey","access.authorization.form.aws_hosted_zone_id.label":"AWS Hosted Zone ID","access.authorization.form.aws_hosted_zone_id.placeholder":"Please enter AWS Hosted Zone ID","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"Please enter CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"Please enter GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"Please enter GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"Please enter NAMESILO_API_KEY","access.authorization.form.username.label":"Username","access.authorization.form.username.placeholder":"Please enter username","access.authorization.form.password.label":"Password","access.authorization.form.password.placeholder":"Please enter password","access.authorization.form.access_group.placeholder":"Please select a group","access.authorization.form.ssh_group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.authorization.form.ssh_host.label":"Server Host","access.authorization.form.ssh_host.placeholder":"Please enter Host","access.authorization.form.ssh_port.label":"SSH Port","access.authorization.form.ssh_port.placeholder":"Please enter Port","access.authorization.form.ssh_username.label":"Username","access.authorization.form.ssh_username.placeholder":"Please enter username","access.authorization.form.ssh_password.label":"Password (Log-in using password)","access.authorization.form.ssh_password.placeholder":"Please enter password","access.authorization.form.ssh_key.label":"Key (Log-in using private key)","access.authorization.form.ssh_key.placeholder":"Please enter Key","access.authorization.form.ssh_key_file.placeholder":"Please select file","access.authorization.form.ssh_key_passphrase.label":"Key Passphrase (Log-in using private key)","access.authorization.form.ssh_key_passphrase.placeholder":"Please enter Key Passphrase","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"Please enter Webhook URL","access.authorization.form.k8s_kubeconfig.label":"KubeConfig","access.authorization.form.k8s_kubeconfig.placeholder":"Please enter KubeConfig","access.authorization.form.k8s_kubeconfig_file.placeholder":"Please select file","access.group.tab":"Authorization Group","access.group.nodata":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.group.add":"Add Group","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.form.name.label":"Group Name","access.group.form.name.errmsg.empty":"Please enter group name","access.group.domains":"All Authorizations","access.group.domains.nodata":"Please add a domain to start deploying the certificate."},ZH={"history.page.title":"Deployment History","history.nodata":"You have not created any deployments yet, please add a domain to start deployment!","history.props.domain":"Domain","history.props.status":"Status","history.props.stage":"Stage","history.props.stage.progress.check":"Check","history.props.stage.progress.apply":"Apply","history.props.stage.progress.deploy":"Deploy","history.props.last_execution_time":"Last Execution Time","history.log":"Log"},GH=Object.freeze({...VH,...BH,...WH,...HH,...KH,...YH,...ZH}),qH={zh:{name:"简体中文",translation:UH},en:{name:"English",translation:GH}};wn.use(hP).use(KO).init({resources:qH,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});wp.createRoot(document.getElementById("root")).render(a.jsx(He.StrictMode,{children:a.jsx(KF,{defaultTheme:"system",storageKey:"vite-ui-theme",children:a.jsx(bO,{router:XW})})}))});export default XH();