@alfatech/livechat 2025.5.0-8.1 → 2025.5.1-2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Cc=(e,t,n)=>t.has(e)||Wm("Cannot "+n);var T=(e,t,n)=>(Cc(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?Wm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Cc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Cc(e,t,"access private method"),n);var Ba=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var jI=IT((jt,Mt)=>{function $T(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hv={exports:{}},ku={},Wv={exports:{}},Z={};/**
1
+ var Hm=e=>{throw TypeError(e)};var $T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ec=(e,t,n)=>t.has(e)||Hm("Cannot "+n);var T=(e,t,n)=>(Ec(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?Hm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(Ec(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(Ec(e,t,"access private method"),n);var Ba=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return T(e,t,r)}});var O4=$T((Mt,Dt)=>{function VT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hv={exports:{}},ku={},Wv={exports:{}},Z={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var xa=Symbol.for("react.element"),VT=Symbol.for("react.portal"),BT=Symbol.for("react.fragment"),zT=Symbol.for("react.strict_mode"),UT=Symbol.for("react.profiler"),HT=Symbol.for("react.provider"),WT=Symbol.for("react.context"),KT=Symbol.for("react.forward_ref"),qT=Symbol.for("react.suspense"),GT=Symbol.for("react.memo"),QT=Symbol.for("react.lazy"),Km=Symbol.iterator;function YT(e){return e===null||typeof e!="object"?null:(e=Km&&e[Km]||e["@@iterator"],typeof e=="function"?e:null)}var Kv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qv=Object.assign,Gv={};function Ws(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}Ws.prototype.isReactComponent={};Ws.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")};Ws.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qv(){}Qv.prototype=Ws.prototype;function _h(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}var Ph=_h.prototype=new Qv;Ph.constructor=_h;qv(Ph,Ws.prototype);Ph.isPureReactComponent=!0;var qm=Array.isArray,Yv=Object.prototype.hasOwnProperty,Ah={current:null},Xv={key:!0,ref:!0,__self:!0,__source:!0};function Zv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Yv.call(t,r)&&!Xv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:e,key:s,ref:o,props:i,_owner:Ah.current}}function XT(e,t){return{$$typeof:xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rh(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa}function ZT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Gm=/\/+/g;function kc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ZT(""+e.key):t.toString(36)}function yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xa:case VT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+kc(o,0):r,qm(i)?(n="",e!=null&&(n=e.replace(Gm,"$&/")+"/"),yl(i,t,n,"",function(c){return c})):i!=null&&(Rh(i)&&(i=XT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Gm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",qm(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+kc(s,a);o+=yl(s,t,n,l,i)}else if(l=YT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+kc(s,a++),o+=yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function JT(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 ct={current:null},vl={transition:null},eE={ReactCurrentDispatcher:ct,ReactCurrentBatchConfig:vl,ReactCurrentOwner:Ah};function Jv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!Rh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ws;Z.Fragment=BT;Z.Profiler=UT;Z.PureComponent=_h;Z.StrictMode=zT;Z.Suspense=qT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eE;Z.act=Jv;Z.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=qv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Ah.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yv.call(t,l)&&!Xv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:xa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:WT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:HT,_context:e},e.Consumer=e};Z.createElement=Zv;Z.createFactory=function(e){var t=Zv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:KT,render:e}};Z.isValidElement=Rh;Z.lazy=function(e){return{$$typeof:QT,_payload:{_status:-1,_result:e},_init:JT}};Z.memo=function(e,t){return{$$typeof:GT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=vl.transition;vl.transition={};try{e()}finally{vl.transition=t}};Z.unstable_act=Jv;Z.useCallback=function(e,t){return ct.current.useCallback(e,t)};Z.useContext=function(e){return ct.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return ct.current.useDeferredValue(e)};Z.useEffect=function(e,t){return ct.current.useEffect(e,t)};Z.useId=function(){return ct.current.useId()};Z.useImperativeHandle=function(e,t,n){return ct.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return ct.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return ct.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return ct.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return ct.current.useReducer(e,t,n)};Z.useRef=function(e){return ct.current.useRef(e)};Z.useState=function(e){return ct.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return ct.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return ct.current.useTransition()};Z.version="18.3.1";Wv.exports=Z;var y=Wv.exports;const R=Hs(y),Af=$T({__proto__:null,default:R},[y]);/**
9
+ */var xa=Symbol.for("react.element"),BT=Symbol.for("react.portal"),zT=Symbol.for("react.fragment"),UT=Symbol.for("react.strict_mode"),HT=Symbol.for("react.profiler"),WT=Symbol.for("react.provider"),KT=Symbol.for("react.context"),qT=Symbol.for("react.forward_ref"),GT=Symbol.for("react.suspense"),QT=Symbol.for("react.memo"),YT=Symbol.for("react.lazy"),Wm=Symbol.iterator;function XT(e){return e===null||typeof e!="object"?null:(e=Wm&&e[Wm]||e["@@iterator"],typeof e=="function"?e:null)}var Kv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qv=Object.assign,Gv={};function Ks(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}Ks.prototype.isReactComponent={};Ks.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")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qv(){}Qv.prototype=Ks.prototype;function Ch(e,t,n){this.props=e,this.context=t,this.refs=Gv,this.updater=n||Kv}var kh=Ch.prototype=new Qv;kh.constructor=Ch;qv(kh,Ks.prototype);kh.isPureReactComponent=!0;var Km=Array.isArray,Yv=Object.prototype.hasOwnProperty,_h={current:null},Xv={key:!0,ref:!0,__self:!0,__source:!0};function Zv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Yv.call(t,r)&&!Xv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:xa,type:e,key:s,ref:o,props:i,_owner:_h.current}}function ZT(e,t){return{$$typeof:xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ph(e){return typeof e=="object"&&e!==null&&e.$$typeof===xa}function JT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qm=/\/+/g;function Cc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?JT(""+e.key):t.toString(36)}function yl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xa:case BT:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Cc(o,0):r,Km(i)?(n="",e!=null&&(n=e.replace(qm,"$&/")+"/"),yl(i,t,n,"",function(u){return u})):i!=null&&(Ph(i)&&(i=ZT(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(qm,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Km(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Cc(s,a);o+=yl(s,t,n,l,i)}else if(l=XT(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Cc(s,a++),o+=yl(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function za(e,t,n){if(e==null)return e;var r=[],i=0;return yl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function eE(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 dt={current:null},vl={transition:null},tE={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:vl,ReactCurrentOwner:_h};function Jv(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!Ph(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ks;Z.Fragment=zT;Z.Profiler=HT;Z.PureComponent=Ch;Z.StrictMode=UT;Z.Suspense=GT;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tE;Z.act=Jv;Z.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=qv({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=_h.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Yv.call(t,l)&&!Xv.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xa,type:e.type,key:i,ref:s,props:r,_owner:o}};Z.createContext=function(e){return e={$$typeof:KT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:WT,_context:e},e.Consumer=e};Z.createElement=Zv;Z.createFactory=function(e){var t=Zv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:qT,render:e}};Z.isValidElement=Ph;Z.lazy=function(e){return{$$typeof:YT,_payload:{_status:-1,_result:e},_init:eE}};Z.memo=function(e,t){return{$$typeof:QT,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=vl.transition;vl.transition={};try{e()}finally{vl.transition=t}};Z.unstable_act=Jv;Z.useCallback=function(e,t){return dt.current.useCallback(e,t)};Z.useContext=function(e){return dt.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};Z.useEffect=function(e,t){return dt.current.useEffect(e,t)};Z.useId=function(){return dt.current.useId()};Z.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return dt.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};Z.useRef=function(e){return dt.current.useRef(e)};Z.useState=function(e){return dt.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return dt.current.useTransition()};Z.version="18.3.1";Wv.exports=Z;var y=Wv.exports;const R=Ws(y),Pf=VT({__proto__:null,default:R},[y]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var tE=y,nE=Symbol.for("react.element"),rE=Symbol.for("react.fragment"),iE=Object.prototype.hasOwnProperty,sE=tE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oE={key:!0,ref:!0,__self:!0,__source:!0};function e1(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)iE.call(t,r)&&!oE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:nE,type:e,key:s,ref:o,props:i,_owner:sE.current}}ku.Fragment=rE;ku.jsx=e1;ku.jsxs=e1;Hv.exports=ku;var b=Hv.exports,t1={exports:{}},Ft={},n1={exports:{}},r1={};/**
17
+ */var nE=y,rE=Symbol.for("react.element"),iE=Symbol.for("react.fragment"),sE=Object.prototype.hasOwnProperty,oE=nE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aE={key:!0,ref:!0,__self:!0,__source:!0};function e1(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)sE.call(t,r)&&!aE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:rE,type:e,key:s,ref:o,props:i,_owner:oE.current}}ku.Fragment=iE;ku.jsx=e1;ku.jsxs=e1;Hv.exports=ku;var w=Hv.exports,t1={exports:{}},It={},n1={exports:{}},r1={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,L){var z=O.length;O.push(L);e:for(;0<z;){var V=z-1>>>1,W=O[V];if(0<i(W,L))O[V]=L,O[z]=W,z=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],z=O.pop();if(z!==L){O[0]=z;e:for(var V=0,W=O.length,q=W>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ie=O[J];if(0>i(ye,z))J<W&&0>i(Ie,ye)?(O[V]=Ie,O[J]=z,V=J):(O[V]=ye,O[ce]=z,V=ce);else if(J<W&&0>i(Ie,z))O[V]=Ie,O[J]=z,V=J;else break e}}return L}function i(O,L){var z=O.sortIndex-L.sortIndex;return z!==0?z:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,m=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=O)r(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function E(O){if(x=!1,v(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(c);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var z=d;try{for(v(L),u=n(l);u!==null&&(!(u.expirationTime>L)||O&&!I());){var V=u.callback;if(typeof V=="function"){u.callback=null,d=u.priorityLevel;var W=V(u.expirationTime<=L);L=e.unstable_now(),typeof W=="function"?u.callback=W:u===n(l)&&r(l),v(L)}else r(l);u=n(l)}if(u!==null)var q=!0;else{var ce=n(c);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{u=null,d=z,h=!1}}var C=!1,k=null,P=-1,j=5,M=-1;function I(){return!(e.unstable_now()-M<j)}function re(){if(k!==null){var O=e.unstable_now();M=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Re=xe.port2;xe.port1.onmessage=re,ie=function(){Re.postMessage(null)}}else ie=function(){w(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=w(function(){O(e.unstable_now())},L)}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(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var z=d;d=L;try{return O()}finally{d=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var z=d;d=O;try{return L()}finally{d=z}},e.unstable_scheduleCallback=function(O,L,z){var V=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?V+z:V):z=V,O){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=z+W,O={id:f++,callback:L,priorityLevel:O,startTime:z,expirationTime:W,sortIndex:-1},z>V?(O.sortIndex=z,t(c,O),n(l)===null&&O===n(c)&&(x?(p(P),P=-1):x=!0,ne(E,z-V))):(O.sortIndex=W,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var z=d;d=L;try{return O.apply(this,arguments)}finally{d=z}}}})(r1);n1.exports=r1;var aE=n1.exports;/**
25
+ */(function(e){function t(O,L){var B=O.length;O.push(L);e:for(;0<B;){var V=B-1>>>1,H=O[V];if(0<i(H,L))O[V]=L,O[B]=H,B=V;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],B=O.pop();if(B!==L){O[0]=B;e:for(var V=0,H=O.length,q=H>>>1;V<q;){var ce=2*(V+1)-1,ye=O[ce],J=ce+1,Ve=O[J];if(0>i(ye,B))J<H&&0>i(Ve,ye)?(O[V]=Ve,O[J]=B,V=J):(O[V]=ye,O[ce]=B,V=ce);else if(J<H&&0>i(Ve,B))O[V]=Ve,O[J]=B,V=J;else break e}}return L}function i(O,L){var B=O.sortIndex-L.sortIndex;return B!==0?B:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,m=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function E(O){if(x=!1,v(O),!m)if(n(l)!==null)m=!0,Q(S);else{var L=n(u);L!==null&&ne(E,L.startTime-O)}}function S(O,L){m=!1,x&&(x=!1,p(P),P=-1),h=!0;var B=d;try{for(v(L),c=n(l);c!==null&&(!(c.expirationTime>L)||O&&!I());){var V=c.callback;if(typeof V=="function"){c.callback=null,d=c.priorityLevel;var H=V(c.expirationTime<=L);L=e.unstable_now(),typeof H=="function"?c.callback=H:c===n(l)&&r(l),v(L)}else r(l);c=n(l)}if(c!==null)var q=!0;else{var ce=n(u);ce!==null&&ne(E,ce.startTime-L),q=!1}return q}finally{c=null,d=B,h=!1}}var C=!1,k=null,P=-1,j=5,N=-1;function I(){return!(e.unstable_now()-N<j)}function re(){if(k!==null){var O=e.unstable_now();N=O;var L=!0;try{L=k(!0,O)}finally{L?ie():(C=!1,k=null)}}else C=!1}var ie;if(typeof g=="function")ie=function(){g(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Oe=xe.port2;xe.port1.onmessage=re,ie=function(){Oe.postMessage(null)}}else ie=function(){b(re,0)};function Q(O){k=O,C||(C=!0,ie())}function ne(O,L){P=b(function(){O(e.unstable_now())},L)}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(O){O.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,Q(S))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var B=d;d=L;try{return O()}finally{d=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var B=d;d=O;try{return L()}finally{d=B}},e.unstable_scheduleCallback=function(O,L,B){var V=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,O){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,O={id:f++,callback:L,priorityLevel:O,startTime:B,expirationTime:H,sortIndex:-1},B>V?(O.sortIndex=B,t(u,O),n(l)===null&&O===n(u)&&(x?(p(P),P=-1):x=!0,ne(E,B-V))):(O.sortIndex=H,t(l,O),m||h||(m=!0,Q(S))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var L=d;return function(){var B=d;d=L;try{return O.apply(this,arguments)}finally{d=B}}}})(r1);n1.exports=r1;var lE=n1.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var lE=y,Dt=aE;function A(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 i1=new Set,Lo={};function Mi(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Lo[e]=t,e=0;e<t.length;e++)i1.add(t[e])}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rf=Object.prototype.hasOwnProperty,uE=/^[: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]*$/,Qm={},Ym={};function cE(e){return Rf.call(Ym,e)?!0:Rf.call(Qm,e)?!1:uE.test(e)?Ym[e]=!0:(Qm[e]=!0,!1)}function fE(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 dE(e,t,n,r){if(t===null||typeof t>"u"||fE(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 ft(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qe[e]=new ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qe[t]=new ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qe[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qe[e]=new ft(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){Qe[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qe[e]=new ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qe[e]=new ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qe[e]=new ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qe[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Oh=/[\-:]([a-z])/g;function jh(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(Oh,jh);Qe[t]=new ft(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(Oh,jh);Qe[t]=new ft(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(Oh,jh);Qe[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qe[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)});Qe.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qe[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mh(e,t,n,r){var i=Qe.hasOwnProperty(t)?Qe[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(dE(t,n,i,r)&&(n=null),r||i===null?cE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var nr=lE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ua=Symbol.for("react.element"),Qi=Symbol.for("react.portal"),Yi=Symbol.for("react.fragment"),Nh=Symbol.for("react.strict_mode"),Of=Symbol.for("react.profiler"),s1=Symbol.for("react.provider"),o1=Symbol.for("react.context"),Dh=Symbol.for("react.forward_ref"),jf=Symbol.for("react.suspense"),Mf=Symbol.for("react.suspense_list"),Fh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),a1=Symbol.for("react.offscreen"),Xm=Symbol.iterator;function to(e){return e===null||typeof e!="object"?null:(e=Xm&&e[Xm]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,_c;function ho(e){if(_c===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_c=t&&t[1]||""}return`
34
- `+_c+e}var Pc=!1;function Ac(e,t){if(!e||Pc)return"";Pc=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
33
+ */var uE=y,Lt=lE;function A(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 i1=new Set,Io={};function Mi(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Io[e]=t,e=0;e<t.length;e++)i1.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Af=Object.prototype.hasOwnProperty,cE=/^[: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]*$/,Gm={},Qm={};function fE(e){return Af.call(Qm,e)?!0:Af.call(Gm,e)?!1:cE.test(e)?Qm[e]=!0:(Gm[e]=!0,!1)}function dE(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 hE(e,t,n,r){if(t===null||typeof t>"u"||dE(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 ht(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(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){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ah=/[\-:]([a-z])/g;function Rh(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(Ah,Rh);Ye[t]=new ht(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(Ah,Rh);Ye[t]=new ht(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(Ah,Rh);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hE(t,n,i,r)&&(n=null),r||i===null?fE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=uE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ua=Symbol.for("react.element"),Yi=Symbol.for("react.portal"),Xi=Symbol.for("react.fragment"),jh=Symbol.for("react.strict_mode"),Rf=Symbol.for("react.profiler"),s1=Symbol.for("react.provider"),o1=Symbol.for("react.context"),Nh=Symbol.for("react.forward_ref"),Of=Symbol.for("react.suspense"),jf=Symbol.for("react.suspense_list"),Mh=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),a1=Symbol.for("react.offscreen"),Ym=Symbol.iterator;function no(e){return e===null||typeof e!="object"?null:(e=Ym&&e[Ym]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,kc;function po(e){if(kc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kc=t&&t[1]||""}return`
34
+ `+kc+e}var _c=!1;function Pc(e,t){if(!e||_c)return"";_c=!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 i=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
- `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Pc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ho(e):""}function hE(e){switch(e.tag){case 5:return ho(e.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return e=Ac(e.type,!1),e;case 11:return e=Ac(e.type.render,!1),e;case 1:return e=Ac(e.type,!0),e;default:return""}}function Nf(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 Yi:return"Fragment";case Qi:return"Portal";case Of:return"Profiler";case Nh:return"StrictMode";case jf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case s1:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fh:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}function pE(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 Nf(t);case 8:return t===Nh?"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 Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mE(e){var t=l1(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 i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=mE(e))}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(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 Df(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(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 c1(e,t){t=t.checked,t!=null&&Mh(e,"checked",t,!1)}function Ff(e,t){c1(e,t);var n=Vr(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")?Lf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Lf(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jm(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 Lf(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var po=Array.isArray;function hs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function If(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(po(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function f1(e,t){var n=Vr(t.value),r=Vr(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 tg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d1(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 $f(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,h1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Io(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bo={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},gE=["Webkit","ms","Moz","O"];Object.keys(bo).forEach(function(e){gE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bo[t]=bo[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bo.hasOwnProperty(e)&&bo[e]?(""+t).trim():t+"px"}function m1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=p1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yE=Te({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 Vf(e,t){if(t){if(yE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Bf(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 zf=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uf=null,ps=null,ms=null;function ng(e){if(e=Sa(e)){if(typeof Uf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),Uf(e.stateNode,e.type,t))}}function g1(e){ps?ms?ms.push(e):ms=[e]:ps=e}function y1(){if(ps){var e=ps,t=ms;if(ms=ps=null,ng(e),t)for(e=0;e<t.length;e++)ng(t[e])}}function v1(e,t){return e(t)}function x1(){}var Rc=!1;function w1(e,t,n){if(Rc)return e(t,n);Rc=!0;try{return v1(e,t,n)}finally{Rc=!1,(ps!==null||ms!==null)&&(x1(),y1())}}function $o(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(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(A(231,t,typeof n));return n}var Hf=!1;if(Xn)try{var no={};Object.defineProperty(no,"passive",{get:function(){Hf=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{Hf=!1}function vE(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var So=!1,zl=null,Ul=!1,Wf=null,xE={onError:function(e){So=!0,zl=e}};function wE(e,t,n,r,i,s,o,a,l){So=!1,zl=null,vE.apply(xE,arguments)}function bE(e,t,n,r,i,s,o,a,l){if(wE.apply(this,arguments),So){if(So){var c=zl;So=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Wf=c)}}function Ni(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 b1(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 rg(e){if(Ni(e)!==e)throw Error(A(188))}function SE(e){var t=e.alternate;if(!t){if(t=Ni(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return rg(i),e;if(s===r)return rg(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function S1(e){return e=SE(e),e!==null?T1(e):null}function T1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T1(e);if(t!==null)return t;e=e.sibling}return null}var E1=Dt.unstable_scheduleCallback,ig=Dt.unstable_cancelCallback,TE=Dt.unstable_shouldYield,EE=Dt.unstable_requestPaint,Ae=Dt.unstable_now,CE=Dt.unstable_getCurrentPriorityLevel,Ih=Dt.unstable_ImmediatePriority,C1=Dt.unstable_UserBlockingPriority,Hl=Dt.unstable_NormalPriority,kE=Dt.unstable_LowPriority,k1=Dt.unstable_IdlePriority,_u=null,_n=null;function _E(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:RE,PE=Math.log,AE=Math.LN2;function RE(e){return e>>>=0,e===0?32:31-(PE(e)/AE|0)|0}var Ka=64,qa=4194304;function mo(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 Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=mo(a):(s&=o,s!==0&&(r=mo(s)))}else o=n&~i,o!==0?r=mo(o):s!==0&&(r=mo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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-hn(t),i=1<<n,r|=e[n],t&=~i;return r}function OE(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 jE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-hn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=OE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Kf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Oc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=n}function ME(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 i=31-hn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function $h(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-hn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function P1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var A1,Vh,R1,O1,j1,qf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Vo=new Map,Bo=new Map,hr=[],NE="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 sg(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bo.delete(t.pointerId)}}function ro(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function DE(e,t,n,r,i){switch(t){case"focusin":return Pr=ro(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=ro(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=ro(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Vo.set(s,ro(Vo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Bo.set(s,ro(Bo.get(s)||null,e,t,n,r,i)),!0}return!1}function M1(e){var t=oi(e.target);if(t!==null){var n=Ni(t);if(n!==null){if(t=n.tag,t===13){if(t=b1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){R1(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 xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);zf=r,n.target.dispatchEvent(r),zf=null}else return t=Sa(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function og(e,t,n){xl(e)&&n.delete(t)}function FE(){qf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Vo.forEach(og),Bo.forEach(og)}function io(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,FE)))}function zo(e){function t(i){return io(i,e)}if(0<Ga.length){io(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&io(Pr,e),Ar!==null&&io(Ar,e),Rr!==null&&io(Rr,e),Vo.forEach(t),Bo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)M1(n),n.blockedOn===null&&hr.shift()}var gs=nr.ReactCurrentBatchConfig,Kl=!0;function LE(e,t,n,r){var i=le,s=gs.transition;gs.transition=null;try{le=1,Bh(e,t,n,r)}finally{le=i,gs.transition=s}}function IE(e,t,n,r){var i=le,s=gs.transition;gs.transition=null;try{le=4,Bh(e,t,n,r)}finally{le=i,gs.transition=s}}function Bh(e,t,n,r){if(Kl){var i=Gf(e,t,n,r);if(i===null)Bc(e,t,r,ql,n),sg(e,r);else if(DE(i,e,t,n,r))r.stopPropagation();else if(sg(e,r),t&4&&-1<NE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&A1(s),s=Gf(e,t,n,r),s===null&&Bc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Bc(e,t,r,null,n)}}var ql=null;function Gf(e,t,n,r){if(ql=null,e=Lh(r),e=oi(e),e!==null)if(t=Ni(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b1(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 ql=e,null}function N1(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(CE()){case Ih:return 1;case C1:return 4;case Hl:case kE:return 16;case k1:return 536870912;default:return 16}default:return 16}}var Er=null,zh=null,wl=null;function D1(){if(wl)return wl;var e,t=zh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(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 Qa(){return!0}function ag(){return!1}function Lt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:ag,this.isPropagationStopped=ag,this}return Te(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=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var Ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=Lt(Ks),ba=Te({},Ks,{view:0,detail:0}),$E=Lt(ba),jc,Mc,so,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hh,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!==so&&(so&&e.type==="mousemove"?(jc=e.screenX-so.screenX,Mc=e.screenY-so.screenY):Mc=jc=0,so=e),jc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),lg=Lt(Pu),VE=Te({},Pu,{dataTransfer:0}),BE=Lt(VE),zE=Te({},ba,{relatedTarget:0}),Nc=Lt(zE),UE=Te({},Ks,{animationName:0,elapsedTime:0,pseudoElement:0}),HE=Lt(UE),WE=Te({},Ks,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KE=Lt(WE),qE=Te({},Ks,{data:0}),ug=Lt(qE),GE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QE={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"},YE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=YE[e])?!!t[e]:!1}function Hh(){return XE}var ZE=Te({},ba,{key:function(e){if(e.key){var t=GE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?QE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),JE=Lt(ZE),eC=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=Lt(eC),tC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hh}),nC=Lt(tC),rC=Te({},Ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),iC=Lt(rC),sC=Te({},Pu,{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}),oC=Lt(sC),aC=[9,13,27,32],Wh=Xn&&"CompositionEvent"in window,To=null;Xn&&"documentMode"in document&&(To=document.documentMode);var lC=Xn&&"TextEvent"in window&&!To,F1=Xn&&(!Wh||To&&8<To&&11>=To),fg=" ",dg=!1;function L1(e,t){switch(e){case"keyup":return aC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function uC(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(dg=!0,fg);case"textInput":return e=t.data,e===fg&&dg?null:e;default:return null}}function cC(e,t){if(Xi)return e==="compositionend"||!Wh&&L1(e,t)?(e=D1(),wl=zh=Er=null,Xi=!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 F1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={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 hg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function $1(e,t,n,r){g1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Uh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Eo=null,Uo=null;function dC(e){Y1(e,0)}function Au(e){var t=es(e);if(u1(t))return e}function hC(e,t){if(e==="change")return t}var V1=!1;if(Xn){var Dc;if(Xn){var Fc="oninput"in document;if(!Fc){var pg=document.createElement("div");pg.setAttribute("oninput","return;"),Fc=typeof pg.oninput=="function"}Dc=Fc}else Dc=!1;V1=Dc&&(!document.documentMode||9<document.documentMode)}function mg(){Eo&&(Eo.detachEvent("onpropertychange",B1),Uo=Eo=null)}function B1(e){if(e.propertyName==="value"&&Au(Uo)){var t=[];$1(t,Uo,e,Lh(e)),w1(dC,t)}}function pC(e,t,n){e==="focusin"?(mg(),Eo=t,Uo=n,Eo.attachEvent("onpropertychange",B1)):e==="focusout"&&mg()}function mC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Uo)}function gC(e,t){if(e==="click")return Au(t)}function yC(e,t){if(e==="input"||e==="change")return Au(t)}function vC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:vC;function Ho(e,t){if(mn(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 i=n[r];if(!Rf.call(t,i)||!mn(e[i],t[i]))return!1}return!0}function gg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yg(e,t){var n=gg(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=gg(n)}}function z1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Kh(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 xC(e){var t=U1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Kh(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=yg(n,s);var o=yg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 wC=Xn&&"documentMode"in document&&11>=document.documentMode,Zi=null,Qf=null,Co=null,Yf=!1;function vg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yf||Zi==null||Zi!==Bl(r)||(r=Zi,"selectionStart"in r&&Kh(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}),Co&&Ho(Co,r)||(Co=r,r=Gl(Qf,"onSelect"),0<r.length&&(t=new Uh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zi)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ji={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Lc={},H1={};Xn&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function Ru(e){if(Lc[e])return Lc[e];if(!Ji[e])return e;var t=Ji[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H1)return Lc[e]=t[n];return e}var W1=Ru("animationend"),K1=Ru("animationiteration"),q1=Ru("animationstart"),G1=Ru("transitionend"),Q1=new Map,xg="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 Wr(e,t){Q1.set(e,t),Mi(t,[e])}for(var Ic=0;Ic<xg.length;Ic++){var $c=xg[Ic],bC=$c.toLowerCase(),SC=$c[0].toUpperCase()+$c.slice(1);Wr(bC,"on"+SC)}Wr(W1,"onAnimationEnd");Wr(K1,"onAnimationIteration");Wr(q1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(G1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var go="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(" "),TC=new Set("cancel close invalid load scroll toggle".split(" ").concat(go));function wg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,bE(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;wg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;wg(i,a,c),s=l}}}if(Ul)throw e=Wf,Ul=!1,Wf=null,e}function pe(e,t){var n=t[td];n===void 0&&(n=t[td]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function Vc(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Wo(e){if(!e[Xa]){e[Xa]=!0,i1.forEach(function(n){n!=="selectionchange"&&(TC.has(n)||Vc(n,!1,e),Vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,Vc("selectionchange",!1,t))}}function X1(e,t,n,r){switch(N1(t)){case 1:var i=LE;break;case 4:i=IE;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Hf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Bc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}w1(function(){var c=s,f=Lh(n),u=[];e:{var d=Q1.get(e);if(d!==void 0){var h=Uh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=JE;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;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":h=lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=BE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=nC;break;case W1:case K1:case q1:h=HE;break;case G1:h=iC;break;case"scroll":h=$E;break;case"wheel":h=oC;break;case"copy":case"cut":case"paste":h=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cg}var x=(t&4)!==0,w=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=c,v;g!==null;){v=g;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=$o(g,p),E!=null&&x.push(Ko(g,E,v)))),w)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),u.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==zf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Zn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?oi(m):null,m!==null&&(w=Ni(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(x=lg,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=cg,E="onPointerLeave",p="onPointerEnter",g="pointer"),w=h==null?d:es(h),v=m==null?d:es(m),d=new x(E,g+"leave",h,n,f),d.target=w,d.relatedTarget=v,E=null,oi(f)===c&&(x=new x(p,g+"enter",m,n,f),x.target=v,x.relatedTarget=w,E=x),w=E,h&&m)t:{for(x=h,p=m,g=0,v=x;v;v=qi(v))g++;for(v=0,E=p;E;E=qi(E))v++;for(;0<g-v;)x=qi(x),g--;for(;0<v-g;)p=qi(p),v--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=qi(x),p=qi(p)}x=null}else x=null;h!==null&&bg(u,d,h,x,!1),m!==null&&w!==null&&bg(u,w,m,x,!0)}}e:{if(d=c?es(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=hC;else if(hg(d))if(V1)S=yC;else{S=mC;var C=pC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=gC);if(S&&(S=S(e,c))){$1(u,S,n,f);break e}C&&C(e,d,c),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Lf(d,"number",d.value)}switch(C=c?es(c):window,e){case"focusin":(hg(C)||C.contentEditable==="true")&&(Zi=C,Qf=c,Co=null);break;case"focusout":Co=Qf=Zi=null;break;case"mousedown":Yf=!0;break;case"contextmenu":case"mouseup":case"dragend":Yf=!1,vg(u,n,f);break;case"selectionchange":if(wC)break;case"keydown":case"keyup":vg(u,n,f)}var k;if(Wh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Xi?L1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(F1&&n.locale!=="ko"&&(Xi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Xi&&(k=D1()):(Er=f,zh="value"in Er?Er.value:Er.textContent,Xi=!0)),C=Gl(c,P),0<C.length&&(P=new ug(P,e,null,n,f),u.push({event:P,listeners:C}),k?P.data=k:(k=I1(n),k!==null&&(P.data=k)))),(k=lC?uC(e,n):cC(e,n))&&(c=Gl(c,"onBeforeInput"),0<c.length&&(f=new ug("onBeforeInput","beforeinput",null,n,f),u.push({event:f,listeners:c}),f.data=k))}Y1(u,t)})}function Ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=$o(e,n),s!=null&&r.unshift(Ko(e,s,i)),s=$o(e,t),s!=null&&r.push(Ko(e,s,i))),e=e.return}return r}function qi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=$o(n,s),l!=null&&o.unshift(Ko(n,l,a))):i||(l=$o(n,s),l!=null&&o.push(Ko(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var EC=/\r\n?/g,CC=/\u0000|\uFFFD/g;function Sg(e){return(typeof e=="string"?e:""+e).replace(EC,`
38
- `).replace(CC,"")}function Za(e,t,n){if(t=Sg(t),Sg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Xf=null,Zf=null;function Jf(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 ed=typeof setTimeout=="function"?setTimeout:void 0,kC=typeof clearTimeout=="function"?clearTimeout:void 0,Tg=typeof Promise=="function"?Promise:void 0,_C=typeof queueMicrotask=="function"?queueMicrotask:typeof Tg<"u"?function(e){return Tg.resolve(null).then(e).catch(PC)}:ed;function PC(e){setTimeout(function(){throw e})}function zc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),zo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);zo(t)}function Or(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 Eg(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 qs=Math.random().toString(36).slice(2),kn="__reactFiber$"+qs,qo="__reactProps$"+qs,Zn="__reactContainer$"+qs,td="__reactEvents$"+qs,AC="__reactListeners$"+qs,RC="__reactHandles$"+qs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Eg(e);e!==null;){if(n=e[kn])return n;e=Eg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[qo]||null}var nd=[],ts=-1;function Kr(e){return{current:e}}function ge(e){0>ts||(e.current=nd[ts],nd[ts]=null,ts--)}function de(e,t){ts++,nd[ts]=e.current,e.current=t}var Br={},rt=Kr(Br),St=Kr(!1),Ci=Br;function Ns(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tt(e){return e=e.childContextTypes,e!=null}function Yl(){ge(St),ge(rt)}function Cg(e,t,n){if(rt.current!==Br)throw Error(A(168));de(rt,t),de(St,n)}function Z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,pE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=rt.current,de(rt,e),de(St,St.current),!0}function kg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=Z1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(St),ge(rt),de(rt,e)):ge(St),de(St,n)}var zn=null,ju=!1,Uc=!1;function J1(e){zn===null?zn=[e]:zn.push(e)}function OC(e){ju=!0,J1(e)}function qr(){if(!Uc&&zn!==null){Uc=!0;var e=0,t=le;try{var n=zn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zn=null,ju=!1}catch(i){throw zn!==null&&(zn=zn.slice(e+1)),E1(Ih,qr),i}finally{le=t,Uc=!1}}return null}var ns=[],rs=0,Zl=null,Jl=0,Kt=[],qt=0,ki=null,Wn=1,Kn="";function ei(e,t){ns[rs++]=Jl,ns[rs++]=Zl,Zl=e,Jl=t}function ex(e,t,n){Kt[qt++]=Wn,Kt[qt++]=Kn,Kt[qt++]=ki,ki=e;var r=Wn;e=Kn;var i=32-hn(r)-1;r&=~(1<<i),n+=1;var s=32-hn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wn=1<<32-hn(t)+i|n<<i|r,Kn=s+e}else Wn=1<<s|n<<i|r,Kn=e}function qh(e){e.return!==null&&(ei(e,1),ex(e,1,0))}function Gh(e){for(;e===Zl;)Zl=ns[--rs],ns[rs]=null,Jl=ns[--rs],ns[rs]=null;for(;e===ki;)ki=Kt[--qt],Kt[qt]=null,Kn=Kt[--qt],Kt[qt]=null,Wn=Kt[--qt],Kt[qt]=null}var Nt=null,Ot=null,ve=!1,fn=null;function tx(e,t){var n=Qt(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 _g(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,Nt=e,Ot=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Nt=e,Ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Wn,overflow:Kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Nt=e,Ot=null,!0):!1;default:return!1}}function rd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function id(e){if(ve){var t=Ot;if(t){var n=t;if(!_g(e,t)){if(rd(e))throw Error(A(418));t=Or(n.nextSibling);var r=Nt;t&&_g(e,t)?tx(r,n):(e.flags=e.flags&-4097|2,ve=!1,Nt=e)}}else{if(rd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Nt=e}}}function Pg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nt=e}function Ja(e){if(e!==Nt)return!1;if(!ve)return Pg(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jf(e.type,e.memoizedProps)),t&&(t=Ot)){if(rd(e))throw nx(),Error(A(418));for(;t;)tx(e,t),t=Or(t.nextSibling)}if(Pg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ot=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ot=null}}else Ot=Nt?Or(e.stateNode.nextSibling):null;return!0}function nx(){for(var e=Ot;e;)e=Or(e.nextSibling)}function Ds(){Ot=Nt=null,ve=!1}function Qh(e){fn===null?fn=[e]:fn.push(e)}var jC=nr.ReactCurrentBatchConfig;function oo(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(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ag(e){var t=e._init;return t(e._payload)}function rx(e){function t(p,g){if(e){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,E){return g===null||g.tag!==6?(g=Yc(v,p.mode,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,E){var S=v.type;return S===Yi?f(p,g,v.props.children,E,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Ag(S)===g.type)?(E=i(g,v.props),E.ref=oo(p,g,v),E.return=p,E):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=oo(p,g,v),E.return=p,E)}function c(p,g,v,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Xc(v,p.mode,E),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function f(p,g,v,E,S){return g===null||g.tag!==7?(g=bi(v,p.mode,E,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function u(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Yc(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return v=Pl(g.type,g.key,g.props,null,p.mode,v),v.ref=oo(p,null,g),v.return=p,v;case Qi:return g=Xc(g,p.mode,v),g.return=p,g;case cr:var E=g._init;return u(p,E(g._payload),v)}if(po(g)||to(g))return g=bi(g,p.mode,v,null),g.return=p,g;el(p,g)}return null}function d(p,g,v,E){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:return v.key===S?l(p,g,v,E):null;case Qi:return v.key===S?c(p,g,v,E):null;case cr:return S=v._init,d(p,g,S(v._payload),E)}if(po(v)||to(v))return S!==null?null:f(p,g,v,E,null);el(p,v)}return null}function h(p,g,v,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?v:E.key)||null,l(g,p,E,S);case Qi:return p=p.get(E.key===null?v:E.key)||null,c(g,p,E,S);case cr:var C=E._init;return h(p,g,v,C(E._payload),S)}if(po(E)||to(E))return p=p.get(v)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,v,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<v.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var M=d(p,k,v[P],E);if(M===null){k===null&&(k=j);break}e&&k&&M.alternate===null&&t(p,k),g=s(M,g,P),C===null?S=M:C.sibling=M,C=M,k=j}if(P===v.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<v.length;P++)k=u(p,v[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<v.length;P++)j=h(k,p,P,v[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function x(p,g,v,E){var S=to(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,M=v.next();k!==null&&!M.done;P++,M=v.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,M.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(M.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!M.done;P++,M=v.next())M=u(p,M.value,E),M!==null&&(g=s(M,g,P),C===null?S=M:C.sibling=M,C=M);return ve&&ei(p,P),S}for(k=r(p,k);!M.done;P++,M=v.next())M=h(k,p,P,M.value,E),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?P:M.key),g=s(M,g,P),C===null?S=M:C.sibling=M,C=M);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function w(p,g,v,E){if(typeof v=="object"&&v!==null&&v.type===Yi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:e:{for(var S=v.key,C=g;C!==null;){if(C.key===S){if(S=v.type,S===Yi){if(C.tag===7){n(p,C.sibling),g=i(C,v.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Ag(S)===C.type){n(p,C.sibling),g=i(C,v.props),g.ref=oo(p,C,v),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Yi?(g=bi(v.props.children,p.mode,E,v.key),g.return=p,p=g):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=oo(p,g,v),E.return=p,p=E)}return o(p);case Qi:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Xc(v,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=v._init,w(p,g,C(v._payload),E)}if(po(v))return m(p,g,v,E);if(to(v))return x(p,g,v,E);el(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=Yc(v,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return w}var Fs=rx(!0),ix=rx(!1),eu=Kr(null),tu=null,is=null,Yh=null;function Xh(){Yh=is=tu=null}function Zh(e){var t=eu.current;ge(eu),e._currentValue=t}function sd(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 ys(e,t){tu=e,Yh=is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(bt=!0),e.firstContext=null)}function Zt(e){var t=e._currentValue;if(Yh!==e)if(e={context:e,memoizedValue:t,next:null},is===null){if(tu===null)throw Error(A(308));is=e,tu.dependencies={lanes:0,firstContext:e}}else is=is.next=e;return t}var ai=null;function Jh(e){ai===null?ai=[e]:ai.push(e)}function sx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Jh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Jn(e,r)}function Jn(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 fr=!1;function ep(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ox(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 Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Jn(e,n)}return i=r.interleaved,i===null?(t.next=t,Jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Jn(e,n)}function Sl(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,$h(e,n)}}function Rg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(d=t,h=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){u=m.call(h,u,d);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,u,d):m,d==null)break e;u=Te({},u,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=u}}function Og(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Go=Kr(Ta),Qo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function tp(e,t){switch(de(Qo,t),de(Go,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$f(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$f(t,e)}ge(Pn),de(Pn,t)}function Ls(){ge(Pn),ge(Go),ge(Qo)}function ax(e){li(Qo.current);var t=li(Pn.current),n=$f(t,e.type);t!==n&&(de(Go,e),de(Pn,n))}function np(e){Go.current===e&&(ge(Pn),ge(Go))}var we=Kr(0);function ru(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 Hc=[];function rp(){for(var e=0;e<Hc.length;e++)Hc[e]._workInProgressVersionPrimary=null;Hc.length=0}var Tl=nr.ReactCurrentDispatcher,Wc=nr.ReactCurrentBatchConfig,_i=0,Se=null,Ne=null,Be=null,iu=!1,ko=!1,Yo=0,MC=0;function Xe(){throw Error(A(321))}function ip(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function sp(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?LC:IC,e=n(r,i),ko){s=0;do{if(ko=!1,Yo=0,25<=s)throw Error(A(301));s+=1,Be=Ne=null,t.updateQueue=null,Tl.current=$C,e=n(r,i)}while(ko)}if(Tl.current=su,t=Ne!==null&&Ne.next!==null,_i=0,Be=Ne=Se=null,iu=!1,t)throw Error(A(300));return e}function op(){var e=Yo!==0;return Yo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Se.memoizedState=Be=e:Be=Be.next=e,Be}function Jt(){if(Ne===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Be===null?Se.memoizedState:Be.next;if(t!==null)Be=t,Ne=e;else{if(e===null)throw Error(A(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Be===null?Se.memoizedState=Be=e:Be=Be.next=e}return Be}function Xo(e,t){return typeof t=="function"?t(e):t}function Kc(e){var t=Jt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Ne,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var f=c.lane;if((_i&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Se.lanes|=f,Pi|=f}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,mn(r,t.memoizedState)||(bt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qc(e){var t=Jt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);mn(s,t.memoizedState)||(bt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function lx(){}function ux(e,t){var n=Se,r=Jt(),i=t(),s=!mn(r.memoizedState,i);if(s&&(r.memoizedState=i,bt=!0),r=r.queue,ap(dx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Zo(9,fx.bind(null,n,r,i,t),void 0,null),Ue===null)throw Error(A(349));_i&30||cx(n,t,i)}return i}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function dx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function px(e){var t=Jn(e,1);t!==null&&pn(t,e,1,-1)}function jg(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:e},t.queue=e,e=e.dispatch=FC.bind(null,Se,e),[t.memoizedState,e]}function Zo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.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 mx(){return Jt().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Zo(1|t,n,void 0,r===void 0?null:r)}function Mu(e,t,n,r){var i=Jt();r=r===void 0?null:r;var s=void 0;if(Ne!==null){var o=Ne.memoizedState;if(s=o.destroy,r!==null&&ip(r,o.deps)){i.memoizedState=Zo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Zo(1|t,n,s,r)}function Mg(e,t){return El(8390656,8,e,t)}function ap(e,t){return Mu(2048,8,e,t)}function gx(e,t){return Mu(4,2,e,t)}function yx(e,t){return Mu(4,4,e,t)}function vx(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 xx(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4,4,vx.bind(null,t,e),n)}function lp(){}function wx(e,t){var n=Jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bx(e,t){var n=Jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return _i&21?(mn(n,t)||(n=_1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bt=!0),e.memoizedState=n)}function NC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Wc.transition;Wc.transition={};try{e(!1),t()}finally{le=n,Wc.transition=r}}function Tx(){return Jt().memoizedState}function DC(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ex(e))Cx(t,n);else if(n=sx(e,t,n,r),n!==null){var i=ut();pn(n,e,r,i),kx(n,t,r)}}function FC(e,t,n){var r=Nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ex(e))Cx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,mn(a,o)){var l=t.interleaved;l===null?(i.next=i,Jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sx(e,t,i,r),n!==null&&(i=ut(),pn(n,e,r,i),kx(n,t,r))}}function Ex(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Cx(e,t){ko=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}var su={readContext:Zt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},LC={readContext:Zt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();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=DC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:jg,useDebugValue:lp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=jg(!1),t=e[0];return e=NC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),Ue===null)throw Error(A(349));_i&30||cx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Mg(dx.bind(null,r,s,e),[e]),r.flags|=2048,Zo(9,fx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=Ue.identifierPrefix;if(ve){var n=Kn,r=Wn;n=(r&~(1<<32-hn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},IC={readContext:Zt,useCallback:wx,useContext:Zt,useEffect:ap,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Kc,useRef:mx,useState:function(){return Kc(Xo)},useDebugValue:lp,useDeferredValue:function(e){var t=Jt();return Sx(t,Ne.memoizedState,e)},useTransition:function(){var e=Kc(Xo)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1},$C={readContext:Zt,useCallback:wx,useContext:Zt,useEffect:ap,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:qc,useRef:mx,useState:function(){return qc(Xo)},useDebugValue:lp,useDeferredValue:function(e){var t=Jt();return Ne===null?t.memoizedState=e:Sx(t,Ne.memoizedState,e)},useTransition:function(){var e=qc(Xo)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1};function an(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function od(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nu={isMounted:function(e){return(e=e._reactInternals)?Ni(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ut(),i=Nr(e),s=Gn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(pn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ut(),i=Nr(e),s=Gn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(pn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ut(),r=Nr(e),i=Gn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(pn(t,e,r,n),Sl(t,e,r))}};function Ng(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ho(n,r)||!Ho(i,s):!0}function _x(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Zt(s):(i=Tt(t)?Ci:rt.current,r=t.contextTypes,s=(r=r!=null)?Ns(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Dg(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&&Nu.enqueueReplaceState(t,t.state,null)}function ad(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ep(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Zt(s):(s=Tt(t)?Ci:rt.current,i.context=Ns(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(od(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Nu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Is(e,t){try{var n="",r=t;do n+=hE(r),r=r.return;while(r);var i=n}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{_c=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?po(e):""}function pE(e){switch(e.tag){case 5:return po(e.type);case 16:return po("Lazy");case 13:return po("Suspense");case 19:return po("SuspenseList");case 0:case 2:case 15:return e=Pc(e.type,!1),e;case 11:return e=Pc(e.type.render,!1),e;case 1:return e=Pc(e.type,!0),e;default:return""}}function Nf(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 Xi:return"Fragment";case Yi:return"Portal";case Rf:return"Profiler";case jh:return"StrictMode";case Of:return"Suspense";case jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case s1:return(e._context.displayName||"Context")+".Provider";case Nh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mh:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}function mE(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 Nf(t);case 8:return t===jh?"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 Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gE(e){var t=l1(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 i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=gE(e))}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(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 Mf(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(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 c1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function Df(e,t){c1(e,t);var n=Vr(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")?Ff(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ff(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zm(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 Ff(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mo=Array.isArray;function ps(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jm(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(mo(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function f1(e,t){var n=Vr(t.value),r=Vr(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 eg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d1(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 If(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,h1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $o(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={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},yE=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){yE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function m1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=p1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vE=Te({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 $f(e,t){if(t){if(vE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Vf(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 Bf=null;function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zf=null,ms=null,gs=null;function tg(e){if(e=Sa(e)){if(typeof zf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),zf(e.stateNode,e.type,t))}}function g1(e){ms?gs?gs.push(e):gs=[e]:ms=e}function y1(){if(ms){var e=ms,t=gs;if(gs=ms=null,tg(e),t)for(e=0;e<t.length;e++)tg(t[e])}}function v1(e,t){return e(t)}function x1(){}var Ac=!1;function w1(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return v1(e,t,n)}finally{Ac=!1,(ms!==null||gs!==null)&&(x1(),y1())}}function Vo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(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(A(231,t,typeof n));return n}var Uf=!1;if(Yn)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){Uf=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Uf=!1}function xE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var To=!1,zl=null,Ul=!1,Hf=null,wE={onError:function(e){To=!0,zl=e}};function bE(e,t,n,r,i,s,o,a,l){To=!1,zl=null,xE.apply(wE,arguments)}function SE(e,t,n,r,i,s,o,a,l){if(bE.apply(this,arguments),To){if(To){var u=zl;To=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Hf=u)}}function Di(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 b1(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 ng(e){if(Di(e)!==e)throw Error(A(188))}function TE(e){var t=e.alternate;if(!t){if(t=Di(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ng(i),e;if(s===r)return ng(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function S1(e){return e=TE(e),e!==null?T1(e):null}function T1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T1(e);if(t!==null)return t;e=e.sibling}return null}var E1=Lt.unstable_scheduleCallback,rg=Lt.unstable_cancelCallback,EE=Lt.unstable_shouldYield,CE=Lt.unstable_requestPaint,Ae=Lt.unstable_now,kE=Lt.unstable_getCurrentPriorityLevel,Fh=Lt.unstable_ImmediatePriority,C1=Lt.unstable_UserBlockingPriority,Hl=Lt.unstable_NormalPriority,_E=Lt.unstable_LowPriority,k1=Lt.unstable_IdlePriority,_u=null,_n=null;function PE(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:OE,AE=Math.log,RE=Math.LN2;function OE(e){return e>>>=0,e===0?32:31-(AE(e)/RE|0)|0}var Ka=64,qa=4194304;function go(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 Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=go(a):(s&=o,s!==0&&(r=go(s)))}else o=n&~i,o!==0?r=go(o):s!==0&&(r=go(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function jE(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 NE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-pn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=jE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Wf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Rc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function ME(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 i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function P1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var A1,Ih,R1,O1,j1,Kf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Bo=new Map,zo=new Map,hr=[],DE="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 ig(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(t.pointerId)}}function io(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function FE(e,t,n,r,i){switch(t){case"focusin":return Pr=io(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=io(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=io(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Bo.set(s,io(Bo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,zo.set(s,io(zo.get(s)||null,e,t,n,r,i)),!0}return!1}function N1(e){var t=oi(e.target);if(t!==null){var n=Di(t);if(n!==null){if(t=n.tag,t===13){if(t=b1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){R1(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 xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bf=r,n.target.dispatchEvent(r),Bf=null}else return t=Sa(n),t!==null&&Ih(t),e.blockedOn=n,!1;t.shift()}return!0}function sg(e,t,n){xl(e)&&n.delete(t)}function LE(){Kf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Bo.forEach(sg),zo.forEach(sg)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kf||(Kf=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,LE)))}function Uo(e){function t(i){return so(i,e)}if(0<Ga.length){so(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&so(Pr,e),Ar!==null&&so(Ar,e),Rr!==null&&so(Rr,e),Bo.forEach(t),zo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&hr.shift()}var ys=tr.ReactCurrentBatchConfig,Kl=!0;function IE(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=1,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $E(e,t,n,r){var i=le,s=ys.transition;ys.transition=null;try{le=4,$h(e,t,n,r)}finally{le=i,ys.transition=s}}function $h(e,t,n,r){if(Kl){var i=qf(e,t,n,r);if(i===null)Vc(e,t,r,ql,n),ig(e,r);else if(FE(i,e,t,n,r))r.stopPropagation();else if(ig(e,r),t&4&&-1<DE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&A1(s),s=qf(e,t,n,r),s===null&&Vc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Vc(e,t,r,null,n)}}var ql=null;function qf(e,t,n,r){if(ql=null,e=Dh(r),e=oi(e),e!==null)if(t=Di(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b1(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 ql=e,null}function M1(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(kE()){case Fh:return 1;case C1:return 4;case Hl:case _E:return 16;case k1:return 536870912;default:return 16}default:return 16}}var Er=null,Vh=null,wl=null;function D1(){if(wl)return wl;var e,t=Vh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(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 Qa(){return!0}function og(){return!1}function $t(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:og,this.isPropagationStopped=og,this}return Te(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=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bh=$t(qs),ba=Te({},qs,{view:0,detail:0}),VE=$t(ba),Oc,jc,oo,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zh,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!==oo&&(oo&&e.type==="mousemove"?(Oc=e.screenX-oo.screenX,jc=e.screenY-oo.screenY):jc=Oc=0,oo=e),Oc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),ag=$t(Pu),BE=Te({},Pu,{dataTransfer:0}),zE=$t(BE),UE=Te({},ba,{relatedTarget:0}),Nc=$t(UE),HE=Te({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),WE=$t(HE),KE=Te({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qE=$t(KE),GE=Te({},qs,{data:0}),lg=$t(GE),QE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YE={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"},XE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XE[e])?!!t[e]:!1}function zh(){return ZE}var JE=Te({},ba,{key:function(e){if(e.key){var t=QE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?YE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eC=$t(JE),tC=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ug=$t(tC),nC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zh}),rC=$t(nC),iC=Te({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sC=$t(iC),oC=Te({},Pu,{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}),aC=$t(oC),lC=[9,13,27,32],Uh=Yn&&"CompositionEvent"in window,Eo=null;Yn&&"documentMode"in document&&(Eo=document.documentMode);var uC=Yn&&"TextEvent"in window&&!Eo,F1=Yn&&(!Uh||Eo&&8<Eo&&11>=Eo),cg=" ",fg=!1;function L1(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function cC(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(fg=!0,cg);case"textInput":return e=t.data,e===cg&&fg?null:e;default:return null}}function fC(e,t){if(Zi)return e==="compositionend"||!Uh&&L1(e,t)?(e=D1(),wl=Vh=Er=null,Zi=!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 F1&&t.locale!=="ko"?null:t.data;default:return null}}var dC={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 dg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dC[e.type]:t==="textarea"}function $1(e,t,n,r){g1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Bh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Co=null,Ho=null;function hC(e){Y1(e,0)}function Au(e){var t=ts(e);if(u1(t))return e}function pC(e,t){if(e==="change")return t}var V1=!1;if(Yn){var Mc;if(Yn){var Dc="oninput"in document;if(!Dc){var hg=document.createElement("div");hg.setAttribute("oninput","return;"),Dc=typeof hg.oninput=="function"}Mc=Dc}else Mc=!1;V1=Mc&&(!document.documentMode||9<document.documentMode)}function pg(){Co&&(Co.detachEvent("onpropertychange",B1),Ho=Co=null)}function B1(e){if(e.propertyName==="value"&&Au(Ho)){var t=[];$1(t,Ho,e,Dh(e)),w1(hC,t)}}function mC(e,t,n){e==="focusin"?(pg(),Co=t,Ho=n,Co.attachEvent("onpropertychange",B1)):e==="focusout"&&pg()}function gC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Ho)}function yC(e,t){if(e==="click")return Au(t)}function vC(e,t){if(e==="input"||e==="change")return Au(t)}function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:xC;function Wo(e,t){if(gn(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 i=n[r];if(!Af.call(t,i)||!gn(e[i],t[i]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gg(e,t){var n=mg(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=mg(n)}}function z1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Hh(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 wC(e){var t=U1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Hh(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=gg(n,s);var o=gg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 bC=Yn&&"documentMode"in document&&11>=document.documentMode,Ji=null,Gf=null,ko=null,Qf=!1;function yg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qf||Ji==null||Ji!==Bl(r)||(r=Ji,"selectionStart"in r&&Hh(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}),ko&&Wo(ko,r)||(ko=r,r=Gl(Gf,"onSelect"),0<r.length&&(t=new Bh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ji)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Fc={},H1={};Yn&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Ru(e){if(Fc[e])return Fc[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H1)return Fc[e]=t[n];return e}var W1=Ru("animationend"),K1=Ru("animationiteration"),q1=Ru("animationstart"),G1=Ru("transitionend"),Q1=new Map,vg="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 Wr(e,t){Q1.set(e,t),Mi(t,[e])}for(var Lc=0;Lc<vg.length;Lc++){var Ic=vg[Lc],SC=Ic.toLowerCase(),TC=Ic[0].toUpperCase()+Ic.slice(1);Wr(SC,"on"+TC)}Wr(W1,"onAnimationEnd");Wr(K1,"onAnimationIteration");Wr(q1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(G1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),EC=new Set("cancel close invalid load scroll toggle".split(" ").concat(yo));function xg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SE(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;xg(i,a,u),s=l}}}if(Ul)throw e=Hf,Ul=!1,Hf=null,e}function pe(e,t){var n=t[ed];n===void 0&&(n=t[ed]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function $c(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Xa]){e[Xa]=!0,i1.forEach(function(n){n!=="selectionchange"&&(EC.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,$c("selectionchange",!1,t))}}function X1(e,t,n,r){switch(M1(t)){case 1:var i=IE;break;case 4:i=$E;break;default:i=$h}n=i.bind(null,t,n,e),i=void 0,!Uf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}w1(function(){var u=s,f=Dh(n),c=[];e:{var d=Q1.get(e);if(d!==void 0){var h=Bh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=eC;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;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":h=ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=zE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rC;break;case W1:case K1:case q1:h=WE;break;case G1:h=sC;break;case"scroll":h=VE;break;case"wheel":h=aC;break;case"copy":case"cut":case"paste":h=qE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ug}var x=(t&4)!==0,b=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=u,v;g!==null;){v=g;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=Vo(g,p),E!=null&&x.push(qo(g,E,v)))),b)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),c.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Bf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Xn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?oi(m):null,m!==null&&(b=Di(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(x=ag,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=ug,E="onPointerLeave",p="onPointerEnter",g="pointer"),b=h==null?d:ts(h),v=m==null?d:ts(m),d=new x(E,g+"leave",h,n,f),d.target=b,d.relatedTarget=v,E=null,oi(f)===u&&(x=new x(p,g+"enter",m,n,f),x.target=v,x.relatedTarget=b,E=x),b=E,h&&m)t:{for(x=h,p=m,g=0,v=x;v;v=Gi(v))g++;for(v=0,E=p;E;E=Gi(E))v++;for(;0<g-v;)x=Gi(x),g--;for(;0<v-g;)p=Gi(p),v--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=Gi(x),p=Gi(p)}x=null}else x=null;h!==null&&wg(c,d,h,x,!1),m!==null&&b!==null&&wg(c,b,m,x,!0)}}e:{if(d=u?ts(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=pC;else if(dg(d))if(V1)S=vC;else{S=gC;var C=mC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=yC);if(S&&(S=S(e,u))){$1(c,S,n,f);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Ff(d,"number",d.value)}switch(C=u?ts(u):window,e){case"focusin":(dg(C)||C.contentEditable==="true")&&(Ji=C,Gf=u,ko=null);break;case"focusout":ko=Gf=Ji=null;break;case"mousedown":Qf=!0;break;case"contextmenu":case"mouseup":case"dragend":Qf=!1,yg(c,n,f);break;case"selectionchange":if(bC)break;case"keydown":case"keyup":yg(c,n,f)}var k;if(Uh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Zi?L1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(F1&&n.locale!=="ko"&&(Zi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Zi&&(k=D1()):(Er=f,Vh="value"in Er?Er.value:Er.textContent,Zi=!0)),C=Gl(u,P),0<C.length&&(P=new lg(P,e,null,n,f),c.push({event:P,listeners:C}),k?P.data=k:(k=I1(n),k!==null&&(P.data=k)))),(k=uC?cC(e,n):fC(e,n))&&(u=Gl(u,"onBeforeInput"),0<u.length&&(f=new lg("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}Y1(c,t)})}function qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Vo(e,n),s!=null&&r.unshift(qo(e,s,i)),s=Vo(e,t),s!=null&&r.push(qo(e,s,i))),e=e.return}return r}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Vo(n,s),l!=null&&o.unshift(qo(n,l,a))):i||(l=Vo(n,s),l!=null&&o.push(qo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var CC=/\r\n?/g,kC=/\u0000|\uFFFD/g;function bg(e){return(typeof e=="string"?e:""+e).replace(CC,`
38
+ `).replace(kC,"")}function Za(e,t,n){if(t=bg(t),bg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Yf=null,Xf=null;function Zf(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 Jf=typeof setTimeout=="function"?setTimeout:void 0,_C=typeof clearTimeout=="function"?clearTimeout:void 0,Sg=typeof Promise=="function"?Promise:void 0,PC=typeof queueMicrotask=="function"?queueMicrotask:typeof Sg<"u"?function(e){return Sg.resolve(null).then(e).catch(AC)}:Jf;function AC(e){setTimeout(function(){throw e})}function Bc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Uo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Uo(t)}function Or(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 Tg(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 Gs=Math.random().toString(36).slice(2),kn="__reactFiber$"+Gs,Go="__reactProps$"+Gs,Xn="__reactContainer$"+Gs,ed="__reactEvents$"+Gs,RC="__reactListeners$"+Gs,OC="__reactHandles$"+Gs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tg(e);e!==null;){if(n=e[kn])return n;e=Tg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Xn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[Go]||null}var td=[],ns=-1;function Kr(e){return{current:e}}function ge(e){0>ns||(e.current=td[ns],td[ns]=null,ns--)}function de(e,t){ns++,td[ns]=e.current,e.current=t}var Br={},st=Kr(Br),Tt=Kr(!1),Ci=Br;function Ds(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Et(e){return e=e.childContextTypes,e!=null}function Yl(){ge(Tt),ge(st)}function Eg(e,t,n){if(st.current!==Br)throw Error(A(168));de(st,t),de(Tt,n)}function Z1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,mE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=st.current,de(st,e),de(Tt,Tt.current),!0}function Cg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=Z1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(Tt),ge(st),de(st,e)):ge(Tt),de(Tt,n)}var Bn=null,ju=!1,zc=!1;function J1(e){Bn===null?Bn=[e]:Bn.push(e)}function jC(e){ju=!0,J1(e)}function qr(){if(!zc&&Bn!==null){zc=!0;var e=0,t=le;try{var n=Bn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bn=null,ju=!1}catch(i){throw Bn!==null&&(Bn=Bn.slice(e+1)),E1(Fh,qr),i}finally{le=t,zc=!1}}return null}var rs=[],is=0,Zl=null,Jl=0,qt=[],Gt=0,ki=null,Hn=1,Wn="";function ei(e,t){rs[is++]=Jl,rs[is++]=Zl,Zl=e,Jl=t}function ex(e,t,n){qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,ki=e;var r=Hn;e=Wn;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Hn=1<<32-pn(t)+i|n<<i|r,Wn=s+e}else Hn=1<<s|n<<i|r,Wn=e}function Wh(e){e.return!==null&&(ei(e,1),ex(e,1,0))}function Kh(e){for(;e===Zl;)Zl=rs[--is],rs[is]=null,Jl=rs[--is],rs[is]=null;for(;e===ki;)ki=qt[--Gt],qt[Gt]=null,Wn=qt[--Gt],qt[Gt]=null,Hn=qt[--Gt],qt[Gt]=null}var Ft=null,Nt=null,ve=!1,dn=null;function tx(e,t){var n=Yt(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 kg(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,Ft=e,Nt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Hn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ft=e,Nt=null,!0):!1;default:return!1}}function nd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rd(e){if(ve){var t=Nt;if(t){var n=t;if(!kg(e,t)){if(nd(e))throw Error(A(418));t=Or(n.nextSibling);var r=Ft;t&&kg(e,t)?tx(r,n):(e.flags=e.flags&-4097|2,ve=!1,Ft=e)}}else{if(nd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Ft=e}}}function _g(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function Ja(e){if(e!==Ft)return!1;if(!ve)return _g(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zf(e.type,e.memoizedProps)),t&&(t=Nt)){if(nd(e))throw nx(),Error(A(418));for(;t;)tx(e,t),t=Or(t.nextSibling)}if(_g(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Nt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=Ft?Or(e.stateNode.nextSibling):null;return!0}function nx(){for(var e=Nt;e;)e=Or(e.nextSibling)}function Fs(){Nt=Ft=null,ve=!1}function qh(e){dn===null?dn=[e]:dn.push(e)}var NC=tr.ReactCurrentBatchConfig;function ao(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(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pg(e){var t=e._init;return t(e._payload)}function rx(e){function t(p,g){if(e){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,E){return g===null||g.tag!==6?(g=Qc(v,p.mode,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,E){var S=v.type;return S===Xi?f(p,g,v.props.children,E,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===g.type)?(E=i(g,v.props),E.ref=ao(p,g,v),E.return=p,E):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,E)}function u(p,g,v,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Yc(v,p.mode,E),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function f(p,g,v,E,S){return g===null||g.tag!==7?(g=bi(v,p.mode,E,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function c(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qc(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return v=Pl(g.type,g.key,g.props,null,p.mode,v),v.ref=ao(p,null,g),v.return=p,v;case Yi:return g=Yc(g,p.mode,v),g.return=p,g;case cr:var E=g._init;return c(p,E(g._payload),v)}if(mo(g)||no(g))return g=bi(g,p.mode,v,null),g.return=p,g;el(p,g)}return null}function d(p,g,v,E){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:return v.key===S?l(p,g,v,E):null;case Yi:return v.key===S?u(p,g,v,E):null;case cr:return S=v._init,d(p,g,S(v._payload),E)}if(mo(v)||no(v))return S!==null?null:f(p,g,v,E,null);el(p,v)}return null}function h(p,g,v,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?v:E.key)||null,l(g,p,E,S);case Yi:return p=p.get(E.key===null?v:E.key)||null,u(g,p,E,S);case cr:var C=E._init;return h(p,g,v,C(E._payload),S)}if(mo(E)||no(E))return p=p.get(v)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,v,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<v.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var N=d(p,k,v[P],E);if(N===null){k===null&&(k=j);break}e&&k&&N.alternate===null&&t(p,k),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N,k=j}if(P===v.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<v.length;P++)k=c(p,v[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<v.length;P++)j=h(k,p,P,v[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function x(p,g,v,E){var S=no(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,N=v.next();k!==null&&!N.done;P++,N=v.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,N.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(N.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!N.done;P++,N=v.next())N=c(p,N.value,E),N!==null&&(g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return ve&&ei(p,P),S}for(k=r(p,k);!N.done;P++,N=v.next())N=h(k,p,P,N.value,E),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?P:N.key),g=s(N,g,P),C===null?S=N:C.sibling=N,C=N);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function b(p,g,v,E){if(typeof v=="object"&&v!==null&&v.type===Xi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:e:{for(var S=v.key,C=g;C!==null;){if(C.key===S){if(S=v.type,S===Xi){if(C.tag===7){n(p,C.sibling),g=i(C,v.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Pg(S)===C.type){n(p,C.sibling),g=i(C,v.props),g.ref=ao(p,C,v),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Xi?(g=bi(v.props.children,p.mode,E,v.key),g.return=p,p=g):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=ao(p,g,v),E.return=p,p=E)}return o(p);case Yi:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Yc(v,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=v._init,b(p,g,C(v._payload),E)}if(mo(v))return m(p,g,v,E);if(no(v))return x(p,g,v,E);el(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=Qc(v,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return b}var Ls=rx(!0),ix=rx(!1),eu=Kr(null),tu=null,ss=null,Gh=null;function Qh(){Gh=ss=tu=null}function Yh(e){var t=eu.current;ge(eu),e._currentValue=t}function id(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 vs(e,t){tu=e,Gh=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Gh!==e)if(e={context:e,memoizedValue:t,next:null},ss===null){if(tu===null)throw Error(A(308));ss=e,tu.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return t}var ai=null;function Xh(e){ai===null?ai=[e]:ai.push(e)}function sx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zn(e,r)}function Zn(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 fr=!1;function Zh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ox(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 qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zn(e,n)}function Sl(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,Lh(e,n)}}function Ag(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(d=t,h=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Te({},c,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=c}}function Rg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Qo=Kr(Ta),Yo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function Jh(e,t){switch(de(Yo,t),de(Qo,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:If(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=If(t,e)}ge(Pn),de(Pn,t)}function Is(){ge(Pn),ge(Qo),ge(Yo)}function ax(e){li(Yo.current);var t=li(Pn.current),n=If(t,e.type);t!==n&&(de(Qo,e),de(Pn,n))}function ep(e){Qo.current===e&&(ge(Pn),ge(Qo))}var we=Kr(0);function ru(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 Uc=[];function tp(){for(var e=0;e<Uc.length;e++)Uc[e]._workInProgressVersionPrimary=null;Uc.length=0}var Tl=tr.ReactCurrentDispatcher,Hc=tr.ReactCurrentBatchConfig,_i=0,Se=null,Fe=null,Ue=null,iu=!1,_o=!1,Xo=0,MC=0;function Ze(){throw Error(A(321))}function np(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gn(e[n],t[n]))return!1;return!0}function rp(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?IC:$C,e=n(r,i),_o){s=0;do{if(_o=!1,Xo=0,25<=s)throw Error(A(301));s+=1,Ue=Fe=null,t.updateQueue=null,Tl.current=VC,e=n(r,i)}while(_o)}if(Tl.current=su,t=Fe!==null&&Fe.next!==null,_i=0,Ue=Fe=Se=null,iu=!1,t)throw Error(A(300));return e}function ip(){var e=Xo!==0;return Xo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function en(){if(Fe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Ue===null?Se.memoizedState:Ue.next;if(t!==null)Ue=t,Fe=e;else{if(e===null)throw Error(A(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Ue===null?Se.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Zo(e,t){return typeof t=="function"?t(e):t}function Wc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Fe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((_i&f)===f)l!==null&&(l=l.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 c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Se.lanes|=f,Pi|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,gn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kc(e){var t=en(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);gn(s,t.memoizedState)||(St=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function lx(){}function ux(e,t){var n=Se,r=en(),i=t(),s=!gn(r.memoizedState,i);if(s&&(r.memoizedState=i,St=!0),r=r.queue,sp(dx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(n.flags|=2048,Jo(9,fx.bind(null,n,r,i,t),void 0,null),He===null)throw Error(A(349));_i&30||cx(n,t,i)}return i}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function dx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gn(e,n)}catch{return!0}}function px(e){var t=Zn(e,1);t!==null&&mn(t,e,1,-1)}function Og(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},t.queue=e,e=e.dispatch=LC.bind(null,Se,e),[t.memoizedState,e]}function Jo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.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 mx(){return en().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Jo(1|t,n,void 0,r===void 0?null:r)}function Nu(e,t,n,r){var i=en();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var o=Fe.memoizedState;if(s=o.destroy,r!==null&&np(r,o.deps)){i.memoizedState=Jo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Jo(1|t,n,s,r)}function jg(e,t){return El(8390656,8,e,t)}function sp(e,t){return Nu(2048,8,e,t)}function gx(e,t){return Nu(4,2,e,t)}function yx(e,t){return Nu(4,4,e,t)}function vx(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 xx(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4,4,vx.bind(null,t,e),n)}function op(){}function wx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bx(e,t){var n=en();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&np(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return _i&21?(gn(n,t)||(n=_1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function DC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Hc.transition;Hc.transition={};try{e(!1),t()}finally{le=n,Hc.transition=r}}function Tx(){return en().memoizedState}function FC(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ex(e))Cx(t,n);else if(n=sx(e,t,n,r),n!==null){var i=ft();mn(n,e,r,i),kx(n,t,r)}}function LC(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ex(e))Cx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,gn(a,o)){var l=t.interleaved;l===null?(i.next=i,Xh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sx(e,t,i,r),n!==null&&(i=ft(),mn(n,e,r,i),kx(n,t,r))}}function Ex(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Cx(e,t){_o=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lh(e,n)}}var su={readContext:Jt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},IC={readContext:Jt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:jg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();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=FC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Og,useDebugValue:op,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Og(!1),t=e[0];return e=DC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),He===null)throw Error(A(349));_i&30||cx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,jg(dx.bind(null,r,s,e),[e]),r.flags|=2048,Jo(9,fx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=He.identifierPrefix;if(ve){var n=Wn,r=Hn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$C={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Wc,useRef:mx,useState:function(){return Wc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Wc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1},VC={readContext:Jt,useCallback:wx,useContext:Jt,useEffect:sp,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Kc,useRef:mx,useState:function(){return Kc(Zo)},useDebugValue:op,useDeferredValue:function(e){var t=en();return Fe===null?t.memoizedState=e:Sx(t,Fe.memoizedState,e)},useTransition:function(){var e=Kc(Zo)[0],t=en().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function sd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mu={isMounted:function(e){return(e=e._reactInternals)?Di(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ft(),i=Mr(e),s=qn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(mn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ft(),r=Mr(e),i=qn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(mn(t,e,r,n),Sl(t,e,r))}};function Ng(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Wo(n,r)||!Wo(i,s):!0}function _x(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(i=Et(t)?Ci:st.current,r=t.contextTypes,s=(r=r!=null)?Ds(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Mu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Mg(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&&Mu.enqueueReplaceState(t,t.state,null)}function od(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Zh(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Jt(s):(s=Et(t)?Ci:st.current,i.context=Ds(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(sd(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Mu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $s(e,t){try{var n="",r=t;do n+=pE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Gc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ld(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,vd=r),ld(e,t)},n}function Ax(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ld(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ld(e,t),typeof r!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Fg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ek.bind(null,e,t,n),t.then(e,e))}function Lg(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 Ig(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=Gn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var BC=nr.ReactCurrentOwner,bt=!1;function ot(e,t,n,r){t.child=e===null?ix(t,null,n,r):Fs(t,e.child,n,r)}function $g(e,t,n,r,i){n=n.render;var s=t.ref;return ys(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&n&&qh(t),t.flags|=1,ot(e,t,r,i),t.child)}function Vg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ho,n(o,r)&&e.ref===t.ref)return er(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ho(s,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(bt=!0);else return t.lanes=e.lanes,er(e,t,i)}return ud(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(os,Rt),Rt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(os,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(os,Rt),Rt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(os,Rt),Rt|=r;return ot(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ud(e,t,n,r,i){var s=Tt(n)?Ci:rt.current;return s=Ns(t,s),ys(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&r&&qh(t),t.flags|=1,ot(e,t,n,i),t.child)}function Bg(e,t,n,r,i){if(Tt(n)){var s=!0;Xl(t)}else s=!1;if(ys(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),ad(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zt(c):(c=Tt(n)?Ci:rt.current,c=Ns(t,c));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Dg(t,o,r,c),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||St.current||fr?(typeof f=="function"&&(od(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:an(t.type,a),o.props=c,u=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zt(l):(l=Tt(n)?Ci:rt.current,l=Ns(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&Dg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==u||d!==m||St.current||fr?(typeof h=="function"&&(od(t,n,h,r),m=t.memoizedState),(c=fr||Ng(t,n,c,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return cd(e,t,n,r,s,i)}function cd(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&kg(t,n,!1),er(e,t,s);r=t.stateNode,BC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fs(t,e.child,null,s),t.child=Fs(t,null,a,s)):ot(e,t,a,s),t.memoizedState=r.state,i&&kg(t,n,!0),t.child}function Mx(e){var t=e.stateNode;t.pendingContext?Cg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Cg(e,t.context,!1),tp(e,t.containerInfo)}function zg(e,t,n,r,i){return Ds(),Qh(i),t.flags|=256,ot(e,t,n,r),t.child}var fd={dehydrated:null,treeContext:null,retryLane:0};function dd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return id(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=dd(n),t.memoizedState=fd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return zC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?dd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=fd,r}return s=e.child,e=s.sibling,r=Dr(s,{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 up(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&Qh(r),Fs(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Gc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fs(t,e.child,null,o),t.child.memoizedState=dd(o),t.memoizedState=fd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=Gc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,bt||a){if(r=Ue,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Jn(e,i),pn(r,e,i,-1))}return mp(),r=Gc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=tk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ot=Or(i.nextSibling),Nt=t,ve=!0,fn=null,e!==null&&(Kt[qt++]=Wn,Kt[qt++]=Kn,Kt[qt++]=ki,Wn=e.id,Kn=e.overflow,ki=t),t=up(t,r.children),t.flags|=4096,t)}function Ug(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sd(e.return,t,n)}function Qc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ot(e,t,r.children,n),r=we.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&&Ug(e,n,t);else if(e.tag===19)Ug(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(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,s);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function UC(e,t,n){switch(t.tag){case 3:Mx(t),Ds();break;case 5:ax(t);break;case 1:Tt(t.type)&&Xl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(de(we,we.current&1),e=er(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return er(e,t,n)}var Fx,hd,Lx,Ix;Fx=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}};hd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Df(e,i),r=Df(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=If(e,i),r=If(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}Vf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Lo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Lo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function ao(e,t){if(!ve)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 Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function HC(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Tt(t.type)&&Yl(),Ze(t),null;case 3:return r=t.stateNode,Ls(),ge(St),ge(rt),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fn!==null&&(bd(fn),fn=null))),hd(e,t),Ze(t),null;case 5:np(t);var i=li(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Ze(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[qo]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Zm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":eg(r,s),pe("invalid",r)}Vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Lo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Jm(r,s,!0);break;case"textarea":Ha(r),tg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[qo]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Bf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Zm(e,r),i=Df(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":eg(e,r),i=If(e,r),pe("invalid",e);break;default:i=r}Vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Io(e,l):typeof l=="number"&&Io(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Lo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Mh(e,s,l,o))}switch(n){case"input":Ha(e),Jm(e,r,!1);break;case"textarea":Ha(e),tg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?hs(e,!!r.multiple,s,!1):r.defaultValue!=null&&hs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}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 Ze(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Qo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Nt,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Ze(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Ot!==null&&t.mode&1&&!(t.flags&128))nx(),Ds(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Ds(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else fn!==null&&(bd(fn),fn=null),s=!0;if(!s)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||we.current&1?Fe===0&&(Fe=3):mp())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ls(),hd(e,t),e===null&&Wo(t.stateNode.containerInfo),Ze(t),null;case 10:return Zh(t.type._context),Ze(t),null;case 17:return Tt(t.type)&&Yl(),Ze(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ao(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,ao(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>$s&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ao(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Ze(t),null}else 2*Ae()-s.renderingStartTime>$s&&n!==1073741824&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return pp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function WC(e,t){switch(Gh(t),t.tag){case 1:return Tt(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ls(),ge(St),ge(rt),rp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return np(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Ls(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var nl=!1,tt=!1,KC=typeof WeakSet=="function"?WeakSet:Set,F=null;function ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function pd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Hg=!1;function qC(e,t){if(Xf=Kl,e=U1(),Kh(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(a=o),d===s&&++f===r&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:an(t.type,x),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Hg,Hg=!1,m}function _o(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&pd(t,n,s)}i=i.next}while(i!==r)}}function Du(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 md(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[qo],delete t[td],delete t[AC],delete t[RC])),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 Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Wg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(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 gd(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=Ql));else if(r!==4&&(e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}function yd(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(yd(e,t,n),e=e.sibling;e!==null;)yd(e,t,n),e=e.sibling}var Ke=null,un=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:tt||ss(n,t);case 6:var r=Ke,i=un;Ke=null,ar(e,t,n),Ke=r,un=i,Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?zc(e.parentNode,n):e.nodeType===1&&zc(e,n),zo(e)):zc(Ke,n.stateNode));break;case 4:r=Ke,i=un,Ke=n.stateNode.containerInfo,un=!0,ar(e,t,n),Ke=r,un=i;break;case 0:case 11:case 14:case 15:if(!tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&pd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!tt&&(ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,ar(e,t,n),tt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Kg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KC),t.forEach(function(r){var i=nk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ke=a.stateNode,un=!1;break e;case 3:Ke=a.stateNode.containerInfo,un=!0;break e;case 4:Ke=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Ke===null)throw Error(A(160));Bx(s,o,i),Ke=null,un=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ke(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rn(t,e),vn(e),r&4){try{_o(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{_o(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return);break;case 5:if(rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return),e.flags&32){var i=e.stateNode;try{Io(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Bf(a,o);var c=Bf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],u=l[o+1];f==="style"?m1(i,u):f==="dangerouslySetInnerHTML"?h1(i,u):f==="children"?Io(i,u):Mh(i,f,u,c)}switch(a){case"input":Ff(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?hs(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?hs(i,!!s.multiple,s.defaultValue,!0):hs(i,!!s.multiple,s.multiple?[]:"",!1))}i[qo]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(rn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(rn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:rn(t,e),vn(e);break;case 13:rn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dp=Ae())),r&4&&Kg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||f,rn(t,e),tt=c):rn(t,e),vn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(u=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:_o(4,d,d.return);break;case 1:ss(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:ss(d,d.return);break;case 22:if(d.memoizedState!==null){Gg(u);continue}}h!==null?(h.return=d,F=h):Gg(u)}f=f.sibling}e:for(f=null,u=e;;){if(u.tag===5){if(f===null){f=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(u.tag===6){if(f===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){ke(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:rn(t,e),vn(e),r&4&&Kg(e);break;case 21:break;default:rn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Io(i,""),r.flags&=-33);var s=Wg(e);yd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Wg(e);gd(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function GC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||tt;a=nl;var c=tt;if(nl=o,(tt=l)&&!c)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Qg(i):l!==null?(l.return=o,F=l):Qg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,tt=c}qg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):qg(e)}}function qg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:an(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Og(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Og(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var u=f.dehydrated;u!==null&&zo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}tt||t.flags&512&&md(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Qg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{md(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{md(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var QC=Math.ceil,ou=nr.ReactCurrentDispatcher,cp=nr.ReactCurrentOwner,Yt=nr.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,Ge=0,Rt=0,os=Kr(0),Fe=0,Jo=null,Pi=0,Fu=0,fp=0,Po=null,xt=null,dp=0,$s=1/0,Bn=null,au=!1,vd=null,Mr=null,rl=!1,Cr=null,lu=0,Ao=0,xd=null,kl=-1,_l=0;function ut(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Nr(e){return e.mode&1?se&2&&Ge!==0?Ge&-Ge:jC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:N1(e.type)),e):1}function pn(e,t,n,r){if(50<Ao)throw Ao=0,xd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(Fu|=n),Fe===4&&pr(e,Ge)),Et(e,r),n===1&&se===0&&!(t.mode&1)&&($s=Ae()+500,ju&&qr()))}function Et(e,t){var n=e.callbackNode;jE(e,t);var r=Wl(e,e===Ue?Ge:0);if(r===0)n!==null&&ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ig(n),t===1)e.tag===0?OC(Yg.bind(null,e)):J1(Yg.bind(null,e)),_C(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Ih;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var r=Wl(e,e===Ue?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(Ue!==e||Ge!==t)&&(Bn=null,$s=Ae()+500,wi(e,t));do try{ZC();break}catch(a){Wx(e,a)}while(!0);Xh(),ou.current=s,se=i,Oe!==null?t=0:(Ue=null,Ge=0,t=Fe)}if(t!==0){if(t===2&&(i=Kf(e),i!==0&&(r=i,t=wd(e,i))),t===1)throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!YC(i)&&(t=uu(e,r),t===2&&(s=Kf(e),s!==0&&(r=s,t=wd(e,s))),t===1))throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,xt,Bn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=dp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),t);break}ti(e,xt,Bn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-hn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QC(r/1960))-r,10<r){e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),r);break}ti(e,xt,Bn);break;case 5:ti(e,xt,Bn);break;default:throw Error(A(329))}}}return Et(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function wd(e,t){var n=Po;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=xt,xt=n,t!==null&&bd(t)),e}function bd(e){xt===null?xt=e:xt.push.apply(xt,e)}function YC(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!mn(s(),i))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 pr(e,t){for(t&=~fp,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hn(t),r=1<<n;e[n]=-1,t&=~r}}function Yg(e){if(se&6)throw Error(A(327));vs();var t=Wl(e,0);if(!(t&1))return Et(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Kf(e);r!==0&&(t=r,n=wd(e,r))}if(n===1)throw n=Jo,wi(e,0),pr(e,t),Et(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,xt,Bn),Et(e,Ae()),null}function hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&($s=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&vs();var t=se;se|=1;var n=Yt.transition,r=le;try{if(Yt.transition=null,le=1,e)return e()}finally{le=r,Yt.transition=n,se=t,!(se&6)&&qr()}}function pp(){Rt=os.current,ge(os)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Ls(),ge(St),ge(rt),rp();break;case 5:np(r);break;case 4:Ls();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Zh(r.type._context);break;case 22:case 23:pp()}n=n.return}if(Ue=e,Oe=e=Dr(e.current,null),Ge=Rt=t,Fe=0,Jo=null,fp=Fu=Pi=0,xt=Po=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=Oe;try{if(Xh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Be=Ne=Se=null,ko=!1,Yo=0,cp.current=null,n===null||n.return===null){Fe=1,Jo=t,Oe=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,u=f.tag;if(!(f.mode&1)&&(u===0||u===11||u===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Lg(o);if(h!==null){h.flags&=-257,Ig(h,o,a,s,t),h.mode&1&&Fg(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Fg(s,c,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var w=Lg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ig(w,o,a,s,t),Qh(Is(l,a));break e}}s=l=Is(l,a),Fe!==4&&(Fe=2),Po===null?Po=[s]:Po.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Rg(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Mr===null||!Mr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Rg(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function mp(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Ue===null||!(Pi&268435455)&&!(Fu&268435455)||pr(Ue,Ge)}function uu(e,t){var n=se;se|=2;var r=Kx();(Ue!==e||Ge!==t)&&(Bn=null,wi(e,t));do try{XC();break}catch(i){Wx(e,i)}while(!0);if(Xh(),se=n,ou.current=r,Oe!==null)throw Error(A(261));return Ue=null,Ge=0,Fe}function XC(){for(;Oe!==null;)qx(Oe)}function ZC(){for(;Oe!==null&&!TE();)qx(Oe)}function qx(e){var t=Yx(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?Gx(e):Oe=t,cp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=WC(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Oe=null;return}}else if(n=HC(n,t,Rt),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Fe===0&&(Fe=5)}function ti(e,t,n){var r=le,i=Yt.transition;try{Yt.transition=null,le=1,JC(e,t,n,r)}finally{Yt.transition=i,le=r}return null}function JC(e,t,n,r){do vs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===Ue&&(Oe=Ue=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Yt.transition,Yt.transition=null;var o=le;le=1;var a=se;se|=4,cp.current=null,qC(e,n),zx(n,e),xC(Zf),Kl=!!Xf,Zf=Xf=null,e.current=n,GC(n),EE(),se=a,le=o,Yt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Mr=null),_E(n.stateNode),Et(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=vd,vd=null,e;return lu&1&&e.tag!==0&&vs(),s=e.pendingLanes,s&1?e===xd?Ao++:(Ao=0,xd=e):Ao=0,qr(),null}function vs(){if(Cr!==null){var e=P1(lu),t=Yt.transition,n=le;try{if(Yt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:_o(8,f,s)}var u=f.child;if(u!==null)u.return=f,F=u;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===c){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:_o(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Yt.transition=t}}return!1}function Xg(e,t,n){t=Is(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ut(),e!==null&&(wa(e,1,t),Et(e,t))}function ke(e,t,n){if(e.tag===3)Xg(e,e,n);else for(;t!==null;){if(t.tag===3){Xg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mr===null||!Mr.has(r))){e=Is(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ut(),t!==null&&(wa(t,1,e),Et(t,e));break}}t=t.return}}function ek(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Ge&n)===n&&(Fe===4||Fe===3&&(Ge&130023424)===Ge&&500>Ae()-dp?wi(e,0):fp|=n),Et(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ut();e=Jn(e,t),e!==null&&(wa(e,t,n),Et(e,n))}function tk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function nk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bt=!1,UC(e,t,n);bt=!!(e.flags&131072)}else bt=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ns(t,rt.current);ys(t,n),i=sp(null,t,r,e,i,n);var s=op();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tt(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Nu,t.stateNode=i,i._reactInternals=t,ad(t,r,e,n),t=cd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ik(r),e=an(r,e),i){case 0:t=ud(null,t,r,e,n);break e;case 1:t=Bg(null,t,r,e,n);break e;case 11:t=$g(null,t,r,e,n);break e;case 14:t=Vg(null,t,r,an(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),ud(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Bg(e,t,r,i,n);case 3:e:{if(Mx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Is(Error(A(423)),t),t=zg(e,t,r,n,i);break e}else if(r!==i){i=Is(Error(A(424)),t),t=zg(e,t,r,n,i);break e}else for(Ot=Or(t.stateNode.containerInfo.firstChild),Nt=t,ve=!0,fn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ds(),r===i){t=er(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&id(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Jf(r,i)?o=null:s!==null&&Jf(r,s)&&(t.flags|=32),jx(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&id(t),null;case 13:return Nx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fs(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),$g(e,t,r,i,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(mn(s.value,o)){if(s.children===i.children&&!St.current){t=er(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),sd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),sd(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ys(t,n),i=Zt(i),r=r(i),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,i=an(r,t.pendingProps),i=an(r.type,i),Vg(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Cl(e,t),t.tag=1,Tt(r)?(e=!0,Xl(t)):e=!1,ys(t,n),_x(t,r,i),ad(t,r,i,n),cd(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function rk(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 Qt(e,t,n,r){return new rk(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ik(e){if(typeof e=="function")return gp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Fh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Qt(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 Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")gp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yi:return bi(n.children,i,s,t);case Nh:o=8,i|=8;break;case Of:return e=Qt(12,n,t,i|2),e.elementType=Of,e.lanes=s,e;case jf:return e=Qt(13,n,t,i),e.elementType=jf,e.lanes=s,e;case Mf:return e=Qt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Dh:o=11;break e;case Fh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Qt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Qt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Qt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Yc(e,t,n){return e=Qt(6,e,null,t),e.lanes=n,e}function Xc(e,t,n){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sk(e,t,n,r,i){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=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yp(e,t,n,r,i,s,o,a,l){return e=new sk(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ep(s),e}function ok(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Ni(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Tt(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ut(),i=Nr(n),s=Gn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Et(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ut(),o=Nr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=Gn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(pn(e,i,o,s),Sl(e,i,o)),o}function cu(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 Zg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vp(e,t){Zg(e,t),(e=e.alternate)&&Zg(e,t)}function ak(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}$u.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Zn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&M1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jg(){}function lk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=cu(o);s.call(c)}}var o=Jx(t,r,e,0,null,!1,!1,"",Jg);return e._reactRootContainer=o,e[Zn]=o.current,Wo(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=cu(l);a.call(c)}}var l=yp(e,0,!1,null,null,!1,!1,"",Jg);return e._reactRootContainer=l,e[Zn]=l.current,Wo(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=lk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mo(t.pendingLanes);n!==0&&($h(t,n|1),Et(t,Ae()),!(se&6)&&($s=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Jn(e,1);if(r!==null){var i=ut();pn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Jn(e,134217728);if(t!==null){var n=ut();pn(t,e,134217728,n)}vp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Nr(e),n=Jn(e,t);if(n!==null){var r=ut();pn(n,e,t,r)}vp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Uf=function(e,t,n){switch(t){case"input":if(Ff(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 i=Ou(r);if(!i)throw Error(A(90));u1(r),Ff(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&hs(e,!!n.multiple,t,!1)}};v1=hp;x1=Ai;var uk={usingClientEntryPoint:!1,Events:[Sa,es,Ou,g1,y1,hp]},lo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ck={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||ak,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 il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(ck),_n=il}catch{}}Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return ok(e,t,null,n)};Ft.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=yp(e,1,!1,null,null,n,!1,r,i),e[Zn]=t.current,Wo(e.nodeType===8?e.parentNode:e),new xp(t)};Ft.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(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};Ft.flushSync=function(e){return Ai(e)};Ft.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};Ft.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Zn]=t.current,Wo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};Ft.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};Ft.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Ft.unstable_batchedUpdates=hp;Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};Ft.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=Ft;var nw=t1.exports;const fk=Hs(nw);var rw,e0=nw;rw=e0.createRoot,e0.hydrateRoot;const dk="@alfatech/livechat",hk="v2025.05.08.1",pk="module",mk="https://api-live.alfatek.dev",gk="wss://api-live.alfatek.dev",yk=["dist","README.md"],vk="dist/widget.js",xk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},wk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},bk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:dk,private:!1,version:hk,type:pk,apiURL:mk,wsURL:gk,files:yk,main:vk,scripts:xk,dependencies:wk,devDependencies:bk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Sk=iw.apiURL,Tk=iw.wsURL,Ek=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],Ck=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],kk={429:Ek,404:Ck};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Sk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=kk[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const bp=e=>[200,201,204].includes(e);var Gs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Wt(){}function _k(e,t){return typeof e=="function"?e(t):e}function Sd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xs(e,t){return typeof e=="function"?e(t):e}function dn(e,t){return typeof e=="function"?e(t):e}function t0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sp(o,t.options))return!1}else if(!ea(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function n0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Td(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ea(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=r0(e)&&r0(t);if(n||Td(e)&&Td(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const f=n?c:s[c];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function r0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Td(e){if(!i0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!i0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function i0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pk(e){return new Promise(t=>{setTimeout(t,e)})}function Ed(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Ak(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,ws,Nv,Ok=(Nv=class extends Gs{constructor(){super();H(this,hi);H(this,mr);H(this,ws);D(this,ws,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,ws,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,ws=new WeakMap,Nv),Ep=new Ok,bs,gr,Ss,Dv,jk=(Dv=class extends Gs{constructor(){super();H(this,bs,!0);H(this,gr);H(this,Ss);D(this,Ss,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ss,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,bs)!==t&&(D(this,bs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,bs)}},bs=new WeakMap,gr=new WeakMap,Ss=new WeakMap,Dv),du=new jk;function Cd(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Cd(),o=x=>{var w;r||(d(new uw(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Ep.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=p=>{(r||c())&&x(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(u).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Pk(E).then(()=>c()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Nk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var De=Nk(),pi,Fv,fw=(Fv=class{constructor(){H(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Ts,Es,Ht,Je,ma,mi,ln,Vn,Lv,Dk=(Lv=class extends fw{constructor(t){super();H(this,ln);H(this,Ts);H(this,Es);H(this,Ht);H(this,Je);H(this,ma);H(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Ht,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Ts,Fk(this.options)),this.state=t.state??T(this,Ts),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Ht).remove(this)}setData(t,n){const r=Ed(this.state.data,t,this.options);return X(this,ln,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,ln,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Je))==null?void 0:r.promise;return(i=T(this,Je))==null||i.cancel(t),n?n.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ts))}isActive(){return this.observers.some(t=>dn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Je)&&(T(this,mi)?T(this,Je).cancel({revert:!0}):T(this,Je).cancelRetry()),this.scheduleGc()),T(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,ln,Vn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Je))return T(this,Je).continueRetry(),T(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const u=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(u,d,this):u(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&X(this,ln,Vn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=u=>{var d,h,m,x;Zc(u)&&u.silent||X(this,ln,Vn).call(this,{type:"error",error:u}),Zc(u)||((h=(d=T(this,Ht).config).onError)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,this.state.data,u,this)),this.scheduleGc()};return D(this,Je,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,h,m,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(d=T(this,Ht).config).onSuccess)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{X(this,ln,Vn).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{X(this,ln,Vn).call(this,{type:"pause"})},onContinue:()=>{X(this,ln,Vn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Je).start()}},Ts=new WeakMap,Es=new WeakMap,Ht=new WeakMap,Je=new WeakMap,ma=new WeakMap,mi=new WeakMap,ln=new WeakSet,Vn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Zc(i)&&i.revert&&T(this,Es)?{...T(this,Es),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Ht).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Iv,Lk=(Iv=class extends Gs{constructor(t={}){super();H(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Sp(i,n);let o=this.get(s);return o||(o=new Dk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>t0(t,r)):n}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){De.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,it,gi,En,lr,$v,Ik=($v=class extends fw{constructor(t){super();H(this,En);H(this,Tn);H(this,it);H(this,gi);this.mutationId=t.mutationId,D(this,it,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,it).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,f,u,d,h,m,x,w,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,it).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((c=(l=T(this,it).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,P,t,this.state.context)),await((h=(d=T(this,it).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(w=T(this,it).config).onError)==null?void 0:p.call(w,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,it).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,it).runNext(this)}}},Tn=new WeakMap,it=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),De.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,it).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var At,ga,Vv,$k=(Vv=class extends Gs{constructor(t={}){super();H(this,At);H(this,ga);this.config=t,D(this,At,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new Ik({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,At).get(n)??[];r.push(t),T(this,At).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,At).has(n)){const i=(r=T(this,At).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,At).delete(n):T(this,At).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,At).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n0(n,r))}findAll(t={}){return this.getAll().filter(n=>n0(t,n))}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return De.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wt))))}},At=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function s0(e){return{onFetch:(t,n)=>{var f,u,d,h,m;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};w(C);const k=await p(C),{maxPages:P}=t.options,j=S?Rk:Ak;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Vk:o0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:o0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function o0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,Cs,ks,xr,_s,Ps,Bv,Bk=(Bv=class{constructor(e={}){H(this,Ee);H(this,yr);H(this,vr);H(this,Cs);H(this,ks);H(this,xr);H(this,_s);H(this,Ps);D(this,Ee,e.queryCache||new Lk),D(this,yr,e.mutationCache||new $k),D(this,vr,e.defaultOptions||{}),D(this,Cs,new Map),D(this,ks,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,_s,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Ps,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,_s))==null||e.call(this),D(this,_s,void 0),(t=T(this,Ps))==null||t.call(this),D(this,Ps,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(xs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=_k(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return De.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);De.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return De.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=De.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return De.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=De.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Wt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=s0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=s0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,Cs).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Cs).values()],n={};return t.forEach(r=>{ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,ks).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ks).values()];let n={};return t.forEach(r=>{ea(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Tp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,Cs=new WeakMap,ks=new WeakMap,xr=new WeakMap,_s=new WeakMap,Ps=new WeakMap,Bv),gt,ee,ya,st,yi,As,wr,Cn,va,Rs,Os,vi,xi,br,js,ae,yo,kd,_d,Pd,Ad,Rd,Od,jd,pw,zv,zk=(zv=class extends Gs{constructor(t,n){super();H(this,ae);H(this,gt);H(this,ee);H(this,ya);H(this,st);H(this,yi);H(this,As);H(this,wr);H(this,Cn);H(this,va);H(this,Rs);H(this,Os);H(this,vi);H(this,xi);H(this,br);H(this,js,new Set);this.options=n,D(this,gt,t),D(this,Cn,null),D(this,wr,Cd()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),a0(T(this,ee),this.options)?X(this,ae,yo).call(this):this.updateResult(),X(this,ae,Ad).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Md(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Md(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Rd).call(this),X(this,ae,Od).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,gt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,jd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,gt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&l0(T(this,ee),i,this.options,r)&&X(this,ae,yo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||xs(this.options.staleTime,T(this,ee))!==xs(r.staleTime,T(this,ee)))&&X(this,ae,kd).call(this);const o=X(this,ae,_d).call(this);s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,Pd).call(this,o)}getOptimisticResult(t){const n=T(this,gt).getQueryCache().build(T(this,gt),t),r=this.createResult(n,t);return Hk(this,r)&&(D(this,st,r),D(this,As,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,st)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,js).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,gt).defaultQueryOptions(t),r=T(this,gt).getQueryCache().build(T(this,gt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,yo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,st)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,st),o=T(this,yi),a=T(this,As),c=t!==r?t.state:T(this,ya),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),M=!j&&a0(t,n),I=j&&l0(t,r,n,i);(M||I)&&(u={...u,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Rs);else try{D(this,va,n.select),h=n.select(u.data),h=Ed(s==null?void 0:s.data,h,n),D(this,Rs,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,Os))==null?void 0:P.state.data,T(this,Os)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(M){D(this,Cn,M)}j!==void 0&&(w="success",h=Ed(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Rs),x=Date.now(),w="error");const p=u.fetchStatus==="fetching",g=w==="pending",v=w==="error",E=g&&p,S=h!==void 0,k={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Cp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},M=()=>{const re=D(this,wr,k.promise=Cd());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&M();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&M();break}}return k}updateResult(t){const n=T(this,st),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,As,this.options),T(this,yi).data!==void 0&&D(this,Os,T(this,ee)),fu(r,n))return;D(this,st,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,js).size)return!0;const l=new Set(a??T(this,js));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,st)).some(c=>{const f=c;return T(this,st)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Ad).call(this)}},gt=new WeakMap,ee=new WeakMap,ya=new WeakMap,st=new WeakMap,yi=new WeakMap,As=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Rs=new WeakMap,Os=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,js=new WeakMap,ae=new WeakSet,yo=function(t){X(this,ae,jd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wt)),n},kd=function(){X(this,ae,Rd).call(this);const t=xs(this.options.staleTime,T(this,ee));if(Ri||T(this,st).isStale||!Sd(t))return;const r=sw(T(this,st).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,st).isStale||this.updateResult()},r))},_d=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Pd=function(t){X(this,ae,Od).call(this),D(this,br,t),!(Ri||dn(this.options.enabled,T(this,ee))===!1||!Sd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,yo).call(this)},T(this,br)))},Ad=function(){X(this,ae,kd).call(this),X(this,ae,Pd).call(this,X(this,ae,_d).call(this))},Rd=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Od=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},jd=function(){const t=T(this,gt).getQueryCache().build(T(this,gt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){De.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,st))}),T(this,gt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Uk(e,t){return dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function a0(e,t){return Uk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(dn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function l0(e,t,n,r){return(e!==t||dn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return dn(t.enabled,e)!==!1&&e.isStaleByTime(xs(t.staleTime,e))}function Hk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,yt,Hn,Yn,Al,Nd,Uv,Wk=(Uv=class extends Gs{constructor(t,n){super();H(this,Yn);H(this,Sr);H(this,Tr);H(this,yt);H(this,Hn);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Yn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,yt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,yt))==null?void 0:r.state.status)==="pending"&&T(this,yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,yt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,yt))==null||t.removeObserver(this),D(this,yt,void 0),X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this)}mutate(t,n){var r;return D(this,Hn,n),(r=T(this,yt))==null||r.removeObserver(this),D(this,yt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,yt).addObserver(this),T(this,yt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,yt=new WeakMap,Hn=new WeakMap,Yn=new WeakSet,Al=function(){var n;const t=((n=T(this,yt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){De.batch(()=>{var n,r,i,s,o,a,l,c;if(T(this,Hn)&&this.hasListeners()){const f=T(this,Tr).variables,u=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Hn)).onSuccess)==null||r.call(n,t.data,f,u),(s=(i=T(this,Hn)).onSettled)==null||s.call(i,t.data,null,f,u)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Hn)).onError)==null||a.call(o,t.error,f,u),(c=(l=T(this,Hn)).onSettled)==null||c.call(l,void 0,t.error,f,u))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Kk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),qk=()=>y.useContext(yw);yw.Provider;function Gk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qk=y.createContext(Gk()),Yk=()=>y.useContext(Qk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Dd(){}var Xk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Zk=e=>{y.useEffect(()=>{e.clearReset()},[e])},Jk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),e_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},t_=(e,t)=>e.isLoading&&e.isFetching&&!t,n_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,u0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function r_(e,t,n){var f,u,d,h,m;const r=gw(),i=qk(),s=Yk(),o=r.defaultQueryOptions(e);(u=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",e_(o),Xk(o,s),Zk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const w=i?Dd:l.subscribe(De.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),n_(o,c))throw u0(o,l,s);if(Jk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.experimental_prefetchInRender&&!Ri&&t_(c,i)){const x=a?u0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Dd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function i_(e,t){return r_(e,zk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Wk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(De.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Dd)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const s_=e=>i_({queryKey:["widgets",e],queryFn:()=>o_(e)}),o_=e=>Ea(`widgets/with-link/${e}`);var B=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(B||{});function a_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function qc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ad(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,yd=r),ad(e,t)},n}function Ax(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ad(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ad(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Dg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=tk.bind(null,e,t,n),t.then(e,e))}function Fg(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 Lg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=qn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var zC=tr.ReactCurrentOwner,St=!1;function lt(e,t,n,r){t.child=e===null?ix(t,null,n,r):Ls(t,e.child,n,r)}function Ig(e,t,n,r,i){n=n.render;var s=t.ref;return vs(t,i),r=rp(e,t,n,r,s,i),n=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&n&&Wh(t),t.flags|=1,lt(e,t,r,i),t.child)}function $g(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!pp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Wo,n(o,r)&&e.ref===t.ref)return Jn(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Wo(s,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Jn(e,t,i)}return ld(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(as,jt),jt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(as,jt),jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(as,jt),jt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(as,jt),jt|=r;return lt(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ld(e,t,n,r,i){var s=Et(n)?Ci:st.current;return s=Ds(t,s),vs(t,i),n=rp(e,t,n,r,s,i),r=ip(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Jn(e,t,i)):(ve&&r&&Wh(t),t.flags|=1,lt(e,t,n,i),t.child)}function Vg(e,t,n,r,i){if(Et(n)){var s=!0;Xl(t)}else s=!1;if(vs(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),od(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Et(n)?Ci:st.current,u=Ds(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Mg(t,o,r,u),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Tt.current||fr?(typeof f=="function"&&(sd(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ln(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jt(l):(l=Et(n)?Ci:st.current,l=Ds(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==c||d!==l)&&Mg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==c||d!==m||Tt.current||fr?(typeof h=="function"&&(sd(t,n,h,r),m=t.memoizedState),(u=fr||Ng(t,n,u,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ud(e,t,n,r,s,i)}function ud(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Cg(t,n,!1),Jn(e,t,s);r=t.stateNode,zC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ls(t,e.child,null,s),t.child=Ls(t,null,a,s)):lt(e,t,a,s),t.memoizedState=r.state,i&&Cg(t,n,!0),t.child}function Nx(e){var t=e.stateNode;t.pendingContext?Eg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Eg(e,t.context,!1),Jh(e,t.containerInfo)}function Bg(e,t,n,r,i){return Fs(),qh(i),t.flags|=256,lt(e,t,n,r),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0};function fd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return rd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=fd(n),t.memoizedState=cd,e):ap(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return UC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?fd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=cd,r}return s=e.child,e=s.sibling,r=Dr(s,{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 ap(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&qh(r),Ls(t,e.child,null,n),e=ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=qc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ls(t,e.child,null,o),t.child.memoizedState=fd(o),t.memoizedState=cd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=qc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,St||a){if(r=He,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Zn(e,i),mn(r,e,i,-1))}return hp(),r=qc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Nt=Or(i.nextSibling),Ft=t,ve=!0,dn=null,e!==null&&(qt[Gt++]=Hn,qt[Gt++]=Wn,qt[Gt++]=ki,Hn=e.id,Wn=e.overflow,ki=t),t=ap(t,r.children),t.flags|=4096,t)}function zg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),id(e.return,t,n)}function Gc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(lt(e,t,r.children,n),r=we.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&&zg(e,n,t);else if(e.tag===19)zg(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(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gc(t,!0,n,null,s);break;case"together":Gc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HC(e,t,n){switch(t.tag){case 3:Nx(t),Fs();break;case 5:ax(t);break;case 1:Et(t.type)&&Xl(t);break;case 4:Jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Mx(e,t,n):(de(we,we.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return Jn(e,t,n)}var Fx,dd,Lx,Ix;Fx=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}};dd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Mf(e,i),r=Mf(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=Lf(e,i),r=Lf(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}$f(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Io.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Io.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function lo(e,t){if(!ve)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 Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WC(e,t,n){var r=t.pendingProps;switch(Kh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Et(t.type)&&Yl(),Je(t),null;case 3:return r=t.stateNode,Is(),ge(Tt),ge(st),tp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,dn!==null&&(wd(dn),dn=null))),dd(e,t),Je(t),null;case 5:ep(t);var i=li(Yo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Je(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Go]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Xm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":Jm(r,s),pe("invalid",r)}$f(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Io.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Zm(r,s,!0);break;case"textarea":Ha(r),eg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Go]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Vf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<yo.length;i++)pe(yo[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Xm(e,r),i=Mf(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Jm(e,r),i=Lf(e,r),pe("invalid",e);break;default:i=r}$f(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$o(e,l):typeof l=="number"&&$o(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Io.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Oh(e,s,l,o))}switch(n){case"input":Ha(e),Zm(e,r,!1);break;case"textarea":Ha(e),eg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ps(e,!!r.multiple,s,!1):r.defaultValue!=null&&ps(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}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 Je(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Yo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Ft,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Je(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Nt!==null&&t.mode&1&&!(t.flags&128))nx(),Fs(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else dn!==null&&(wd(dn),dn=null),s=!0;if(!s)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||we.current&1?Ie===0&&(Ie=3):hp())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Is(),dd(e,t),e===null&&Ko(t.stateNode.containerInfo),Je(t),null;case 10:return Yh(t.type._context),Je(t),null;case 17:return Et(t.type)&&Yl(),Je(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)lo(s,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,lo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Vs&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Je(t),null}else 2*Ae()-s.renderingStartTime>Vs&&n!==1073741824&&(t.flags|=128,r=!0,lo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return dp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?jt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function KC(e,t){switch(Kh(t),t.tag){case 1:return Et(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Is(),ge(Tt),ge(st),tp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ep(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Is(),null;case 10:return Yh(t.type._context),null;case 22:case 23:return dp(),null;case 24:return null;default:return null}}var nl=!1,rt=!1,qC=typeof WeakSet=="function"?WeakSet:Set,F=null;function os(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function hd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Ug=!1;function GC(e,t){if(Yf=Kl,e=U1(),Hh(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,b=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:ln(t.type,x),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Ug,Ug=!1,m}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&hd(t,n,s)}i=i.next}while(i!==r)}}function Du(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 pd(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Go],delete t[ed],delete t[RC],delete t[OC])),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 Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Hg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(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 md(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=Ql));else if(r!==4&&(e=e.child,e!==null))for(md(e,t,n),e=e.sibling;e!==null;)md(e,t,n),e=e.sibling}function gd(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(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}var qe=null,cn=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:rt||os(n,t);case 6:var r=qe,i=cn;qe=null,ar(e,t,n),qe=r,cn=i,qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(cn?(e=qe,n=n.stateNode,e.nodeType===8?Bc(e.parentNode,n):e.nodeType===1&&Bc(e,n),Uo(e)):Bc(qe,n.stateNode));break;case 4:r=qe,i=cn,qe=n.stateNode.containerInfo,cn=!0,ar(e,t,n),qe=r,cn=i;break;case 0:case 11:case 14:case 15:if(!rt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&hd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!rt&&(os(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(rt=(r=rt)||n.memoizedState!==null,ar(e,t,n),rt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Wg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qC),t.forEach(function(r){var i=rk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,cn=!1;break e;case 3:qe=a.stateNode.containerInfo,cn=!0;break e;case 4:qe=a.stateNode.containerInfo,cn=!0;break e}a=a.return}if(qe===null)throw Error(A(160));Bx(s,o,i),qe=null,cn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ke(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),r&4){try{Po(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{Po(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return);break;case 5:if(sn(t,e),vn(e),r&512&&n!==null&&os(n,n.return),e.flags&32){var i=e.stateNode;try{$o(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Vf(a,o);var u=Vf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f==="style"?m1(i,c):f==="dangerouslySetInnerHTML"?h1(i,c):f==="children"?$o(i,c):Oh(i,f,c,u)}switch(a){case"input":Df(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?ps(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?ps(i,!!s.multiple,s.defaultValue,!0):ps(i,!!s.multiple,s.multiple?[]:"",!1))}i[Go]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(sn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(sn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Uo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(cp=Ae())),r&4&&Wg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(rt=(u=rt)||f,sn(t,e),rt=u):sn(t,e),vn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:os(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:os(d,d.return);break;case 22:if(d.memoizedState!==null){qg(c);continue}}h!==null?(h.return=d,F=h):qg(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){ke(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:sn(t,e),vn(e),r&4&&Wg(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&($o(i,""),r.flags&=-33);var s=Hg(e);gd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hg(e);md(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||rt;a=nl;var u=rt;if(nl=o,(rt=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Gg(i):l!==null?(l.return=o,F=l):Gg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,rt=u}Kg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):Kg(e)}}function Kg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!rt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Rg(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Rg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Uo(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}rt||t.flags&512&&pd(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function qg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{pd(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{pd(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var YC=Math.ceil,ou=tr.ReactCurrentDispatcher,lp=tr.ReactCurrentOwner,Xt=tr.ReactCurrentBatchConfig,se=0,He=null,je=null,Qe=0,jt=0,as=Kr(0),Ie=0,ea=null,Pi=0,Fu=0,up=0,Ao=null,wt=null,cp=0,Vs=1/0,Vn=null,au=!1,yd=null,Nr=null,rl=!1,Cr=null,lu=0,Ro=0,vd=null,kl=-1,_l=0;function ft(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Mr(e){return e.mode&1?se&2&&Qe!==0?Qe&-Qe:NC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:M1(e.type)),e):1}function mn(e,t,n,r){if(50<Ro)throw Ro=0,vd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==He)&&(e===He&&(!(se&2)&&(Fu|=n),Ie===4&&pr(e,Qe)),Ct(e,r),n===1&&se===0&&!(t.mode&1)&&(Vs=Ae()+500,ju&&qr()))}function Ct(e,t){var n=e.callbackNode;NE(e,t);var r=Wl(e,e===He?Qe:0);if(r===0)n!==null&&rg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&rg(n),t===1)e.tag===0?jC(Qg.bind(null,e)):J1(Qg.bind(null,e)),PC(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Fh;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=Wl(e,e===He?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(He!==e||Qe!==t)&&(Vn=null,Vs=Ae()+500,wi(e,t));do try{JC();break}catch(a){Wx(e,a)}while(!0);Qh(),ou.current=s,se=i,je!==null?t=0:(He=null,Qe=0,t=Ie)}if(t!==0){if(t===2&&(i=Wf(e),i!==0&&(r=i,t=xd(e,i))),t===1)throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!XC(i)&&(t=uu(e,r),t===2&&(s=Wf(e),s!==0&&(r=s,t=xd(e,s))),t===1))throw n=ea,wi(e,0),pr(e,r),Ct(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,wt,Vn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=cp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ft(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),t);break}ti(e,wt,Vn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-pn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YC(r/1960))-r,10<r){e.timeoutHandle=Jf(ti.bind(null,e,wt,Vn),r);break}ti(e,wt,Vn);break;case 5:ti(e,wt,Vn);break;default:throw Error(A(329))}}}return Ct(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function xd(e,t){var n=Ao;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=wt,wt=n,t!==null&&wd(t)),e}function wd(e){wt===null?wt=e:wt.push.apply(wt,e)}function XC(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!gn(s(),i))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 pr(e,t){for(t&=~up,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Qg(e){if(se&6)throw Error(A(327));xs();var t=Wl(e,0);if(!(t&1))return Ct(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Wf(e);r!==0&&(t=r,n=xd(e,r))}if(n===1)throw n=ea,wi(e,0),pr(e,t),Ct(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,wt,Vn),Ct(e,Ae()),null}function fp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Vs=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&xs();var t=se;se|=1;var n=Xt.transition,r=le;try{if(Xt.transition=null,le=1,e)return e()}finally{le=r,Xt.transition=n,se=t,!(se&6)&&qr()}}function dp(){jt=as.current,ge(as)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_C(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Kh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Is(),ge(Tt),ge(st),tp();break;case 5:ep(r);break;case 4:Is();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Yh(r.type._context);break;case 22:case 23:dp()}n=n.return}if(He=e,je=e=Dr(e.current,null),Qe=jt=t,Ie=0,ea=null,up=Fu=Pi=0,wt=Ao=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=je;try{if(Qh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Ue=Fe=Se=null,_o=!1,Xo=0,lp.current=null,n===null||n.return===null){Ie=1,ea=t,je=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Fg(o);if(h!==null){h.flags&=-257,Lg(h,o,a,s,t),h.mode&1&&Dg(s,u,t),t=h,l=u;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Dg(s,u,t),hp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var b=Fg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Lg(b,o,a,s,t),qh($s(l,a));break e}}s=l=$s(l,a),Ie!==4&&(Ie=2),Ao===null?Ao=[s]:Ao.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Ag(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Nr===null||!Nr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Ag(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function hp(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),He===null||!(Pi&268435455)&&!(Fu&268435455)||pr(He,Qe)}function uu(e,t){var n=se;se|=2;var r=Kx();(He!==e||Qe!==t)&&(Vn=null,wi(e,t));do try{ZC();break}catch(i){Wx(e,i)}while(!0);if(Qh(),se=n,ou.current=r,je!==null)throw Error(A(261));return He=null,Qe=0,Ie}function ZC(){for(;je!==null;)qx(je)}function JC(){for(;je!==null&&!EE();)qx(je)}function qx(e){var t=Yx(e.alternate,e,jt);e.memoizedProps=e.pendingProps,t===null?Gx(e):je=t,lp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KC(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,je=null;return}}else if(n=WC(n,t,jt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ie===0&&(Ie=5)}function ti(e,t,n){var r=le,i=Xt.transition;try{Xt.transition=null,le=1,ek(e,t,n,r)}finally{Xt.transition=i,le=r}return null}function ek(e,t,n,r){do xs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===He&&(je=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return xs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var o=le;le=1;var a=se;se|=4,lp.current=null,GC(e,n),zx(n,e),wC(Xf),Kl=!!Yf,Xf=Yf=null,e.current=n,QC(n),CE(),se=a,le=o,Xt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Nr=null),PE(n.stateNode),Ct(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=yd,yd=null,e;return lu&1&&e.tag!==0&&xs(),s=e.pendingLanes,s&1?e===vd?Ro++:(Ro=0,vd=e):Ro=0,qr(),null}function xs(){if(Cr!==null){var e=P1(lu),t=Xt.transition,n=le;try{if(Xt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Po(8,f,s)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===u){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Po(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Xt.transition=t}}return!1}function Yg(e,t,n){t=$s(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ft(),e!==null&&(wa(e,1,t),Ct(e,t))}function ke(e,t,n){if(e.tag===3)Yg(e,e,n);else for(;t!==null;){if(t.tag===3){Yg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=$s(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ft(),t!==null&&(wa(t,1,e),Ct(t,e));break}}t=t.return}}function tk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ft(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Ie===4||Ie===3&&(Qe&130023424)===Qe&&500>Ae()-cp?wi(e,0):up|=n),Ct(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ft();e=Zn(e,t),e!==null&&(wa(e,t,n),Ct(e,n))}function nk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function rk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,HC(e,t,n);St=!!(e.flags&131072)}else St=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ds(t,st.current);vs(t,n),i=rp(null,t,r,e,i,n);var s=ip();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zh(t),i.updater=Mu,t.stateNode=i,i._reactInternals=t,od(t,r,e,n),t=ud(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&Wh(t),lt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sk(r),e=ln(r,e),i){case 0:t=ld(null,t,r,e,n);break e;case 1:t=Vg(null,t,r,e,n);break e;case 11:t=Ig(null,t,r,e,n);break e;case 14:t=$g(null,t,r,ln(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ld(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Vg(e,t,r,i,n);case 3:e:{if(Nx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=$s(Error(A(423)),t),t=Bg(e,t,r,n,i);break e}else if(r!==i){i=$s(Error(A(424)),t),t=Bg(e,t,r,n,i);break e}else for(Nt=Or(t.stateNode.containerInfo.firstChild),Ft=t,ve=!0,dn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fs(),r===i){t=Jn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&rd(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Zf(r,i)?o=null:s!==null&&Zf(r,s)&&(t.flags|=32),jx(e,t),lt(e,t,o,n),t.child;case 6:return e===null&&rd(t),null;case 13:return Mx(e,t,n);case 4:return Jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ls(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Ig(e,t,r,i,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(gn(s.value,o)){if(s.children===i.children&&!Tt.current){t=Jn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=qn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),id(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),id(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vs(t,n),i=Jt(i),r=r(i),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),$g(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Cl(e,t),t.tag=1,Et(r)?(e=!0,Xl(t)):e=!1,vs(t,n),_x(t,r,i),od(t,r,i,n),ud(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function ik(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 Yt(e,t,n,r){return new ik(e,t,n,r)}function pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sk(e){if(typeof e=="function")return pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nh)return 11;if(e===Mh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Yt(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 Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")pp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Xi:return bi(n.children,i,s,t);case jh:o=8,i|=8;break;case Rf:return e=Yt(12,n,t,i|2),e.elementType=Rf,e.lanes=s,e;case Of:return e=Yt(13,n,t,i),e.elementType=Of,e.lanes=s,e;case jf:return e=Yt(19,n,t,i),e.elementType=jf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Nh:o=11;break e;case Mh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Yt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Yt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Yc(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ok(e,t,n,r,i){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=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mp(e,t,n,r,i,s,o,a,l){return e=new ok(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Yt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zh(s),e}function ak(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Di(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Et(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=mp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ft(),i=Mr(n),s=qn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Ct(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ft(),o=Mr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=qn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(mn(e,i,o,s),Sl(e,i,o)),o}function cu(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 Xg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){Xg(e,t),(e=e.alternate)&&Xg(e,t)}function lk(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function yp(e){this._internalRoot=e}$u.prototype.render=yp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=yp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Xn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&N1(e)}};function vp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zg(){}function uk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=cu(o);s.call(u)}}var o=Jx(t,r,e,0,null,!1,!1,"",Zg);return e._reactRootContainer=o,e[Xn]=o.current,Ko(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=cu(l);a.call(u)}}var l=mp(e,0,!1,null,null,!1,!1,"",Zg);return e._reactRootContainer=l,e[Xn]=l.current,Ko(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=uk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);n!==0&&(Lh(t,n|1),Ct(t,Ae()),!(se&6)&&(Vs=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Zn(e,1);if(r!==null){var i=ft();mn(r,e,1,i)}}),gp(e,1)}};Ih=function(e){if(e.tag===13){var t=Zn(e,134217728);if(t!==null){var n=ft();mn(t,e,134217728,n)}gp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Mr(e),n=Zn(e,t);if(n!==null){var r=ft();mn(n,e,t,r)}gp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};zf=function(e,t,n){switch(t){case"input":if(Df(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 i=Ou(r);if(!i)throw Error(A(90));u1(r),Df(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&ps(e,!!n.multiple,t,!1)}};v1=fp;x1=Ai;var ck={usingClientEntryPoint:!1,Events:[Sa,ts,Ou,g1,y1,fp]},uo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fk={bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||lk,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 il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(fk),_n=il}catch{}}It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ck;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vp(t))throw Error(A(200));return ak(e,t,null,n)};It.createRoot=function(e,t){if(!vp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mp(e,1,!1,null,null,n,!1,r,i),e[Xn]=t.current,Ko(e.nodeType===8?e.parentNode:e),new yp(t)};It.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(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};It.flushSync=function(e){return Ai(e)};It.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};It.hydrateRoot=function(e,t,n){if(!vp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Xn]=t.current,Ko(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};It.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};It.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Xn]=null})}),!0):!1};It.unstable_batchedUpdates=fp;It.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};It.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=It;var nw=t1.exports;const dk=Ws(nw);var rw,Jg=nw;rw=Jg.createRoot,Jg.hydrateRoot;const hk="@alfatech/livechat",pk="v2025.05.12.3",mk="module",gk="https://api-live.alfatek.dev",yk="wss://api-live.alfatek.dev",vk=["dist","README.md"],xk="dist/widget.js",wk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},bk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},Sk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:hk,private:!1,version:pk,type:mk,apiURL:gk,wsURL:yk,files:vk,main:xk,scripts:wk,dependencies:bk,devDependencies:Sk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Tk=iw.apiURL,Ek=iw.wsURL,Ck=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],kk=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],_k={429:Ck,404:kk};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Tk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=_k[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const xp=e=>[200,201,204].includes(e);var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Kt(){}function Pk(e,t){return typeof e=="function"?e(t):e}function bd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function hn(e,t){return typeof e=="function"?e(t):e}function e0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wp(o,t.options))return!1}else if(!ta(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function t0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ta(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Sd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ta(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ta(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=n0(e)&&n0(t);if(n||Sd(e)&&Sd(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const f=n?u:s[u];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function n0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sd(e){if(!r0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!r0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ak(e){return new Promise(t=>{setTimeout(t,e)})}function Td(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Rk(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ok(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,bs,Mv,jk=(Mv=class extends Qs{constructor(){super();U(this,hi);U(this,mr);U(this,bs);D(this,bs,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,bs,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,bs=new WeakMap,Mv),Sp=new jk,Ss,gr,Ts,Dv,Nk=(Dv=class extends Qs{constructor(){super();U(this,Ss,!0);U(this,gr);U(this,Ts);D(this,Ts,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ts,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Ss)!==t&&(D(this,Ss,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,Ss)}},Ss=new WeakMap,gr=new WeakMap,Ts=new WeakMap,Dv),du=new Nk;function Ed(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Ed(),o=x=>{var b;r||(d(new uw(x)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Sp.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),c=x=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var b;i=p=>{(r||u())&&x(p)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const b=n===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(c).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Ak(E).then(()=>u()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Dk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Le=Dk(),pi,Fv,fw=(Fv=class{constructor(){U(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Es,Cs,Wt,tt,ma,mi,un,$n,Lv,Fk=(Lv=class extends fw{constructor(t){super();U(this,un);U(this,Es);U(this,Cs);U(this,Wt);U(this,tt);U(this,ma);U(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Wt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Es,Lk(this.options)),this.state=t.state??T(this,Es),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Wt).remove(this)}setData(t,n){const r=Td(this.state.data,t,this.options);return X(this,un,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,un,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,tt))==null?void 0:r.promise;return(i=T(this,tt))==null||i.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Es))}isActive(){return this.observers.some(t=>hn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,tt)&&(T(this,mi)?T(this,tt).cancel({revert:!0}):T(this,tt).cancelRetry()),this.scheduleGc()),T(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,un,$n).call(this,{type:"invalidate"})}fetch(t,n){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,tt))return T(this,tt).continueRetry(),T(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const c=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Cs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&X(this,un,$n).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=c=>{var d,h,m,x;Xc(c)&&c.silent||X(this,un,$n).call(this,{type:"error",error:c}),Xc(c)||((h=(d=T(this,Wt).config).onError)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,this.state.data,c,this)),this.scheduleGc()};return D(this,tt,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,h,m,x;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){a(b);return}(h=(d=T(this,Wt).config).onSuccess)==null||h.call(d,c,this),(x=(m=T(this,Wt).config).onSettled)==null||x.call(m,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,d)=>{X(this,un,$n).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{X(this,un,$n).call(this,{type:"pause"})},onContinue:()=>{X(this,un,$n).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,tt).start()}},Es=new WeakMap,Cs=new WeakMap,Wt=new WeakMap,tt=new WeakMap,ma=new WeakMap,mi=new WeakMap,un=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xc(i)&&i.revert&&T(this,Cs)?{...T(this,Cs),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Wt).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Iv,Ik=(Iv=class extends Qs{constructor(t={}){super();U(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??wp(i,n);let o=this.get(s);return o||(o=new Fk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>e0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>e0(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,ot,gi,En,lr,$v,$k=($v=class extends fw{constructor(t){super();U(this,En);U(this,Tn);U(this,ot);U(this,gi);this.mutationId=t.mutationId,D(this,ot,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,ot).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,f,c,d,h,m,x,b,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,ot).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((u=(l=T(this,ot).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((h=(d=T(this,ot).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(b=T(this,ot).config).onError)==null?void 0:p.call(b,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,ot).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,ot).runNext(this)}}},Tn=new WeakMap,ot=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Le.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,ot).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ot,ga,Vv,Vk=(Vv=class extends Qs{constructor(t={}){super();U(this,Ot);U(this,ga);this.config=t,D(this,Ot,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new $k({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,Ot).get(n)??[];r.push(t),T(this,Ot).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,Ot).has(n)){const i=(r=T(this,Ot).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,Ot).delete(n):T(this,Ot).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,Ot).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,Ot).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){return this.getAll().filter(n=>t0(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ot=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function i0(e){return{onFetch:(t,n)=>{var f,c,d,h,m;const r=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};b(C);const k=await p(C),{maxPages:P}=t.options,j=S?Ok:Rk;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Bk:s0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:s0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,b;return(b=(x=t.options).persister)==null?void 0:b.call(x,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function s0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,ks,_s,xr,Ps,As,Bv,zk=(Bv=class{constructor(e={}){U(this,Ee);U(this,yr);U(this,vr);U(this,ks);U(this,_s);U(this,xr);U(this,Ps);U(this,As);D(this,Ee,e.queryCache||new Ik),D(this,yr,e.mutationCache||new Vk),D(this,vr,e.defaultOptions||{}),D(this,ks,new Map),D(this,_s,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,Ps,Sp.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,As,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,Ps))==null||e.call(this),D(this,Ps,void 0),(t=T(this,As))==null||t.call(this),D(this,As,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(ws(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=Pk(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return Le.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return Le.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Le.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=i0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=i0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,ks).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,ks).values()],n={};return t.forEach(r=>{ta(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,_s).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,_s).values()];let n={};return t.forEach(r=>{ta(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===bp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,ks=new WeakMap,_s=new WeakMap,xr=new WeakMap,Ps=new WeakMap,As=new WeakMap,Bv),yt,ee,ya,at,yi,Rs,wr,Cn,va,Os,js,vi,xi,br,Ns,ae,vo,Cd,kd,_d,Pd,Ad,Rd,Od,pw,zv,Uk=(zv=class extends Qs{constructor(t,n){super();U(this,ae);U(this,yt);U(this,ee);U(this,ya);U(this,at);U(this,yi);U(this,Rs);U(this,wr);U(this,Cn);U(this,va);U(this,Os);U(this,js);U(this,vi);U(this,xi);U(this,br);U(this,Ns,new Set);this.options=n,D(this,yt,t),D(this,Cn,null),D(this,wr,Ed()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),o0(T(this,ee),this.options)?X(this,ae,vo).call(this):this.updateResult(),X(this,ae,Pd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jd(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jd(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Ad).call(this),X(this,ae,Rd).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,Od).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&a0(T(this,ee),i,this.options,r)&&X(this,ae,vo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||ws(this.options.staleTime,T(this,ee))!==ws(r.staleTime,T(this,ee)))&&X(this,ae,Cd).call(this);const o=X(this,ae,kd).call(this);s&&(T(this,ee)!==i||hn(this.options.enabled,T(this,ee))!==hn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,_d).call(this,o)}getOptimisticResult(t){const n=T(this,yt).getQueryCache().build(T(this,yt),t),r=this.createResult(n,t);return Wk(this,r)&&(D(this,at,r),D(this,Rs,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,at)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,Ns).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,yt).defaultQueryOptions(t),r=T(this,yt).getQueryCache().build(T(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,at)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,at),o=T(this,yi),a=T(this,Rs),u=t!==r?t.state:T(this,ya),{state:f}=t;let c={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&o0(t,n),I=j&&a0(t,r,n,i);(N||I)&&(c={...c,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:b}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Os);else try{D(this,va,n.select),h=n.select(c.data),h=Td(s==null?void 0:s.data,h,n),D(this,Os,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=c.data;if(n.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,js))==null?void 0:P.state.data,T(this,js)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(N){D(this,Cn,N)}j!==void 0&&(b="success",h=Td(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Os),x=Date.now(),b="error");const p=c.fetchStatus==="fetching",g=b==="pending",v=b==="error",E=g&&p,S=h!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:g,isSuccess:b==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Tp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},N=()=>{const re=D(this,wr,k.promise=Ed());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&N();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&N();break}}return k}updateResult(t){const n=T(this,at),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,Rs,this.options),T(this,yi).data!==void 0&&D(this,js,T(this,ee)),fu(r,n))return;D(this,at,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,Ns).size)return!0;const l=new Set(a??T(this,Ns));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,at)).some(u=>{const f=u;return T(this,at)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Pd).call(this)}},yt=new WeakMap,ee=new WeakMap,ya=new WeakMap,at=new WeakMap,yi=new WeakMap,Rs=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Os=new WeakMap,js=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,Ns=new WeakMap,ae=new WeakSet,vo=function(t){X(this,ae,Od).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kt)),n},Cd=function(){X(this,ae,Ad).call(this);const t=ws(this.options.staleTime,T(this,ee));if(Ri||T(this,at).isStale||!bd(t))return;const r=sw(T(this,at).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,at).isStale||this.updateResult()},r))},kd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},_d=function(t){X(this,ae,Rd).call(this),D(this,br,t),!(Ri||hn(this.options.enabled,T(this,ee))===!1||!bd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Sp.isFocused())&&X(this,ae,vo).call(this)},T(this,br)))},Pd=function(){X(this,ae,Cd).call(this),X(this,ae,_d).call(this,X(this,ae,kd).call(this))},Ad=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Rd=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},Od=function(){const t=T(this,yt).getQueryCache().build(T(this,yt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,at))}),T(this,yt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Hk(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function o0(e,t){return Hk(e,t)||e.state.data!==void 0&&jd(e,t,t.refetchOnMount)}function jd(e,t,n){if(hn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tp(e,t)}return!1}function a0(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Tp(e,n)}function Tp(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function Wk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,vt,Un,Qn,Al,Nd,Uv,Kk=(Uv=class extends Qs{constructor(t,n){super();U(this,Qn);U(this,Sr);U(this,Tr);U(this,vt);U(this,Un);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Qn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,vt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,vt))==null?void 0:r.state.status)==="pending"&&T(this,vt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,vt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,vt))==null||t.removeObserver(this),D(this,vt,void 0),X(this,Qn,Al).call(this),X(this,Qn,Nd).call(this)}mutate(t,n){var r;return D(this,Un,n),(r=T(this,vt))==null||r.removeObserver(this),D(this,vt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,vt).addObserver(this),T(this,vt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,vt=new WeakMap,Un=new WeakMap,Qn=new WeakSet,Al=function(){var n;const t=((n=T(this,vt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){Le.batch(()=>{var n,r,i,s,o,a,l,u;if(T(this,Un)&&this.hasListeners()){const f=T(this,Tr).variables,c=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Un)).onSuccess)==null||r.call(n,t.data,f,c),(s=(i=T(this,Un)).onSettled)==null||s.call(i,t.data,null,f,c)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Un)).onError)==null||a.call(o,t.error,f,c),(u=(l=T(this,Un)).onSettled)==null||u.call(l,void 0,t.error,f,c))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),Gk=()=>y.useContext(yw);yw.Provider;function Qk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Yk=y.createContext(Qk()),Xk=()=>y.useContext(Yk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Md(){}var Zk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Jk=e=>{y.useEffect(()=>{e.clearReset()},[e])},e_=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),t_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},n_=(e,t)=>e.isLoading&&e.isFetching&&!t,r_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,l0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function i_(e,t,n){var f,c,d,h,m;const r=gw(),i=Gk(),s=Xk(),o=r.defaultQueryOptions(e);(c=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||c.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",t_(o),Zk(o,s),Jk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const b=i?Md:l.subscribe(Le.batchCalls(x));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),r_(o,u))throw l0(o,l,s);if(e_({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,u),o.experimental_prefetchInRender&&!Ri&&n_(u,i)){const x=a?l0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Md).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function s_(e,t){return i_(e,Uk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Kk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Le.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Md)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const o_=e=>s_({queryKey:["widgets",e],queryFn:()=>a_(e)}),a_=e=>Ea(`widgets/with-link/${e}`);var K=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(K||{});function l_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,7 +46,7 @@ Error generating stack: `+s.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function hu(){return hu=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},hu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function l_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let w=c_(i?c().pathname:"/",h,m,x);return kp(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),w}function u(h){return typeof h=="string"?h:Fd(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:u,createURL(h){return new URL(u(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Di(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let x=f(h,m);s+=1,i.splice(s,i.length,x),r&&a&&a({action:o,location:x,delta:1})},replace(h,m){o=kr.Replace;let x=f(h,m);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=kr.Pop;let m=l(s+h),x=i[m];s=m,a&&a({action:o,location:x,delta:h})},listen(h){return a=h,()=>{a=null}}}}function Le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function u_(){return Math.random().toString(36).substr(2,8)}function c_(e,t,n,r){return n===void 0&&(n=null),hu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Di(t):t,{state:n,key:t&&t.key||r||u_()})}function Fd(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 Di(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}var c0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(c0||(c0={}));function f_(e,t,n){return n===void 0&&(n="/"),d_(e,t,n,!1)}function d_(e,t,n,r){let i=typeof t=="string"?Di(t):t,s=_p(i.pathname||"/",n);if(s==null)return null;let o=ww(e);h_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=E_(s);a=S_(o[l],c,r)}return a}function ww(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Le(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&(Le(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),ww(s.children,t,f,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:w_(c,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of bw(s.path))i(s,o,l)}),t}function bw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=bw(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function h_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:b_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const p_=/^:[\w-]+$/,m_=3,g_=2,y_=1,v_=10,x_=-2,f0=e=>e==="*";function w_(e,t){let n=e.split("/"),r=n.length;return n.some(f0)&&(r+=x_),t&&(r+=g_),n.filter(i=>!f0(i)).reduce((i,s)=>i+(p_.test(s)?m_:s===""?y_:v_),r)}function b_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function S_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",u=d0({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),d=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=d0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Fr([s,u.pathname]),pathnameBase:P_(Fr([s,u.pathnameBase])),route:d}),u.pathnameBase!=="/"&&(s=Fr([s,u.pathnameBase]))}return o}function d0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=T_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,f,u)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let x=a[u]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[u];return h&&!m?c[d]=void 0:c[d]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function T_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),kp(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function E_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return kp(!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 _p(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 C_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Di(e):e;return{pathname:n?n.startsWith("/")?n:k_(n,t):t,search:A_(r),hash:R_(i)}}function k_(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Jc(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 __(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sw(e,t){let n=__(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Di(e):(i=hu({},e),Le(!i.pathname||!i.pathname.includes("?"),Jc("?","pathname","search",i)),Le(!i.pathname||!i.pathname.includes("#"),Jc("#","pathname","hash",i)),Le(!i.search||!i.search.includes("#"),Jc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let u=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),u-=1;i.pathname=d.join("/")}a=u>=0?t[u]:"/"}let l=C_(i,a),c=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),P_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,R_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function O_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ew=["post","put","patch","delete"];new Set(Ew);const j_=["get",...Ew];new Set(j_);/**
49
+ */function hu(){return hu=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},hu.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));function u_(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,m)=>f(h,typeof h=="string"?null:h.state,m===0?"default":void 0));let s=l(n??i.length-1),o=kr.Pop,a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function f(h,m,x){m===void 0&&(m=null);let b=f_(i?u().pathname:"/",h,m,x);return Ep(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),b}function c(h){return typeof h=="string"?h:Dd(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:c,createURL(h){return new URL(c(h),"http://localhost")},encodeLocation(h){let m=typeof h=="string"?Fi(h):h;return{pathname:m.pathname||"",search:m.search||"",hash:m.hash||""}},push(h,m){o=kr.Push;let x=f(h,m);s+=1,i.splice(s,i.length,x),r&&a&&a({action:o,location:x,delta:1})},replace(h,m){o=kr.Replace;let x=f(h,m);i[s]=x,r&&a&&a({action:o,location:x,delta:0})},go(h){o=kr.Pop;let m=l(s+h),x=i[m];s=m,a&&a({action:o,location:x,delta:h})},listen(h){return a=h,()=>{a=null}}}}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ep(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c_(){return Math.random().toString(36).substr(2,8)}function f_(e,t,n,r){return n===void 0&&(n=null),hu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fi(t):t,{state:n,key:t&&t.key||r||c_()})}function Dd(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 Fi(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}var u0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(u0||(u0={}));function d_(e,t,n){return n===void 0&&(n="/"),h_(e,t,n,!1)}function h_(e,t,n,r){let i=typeof t=="string"?Fi(t):t,s=Cp(i.pathname||"/",n);if(s==null)return null;let o=ww(e);p_(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=C_(s);a=T_(o[l],u,r)}return a}function ww(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Fr([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&($e(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ww(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:b_(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of bw(s.path))i(s,o,l)}),t}function bw(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=bw(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function p_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:S_(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const m_=/^:[\w-]+$/,g_=3,y_=2,v_=1,x_=10,w_=-2,c0=e=>e==="*";function b_(e,t){let n=e.split("/"),r=n.length;return n.some(c0)&&(r+=w_),t&&(r+=y_),n.filter(i=>!c0(i)).reduce((i,s)=>i+(m_.test(s)?g_:s===""?v_:x_),r)}function S_(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function T_(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=f0({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:Fr([s,c.pathname]),pathnameBase:A_(Fr([s,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(s=Fr([s,c.pathnameBase]))}return o}function f0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=E_(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d==="*"){let x=a[c]||"";o=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function E_(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ep(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function C_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ep(!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 Cp(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 k_(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fi(e):e;return{pathname:n?n.startsWith("/")?n:__(n,t):t,search:R_(r),hash:O_(i)}}function __(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zc(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 P_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sw(e,t){let n=P_(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tw(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fi(e):(i=hu({},e),$e(!i.pathname||!i.pathname.includes("?"),Zc("?","pathname","search",i)),$e(!i.pathname||!i.pathname.includes("#"),Zc("#","pathname","hash",i)),$e(!i.search||!i.search.includes("#"),Zc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}a=c>=0?t[c]:"/"}let l=k_(i,a),u=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Fr=e=>e.join("/").replace(/\/\/+/g,"/"),A_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function j_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ew=["post","put","patch","delete"];new Set(Ew);const N_=["get",...Ew];new Set(N_);/**
50
50
  * React Router v6.28.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+s.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function ta(){return ta=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},ta.apply(this,arguments)}const Pp=y.createContext(null),M_=y.createContext(null),Fi=y.createContext(null),zu=y.createContext(null),Li=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Cw=y.createContext(null);function N_(e,t){let{relative:n}=t===void 0?{}:t;Ca()||Le(!1);let{basename:r,navigator:i}=y.useContext(Fi),{hash:s,pathname:o,search:a}=Pw(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ca(){return y.useContext(zu)!=null}function ka(){return Ca()||Le(!1),y.useContext(zu).location}function kw(e){y.useContext(Fi).static||y.useLayoutEffect(e)}function _w(){let{isDataRoute:e}=y.useContext(Li);return e?q_():D_()}function D_(){Ca()||Le(!1);let e=y.useContext(Pp),{basename:t,future:n,navigator:r}=y.useContext(Fi),{matches:i}=y.useContext(Li),{pathname:s}=ka(),o=JSON.stringify(Sw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return kw(()=>{a.current=!0}),y.useCallback(function(c,f){if(f===void 0&&(f={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=Tw(c,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fr([t,u.pathname])),(f.replace?r.replace:r.push)(u,f.state,f)},[t,r,o,s,e])}function Pw(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Fi),{matches:i}=y.useContext(Li),{pathname:s}=ka(),o=JSON.stringify(Sw(i,r.v7_relativeSplatPath));return y.useMemo(()=>Tw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function F_(e,t){return L_(e,t)}function L_(e,t,n,r){Ca()||Le(!1);let{navigator:i}=y.useContext(Fi),{matches:s}=y.useContext(Li),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ka(),f;if(t){var u;let w=typeof t=="string"?Di(t):t;l==="/"||(u=w.pathname)!=null&&u.startsWith(l)||Le(!1),f=w}else f=c;let d=f.pathname||"/",h=d;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=f_(e,{pathname:h}),x=z_(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&x?y.createElement(zu.Provider,{value:{location:ta({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},x):x}function I_(){let e=K_(),t=O_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={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:i},n):null,null)}const $_=y.createElement(I_,null);class V_ 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(Li.Provider,{value:this.props.routeContext},y.createElement(Cw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function B_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(Pp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Li.Provider,{value:t},r)}function z_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);f>=0||Le(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let u=o[f];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=f),u.route.id){let{loaderData:d,errors:h}=n,m=u.route.loader&&d[u.route.id]===void 0&&(!h||h[u.route.id]===void 0);if(u.route.lazy||m){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,u,d)=>{let h,m=!1,x=null,w=null;n&&(h=a&&u.route.id?a[u.route.id]:void 0,x=u.route.errorElement||$_,l&&(c<0&&d===0?(m=!0,w=null):c===d&&(m=!0,w=u.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let v;return h?v=x:m?v=w:u.route.Component?v=y.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=f,y.createElement(B_,{match:u,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?y.createElement(V_,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Aw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Aw||{}),pu=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}(pu||{});function U_(e){let t=y.useContext(Pp);return t||Le(!1),t}function H_(e){let t=y.useContext(M_);return t||Le(!1),t}function W_(e){let t=y.useContext(Li);return t||Le(!1),t}function Rw(e){let t=W_(),n=t.matches[t.matches.length-1];return n.route.id||Le(!1),n.route.id}function K_(){var e;let t=y.useContext(Cw),n=H_(pu.UseRouteError),r=Rw(pu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function q_(){let{router:e}=U_(Aw.UseNavigateStable),t=Rw(pu.UseNavigateStable),n=y.useRef(!1);return kw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ta({fromRouteId:t},s)))},[e,t])}const h0={};function G_(e,t){h0[t]||(h0[t]=!0,console.warn(t))}const p0=(e,t,n)=>G_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Q_(e,t){e!=null&&e.v7_startTransition||p0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&p0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const Y_="startTransition",m0=Af[Y_];function X_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=l_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,c]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},u=y.useCallback(d=>{f&&m0?m0(()=>c(d)):c(d)},[c,f]);return y.useLayoutEffect(()=>a.listen(u),[a,u]),y.useEffect(()=>Q_(s),[s]),y.createElement(Z_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Ld(e){Le(!1)}function Z_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;Ca()&&Le(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:s,static:o,future:ta({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Di(r));let{pathname:f="/",search:u="",hash:d="",state:h=null,key:m="default"}=r,x=y.useMemo(()=>{let w=_p(f,l);return w==null?null:{location:{pathname:w,search:u,hash:d,state:h,key:m},navigationType:i}},[l,f,u,d,h,m,i]);return x==null?null:y.createElement(Fi.Provider,{value:c},y.createElement(zu.Provider,{children:n,value:x}))}function J_(e){let{children:t,location:n}=e;return F_(Id(t),n)}new Promise(()=>{});function Id(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Id(r.props.children,s));return}r.type!==Ld&&Le(!1),!r.props.index||!r.props.children||Le(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Id(r.props.children,s)),n.push(o)}),n}/**
58
+ */function na(){return na=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},na.apply(this,arguments)}const kp=y.createContext(null),M_=y.createContext(null),Li=y.createContext(null),zu=y.createContext(null),Ii=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Cw=y.createContext(null);function D_(e,t){let{relative:n}=t===void 0?{}:t;Ca()||$e(!1);let{basename:r,navigator:i}=y.useContext(Li),{hash:s,pathname:o,search:a}=Pw(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Fr([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Ca(){return y.useContext(zu)!=null}function ka(){return Ca()||$e(!1),y.useContext(zu).location}function kw(e){y.useContext(Li).static||y.useLayoutEffect(e)}function _w(){let{isDataRoute:e}=y.useContext(Ii);return e?G_():F_()}function F_(){Ca()||$e(!1);let e=y.useContext(kp),{basename:t,future:n,navigator:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,n.v7_relativeSplatPath)),a=y.useRef(!1);return kw(()=>{a.current=!0}),y.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Tw(u,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Fr([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function Pw(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Li),{matches:i}=y.useContext(Ii),{pathname:s}=ka(),o=JSON.stringify(Sw(i,r.v7_relativeSplatPath));return y.useMemo(()=>Tw(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function L_(e,t){return I_(e,t)}function I_(e,t,n,r){Ca()||$e(!1);let{navigator:i}=y.useContext(Li),{matches:s}=y.useContext(Ii),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ka(),f;if(t){var c;let b=typeof t=="string"?Fi(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||$e(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=d_(e,{pathname:h}),x=U_(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Fr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Fr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&x?y.createElement(zu.Provider,{value:{location:na({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:kr.Pop}},x):x}function $_(){let e=q_(),t=j_(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={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:i},n):null,null)}const V_=y.createElement($_,null);class B_ 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(Ii.Provider,{value:this.props.routeContext},y.createElement(Cw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z_(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(kp);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ii.Provider,{value:t},r)}function U_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||$e(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,m=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,m=!1,x=null,b=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,x=c.route.errorElement||V_,l&&(u<0&&d===0?(m=!0,b=null):u===d&&(m=!0,b=c.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),g=()=>{let v;return h?v=x:m?v=b:c.route.Component?v=y.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,y.createElement(z_,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?y.createElement(B_,{location:n.location,revalidation:n.revalidation,component:x,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var Aw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Aw||{}),pu=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}(pu||{});function H_(e){let t=y.useContext(kp);return t||$e(!1),t}function W_(e){let t=y.useContext(M_);return t||$e(!1),t}function K_(e){let t=y.useContext(Ii);return t||$e(!1),t}function Rw(e){let t=K_(),n=t.matches[t.matches.length-1];return n.route.id||$e(!1),n.route.id}function q_(){var e;let t=y.useContext(Cw),n=W_(pu.UseRouteError),r=Rw(pu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function G_(){let{router:e}=H_(Aw.UseNavigateStable),t=Rw(pu.UseNavigateStable),n=y.useRef(!1);return kw(()=>{n.current=!0}),y.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,na({fromRouteId:t},s)))},[e,t])}const d0={};function Q_(e,t){d0[t]||(d0[t]=!0,console.warn(t))}const h0=(e,t,n)=>Q_(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Y_(e,t){e!=null&&e.v7_startTransition||h0("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&h0("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}const X_="startTransition",p0=Pf[X_];function Z_(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,o=y.useRef();o.current==null&&(o.current=u_({initialEntries:r,initialIndex:i,v5Compat:!0}));let a=o.current,[l,u]=y.useState({action:a.action,location:a.location}),{v7_startTransition:f}=s||{},c=y.useCallback(d=>{f&&p0?p0(()=>u(d)):u(d)},[u,f]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.useEffect(()=>Y_(s),[s]),y.createElement(J_,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:s})}function Fd(e){$e(!1)}function J_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:s,static:o=!1,future:a}=e;Ca()&&$e(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:s,static:o,future:na({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Fi(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=r,x=y.useMemo(()=>{let b=Cp(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return x==null?null:y.createElement(Li.Provider,{value:u},y.createElement(zu.Provider,{children:n,value:x}))}function e2(e){let{children:t,location:n}=e;return L_(Ld(t),n)}new Promise(()=>{});function Ld(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let s=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Ld(r.props.children,s));return}r.type!==Fd&&$e(!1),!r.props.index||!r.props.children||$e(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ld(r.props.children,s)),n.push(o)}),n}/**
59
59
  * React Router DOM v6.28.0
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+s.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function $d(){return $d=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},$d.apply(this,arguments)}function e2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function t2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function n2(e,t){return e.button===0&&(!t||t==="_self")&&!t2(e)}const r2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],i2="6";try{window.__reactRouterVersion=i2}catch{}const s2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",o2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,a2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:f,viewTransition:u}=t,d=e2(t,r2),{basename:h}=y.useContext(Fi),m,x=!1;if(typeof c=="string"&&o2.test(c)&&(m=c,s2))try{let v=new URL(window.location.href),E=c.startsWith("//")?new URL(v.protocol+c):new URL(c),S=_p(E.pathname,h);E.origin===v.origin&&S!=null?c=S+E.search+E.hash:x=!0}catch{}let w=N_(c,{relative:i}),p=l2(c,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:u});function g(v){r&&r(v),v.defaultPrevented||p(v)}return y.createElement("a",$d({},d,{href:m||w,onClick:x||s?r:g,ref:n,target:l}))});var g0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(g0||(g0={}));var y0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(y0||(y0={}));function l2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=_w(),c=ka(),f=Pw(e,{relative:o});return y.useCallback(u=>{if(n2(u,n)){u.preventDefault();let d=r!==void 0?r:Fd(c)===Fd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[c,l,f,r,i,n,e,s,o,a])}const u2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},v0=e=>{let t;const n=new Set,r=(f,u)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(u2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},c2=e=>e?v0(e):v0;var Ow={exports:{}},jw={},Mw={exports:{}},Nw={};/**
67
+ */function Id(){return Id=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},Id.apply(this,arguments)}function t2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function n2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r2(e,t){return e.button===0&&(!t||t==="_self")&&!n2(e)}const i2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],s2="6";try{window.__reactRouterVersion=s2}catch{}const o2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,l2=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=t2(t,i2),{basename:h}=y.useContext(Li),m,x=!1;if(typeof u=="string"&&a2.test(u)&&(m=u,o2))try{let v=new URL(window.location.href),E=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=Cp(E.pathname,h);E.origin===v.origin&&S!=null?u=S+E.search+E.hash:x=!0}catch{}let b=D_(u,{relative:i}),p=u2(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,viewTransition:c});function g(v){r&&r(v),v.defaultPrevented||p(v)}return y.createElement("a",Id({},d,{href:m||b,onClick:x||s?r:g,ref:n,target:l}))});var m0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(m0||(m0={}));var g0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(g0||(g0={}));function u2(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=_w(),u=ka(),f=Pw(e,{relative:o});return y.useCallback(c=>{if(r2(c,n)){c.preventDefault();let d=r!==void 0?r:Dd(u)===Dd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}const c2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},y0=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(c2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},f2=e=>e?y0(e):y0;var Ow={exports:{}},jw={},Nw={exports:{}},Mw={};/**
68
68
  * @license React
69
69
  * use-sync-external-store-shim.production.min.js
70
70
  *
@@ -72,7 +72,7 @@ Error generating stack: `+s.message+`
72
72
  *
73
73
  * This source code is licensed under the MIT license found in the
74
74
  * LICENSE file in the root directory of this source tree.
75
- */var Vs=y;function f2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var d2=typeof Object.is=="function"?Object.is:f2,h2=Vs.useState,p2=Vs.useEffect,m2=Vs.useLayoutEffect,g2=Vs.useDebugValue;function y2(e,t){var n=t(),r=h2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return m2(function(){i.value=n,i.getSnapshot=t,ef(i)&&s({inst:i})},[e,n,t]),p2(function(){return ef(i)&&s({inst:i}),e(function(){ef(i)&&s({inst:i})})},[e]),g2(n),n}function ef(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!d2(e,n)}catch{return!0}}function v2(e,t){return t()}var x2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v2:y2;Nw.useSyncExternalStore=Vs.useSyncExternalStore!==void 0?Vs.useSyncExternalStore:x2;Mw.exports=Nw;var w2=Mw.exports;/**
75
+ */var Bs=y;function d2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h2=typeof Object.is=="function"?Object.is:d2,p2=Bs.useState,m2=Bs.useEffect,g2=Bs.useLayoutEffect,y2=Bs.useDebugValue;function v2(e,t){var n=t(),r=p2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return g2(function(){i.value=n,i.getSnapshot=t,Jc(i)&&s({inst:i})},[e,n,t]),m2(function(){return Jc(i)&&s({inst:i}),e(function(){Jc(i)&&s({inst:i})})},[e]),y2(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h2(e,n)}catch{return!0}}function x2(e,t){return t()}var w2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x2:v2;Mw.useSyncExternalStore=Bs.useSyncExternalStore!==void 0?Bs.useSyncExternalStore:w2;Nw.exports=Mw;var b2=Nw.exports;/**
76
76
  * @license React
77
77
  * use-sync-external-store-shim/with-selector.production.min.js
78
78
  *
@@ -80,31 +80,31 @@ Error generating stack: `+s.message+`
80
80
  *
81
81
  * This source code is licensed under the MIT license found in the
82
82
  * LICENSE file in the root directory of this source tree.
83
- */var Uu=y,b2=w2;function S2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var T2=typeof Object.is=="function"?Object.is:S2,E2=b2.useSyncExternalStore,C2=Uu.useRef,k2=Uu.useEffect,_2=Uu.useMemo,P2=Uu.useDebugValue;jw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=C2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=_2(function(){function l(h){if(!c){if(c=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return u=m}return u=h}if(m=u,T2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,u=x)}var c=!1,f,u,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=E2(e,s[0],s[1]);return k2(function(){o.hasValue=!0,o.value=a},[a]),P2(a),a};Ow.exports=jw;var A2=Ow.exports;const R2=Hs(A2),Dw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:O2}=R,{useSyncExternalStoreWithSelector:j2}=R2;let x0=!1;const M2=e=>e;function N2(e,t=M2,n){(Dw?"production":void 0)!=="production"&&n&&!x0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),x0=!0);const r=j2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return O2(r),r}const w0=e=>{(Dw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?c2(e):e,n=(r,i)=>N2(t,r,i);return Object.assign(n,t),n},D2=e=>e?w0(e):w0,en=D2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())}})),F2={primary:{solid:"text-white btn bg-blue-500 border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",soft:"text-blue-500 btn bg-blue-100 hover:text-white hover:bg-blue-600 focus:text-white focus:bg-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:ring-3 active:ring-blue-100",dashed:"bg-white border-dashed text-blue-500 btn border-blue-500 hover:text-blue-500 hover:bg-blue-50 hover:border-blue-600 focus:text-blue-600 focus:bg-blue-50 focus:border-blue-600 active:text-blue-600 active:bg-blue-50 active:border-blue-600",outline:"bg-white text-blue-500 btn border-blue-500 hover:text-white hover:bg-blue-600 hover:border-blue-600 focus:text-white focus:bg-blue-600 focus:border-blue-600 focus:ring-3 focus:ring-blue-100 active:text-white active:bg-blue-600 active:border-blue-600 active:ring-3 active:ring-blue-100",ghost:"bg-white text-blue-500 btn hover:text-blue-500 hover:bg-blue-100 focus:text-blue-500 focus:bg-blue-100 active:text-blue-500 active:bg-blue-100"},red:{solid:"text-white btn bg-red-500 border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",soft:"text-red-500 btn bg-red-100 hover:text-white hover:bg-red-600 focus:text-white focus:bg-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:ring-3 active:ring-red-100",dashed:"bg-white border-dashed text-red-500 btn border-red-500 hover:text-red-500 hover:bg-red-50 hover:border-red-600 focus:text-red-600 focus:bg-red-50 focus:border-red-600 active:text-red-600 active:bg-red-50 active:border-red-600",outline:"bg-white text-red-500 btn border-red-500 hover:text-white hover:bg-red-600 hover:border-red-600 focus:text-white focus:bg-red-600 focus:border-red-600 focus:ring-3 focus:ring-red-100 active:text-white active:bg-red-600 active:border-red-600 active:ring-3 active:ring-red-100",ghost:"bg-white text-red-500 btn hover:text-red-500 hover:bg-red-100 focus:text-red-500 focus:bg-red-100 active:text-red-500 active:bg-red-100"},gray:{solid:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",soft:"text-gray-500 btn bg-gray-100 hover:text-gray-500 hover:bg-gray-200 focus:text-gray-500 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:ring-gray-100",dashed:"bg-white border-dashed text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-50 hover:border-gray-600 focus:text-gray-600 focus:border-gray-600 active:text-gray-600 active:bg-gray-50 active:border-gray-600",outline:"bg-white text-gray-500 btn border-gray-500 hover:text-gray-500 hover:bg-gray-200 hover:border-gray-600 focus:text-gray-500 focus:bg-gray-200 focus:border-gray-600 focus:ring-3 focus:ring-gray-100 active:text-gray-500 active:bg-gray-200 active:border-gray-600 active:ring-3 active:ring-gray-100",ghost:"bg-zink-700/80 shadow-xs border border-solid border-zink-500 text-white btn hover:text-white hover:bg-zink-700 active:text-gray-500 active:bg-gray-100"}},L2={xs:{default:"py-1 text-xs px-1.5",rounded:"p-1.5 text-xs"},sm:{default:"px-2 py-1.5 text-xs",rounded:"p-2 text-xs"},md:{default:"px-2.5 py-2 text-sm",rounded:"p-2.5 text-xs"},lg:{default:"px-3 py-2.5",rounded:"p-3"},xl:{default:"px-4 py-2.5 text-15",rounded:"p-4 text-15"},"2xl":{default:"px-5 py-3 text-15",rounded:"p-5 text-15"}};var Fw={exports:{}};/*!
83
+ */var Uu=y,S2=b2;function T2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var E2=typeof Object.is=="function"?Object.is:T2,C2=S2.useSyncExternalStore,k2=Uu.useRef,_2=Uu.useEffect,P2=Uu.useMemo,A2=Uu.useDebugValue;jw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=k2(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=P2(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return c=m}return c=h}if(m=c,E2(f,h))return m;var x=r(h);return i!==void 0&&i(m,x)?m:(f=h,c=x)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=C2(e,s[0],s[1]);return _2(function(){o.hasValue=!0,o.value=a},[a]),A2(a),a};Ow.exports=jw;var R2=Ow.exports;const O2=Ws(R2),Dw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:j2}=R,{useSyncExternalStoreWithSelector:N2}=O2;let v0=!1;const M2=e=>e;function D2(e,t=M2,n){(Dw?"production":void 0)!=="production"&&n&&!v0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),v0=!0);const r=N2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return j2(r),r}const x0=e=>{(Dw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?f2(e):e,n=(r,i)=>D2(t,r,i);return Object.assign(n,t),n},F2=e=>e?x0(e):x0,tn=F2(e=>({widget:null,open:localStorage.getItem("lc:widget:open")==="true",isHaveChat:localStorage.getItem("lc:widget:isHaveChat")==="true",defaultValues:{},setOpen:t=>{e({open:t}),localStorage.setItem("lc:widget:open",t.toString())},setWidget:t=>e({widget:t}),setDefaultValues:t=>e({defaultValues:t}),setIsHaveChat:t=>{e({isHaveChat:t}),localStorage.setItem("lc:widget:isHaveChat",t.toString())}})),L2={xs:{default:"!p-1",rounded:"!p-1"},sm:{default:"text-xs px-2.5 py-1.5",rounded:"p-1.5"},md:{default:"text-sm px-3 py-2",rounded:"p-2"},lg:{default:"text-sm px-4 py-2.5",rounded:"p-2.5"},xl:{default:"text-base px-5 py-3",rounded:"p-3"}},w0={primary:{solid:"bg-blue-600 border border-transparent text-white hover:bg-blue-700 disabled:bg-blue-100 disabled:text-blue-500",outline:"bg-transparent border border-blue-600 text-blue-600 hover:bg-blue-100 disabled:bg-blue-50 disabled:text-blue-300 disabled:border-blue-100",subtle:"bg-blue-100 border border-transparent text-blue-500 hover:bg-blue-200 disabled:bg-blue-50 disabled:text-blue-300",link:"hover:underline px-1.5 py-0 text-blue-500 disabled:text-blue-300 bg-transparent !border-none"},secondary:{solid:"bg-zink-400 border border-transparent text-white hover:bg-zink-500 disabled:bg-zink-100 disabled:text-zink-500",outline:"bg-transparent border border-gray-600 text-gray-600 hover:bg-gray-100 disabled:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",subtle:"bg-gray-100 border border-transparent text-gray-500 hover:bg-gray-200 disabled:bg-gray-50 disabled:text-gray-300",link:"hover:underline px-1.5 py-0 text-gray-500 disabled:text-gray-300 bg-transparent !border-none"},danger:{solid:"bg-red-600 border border-transparent text-white hover:bg-red-700 disabled:bg-red-100 disabled:text-red-500",outline:"bg-transparent border border-red-600 text-red-600 hover:bg-red-100 disabled:bg-red-50 disabled:text-red-300 disabled:border-red-100",subtle:"bg-red-100 border border-transparent text-red-500 hover:bg-red-200 disabled:bg-red-50 disabled:text-red-300",link:"hover:underline px-1.5 py-0 text-red-500 disabled:text-red-300 bg-transparent !border-none"},success:{solid:"bg-green-600 border border-transparent text-white hover:bg-green-700 disabled:bg-green-100 disabled:text-green-500",outline:"bg-transparent border border-green-600 text-green-600 hover:bg-green-100 disabled:bg-green-50 disabled:text-green-300 disabled:border-green-100",subtle:"bg-green-100 border border-transparent text-green-500 hover:bg-green-200 disabled:bg-green-50 disabled:text-green-300",link:"hover:underline px-1.5 py-0 text-green-500 disabled:text-green-300 bg-transparent !border-none"},warning:{solid:"bg-yellow-600 border border-transparent text-white hover:bg-yellow-700 disabled:bg-yellow-100 disabled:text-yellow-500",outline:"bg-transparent border border-yellow-600 text-yellow-600 hover:bg-yellow-100 disabled:bg-yellow-50 disabled:text-yellow-300 disabled:border-yellow-100",subtle:"bg-yellow-100 border border-transparent text-yellow-500 hover:bg-yellow-200 disabled:bg-yellow-50 disabled:text-yellow-300",link:"hover:underline px-1.5 py-0 text-yellow-500 disabled:text-yellow-300 bg-transparent !border-none"}};var Fw={exports:{}};/*!
84
84
  Copyright (c) 2018 Jed Watson.
85
85
  Licensed under the MIT License (MIT), see
86
86
  http://jedwatson.github.io/classnames
87
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fw);var I2=Fw.exports;const ze=Hs(I2),Ap=y.createContext({});function Rp(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Op=typeof window<"u",Lw=Op?y.useLayoutEffect:y.useEffect,Hu=y.createContext(null),jp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class $2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function V2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(jp);return y.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:f,right:u}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${u}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
87
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fw);var I2=Fw.exports;const Ne=Ws(I2),_p=y.createContext({});function Pp(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ap=typeof window<"u",Lw=Ap?y.useLayoutEffect:y.useEffect,Hu=y.createContext(null),Rp=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class $2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function V2({children:e,isPresent:t,anchorX:n}){const r=y.useId(),i=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=y.useContext(Rp);return y.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:f,right:c}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${f}`:`right: ${c}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
88
88
  [data-motion-pop-id="${r}"] {
89
89
  position: absolute !important;
90
90
  width: ${a}px !important;
91
91
  height: ${l}px !important;
92
92
  ${d}px !important;
93
- top: ${c}px !important;
93
+ top: ${u}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(h)}},[t]),b.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(z2),c=y.useId();let f=!0,u=y.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(u={...u}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=b.jsx(V2,{isPresent:n,anchorX:a,children:e})),b.jsx(Hu.Provider,{value:u,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const na=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Iw(o),f=y.useMemo(()=>b0(e),[e]),u=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[x,w]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);u.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,u.length,u.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);u.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),w(f),null}const{forceRender:E}=y.useContext(Ap);return b.jsx(b.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||u.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(M=>{M||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(c==null||c()),r&&r())};return b.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Mp(e,t){e.indexOf(t)===-1&&e.push(t)}function Np(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Vd=()=>{};const Bd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Mp(this.subscriptions,t),()=>Np(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Dp(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Dp(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Lp(e)?vo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||zd.easeOut):zd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const f={[t]:n};l&&(f.offset=l);const u=Bw(a,i);return Array.isArray(u)&&(f.easing=u),e.animate(f,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Ip(e){return typeof e=="function"&&"applyToOptions"in e}function $p(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in zd||ia())||Lp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(f.schedule(u),e()),l++,u(a)}const f={schedule:(u,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(u))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:f,render:u,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),f.process(i),u.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:DI}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:qe,steps:tf}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(qe.isProcessing||Bd.useManualTiming?qe.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},on={x:!1,y:!1};function Hw(){return on.x||on.y}function J2(e){return e==="x"||e==="y"?on[e]?null:(on[e]=!0,()=>{on[e]=!1}):on.x||on.y?null:(on.x=on.y=!0,()=>{on.x=on.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const f=u=>{E0(u)&&(c(u),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const xo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function nf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(xo.has(n))return;nf(n,"down");const i=C0(()=>{nf(n,"up")}),s=()=>nf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return zp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||xo.has(l))return;xo.add(l);const c=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",d),!(!k0(h)||!xo.has(l))&&(xo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>iP(c,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bs={};for(const e in P0)Bs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)Bs[t]={...Bs[t],...e[t]}}const uP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function qu(e){return Ku(e.animate)||Hp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function as(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):as(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Wp(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,w;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(jp).reducedMotion,c=y.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=c.current,u=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(c.current,n,i,u);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Bp.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&as(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:c})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let c;const f={...y.useContext(jp),...a,layoutId:bP(a)},{isStatic:u}=f,d=pP(a),h=r(a,u);if(!u&&Op){SP();const m=TP(f);c=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return b.jsxs(Wu.Provider,{value:d,children:[c&&d.visualElement?b.jsx(c,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,u,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=Bs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=Jw("--"),EP=Jw("var(--"),qp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Kp(t)&&(aa[t].isCSSVariable=!0)}const Qs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Qs);function eb(e,{layout:t,layoutId:n}){return Ii.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const nt=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tr=(e,t,n)=>n>t?t:n<e?e:n,Ys={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Ys,transform:e=>tr(0,1,e)},ll={...Ys,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),K=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:la,originX:R0,originY:R0,originZ:K},O0={...Ys,transform:Math.round},Gp={...AP,...RP,zIndex:O0,size:K,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Qs.length;function MP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Qs[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=tb(a,Gp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Ii.has(l)){o=!0;continue}else if(Kp(l)){i[l]=c;continue}else{const f=tb(c,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=MP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${c} ${f}`}}const Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!nt(t[r])&&!eb(r,n)&&(e[r]=t[r])}function NP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,NP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Zp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u){if(Qp(e,c,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?zP:FP)(r,s,o,n),c=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...c,...l,ref:i}:{},{children:u}=r,d=y.useMemo(()=>nt(u)?u.get():u,[u]);return y.createElement(n,{...f,children:d})}}function M0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function em(e,t,n,r){if(typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Ud=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>Ud(e)?e[e.length-1]||0:e;function Ol(e){const t=nt(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Rp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),c=Qw(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const u=f?a:o;if(u&&typeof u!="boolean"&&!Ku(u)){const d=Array.isArray(u)?u:[u];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:x,transition:w,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(nt(r[o])||t.style&&nt(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Wp(i),t.attrs[i])}function ub(e,t,n){const r=tm(e,t,n);for(const i in e)if(nt(e[i])||nt(t[i])){const s=Qs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const N0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Ii.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<N0.length;a++){const l=N0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Qs]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(nt(e)&&e.add)}function Hd(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Bd.WillChange){const r=new Bd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Xt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),nm=pb(mb),gb=hb(nm),yb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),vb=pb(rm),xb=hb(rm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Ro=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>tr(0,255,e),rf={...Ys,transform:e=>Math.round(oA(e))},ui={test:sm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rf.transform(e)+", "+rf.transform(t)+", "+rf.transform(n)+", "+Ro(la.transform(r))+")"};function aA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Wd={test:sm("#"),parse:aA,transform:ui.transform},ls={test:sm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Ro(t))+", "+jn.transform(Ro(n))+", "+Ro(la.transform(r))+")"},et={test:e=>ui.test(e)||Wd.test(e)||ls.test(e),parse:e=>ui.test(e)?ui.parse(e):ls.test(e)?ls.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):ls.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(et.test(l)?(r.color.push(s),i.push(Tb),n.push(et.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Ro(i[o]):a===Tb?s+=et.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(im)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Kd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Gp,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Kd,WebkitFilter:Kd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Kd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,qd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Gd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qd,rotateZ:qd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gd=e=>(e=e%360,e<0&&(e+=360),e),F0=qd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>Gd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Gd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Qd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Ys||e===K,CA=new Set(["x","y","z"]),kA=Qs.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const zs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qd(t,"x"),y:(e,{transform:t})=>Qd(t,"y")};zs.translateX=zs.x;zs.translateY=zs.y;const Si=new Set;let Yd=!1,Xd=!1;function Pb(){if(Xd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xd=!1,Yd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xd=!0)})}function PA(){Ab(),Pb()}class om{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Yd||(Yd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return qp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Mb=[Ys,K,jn,ur,PP,_P,OA],B0=e=>Mb.find(jb(e));class Nb extends om{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),qp(c))){const f=Ob(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=zs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function MA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Ip(n))&&r}const NA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(NA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!MA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function sf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sf(l,a,e+1/3),s=sf(l,a,e),o=sf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const of=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Wd,ui,ls],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===ls&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=of(n.red,r.red,s),i.green=of(n.green,r.green,s),i.blue=of(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Zd=new Set(["none","hidden"]);function VA(e,t){return Zd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?BA:typeof e=="string"?qp(e)?yu:et.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?et.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>am(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=am(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Zd.has(e)&&!i.values.length||Zd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},af=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=tr(Ce.minDamping,Ce.maxDamping,o),e=tr(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=c=>{const f=c*o,u=f*e,d=f-n,h=Jd(c,o),m=Math.exp(-u);return af-d/h*m},s=c=>{const u=c*o*e,d=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),x=Jd(Math.pow(c,2),o);return(-i(c)+af>0?-1:1)*((d-h)*m)/x}):(i=c=>{const f=Math.exp(-c*e),u=(c-n)*e+1;return-af+f*u},s=c=>{const f=Math.exp(-c*e),u=(n-c)*(e*e);return f*u});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Jd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*tr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:f,duration:u,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=c/(2*Math.sqrt(l*f)),w=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(w)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Jd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*w)/S*Math.sin(S*C)+w*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(w+(m+p*w)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*w)*Math.sinh(P)+S*w*Math.cosh(P))/S}}const E={calculatedDuration:h&&u||null,next:S=>{const C=v(S);if(h)a.done=S>=u;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Vp(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=e[0],d={done:!1,value:u},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const w=u+x,p=o===void 0?w:o(w);p!==w&&(x=p-u);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),M=v(P);d.done=Math.abs(j)<=c,d.value=d.done?p:M};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Xt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:rm,circInOut:xb,circOut:vb,backIn:nm,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Lp(e)){Vd(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return Vd(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Xt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Vd(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,c=f=>{if(o&&f<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(f<e[u+1]);u++);const d=ra(e[u],e[u+1],f);return a[u](d)};return n?f=>c(tr(e[0],e[s-1],f)):c}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>qe.isProcessing?qe.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class lm extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||om,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Ip(n)?n:lR[n]||xu;let l,c;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Vp(f));const{calculatedDuration:u}=f,d=u+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/u;let j=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(M=1-M,x&&(M-=x/u)):m==="mirror"&&(E=o)),v=tr(0,1,M)*u}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&c!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),w&&w(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Ip(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new lm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Nb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:u,onUpdate:d,motionValue:h,element:m,...x}=this.options,w=pR(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:u}=this.options;a.set(Gu(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xt;const{animation:r}=n;T0(r,t)}return Xt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:u,element:d,...h}=this.options,m=new lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);c.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:Ii.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const um=(e,t,n,r={},i,s)=>o=>{const a=$p(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let u=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(u=!0)),f.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new lm(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||c&&SR(c,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const w=fb(e);if(w){const p=window.MotionHandoffAnimation(w,f,he);p!==null&&(h.startTime=p,m=!0)}}Hd(e,f),u.start(um(f,u,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function eh(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return TR(e,t,f+c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(ER).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(eh(c,t,{...s,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>eh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=eh(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=Hp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=Hp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Up].reverse(),PR=Up.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(c,f)=>{var d;const u=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(u){const{transition:h,transitionEnd:m,...x}=u;c={...c,...x,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,f=Ub(e.parent)||{},u=[],d=new Set;let h={},m=1/0;for(let w=0;w<PR;w++){const p=_R[w],g=n[p],v=c[p]!==void 0?c[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=w);let C=v===f[p]&&v!==c[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||w>m&&E,j=!1;const M=Array.isArray(v)?v:[v];let I=M.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let z=!1;Ud(O)&&Ud(L)?z=!zb(O,L):z=O!==L,z?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&u.push(...M.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const w={};if(typeof c.initial!="boolean"){const p=ua(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),w[p]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let MR=0;class NR extends Gr{constructor(){super(...arguments),this.id=MR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:NR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>zp(t)&&e(t,Ra(t));function Oo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function lt(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+lt(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+lt(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),us=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ut(e){return[e("x"),e("y")]}function lf(e){return e===void 0||e===1}function th({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function ni(e){return th(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function nh(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){nh(e.x,t.translate,t.scale,t.originPoint),nh(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&fs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&fs(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function cs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);nh(e,t,n,s,r)}function fs(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(cs(r.x,i.offset.x),cs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=cf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:x}=qe;this.history.push({...m,timestamp:x});const{onStart:w,onMove:p}=this.handlers;d||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=uf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=cf(u.type==="pointercancel"?this.lastMoveEventInfo:uf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),m&&m(u,w)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=uf(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=qe;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,cf(a,this.history)),this.removeListeners=Aa(Oo(this.contextWindow,"pointermove",this.handlePointerMove),Oo(this.contextWindow,"pointerup",this.handlePointerUp),Oo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function uf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=lt(e),i=lt(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),tr(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const rh=.35;function tO(e=rh){return e===!1?e=0:e===!0&&(e=rh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ut(w=>{let p=this.getAxisMotionValue(w).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[w];v&&(p=lt(v)*(parseFloat(p)/100))}}this.originPoint[w]=p}),m&&he.postRender(()=>m(f,u)),Hd(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=iO(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(f,u)},a=(f,u)=>this.stop(f,u),l=()=>Ut(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ut(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ut(f=>{if(!ul(f,n,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hd(this.visualElement,t),r.start(um(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ut(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ut(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ut(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ut(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ut(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=Oo(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();as(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ut(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=rh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Oo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Bp.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Jb(e){const[t,n]=Iw(),r=y.useContext(Ap);return b.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:aO};function cO(e,t,n){const r=nt(e)?e:sa(e);return r.start(um("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Mp(this.children,t),this.isDirty=!0}remove(t){Np(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||K.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),c=yy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gy(l)===gy(c)?(e[a]=Math.max(be(my(l),my(c),r),0),(jn.test(c)||jn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Xt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function Vt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return lt(e.x)/lt(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Mp(this.members,t),t.scheduleRender()}remove(t){if(Np(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:u,rotateY:d,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ff=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function df(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(NO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,v);const E={...$p(x,"layout"),onPlay:w,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(MO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();qe.delta=tr(0,1e3/60,a-qe.timestamp),qe.timestamp=a,qe.isProcessing=!0,tf.update.process(qe),tf.preRender.process(qe),tf.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!lt(this.snapshot.measuredBox.x)&&!lt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(cs(a.x,f.offset.x),cs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(Vt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:u,options:d}=f;f!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Vt(a,o),cs(a.x,u.offset.x),cs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();Vt(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&fs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&fs(l,f.latestValues)}return ni(this.latestValues)&&fs(l,this.latestValues),l}removeTransform(o){const a=Pe();Vt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ni(c.latestValues))continue;th(c.latestValues)&&c.updateSnapshot();const f=Pe(),u=c.measurePageBox();Vt(f,u),Sy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||th(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===qe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),jo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=us(),this.projectionDelta=us(),this.projectionDeltaWithTransform=us()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},u=us();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,w=this.getStack(),p=!w||w.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(u.x,o.x,S),Oy(u.y,o.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),Vt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,c,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&oS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pe();const u=lt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=lt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Vt(a,l),fs(a,f),jo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&df("z",o,c,this.animationValues);for(let f=0;f<ff.length;f++)df(`rotate${ff[f]}`,o,c,this.animationValues),df(`skew${ff[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:u,y:d}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${d.origin*100}% 0`,c.animationValues?a.opacity=c===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=c===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:w}=aa[h],p=a.transform==="none"?f[h]:m(f[h],c);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else w?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=c===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(d);d.min=r[u].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(r[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=us();jo(a,r,t.layoutBox);const l=us();o?jo(l,e.applyTransform(i,!0),t.measuredBox):jo(l,r,t.layoutBox);const c=!nS(a);let f=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function MO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},My=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ny=My("applewebkit/")&&!My("chrome/")?Math.round:Xt;function Dy(e){e.min=Ny(e.min),e.max=Ny(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hf={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hf.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),hf.current=e}return hf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ih=new WeakMap,pf=new WeakMap,GO=e=>{const t=ih.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;pf.has(n)||pf.set(n,{});const r=pf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return ih.set(e,n),r.observe(e),()=>{ih.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},sh={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sh.current=e.matches;e.addListener(t),t()}else sh.current=!1}const ij=[...Mb,et,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(nt(i))e.addValue(r,i);else if(nt(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=om,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&nt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:sh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ii.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bs){const n=Bs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=em(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!nt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Nb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if(Ii.has(n))return TA(t,n);{const r=uj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ii.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Zp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const dj=(e,t)=>Xp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),gn=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Bt=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[B.Background]:"",[B.Border]:"initial",[B.TooltipText]:Bt("blue-700"),[B.TooltipBackground]:Bt("blue-100"),[B.TooltipBorder]:Bt("blue-500"),[B.HeaderBackground]:Bt("zink-600"),[B.HeaderBorder]:"initial",[B.HeaderText]:"white",[B.FooterBackground]:"",[B.FooterBorder]:"",[B.FooterText]:"",[B.MessageAdminBackground]:"",[B.MessageAdminText]:"",[B.MessageVisitorBackground]:"",[B.MessageVisitorText]:"",[B.GreeterBackground]:"white",[B.GreeterText]:"",[B.GreeterBorder]:"",[B.GreeterTopBackground]:Bt("zink-600"),[B.GreeterTopText]:"white",[B.GreeterButtonBackground]:Bt("blue-500"),[B.GreeterButtonText]:Bt("white"),[B.ButtonBackground]:Bt("blue-500"),[B.ButtonText]:Bt("white"),[B.InputBackground]:Bt("white"),[B.InputText]:Bt("gray-800"),[B.InputBorder]:Bt("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return b.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const Ln=()=>y.useContext(cS);function Qn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=B.ButtonText,bgKey:c=B.ButtonBackground,animations:f={},withoutTheming:u,...d}){const h=Ln();return b.jsx(gn.button,{type:t,className:ze("flex items-center justify-center focus:!ring-0",{"rounded-full":o&&i!=="xs","rounded-md":!o},a,F2[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!u&&{color:h.getColor(l),backgroundColor:h.getColor(c),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function Me(){}Me.Home=function(t){return b.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};Me.Chat=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Menu=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});Me.MessageTyping=({className:e="size-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Check=function(t){return b.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};Me.Website=function(t){return b.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),b.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};Me.ArrowDown=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});Me.XCircle=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});Me.X=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});const Nn=Object.create(null);Nn.open="0";Nn.close="1";Nn.ping="2";Nn.pong="3";Nn.message="4";Nn.upgrade="5";Nn.noop="6";const Ml=Object.create(null);Object.keys(Nn).forEach(e=>{Ml[Nn[e]]=e});const oh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Nn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));cm(e,!1,n=>{mf||(mf=new TextEncoder),t(mf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)wo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)s=wo[e.charCodeAt(r)],o=wo[e.charCodeAt(r+1)],a=wo[e.charCodeAt(r+2)],l=wo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return c},bj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Ml[n]?e.length>1?{type:Ml[n],data:e.substring(1)}:{type:Ml[n]}:oh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{cm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=fm(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let gf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){gf||(gf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(oh);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(fm(s?l:gf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(oh);break}}}})}const gS=4;function je(e){if(e)return _j(e)}function _j(e){for(var t in je.prototype)e[t]=je.prototype[t];return e}je.prototype.on=je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};je.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};je.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};je.prototype.emitReserved=je.prototype.emit;je.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};je.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Gt.setTimeout,Rj=Gt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Gt),e.clearTimeoutFn=Rj.bind(Gt)):(e.setTimeoutFn=Gt.setTimeout.bind(Gt),e.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}const Oj=1.33;function jj(e){return typeof e=="string"?Mj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Mj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Nj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends je{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fm(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Nj(t);return n.length?"?"+n:""}}class Lj extends dm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Mn extends je{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Mn.requestsCount++,Mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Mn.requestsCount=0;Mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Gt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Mn.requests)Mn.requests.hasOwnProperty(e)&&Mn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yf=Gt.WebSocket||Gt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new yf(t,n,r):n?new yf(t,n):new yf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends dm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ah(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const lh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nl=[];lh&&addEventListener("offline",()=>{Nl.forEach(e=>e())},!1);class Lr extends je{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ah(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ah(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),lh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),lh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nl.indexOf(this._offlineEventListener);r!==-1&&Nl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=u=>{const d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ah(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eM=typeof ArrayBuffer=="function",tM=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nM=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rM=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function hm(e){return eM&&(e instanceof ArrayBuffer||tM(e))||nM&&e instanceof Blob||rM&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iM(e){const t=[],n=e.data,r=e;return r.data=uh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function uh(e,t){if(!e)return e;if(hm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=uh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=uh(e[r],t));return n}return e}function sM(e,t){return e.data=ch(e.data,t),delete e.attachments,e}function ch(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ch(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ch(e[n],t));return e}const oM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aM=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lM{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iM(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm extends je{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uM(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(hm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(pm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oM.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uM{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sM(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:lM,get PacketType(){return te},protocol:aM},Symbol.toStringTag,{value:"Module"}));function cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends je{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fM.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,u=n.pop();this._registerAckCallback(f,u),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Xs.prototype.reset=function(){this.attempts=0};Xs.prototype.setMin=function(e){this.ms=e};Xs.prototype.setMax=function(e){this.max=e};Xs.prototype.setJitter=function(e){this.jitter=e};class fh extends je{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cM;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=cn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=cn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const co={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=co[i]&&s in co[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new fh(r,t):(co[i]||(co[i]=new fh(r,t)),l=co[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:fh,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),$i=()=>y.useContext(ES),dM=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const u=Fl(Tk,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});u.on("error",d=>{console.error("Websocket error",d)}),u.on("connect",()=>{n(u),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(u,d)=>{t&&t.on(u,d)},c=(u,d)=>{t&&t.off(u,d)},f=(u,d,h)=>{t&&t.emit(u,d,h)};return b.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:c,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),at=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(at||{});const mm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=_I.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hM=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pM=e=>Ea(`clients/${e}/chats`),dh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mM=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gM=()=>xw({mutationFn:e=>mM(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},gm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=en(),r=Ln();return b.jsxs(gn.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:ze("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(B.TooltipBackground),color:r.getColor(B.TooltipText)},children:[b.jsx(gn.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(B.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),b.jsx("div",{className:ze("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yM="/notify.mp3",vf=async()=>{await new Audio(yM).play()};function vM({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=$i(),{isHaveChat:i,open:s}=en(),[o,a]=y.useState(0),[l,c]=y.useState(null),f=(u,d)=>{if(l&&clearInterval(l),u||!i||d===0||Number.isNaN(d)){window.document.title=n,c(null);return}const h=setInterval(()=>{if(u||!i||d===0||Number.isNaN(d)){window.document.title=n,clearInterval(h),c(null);return}const m=`${d} Yeni mesajınız var! - ${n}`;window.document.title!==m?window.document.title=m:window.document.title=n},1e3);return c(h),()=>{clearInterval(h),c(null)}};return y.useEffect(()=>f(s,o),[o,s]),y.useEffect(()=>{if(!r||!i||s)return;const u=()=>{!i||s||(a(d=>d+1),vf())};return r.on(at.MessageAgentCreate,u),r.on(at.ChatUserAssignee,vf),()=>{r.off(at.MessageAgentCreate,u),r.off(at.ChatUserAssignee,vf)}},[r,i,s]),!i||o===0?t?e:null:b.jsx(kS,{text:"Yeni mesajlar var!"})}function xM({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=$i(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=en(),[c]=y.useState(!0),f=mm(),u=ka(),d=Ln(),h=gm();y.useEffect(()=>{a&&u.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},w=()=>{s(!1),o(!1),dh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(at.Banned,w),()=>{r.off(at.Banned,w)}},[]),b.jsx("section",{className:"relative w-full h-full",children:b.jsxs(na,{children:[i&&b.jsx(gn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"22.5rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"32rem",left:h?"0":"",borderColor:d.getColor(B.Border)},className:ze("fixed z-300 rounded-md",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),b.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:b.jsxs(na,{children:[!i&&b.jsx(vM,{fallback:b.jsx(kS,{}),fallbackOpen:c}),!i&&b.jsxs(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[b.jsx(gn.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:ze("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(B.ButtonBackground)}}),b.jsx(Me.Chat,{className:"size-6"})]}),i&&!h&&b.jsx(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:b.jsx(Me.X,{className:"size-6"})})]})})]})})}function _S(e){const{widget:t}=en();return b.jsx(vj,{widget:t,children:b.jsx(xM,{...e})})}function Vi(e){this._maxSize=e,this.clear()}Vi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Vi.prototype.get=function(e){return this._values[e]};Vi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bM=/^\d/,SM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TM=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,Hy=new Vi(ym),Wy=new Vi(ym),Ky=new Vi(ym),Ti={Cache:Vi,split:hh,normalizePath:xf,setter:function(e){var t=xf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=xf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(vm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EM(Array.isArray(e)?e:hh(e),t,n)}};function xf(e){return Hy.get(e)||Hy.set(e,hh(e).map(function(t){return t.replace(TM,"$2")}))}function hh(e){return e.match(wM)||[""]}function EM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_M(i)&&(i='"'+i+'"'),a=vm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function vm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CM(e){return e.match(bM)&&!e.match(PS)}function kM(e){return SM.test(e)}function _M(e){return!vm(e)&&(CM(e)||kM(e))}const PM=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PM)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AM=e=>Zu(AS(e)),RM=e=>xm(e,"_"),OM=e=>xm(e,"-"),jM=e=>Zu(xm(e," ")),MM=e=>Xu(e).map(Zu).join(" ");var wf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AM,snakeCase:RM,kebabCase:OM,sentenceCase:jM,titleCase:MM},wm={exports:{}};wm.exports=function(e){return RS(NM(e),e)};wm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DM(t),a=FM(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,f,u){if(u.has(c)){var d;try{d=", node was:"+JSON.stringify(c)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),f=h.length){u.add(c);do{var m=h[--f];l(m,a.get(m),u)}while(f);u.delete(c)}r[--n]=c}}}function NM(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DM(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LM=wm.exports;const IM=Hs(LM),$M=Object.prototype.toString,VM=Error.prototype.toString,BM=RegExp.prototype.toString,zM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UM=/^Symbol\((.*)\)(.*)$/;function HM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zM.call(e).replace(UM,"Symbol($1)");const r=$M.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VM.call(e)+"]":r==="RegExp"?BM.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,MS,NS,WM=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(wt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}MS=Symbol.hasInstance;NS=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WM,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[NS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[MS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},pt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KM={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ph={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qM={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GM={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QM={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return wt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:pt,number:KM,date:ph,object:Il,array:GM,boolean:qM,tuple:QM});const bm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class Bi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Bi.prototype.__isYupRef=!0;const fi=e=>e==null;function Gi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:f,params:u,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Bi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},u,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new wt(wt.formatError(I.message||d,re),n,re.path,I.type||c,re.disableStackTrace);return ie.params=re,ie}const E=w?a:l;let S={path:r,parent:m,type:c,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{wt.isError(I)?E(I):I?l(null):E(v())},k=I=>{wt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var M;if(j=f.call(S,n,S),typeof((M=j)==null?void 0:M.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YM(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,c)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",d=c?parseInt(f,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=u?e.spec.types[d]:e.innerType}if(!c){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(Bi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ds(e,t=new Map){if(bm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=ds(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,ds(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ds(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ds(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ds(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(h)}},[t]),w.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Pp(z2),u=y.useId();let f=!0,c=y.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(c={...c}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(V2,{isPresent:n,anchorX:a,children:e})),w.jsx(Hu.Provider,{value:c,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const ji=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Iw(o),f=y.useMemo(()=>b0(e),[e]),c=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Pp(()=>new Map),[x,b]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);c.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,c.length,c.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);c.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),b(f),null}const{forceRender:E}=y.useContext(_p);return w.jsx(w.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||c.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(N=>{N||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(u==null||u()),r&&r())};return w.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Op(e,t){e.indexOf(t)===-1&&e.push(t)}function jp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let $d=()=>{};const Vd={skipAnimations:!1,useManualTiming:!1};function Np(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Mp{constructor(){this.subscriptions=[]}add(t){return Op(this.subscriptions,t),()=>jp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Np(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Dp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Np(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},xo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Dp(e)?xo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||Bd.easeOut):Bd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const f={[t]:n};l&&(f.offset=l);const c=Bw(a,i);return Array.isArray(c)&&(f.easing=c),e.animate(f,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:u})}function Fp(e){return typeof e=="function"&&"applyToOptions"in e}function Lp(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Ip(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ip(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in Bd||ia())||Dp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){o.has(c)&&(f.schedule(c),e()),l++,c(a)}const f={schedule:(c,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(c),x.has(c)||x.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(c))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:$p,cancel:M4}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:Ge,steps:ef}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(Ge.isProcessing||Vd.useManualTiming?Ge.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},an={x:!1,y:!1};function Hw(){return an.x||an.y}function J2(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const f=c=>{E0(c)&&(u(c),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,Vp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const wo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function tf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(wo.has(n))return;tf(n,"down");const i=C0(()=>{tf(n,"up")}),s=()=>tf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return Vp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||wo.has(l))return;wo.add(l);const u=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),!(!k0(h)||!wo.has(l))&&(wo.delete(l),typeof u=="function"&&u(h,{success:m}))},c=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",c,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>iP(u,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Mp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zs={};for(const e in P0)zs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)zs[t]={...zs[t],...e[t]}}const uP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Bp=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zp=["initial",...Bp];function qu(e){return Ku(e.animate)||zp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function ls(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ls(n)&&(n.current=r))},[t])}const Up=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Up(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,b;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(Rp).reducedMotion,u=y.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=u.current,c=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(u.current,n,i,c);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),$p.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&ls(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:u})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let u;const f={...y.useContext(Rp),...a,layoutId:bP(a)},{isStatic:c}=f,d=pP(a),h=r(a,c);if(!c&&Ap){SP();const m=TP(f);u=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return w.jsxs(Wu.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,c,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(_p).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=zs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Hp=Jw("--"),EP=Jw("var(--"),Wp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Hp(t)&&(aa[t].isCSSVariable=!0)}const Ys=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$i=new Set(Ys);function eb(e,{layout:t,layoutId:n}){return $i.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const it=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,er=(e,t,n)=>n>t?t:n<e?e:n,Xs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Xs,transform:e=>er(0,1,e)},ll={...Xs,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),W=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:la,originX:R0,originY:R0,originZ:W},O0={...Xs,transform:Math.round},Kp={...AP,...RP,zIndex:O0,size:W,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Ys.length;function NP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Ys[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=tb(a,Kp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if($i.has(l)){o=!0;continue}else if(Hp(l)){i[l]=u;continue}else{const f=tb(u,Kp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=NP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}const Gp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!it(t[r])&&!eb(r,n)&&(e[r]=t[r])}function MP({transformTemplate:e},t){return y.useMemo(()=>{const n=Gp();return qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,MP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=W.transform(-r);const o=W.transform(t),a=W.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:W.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Yp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(qp(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Gp(),attrs:{}}),Xp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Yp(s,t,Xp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Qp(n)?zP:FP)(r,s,o,n),u=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=y.useMemo(()=>it(c)?c.get():c,[c]);return y.createElement(n,{...f,children:d})}}function N0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zp(e,t,n,r){if(typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=N0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const zd=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>zd(e)?e[e.length-1]||0:e;function Ol(e){const t=it(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Pp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),u=Qw(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const c=f?a:o;if(c&&typeof c!="boolean"&&!Ku(c)){const d=Array.isArray(c)?c:[c];for(let h=0;h<d.length;h++){const m=Zp(e,d[h]);if(m){const{transitionEnd:x,transition:b,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function Jp(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:Jp,createRenderState:Gp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Up(i),t.attrs[i])}function ub(e,t,n){const r=Jp(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Ys.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const M0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if($i.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<M0.length;a++){const l=M0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Yp(r,i,Xp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return Zp(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Ys]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(it(e)&&e.add)}function Ud(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Vd.WillChange){const r=new Vd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Zt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),em=pb(mb),gb=hb(em),yb=e=>(e*=2)<1?.5*em(e):.5*(2-Math.pow(2,-10*(e-1))),tm=e=>1-Math.sin(Math.acos(e)),vb=pb(tm),xb=hb(tm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Oo=e=>Math.round(e*1e5)/1e5,nm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(nm);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>er(0,255,e),nf={...Xs,transform:e=>Math.round(oA(e))},ui={test:rm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+nf.transform(e)+", "+nf.transform(t)+", "+nf.transform(n)+", "+Oo(la.transform(r))+")"};function aA(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Hd={test:rm("#"),parse:aA,transform:ui.transform},us={test:rm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Oo(t))+", "+jn.transform(Oo(n))+", "+Oo(la.transform(r))+")"},nt={test:e=>ui.test(e)||Hd.test(e)||us.test(e),parse:e=>ui.test(e)?ui.parse(e):us.test(e)?us.parse(e):Hd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):us.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nm))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(nt.test(l)?(r.color.push(s),i.push(Tb),n.push(nt.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Oo(i[o]):a===Tb?s+=nt.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nm)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Wd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Kp,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:Wd,WebkitFilter:Wd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Wd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,Kd=e=>{const t=ci(Math.atan2(e[1],e[0]));return qd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qd=e=>(e=e%360,e<0&&(e+=360),e),F0=Kd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>qd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>qd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Gd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Xs||e===W,CA=new Set(["x","y","z"]),kA=Ys.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Us={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gd(t,"x"),y:(e,{transform:t})=>Gd(t,"y")};Us.translateX=Us.x;Us.translateY=Us.y;const Si=new Set;let Qd=!1,Yd=!1;function Pb(){if(Yd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yd=!1,Qd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yd=!0)})}function PA(){Ab(),Pb()}class im{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Qd||(Qd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return Wp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Nb=[Xs,W,jn,ur,PP,_P,OA],B0=e=>Nb.find(jb(e));class Mb extends im{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Wp(u))){const f=Ob(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Us[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Us[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Fp(n))&&r}const MA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(MA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!NA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function rf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rf(l,a,e+1/3),s=rf(l,a,e),o=rf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const sf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Hd,ui,us],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===us&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=sf(n.red,r.red,s),i.green=sf(n.green,r.green,s),i.blue=sf(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Xd=new Set(["none","hidden"]);function VA(e,t){return Xd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function sm(e){return typeof e=="number"?BA:typeof e=="string"?Wp(e)?yu:nt.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?nt.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>sm(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sm(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Xd.has(e)&&!i.values.length||Xd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):sm(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},of=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=er(Ce.minDamping,Ce.maxDamping,o),e=er(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=Zd(u,o),m=Math.exp(-c);return of-d/h*m},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-c),x=Zd(Math.pow(u,2),o);return(-i(u)+of>0?-1:1)*((d-h)*m)/x}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-of+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Zd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*er(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:f,duration:c,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=u/(2*Math.sqrt(l*f)),b=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(b)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Zd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*b)/S*Math.sin(S*C)+b*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(b+(m+p*b)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*b)*Math.sinh(P)+S*b*Math.cosh(P))/S}}const E={calculatedDuration:h&&c||null,next:S=>{const C=v(S);if(h)a.done=S>=c;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Ip(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const b=c+x,p=o===void 0?b:o(b);p!==b&&(x=p-c);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),N=v(P);d.done=Math.abs(j)<=u,d.value=d.done?p:N};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Zt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:tm,circInOut:xb,circOut:vb,backIn:em,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Dp(e)){$d(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return $d(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Zt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if($d(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,u=f=>{if(o&&f<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(f<e[c+1]);c++);const d=ra(e[c],e[c+1],f);return a[c](d)};return n?f=>u(er(e[0],e[s-1],f)):u}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>Ge.isProcessing?Ge.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class om extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||im,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Fp(n)?n:lR[n]||xu;let l,u;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Ip(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/c;let j=Math.floor(P),N=P%1;!N&&P>=1&&(N=1),N===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(N=1-N,x&&(N-=x/c)):m==="mirror"&&(E=o)),v=er(0,1,N)*c}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),b&&b(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Np(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Fp(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new om({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Mb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:c,onUpdate:d,motionValue:h,element:m,...x}=this.options,b=pR(t,x);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:c}=this.options;a.set(Gu(t,this.options,n)),c&&c(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Zt;const{animation:r}=n;T0(r,t)}return Zt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,m=new om({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);u.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:$i.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const am=(e,t,n,r={},i,s)=>o=>{const a=Lp(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let c=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(c=!0)),f.allowFlatten=!a.type&&!a.ease,c&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new om(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const c=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||u&&SR(u,f))continue;const h={delay:n,...Lp(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const b=fb(e);if(b){const p=window.MotionHandoffAnimation(b,f,he);p!==null&&(h.startTime=p,m=!0)}}Ud(e,f),c.start(am(f,c,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=c.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function Jd(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=i;return TR(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,f]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(ER).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(Jd(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Jd(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Jd(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=zp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=zp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Bp].reverse(),PR=Bp.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(u,f)=>{var d;const c=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(c){const{transition:h,transitionEnd:m,...x}=c;u={...u,...x,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=Ub(e.parent)||{},c=[],d=new Set;let h={},m=1/0;for(let b=0;b<PR;b++){const p=_R[b],g=n[p],v=u[p]!==void 0?u[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=b);let C=v===f[p]&&v!==u[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||b>m&&E,j=!1;const N=Array.isArray(v)?v:[v];let I=N.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let B=!1;zd(O)&&zd(L)?B=!zb(O,L):B=O!==L,B?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&c.push(...N.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const b={};if(typeof u.initial!="boolean"){const p=ua(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(b.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),b[p]=g??null}),c.push({animation:b})}let x=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(c):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)==null||c.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let NR=0;class MR extends Gr{constructor(){super(...arguments),this.id=NR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:MR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>Vp(t)&&e(t,Ra(t));function jo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function ct(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),cs=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ht(e){return[e("x"),e("y")]}function af(e){return e===void 0||e===1}function eh({scale:e,scaleX:t,scaleY:n}){return!af(e)||!af(t)||!af(n)}function ni(e){return eh(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function th(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){th(e.x,t.translate,t.scale,t.originPoint),th(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ds(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&ds(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function fs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);th(e,t,n,s,r)}function ds(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(fs(r.x,i.offset.x),fs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=uf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=c,{timestamp:x}=Ge;this.history.push({...m,timestamp:x});const{onStart:b,onMove:p}=this.handlers;d||(b&&b(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=lf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=uf(c.type==="pointercancel"?this.lastMoveEventInfo:lf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,b),m&&m(c,b)},!Vp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=lf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ge;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,uf(a,this.history)),this.removeListeners=Aa(jo(this.contextWindow,"pointermove",this.handlePointerMove),jo(this.contextWindow,"pointerup",this.handlePointerUp),jo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function lf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),er(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nh=.35;function tO(e=nh){return e===!1?e=0:e===!0&&(e=nh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,c)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(b=>{let p=this.getAxisMotionValue(b).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[b];v&&(p=ct(v)*(parseFloat(p)/100))}}this.originPoint[b]=p}),m&&he.postRender(()=>m(f,c)),Ud(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:b}=c;if(h&&this.currentDirection===null){this.currentDirection=iO(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",c.point,b),this.updateAxis("y",c.point,b),this.visualElement.render(),x&&x(f,c)},a=(f,c)=>this.stop(f,c),l=()=>Ht(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)==null?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&ls(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ls(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ht(f=>{if(!ul(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ud(this.visualElement,t),r.start(am(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ht(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ls(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ht(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(be(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=jo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ls(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ht(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=nh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=jo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const co={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$p.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Jb(e){const[t,n]=Iw(),r=y.useContext(_p);return w.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:co,borderTopRightRadius:co,borderBottomLeftRadius:co,borderBottomRightRadius:co,boxShadow:aO};function cO(e,t,n){const r=it(e)?e:sa(e);return r.start(am("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Op(this.children,t),this.isDirty=!0}remove(t){jp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||W.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),u=yy(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||gy(l)===gy(u)?(e[a]=Math.max(be(my(l),my(u),r),0),(jn.test(u)||jn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Zt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function zt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return ct(e.x)/ct(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Op(this.members,t),t.scheduleRender()}remove(t){if(jp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const cf=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function ff(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(MO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Mp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,v);const E={...Lp(x,"layout"),onPlay:b,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(NO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();Ge.delta=er(0,1e3/60,a-Ge.timestamp),Ge.timestamp=a,Ge.isProcessing=!0,ef.update.process(Ge),ef.preRender.process(Ge),ef.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$p.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(fs(a.x,f.offset.x),fs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&zt(a,o),fs(a.x,c.offset.x),fs(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();zt(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ds(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&ds(l,f.latestValues)}return ni(this.latestValues)&&ds(l,this.latestValues),l}removeTransform(o){const a=Pe();zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ni(u.latestValues))continue;eh(u.latestValues)&&u.updateSnapshot();const f=Pe(),c=u.measurePageBox();zt(f,c),Sy(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:c}=this.options;if(!(!this.layout||!(f||c))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||eh(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(l=!1),l)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;zt(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cs(),this.projectionDelta=cs(),this.projectionDeltaWithTransform=cs()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,b=this.getStack(),p=!b||b.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(c.x,o.x,S),Oy(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),zt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&oS(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const c=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}zt(a,l),ds(a,f),No(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ff("z",o,u,this.animationValues);for(let f=0;f<cf.length;f++)ff(`rotate${cf[f]}`,o,u,this.animationValues),ff(`skew${cf[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:c,y:d}=this.projectionDelta;a.transformOrigin=`${c.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:b}=aa[h],p=a.transform==="none"?f[h]:m(f[h],u);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else b?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(d);d.min=r[c].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ht(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=ct(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=cs();No(a,r,t.layoutBox);const l=cs();o?No(l,e.applyTransform(i,!0),t.measuredBox):No(l,r,t.layoutBox);const u=!nS(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function NO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function MO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},Ny=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),My=Ny("applewebkit/")&&!Ny("chrome/")?Math.round:Zt;function Dy(e){e.min=My(e.min),e.max=My(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),df={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!df.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),df.current=e}return df.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rh=new WeakMap,hf=new WeakMap,GO=e=>{const t=rh.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;hf.has(n)||hf.set(n,{});const r=hf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return rh.set(e,n),r.observe(e),()=>{rh.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},ih={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Ap)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ih.current=e.matches;e.addListener(t),t()}else ih.current=!1}const ij=[...Nb,nt,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=im,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&it(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ih.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$i.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zs){const n=zs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Zp(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!it(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Mb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if($i.has(n))return TA(t,n);{const r=uj(t),i=(Hp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jp(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($i.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Up(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Yp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Xp(t.tagName),super.mount(t)}}const dj=(e,t)=>Qp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),Re=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),At=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[K.Background]:"",[K.Border]:"initial",[K.TooltipText]:At("blue-700"),[K.TooltipBackground]:At("blue-100"),[K.TooltipBorder]:At("blue-500"),[K.HeaderBackground]:At("blue-600"),[K.HeaderBorder]:"initial",[K.HeaderText]:"white",[K.FooterBackground]:"",[K.FooterBorder]:"",[K.FooterText]:"",[K.MessageAdminBackground]:"",[K.MessageAdminText]:"",[K.MessageVisitorBackground]:"",[K.MessageVisitorText]:"",[K.GreeterBackground]:"white",[K.GreeterText]:At("slate-700"),[K.GreeterBorder]:At("slate-200"),[K.GreeterTopBackground]:"linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%)",[K.GreeterTopText]:"white",[K.GreeterButtonBackground]:At("indigo-600"),[K.GreeterButtonText]:At("white"),[K.ButtonBackground]:At("indigo-600"),[K.ButtonText]:At("white"),[K.InputBackground]:At("white"),[K.InputText]:At("slate-800"),[K.InputBorder]:At("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return w.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const nr=()=>y.useContext(cS);function Gn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=K.ButtonText,bgKey:u=K.ButtonBackground,animations:f={},withoutTheming:c,...d}){const h=nr();return w.jsx(Re.button,{type:t,className:Ne("flex items-center justify-center focus:!ring-0 font-medium",{"rounded-full":o&&i!=="xs","rounded-lg":!o},a,w0[n]&&w0[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!c&&{color:h.getColor(l),backgroundColor:h.getColor(u),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function De(){}De.Home=function(t){return w.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};De.Chat=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Menu=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});De.MessageTyping=({className:e="size-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});De.Check=function(t){return w.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:w.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};De.Website=function(t){return w.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),w.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),w.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};De.ArrowDown=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});De.XCircle=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});De.X=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});De.PaperAirplane=({className:e="e-5",...t})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})});const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Nl=Object.create(null);Object.keys(Mn).forEach(e=>{Nl[Mn[e]]=e});const sh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Mn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));lm(e,!1,n=>{pf||(pf=new TextEncoder),t(pf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)bo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=bo[e.charCodeAt(r)],o=bo[e.charCodeAt(r+1)],a=bo[e.charCodeAt(r+2)],l=bo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},bj=typeof ArrayBuffer=="function",um=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Nl[n]?e.length>1?{type:Nl[n],data:e.substring(1)}:{type:Nl[n]}:sh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{lm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=um(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let mf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){mf||(mf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(sh);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(um(s?l:mf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(sh);break}}}})}const gS=4;function Me(e){if(e)return _j(e)}function _j(e){for(var t in Me.prototype)e[t]=Me.prototype[t];return e}Me.prototype.on=Me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Me.prototype.emitReserved=Me.prototype.emit;Me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Qt.setTimeout,Rj=Qt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Qt),e.clearTimeoutFn=Rj.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}const Oj=1.33;function jj(e){return typeof e=="string"?Nj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Nj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Mj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class cm extends Me{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=um(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Mj(t);return n.length?"?"+n:""}}class Lj extends cm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nn extends Me{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Nn.requestsCount++,Nn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Nn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Nn.requestsCount=0;Nn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Nn.requests)Nn.requests.hasOwnProperty(e)&&Nn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends cm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;lm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const gf=Qt.WebSocket||Qt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new gf(t,n,r):n?new gf(t,n):new gf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends cm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function oh(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const ah=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];ah&&addEventListener("offline",()=>{Ml.forEach(e=>e())},!1);class Lr extends Me{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=oh(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=oh(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),ah&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ah&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ml.indexOf(this._offlineEventListener);r!==-1&&Ml.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=oh(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eN=typeof ArrayBuffer=="function",tN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nN=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rN=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function fm(e){return eN&&(e instanceof ArrayBuffer||tN(e))||nN&&e instanceof Blob||rN&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(fm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iN(e){const t=[],n=e.data,r=e;return r.data=lh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function lh(e,t){if(!e)return e;if(fm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=lh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=lh(e[r],t));return n}return e}function sN(e,t){return e.data=uh(e.data,t),delete e.attachments,e}function uh(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=uh(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=uh(e[n],t));return e}const oN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aN=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lN{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iN(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class dm extends Me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(fm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(dm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oN.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:dm,Encoder:lN,get PacketType(){return te},protocol:aN},Symbol.toStringTag,{value:"Module"}));function fn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends Me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[fn(t,"open",this.onopen.bind(this)),fn(t,"packet",this.onpacket.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fN.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zs.prototype.reset=function(){this.attempts=0};Zs.prototype.setMin=function(e){this.ms=e};Zs.prototype.setMax=function(e){this.max=e};Zs.prototype.setJitter=function(e){this.jitter=e};class ch extends Me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cN;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=fn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=fn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fo={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=fo[i]&&s in fo[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new ch(r,t):(fo[i]||(fo[i]=new ch(r,t)),l=fo[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:ch,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),Vi=()=>y.useContext(ES),dN=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const c=Fl(Ek,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});c.on("error",d=>{console.error("Websocket error",d)}),c.on("connect",()=>{n(c),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(c,d)=>{t&&t.on(c,d)},u=(c,d)=>{t&&t.off(c,d)},f=(c,d,h)=>{t&&t.emit(c,d,h)};return w.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:u,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),ut=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(ut||{});const hm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=k4.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,u])=>a.replace(`:${l}`,u),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hN=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pN=e=>Ea(`clients/${e}/chats`),fh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mN=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gN=()=>xw({mutationFn:e=>mN(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},pm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=tn(),r=nr();return w.jsxs(Re.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:Ne("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(K.TooltipBackground),color:r.getColor(K.TooltipText)},children:[w.jsx(Re.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(K.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),w.jsx("div",{className:Ne("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yN="/notify.mp3",yf=async()=>{await new Audio(yN).play()};function vN({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=Vi(),{isHaveChat:i,open:s}=tn(),[o,a]=y.useState(!0),[l,u]=y.useState(0),[f,c]=y.useState(null),d=(h,m)=>{if(f&&clearInterval(f),h||!i||m===0||Number.isNaN(m)){window.document.title=n,c(null);return}const x=setInterval(()=>{if(h||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(x),c(null);return}const b=`${m} Yeni mesajınız var! - ${n}`;window.document.title!==b?window.document.title=b:window.document.title=n},1e3);return c(x),()=>{clearInterval(x),c(null)}};return y.useEffect(()=>d(s&&o,l),[l,s,o]),y.useEffect(()=>{const h=()=>{a(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",h,!1),()=>{document.removeEventListener("visibilitychange",h)}},[]),y.useEffect(()=>{if(!r||!i||s&&o)return;const h=()=>{!i||s&&o||(u(m=>m+1),yf())};return r.on(ut.MessageAgentCreate,h),r.on(ut.ChatUserAssignee,yf),()=>{r.off(ut.MessageAgentCreate,h),r.off(ut.ChatUserAssignee,yf)}},[r,i,s,o]),s?null:!i||l===0?t?e:null:w.jsx(kS,{text:"Yeni mesajlar var!"})}function xN({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=Vi(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=tn(),[u]=y.useState(!0),f=hm(),c=ka(),d=nr(),h=pm();y.useEffect(()=>{a&&c.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},b=()=>{s(!1),o(!1),fh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(ut.Banned,b),()=>{r.off(ut.Banned,b)}},[]),w.jsx("section",{className:"relative w-full h-full",children:w.jsxs(ji,{children:[i&&w.jsx(Re.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",damping:25,stiffness:300,duration:.3},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"21rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"30rem",left:h?"0":"",borderColor:d.getColor(K.Border),boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05)"},className:Ne("fixed z-300 overflow-hidden rounded-xl",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),w.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:w.jsxs(ji,{children:[w.jsx(vN,{fallback:w.jsx(kS,{}),fallbackOpen:u}),!i&&w.jsxs(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[w.jsx(Re.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:Ne("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(K.ButtonBackground)}}),w.jsx(De.Chat,{className:"size-7"})]}),i&&!h&&w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:w.jsx(De.X,{className:"size-7"})})]})})]})})}function _S(e){const{widget:t}=tn();return w.jsx(vj,{widget:t,children:w.jsx(xN,{...e})})}function Bi(e){this._maxSize=e,this.clear()}Bi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Bi.prototype.get=function(e){return this._values[e]};Bi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wN=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bN=/^\d/,SN=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TN=/^\s*(['"]?)(.*?)(\1)\s*$/,mm=512,Hy=new Bi(mm),Wy=new Bi(mm),Ky=new Bi(mm),Ti={Cache:Bi,split:dh,normalizePath:vf,setter:function(e){var t=vf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=vf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(gm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EN(Array.isArray(e)?e:dh(e),t,n)}};function vf(e){return Hy.get(e)||Hy.set(e,dh(e).map(function(t){return t.replace(TN,"$2")}))}function dh(e){return e.match(wN)||[""]}function EN(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_N(i)&&(i='"'+i+'"'),a=gm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function gm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CN(e){return e.match(bN)&&!e.match(PS)}function kN(e){return SN.test(e)}function _N(e){return!gm(e)&&(CN(e)||kN(e))}const PN=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PN)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),ym=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AN=e=>Zu(AS(e)),RN=e=>ym(e,"_"),ON=e=>ym(e,"-"),jN=e=>Zu(ym(e," ")),NN=e=>Xu(e).map(Zu).join(" ");var xf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AN,snakeCase:RN,kebabCase:ON,sentenceCase:jN,titleCase:NN},vm={exports:{}};vm.exports=function(e){return RS(MN(e),e)};vm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DN(t),a=FN(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,a.get(m),c)}while(f);c.delete(u)}r[--n]=u}}}function MN(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DN(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FN(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LN=vm.exports;const IN=Ws(LN),$N=Object.prototype.toString,VN=Error.prototype.toString,BN=RegExp.prototype.toString,zN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UN=/^Symbol\((.*)\)(.*)$/;function HN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zN.call(e).replace(UN,"Symbol($1)");const r=$N.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VN.call(e)+"]":r==="RegExp"?BN.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,NS,MS,WN=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(bt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}NS=Symbol.hasInstance;MS=Symbol.toStringTag;class bt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WN,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[MS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,bt)}static[NS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},gt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KN={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qN={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GN={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QN={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return bt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:gt,number:KN,date:hh,object:Il,array:GN,boolean:qN,tuple:QN});const xm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var u;let f=o(...a)?i:s;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!xm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class zi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}zi.prototype.__isYupRef=!0;const fi=e=>e==null;function Qi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:b=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return zi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},c,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new bt(bt.formatError(I.message||d,re),n,re.path,I.type||u,re.disableStackTrace);return ie.params=re,ie}const E=b?a:l;let S={path:r,parent:m,type:u,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{bt.isError(I)?E(I):I?l(null):E(v())},k=I=>{bt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var N;if(j=f.call(S,n,S),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YN(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(zi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function hs(e,t=new Map){if(xm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=hs(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,hs(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(hs(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=hs(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=hs(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
- `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:c}=t,f=x=>{i||(i=!0,n(x,o))},u=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return u([]);let m={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&u(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,d,h)=>this.resolve(f)._validate(c,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{wt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new wt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw wt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new wt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(wt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(wt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ds(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Gi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Gi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Gi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=OS(t).map(s=>new Bi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Gi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Gi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Gi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,f)=>f.findIndex(u=>u.name===l.name)===c)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=YM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const XM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZM(e){const t=mh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function mh(e){var t,n;const r=XM.exec(e);return r?{year:$n(r[1]),month:$n(r[2],1)-1,day:$n(r[3],1),hour:$n(r[4]),minute:$n(r[5]),second:$n(r[6]),millisecond:r[7]?$n(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:$n(r[10]),minuteOffset:$n(r[11])}:null}function $n(e,t=0){return Number(e)||t}let JM=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eN=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,tN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nN="^\\d{4}-\\d{2}-\\d{2}",rN="\\d{2}:\\d{2}:\\d{2}",iN="(([+-]\\d{2}(:?\\d{2})?)|Z)",sN=new RegExp(`${nN}T${rN}(\\.\\d+)?${iN}$`),oN=e=>fi(e)||e===e.trim(),aN={}.toString();function Eu(){return new DS}class DS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===aN?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=pt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=pt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=pt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||pt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=pt.email){return this.matches(JM,{name:"email",message:t,excludeEmptyString:!0})}url(t=pt.url){return this.matches(eN,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=pt.uuid){return this.matches(tN,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(sN,{name:"datetime",message:n||pt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||pt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=mh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||pt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=mh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=pt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:oN})}lowercase(t=pt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=pt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=DS.prototype;let lN=new Date(""),uN=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return uN(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=ZM(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Bi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=ph.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=ph.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=lN;Ju.prototype;function cN(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),Bi.isRef(a)&&a.isSibling?s(a.path,o):bm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return IM.array(Array.from(r),n).reverse()}function Qy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function FS(e){return(t,n)=>Qy(e,t)-Qy(e,n)}const fN=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const dN=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Yy=e=>Object.prototype.toString.call(e)==="[object Object]";function Xy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const hN=FS([]);function Sm(e){return new LS(e)}class LS extends Fn{constructor(t){super({type:"object",check(n){return Yy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=hN,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const u of a){let d=s[u],h=u in i;if(d){let m,x=i[u];c.path=(n.path?`${n.path}.`:"")+u,d=d.resolve({value:x,context:n.context,parent:l});let w=d instanceof Fn?d.spec:void 0,p=w==null?void 0:w.strict;if(w!=null&&w.strip){f=f||u in i;continue}m=!n.__validating||!p?d.cast(i[u],c):i[u],m!==void 0&&(l[u]=m)}else h&&!o&&(l[u]=i[u]);(h!==u in l||l[u]!==i[u])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,c)=>{if(!a||!Yy(c)){i(l,c);return}o=o||c;let f=[];for(let u of this._nodes){let d=this.fields[u];!d||Bi.isRef(d)||f.push(d.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=cN(t,n),r._sortErrors=FS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return dN(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(fN)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Xy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Xy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(wf.camelCase)}snakeCase(){return this.transformKeys(wf.snakeCase)}constantCase(){return this.transformKeys(t=>wf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Sm.prototype=LS.prototype;var pN=function(t){return mN(t)&&!gN(t)};function mN(e){return!!e&&typeof e=="object"}function gN(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xN(e)}var yN=typeof Symbol=="function"&&Symbol.for,vN=yN?Symbol.for("react.element"):60103;function xN(e){return e.$$typeof===vN}function wN(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(wN(e),e,t):e}function bN(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function SN(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bN,n.isMergeableObject=n.isMergeableObject||pN;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):SN(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var gh=da,IS=typeof global=="object"&&global&&global.Object===Object&&global,TN=typeof self=="object"&&self&&self.Object===Object&&self,In=IS||TN||Function("return this")(),Hr=In.Symbol,$S=Object.prototype,EN=$S.hasOwnProperty,CN=$S.toString,fo=Hr?Hr.toStringTag:void 0;function kN(e){var t=EN.call(e,fo),n=e[fo];try{e[fo]=void 0;var r=!0}catch{}var i=CN.call(e);return r&&(t?e[fo]=n:delete e[fo]),i}var _N=Object.prototype,PN=_N.toString;function AN(e){return PN.call(e)}var RN="[object Null]",ON="[object Undefined]",Zy=Hr?Hr.toStringTag:void 0;function zi(e){return e==null?e===void 0?ON:RN:Zy&&Zy in Object(e)?kN(e):AN(e)}function VS(e,t){return function(n){return e(t(n))}}var Tm=VS(Object.getPrototypeOf,Object);function Ui(e){return e!=null&&typeof e=="object"}var jN="[object Object]",MN=Function.prototype,NN=Object.prototype,BS=MN.toString,DN=NN.hasOwnProperty,FN=BS.call(Object);function Jy(e){if(!Ui(e)||zi(e)!=jN)return!1;var t=Tm(e);if(t===null)return!0;var n=DN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BS.call(n)==FN}function LN(){this.__data__=[],this.size=0}function zS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(zS(e[n][0],t))return n;return-1}var IN=Array.prototype,$N=IN.splice;function VN(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$N.call(t,n,1),--this.size,!0}function BN(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function zN(e){return ec(this.__data__,e)>-1}function UN(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=LN;rr.prototype.delete=VN;rr.prototype.get=BN;rr.prototype.has=zN;rr.prototype.set=UN;function HN(){this.__data__=new rr,this.size=0}function WN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KN(e){return this.__data__.get(e)}function qN(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GN="[object AsyncFunction]",QN="[object Function]",YN="[object GeneratorFunction]",XN="[object Proxy]";function US(e){if(!Oa(e))return!1;var t=zi(e);return t==QN||t==YN||t==GN||t==XN}var bf=In["__core-js_shared__"],ev=function(){var e=/[^.]+$/.exec(bf&&bf.keys&&bf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZN(e){return!!ev&&ev in e}var JN=Function.prototype,eD=JN.toString;function Hi(e){if(e!=null){try{return eD.call(e)}catch{}try{return e+""}catch{}}return""}var tD=/[\\^$.*+?()[\]{}|]/g,nD=/^\[object .+?Constructor\]$/,rD=Function.prototype,iD=Object.prototype,sD=rD.toString,oD=iD.hasOwnProperty,aD=RegExp("^"+sD.call(oD).replace(tD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lD(e){if(!Oa(e)||ZN(e))return!1;var t=US(e)?aD:nD;return t.test(Hi(e))}function uD(e,t){return e==null?void 0:e[t]}function Wi(e,t){var n=uD(e,t);return lD(n)?n:void 0}var ha=Wi(In,"Map"),pa=Wi(Object,"create");function cD(){this.__data__=pa?pa(null):{},this.size=0}function fD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dD="__lodash_hash_undefined__",hD=Object.prototype,pD=hD.hasOwnProperty;function mD(e){var t=this.__data__;if(pa){var n=t[e];return n===dD?void 0:n}return pD.call(t,e)?t[e]:void 0}var gD=Object.prototype,yD=gD.hasOwnProperty;function vD(e){var t=this.__data__;return pa?t[e]!==void 0:yD.call(t,e)}var xD="__lodash_hash_undefined__";function wD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?xD:t,this}function ji(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ji.prototype.clear=cD;ji.prototype.delete=fD;ji.prototype.get=mD;ji.prototype.has=vD;ji.prototype.set=wD;function bD(){this.size=0,this.__data__={hash:new ji,map:new(ha||rr),string:new ji}}function SD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return SD(t)?n[typeof t=="string"?"string":"hash"]:n.map}function TD(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function ED(e){return tc(this,e).get(e)}function CD(e){return tc(this,e).has(e)}function kD(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=bD;Qr.prototype.delete=TD;Qr.prototype.get=ED;Qr.prototype.has=CD;Qr.prototype.set=kD;var _D=200;function PD(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<_D-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Zs(e){var t=this.__data__=new rr(e);this.size=t.size}Zs.prototype.clear=HN;Zs.prototype.delete=WN;Zs.prototype.get=KN;Zs.prototype.has=qN;Zs.prototype.set=PD;function AD(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var tv=function(){try{var e=Wi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function HS(e,t,n){t=="__proto__"&&tv?tv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var RD=Object.prototype,OD=RD.hasOwnProperty;function WS(e,t,n){var r=e[t];(!(OD.call(e,t)&&zS(r,n))||n===void 0&&!(t in e))&&HS(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?HS(n,a,l):WS(n,a,l)}return n}function jD(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var MD="[object Arguments]";function nv(e){return Ui(e)&&zi(e)==MD}var KS=Object.prototype,ND=KS.hasOwnProperty,DD=KS.propertyIsEnumerable,FD=nv(function(){return arguments}())?nv:function(e){return Ui(e)&&ND.call(e,"callee")&&!DD.call(e,"callee")},ja=Array.isArray;function LD(){return!1}var qS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,rv=qS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ID=rv&&rv.exports===qS,iv=ID?In.Buffer:void 0,$D=iv?iv.isBuffer:void 0,GS=$D||LD,VD=9007199254740991,BD=/^(?:0|[1-9]\d*)$/;function zD(e,t){var n=typeof e;return t=t??VD,!!t&&(n=="number"||n!="symbol"&&BD.test(e))&&e>-1&&e%1==0&&e<t}var UD=9007199254740991;function QS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UD}var HD="[object Arguments]",WD="[object Array]",KD="[object Boolean]",qD="[object Date]",GD="[object Error]",QD="[object Function]",YD="[object Map]",XD="[object Number]",ZD="[object Object]",JD="[object RegExp]",e3="[object Set]",t3="[object String]",n3="[object WeakMap]",r3="[object ArrayBuffer]",i3="[object DataView]",s3="[object Float32Array]",o3="[object Float64Array]",a3="[object Int8Array]",l3="[object Int16Array]",u3="[object Int32Array]",c3="[object Uint8Array]",f3="[object Uint8ClampedArray]",d3="[object Uint16Array]",h3="[object Uint32Array]",me={};me[s3]=me[o3]=me[a3]=me[l3]=me[u3]=me[c3]=me[f3]=me[d3]=me[h3]=!0;me[HD]=me[WD]=me[r3]=me[KD]=me[i3]=me[qD]=me[GD]=me[QD]=me[YD]=me[XD]=me[ZD]=me[JD]=me[e3]=me[t3]=me[n3]=!1;function p3(e){return Ui(e)&&QS(e.length)&&!!me[zi(e)]}function Em(e){return function(t){return e(t)}}var YS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,No=YS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,m3=No&&No.exports===YS,Sf=m3&&IS.process,Us=function(){try{var e=No&&No.require&&No.require("util").types;return e||Sf&&Sf.binding&&Sf.binding("util")}catch{}}(),sv=Us&&Us.isTypedArray,g3=sv?Em(sv):p3,y3=Object.prototype,v3=y3.hasOwnProperty;function XS(e,t){var n=ja(e),r=!n&&FD(e),i=!n&&!r&&GS(e),s=!n&&!r&&!i&&g3(e),o=n||r||i||s,a=o?jD(e.length,String):[],l=a.length;for(var c in e)(t||v3.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zD(c,l)))&&a.push(c);return a}var x3=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x3;return e===n}var w3=VS(Object.keys,Object),b3=Object.prototype,S3=b3.hasOwnProperty;function T3(e){if(!Cm(e))return w3(e);var t=[];for(var n in Object(e))S3.call(e,n)&&n!="constructor"&&t.push(n);return t}function ZS(e){return e!=null&&QS(e.length)&&!US(e)}function km(e){return ZS(e)?XS(e):T3(e)}function E3(e,t){return e&&nc(t,km(t),e)}function C3(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var k3=Object.prototype,_3=k3.hasOwnProperty;function P3(e){if(!Oa(e))return C3(e);var t=Cm(e),n=[];for(var r in e)r=="constructor"&&(t||!_3.call(e,r))||n.push(r);return n}function _m(e){return ZS(e)?XS(e,!0):P3(e)}function A3(e,t){return e&&nc(t,_m(t),e)}var JS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,ov=JS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,R3=ov&&ov.exports===JS,av=R3?In.Buffer:void 0,lv=av?av.allocUnsafe:void 0;function O3(e,t){if(t)return e.slice();var n=e.length,r=lv?lv(n):new e.constructor(n);return e.copy(r),r}function eT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function j3(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function tT(){return[]}var M3=Object.prototype,N3=M3.propertyIsEnumerable,uv=Object.getOwnPropertySymbols,Pm=uv?function(e){return e==null?[]:(e=Object(e),j3(uv(e),function(t){return N3.call(e,t)}))}:tT;function D3(e,t){return nc(e,Pm(e),t)}function nT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var F3=Object.getOwnPropertySymbols,rT=F3?function(e){for(var t=[];e;)nT(t,Pm(e)),e=Tm(e);return t}:tT;function L3(e,t){return nc(e,rT(e),t)}function iT(e,t,n){var r=t(e);return ja(e)?r:nT(r,n(e))}function I3(e){return iT(e,km,Pm)}function $3(e){return iT(e,_m,rT)}var yh=Wi(In,"DataView"),vh=Wi(In,"Promise"),xh=Wi(In,"Set"),wh=Wi(In,"WeakMap"),cv="[object Map]",V3="[object Object]",fv="[object Promise]",dv="[object Set]",hv="[object WeakMap]",pv="[object DataView]",B3=Hi(yh),z3=Hi(ha),U3=Hi(vh),H3=Hi(xh),W3=Hi(wh),Un=zi;(yh&&Un(new yh(new ArrayBuffer(1)))!=pv||ha&&Un(new ha)!=cv||vh&&Un(vh.resolve())!=fv||xh&&Un(new xh)!=dv||wh&&Un(new wh)!=hv)&&(Un=function(e){var t=zi(e),n=t==V3?e.constructor:void 0,r=n?Hi(n):"";if(r)switch(r){case B3:return pv;case z3:return cv;case U3:return fv;case H3:return dv;case W3:return hv}return t});var K3=Object.prototype,q3=K3.hasOwnProperty;function G3(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&q3.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mv=In.Uint8Array;function Am(e){var t=new e.constructor(e.byteLength);return new mv(t).set(new mv(e)),t}function Q3(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Y3=/\w*$/;function X3(e){var t=new e.constructor(e.source,Y3.exec(e));return t.lastIndex=e.lastIndex,t}var gv=Hr?Hr.prototype:void 0,yv=gv?gv.valueOf:void 0;function Z3(e){return yv?Object(yv.call(e)):{}}function J3(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eF="[object Boolean]",tF="[object Date]",nF="[object Map]",rF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",aF="[object Symbol]",lF="[object ArrayBuffer]",uF="[object DataView]",cF="[object Float32Array]",fF="[object Float64Array]",dF="[object Int8Array]",hF="[object Int16Array]",pF="[object Int32Array]",mF="[object Uint8Array]",gF="[object Uint8ClampedArray]",yF="[object Uint16Array]",vF="[object Uint32Array]";function xF(e,t,n){var r=e.constructor;switch(t){case lF:return Am(e);case eF:case tF:return new r(+e);case uF:return Q3(e,n);case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:case vF:return J3(e,n);case nF:return new r;case rF:case oF:return new r(e);case iF:return X3(e);case sF:return new r;case aF:return Z3(e)}}var vv=Object.create,wF=function(){function e(){}return function(t){if(!Oa(t))return{};if(vv)return vv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function bF(e){return typeof e.constructor=="function"&&!Cm(e)?wF(Tm(e)):{}}var SF="[object Map]";function TF(e){return Ui(e)&&Un(e)==SF}var xv=Us&&Us.isMap,EF=xv?Em(xv):TF,CF="[object Set]";function kF(e){return Ui(e)&&Un(e)==CF}var wv=Us&&Us.isSet,_F=wv?Em(wv):kF,PF=1,AF=2,RF=4,sT="[object Arguments]",OF="[object Array]",jF="[object Boolean]",MF="[object Date]",NF="[object Error]",oT="[object Function]",DF="[object GeneratorFunction]",FF="[object Map]",LF="[object Number]",aT="[object Object]",IF="[object RegExp]",$F="[object Set]",VF="[object String]",BF="[object Symbol]",zF="[object WeakMap]",UF="[object ArrayBuffer]",HF="[object DataView]",WF="[object Float32Array]",KF="[object Float64Array]",qF="[object Int8Array]",GF="[object Int16Array]",QF="[object Int32Array]",YF="[object Uint8Array]",XF="[object Uint8ClampedArray]",ZF="[object Uint16Array]",JF="[object Uint32Array]",fe={};fe[sT]=fe[OF]=fe[UF]=fe[HF]=fe[jF]=fe[MF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[QF]=fe[FF]=fe[LF]=fe[aT]=fe[IF]=fe[$F]=fe[VF]=fe[BF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=!0;fe[NF]=fe[oT]=fe[zF]=!1;function Do(e,t,n,r,i,s){var o,a=t&PF,l=t&AF,c=t&RF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=G3(e),!a)return eT(e,o)}else{var u=Un(e),d=u==oT||u==DF;if(GS(e))return O3(e,a);if(u==aT||u==sT||d&&!i){if(o=l||d?{}:bF(e),!a)return l?L3(e,A3(o,e)):D3(e,E3(o,e))}else{if(!fe[u])return i?e:{};o=xF(e,u,a)}}s||(s=new Zs);var h=s.get(e);if(h)return h;s.set(e,o),_F(e)?e.forEach(function(w){o.add(Do(w,t,n,w,e,s))}):EF(e)&&e.forEach(function(w,p){o.set(p,Do(w,t,n,p,e,s))});var m=c?l?$3:I3:l?_m:km,x=f?void 0:m(e);return AD(x||e,function(w,p){x&&(p=w,w=e[p]),WS(o,p,Do(w,t,n,p,e,s))}),o}var e5=1,t5=4;function hl(e){return Do(e,e5|t5)}var bv=Array.isArray,Sv=Object.keys,n5=Object.prototype.hasOwnProperty,r5=typeof Element<"u";function bh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=bv(e),r=bv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!bh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return e.toString()==t.toString();var u=Sv(e);if(s=u.length,s!==Sv(t).length)return!1;for(i=s;i--!==0;)if(!n5.call(t,u[i]))return!1;if(r5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!bh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var i5=function(t,n){try{return bh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Hs(i5);var s5=4;function Tv(e){return Do(e,s5)}function lT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var o5="[object Symbol]";function Rm(e){return typeof e=="symbol"||Ui(e)&&zi(e)==o5}var a5="Expected a function";function Om(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(a5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Om.Cache||Qr),n}Om.Cache=Qr;var l5=500;function u5(e){var t=Om(e,function(r){return n.size===l5&&n.clear(),r}),n=t.cache;return t}var c5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f5=/\\(\\)?/g,d5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(c5,function(n,r,i,s){t.push(i?s.replace(f5,"$1"):r||n)}),t}),h5=1/0;function p5(e){if(typeof e=="string"||Rm(e))return e;var t=e+"";return t=="0"&&1/e==-h5?"-0":t}var m5=1/0,Ev=Hr?Hr.prototype:void 0,Cv=Ev?Ev.toString:void 0;function uT(e){if(typeof e=="string")return e;if(ja(e))return lT(e,uT)+"";if(Rm(e))return Cv?Cv.call(e):"";var t=e+"";return t=="0"&&1/e==-m5?"-0":t}function g5(e){return e==null?"":uT(e)}function cT(e){return ja(e)?lT(e,p5):Rm(e)?[e]:eT(d5(g5(e)))}var fT={exports:{}},ue={};/** @license React v16.13.1
98
+ `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:u},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:u}=t,f=x=>{i||(i=!0,n(x,o))},c=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return c([]);let m={value:o,originalValue:a,path:l,options:u,schema:this};for(let x=0;x<s.length;x++){const b=s[x];b(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&c(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:u,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(c,d,h)=>this.resolve(f)._validate(u,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,u)=>{bt.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new bt(l,u,void 0,void 0,s)):o(u)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw bt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new bt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(bt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(bt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):hs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Qi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Qi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Qi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=OS(t).map(s=>new zi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Qi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Qi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Qi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=YN(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const XN=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZN(e){const t=ph(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function ph(e){var t,n;const r=XN.exec(e);return r?{year:In(r[1]),month:In(r[2],1)-1,day:In(r[3],1),hour:In(r[4]),minute:In(r[5]),second:In(r[6]),millisecond:r[7]?In(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:In(r[10]),minuteOffset:In(r[11])}:null}function In(e,t=0){return Number(e)||t}let JN=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eM=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,tM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nM="^\\d{4}-\\d{2}-\\d{2}",rM="\\d{2}:\\d{2}:\\d{2}",iM="(([+-]\\d{2}(:?\\d{2})?)|Z)",sM=new RegExp(`${nM}T${rM}(\\.\\d+)?${iM}$`),oM=e=>fi(e)||e===e.trim(),aM={}.toString();function Eu(){return new DS}class DS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===aM?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=gt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=gt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=gt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||gt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=gt.email){return this.matches(JN,{name:"email",message:t,excludeEmptyString:!0})}url(t=gt.url){return this.matches(eM,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=gt.uuid){return this.matches(tM,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(sM,{name:"datetime",message:n||gt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||gt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=ph(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||gt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=ph(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=gt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:oM})}lowercase(t=gt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=gt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=DS.prototype;let lM=new Date(""),uM=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return uM(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=ZN(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(zi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=hh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=hh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=lM;Ju.prototype;function cM(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),zi.isRef(a)&&a.isSibling?s(a.path,o):xm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return IN.array(Array.from(r),n).reverse()}function Qy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function FS(e){return(t,n)=>Qy(e,t)-Qy(e,n)}const fM=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const dM=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Yy=e=>Object.prototype.toString.call(e)==="[object Object]";function Xy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const hM=FS([]);function wm(e){return new LS(e)}class LS extends Fn{constructor(t){super({type:"object",check(n){return Yy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=hM,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const c of a){let d=s[c],h=c in i;if(d){let m,x=i[c];u.path=(n.path?`${n.path}.`:"")+c,d=d.resolve({value:x,context:n.context,parent:l});let b=d instanceof Fn?d.spec:void 0,p=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}m=!n.__validating||!p?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,u)=>{if(!a||!Yy(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||zi.isRef(d)||f.push(d.asNestedTest({options:n,key:c,parent:u,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:n},r,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=cM(t,n),r._sortErrors=FS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return dM(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(fM)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Xy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Xy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(xf.camelCase)}snakeCase(){return this.transformKeys(xf.snakeCase)}constantCase(){return this.transformKeys(t=>xf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}wm.prototype=LS.prototype;var pM=function(t){return mM(t)&&!gM(t)};function mM(e){return!!e&&typeof e=="object"}function gM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xM(e)}var yM=typeof Symbol=="function"&&Symbol.for,vM=yM?Symbol.for("react.element"):60103;function xM(e){return e.$$typeof===vM}function wM(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(wM(e),e,t):e}function bM(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function SM(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bM,n.isMergeableObject=n.isMergeableObject||pM;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):SM(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var mh=da,IS=typeof global=="object"&&global&&global.Object===Object&&global,TM=typeof self=="object"&&self&&self.Object===Object&&self,Ln=IS||TM||Function("return this")(),Hr=Ln.Symbol,$S=Object.prototype,EM=$S.hasOwnProperty,CM=$S.toString,ho=Hr?Hr.toStringTag:void 0;function kM(e){var t=EM.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var i=CM.call(e);return r&&(t?e[ho]=n:delete e[ho]),i}var _M=Object.prototype,PM=_M.toString;function AM(e){return PM.call(e)}var RM="[object Null]",OM="[object Undefined]",Zy=Hr?Hr.toStringTag:void 0;function Ui(e){return e==null?e===void 0?OM:RM:Zy&&Zy in Object(e)?kM(e):AM(e)}function VS(e,t){return function(n){return e(t(n))}}var bm=VS(Object.getPrototypeOf,Object);function Hi(e){return e!=null&&typeof e=="object"}var jM="[object Object]",NM=Function.prototype,MM=Object.prototype,BS=NM.toString,DM=MM.hasOwnProperty,FM=BS.call(Object);function Jy(e){if(!Hi(e)||Ui(e)!=jM)return!1;var t=bm(e);if(t===null)return!0;var n=DM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BS.call(n)==FM}function LM(){this.__data__=[],this.size=0}function zS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(zS(e[n][0],t))return n;return-1}var IM=Array.prototype,$M=IM.splice;function VM(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$M.call(t,n,1),--this.size,!0}function BM(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function zM(e){return ec(this.__data__,e)>-1}function UM(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=LM;rr.prototype.delete=VM;rr.prototype.get=BM;rr.prototype.has=zM;rr.prototype.set=UM;function HM(){this.__data__=new rr,this.size=0}function WM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KM(e){return this.__data__.get(e)}function qM(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GM="[object AsyncFunction]",QM="[object Function]",YM="[object GeneratorFunction]",XM="[object Proxy]";function US(e){if(!Oa(e))return!1;var t=Ui(e);return t==QM||t==YM||t==GM||t==XM}var wf=Ln["__core-js_shared__"],ev=function(){var e=/[^.]+$/.exec(wf&&wf.keys&&wf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZM(e){return!!ev&&ev in e}var JM=Function.prototype,e3=JM.toString;function Wi(e){if(e!=null){try{return e3.call(e)}catch{}try{return e+""}catch{}}return""}var t3=/[\\^$.*+?()[\]{}|]/g,n3=/^\[object .+?Constructor\]$/,r3=Function.prototype,i3=Object.prototype,s3=r3.toString,o3=i3.hasOwnProperty,a3=RegExp("^"+s3.call(o3).replace(t3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l3(e){if(!Oa(e)||ZM(e))return!1;var t=US(e)?a3:n3;return t.test(Wi(e))}function u3(e,t){return e==null?void 0:e[t]}function Ki(e,t){var n=u3(e,t);return l3(n)?n:void 0}var ha=Ki(Ln,"Map"),pa=Ki(Object,"create");function c3(){this.__data__=pa?pa(null):{},this.size=0}function f3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var d3="__lodash_hash_undefined__",h3=Object.prototype,p3=h3.hasOwnProperty;function m3(e){var t=this.__data__;if(pa){var n=t[e];return n===d3?void 0:n}return p3.call(t,e)?t[e]:void 0}var g3=Object.prototype,y3=g3.hasOwnProperty;function v3(e){var t=this.__data__;return pa?t[e]!==void 0:y3.call(t,e)}var x3="__lodash_hash_undefined__";function w3(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?x3:t,this}function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=c3;Ni.prototype.delete=f3;Ni.prototype.get=m3;Ni.prototype.has=v3;Ni.prototype.set=w3;function b3(){this.size=0,this.__data__={hash:new Ni,map:new(ha||rr),string:new Ni}}function S3(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return S3(t)?n[typeof t=="string"?"string":"hash"]:n.map}function T3(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function E3(e){return tc(this,e).get(e)}function C3(e){return tc(this,e).has(e)}function k3(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=b3;Qr.prototype.delete=T3;Qr.prototype.get=E3;Qr.prototype.has=C3;Qr.prototype.set=k3;var _3=200;function P3(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<_3-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Js(e){var t=this.__data__=new rr(e);this.size=t.size}Js.prototype.clear=HM;Js.prototype.delete=WM;Js.prototype.get=KM;Js.prototype.has=qM;Js.prototype.set=P3;function A3(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var tv=function(){try{var e=Ki(Object,"defineProperty");return e({},"",{}),e}catch{}}();function HS(e,t,n){t=="__proto__"&&tv?tv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var R3=Object.prototype,O3=R3.hasOwnProperty;function WS(e,t,n){var r=e[t];(!(O3.call(e,t)&&zS(r,n))||n===void 0&&!(t in e))&&HS(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?HS(n,a,l):WS(n,a,l)}return n}function j3(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var N3="[object Arguments]";function nv(e){return Hi(e)&&Ui(e)==N3}var KS=Object.prototype,M3=KS.hasOwnProperty,D3=KS.propertyIsEnumerable,F3=nv(function(){return arguments}())?nv:function(e){return Hi(e)&&M3.call(e,"callee")&&!D3.call(e,"callee")},ja=Array.isArray;function L3(){return!1}var qS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,rv=qS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,I3=rv&&rv.exports===qS,iv=I3?Ln.Buffer:void 0,$3=iv?iv.isBuffer:void 0,GS=$3||L3,V3=9007199254740991,B3=/^(?:0|[1-9]\d*)$/;function z3(e,t){var n=typeof e;return t=t??V3,!!t&&(n=="number"||n!="symbol"&&B3.test(e))&&e>-1&&e%1==0&&e<t}var U3=9007199254740991;function QS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U3}var H3="[object Arguments]",W3="[object Array]",K3="[object Boolean]",q3="[object Date]",G3="[object Error]",Q3="[object Function]",Y3="[object Map]",X3="[object Number]",Z3="[object Object]",J3="[object RegExp]",eD="[object Set]",tD="[object String]",nD="[object WeakMap]",rD="[object ArrayBuffer]",iD="[object DataView]",sD="[object Float32Array]",oD="[object Float64Array]",aD="[object Int8Array]",lD="[object Int16Array]",uD="[object Int32Array]",cD="[object Uint8Array]",fD="[object Uint8ClampedArray]",dD="[object Uint16Array]",hD="[object Uint32Array]",me={};me[sD]=me[oD]=me[aD]=me[lD]=me[uD]=me[cD]=me[fD]=me[dD]=me[hD]=!0;me[H3]=me[W3]=me[rD]=me[K3]=me[iD]=me[q3]=me[G3]=me[Q3]=me[Y3]=me[X3]=me[Z3]=me[J3]=me[eD]=me[tD]=me[nD]=!1;function pD(e){return Hi(e)&&QS(e.length)&&!!me[Ui(e)]}function Sm(e){return function(t){return e(t)}}var YS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,Do=YS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,mD=Do&&Do.exports===YS,bf=mD&&IS.process,Hs=function(){try{var e=Do&&Do.require&&Do.require("util").types;return e||bf&&bf.binding&&bf.binding("util")}catch{}}(),sv=Hs&&Hs.isTypedArray,gD=sv?Sm(sv):pD,yD=Object.prototype,vD=yD.hasOwnProperty;function XS(e,t){var n=ja(e),r=!n&&F3(e),i=!n&&!r&&GS(e),s=!n&&!r&&!i&&gD(e),o=n||r||i||s,a=o?j3(e.length,String):[],l=a.length;for(var u in e)(t||vD.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||z3(u,l)))&&a.push(u);return a}var xD=Object.prototype;function Tm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||xD;return e===n}var wD=VS(Object.keys,Object),bD=Object.prototype,SD=bD.hasOwnProperty;function TD(e){if(!Tm(e))return wD(e);var t=[];for(var n in Object(e))SD.call(e,n)&&n!="constructor"&&t.push(n);return t}function ZS(e){return e!=null&&QS(e.length)&&!US(e)}function Em(e){return ZS(e)?XS(e):TD(e)}function ED(e,t){return e&&nc(t,Em(t),e)}function CD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kD=Object.prototype,_D=kD.hasOwnProperty;function PD(e){if(!Oa(e))return CD(e);var t=Tm(e),n=[];for(var r in e)r=="constructor"&&(t||!_D.call(e,r))||n.push(r);return n}function Cm(e){return ZS(e)?XS(e,!0):PD(e)}function AD(e,t){return e&&nc(t,Cm(t),e)}var JS=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ov=JS&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,RD=ov&&ov.exports===JS,av=RD?Ln.Buffer:void 0,lv=av?av.allocUnsafe:void 0;function OD(e,t){if(t)return e.slice();var n=e.length,r=lv?lv(n):new e.constructor(n);return e.copy(r),r}function eT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function jD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function tT(){return[]}var ND=Object.prototype,MD=ND.propertyIsEnumerable,uv=Object.getOwnPropertySymbols,km=uv?function(e){return e==null?[]:(e=Object(e),jD(uv(e),function(t){return MD.call(e,t)}))}:tT;function DD(e,t){return nc(e,km(e),t)}function nT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var FD=Object.getOwnPropertySymbols,rT=FD?function(e){for(var t=[];e;)nT(t,km(e)),e=bm(e);return t}:tT;function LD(e,t){return nc(e,rT(e),t)}function iT(e,t,n){var r=t(e);return ja(e)?r:nT(r,n(e))}function ID(e){return iT(e,Em,km)}function $D(e){return iT(e,Cm,rT)}var gh=Ki(Ln,"DataView"),yh=Ki(Ln,"Promise"),vh=Ki(Ln,"Set"),xh=Ki(Ln,"WeakMap"),cv="[object Map]",VD="[object Object]",fv="[object Promise]",dv="[object Set]",hv="[object WeakMap]",pv="[object DataView]",BD=Wi(gh),zD=Wi(ha),UD=Wi(yh),HD=Wi(vh),WD=Wi(xh),zn=Ui;(gh&&zn(new gh(new ArrayBuffer(1)))!=pv||ha&&zn(new ha)!=cv||yh&&zn(yh.resolve())!=fv||vh&&zn(new vh)!=dv||xh&&zn(new xh)!=hv)&&(zn=function(e){var t=Ui(e),n=t==VD?e.constructor:void 0,r=n?Wi(n):"";if(r)switch(r){case BD:return pv;case zD:return cv;case UD:return fv;case HD:return dv;case WD:return hv}return t});var KD=Object.prototype,qD=KD.hasOwnProperty;function GD(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&qD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mv=Ln.Uint8Array;function _m(e){var t=new e.constructor(e.byteLength);return new mv(t).set(new mv(e)),t}function QD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var YD=/\w*$/;function XD(e){var t=new e.constructor(e.source,YD.exec(e));return t.lastIndex=e.lastIndex,t}var gv=Hr?Hr.prototype:void 0,yv=gv?gv.valueOf:void 0;function ZD(e){return yv?Object(yv.call(e)):{}}function JD(e,t){var n=t?_m(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eF="[object Boolean]",tF="[object Date]",nF="[object Map]",rF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",aF="[object Symbol]",lF="[object ArrayBuffer]",uF="[object DataView]",cF="[object Float32Array]",fF="[object Float64Array]",dF="[object Int8Array]",hF="[object Int16Array]",pF="[object Int32Array]",mF="[object Uint8Array]",gF="[object Uint8ClampedArray]",yF="[object Uint16Array]",vF="[object Uint32Array]";function xF(e,t,n){var r=e.constructor;switch(t){case lF:return _m(e);case eF:case tF:return new r(+e);case uF:return QD(e,n);case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:case vF:return JD(e,n);case nF:return new r;case rF:case oF:return new r(e);case iF:return XD(e);case sF:return new r;case aF:return ZD(e)}}var vv=Object.create,wF=function(){function e(){}return function(t){if(!Oa(t))return{};if(vv)return vv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function bF(e){return typeof e.constructor=="function"&&!Tm(e)?wF(bm(e)):{}}var SF="[object Map]";function TF(e){return Hi(e)&&zn(e)==SF}var xv=Hs&&Hs.isMap,EF=xv?Sm(xv):TF,CF="[object Set]";function kF(e){return Hi(e)&&zn(e)==CF}var wv=Hs&&Hs.isSet,_F=wv?Sm(wv):kF,PF=1,AF=2,RF=4,sT="[object Arguments]",OF="[object Array]",jF="[object Boolean]",NF="[object Date]",MF="[object Error]",oT="[object Function]",DF="[object GeneratorFunction]",FF="[object Map]",LF="[object Number]",aT="[object Object]",IF="[object RegExp]",$F="[object Set]",VF="[object String]",BF="[object Symbol]",zF="[object WeakMap]",UF="[object ArrayBuffer]",HF="[object DataView]",WF="[object Float32Array]",KF="[object Float64Array]",qF="[object Int8Array]",GF="[object Int16Array]",QF="[object Int32Array]",YF="[object Uint8Array]",XF="[object Uint8ClampedArray]",ZF="[object Uint16Array]",JF="[object Uint32Array]",fe={};fe[sT]=fe[OF]=fe[UF]=fe[HF]=fe[jF]=fe[NF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[QF]=fe[FF]=fe[LF]=fe[aT]=fe[IF]=fe[$F]=fe[VF]=fe[BF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=!0;fe[MF]=fe[oT]=fe[zF]=!1;function Fo(e,t,n,r,i,s){var o,a=t&PF,l=t&AF,u=t&RF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=GD(e),!a)return eT(e,o)}else{var c=zn(e),d=c==oT||c==DF;if(GS(e))return OD(e,a);if(c==aT||c==sT||d&&!i){if(o=l||d?{}:bF(e),!a)return l?LD(e,AD(o,e)):DD(e,ED(o,e))}else{if(!fe[c])return i?e:{};o=xF(e,c,a)}}s||(s=new Js);var h=s.get(e);if(h)return h;s.set(e,o),_F(e)?e.forEach(function(b){o.add(Fo(b,t,n,b,e,s))}):EF(e)&&e.forEach(function(b,p){o.set(p,Fo(b,t,n,p,e,s))});var m=u?l?$D:ID:l?Cm:Em,x=f?void 0:m(e);return A3(x||e,function(b,p){x&&(p=b,b=e[p]),WS(o,p,Fo(b,t,n,p,e,s))}),o}var e5=1,t5=4;function hl(e){return Fo(e,e5|t5)}var bv=Array.isArray,Sv=Object.keys,n5=Object.prototype.hasOwnProperty,r5=typeof Element<"u";function wh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=bv(e),r=bv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!wh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,f=t instanceof RegExp;if(u!=f)return!1;if(u&&f)return e.toString()==t.toString();var c=Sv(e);if(s=c.length,s!==Sv(t).length)return!1;for(i=s;i--!==0;)if(!n5.call(t,c[i]))return!1;if(r5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=c[i],!(o==="_owner"&&e.$$typeof)&&!wh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var i5=function(t,n){try{return wh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Ws(i5);var s5=4;function Tv(e){return Fo(e,s5)}function lT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var o5="[object Symbol]";function Pm(e){return typeof e=="symbol"||Hi(e)&&Ui(e)==o5}var a5="Expected a function";function Am(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(a5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Am.Cache||Qr),n}Am.Cache=Qr;var l5=500;function u5(e){var t=Am(e,function(r){return n.size===l5&&n.clear(),r}),n=t.cache;return t}var c5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f5=/\\(\\)?/g,d5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(c5,function(n,r,i,s){t.push(i?s.replace(f5,"$1"):r||n)}),t}),h5=1/0;function p5(e){if(typeof e=="string"||Pm(e))return e;var t=e+"";return t=="0"&&1/e==-h5?"-0":t}var m5=1/0,Ev=Hr?Hr.prototype:void 0,Cv=Ev?Ev.toString:void 0;function uT(e){if(typeof e=="string")return e;if(ja(e))return lT(e,uT)+"";if(Pm(e))return Cv?Cv.call(e):"";var t=e+"";return t=="0"&&1/e==-m5?"-0":t}function g5(e){return e==null?"":uT(e)}function cT(e){return ja(e)?lT(e,p5):Pm(e)?[e]:eT(d5(g5(e)))}var fT={exports:{}},ue={};/** @license React v16.13.1
99
99
  * react-is.production.min.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var He=typeof Symbol=="function"&&Symbol.for,jm=He?Symbol.for("react.element"):60103,Mm=He?Symbol.for("react.portal"):60106,rc=He?Symbol.for("react.fragment"):60107,ic=He?Symbol.for("react.strict_mode"):60108,sc=He?Symbol.for("react.profiler"):60114,oc=He?Symbol.for("react.provider"):60109,ac=He?Symbol.for("react.context"):60110,Nm=He?Symbol.for("react.async_mode"):60111,lc=He?Symbol.for("react.concurrent_mode"):60111,uc=He?Symbol.for("react.forward_ref"):60112,cc=He?Symbol.for("react.suspense"):60113,y5=He?Symbol.for("react.suspense_list"):60120,fc=He?Symbol.for("react.memo"):60115,dc=He?Symbol.for("react.lazy"):60116,v5=He?Symbol.for("react.block"):60121,x5=He?Symbol.for("react.fundamental"):60117,w5=He?Symbol.for("react.responder"):60118,b5=He?Symbol.for("react.scope"):60119;function It(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Nm:case lc:case rc:case sc:case ic:case cc:return e;default:switch(e=e&&e.$$typeof,e){case ac:case uc:case dc:case fc:case oc:return e;default:return t}}case Mm:return t}}}function dT(e){return It(e)===lc}ue.AsyncMode=Nm;ue.ConcurrentMode=lc;ue.ContextConsumer=ac;ue.ContextProvider=oc;ue.Element=jm;ue.ForwardRef=uc;ue.Fragment=rc;ue.Lazy=dc;ue.Memo=fc;ue.Portal=Mm;ue.Profiler=sc;ue.StrictMode=ic;ue.Suspense=cc;ue.isAsyncMode=function(e){return dT(e)||It(e)===Nm};ue.isConcurrentMode=dT;ue.isContextConsumer=function(e){return It(e)===ac};ue.isContextProvider=function(e){return It(e)===oc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};ue.isForwardRef=function(e){return It(e)===uc};ue.isFragment=function(e){return It(e)===rc};ue.isLazy=function(e){return It(e)===dc};ue.isMemo=function(e){return It(e)===fc};ue.isPortal=function(e){return It(e)===Mm};ue.isProfiler=function(e){return It(e)===sc};ue.isStrictMode=function(e){return It(e)===ic};ue.isSuspense=function(e){return It(e)===cc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rc||e===lc||e===sc||e===ic||e===cc||e===y5||typeof e=="object"&&e!==null&&(e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===oc||e.$$typeof===ac||e.$$typeof===uc||e.$$typeof===x5||e.$$typeof===w5||e.$$typeof===b5||e.$$typeof===v5)};ue.typeOf=It;fT.exports=ue;var S5=fT.exports,hT=S5,T5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pT={};pT[hT.ForwardRef]=T5;pT[hT.Memo]=E5;function Ve(){return Ve=Object.assign||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},Ve.apply(this,arguments)}function mT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hc=y.createContext(void 0);hc.displayName="FormikContext";hc.Provider;hc.Consumer;function C5(){var e=y.useContext(hc);return e}var sn=function(t){return typeof t=="function"},pc=function(t){return t!==null&&typeof t=="object"},k5=function(t){return String(Math.floor(Number(t)))===t},Tf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Ef=function(t){return pc(t)&&sn(t.then)};function Pt(e,t,n,r){r===void 0&&(r=0);for(var i=cT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ei(e,t,n){for(var r=Tv(e),i=r,s=0,o=cT(t);s<o.length-1;s++){var a=o[s],l=Pt(e,o.slice(0,s+1));if(l&&(pc(l)||Array.isArray(l)))i=i[a]=Tv(l);else{var c=o[s+1];i=i[a]=k5(c)&&Number(c)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function gT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];pc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},gT(a,t,n,r[o])):r[o]=t}return r}function _5(e,t){switch(t.type){case"SET_VALUES":return Ve({},e,{values:t.payload});case"SET_TOUCHED":return Ve({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:Ve({},e,{errors:t.payload});case"SET_STATUS":return Ve({},e,{status:t.payload});case"SET_ISSUBMITTING":return Ve({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Ve({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Ve({},e,{values:Ei(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Ve({},e,{touched:Ei(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Ve({},e,{errors:Ei(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Ve({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Ve({},e,{touched:gT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return Ve({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Ve({},e,{isSubmitting:!1});default:return e}}var Jr={},pl={};function P5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,c=l===void 0?!1:l,f=e.onSubmit,u=mT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=Ve({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},u),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),x=y.useRef(d.initialTouched||pl),w=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var v=y.useState(0),E=v[1],S=y.useRef({values:hl(d.initialValues),errors:hl(d.initialErrors)||Jr,touched:hl(d.initialTouched)||pl,status:hl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var N=S.current;S.current=_5(N,_),N!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,N){return new Promise(function($,U){var G=d.validate(_,N);G==null?$(Jr):Ef(G)?G.then(function(oe){$(oe||Jr)},function(oe){U(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,N){var $=d.validationSchema,U=sn($)?$(N):$,G=N&&U.validateAt?U.validateAt(N,_):R5(_,U);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(kt){kt.name==="ValidationError"?oe(A5(kt)):_e(kt)})})},[d.validationSchema]),M=y.useCallback(function(_,N){return new Promise(function($){return $(g.current[_].validate(N))})},[]),I=y.useCallback(function(_){var N=Object.keys(g.current).filter(function(U){return sn(g.current[U].validate)}),$=N.length>0?N.map(function(U){return M(U,Pt(_,U))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(U){return U.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ei(G,N[_e],oe)),G},{})})},[M]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(N){var $=N[0],U=N[1],G=N[2],oe=gh.all([$,U,G],{arrayMerge:O5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=zt(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(N){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:N})),N})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var N=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},U=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},G=_&&_.status?_.status:w.current?w.current:d.initialStatus;h.current=N,m.current=$,x.current=U,w.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:U,status:G,values:N,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Na);Ef(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&c&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[c,d.initialValues,xe,o,ie]),y.useEffect(function(){c&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[c,d.initialErrors]),y.useEffect(function(){c&&p.current===!0&&!ri(x.current,d.initialTouched)&&(x.current=d.initialTouched||pl,k({type:"SET_TOUCHED",payload:d.initialTouched||pl}))},[c,d.initialTouched]),y.useEffect(function(){c&&p.current===!0&&!ri(w.current,d.initialStatus)&&(w.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[c,d.initialStatus,d.initialTouched]);var Re=zt(function(_){if(g.current[_]&&sn(g.current[_].validate)){var N=Pt(C.values,_),$=g.current[_].validate(N);return Ef($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(U){return U}).then(function(U){k({type:"SET_FIELD_ERROR",payload:{field:_,value:U}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(U){return U}).then(function(U){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Pt(U,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,N){var $=N.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=zt(function(_,N){k({type:"SET_TOUCHED",payload:_});var $=N===void 0?i:N;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),z=zt(function(_,N){var $=sn(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var U=N===void 0?n:N;return U?ie($):Promise.resolve()}),V=y.useCallback(function(_,N){k({type:"SET_FIELD_ERROR",payload:{field:_,value:N}})},[]),W=zt(function(_,N,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:N}});var U=$===void 0?n:$;return U?ie(Ei(C.values,_,N)):Promise.resolve()}),q=y.useCallback(function(_,N){var $=N,U=_,G;if(!Tf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,kt=oe.name,yn=oe.id,Ki=oe.value,sr=oe.checked,Vm=oe.outerHTML,La=oe.options,Ia=oe.multiple;$=N||kt||yn,U=/number|range/.test(_e)?(G=parseFloat(Ki),isNaN(G)?"":G):/checkbox/.test(_e)?M5(Pt(C.values,$),sr,Ki):La&&Ia?j5(La):Ki}$&&W($,U)},[W,C.values]),ce=zt(function(_){if(Tf(_))return function(N){return q(N,_)};q(_)}),ye=zt(function(_,N,$){N===void 0&&(N=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:N}});var U=$===void 0?i:$;return U?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,N){_.persist&&_.persist();var $=_.target,U=$.name,G=$.id,oe=$.outerHTML,_e=N||U||G;ye(_e,!0)},[ye]),Ie=zt(function(_){if(Tf(_))return function(N){return J(N,_)};J(_)}),dt=y.useCallback(function(_){sn(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),ht=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),Js=zt(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var N=_ instanceof Error,$=!N&&Object.keys(_).length===0;if($){var U;try{if(U=eo(),U===void 0)return}catch(G){throw G}return Promise.resolve(U).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),N))throw _})}),Ma=zt(function(_){_&&_.preventDefault&&sn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&sn(_.stopPropagation)&&_.stopPropagation(),Js().catch(function(N){console.warn("Warning: An unhandled error was caught from submitForm()",N)})}),Na={resetForm:xe,validateForm:ie,validateField:Re,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:W,setStatus:ht,setSubmitting:ir,setTouched:O,setValues:z,setFormikState:dt,submitForm:Js},eo=zt(function(){return f(C.values,Na)}),bc=zt(function(_){_&&_.preventDefault&&sn(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&sn(_.stopPropagation)&&_.stopPropagation(),xe()}),Da=y.useCallback(function(_){return{value:Pt(C.values,_),error:Pt(C.errors,_),touched:!!Pt(C.touched,_),initialValue:Pt(h.current,_),initialTouched:!!Pt(x.current,_),initialError:Pt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,U){return W(_,$,U)},setTouched:function($,U){return ye(_,$,U)},setError:function($){return V(_,$)}}},[W,ye,V]),Fa=y.useCallback(function(_){var N=pc(_),$=N?_.name:_,U=Pt(C.values,$),G={name:$,value:U,onChange:ce,onBlur:Ie};if(N){var oe=_.type,_e=_.value,kt=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!U:(G.checked=!!(Array.isArray(U)&&~U.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=U===_e,G.value=_e):kt==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ie,ce,C.values]),Ct=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),Sc=y.useMemo(function(){return typeof a<"u"?Ct?C.errors&&Object.keys(C.errors).length===0:a!==!1&&sn(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,Ct,C.errors,d]),Tc=Ve({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:w.current,handleBlur:Ie,handleChange:ce,handleReset:bc,handleSubmit:Ma,resetForm:xe,setErrors:L,setFormikState:dt,setFieldTouched:ye,setFieldValue:W,setFieldError:V,setStatus:ht,setSubmitting:ir,setTouched:O,setValues:z,submitForm:Js,validateForm:ie,validateField:Re,isValid:Sc,dirty:Ct,unregisterField:ne,registerField:Q,getFieldProps:Fa,getFieldMeta:Da,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Tc}function A5(e){var t={};if(e.inner){if(e.inner.length===0)return Ei(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Pt(t,o.path)||(t=Ei(t,o.path,o.message))}}return t}function R5(e,t,n,r){n===void 0&&(n=!1);var i=Sh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Sh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Jy(i)?Sh(i):i!==""?i:void 0}):Jy(e[r])?t[r]=Sh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function O5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?gh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=gh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function j5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function M5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var N5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function zt(e){var t=y.useRef(e);return N5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var D5=y.forwardRef(function(e,t){var n=e.action,r=mT(e,["action"]),i=n??"#",s=C5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",Ve({onSubmit:a,ref:t,onReset:o,action:i},r))});D5.displayName="Form";const yT=({init:e,schema:t,action:n})=>P5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function F5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const L5=e=>{switch(e){case"success":return V5;case"info":return z5;case"warning":return B5;case"error":return U5;default:return null}},I5=Array(12).fill(0),$5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},I5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),V5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),B5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),U5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),H5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),W5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Th=1;class K5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Th++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async c=>{if(o=["resolve",c],R.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(G5(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"?u:{message:u};this.create({id:r,type:"success",description:d,...h})}}).catch(async c=>{if(o=["reject",c],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:u,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,f)=>a.then(()=>o[0]==="reject"?f(o[1]):c(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Th++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vt=new K5,q5=(e,t)=>{const n=(t==null?void 0:t.id)||Th++;return vt.addToast({title:e,...t,id:n}),n},G5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Q5=q5,Y5=()=>vt.toasts,X5=()=>vt.getActiveToasts(),kv=Object.assign(Q5,{success:vt.success,info:vt.info,warning:vt.warning,error:vt.error,custom:vt.custom,message:vt.message,promise:vt.promise,dismiss:vt.dismiss,loading:vt.loading},{getHistory:Y5,getToasts:X5});F5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ml(e){return e.label!==void 0}const Z5=3,J5="24px",eL="16px",_v=4e3,tL=356,nL=14,rL=45,iL=200;function xn(...e){return e.filter(Boolean).join(" ")}function sL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const oL=e=>{var t,n,r,i,s,o,a,l,c;const{invert:f,toast:u,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:w,index:p,toasts:g,expanded:v,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:M="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Re,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,z]=R.useState(null),[V,W]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ie,dt]=R.useState(!1),[ht,ir]=R.useState(!1),[Js,Ma]=R.useState(!1),[Na,eo]=R.useState(0),[bc,Da]=R.useState(0),Yr=R.useRef(u.duration||re||_v),Fa=R.useRef(null),Ct=R.useRef(null),Sc=p===0,Tc=p+1<=x,_=u.type,N=u.dismissible!==!1,$=u.className||"",U=u.descriptionClassName||"",G=R.useMemo(()=>w.findIndex(Y=>Y.toastId===u.id)||0,[w,u.id]),oe=R.useMemo(()=>{var Y;return(Y=u.closeButton)!=null?Y:C},[u.closeButton,C]),_e=R.useMemo(()=>u.duration||re||_v,[u.duration,re]),kt=R.useRef(0),yn=R.useRef(0),Ki=R.useRef(0),sr=R.useRef(null),[Vm,La]=ie.split("-"),Ia=R.useMemo(()=>w.reduce((Y,$e,Ye)=>Ye>=G?Y:Y+$e.height,0),[w,G]),Bm=W5(),FT=u.invert||f,Ec=_==="loading";yn.current=R.useMemo(()=>G*xe+Ia,[G,Ia]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=Ct.current;if(Y){const $e=Y.getBoundingClientRect().height;return Da($e),m(Ye=>[{toastId:u.id,height:$e,position:u.position},...Ye]),()=>m(Ye=>Ye.filter(_t=>_t.toastId!==u.id))}},[m,u.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=Ct.current,$e=Y.style.height;Y.style.height="auto";const Ye=Y.getBoundingClientRect().height;Y.style.height=$e,Da(Ye),m(_t=>_t.find(We=>We.toastId===u.id)?_t.map(We=>We.toastId===u.id?{...We,height:Ye}:We):[{toastId:u.id,height:Ye,position:u.position},..._t])},[q,u.title,u.description,m,u.id]);const or=R.useCallback(()=>{J(!0),eo(yn.current),m(Y=>Y.filter($e=>$e.toastId!==u.id)),setTimeout(()=>{E(u)},iL)},[u,E,m,yn]);R.useEffect(()=>{if(u.promise&&_==="loading"||u.duration===1/0||u.type==="loading")return;let Y;return v||h||Bm?(()=>{if(Ki.current<kt.current){const _t=new Date().getTime()-kt.current;Yr.current=Yr.current-_t}Ki.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(kt.current=new Date().getTime(),Y=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),or()},Yr.current))})(),()=>clearTimeout(Y)},[v,h,u,_,Bm,or]),R.useEffect(()=>{u.delete&&or()},[or,u.delete]);function LT(){var Y;if(ne!=null&&ne.loading){var $e;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,u==null||($e=u.classNames)==null?void 0:$e.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement($5,{className:xn(Q==null?void 0:Q.loader,u==null||(Y=u.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var zm,Um;return R.createElement("li",{tabIndex:0,ref:Ct,className:xn(M,$,Q==null?void 0:Q.toast,u==null||(t=u.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],u==null||(n=u.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(zm=u.richColors)!=null?zm:S,"data-styled":!(u.jsx||u.unstyled||d),"data-mounted":q,"data-promise":!!u.promise,"data-swiped":Js,"data-removed":ye,"data-visible":Tc,"data-y-position":Vm,"data-x-position":La,"data-index":p,"data-front":Sc,"data-swiping":Ie,"data-dismissible":N,"data-type":_,"data-invert":FT,"data-swipe-out":ht,"data-swipe-direction":V,"data-expanded":!!(v||Re&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Na:yn.current}px`,"--initial-height":Re?"auto":`${bc}px`,...k,...u.style},onDragEnd:()=>{dt(!1),z(null),sr.current=null},onPointerDown:Y=>{Ec||!N||(Fa.current=new Date,eo(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(dt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,$e,Ye;if(ht||!N)return;sr.current=null;const _t=Number(((Y=Ct.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$a=Number((($e=Ct.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((Ye=Fa.current)==null?void 0:Ye.getTime()),$t=L==="x"?_t:$a,Va=Math.abs($t)/We;if(Math.abs($t)>=rL||Va>.11){eo(yn.current),u.onDismiss==null||u.onDismiss.call(u,u),W(L==="x"?_t>0?"right":"left":$a>0?"down":"up"),or(),ir(!0);return}else{var tn,nn;(tn=Ct.current)==null||tn.style.setProperty("--swipe-amount-x","0px"),(nn=Ct.current)==null||nn.style.setProperty("--swipe-amount-y","0px")}Ma(!1),dt(!1),z(null)},onPointerMove:Y=>{var $e,Ye,_t;if(!sr.current||!N||(($e=window.getSelection())==null?void 0:$e.toString().length)>0)return;const We=Y.clientY-sr.current.y,$t=Y.clientX-sr.current.x;var Va;const tn=(Va=e.swipeDirections)!=null?Va:sL(ie);!L&&(Math.abs($t)>1||Math.abs(We)>1)&&z(Math.abs($t)>Math.abs(We)?"x":"y");let nn={x:0,y:0};const Hm=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(tn.includes("top")||tn.includes("bottom"))if(tn.includes("top")&&We<0||tn.includes("bottom")&&We>0)nn.y=We;else{const Xr=We*Hm(We);nn.y=Math.abs(Xr)<Math.abs(We)?Xr:We}}else if(L==="x"&&(tn.includes("left")||tn.includes("right")))if(tn.includes("left")&&$t<0||tn.includes("right")&&$t>0)nn.x=$t;else{const Xr=$t*Hm($t);nn.x=Math.abs(Xr)<Math.abs($t)?Xr:$t}(Math.abs(nn.x)>0||Math.abs(nn.y)>0)&&Ma(!0),(Ye=Ct.current)==null||Ye.style.setProperty("--swipe-amount-x",`${nn.x}px`),(_t=Ct.current)==null||_t.style.setProperty("--swipe-amount-y",`${nn.y}px`)}},oe&&!u.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Ec,"data-close-button":!0,onClick:Ec||!N?()=>{}:()=>{or(),u.onDismiss==null||u.onDismiss.call(u,u)},className:xn(Q==null?void 0:Q.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Um=ne==null?void 0:ne.close)!=null?Um:H5):null,_||u.icon||u.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||LT():null,u.type!=="loading"?u.icon||(ne==null?void 0:ne[_])||L5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,u==null||(s=u.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?R.createElement("div",{"data-description":"",className:xn(I,U,Q==null?void 0:Q.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),R.isValidElement(u.cancel)?u.cancel:u.cancel&&ml(u.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||P,onClick:Y=>{ml(u.cancel)&&N&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,R.isValidElement(u.action)?u.action:u.action&&ml(u.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||j,onClick:Y=>{ml(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Pv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function aL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?eL:J5;function l(c){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const lL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:f,theme:u="light",richColors:d,duration:h,style:m,visibleToasts:x=Z5,toastOptions:w,dir:p=Pv(),gap:g=nL,icons:v,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[M,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Re]=R.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),z=R.useCallback(V=>{C(W=>{var q;return(q=W.find(ce=>ce.id===V.id))!=null&&q.delete||vt.dismiss(V.id),W.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>vt.subscribe(V=>{if(V.dismiss){const W=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(W)});return}setTimeout(()=>{fk.flushSync(()=>{C(W=>{const q=W.findIndex(ce=>ce.id===V.id);return q!==-1?[...W.slice(0,q),{...W[q],...V},...W.slice(q+1)]:[V,...W]})})})}),[S]),R.useEffect(()=>{if(u!=="system"){Re(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Re("dark"):Re("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:W})=>{Re(W?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Re(q?"dark":"light")}catch(ce){console.error(ce)}})}},[u]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=W=>{var q;if(s.every(J=>W[J]||W.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}W.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,W)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?Pv():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":M&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${tL}px`,"--gap":`${g}px`,...m,...aL(c,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&W===0||J.position===V).map((J,Ie)=>{var dt,ht;return R.createElement(oL,{key:J.id,icons:v,index:Ie,toast:J,defaultRichColors:d,duration:(dt=w==null?void 0:w.duration)!=null?dt:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:x,closeButton:(ht=w==null?void 0:w.closeButton)!=null?ht:a,interacting:re,position:V,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:z,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:M,swipeDirections:t.swipeDirections})})):null}))});function uL(e){return Array.isArray(e)&&e[0].field!==void 0}const vT=(e,t)=>{var n;if(uL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||kv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||kv.error(e.error);return}};function cL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function mc({id:e,text:t,required:n,className:r,noMargin:i}){return t?b.jsxs("label",{htmlFor:e,className:ze(r,{"mb-2":!i},"line-block text-base font-medium text-gray-600"),children:[t," ",n&&b.jsx("span",{className:"text-red-500",children:"*"})]}):null}const Cf={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function fL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:c,className:f,ariaInvalid:u,ariaLabel:d,autoFocus:h,...m}){const x=Ln();return b.jsxs("div",{className:ze({"mb-3":!o},f),children:[b.jsx(mc,{id:e,text:t,required:a}),b.jsxs("div",{className:"flex items-center",children:[r&&b.jsx("span",{className:ze("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Cf[i],{"border-red-500!":!!l}),children:r}),b.jsx("input",{id:e,className:ze("text-gray-800 border border-solid rounded-md block text-base py-2 px-4 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Cf[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":c,"aria-invalid":u,"aria-label":d,style:{color:x.getColor(B.InputText),backgroundColor:x.getColor(B.InputBackground),borderColor:x.getColor(B.InputBorder),borderRadius:x.getRadius()},...m}),n&&b.jsx("span",{className:ze("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Cf[i],{"border-red-500!":!!l}),children:n})]}),!!l&&b.jsx("p",{className:"mt-1 text-sm text-red-500",children:l})]})}const dL=(e,t)=>{document.cookie=`${e}=${t}`},xT=y.createContext({}),hL=()=>`${window.location.pathname}_$$_${document.title}`,pL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},mL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function gL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(mL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return b.jsx(xT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Dm(){return y.useContext(xT)}function yL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return b.jsxs("div",{className:r||"",children:[e&&b.jsx(mc,{id:t,required:o,text:e}),b.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&b.jsx("p",{className:"1 texm text-r500",children:a})]})}const Av={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},vL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},xL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},wL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function bL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:c="md",effect:f="ring",reversed:u=!1,variant:d="blue",...h}){return b.jsxs("div",{children:[b.jsxs("div",{className:`flex items-center justify-between ${u?"flex-row-reverse":""} ${Av[f].label}`,children:[b.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[b.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${vL[d]} ${xL[c]} ${Av[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),b.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:b.jsx(Me.Check,{className:wL[c]})})]}),b.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&b.jsx("small",{className:"text-xs text-red-500",children:a})]})}const SL={blue:"text-blue-500 border-blue-gray-200 checked:bg-blue-500 checked:border-blue-500 checked:before:bg-blue-500 before:bg-gray-500",red:"text-red-500 border-blue-gray-200 checked:border-red-500 checked:before:bg-red-500 before:bg-blue-gray-500",emerald:"text-emerald-500 border-blue-gray-200 checked:border-emerald-500 checked:before:bg-emerald-500 before:bg-blue-gray-500",orange:"text-orange-500 border-blue-gray-200 checked:border-orange-500 checked:before:bg-orange-500 before:bg-blue-gray-500"},TL={blue:"text-white",red:"text-red-500",emerald:"text-emerald-500",orange:"text-orange-500"},Rv={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},EL={sm:"size-3",md:"size-4",lg:"size-5"},Ov={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-9 before:w-9 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200",input:""}};function Eh({children:e,id:t,name:n,size:r="md",variant:i="blue",effect:s="ring",value:o=!1,reverse:a=!1,onChange:l,onBlur:c,onClick:f}){return b.jsxs("label",{className:`disable-highlight flex cursor-pointer items-center rounded-md text-gray-700 ${a?"flex-row-reverse justify-between":""} ${Ov[s].label} `,htmlFor:t,children:[b.jsxs("label",{className:"relative flex items-center p-2 rounded-full cursor-pointer disable-highlight",htmlFor:t,children:[b.jsx("input",{id:t,name:n,type:"radio",className:`peer disable-highlight bg-none cursor-pointer appearance-none rounded-full border border-solid bg-inherit transition-all ${SL[i]} ${Rv[r]} ${Ov[s].input}`,checked:o,onChange:u=>l==null?void 0:l(u.target.checked),onBlur:u=>c==null?void 0:c(u.target.checked),onClick:()=>f==null?void 0:f(!o)}),b.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center opacity-0 transition-opacity peer-checked:opacity-100 ${TL[i]} ${Rv[r]}`,children:b.jsx(Me.Check,{className:EL[r]})})]}),b.jsx("label",{className:"text-gray-800 disable-highlight flex cursor-pointer select-none items-center font-light",htmlFor:t,children:e})]})}Eh.Group=function({label:t,id:n,className:r,required:i,children:s}){return b.jsxs("div",{className:r,children:[b.jsx(mc,{id:n,text:t,required:i}),b.jsx("div",{className:"col-span-12 flex flex-col justify-center",children:s})]})};function Fm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:c,ariaInvalid:f,inputRef:u,autoFocus:d=!0,style:h,...m}){const x=Ln();return b.jsxs("div",{className:ze({"mb-3":!s},i),children:[t&&b.jsx(mc,{id:e,text:t,required:l}),b.jsx("textarea",{className:ze("resize-none max-h-40 text-gray-800 w-full py-2 px-4 border border-solid rounded-md block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!c}),id:e,"aria-invalid":f,...m,ref:u,autoFocus:d,style:{...h,color:x.getColor(B.InputText),backgroundColor:x.getColor(B.InputBackground),borderColor:x.getColor(B.InputBorder),borderRadius:x.getRadius()}}),!!c&&b.jsx("p",{className:"text-red-500 mt-1 text-sm",children:c})]})}function CL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,w,p,g,v,E;const i=Ln(),{defaultValues:s}=en(),o=Dm(),a=hM(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Ll(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),c=(w=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:w.reduce((S,C)=>(S[C.name]="",S),{}),f=Sm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Eu().required(C.label):Eu(),S),{})),u=yT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(bp(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&dL(j.name,S[j.name]);e==null||e();return}vT(C,{form:u})}}),d=!cL(c,u.values);return b.jsx("section",{className:"overflow-y-auto p-4 bg-white",style:{height:"calc(100% - 13rem)",backgroundColor:i.getColor(B.GreeterBackground)},children:b.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),u.handleSubmit()},children:[(E=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return b.jsx(fL,{id:S.name,name:S.name,type:S.type,label:S.label,value:u.values[S.name],onChange:u.handleChange,onBlur:u.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:u.errors[S.name],ariaInvalid:u.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return b.jsx(yL,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>b.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return b.jsx(bL,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return b.jsx(Eh.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>b.jsx(Eh,{onChange:j=>{j?u.setFieldValue(S.name,P):u.setFieldValue(S.name,"")},id:P,name:S.name,value:P===u.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return b.jsx(Fm,{id:S.name,name:S.name,value:u.values[S.name],onChange:u.handleChange,placeholder:S.placeholder,error:u.errors[S.name],required:S.required,label:S.label},S.name)}),b.jsx(Qn,{textKey:B.GreeterButtonText,bgKey:B.GreeterButtonBackground,type:"submit",disabled:!d,children:"Sohbet Oluştur"})]})})}function kL({onClose:e}){return b.jsx(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,variant:"gray",kind:"ghost",onClick:e,className:"absolute top-2 right-2",children:b.jsx(Me.X,{className:"size-5"})})}function _L({image_url:e,name:t,size:n="size-9"}){return e?b.jsx("img",{src:e,alt:t,className:ze("rounded-md",n)}):b.jsx("div",{className:"flex items-center justify-center gap-1",children:b.jsx(Me.Website,{className:ze("text-slate-500",n)})})}function PL(){const e=Dm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return CS("popstate",t),null}function AL(){const e=$i(),t=Dm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return CS("popstate",n),y.useEffect(()=>{if(!e)return;const r=pL(),i=hL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function RL({children:e}){const t=Ln(),{widget:n}=en();return n?b.jsx(na,{children:b.jsxs(gn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3},className:"h-full w-full relative",children:[b.jsx("div",{style:{backgroundColor:t.getColor(B.GreeterTopBackground)},className:"-z-10 h-52 absolute top-0 left-0 w-full rounded-t-md flex flex-col gap-4 items-center justify-center"}),e]})}):null}function OL(){return PL(),null}const kf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function jL(){var u,d,h,m,x,w;const e=Ln(),{widget:t,setOpen:n}=en(),[r,i]=y.useState(!0),s=mm(),o=gm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{pM(t.client_id).then(([p,g])=>{bp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=kf(((d=(u=t.appearance)==null?void 0:u.head)==null?void 0:d.elements)||[],"text"),c=kf(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=kf(((w=(x=t.appearance)==null?void 0:x.head)==null?void 0:w.elements)||[],"logo");return b.jsxs(RL,{children:[b.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-52",children:[o&&b.jsx(kL,{onClose:a}),f&&b.jsx(_L,{name:t.name,image_url:f,size:"size-24"}),c&&b.jsx("div",{style:{color:e.getColor(B.GreeterTopText)},className:"text-white text-lg font-bold ml-2",children:c}),l&&b.jsx("div",{style:{color:e.getColor(B.GreeterTopText)},className:"text-white text-sm",children:l})]}),b.jsx(CL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})]})}function ML(){return b.jsxs(b.Fragment,{children:[b.jsx(_S,{border:!0,children:b.jsx(jL,{})}),b.jsx(OL,{})]})}const NL=[{path:"/",component:ML,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),wT=(e=>(e.AdminJoin="admin_join",e))(wT||{}),mt=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(mt||{});function DL({name:e,avatar:t,className:n="text-neutral-500"}){return b.jsxs("div",{className:"flex gap-2 items-center",children:[b.jsx("div",{className:"min-w-max",children:b.jsxs("span",{children:[t&&b.jsx("img",{className:"size-8 rounded-full",src:t,"aria-label":e}),!t&&b.jsx("div",{className:"size-8 rounded-full bg-neutral-200"})]})}),b.jsx("div",{className:"flex flex-col",children:b.jsx("span",{className:ze("line-clamp-1",n),children:e})})]})}var FL=Object.defineProperty,LL=(e,t,n)=>t in e?FL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_f=(e,t,n)=>(LL(e,typeof t!="symbol"?t+"":t,n),n);let IL=class{constructor(){_f(this,"current",this.detect()),_f(this,"handoffState","pending"),_f(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Vl=new IL;function $L(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function gc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return $L(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=gc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function bT(){let[e]=y.useState(gc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Vl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function ST(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let qn=function(e){let t=ST(e);return R.useCallback((...n)=>t.current(...n),[t])};function Ch(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function yc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,yc),r}var TT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(TT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function ET(){let e=BL();return y.useCallback(t=>VL({mergeRefs:e,...t}),[e])}function VL({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??zL;let l=CT(t,e);if(s)return gl(l,n,r,o,a);let c=i??0;if(c&2){let{static:f=!1,...u}=l;if(f)return gl(u,n,r,o,a)}if(c&1){let{unmount:f=!0,...u}=l;return yc(f?0:1,{0(){return null},1(){return gl({...u,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return gl(l,n,r,o,a)}function gl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=Pf(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let u={};if(t){let d=!1,h=[];for(let[m,x]of Object.entries(t))typeof x=="boolean"&&(d=!0),x===!0&&h.push(m.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(d){u["data-headlessui-state"]=h.join(" ");for(let m of h)u[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(u)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(u))).map(d=>` - ${d}`).join(`
105
+ */var We=typeof Symbol=="function"&&Symbol.for,Rm=We?Symbol.for("react.element"):60103,Om=We?Symbol.for("react.portal"):60106,rc=We?Symbol.for("react.fragment"):60107,ic=We?Symbol.for("react.strict_mode"):60108,sc=We?Symbol.for("react.profiler"):60114,oc=We?Symbol.for("react.provider"):60109,ac=We?Symbol.for("react.context"):60110,jm=We?Symbol.for("react.async_mode"):60111,lc=We?Symbol.for("react.concurrent_mode"):60111,uc=We?Symbol.for("react.forward_ref"):60112,cc=We?Symbol.for("react.suspense"):60113,y5=We?Symbol.for("react.suspense_list"):60120,fc=We?Symbol.for("react.memo"):60115,dc=We?Symbol.for("react.lazy"):60116,v5=We?Symbol.for("react.block"):60121,x5=We?Symbol.for("react.fundamental"):60117,w5=We?Symbol.for("react.responder"):60118,b5=We?Symbol.for("react.scope"):60119;function Vt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rm:switch(e=e.type,e){case jm:case lc:case rc:case sc:case ic:case cc:return e;default:switch(e=e&&e.$$typeof,e){case ac:case uc:case dc:case fc:case oc:return e;default:return t}}case Om:return t}}}function dT(e){return Vt(e)===lc}ue.AsyncMode=jm;ue.ConcurrentMode=lc;ue.ContextConsumer=ac;ue.ContextProvider=oc;ue.Element=Rm;ue.ForwardRef=uc;ue.Fragment=rc;ue.Lazy=dc;ue.Memo=fc;ue.Portal=Om;ue.Profiler=sc;ue.StrictMode=ic;ue.Suspense=cc;ue.isAsyncMode=function(e){return dT(e)||Vt(e)===jm};ue.isConcurrentMode=dT;ue.isContextConsumer=function(e){return Vt(e)===ac};ue.isContextProvider=function(e){return Vt(e)===oc};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rm};ue.isForwardRef=function(e){return Vt(e)===uc};ue.isFragment=function(e){return Vt(e)===rc};ue.isLazy=function(e){return Vt(e)===dc};ue.isMemo=function(e){return Vt(e)===fc};ue.isPortal=function(e){return Vt(e)===Om};ue.isProfiler=function(e){return Vt(e)===sc};ue.isStrictMode=function(e){return Vt(e)===ic};ue.isSuspense=function(e){return Vt(e)===cc};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===rc||e===lc||e===sc||e===ic||e===cc||e===y5||typeof e=="object"&&e!==null&&(e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===oc||e.$$typeof===ac||e.$$typeof===uc||e.$$typeof===x5||e.$$typeof===w5||e.$$typeof===b5||e.$$typeof===v5)};ue.typeOf=Vt;fT.exports=ue;var S5=fT.exports,hT=S5,T5={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E5={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pT={};pT[hT.ForwardRef]=T5;pT[hT.Memo]=E5;function ze(){return ze=Object.assign||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},ze.apply(this,arguments)}function mT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hc=y.createContext(void 0);hc.displayName="FormikContext";hc.Provider;hc.Consumer;function C5(){var e=y.useContext(hc);return e}var on=function(t){return typeof t=="function"},pc=function(t){return t!==null&&typeof t=="object"},k5=function(t){return String(Math.floor(Number(t)))===t},Sf=function(t){return Object.prototype.toString.call(t)==="[object String]"},Tf=function(t){return pc(t)&&on(t.then)};function Rt(e,t,n,r){r===void 0&&(r=0);for(var i=cT(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function Ei(e,t,n){for(var r=Tv(e),i=r,s=0,o=cT(t);s<o.length-1;s++){var a=o[s],l=Rt(e,o.slice(0,s+1));if(l&&(pc(l)||Array.isArray(l)))i=i[a]=Tv(l);else{var u=o[s+1];i=i[a]=k5(u)&&Number(u)>=0?[]:{}}}return(s===0?e:i)[o[s]]===n?e:(n===void 0?delete i[o[s]]:i[o[s]]=n,s===0&&n===void 0&&delete r[o[s]],r)}function gT(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i],a=e[o];pc(a)?n.get(a)||(n.set(a,!0),r[o]=Array.isArray(a)?[]:{},gT(a,t,n,r[o])):r[o]=t}return r}function _5(e,t){switch(t.type){case"SET_VALUES":return ze({},e,{values:t.payload});case"SET_TOUCHED":return ze({},e,{touched:t.payload});case"SET_ERRORS":return ri(e.errors,t.payload)?e:ze({},e,{errors:t.payload});case"SET_STATUS":return ze({},e,{status:t.payload});case"SET_ISSUBMITTING":return ze({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return ze({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return ze({},e,{values:Ei(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return ze({},e,{touched:Ei(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return ze({},e,{errors:Ei(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return ze({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return ze({},e,{touched:gT(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return ze({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return ze({},e,{isSubmitting:!1});default:return e}}var Jr={},pl={};function P5(e){var t=e.validateOnChange,n=t===void 0?!0:t,r=e.validateOnBlur,i=r===void 0?!0:r,s=e.validateOnMount,o=s===void 0?!1:s,a=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,f=e.onSubmit,c=mT(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),d=ze({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:f},c),h=y.useRef(d.initialValues),m=y.useRef(d.initialErrors||Jr),x=y.useRef(d.initialTouched||pl),b=y.useRef(d.initialStatus),p=y.useRef(!1),g=y.useRef({});y.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var v=y.useState(0),E=v[1],S=y.useRef({values:hl(d.initialValues),errors:hl(d.initialErrors)||Jr,touched:hl(d.initialTouched)||pl,status:hl(d.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=S.current,k=y.useCallback(function(_){var M=S.current;S.current=_5(M,_),M!==S.current&&E(function($){return $+1})},[]),P=y.useCallback(function(_,M){return new Promise(function($,z){var G=d.validate(_,M);G==null?$(Jr):Tf(G)?G.then(function(oe){$(oe||Jr)},function(oe){z(oe)}):$(G)})},[d.validate]),j=y.useCallback(function(_,M){var $=d.validationSchema,z=on($)?$(M):$,G=M&&z.validateAt?z.validateAt(M,_):R5(_,z);return new Promise(function(oe,_e){G.then(function(){oe(Jr)},function(_t){_t.name==="ValidationError"?oe(A5(_t)):_e(_t)})})},[d.validationSchema]),N=y.useCallback(function(_,M){return new Promise(function($){return $(g.current[_].validate(M))})},[]),I=y.useCallback(function(_){var M=Object.keys(g.current).filter(function(z){return on(g.current[z].validate)}),$=M.length>0?M.map(function(z){return N(z,Rt(_,z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all($).then(function(z){return z.reduce(function(G,oe,_e){return oe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||oe&&(G=Ei(G,M[_e],oe)),G},{})})},[N]),re=y.useCallback(function(_){return Promise.all([I(_),d.validationSchema?j(_):{},d.validate?P(_):{}]).then(function(M){var $=M[0],z=M[1],G=M[2],oe=mh.all([$,z,G],{arrayMerge:O5});return oe})},[d.validate,d.validationSchema,I,P,j]),ie=Ut(function(_){return _===void 0&&(_=C.values),k({type:"SET_ISVALIDATING",payload:!0}),re(_).then(function(M){return p.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:M})),M})});y.useEffect(function(){o&&p.current===!0&&ri(h.current,d.initialValues)&&ie(h.current)},[o,ie]);var xe=y.useCallback(function(_){var M=_&&_.values?_.values:h.current,$=_&&_.errors?_.errors:m.current?m.current:d.initialErrors||{},z=_&&_.touched?_.touched:x.current?x.current:d.initialTouched||{},G=_&&_.status?_.status:b.current?b.current:d.initialStatus;h.current=M,m.current=$,x.current=z,b.current=G;var oe=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!_&&!!_.isSubmitting,errors:$,touched:z,status:G,values:M,isValidating:!!_&&!!_.isValidating,submitCount:_&&_.submitCount&&typeof _.submitCount=="number"?_.submitCount:0}})};if(d.onReset){var _e=d.onReset(C.values,Ma);Tf(_e)?_e.then(oe):oe()}else oe()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);y.useEffect(function(){p.current===!0&&!ri(h.current,d.initialValues)&&u&&(h.current=d.initialValues,xe(),o&&ie(h.current))},[u,d.initialValues,xe,o,ie]),y.useEffect(function(){u&&p.current===!0&&!ri(m.current,d.initialErrors)&&(m.current=d.initialErrors||Jr,k({type:"SET_ERRORS",payload:d.initialErrors||Jr}))},[u,d.initialErrors]),y.useEffect(function(){u&&p.current===!0&&!ri(x.current,d.initialTouched)&&(x.current=d.initialTouched||pl,k({type:"SET_TOUCHED",payload:d.initialTouched||pl}))},[u,d.initialTouched]),y.useEffect(function(){u&&p.current===!0&&!ri(b.current,d.initialStatus)&&(b.current=d.initialStatus,k({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var Oe=Ut(function(_){if(g.current[_]&&on(g.current[_].validate)){var M=Rt(C.values,_),$=g.current[_].validate(M);return Tf($)?(k({type:"SET_ISVALIDATING",payload:!0}),$.then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:z}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:_,value:$}}),Promise.resolve($))}else if(d.validationSchema)return k({type:"SET_ISVALIDATING",payload:!0}),j(C.values,_).then(function(z){return z}).then(function(z){k({type:"SET_FIELD_ERROR",payload:{field:_,value:Rt(z,_)}}),k({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),Q=y.useCallback(function(_,M){var $=M.validate;g.current[_]={validate:$}},[]),ne=y.useCallback(function(_){delete g.current[_]},[]),O=Ut(function(_,M){k({type:"SET_TOUCHED",payload:_});var $=M===void 0?i:M;return $?ie(C.values):Promise.resolve()}),L=y.useCallback(function(_){k({type:"SET_ERRORS",payload:_})},[]),B=Ut(function(_,M){var $=on(_)?_(C.values):_;k({type:"SET_VALUES",payload:$});var z=M===void 0?n:M;return z?ie($):Promise.resolve()}),V=y.useCallback(function(_,M){k({type:"SET_FIELD_ERROR",payload:{field:_,value:M}})},[]),H=Ut(function(_,M,$){k({type:"SET_FIELD_VALUE",payload:{field:_,value:M}});var z=$===void 0?n:$;return z?ie(Ei(C.values,_,M)):Promise.resolve()}),q=y.useCallback(function(_,M){var $=M,z=_,G;if(!Sf(_)){_.persist&&_.persist();var oe=_.target?_.target:_.currentTarget,_e=oe.type,_t=oe.name,yn=oe.id,qi=oe.value,sr=oe.checked,$m=oe.outerHTML,La=oe.options,Ia=oe.multiple;$=M||_t||yn,z=/number|range/.test(_e)?(G=parseFloat(qi),isNaN(G)?"":G):/checkbox/.test(_e)?N5(Rt(C.values,$),sr,qi):La&&Ia?j5(La):qi}$&&H($,z)},[H,C.values]),ce=Ut(function(_){if(Sf(_))return function(M){return q(M,_)};q(_)}),ye=Ut(function(_,M,$){M===void 0&&(M=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:_,value:M}});var z=$===void 0?i:$;return z?ie(C.values):Promise.resolve()}),J=y.useCallback(function(_,M){_.persist&&_.persist();var $=_.target,z=$.name,G=$.id,oe=$.outerHTML,_e=M||z||G;ye(_e,!0)},[ye]),Ve=Ut(function(_){if(Sf(_))return function(M){return J(M,_)};J(_)}),pt=y.useCallback(function(_){on(_)?k({type:"SET_FORMIK_STATE",payload:_}):k({type:"SET_FORMIK_STATE",payload:function(){return _}})},[]),mt=y.useCallback(function(_){k({type:"SET_STATUS",payload:_})},[]),ir=y.useCallback(function(_){k({type:"SET_ISSUBMITTING",payload:_})},[]),eo=Ut(function(){return k({type:"SUBMIT_ATTEMPT"}),ie().then(function(_){var M=_ instanceof Error,$=!M&&Object.keys(_).length===0;if($){var z;try{if(z=to(),z===void 0)return}catch(G){throw G}return Promise.resolve(z).then(function(G){return p.current&&k({type:"SUBMIT_SUCCESS"}),G}).catch(function(G){if(p.current)throw k({type:"SUBMIT_FAILURE"}),G})}else if(p.current&&(k({type:"SUBMIT_FAILURE"}),M))throw _})}),Na=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),eo().catch(function(M){console.warn("Warning: An unhandled error was caught from submitForm()",M)})}),Ma={resetForm:xe,validateForm:ie,validateField:Oe,setErrors:L,setFieldError:V,setFieldTouched:ye,setFieldValue:H,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,setFormikState:pt,submitForm:eo},to=Ut(function(){return f(C.values,Ma)}),wc=Ut(function(_){_&&_.preventDefault&&on(_.preventDefault)&&_.preventDefault(),_&&_.stopPropagation&&on(_.stopPropagation)&&_.stopPropagation(),xe()}),Da=y.useCallback(function(_){return{value:Rt(C.values,_),error:Rt(C.errors,_),touched:!!Rt(C.touched,_),initialValue:Rt(h.current,_),initialTouched:!!Rt(x.current,_),initialError:Rt(m.current,_)}},[C.errors,C.touched,C.values]),Yr=y.useCallback(function(_){return{setValue:function($,z){return H(_,$,z)},setTouched:function($,z){return ye(_,$,z)},setError:function($){return V(_,$)}}},[H,ye,V]),Fa=y.useCallback(function(_){var M=pc(_),$=M?_.name:_,z=Rt(C.values,$),G={name:$,value:z,onChange:ce,onBlur:Ve};if(M){var oe=_.type,_e=_.value,_t=_.as,yn=_.multiple;oe==="checkbox"?_e===void 0?G.checked=!!z:(G.checked=!!(Array.isArray(z)&&~z.indexOf(_e)),G.value=_e):oe==="radio"?(G.checked=z===_e,G.value=_e):_t==="select"&&yn&&(G.value=G.value||[],G.multiple=!0)}return G},[Ve,ce,C.values]),kt=y.useMemo(function(){return!ri(h.current,C.values)},[h.current,C.values]),bc=y.useMemo(function(){return typeof a<"u"?kt?C.errors&&Object.keys(C.errors).length===0:a!==!1&&on(a)?a(d):a:C.errors&&Object.keys(C.errors).length===0},[a,kt,C.errors,d]),Sc=ze({},C,{initialValues:h.current,initialErrors:m.current,initialTouched:x.current,initialStatus:b.current,handleBlur:Ve,handleChange:ce,handleReset:wc,handleSubmit:Na,resetForm:xe,setErrors:L,setFormikState:pt,setFieldTouched:ye,setFieldValue:H,setFieldError:V,setStatus:mt,setSubmitting:ir,setTouched:O,setValues:B,submitForm:eo,validateForm:ie,validateField:Oe,isValid:bc,dirty:kt,unregisterField:ne,registerField:Q,getFieldProps:Fa,getFieldMeta:Da,getFieldHelpers:Yr,validateOnBlur:i,validateOnChange:n,validateOnMount:o});return Sc}function A5(e){var t={};if(e.inner){if(e.inner.length===0)return Ei(t,e.path,e.message);for(var i=e.inner,n=Array.isArray(i),r=0,i=n?i:i[Symbol.iterator]();;){var s;if(n){if(r>=i.length)break;s=i[r++]}else{if(r=i.next(),r.done)break;s=r.value}var o=s;Rt(t,o.path)||(t=Ei(t,o.path,o.message))}}return t}function R5(e,t,n,r){n===void 0&&(n=!1);var i=bh(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function bh(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(i){return Array.isArray(i)===!0||Jy(i)?bh(i):i!==""?i:void 0}):Jy(e[r])?t[r]=bh(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function O5(e,t,n){var r=e.slice();return t.forEach(function(s,o){if(typeof r[o]>"u"){var a=n.clone!==!1,l=a&&n.isMergeableObject(s);r[o]=l?mh(Array.isArray(s)?[]:{},s,n):s}else n.isMergeableObject(s)?r[o]=mh(e[o],s,n):e.indexOf(s)===-1&&r.push(s)}),r}function j5(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function N5(e,t,n){if(typeof e=="boolean")return!!t;var r=[],i=!1,s=-1;if(Array.isArray(e))r=e,s=e.indexOf(n),i=s>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,s).concat(r.slice(s+1)):r}var M5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Ut(e){var t=y.useRef(e);return M5(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var D5=y.forwardRef(function(e,t){var n=e.action,r=mT(e,["action"]),i=n??"#",s=C5(),o=s.handleReset,a=s.handleSubmit;return y.createElement("form",ze({onSubmit:a,ref:t,onReset:o,action:i},r))});D5.displayName="Form";const yT=({init:e,schema:t,action:n})=>P5({initialValues:e,validationSchema:t,validateOnBlur:!1,enableReinitialize:!0,validateOnChange:!1,validateOnMount:!1,onSubmit:r=>{n(r)}});function F5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const L5=e=>{switch(e){case"success":return V5;case"info":return z5;case"warning":return B5;case"error":return U5;default:return null}},I5=Array(12).fill(0),$5=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},I5.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),V5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),B5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),U5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),H5=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),W5=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Sh=1;class K5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Sh++,o=this.toasts.find(l=>l.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0}))),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const a=i.then(async u=>{if(o=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(G5(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"error",description:d,...h})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof c=="object"?c:{message:c};this.create({id:r,type:"success",description:d,...h})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,d=typeof f=="object"?f:{message:f};this.create({id:r,type:"error",description:c,...d})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>o[0]==="reject"?f(o[1]):u(o[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Sh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xt=new K5,q5=(e,t)=>{const n=(t==null?void 0:t.id)||Sh++;return xt.addToast({title:e,...t,id:n}),n},G5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Q5=q5,Y5=()=>xt.toasts,X5=()=>xt.getActiveToasts(),kv=Object.assign(Q5,{success:xt.success,info:xt.info,warning:xt.warning,error:xt.error,custom:xt.custom,message:xt.message,promise:xt.promise,dismiss:xt.dismiss,loading:xt.loading},{getHistory:Y5,getToasts:X5});F5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ml(e){return e.label!==void 0}const Z5=3,J5="24px",eL="16px",_v=4e3,tL=356,nL=14,rL=45,iL=200;function xn(...e){return e.filter(Boolean).join(" ")}function sL(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const oL=e=>{var t,n,r,i,s,o,a,l,u;const{invert:f,toast:c,unstyled:d,interacting:h,setHeights:m,visibleToasts:x,heights:b,index:p,toasts:g,expanded:v,removeToast:E,defaultRichColors:S,closeButton:C,style:k,cancelButtonStyle:P,actionButtonStyle:j,className:N="",descriptionClassName:I="",duration:re,position:ie,gap:xe,expandByDefault:Oe,classNames:Q,icons:ne,closeButtonAriaLabel:O="Close toast"}=e,[L,B]=R.useState(null),[V,H]=R.useState(null),[q,ce]=R.useState(!1),[ye,J]=R.useState(!1),[Ve,pt]=R.useState(!1),[mt,ir]=R.useState(!1),[eo,Na]=R.useState(!1),[Ma,to]=R.useState(0),[wc,Da]=R.useState(0),Yr=R.useRef(c.duration||re||_v),Fa=R.useRef(null),kt=R.useRef(null),bc=p===0,Sc=p+1<=x,_=c.type,M=c.dismissible!==!1,$=c.className||"",z=c.descriptionClassName||"",G=R.useMemo(()=>b.findIndex(Y=>Y.toastId===c.id)||0,[b,c.id]),oe=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:C},[c.closeButton,C]),_e=R.useMemo(()=>c.duration||re||_v,[c.duration,re]),_t=R.useRef(0),yn=R.useRef(0),qi=R.useRef(0),sr=R.useRef(null),[$m,La]=ie.split("-"),Ia=R.useMemo(()=>b.reduce((Y,Be,Xe)=>Xe>=G?Y:Y+Be.height,0),[b,G]),Vm=W5(),LT=c.invert||f,Tc=_==="loading";yn.current=R.useMemo(()=>G*xe+Ia,[G,Ia]),R.useEffect(()=>{Yr.current=_e},[_e]),R.useEffect(()=>{ce(!0)},[]),R.useEffect(()=>{const Y=kt.current;if(Y){const Be=Y.getBoundingClientRect().height;return Da(Be),m(Xe=>[{toastId:c.id,height:Be,position:c.position},...Xe]),()=>m(Xe=>Xe.filter(Pt=>Pt.toastId!==c.id))}},[m,c.id]),R.useLayoutEffect(()=>{if(!q)return;const Y=kt.current,Be=Y.style.height;Y.style.height="auto";const Xe=Y.getBoundingClientRect().height;Y.style.height=Be,Da(Xe),m(Pt=>Pt.find(Ke=>Ke.toastId===c.id)?Pt.map(Ke=>Ke.toastId===c.id?{...Ke,height:Xe}:Ke):[{toastId:c.id,height:Xe,position:c.position},...Pt])},[q,c.title,c.description,m,c.id]);const or=R.useCallback(()=>{J(!0),to(yn.current),m(Y=>Y.filter(Be=>Be.toastId!==c.id)),setTimeout(()=>{E(c)},iL)},[c,E,m,yn]);R.useEffect(()=>{if(c.promise&&_==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return v||h||Vm?(()=>{if(qi.current<_t.current){const Pt=new Date().getTime()-_t.current;Yr.current=Yr.current-Pt}qi.current=new Date().getTime()})():(()=>{Yr.current!==1/0&&(_t.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),or()},Yr.current))})(),()=>clearTimeout(Y)},[v,h,c,_,Vm,or]),R.useEffect(()=>{c.delete&&or()},[or,c.delete]);function IT(){var Y;if(ne!=null&&ne.loading){var Be;return R.createElement("div",{className:xn(Q==null?void 0:Q.loader,c==null||(Be=c.classNames)==null?void 0:Be.loader,"sonner-loader"),"data-visible":_==="loading"},ne.loading)}return R.createElement($5,{className:xn(Q==null?void 0:Q.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:_==="loading"})}var Bm,zm;return R.createElement("li",{tabIndex:0,ref:kt,className:xn(N,$,Q==null?void 0:Q.toast,c==null||(t=c.classNames)==null?void 0:t.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[_],c==null||(n=c.classNames)==null?void 0:n[_]),"data-sonner-toast":"","data-rich-colors":(Bm=c.richColors)!=null?Bm:S,"data-styled":!(c.jsx||c.unstyled||d),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":eo,"data-removed":ye,"data-visible":Sc,"data-y-position":$m,"data-x-position":La,"data-index":p,"data-front":bc,"data-swiping":Ve,"data-dismissible":M,"data-type":_,"data-invert":LT,"data-swipe-out":mt,"data-swipe-direction":V,"data-expanded":!!(v||Oe&&q),style:{"--index":p,"--toasts-before":p,"--z-index":g.length-p,"--offset":`${ye?Ma:yn.current}px`,"--initial-height":Oe?"auto":`${wc}px`,...k,...c.style},onDragEnd:()=>{pt(!1),B(null),sr.current=null},onPointerDown:Y=>{Tc||!M||(Fa.current=new Date,to(yn.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(pt(!0),sr.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,Be,Xe;if(mt||!M)return;sr.current=null;const Pt=Number(((Y=kt.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$a=Number(((Be=kt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((Xe=Fa.current)==null?void 0:Xe.getTime()),Bt=L==="x"?Pt:$a,Va=Math.abs(Bt)/Ke;if(Math.abs(Bt)>=rL||Va>.11){to(yn.current),c.onDismiss==null||c.onDismiss.call(c,c),H(L==="x"?Pt>0?"right":"left":$a>0?"down":"up"),or(),ir(!0);return}else{var nn,rn;(nn=kt.current)==null||nn.style.setProperty("--swipe-amount-x","0px"),(rn=kt.current)==null||rn.style.setProperty("--swipe-amount-y","0px")}Na(!1),pt(!1),B(null)},onPointerMove:Y=>{var Be,Xe,Pt;if(!sr.current||!M||((Be=window.getSelection())==null?void 0:Be.toString().length)>0)return;const Ke=Y.clientY-sr.current.y,Bt=Y.clientX-sr.current.x;var Va;const nn=(Va=e.swipeDirections)!=null?Va:sL(ie);!L&&(Math.abs(Bt)>1||Math.abs(Ke)>1)&&B(Math.abs(Bt)>Math.abs(Ke)?"x":"y");let rn={x:0,y:0};const Um=Xr=>1/(1.5+Math.abs(Xr)/20);if(L==="y"){if(nn.includes("top")||nn.includes("bottom"))if(nn.includes("top")&&Ke<0||nn.includes("bottom")&&Ke>0)rn.y=Ke;else{const Xr=Ke*Um(Ke);rn.y=Math.abs(Xr)<Math.abs(Ke)?Xr:Ke}}else if(L==="x"&&(nn.includes("left")||nn.includes("right")))if(nn.includes("left")&&Bt<0||nn.includes("right")&&Bt>0)rn.x=Bt;else{const Xr=Bt*Um(Bt);rn.x=Math.abs(Xr)<Math.abs(Bt)?Xr:Bt}(Math.abs(rn.x)>0||Math.abs(rn.y)>0)&&Na(!0),(Xe=kt.current)==null||Xe.style.setProperty("--swipe-amount-x",`${rn.x}px`),(Pt=kt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${rn.y}px`)}},oe&&!c.jsx&&_!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":Tc,"data-close-button":!0,onClick:Tc||!M?()=>{}:()=>{or(),c.onDismiss==null||c.onDismiss.call(c,c)},className:xn(Q==null?void 0:Q.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(zm=ne==null?void 0:ne.close)!=null?zm:H5):null,_||c.icon||c.promise?R.createElement("div",{"data-icon":"",className:xn(Q==null?void 0:Q.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||IT():null,c.type!=="loading"?c.icon||(ne==null?void 0:ne[_])||L5(_):null):null,R.createElement("div",{"data-content":"",className:xn(Q==null?void 0:Q.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:xn(Q==null?void 0:Q.title,c==null||(o=c.classNames)==null?void 0:o.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:xn(I,z,Q==null?void 0:Q.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&ml(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||P,onClick:Y=>{ml(c.cancel)&&M&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),or())},className:xn(Q==null?void 0:Q.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&ml(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{ml(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&or())},className:xn(Q==null?void 0:Q.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Pv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function aL(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,o=s?"--mobile-offset":"--offset",a=s?eL:J5;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${o}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const lL=R.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:d,duration:h,style:m,visibleToasts:x=Z5,toastOptions:b,dir:p=Pv(),gap:g=nL,icons:v,containerAriaLabel:E="Notifications"}=t,[S,C]=R.useState([]),k=R.useMemo(()=>Array.from(new Set([i].concat(S.filter(V=>V.position).map(V=>V.position)))),[S,i]),[P,j]=R.useState([]),[N,I]=R.useState(!1),[re,ie]=R.useState(!1),[xe,Oe]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=R.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=R.useRef(null),L=R.useRef(!1),B=R.useCallback(V=>{C(H=>{var q;return(q=H.find(ce=>ce.id===V.id))!=null&&q.delete||xt.dismiss(V.id),H.filter(({id:ce})=>ce!==V.id)})},[]);return R.useEffect(()=>xt.subscribe(V=>{if(V.dismiss){const H=S.map(q=>q.id===V.id?{...q,delete:!0}:q);requestAnimationFrame(()=>{C(H)});return}setTimeout(()=>{dk.flushSync(()=>{C(H=>{const q=H.findIndex(ce=>ce.id===V.id);return q!==-1?[...H.slice(0,q),{...H[q],...V},...H.slice(q+1)]:[V,...H]})})})}),[S]),R.useEffect(()=>{if(c!=="system"){Oe(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Oe("dark"):Oe("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:H})=>{Oe(H?"dark":"light")})}catch{V.addListener(({matches:q})=>{try{Oe(q?"dark":"light")}catch(ce){console.error(ce)}})}},[c]),R.useEffect(()=>{S.length<=1&&I(!1)},[S]),R.useEffect(()=>{const V=H=>{var q;if(s.every(J=>H[J]||H.code===J)){var ye;I(!0),(ye=Q.current)==null||ye.focus()}H.code==="Escape"&&(document.activeElement===Q.current||(q=Q.current)!=null&&q.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),R.useEffect(()=>{if(Q.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,L.current=!1)}},[Q.current]),R.createElement("section",{ref:n,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((V,H)=>{var q;const[ce,ye]=V.split("-");return S.length?R.createElement("ol",{key:V,dir:p==="auto"?Pv():p,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":xe,"data-y-position":ce,"data-lifted":N&&S.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((q=P[0])==null?void 0:q.height)||0}px`,"--width":`${tL}px`,"--gap":`${g}px`,...m,...aL(u,f)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{re||I(!1)},onDragEnd:()=>I(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},S.filter(J=>!J.position&&H===0||J.position===V).map((J,Ve)=>{var pt,mt;return R.createElement(oL,{key:J.id,icons:v,index:Ve,toast:J,defaultRichColors:d,duration:(pt=b==null?void 0:b.duration)!=null?pt:h,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:x,closeButton:(mt=b==null?void 0:b.closeButton)!=null?mt:a,interacting:re,position:V,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:B,toasts:S.filter(ir=>ir.position==J.position),heights:P.filter(ir=>ir.position==J.position),setHeights:j,expandByDefault:o,gap:g,expanded:N,swipeDirections:t.swipeDirections})})):null}))});function uL(e){return Array.isArray(e)&&e[0].field!==void 0}const vT=(e,t)=>{var n;if(uL(e)){for(const r of e)(n=t==null?void 0:t.form)==null||n.setFieldError(r.field,r.message);return}if(e&&e.message){t!=null&&t.noToast||kv.error(e.message);return}if(e&&e.error){t!=null&&t.noToast||kv.error(e.error);return}};function cL(e,t,n){let r=n;r||(r=Object.keys(e));for(let i of r){if(Array.isArray(e[i])&&Array.isArray(t[i])){if(e[i].length!==t[i].length)return!1;for(let s=0;s<e[i].length;s++)if(e[i][s]!==t[i][s])return!1;continue}if(e[i]!==t[i])return!1}return!0}function Nm({id:e,text:t,className:n,required:r}){return t?w.jsxs("label",{htmlFor:e,className:Ne("mb-1 block text-sm font-medium text-slate-700",n),children:[t,r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}):null}const Ef={sm:"px-3 py-1 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-15"};function fL({id:e,label:t,suffix:n,prefix:r,size:i="md",type:s="text",noMargin:o=!1,required:a=!1,error:l,ariaDescribedBy:u,className:f,ariaInvalid:c,ariaLabel:d,autoFocus:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!o},f),children:[w.jsx(Nm,{id:e,text:t,required:a}),w.jsxs("div",{className:"flex items-center",children:[r&&w.jsx("span",{className:Ne("inline-block border border-solid border-r-0 border-slate-200 bg-slate-100 rounded-l-md",Ef[i],{"border-red-500!":!!l}),children:r}),w.jsx("input",{id:e,className:Ne("text-gray-800 border border-solid rounded-lg block text-base py-2 px-3 w-full border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400",Ef[i],{"rounded-l-none":!!r,"rounded-r-none":!!n,"border-red-500! text-red-500!":!!l}),type:s,required:a,"aria-describedby":u,"aria-invalid":c,"aria-label":d,style:{color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()},...m}),n&&w.jsx("span",{className:Ne("inline-block border border-solid border-l-0 border-slate-200 bg-slate-100 rounded-r-md",Ef[i],{"border-red-500!":!!l}),children:n})]}),!!l&&w.jsx("p",{className:"mt-1 text-xs text-red-500",children:l})]})}const dL=(e,t)=>{document.cookie=`${e}=${t}`},xT=y.createContext({}),hL=()=>`${window.location.pathname}_$$_${document.title}`,pL=()=>{const e=localStorage.getItem("page");return!e||e===""?"/":e},mL=()=>{const e=localStorage.getItem("p-history");if(!e||e==="")return[];try{return JSON.parse(e)}catch{return[]}};function gL({children:e}){const[t,n]=y.useState("/"),[r,i]=y.useState(mL());function s(){i([]),localStorage.removeItem("p-history")}const o=a=>{n(a),i(l=>[...new Set([...l,a])]),localStorage.setItem("page",a),localStorage.setItem("p-history",JSON.stringify(r))};return w.jsx(xT.Provider,{value:{page:t,setPage:o,history:r,clearHistory:s},children:e})}function Mm(){return y.useContext(xT)}function yL({label:e,id:t,value:n="",className:r,placeholder:i,children:s,required:o,error:a,...l}){return w.jsxs("div",{className:r||"",children:[e&&w.jsx(Nm,{id:t,required:o,text:e}),w.jsx("select",{id:t,"aria-placeholder":i,value:n,"aria-label":e,className:"light forelect transition-colors duration-200 border border-solid text-gray-900 text-sm rounded-md focus:ring-emerald-500 focus-visible:ring-0 focus-visible:shadow-none outline focus-visible:outline-none focus-visible:ber-emerald-500 focus:border-emerald-500 block w-full px-2 py-2 placeholder-fuchsia-600 caret-emer-500",onChange:l.onChange,required:o,...l,children:s}),!!a&&w.jsx("p",{className:"1 texm text-r500",children:a})]})}const Av={ring:{label:"",input:"relative before:content[''] before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity hover:before:opacity-10"},hover:{label:"hover:bg-secondary transition-colors duration-200 px-2 py-1 rounded-md",input:""}},vL={blue:"checked:border-blue-500 checked:bg-blue-500 checked:before:bg-blue-500",indigo:"checked:border-indigo-500 checked:bg-indigo-500 checked:before:bg-indigo-500",green:"checked:border-green-500 checked:bg-green-500 checked:before:bg-green-500",red:"checked:border-red-500 checked:bg-red-500 checked:before:bg-red-500",orange:"checked:border-orange-500 checked:bg-orange-500 checked:before:bg-orange-500"},xL={sm:"h-4 w-4 lg:h-3 lg:w-3",md:"h-6 w-6 lg:h-5 lg:w-5",lg:"h-8 w-8 lg:h-7 lg:w-7"},wL={sm:"h-3 w-3 lg:h-2.5 lg:w-2.5",md:"h-5 w-5 lg:h-4 lg:w-4",lg:"h-7 w-7 lg:h-6 lg:w-6"};function bL({children:e,name:t,required:n,value:r,checked:i,onChange:s,onBlur:o,red:a,id:l=t,size:u="md",effect:f="ring",reversed:c=!1,variant:d="blue",...h}){return w.jsxs("div",{children:[w.jsxs("div",{className:`flex items-center justify-between ${c?"flex-row-reverse":""} ${Av[f].label}`,children:[w.jsxs("label",{className:"disable-highlight relative mr-3 flex cursor-pointer items-center rounded-full",htmlFor:l,children:[w.jsx("input",{id:l,name:t,type:"checkbox",className:`border-gray-200 peer cursor-pointer appearance-none rounded-md border border-solid bg-white transition-all ${vL[d]} ${xL[u]} ${Av[f].input}`,required:n,checked:i,value:r,onChange:m=>s==null?void 0:s(m.target.checked),onBlur:m=>o==null?void 0:o(m.target.checked),...h}),w.jsx("div",{className:"pointer-events-none absolute left-2/4 top-2/4 translate-x-2/4 translate-y-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",children:w.jsx(De.Check,{className:wL[u]})})]}),w.jsx("label",{className:"disable-highlight mt-px flex grow cursor-pointer select-none items-center justify-between font-light text-gray-800",htmlFor:l,children:e})]}),a&&w.jsx("small",{className:"text-xs text-red-500",children:a})]})}function SL({id:e,value:t,name:n,onChange:r,children:i,disabled:s,className:o}){return w.jsxs("label",{htmlFor:e,className:Ne("relative flex cursor-pointer items-center rounded-md p-2 focus:outline-none",{"opacity-60 cursor-not-allowed":s},o),children:[w.jsx("input",{type:"radio",id:e,name:n,value:e,checked:t,onChange:a=>{r&&r(a.target.checked)},className:"peer h-4 w-4 cursor-pointer appearance-none rounded-full border-2 border-slate-300 transition-all checked:border-[5px] checked:border-indigo-600 focus:ring-0 focus:ring-offset-0",disabled:s}),w.jsx("span",{className:"ml-2 text-sm font-medium text-slate-700",children:i})]})}function TL({id:e,label:t,children:n,required:r,className:i}){return w.jsxs("fieldset",{id:e,className:i,children:[t&&w.jsxs("legend",{className:"mb-1 block text-sm font-medium text-slate-700",children:[t," ",r&&w.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),w.jsx("div",{className:"flex flex-col gap-0 mt-1",children:n})]})}const Rv=Object.assign(SL,{Group:TL});function Dm({id:e,label:t,suffix:n,prefix:r,className:i,noMargin:s,rows:o=3,type:a="text",required:l=!1,error:u,ariaInvalid:f,inputRef:c,autoFocus:d=!0,style:h,...m}){const x=nr();return w.jsxs("div",{className:Ne({"mb-2":!s},i),children:[t&&w.jsx(Nm,{id:e,text:t,required:l}),w.jsx("textarea",{className:Ne("resize-none max-h-36 text-gray-800 w-full py-2 px-3 border border-solid rounded-lg block border-slate-200 focus:outline-hidden focus:border-custom-500 disabled:bg-slate-100 disabled:border-slate-300 disabled:text-slate-500 placeholder:text-slate-400 invalid:border-red-500 invalid:text-red-500",{"border-red-500! text-red-500!":!!u}),id:e,rows:o,"aria-invalid":f,...m,ref:c,autoFocus:d,style:{...h,color:x.getColor(K.InputText),backgroundColor:x.getColor(K.InputBackground),borderColor:x.getColor(K.InputBorder),borderRadius:x.getRadius()}}),!!u&&w.jsx("p",{className:"text-red-500 mt-1 text-xs",children:u})]})}function EL({onOk:e,clientId:t,widgetId:n,appearance:r}){var h,m,x,b,p,g,v,E;const i=nr(),{defaultValues:s}=tn(),o=Mm(),a=hN(),l=(m=(h=r==null?void 0:r.body)==null?void 0:h.inputs)==null?void 0:m.reduce((S,C)=>{const k=C.remember?Ll(C.name):void 0;return S[C.name]=k||(s==null?void 0:s[C.name])||"",S},{}),u=(b=(x=r==null?void 0:r.body)==null?void 0:x.inputs)==null?void 0:b.reduce((S,C)=>(S[C.name]="",S),{}),f=wm((g=(p=r==null?void 0:r.body)==null?void 0:p.inputs)==null?void 0:g.reduce((S,C)=>(S[C.name]=C.required?Eu().required(C.label):Eu(),S),{})),c=yT({init:{...l},schema:f,action:async S=>{var P;const[C,k]=await a.mutateAsync({inputs:S,history:o.history,client_id:t,widget_id:n});if(xp(k)){o.clearHistory();for(const j of((P=r==null?void 0:r.body)==null?void 0:P.inputs)||[])j.remember&&dL(j.name,S[j.name]);e==null||e();return}vT(C,{form:c})}}),d=!cL(u,c.values);return w.jsx("section",{className:"h-full overflow-y-auto px-6 py-5 bg-white",style:{backgroundColor:i.getColor(K.GreeterBackground)},children:w.jsxs("form",{className:"grid grid-cols-1 gap-4",onSubmit:S=>{S.preventDefault(),c.handleSubmit()},children:[(E=(v=r==null?void 0:r.body)==null?void 0:v.inputs)==null?void 0:E.map(S=>{var C,k;if(["text","email","phone"].includes(S.type))return w.jsx(fL,{id:S.name,name:S.name,type:S.type,label:S.label,value:c.values[S.name],onChange:c.handleChange,onBlur:c.handleBlur,autoComplete:"off",placeholder:S.placeholder,error:c.errors[S.name],ariaInvalid:c.errors.name?!0:void 0,required:S.required,noMargin:!0},S.name);if(S.type==="select")return w.jsx(yL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,label:S.label,required:S.required,children:(C=S.options)==null?void 0:C.map(P=>w.jsx("option",{value:P,children:P},P))},S.name);if(S.type==="checkbox")return w.jsx(bL,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,required:S.required,children:S.label},S.name);if(S.type==="radio")return w.jsx(Rv.Group,{id:S.name,label:S.label,required:S.required,children:(k=S.options)==null?void 0:k.map(P=>w.jsx(Rv,{onChange:j=>{j?c.setFieldValue(S.name,P):c.setFieldValue(S.name,"")},id:P,name:S.name,value:P===c.values[S.name],children:P},P))},S.name);if(S.type==="textarea")return w.jsx(Dm,{id:S.name,name:S.name,value:c.values[S.name],onChange:c.handleChange,placeholder:S.placeholder,error:c.errors[S.name],required:S.required,label:S.label},S.name)}),w.jsx(Gn,{textKey:K.GreeterButtonText,bgKey:K.GreeterButtonBackground,type:"submit",disabled:!d,className:"mt-3 transition-all duration-300 hover:opacity-90 transform hover:translate-y-[-1px] shadow-sm",children:"Sohbet Oluştur"})]})})}function CL({onClose:e}){return w.jsx(Gn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"md",rounded:!0,onClick:e,className:"absolute top-2 right-2",children:w.jsx(De.X,{className:"size-5"})})}function kL({image_url:e,name:t,size:n="size-9"}){return e?w.jsx("img",{src:e,alt:t,className:Ne("rounded-md",n)}):w.jsx("div",{className:"flex items-center justify-center gap-1",children:w.jsx(De.Website,{className:Ne("text-slate-500",n)})})}function _L(){const e=Mm(),t=y.useCallback(()=>{const n=window.location.pathname;n!==e.page&&e.setPage(n)},[e.page]);return CS("popstate",t),null}function PL(){const e=Vi(),t=Mm(),n=y.useCallback(()=>{const r=window.location.pathname;if(r!==t.page){if(e){e.emit(Dn.PageChange,{page:r});return}t.setPage(r)}},[e,t.page]);return CS("popstate",n),y.useEffect(()=>{if(!e)return;const r=pL(),i=hL();r!==i&&(e.emit(Dn.PageChange,{page:i}),t.setPage(i))},[e]),null}function AL({children:e}){const t=nr(),{widget:n}=tn();return n?w.jsx(ji,{children:w.jsxs(Re.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.3,ease:"easeOut"},className:"h-full w-full relative overflow-hidden",children:[w.jsx(Re.div,{initial:{opacity:.8},animate:{opacity:1},transition:{duration:.2},style:{background:t.getColor(K.GreeterTopBackground)},className:"h-44 absolute top-0 left-0 w-full rounded-t-xl flex flex-col items-center justify-center shadow-sm"}),e]})}):null}function RL(){return _L(),null}const Cf=(e,t)=>{var n;return(n=e.find(r=>r.type===t))==null?void 0:n.content};function OL(){var c,d,h,m,x,b;const e=nr(),{widget:t,setOpen:n}=tn(),[r,i]=y.useState(!0),s=hm(),o=pm();if(!t)return null;const a=()=>{n(!1)};if(y.useEffect(()=>{pN(t.client_id).then(([p,g])=>{xp(g)&&s.push("chat")}).finally(()=>{i(!1)})},[]),r)return null;const l=Cf(((d=(c=t.appearance)==null?void 0:c.head)==null?void 0:d.elements)||[],"text"),u=Cf(((m=(h=t.appearance)==null?void 0:h.head)==null?void 0:m.elements)||[],"title"),f=Cf(((b=(x=t.appearance)==null?void 0:x.head)==null?void 0:b.elements)||[],"logo");return w.jsxs(AL,{children:[w.jsxs("div",{className:"relative flex flex-col gap-3 items-center justify-center h-44",children:[o&&w.jsx(CL,{onClose:a}),f&&w.jsx(Re.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.2},children:w.jsx(kL,{name:t.name,image_url:f,size:"size-20"})}),u&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.15,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-xl font-bold",children:u}),l&&w.jsx(Re.div,{initial:{y:5,opacity:0},animate:{y:0,opacity:1},transition:{delay:.2,duration:.2},style:{color:e.getColor(K.GreeterTopText)},className:"text-white text-sm opacity-90",children:l})]}),w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25,duration:.2},className:"overflow-y-auto",style:{height:"calc(100% - 11rem)"},children:w.jsx(EL,{clientId:t.client_id,widgetId:t.link_id,appearance:t.appearance,onOk:()=>{s.push("chat")}})})]})}function jL(){return w.jsxs(w.Fragment,{children:[w.jsx(_S,{border:!0,children:w.jsx(OL,{})}),w.jsx(RL,{})]})}const NL=[{path:"/",component:jL,name:"registration"}];var ii=(e=>(e.Open="open",e.Closed="closed",e.Pending="pending",e.Deleted="deleted",e.Created="created",e))(ii||{}),wT=(e=>(e.AdminJoin="admin_join",e))(wT||{}),et=(e=>(e.Customer="customer",e.User="user",e.System="system",e.Activity="activity",e))(et||{});function ML({name:e,avatar:t,className:n="text-neutral-500"}){return w.jsxs(Re.div,{initial:{opacity:.8},animate:{opacity:1},className:"flex gap-2 items-center",children:[w.jsx("div",{className:"min-w-max",children:w.jsxs("span",{children:[t&&w.jsx("img",{className:"size-10 rounded-full border border-white/20 shadow-sm",src:t,"aria-label":e}),!t&&w.jsx("div",{className:"size-10 rounded-full bg-white/20 flex items-center justify-center text-white font-medium",children:e.charAt(0).toUpperCase()})]})}),w.jsx("div",{className:"flex flex-col",children:w.jsx("span",{className:Ne("line-clamp-1 font-medium",n),children:e})})]})}var DL=Object.defineProperty,FL=(e,t,n)=>t in e?DL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kf=(e,t,n)=>(FL(e,typeof t!="symbol"?t+"":t,n),n);let LL=class{constructor(){kf(this,"current",this.detect()),kf(this,"handoffState","pending"),kf(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Vl=new LL;function IL(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function mc(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return IL(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=mc();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function bT(){let[e]=y.useState(mc);return y.useEffect(()=>()=>e.dispose(),[e]),e}let $r=(e,t)=>{Vl.isServer?y.useEffect(e,t):y.useLayoutEffect(e,t)};function ST(e){let t=y.useRef(e);return $r(()=>{t.current=e},[e]),t}let Kn=function(e){let t=ST(e);return R.useCallback((...n)=>t.current(...n),[t])};function Th(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function gc(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,gc),r}var TT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(TT||{}),_r=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(_r||{});function ET(){let e=VL();return y.useCallback(t=>$L({mergeRefs:e,...t}),[e])}function $L({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??BL;let l=CT(t,e);if(s)return gl(l,n,r,o,a);let u=i??0;if(u&2){let{static:f=!1,...c}=l;if(f)return gl(c,n,r,o,a)}if(u&1){let{unmount:f=!0,...c}=l;return gc(f?0:1,{0(){return null},1(){return gl({...c,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return gl(l,n,r,o,a)}function gl(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=_f(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},f=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let d=!1,h=[];for(let[m,x]of Object.entries(t))typeof x=="boolean"&&(d=!0),x===!0&&h.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(d){c["data-headlessui-state"]=h.join(" ");for(let m of h)c[`data-${m}`]=""}}if(s===y.Fragment&&(Object.keys(si(l)).length>0||Object.keys(si(c)).length>0))if(!y.isValidElement(f)||Array.isArray(f)&&f.length>1){if(Object.keys(si(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(si(l)).concat(Object.keys(si(c))).map(d=>` - ${d}`).join(`
106
106
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
107
107
  `)].join(`
108
- `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Ch(h(...p),l.className):Ch(h,l.className),x=m?{className:m}:{},w=CT(f.props,si(Pf(l,["ref"])));for(let p in u)p in w&&delete u[p];return y.cloneElement(f,Object.assign({},w,u,c,{ref:i(UL(f),c.ref)},x))}return y.createElement(s,Object.assign({},Pf(l,["ref"]),s!==y.Fragment&&c,s!==y.Fragment&&u),f)}function BL(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function zL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function CT(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Lm(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Pf(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function UL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let HL=Symbol();function kT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=qn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[HL]))?void 0:n}function WL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(c=>c|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(c=>c&~l),[n]),a=y.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var KL={},jv,Mv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((jv=process==null?void 0:KL)==null?void 0:jv.NODE_ENV)==="test"&&typeof((Mv=Element==null?void 0:Element.prototype)==null?void 0:Mv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
- `)),[]});var qL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(qL||{});function GL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function QL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=WL(e&&i?3:0),c=y.useRef(!1),f=y.useRef(!1),u=bT();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),YL(t,{inFlight:c,prepare(){f.current?f.current=!1:f.current=c.current,c.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,u]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function YL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=gc();return ZL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(XL(e,r))})}),s.dispose}function XL(e,t){var n,r;let i=gc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function ZL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Im=y.createContext(null);Im.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function _T(){return y.useContext(Im)}function JL({value:e,children:t}){return R.createElement(Im.Provider,{value:e},t)}function eI(){let e=typeof document>"u";return"useSyncExternalStore"in Af?(t=>t.useSyncExternalStore)(Af)(()=>()=>{},()=>!1,()=>!e):!1}function PT(){let e=eI(),[t,n]=y.useState(Vl.isHandoffComplete);return t&&Vl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Vl.handoff(),[]),e?!1:t}function tI(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function AT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:OT)!==y.Fragment||R.Children.count(e.children)===1}let vc=y.createContext(null);vc.displayName="TransitionContext";var nI=(e=>(e.Visible="visible",e.Hidden="hidden",e))(nI||{});function rI(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function iI(){let e=y.useContext(xc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xc=y.createContext(null);xc.displayName="NestingContext";function wc(e){return"children"in e?wc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function RT(e,t){let n=ST(e),r=y.useRef([]),i=tI(),s=bT(),o=qn((h,m=_r.Hidden)=>{let x=r.current.findIndex(({el:w})=>w===h);x!==-1&&(yc(m,{[_r.Unmount](){r.current.splice(x,1)},[_r.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var w;!wc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),a=qn(h=>{let m=r.current.find(({el:x})=>x===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),c=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),u=qn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([w])=>w!==h)),t==null||t.chains.current[m].push([h,new Promise(w=>{l.current.push(w)})]),t==null||t.chains.current[m].push([h,new Promise(w=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>w())})]),m==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=qn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([w,p])=>p)).then(()=>{var w;(w=l.current.shift())==null||w()}).then(()=>x(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:u,onStop:d,wait:c,chains:f}),[a,o,r,u,d,f,c])}let OT=y.Fragment,jT=TT.RenderStrategy;function sI(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:f,enterTo:u,entered:d,leave:h,leaveFrom:m,leaveTo:x,...w}=e,[p,g]=y.useState(null),v=y.useRef(null),E=AT(e),S=kT(...E?[v,t,g]:t===null?[]:[t]),C=(n=w.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=rI(),[M,I]=y.useState(k?"visible":"hidden"),re=iI(),{register:ie,unregister:xe}=re;$r(()=>ie(v),[ie,v]),$r(()=>{if(C===_r.Hidden&&v.current){if(k&&M!=="visible"){I("visible");return}return yc(M,{hidden:()=>xe(v),visible:()=>ie(v)})}},[M,v,ie,xe,k,C]);let Re=PT();$r(()=>{if(E&&Re&&M==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,M,Re,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=RT(()=>{O.current||(I("hidden"),xe(v))},re),z=qn(Ie=>{O.current=!0;let dt=Ie?"enter":"leave";L.onStart(v,dt,ht=>{ht==="enter"?s==null||s():ht==="leave"&&(a==null||a())})}),V=qn(Ie=>{let dt=Ie?"enter":"leave";O.current=!1,L.onStop(v,dt,ht=>{ht==="enter"?o==null||o():ht==="leave"&&(l==null||l())}),dt==="leave"&&!wc(L)&&(I("hidden"),xe(v))});y.useEffect(()=>{E&&i||(z(k),V(k))},[k,E,i]);let W=!(!i||!E||!Re||Q),[,q]=QL(W,p,k,{start:z,end:V}),ce=si({ref:S,className:((r=Ch(w.className,ne&&c,ne&&f,q.enter&&c,q.enter&&q.closed&&f,q.enter&&!q.closed&&u,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...GL(q)}),ye=0;M==="visible"&&(ye|=di.Open),M==="hidden"&&(ye|=di.Closed),k&&M==="hidden"&&(ye|=di.Opening),!k&&M==="visible"&&(ye|=di.Closing);let J=ET();return R.createElement(xc.Provider,{value:L},R.createElement(JL,{value:ye},J({ourProps:ce,theirProps:w,defaultTag:OT,features:jT,visible:M==="visible",name:"Transition.Child"})))}function oI(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=AT(e),l=kT(...a?[o,t]:t===null?[]:[t]);PT();let c=_T();if(n===void 0&&c!==null&&(n=(c&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,u]=y.useState(n?"visible":"hidden"),d=RT(()=>{n||u("hidden")}),[h,m]=y.useState(!0),x=y.useRef([n]);$r(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let w=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?u("visible"):!wc(d)&&o.current!==null&&u("hidden")},[n,d]);let p={unmount:i},g=qn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),v=qn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=ET();return R.createElement(xc.Provider,{value:d},R.createElement(vc.Provider,{value:w},E({ourProps:{...p,as:y.Fragment,children:R.createElement(MT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:y.Fragment,features:jT,visible:f==="visible",name:"Transition"})))}function aI(e,t){let n=y.useContext(vc)!==null,r=_T()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(kh,{ref:t,...e}):R.createElement(MT,{ref:t,...e}))}let kh=Lm(oI),MT=Lm(sI),lI=Lm(aI),uI=Object.assign(kh,{Child:lI,Root:kh});const $m=y.createContext(void 0),Fo=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),b.jsx($m.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:b.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},cI=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext($m),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",c=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return b.jsx("div",{children:e==="a"?b.jsx(a2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:c+(s?" show":""),children:t}):b.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},fI=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext($m),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const c=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),u=()=>{if(i&&a==="right-end"&&c.current){const d=c.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&c.current){const d=c.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return b.jsx(uI,{as:R.Fragment,show:i,children:d=>b.jsx(e,{ref:c,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:u(),children:n})})};Fo.Trigger=cI;Fo.Content=fI;const dI={red:"hover:bg-red-500 hover:text-white text-red-500",default:"hover:bg-zink-300 text-zink-600 dark:hover:bg-zink-500 dark:text-zink-200"};function hI({onChatClose:e}){const[t,n]=y.useState(!1),r=$i(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return b.jsxs(b.Fragment,{children:[t&&b.jsx("div",{className:"absolute top-0 left-0 backdrop-blur-xs bg-slate-950/20 z-50 h-full w-full rounded-md",children:b.jsx("div",{className:"flex flex-col items-center justify-center h-full mx-5",children:b.jsxs("div",{className:"bg-white p-4 rounded-md",children:[b.jsx("div",{className:"text-lg font-semibold text-neutral-900",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),b.jsxs("div",{className:"flex justify-between mt-4",children:[b.jsx("button",{type:"button",className:"bg-red-500 text-white px-4 py-2 rounded-md",onClick:i,children:"Evet"}),b.jsx("button",{type:"button",className:"bg-neutral-200 text-neutral-900 px-4 py-2 rounded-md",onClick:()=>n(!1),children:"Vazgeç"})]})]})})}),b.jsxs(Fo,{className:"relative flex items-center h-full",children:[b.jsx(Fo.Trigger,{type:"button",className:"h-full flex items-center",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:b.jsx(Me.Menu,{className:"size-6 text-white"})}),!t&&b.jsxs(Fo.Content,{placement:"left-end",className:"absolute z-[9999] text-left bg-white rounded-md shadow-lg right-0 top-5 dropdown-menu min-w-[14rem] dark:bg-zink-600","aria-labelledby":"dropdownMenuButton",children:[b.jsx("h5",{className:"text-base font-semibold text-slate-500 dark:text-zink-200 px-3 py-2",children:"Sohbet Ayarları"}),b.jsx("ul",{className:"border-t border-solid dark:border-zink-500 py-2 px-2",children:b.jsx("li",{children:b.jsxs("button",{className:ze("p-1 rounded-md w-full flex items-center gap-2 text-base font-medium transition-all duration-200 ease-linear dropdown-item disabled:opacity-50",dI.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[b.jsx(Me.X,{className:"w-6 h-6 cursor-pointer"}),b.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})]})]})}function pI({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return b.jsx(b.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return b.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return b.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const mI={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.3,ease:"easeOut"}})};function gI({messages:e,isTyping:t}){var c,f,u,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=en(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,w=m-h<=x+10;s(w)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),b.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-2 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 122px)"},children:[((f=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:f.greeting_message)&&b.jsx("div",{className:"flex w-full items-center justify-start",children:b.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1 bg-zink-500 text-white",children:(d=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:d.greeting_message})}),b.jsx(na,{children:e.filter(h=>!!h.content&&h.content!==`
110
- `).map((h,m)=>b.jsxs(gn.div,{custom:m,initial:"hidden",animate:"visible",variants:mI,className:ze("flex w-full items-center break-words",{"justify-end":h.sender_type===mt.Customer,"justify-start":h.sender_type===mt.User,"justify-center":h.sender_type===mt.System||h.sender_type===mt.Activity}),children:[h.sender_type===mt.System&&b.jsx("div",{className:"whitespace-pre-wrap",children:h.content}),[mt.Customer,mt.User].includes(h.sender_type)&&b.jsx(gn.div,{initial:{scale:.9},animate:{scale:1},transition:{duration:.2},className:ze("max-w-[85%] whitespace-pre-wrap border border-solid rounded-md px-2 py-1",{"bg-blue-500 text-white":h.sender_type===mt.Customer,"bg-zink-500 text-white":h.sender_type===mt.User}),children:h.sender_type===mt.User?b.jsx(pI,{text:h.content}):h.content}),h.sender_type===mt.Activity&&(h.content.split("_").length===3?b.jsxs("div",{className:"whitespace-pre-wrap border border-solid rounded-md px-2 py-1 text-xs",children:[h.content.split("_")[2]," odaya katıldı"]}):h.content),mt.System===h.sender_type&&b.jsx("div",{className:"text-xs text-neutral-400",children:h.created_at.toLocaleString()})]},h.id||m))}),t&&b.jsx("div",{className:"flex w-full items-center justify-start",children:b.jsx("div",{className:"h-full flex items-center animate-pulse",children:b.jsx(Me.MessageTyping,{})})}),!i&&b.jsx("div",{className:"fixed bottom-[7.5rem] right-16",children:b.jsx(Qn,{type:"button",className:"size-10 flex items-center justify-center p-0!",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:b.jsx(Me.ArrowDown,{className:"size-5"})})}),b.jsx("div",{ref:n})]})}function yI({onNewMessage:e}){const t=y.useRef(null),n=$i(),[r,i]=y.useState(""),s=()=>{n==null||n.emit(Dn.MessageCreate,{content:r},a=>{i(""),e(a),t.current&&(t.current.style.height="3rem")})},o=a=>{n==null||n.emit(Dn.MessageTyping,{content:a})};return b.jsxs("form",{className:"border-t border-solid p-2 flex items-center gap-2",onSubmit:a=>{a.preventDefault(),s(),a.currentTarget.reset()},children:[b.jsx("div",{className:"grow relative",children:b.jsx(Fm,{id:"message",inputRef:t,className:"grow",noMargin:!0,autoComplete:"off",style:{height:"3rem"},onChange:a=>{i(a.target.value),o(a.target.value),a.target.value.length>0&&a.currentTarget.scrollHeight>a.currentTarget.clientHeight?a.currentTarget.style.height=`${a.currentTarget.scrollHeight}px`:a.currentTarget.style.height="3rem"},onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),a.stopPropagation(),a.currentTarget.value="",s())},placeholder:"Mesajınızı yazın"})}),b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx(Qn,{className:"rounded-md",type:"submit",children:"Gönder"})})]})}function vI({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,u;const{widget:o,setOpen:a}=en(),l=Ln(),c=gm();return b.jsxs(b.Fragment,{children:[b.jsxs("header",{style:{borderColor:l.getColor(B.HeaderBorder),backgroundColor:l.getColor(B.HeaderBackground),color:l.getColor(B.HeaderText)},className:"border-b border-solid p-4 rounded-t-md flex justify-between items-center",children:[e!=null&&e.agent_name?b.jsx(DL,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-300"}):b.jsx("div",{style:{color:l.getColor(B.HeaderText)},children:((u=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:u.greeting_header)||"Bizimle Sohbet Edin"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(hI,{onChatClose:s}),c&&b.jsx("button",{type:"button",style:{color:l.getColor(B.HeaderText)},onClick:()=>a(!1),children:b.jsx(Me.X,{className:"w-6 h-6 cursor-pointer"})})]})]}),b.jsx(gI,{messages:r,isTyping:t||n.length>0}),b.jsx(yI,{onNewMessage:d=>{i(d)}})]})}function xI({rating:e,onChange:t}){return b.jsx("div",{className:"flex items-center justify-center gap-1 my-2",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return b.jsxs("div",{className:"relative w-10 h-10",children:[b.jsx("svg",{className:"w-10 h-10 text-gray-300 fill-gray-300",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&b.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:b.jsx("svg",{className:"w-10 h-10 text-yellow-400 fill-yellow-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&b.jsx("svg",{className:"w-10 h-10 text-yellow-400 fill-yellow-400 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),b.jsxs("div",{className:"absolute inset-0 flex",children:[b.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),b.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function wI({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=Ln(),l=gM();y.useEffect(()=>{if(r){const d=setInterval(()=>{o(h=>h<=1?(clearInterval(d),e(!0),0):h-1)},1e3);return()=>clearInterval(d)}},[r]);const c=Sm({comment:Eu()}),f=yT({init:{comment:""},schema:c,action:async d=>{const[h,m]=await l.mutateAsync({rating:t,comment:d.comment});if(bp(m)){i(!0);return}vT(h,{form:f})}}),u=()=>{e(!0)};return b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsx("header",{style:{borderColor:a.getColor(B.HeaderBorder),backgroundColor:a.getColor(B.HeaderBackground),color:a.getColor(B.HeaderText)},className:"border-b border-solid p-4 rounded-t-md flex justify-between items-center",children:b.jsx("div",{style:{color:a.getColor(B.HeaderText)},children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),b.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?b.jsxs(gn.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[b.jsx("div",{className:"text-green-500 mb-4",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),b.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Değerlendirmeniz için teşekkürler!"}),b.jsx("p",{className:"text-gray-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),b.jsxs("p",{className:"text-gray-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),b.jsx(Qn,{onClick:u,className:"w-full max-w-xs",children:"Yeni Görüşme Başlat"})]}):b.jsxs(gn.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[b.jsx("div",{className:"text-center mb-4",children:b.jsx("p",{className:"text-gray-600 text-sm",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),b.jsxs("div",{className:"mb-2",children:[b.jsx("h3",{className:"text-center font-medium mb-1",children:"Görüşmeyi puanlayın"}),b.jsx(xI,{rating:t,onChange:n}),t>0&&b.jsxs("p",{className:"text-center text-sm text-gray-500",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),b.jsxs("form",{onSubmit:f.handleSubmit,className:"space-y-4",children:[b.jsx(Fm,{id:"comment",label:"Yorumunuz (İsteğe bağlı)",onChange:f.handleChange,onBlur:f.handleBlur,value:f.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın..."}),b.jsxs("div",{className:"flex flex-col gap-2 mt-2",children:[b.jsx(Qn,{type:"submit",disabled:t<1,className:"w-full",children:"Değerlendirmeyi Gönder"}),b.jsx(Qn,{onClick:u,variant:"gray",className:"w-full",withoutTheming:!0,children:"Yeni Görüşme Başlat"})]})]})]})})]})}function bI({children:e}){const{widget:t}=en();return t?b.jsx("section",{className:"h-full w-full relative",children:e}):null}function SI({children:e}){const t=$i();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function TI(){const{widget:e,setOpen:t,setIsHaveChat:n}=en(),r=$i(),i=mm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[c,f]=y.useState(!1),[u,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=w=>{w||t(!1),n(!1),o(null),l([]),d([]),dh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},w=>{if(w===null){t(!1),n(!1),dh(e.client_id),l([]),d([]),i.push("registration");return}o(w),n(!0)})},[]);const x=y.useCallback(w=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,w])},[a,s]);return y.useEffect(()=>{if(!r)return;const w=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(u.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):x(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),x({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:mt.Activity,activity_type:wT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},v=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(at.MessageAgentCreate,w),r.on(at.ChatUserAssignee,p),r.on(at.MessageAgentTyping,g),r.on(at.ChatUserClose,v),()=>{r.off(at.MessageAgentCreate,w),r.off(at.ChatUserAssignee,p),r.off(at.MessageAgentTyping,g),r.off(at.ChatUserClose,v)}},[x]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},w=>{l(w)})},[r,s]),y.useEffect(()=>{const w=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(w)},[c]),y.useEffect(()=>{if(!e||u.length===0)return;let w=0;e.writing_timeout&&(w=[...u[0].content].length/e.writing_timeout,w<0&&(w=0));const p=setTimeout(()=>{x(u[0]),d(u.slice(1))},w*1e3);return()=>clearTimeout(p)},[u,e]),s?b.jsxs(b.Fragment,{children:[b.jsx("div",{id:"chat-alert-portal"}),b.jsx(na,{children:b.jsx(gn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},className:"transition-all ease-in-out duration-300 bg-white h-full w-full rounded-lg border border-solid dark:border-zink-500 flex flex-col",children:s.status===ii.Closed?b.jsx(wI,{onOk:m}):b.jsx(vI,{chat:s,isTyping:c,messages:a,shortcutMessages:u,onNewMessage:x,onChatClose:h})})})]}):null}function EI(){return AL(),null}function CI(){return b.jsxs(SI,{children:[b.jsx(_S,{defaultOpen:!0,children:b.jsx(bI,{children:b.jsx(TI,{})})}),b.jsx(EI,{})]})}const kI=[{path:"/chat",component:CI,name:"chat"}],NT=[...kI],DT=[...NL],_I=[...NT,...DT];function PI(){return b.jsx(X_,{future:{v7_startTransition:!0},children:b.jsxs(J_,{children:[NT.map((e,t)=>b.jsx(Ld,{path:e.path,element:b.jsx(e.component,{})},t)),DT.map((e,t)=>b.jsx(Ld,{path:e.path,element:b.jsx(e.component,{})},t))]})})}function AI({link_id:e,defaultValues:t}){const{setWidget:n,widget:r,setDefaultValues:i}=en(),{data:s,isLoading:o}=s_(e);return y.useEffect(()=>{Array.isArray(s)&&a_(s[0])&&(n(s[0]),i(t))},[s]),o||!r?null:b.jsx(gL,{children:b.jsx(dM,{children:b.jsx(PI,{})})})}const RI=new Bk;function OI({container:e,link_id:t,defaultValues:n}){rw(e).render(b.jsxs(Kk,{client:RI,children:[b.jsx(AI,{link_id:t,defaultValues:n}),b.jsx(lL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=OI});export default jI();
108
+ `))}else{let d=f.props,h=d==null?void 0:d.className,m=typeof h=="function"?(...p)=>Th(h(...p),l.className):Th(h,l.className),x=m?{className:m}:{},b=CT(f.props,si(_f(l,["ref"])));for(let p in c)p in b&&delete c[p];return y.cloneElement(f,Object.assign({},b,c,u,{ref:i(zL(f),u.ref)},x))}return y.createElement(s,Object.assign({},_f(l,["ref"]),s!==y.Fragment&&u,s!==y.Fragment&&c),f)}function VL(){let e=y.useRef([]),t=y.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function BL(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function CT(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Fm(e){var t;return Object.assign(y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function si(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _f(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function zL(e){return R.version.split(".")[0]>="19"?e.props.ref:e.ref}let UL=Symbol();function kT(...e){let t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]);let n=Kn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[UL]))?void 0:n}function HL(e=0){let[t,n]=y.useState(e),r=y.useCallback(l=>n(l),[t]),i=y.useCallback(l=>n(u=>u|l),[t]),s=y.useCallback(l=>(t&l)===l,[t]),o=y.useCallback(l=>n(u=>u&~l),[n]),a=y.useCallback(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var WL={},Ov,jv;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ov=process==null?void 0:WL)==null?void 0:Ov.NODE_ENV)==="test"&&typeof((jv=Element==null?void 0:Element.prototype)==null?void 0:jv.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
109
+ `)),[]});var KL=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(KL||{});function qL(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function GL(e,t,n,r){let[i,s]=y.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=HL(e&&i?3:0),u=y.useRef(!1),f=y.useRef(!1),c=bT();return $r(()=>{var d;if(e){if(n&&s(!0),!t){n&&a(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),QL(t,{inFlight:u,prepare(){f.current?f.current=!1:f.current=u.current,u.current=!0,!f.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){f.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var h;f.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,c]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function QL(e,{prepare:t,run:n,done:r,inFlight:i}){let s=mc();return XL(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(YL(e,r))})}),s.dispose}function YL(e,t){var n,r;let i=mc();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function XL(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Lm=y.createContext(null);Lm.displayName="OpenClosedContext";var di=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(di||{});function _T(){return y.useContext(Lm)}function ZL({value:e,children:t}){return R.createElement(Lm.Provider,{value:e},t)}function JL(){let e=typeof document>"u";return"useSyncExternalStore"in Pf?(t=>t.useSyncExternalStore)(Pf)(()=>()=>{},()=>!1,()=>!e):!1}function PT(){let e=JL(),[t,n]=y.useState(Vl.isHandoffComplete);return t&&Vl.isHandoffComplete===!1&&n(!1),y.useEffect(()=>{t!==!0&&n(!0)},[t]),y.useEffect(()=>Vl.handoff(),[]),e?!1:t}function e4(){let e=y.useRef(!1);return $r(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function AT(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:OT)!==y.Fragment||R.Children.count(e.children)===1}let yc=y.createContext(null);yc.displayName="TransitionContext";var t4=(e=>(e.Visible="visible",e.Hidden="hidden",e))(t4||{});function n4(){let e=y.useContext(yc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function r4(){let e=y.useContext(vc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let vc=y.createContext(null);vc.displayName="NestingContext";function xc(e){return"children"in e?xc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function RT(e,t){let n=ST(e),r=y.useRef([]),i=e4(),s=bT(),o=Kn((h,m=_r.Hidden)=>{let x=r.current.findIndex(({el:b})=>b===h);x!==-1&&(gc(m,{[_r.Unmount](){r.current.splice(x,1)},[_r.Hidden](){r.current[x].state="hidden"}}),s.microTask(()=>{var b;!xc(r)&&i.current&&((b=n.current)==null||b.call(n))}))}),a=Kn(h=>{let m=r.current.find(({el:x})=>x===h);return m?m.state!=="visible"&&(m.state="visible"):r.current.push({el:h,state:"visible"}),()=>o(h,_r.Unmount)}),l=y.useRef([]),u=y.useRef(Promise.resolve()),f=y.useRef({enter:[],leave:[]}),c=Kn((h,m,x)=>{l.current.splice(0),t&&(t.chains.current[m]=t.chains.current[m].filter(([b])=>b!==h)),t==null||t.chains.current[m].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[m].push([h,new Promise(b=>{Promise.all(f.current[m].map(([p,g])=>g)).then(()=>b())})]),m==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(m)):x(m)}),d=Kn((h,m,x)=>{Promise.all(f.current[m].splice(0).map(([b,p])=>p)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>x(m))});return y.useMemo(()=>({children:r,register:a,unregister:o,onStart:c,onStop:d,wait:u,chains:f}),[a,o,r,c,d,f,u])}let OT=y.Fragment,jT=TT.RenderStrategy;function i4(e,t){var n,r;let{transition:i=!0,beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:u,enterFrom:f,enterTo:c,entered:d,leave:h,leaveFrom:m,leaveTo:x,...b}=e,[p,g]=y.useState(null),v=y.useRef(null),E=AT(e),S=kT(...E?[v,t,g]:t===null?[]:[t]),C=(n=b.unmount)==null||n?_r.Unmount:_r.Hidden,{show:k,appear:P,initial:j}=n4(),[N,I]=y.useState(k?"visible":"hidden"),re=r4(),{register:ie,unregister:xe}=re;$r(()=>ie(v),[ie,v]),$r(()=>{if(C===_r.Hidden&&v.current){if(k&&N!=="visible"){I("visible");return}return gc(N,{hidden:()=>xe(v),visible:()=>ie(v)})}},[N,v,ie,xe,k,C]);let Oe=PT();$r(()=>{if(E&&Oe&&N==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,N,Oe,E]);let Q=j&&!P,ne=P&&k&&j,O=y.useRef(!1),L=RT(()=>{O.current||(I("hidden"),xe(v))},re),B=Kn(Ve=>{O.current=!0;let pt=Ve?"enter":"leave";L.onStart(v,pt,mt=>{mt==="enter"?s==null||s():mt==="leave"&&(a==null||a())})}),V=Kn(Ve=>{let pt=Ve?"enter":"leave";O.current=!1,L.onStop(v,pt,mt=>{mt==="enter"?o==null||o():mt==="leave"&&(l==null||l())}),pt==="leave"&&!xc(L)&&(I("hidden"),xe(v))});y.useEffect(()=>{E&&i||(B(k),V(k))},[k,E,i]);let H=!(!i||!E||!Oe||Q),[,q]=GL(H,p,k,{start:B,end:V}),ce=si({ref:S,className:((r=Th(b.className,ne&&u,ne&&f,q.enter&&u,q.enter&&q.closed&&f,q.enter&&!q.closed&&c,q.leave&&h,q.leave&&!q.closed&&m,q.leave&&q.closed&&x,!q.transition&&k&&d))==null?void 0:r.trim())||void 0,...qL(q)}),ye=0;N==="visible"&&(ye|=di.Open),N==="hidden"&&(ye|=di.Closed),k&&N==="hidden"&&(ye|=di.Opening),!k&&N==="visible"&&(ye|=di.Closing);let J=ET();return R.createElement(vc.Provider,{value:L},R.createElement(ZL,{value:ye},J({ourProps:ce,theirProps:b,defaultTag:OT,features:jT,visible:N==="visible",name:"Transition.Child"})))}function s4(e,t){let{show:n,appear:r=!1,unmount:i=!0,...s}=e,o=y.useRef(null),a=AT(e),l=kT(...a?[o,t]:t===null?[]:[t]);PT();let u=_T();if(n===void 0&&u!==null&&(n=(u&di.Open)===di.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,c]=y.useState(n?"visible":"hidden"),d=RT(()=>{n||c("hidden")}),[h,m]=y.useState(!0),x=y.useRef([n]);$r(()=>{h!==!1&&x.current[x.current.length-1]!==n&&(x.current.push(n),m(!1))},[x,n]);let b=y.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);$r(()=>{n?c("visible"):!xc(d)&&o.current!==null&&c("hidden")},[n,d]);let p={unmount:i},g=Kn(()=>{var S;h&&m(!1),(S=e.beforeEnter)==null||S.call(e)}),v=Kn(()=>{var S;h&&m(!1),(S=e.beforeLeave)==null||S.call(e)}),E=ET();return R.createElement(vc.Provider,{value:d},R.createElement(yc.Provider,{value:b},E({ourProps:{...p,as:y.Fragment,children:R.createElement(NT,{ref:l,...p,...s,beforeEnter:g,beforeLeave:v})},theirProps:{},defaultTag:y.Fragment,features:jT,visible:f==="visible",name:"Transition"})))}function o4(e,t){let n=y.useContext(yc)!==null,r=_T()!==null;return R.createElement(R.Fragment,null,!n&&r?R.createElement(Eh,{ref:t,...e}):R.createElement(NT,{ref:t,...e}))}let Eh=Fm(s4),NT=Fm(i4),a4=Fm(o4),l4=Object.assign(Eh,{Child:a4,Root:Eh});const Im=y.createContext(void 0),Lo=({as:e="div",children:t,className:n})=>{const[r,i]=y.useState(!1),s=y.useCallback(()=>{i(a=>!a)},[]),o=y.useRef(null);return y.useEffect(()=>{const a=l=>{o.current&&!o.current.contains(l.target)&&r&&s&&s()};return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[r,s]),w.jsx(Im.Provider,{value:{open:r,setOpen:i,toggleOpen:s},children:w.jsx(e,{ref:o,className:`dropdown ${n}`,children:t})})},u4=({type:e,children:t,className:n,id:r,title:i})=>{const{open:s,toggleOpen:o,setOpen:a}=y.useContext(Im),l=n||"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-sm",u=n||"transition-all duration-200 ease-linear bg-white border-dashed dropdown-toggle text-custom-500 btn border-custom-500 hover:text-custom-500 hover:bg-custom-50 hover:border-custom-600 focus:text-custom-600 focus:bg-custom-50 focus:border-custom-600 active:text-custom-600 active:bg-custom-50 active:border-custom-600 dark:focus:ring-custom-400/20 dark:bg-custom-400/20 ";return w.jsx("div",{children:e==="a"?w.jsx(l2,{id:r,to:"/#",onClick:f=>{f.preventDefault(),o()},className:u+(s?" show":""),children:t}):w.jsx("button",{id:r,onClick:f=>{f.stopPropagation(),f.preventDefault(),a(!s)},type:"button",className:l,title:i,children:t})})},c4=({as:e="div",className:t,children:n,placement:r})=>{const{open:i,setOpen:s}=y.useContext(Im),o=t||"absolute z-50 py-2 mt-1 text-left list-none bg-white rounded-md shadow-md dropdown-menu min-w-max dark:bg-zink-400",[a,l]=y.useState("right-end");y.useEffect(()=>{r&&l(r)},[r]);const u=y.useRef(null),f=document.getElementsByTagName("html")[0].getAttribute("dir"),c=()=>{if(i&&a==="right-end"&&u.current){const d=u.current;d.style.position="absolute",f==="rtl"?d.style.inset="0px auto auto 0px":d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="start-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.transform="translate(0px, 20px)"}if(i&&a==="top-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto 0px 0px auto",d.style.margin="0px",d.style.transform="translate(-58px, -30px)"}if(i&&a==="bottom-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 54px)"}if(i&&a==="bottom-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px 0px auto auto",d.style.margin="0px",d.style.transform="translate(0px, 39px)"}if(i&&a==="top-start"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="auto auto 0px 0px",d.style.margin="0px",d.style.transform="translate(0px, -95px)"}if(i&&a==="left-end"&&u.current){const d=u.current;d.style.position="absolute",d.style.inset="0px auto auto 0px",d.style.margin="0px",d.style.right="0px",d.style.transform="translate(0px, -20px)"}return{}};return w.jsx(l4,{as:R.Fragment,show:i,children:d=>w.jsx(e,{ref:u,onClick:()=>s(!1),className:`${o} ${d==="entered"?"transition-all":""}`,style:c(),children:n})})};Lo.Trigger=u4;Lo.Content=c4;const f4={red:"hover:bg-red-100 text-red-600 font-medium",default:"hover:bg-slate-100 text-slate-700 font-medium"};function d4({onChatClose:e}){const[t,n]=y.useState(!1),r=Vi(),i=()=>{r==null||r.emit(Dn.ChatClose,{}),e()};return w.jsxs(w.Fragment,{children:[w.jsx(ji,{children:t&&w.jsx(Re.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 backdrop-blur-sm bg-slate-900/40 z-50 flex items-center justify-center p-4",children:w.jsxs(Re.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},transition:{duration:.2},className:"bg-white p-5 rounded-xl shadow-lg max-w-xs w-full",children:[w.jsx("div",{className:"text-lg font-semibold text-slate-800 mb-2",children:"Sohbeti kapatmak istediğinize emin misiniz?"}),w.jsx("div",{className:"text-sm text-slate-600 mb-4",children:"Bu işlem geri alınamaz."}),w.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[w.jsx("button",{type:"button",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg font-medium transition-all hover:bg-slate-200",onClick:()=>n(!1),children:"Vazgeç"}),w.jsx("button",{type:"button",className:"bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition-all hover:bg-red-700",onClick:i,children:"Kapat"})]})]})})}),w.jsxs(Lo,{className:"relative flex items-center h-full",children:[w.jsx(Lo.Trigger,{type:"button",className:"h-full flex items-center rounded-full p-1 hover:bg-slate-100 transition-colors",id:"dropdownMenuButton","data-bs-toggle":"dropdown",title:"Sohbet Ayarları",children:w.jsx(De.Menu,{className:"size-5 text-slate-600"})}),w.jsx(ji,{children:!t&&w.jsx(Re.div,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2},className:"absolute z-[9999] right-0 top-5 min-w-[14rem]",children:w.jsxs(Lo.Content,{placement:"left-end",className:"text-left bg-white rounded-lg shadow-xl dropdown-menu w-full","aria-labelledby":"dropdownMenuButton",children:[w.jsx("h5",{className:"text-sm font-semibold text-slate-500 px-3 py-2 border-b border-slate-100",children:"Sohbet Ayarları"}),w.jsx("ul",{className:"py-2 px-2",children:w.jsx("li",{children:w.jsxs("button",{className:Ne("p-2 rounded-lg w-full flex items-center gap-2 text-sm transition-all duration-200 ease-linear dropdown-item",f4.red),onClick:s=>{s.stopPropagation(),s.preventDefault(),n(!0)},children:[w.jsx(De.X,{className:"w-4 h-4"}),w.jsx("span",{children:"Sohbeti Sonlandır"})]})})})]})})})]})]})}function h4({text:e}){const t=/(\b(?:https?:\/\/)?(?:www\.)?[a-z0-9.-]+\.[a-z]{2,}(?:\/[^\s]*)?)/gi,n=e.split(t);return w.jsx(w.Fragment,{children:n.map((r,i)=>{if(t.test(r)){const a=/^https?:\/\//i.test(r)?r:`https://${r}`;return w.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500! underline",children:r},i)}return w.jsx("span",{dangerouslySetInnerHTML:{__html:r}},i)})})}const p4={hidden:{opacity:0,y:8},visible:e=>({opacity:1,y:0,transition:{delay:e*.03,duration:.15,ease:"easeOut"}})},Nv=e=>e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})):"";function m4({messages:e,isTyping:t}){var u,f,c,d;const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!0),{widget:o}=tn(),a=()=>{var h;(h=n.current)==null||h.scrollIntoView({behavior:"smooth"})},l=()=>{if(r.current){const{scrollTop:h,scrollHeight:m,clientHeight:x}=r.current,b=m-h<=x+10;s(b)}};return y.useEffect(()=>{(i||t)&&a()},[e,i,t]),w.jsxs("section",{onScroll:l,ref:r,className:"flex flex-col gap-3 w-full h-full grow pt-4 px-4 overflow-y-auto",style:{height:"calc(100vh - 142px)"},children:[((f=(u=o==null?void 0:o.appearance)==null?void 0:u.design)==null?void 0:f.greeting_message)&&w.jsx("div",{className:"flex w-full items-center justify-start",children:w.jsx("div",{className:"max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 bg-blue-700 text-white shadow-sm",children:(d=(c=o==null?void 0:o.appearance)==null?void 0:c.design)==null?void 0:d.greeting_message})}),w.jsx(ji,{children:e.filter(h=>!!h.content&&h.content!==`
110
+ `).map((h,m)=>w.jsxs(Re.div,{custom:m,initial:"hidden",animate:"visible",variants:p4,className:Ne("flex w-full items-center break-words",{"justify-end":h.sender_type===et.Customer,"justify-start":h.sender_type===et.User,"justify-center":h.sender_type===et.System||h.sender_type===et.Activity}),children:[h.sender_type===et.System&&w.jsx("div",{className:"whitespace-pre-wrap text-slate-600 bg-slate-100 px-3 py-1.5 rounded-lg text-sm shadow-sm",children:h.content}),[et.Customer,et.User].includes(h.sender_type)&&w.jsxs(Re.div,{initial:{scale:.95},animate:{scale:1},transition:{duration:.2},className:Ne("max-w-[85%] whitespace-pre-wrap border-0 rounded-lg px-3 py-2 shadow-sm",{"bg-indigo-100 text-indigo-800":h.sender_type===et.Customer,"bg-blue-600 text-white":h.sender_type===et.User}),children:[h.sender_type===et.User?w.jsx(h4,{text:h.content}):h.content,h.created_at&&w.jsx("div",{className:Ne("text-[0.5rem] text-right",{"text-indigo-400":h.sender_type===et.Customer,"text-blue-100":h.sender_type===et.User}),children:Nv(h.created_at)})]}),h.sender_type===et.Activity&&(h.content.split("_").length===3?w.jsxs("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:[h.content.split("_")[2]," odaya katıldı"]}):w.jsx("div",{className:"whitespace-pre-wrap bg-slate-100 border-0 rounded-full px-3 py-1 text-xs text-slate-600 shadow-none",children:h.content})),et.System===h.sender_type&&w.jsx("div",{className:"text-xs text-slate-400",children:h.created_at&&Nv(h.created_at)})]},h.id||m))}),t&&w.jsx("div",{className:"flex w-full items-center justify-start mt-1",children:w.jsx("div",{className:"flex items-center bg-slate-100 rounded-full px-3 py-1.5 shadow-none",children:w.jsxs("div",{className:"flex space-x-1",children:[w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),w.jsx("div",{className:"size-2 bg-slate-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),!i&&w.jsx("div",{className:"fixed bottom-[9rem] right-12",children:w.jsx(Gn,{type:"button",variant:"primary",kind:"solid",rounded:!0,className:"size-10 flex items-center justify-center p-0! shadow-md",onClick:()=>{var h,m;(m=r.current)==null||m.scrollTo({top:(h=r.current)==null?void 0:h.scrollHeight,behavior:"smooth"})},children:w.jsx(De.ArrowDown,{className:"size-4"})})}),w.jsx("div",{ref:n})]})}function g4({onNewMessage:e}){const t=y.useRef(null),n=Vi(),[r,i]=y.useState(""),[s,o]=y.useState("3rem"),a=()=>{r.trim()&&(n==null||n.emit(Dn.MessageCreate,{content:r},u=>{i(""),e(u),t.current&&(t.current.style.height="3rem",o("3rem"))}))},l=u=>{n==null||n.emit(Dn.MessageTyping,{content:u})};return w.jsxs("form",{className:"p-3 flex items-start gap-3 bg-white rounded-b-xl",onSubmit:u=>{u.preventDefault(),a(),u.currentTarget.reset()},children:[w.jsx("div",{className:"grow relative",children:w.jsx(Dm,{id:"message",inputRef:t,className:"grow shadow-none",noMargin:!0,autoComplete:"off",style:{height:s,maxHeight:"6rem"},placeholder:"Mesajınızı yazın",onChange:u=>{if(i(u.target.value),l(u.target.value),u.target.value.length>0&&u.currentTarget.scrollHeight>u.currentTarget.clientHeight){const f=`${u.currentTarget.scrollHeight}px`;u.currentTarget.style.height=f,o(f)}else u.currentTarget.style.height="3rem",o("3rem")},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.stopPropagation(),u.currentTarget.value="",a())}})}),w.jsx(Re.div,{whileTap:{scale:.95},className:"flex items-center justify-center",children:w.jsx(Gn,{className:"rounded-full shadow-sm w-12 h-12 flex items-center justify-center",type:"submit",disabled:!r.trim(),children:w.jsx(De.PaperAirplane,{className:"size-6 -rotate-12"})})})]})}const MT="/favicon.png";function y4({chat:e,isTyping:t,shortcutMessages:n,messages:r,onNewMessage:i,onChatClose:s}){var f,c;const{widget:o,setOpen:a}=tn(),l=nr(),u=pm();return w.jsxs(w.Fragment,{children:[w.jsxs("header",{style:{backgroundColor:"#ffffff",color:l.getColor(K.HeaderText),borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:[e!=null&&e.agent_name?w.jsx(ML,{name:e.agent_name,avatar:e.agent_avatar,className:"text-neutral-800"}):w.jsx("div",{style:{color:"#334155"},className:"font-medium",children:((c=(f=o==null?void 0:o.appearance)==null?void 0:f.design)==null?void 0:c.greeting_header)||"Bizimle Sohbet Edin"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(d4,{onChatClose:s}),u&&w.jsx("button",{type:"button",style:{color:"#334155"},onClick:()=>a(!1),children:w.jsx(De.X,{className:"w-5 h-5 cursor-pointer"})})]})]}),w.jsx(m4,{messages:r,isTyping:t||n.length>0}),w.jsx(g4,{onNewMessage:d=>{i(d)}}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function v4({rating:e,onChange:t}){return w.jsx("div",{className:"flex items-center justify-center gap-1 my-3",children:[1,2,3,4,5].map(n=>{const r=n<=e,i=!r&&n-.5<=e;return w.jsxs("div",{className:"relative w-10 h-10",children:[w.jsx("svg",{className:"w-10 h-10 text-slate-200 fill-slate-200",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),i&&w.jsx("div",{className:"absolute top-0 left-0 w-5 h-10 overflow-hidden",children:w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})}),r&&w.jsx("svg",{className:"w-10 h-10 text-blue-500 fill-blue-500 absolute top-0 left-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),w.jsxs("div",{className:"absolute inset-0 flex",children:[w.jsx("button",{type:"button",onClick:()=>t(n-.5),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n-.5} stars`}),w.jsx("button",{type:"button",onClick:()=>t(n),className:"w-1/2 h-full cursor-pointer focus:outline-none","aria-label":`${n} stars`})]})]},n)})})}function x4({onOk:e}){const[t,n]=y.useState(0),[r,i]=y.useState(!1),[s,o]=y.useState(10),a=gN();y.useEffect(()=>{if(r){const c=setInterval(()=>{o(d=>d<=1?(clearInterval(c),e(!0),0):d-1)},1e3);return()=>clearInterval(c)}},[r]);const l=wm({comment:Eu()}),u=yT({init:{comment:""},schema:l,action:async c=>{const[d,h]=await a.mutateAsync({rating:t,comment:c.comment});if(xp(h)){i(!0);return}vT(d,{form:u})}}),f=()=>{e(!0)};return w.jsxs("div",{className:"flex flex-col h-full",children:[w.jsx("header",{style:{backgroundColor:r?"#ffffff":"#4F46E5",color:r?"#334155":"#ffffff",borderBottom:"1px solid #f1f5f9"},className:"p-4 rounded-t-xl flex justify-between items-center z-10",children:w.jsx("div",{className:"font-medium",children:r?"Teşekkürler!":"Görüşmenizi Değerlendirin"})}),w.jsx("div",{className:"flex-1 p-6 overflow-y-auto flex flex-col",children:r?w.jsxs(Re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center h-full text-center",children:[w.jsx("div",{className:"text-green-500 mb-4",children:w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),w.jsx("h2",{className:"text-xl font-semibold mb-2 text-slate-800",children:"Değerlendirmeniz için teşekkürler!"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"Geri bildiriminiz bizim için çok değerli."}),w.jsxs("p",{className:"text-slate-500 mb-4",children:["Ekran ",s," saniye içinde kapanacaktır."]}),w.jsx(Gn,{onClick:f,className:"w-full max-w-xs bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]}):w.jsxs(Re.div,{initial:{opacity:0},animate:{opacity:1},className:"flex flex-col",children:[w.jsx("div",{className:"text-center mb-6",children:w.jsx("p",{className:"text-slate-600 text-base",children:"Lütfen hizmetimizi değerlendirin. Görüşleriniz bizim için önemli."})}),w.jsxs("div",{className:"mb-6",children:[w.jsx("h3",{className:"text-center font-medium mb-2 text-slate-800 text-lg",children:"Görüşmeyi puanlayın"}),w.jsx(v4,{rating:t,onChange:n}),t>0&&w.jsxs("p",{className:"text-center text-sm text-slate-500 mt-1",children:["Puanınız:"," ",Number.isInteger(t)?t:t.toFixed(1)]})]}),w.jsxs("form",{onSubmit:u.handleSubmit,className:"space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"comment",className:"block text-sm font-medium text-slate-700 mb-1",children:"Yorumunuz (İsteğe bağlı)"}),w.jsx(Dm,{id:"comment",onChange:u.handleChange,onBlur:u.handleBlur,value:u.values.comment,placeholder:"Görüşme hakkında düşüncelerinizi paylaşın...",className:"rounded-lg border-slate-200 focus:border-blue-500 focus:ring-blue-500 shadow-sm"})]}),w.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[w.jsx(Gn,{type:"submit",disabled:t<1,className:"w-full bg-blue-600 hover:bg-blue-700 text-white rounded-lg py-2.5 font-medium transition-colors disabled:bg-slate-200 disabled:text-slate-400",children:"Değerlendirmeyi Gönder"}),w.jsx(Gn,{onClick:f,className:"w-full bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg py-2.5 font-medium transition-colors",children:"Yeni Görüşme Başlat"})]})]})]})}),w.jsxs("a",{href:"https://alfatekyazilim.com.tr",target:"_blank",rel:"noopener noreferrer",className:"py-1.5 px-3 text-xs text-center text-slate-400 border-t border-slate-100 flex items-center justify-center gap-1 hover:text-slate-600 transition-colors",children:[w.jsx("span",{children:"Powered by"}),w.jsx("span",{className:"font-medium",children:"Alfatek"}),w.jsx("img",{src:MT,alt:"Alfatek",className:"size-3.5 ml-0.5"})]})]})}function w4({children:e}){const{widget:t}=tn();return t?w.jsx("section",{className:"h-full w-full relative",children:e}):null}function b4({children:e}){const t=Vi();return y.useEffect(()=>{t&&t.connect()},[]),!t||!t.connected?null:e}function S4(){const{widget:e,setOpen:t,setIsHaveChat:n}=tn(),r=Vi(),i=hm(),[s,o]=y.useState(null),[a,l]=y.useState([]),[u,f]=y.useState(!1),[c,d]=y.useState([]),h=()=>{if(s){o({...s,status:ii.Closed});return}m()},m=b=>{b||t(!1),n(!1),o(null),l([]),d([]),fh(e.client_id).then(()=>{r==null||r.disconnect(),i.push("registration")})};y.useEffect(()=>{r==null||r.emit(Dn.ChatView,{},b=>{if(b===null){t(!1),n(!1),fh(e.client_id),l([]),d([]),i.push("registration");return}o(b),n(!0)})},[]);const x=y.useCallback(b=>{s&&![ii.Closed,ii.Deleted].includes(s.status)&&l([...a,b])},[a,s]);return y.useEffect(()=>{if(!r)return;const b=E=>{const S={content:E.content,created_at:E.created_at,files:E.files,id:E._id,sender_type:E.sender_type,answers:E.answers,reply_id:E.reply_id};if(c.length>0){d(C=>[...C,S]);return}E.is_shortcut?d([S]):x(S),f(!1)},p=E=>{o({...s,agent_name:E.name,agent_avatar:E.avatar,is_uploadable:(s==null?void 0:s.is_uploadable)??!1,status:(s==null?void 0:s.status)??ii.Open}),x({content:` _ _${E.name}`,created_at:new Date,files:[],id:Math.random().toString(),sender_type:et.Activity,activity_type:wT.AdminJoin,sender_name:E.name})},g=()=>{f(!0)},v=()=>{if(s){o({...s,status:ii.Closed});return}m()};return r.on(ut.MessageAgentCreate,b),r.on(ut.ChatUserAssignee,p),r.on(ut.MessageAgentTyping,g),r.on(ut.ChatUserClose,v),()=>{r.off(ut.MessageAgentCreate,b),r.off(ut.ChatUserAssignee,p),r.off(ut.MessageAgentTyping,g),r.off(ut.ChatUserClose,v)}},[x]),y.useEffect(()=>{!r||!s||r.emit(Dn.MessageList,{},b=>{l(b)})},[r,s]),y.useEffect(()=>{const b=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(b)},[u]),y.useEffect(()=>{if(!e||c.length===0)return;let b=0;e.writing_timeout&&(b=[...c[0].content].length/e.writing_timeout,b<0&&(b=0));const p=setTimeout(()=>{x(c[0]),d(c.slice(1))},b*1e3);return()=>clearTimeout(p)},[c,e]),s?w.jsxs(w.Fragment,{children:[w.jsx("div",{id:"chat-alert-portal"}),w.jsx(ji,{children:w.jsx(Re.div,{initial:{opacity:0,scale:.98,y:5},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:5},transition:{type:"spring",damping:35,stiffness:400,duration:.2},className:"bg-white h-full w-full rounded-xl shadow-sm flex flex-col overflow-hidden",children:s.status===ii.Closed?w.jsx(x4,{onOk:m}):w.jsx(y4,{chat:s,isTyping:u,messages:a,shortcutMessages:c,onNewMessage:x,onChatClose:h})})})]}):null}function T4(){return PL(),null}function E4(){return w.jsxs(b4,{children:[w.jsx(_S,{defaultOpen:!0,children:w.jsx(w4,{children:w.jsx(S4,{})})}),w.jsx(T4,{})]})}const C4=[{path:"/chat",component:E4,name:"chat"}],DT=[...C4],FT=[...NL],k4=[...DT,...FT];function _4(){return w.jsx(Z_,{future:{v7_startTransition:!0},children:w.jsxs(e2,{children:[DT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t)),FT.map((e,t)=>w.jsx(Fd,{path:e.path,element:w.jsx(e.component,{})},t))]})})}function P4({link_id:e,defaultValues:t}){const{setWidget:n,widget:r,setDefaultValues:i}=tn(),{data:s,isLoading:o}=o_(e);return y.useEffect(()=>{Array.isArray(s)&&l_(s[0])&&(n(s[0]),i(t))},[s]),o||!r?null:w.jsx(gL,{children:w.jsx(dN,{children:w.jsx(_4,{})})})}const A4=new zk;function R4({container:e,link_id:t,defaultValues:n}){rw(e).render(w.jsxs(qk,{client:A4,children:[w.jsx(P4,{link_id:t,defaultValues:n}),w.jsx(lL,{richColors:!0,style:{zIndex:999999},position:"bottom-right"})]}))}window.widget=R4});export default O4();